// General CD to be included in different Versions of the SDG package classes; import edu.neu.ccs.demeterf.demfgen.lib.*; nogen List(X) : Cons(X) | Empty(X). nogen Cons(X) = X List(X). nogen Empty(X) = . nogen Option(X): Some(X) | None(X). nogen Some(X) = X. nogen None(X) = . Pair(A,B) = *s A *s B *s. Variable = String. Weight = int. Price = double. Quality = double. PlayerID = int. Relation = int. Constraint = *s Weight *s Relation *s List(Variable) *s. Assignment = "assign[" List(Literal) "]". Literal = *s Sign *s Variable *s. Sign: Pos | Neg. Pos = "+". Neg = "-". Player = "player" *s PlayerID *s String. Type = "type[" List(TypeInstance) "]". Derivative = "deriv[" String *s PlayerID *s Option(PlayerID) *s Price *s Type *s Option(RawMaterial) *s Option(FinishedProduct)"]". RawMaterial = "rm""["RawMaterialInstance"]". FinishedProduct = "finish""["IntermediateProduct *s Quality"]". History = "history[" List(Round) "]". Round = "round" *s int *s "[" List(PlayerTransaction) "]". PlayerTransaction = "ptrans[" Player *s List(Transaction) "]". Transaction = "trans[" TransactionType *s Derivative "]". TransactionType: Buy | Create | Reoffer | Deliver | Finish. Buy = "BUY". Create = "CREATE". Reoffer = "REOFFER". Deliver = "DELIVER". Finish = "FINISH". Players = "players[" List(Player) "]". Accounts = "accounts[" List(Pair(PlayerID,Double)) "]". Store = "store[" List(Pair(PlayerID,PlayerStore)) "]". PlayerStore = "pstore" *s "forsale" *s List(Derivative) *s "bought" *s List(Derivative). Config = double *s int *s int *s double.