diff options
author | 2020-04-27 10:45:28 -0400 | |
---|---|---|
committer | 2020-04-27 10:45:28 -0400 | |
commit | 36ca60e5b6bd047a4f444d96241bd60a01bbab17 (patch) | |
tree | 472ee15861945af6b7056d19250734ffab4c3aef /Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src | |
parent | Merge branch 'Attribute-Solver' (diff) | |
download | VIATRA-Generator-36ca60e5b6bd047a4f444d96241bd60a01bbab17.tar.gz VIATRA-Generator-36ca60e5b6bd047a4f444d96241bd60a01bbab17.tar.zst VIATRA-Generator-36ca60e5b6bd047a4f444d96241bd60a01bbab17.zip |
rename Pledge Case Studies and add familyTree case study
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/queries/familyTreeConstraints.vql | 24 | ||||
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/run/FamilyTreeGen.java | 13 |
2 files changed, 37 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/queries/familyTreeConstraints.vql b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/queries/familyTreeConstraints.vql new file mode 100644 index 00000000..1b9b6659 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/queries/familyTreeConstraints.vql | |||
@@ -0,0 +1,24 @@ | |||
1 | package queries | ||
2 | |||
3 | import "http://www.example.org/familytree" | ||
4 | |||
5 | @Constraint(message="memberIsItsOwnParent", severity="error", key={m}) | ||
6 | pattern memberIsItsOwnParent(m: Member) = { | ||
7 | FamilyTree.members(_, m); | ||
8 | Member.parents(m, p); | ||
9 | m == p; | ||
10 | } | ||
11 | |||
12 | //@Constraint(message="parentTooYoung", severity="error", key={m, p}) | ||
13 | //pattern parentTooYoung(m: Member, p: Member) = { | ||
14 | // FamilyTree.members(_, m); | ||
15 | // Member.parents(m, p); | ||
16 | // Member.age(m, mAge); | ||
17 | // Member.age(p, pAge); | ||
18 | // check (mAge <= (pAge + 12)); | ||
19 | //} | ||
20 | |||
21 | |||
22 | |||
23 | |||
24 | |||
diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/run/FamilyTreeGen.java b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/run/FamilyTreeGen.java new file mode 100644 index 00000000..4dcd77a5 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/run/FamilyTreeGen.java | |||
@@ -0,0 +1,13 @@ | |||
1 | package run; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.application.execution.StandaloneScriptExecutor; | ||
4 | |||
5 | public class FamilyTreeGen { | ||
6 | public static void main(String[] args) { | ||
7 | String errorMessages = StandaloneScriptExecutor.executeScript("inputs/familytreeGen.vsconfig"); | ||
8 | if(errorMessages!=null) { | ||
9 | System.out.println(errorMessages); | ||
10 | } | ||
11 | } | ||
12 | |||
13 | } | ||