Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
UpdatedHanoi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yingjian Wang
UpdatedHanoi
Commits
8e11b086
Commit
8e11b086
authored
3 years ago
by
Yingjian Wang
Browse files
Options
Downloads
Patches
Plain Diff
Update Constraint.relast
parent
5611a405
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/jastadd/hanoi/Constraint.relast
+49
-26
49 additions, 26 deletions
src/main/jastadd/hanoi/Constraint.relast
with
49 additions
and
26 deletions
src/main/jastadd/hanoi/Constraint.relast
+
49
−
26
View file @
8e11b086
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.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment