diff options
author | 2020-05-19 21:18:06 +0200 | |
---|---|---|
committer | 2020-05-19 21:18:06 +0200 | |
commit | b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b (patch) | |
tree | ad3222182065b8fac7d9b3d528c4efabf2aa0dd2 /Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries | |
parent | Merge branch 'master' of github.com:viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.gz VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.zst VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.zip |
Config language WIP
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries')
4 files changed, 26 insertions, 19 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.FamilyTreeConstraints.java._trace b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.FamilyTreeConstraints.java._trace index 364eae66..b000501e 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.FamilyTreeConstraints.java._trace +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.FamilyTreeConstraints.java._trace | |||
Binary files differ | |||
diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.MemberIsItsOwnParent.java._trace b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.MemberIsItsOwnParent.java._trace index 1b0dca98..aaf4d0c2 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.MemberIsItsOwnParent.java._trace +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.MemberIsItsOwnParent.java._trace | |||
Binary files differ | |||
diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.gitignore b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.gitignore index 3be531f5..3b9ccef7 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.gitignore +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.gitignore | |||
@@ -6,3 +6,4 @@ | |||
6 | /.MemberHasNoParent.java._trace | 6 | /.MemberHasNoParent.java._trace |
7 | /.MemberHasParent.java._trace | 7 | /.MemberHasParent.java._trace |
8 | /.TwoMembersHaveNoParent.java._trace | 8 | /.TwoMembersHaveNoParent.java._trace |
9 | /.NegativeAge.java._trace | ||
diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/familyTreeConstraints.vql b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/familyTreeConstraints.vql index e7b44f0b..fdbac640 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/familyTreeConstraints.vql +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/familyTreeConstraints.vql | |||
@@ -9,25 +9,31 @@ pattern memberIsItsOwnParent(m: Member) = { | |||
9 | m == p; | 9 | m == p; |
10 | } | 10 | } |
11 | 11 | ||
12 | //@Constraint(message="twoMembersHaveNoParent", severity="error", key={m1, m2}) | 12 | @Constraint(message="twoMembersHaveNoParent", severity="error", key={m1, m2}) |
13 | //pattern twoMembersHaveNoParent(m1:Member, m2:Member) = { | 13 | pattern twoMembersHaveNoParent(m1:Member, m2:Member) = { |
14 | // neg find memberHasParent(m1); | 14 | neg find memberHasParent(m1); |
15 | // neg find memberHasParent(m2); | 15 | neg find memberHasParent(m2); |
16 | // m1 != m2; | 16 | m1 != m2; |
17 | //} | 17 | } |
18 | // | 18 | |
19 | //pattern memberHasParent(m: Member) = { | 19 | pattern memberHasParent(m: Member) = { |
20 | // Member.parents(m, _); | 20 | Member.parents(m, _); |
21 | //} | 21 | } |
22 | // | 22 | |
23 | //@Constraint(message="parentTooYoung", severity="error", key={m, p}) | 23 | @Constraint(message="negativeAge", severity="error",key={m}) |
24 | //pattern parentTooYoung(m: Member, p: Member) = { | 24 | pattern negativeAge(m: Member) { |
25 | // FamilyTree.members(_, m); | 25 | Member.age(m,mage); |
26 | // Member.parents(m, p); | 26 | check(mage<0); |
27 | // Member.age(m, mAge); | 27 | } |
28 | // Member.age(p, pAge); | 28 | |
29 | // check (mAge <= (pAge + 12)); | 29 | @Constraint(message="parentTooYoung", severity="error", key={c, p}) |
30 | //} | 30 | pattern parentTooYoung(c: Member, p: Member) = { |
31 | FamilyTree.members(_, c); | ||
32 | Member.parents(c, p); | ||
33 | Member.age(c, cAge); | ||
34 | Member.age(p, pAge); | ||
35 | check (pAge <= (cAge + 12)); | ||
36 | } | ||
31 | 37 | ||
32 | 38 | ||
33 | 39 | ||