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*;
abstract Term;
abstract Connective;
Atom:Connective ::= Relation;
abstract Relation;
abstract BinaryRelation:Relation ::= Left:Term Right:Term;
Subsetof:BinaryRelation;
Compare:BinaryRelation;
Equal:BinaryRelation;
abstract UnaryConnective:Connective ::= Connective;
abstract BinaryConnective:Connective ::= Left:Connective Right:Connective;
Conjunction:BinaryConnective;
Disjunction:BinaryConnective;
Implication:BinaryConnective;
Negation:UnaryConnective;
ConstantNum:Term ::= <Num:double>;
PillarTerm : Term ;
rel PillarTerm.Rel -> Pillar;
Term1:PillarTerm;//return size of top disk, return -1 when no disk.
Term2:PillarTerm;//return the target pillar's ID for the current pillar in odd turns.
Term3:PillarTerm;//return the ID for the current pillar.
Constraint::=Connective*;
abstract Term;
abstract Relation;
abstract Connective;
abstract SelfFunction:Term;
abstract Calculation:Term;
abstract BinaryCalculation:Calculation ::= Left:Term Right:Term;
Plus:BinaryCalculation;
Minus:BinaryCalculation;
Multi:BinaryCalculation;
Divide:BinaryCalculation;
Mod:BinaryCalculation;
IfThenElse:Term::=If:Condition Then:Term Else:Term;
abstract Condition:Term;
abstract BinaryCondition:Condition ::= Left:Term Right:Term;
SubsetofFunction:BinaryCondition;
CompareFunction:BinaryCondition;
EqualFunction:BinaryCondition;
abstract BinaryRelation:Relation ::= Left:Term Right:Term;
Subsetof:BinaryRelation;
Compare:BinaryRelation;
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.
Finish editing this message first!
Please register or to comment