Skip to content
Snippets Groups Projects
Commit 8e11b086 authored by Yingjian Wang's avatar Yingjian Wang
Browse files

Update Constraint.relast

parent 5611a405
No related branches found
No related tags found
No related merge requests found
Constraint::=Connective*; Constraint::=Connective*;
abstract Term;
abstract Connective; abstract Term;
Atom:Connective ::= Relation; abstract Relation;
abstract Relation; abstract Connective;
abstract BinaryRelation:Relation ::= Left:Term Right:Term; abstract SelfFunction:Term;
Subsetof:BinaryRelation; abstract Calculation:Term;
Compare:BinaryRelation; abstract BinaryCalculation:Calculation ::= Left:Term Right:Term;
Equal:BinaryRelation; Plus:BinaryCalculation;
Minus:BinaryCalculation;
abstract UnaryConnective:Connective ::= Connective; Multi:BinaryCalculation;
abstract BinaryConnective:Connective ::= Left:Connective Right:Connective; Divide:BinaryCalculation;
Conjunction:BinaryConnective; Mod:BinaryCalculation;
Disjunction:BinaryConnective;
Implication:BinaryConnective; IfThenElse:Term::=If:Condition Then:Term Else:Term;
Negation:UnaryConnective; abstract Condition:Term;
abstract BinaryCondition:Condition ::= Left:Term Right:Term;
ConstantNum:Term ::= <Num:double>; SubsetofFunction:BinaryCondition;
CompareFunction:BinaryCondition;
PillarTerm : Term ; EqualFunction:BinaryCondition;
rel PillarTerm.Rel -> Pillar;
abstract BinaryRelation:Relation ::= Left:Term Right:Term;
Term1:PillarTerm;//return size of top disk, return -1 when no disk. Subsetof:BinaryRelation;
Term2:PillarTerm;//return the target pillar's ID for the current pillar in odd turns. Compare:BinaryRelation;
Term3:PillarTerm;//return the ID for the current pillar. Equal:BinaryRelation;
Atom:Connective ::= Relation;
abstract UnaryConnective:Connective ::= Connective;
abstract BinaryConnective:Connective ::= Left:Connective Right:Connective;
Conjunction:BinaryConnective;
Disjunction:BinaryConnective;
Implication:BinaryConnective;
Negation:UnaryConnective;
ConstantNum:SelfFunction ::= <Num:int>;
abstract PillarFunction:SelfFunction;
rel PillarFunction.Rel -> Pillar;
PillarID:PillarFunction;//Pillar.ID returns the ID of this Pillar.
TotalDiskAmount:PillarFunction;//Pillar.AmountD() returns the amount of the disks for the game.
DisksOnPillar:PillarFunction;//Pillar.getNumDisk() returns the amount of the disks for 'this' pillar.
TopDiskSize:PillarFunction;//Pillar.getDisk(this.getRel().getNumDisk()-1).getSize();
//return the size of the disk on the top of 'this' pillar.
Term1:PillarFunction;//return size of top disk, return -1 when no disk.
Term2:PillarFunction;//return the target pillar's ID for the current pillar in odd turns.
Term3:PillarFunction;//return the ID for the current pillar.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment