diff options
author | 2021-01-06 12:41:48 -0500 | |
---|---|---|
committer | 2021-01-06 12:41:48 -0500 | |
commit | 82bbdc37fc4dd829a84a849a3e3ffb2467217526 (patch) | |
tree | 25d94a598f162cec0eba8c2d5534ce3a6498806c /Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/queries/familyTreeConstraints.vql | |
parent | prepping measurement setup w/ dreal (diff) | |
download | VIATRA-Generator-82bbdc37fc4dd829a84a849a3e3ffb2467217526.tar.gz VIATRA-Generator-82bbdc37fc4dd829a84a849a3e3ffb2467217526.tar.zst VIATRA-Generator-82bbdc37fc4dd829a84a849a3e3ffb2467217526.zip |
fine-tune measurement setup
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/queries/familyTreeConstraints.vql')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/queries/familyTreeConstraints.vql | 47 |
1 files changed, 0 insertions, 47 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 deleted file mode 100644 index f8650073..00000000 --- a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src/queries/familyTreeConstraints.vql +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
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="twoMembersHaveNoParent", severity="error", key={m1, m2}) | ||
13 | pattern twoMembersHaveNoParent(m1:Member, m2:Member) = { | ||
14 | neg find memberHasParent(m1); | ||
15 | neg find memberHasParent(m2); | ||
16 | m1 != m2; | ||
17 | } | ||
18 | |||
19 | pattern memberHasParent(m: Member) = { | ||
20 | Member.parents(m, _); | ||
21 | } | ||
22 | |||
23 | @Constraint(message="negativeAge", severity="error",key={m}) | ||
24 | pattern negativeAge(m: Member) { | ||
25 | Member.age(m,mage); | ||
26 | check(mage<0); | ||
27 | } | ||
28 | |||
29 | @Constraint(message="realisticAge", severity="error",key={m}) | ||
30 | pattern realisticAge(m: Member) { | ||
31 | Member.age(m,mage); | ||
32 | check(mage>120); | ||
33 | } | ||
34 | |||
35 | @Constraint(message="parentTooYoung", severity="error", key={c, p}) | ||
36 | pattern parentTooYoung(c: Member, p: Member) = { | ||
37 | FamilyTree.members(_, c); | ||
38 | Member.parents(c, p); | ||
39 | Member.age(c, cAge); | ||
40 | Member.age(p, pAge); | ||
41 | check (pAge <= (cAge + 12)); | ||
42 | } | ||
43 | |||
44 | |||
45 | |||
46 | |||
47 | |||