// Version 3: March 15th // Request and Response are now two aggregate structures with "one" propose and "one" oppose entries. nogen include "../scg/lib.java.cd"; package scg; nogen RWrap(T) = FullyQualifiedClassName verbatim. FullyQualifiedClassName = ident DSLOI. DSLOI = DSCOI | DSEOI. DSCOI = "." ident DSLOI. DSEOI = . // Domain interface DomainI = . interface InstanceI = . interface SolutionI = . interface InstanceSetI = . // Claims Claim = RWrap(InstanceSetI) RWrap(ProtocolI) double *s double. // Protocols interface ProtocolI = . ProtocolSpec = List(Step). Step = Action "from" Role . interface Role = Alice | Bob. Alice = "Alice". Bob = "Bob". interface Action = ProvideAction | SolveAction. //can only provide for the claim ProvideAction = "instance". //solve the instance provided in step # stepNo //step # -1 for the singleton instance in claim // stepNo is 0-based SolveAction = "solution" "of" *s int. Request = "propose" *s List(Claim) *s "oppose" *s List(Claim) *s "protocolRequest" *s List(ProtocolRequest). ProtocolRequest = ProvideRequest | SolveRequest. ProvideRequest = "provide" *s Claim. SolveRequest = "solve" *s RWrap(InstanceI) Option(Claim). Response = "propose" *s List(Claim) *s "oppose" *s List(OpposeAction) *s "protocolResponse" *s List(ProtocolResponse). OpposeAction = Strengthening | Refuting | Agreement. Agreement = "agree". Strengthening = "strengthening" *s double. Refuting = "refuting". ProtocolResponse = ProvideResponse | SolveResponse. ProvideResponse = "provide" *s RWrap(InstanceI). SolveResponse = "solve" *s RWrap(SolutionI). //config common to all games SCGConfig = "scg_config[" *l*t "domain:" *s FullyQualifiedClassName // fully qualified class name of Domain used *l*t "protocols:" *s Cons(FullyQualifiedClassName) // fully qualified class names of protocols used *l*t "tournamentStyle:" *s TournamentStyle // tournament style *l*t "turnDuration:" *s int // number of seconds *l*t "maxNumAvatars:" *s int // per tournament *l*t "minStrengthening:" *s double // minimum amount of strengthening by a strengthening oppose *l*t "initialReputation:" *s double // initial reputation of an avatar *l*t "maxReputation:" *s double // maximum reputation a scholar can reach // game ends when reached *l*t "reputationFactor:" *s double // a number in [0,1] used to determine reputation gain // upon successful defense of own claim or // upon successful refutation of claim of another scholar. *l*t "minProposals:" *s int *l*t "maxProposals:" *s int // scholars must stay active, but not too active *l*t "numRounds:" *s int // the number of rounds for a tournament *l*t "proposedClaimMustBeNew:" *s boolean // proposed claims must be different from previously proposed claims *l*t "minConfidence:" *s double // the minimum confidence in a claim *l "]". TournamentStyle = FullRoundRobin | KnockOut | SwissStyleTournament. FullRoundRobin = "full" *s "round-robin". KnockOut = "knockout". SwissStyleTournament = "swiss". interface DomainConfigI = . //config definitions Config = SCGConfig RWrap(DomainConfigI). //baby avatar definitions interface AvatarI = .