diff options
author | 2019-02-15 12:42:15 -0500 | |
---|---|---|
committer | 2020-06-07 19:06:30 -0400 | |
commit | cd87de919c733033557401e011102edc67c5f169 (patch) | |
tree | c19225558d63945cf7afea5e0dc92c738788d71a /Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries | |
parent | Fix FAM Test. Begin Grammar Fix. (diff) | |
download | VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.tar.gz VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.tar.zst VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.zip |
Set up #19
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql new file mode 100644 index 00000000..9af35b50 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql | |||
@@ -0,0 +1,29 @@ | |||
1 | package ca.mcgill.ecse.dslreasoner.standalone.test.ecore.queries | ||
2 | |||
3 | import epackage "http://www.eclipse.org/emf/2002/Ecore" | ||
4 | |||
5 | pattern directSupertype(a: EClass, b:EClass) { | ||
6 | EClass.eSuperTypes(a,b); | ||
7 | } | ||
8 | |||
9 | @Constraint(key={a}, severity="error", message="error") | ||
10 | pattern loopInInheritence(a: EClass) { | ||
11 | find directSupertype+(a,a); | ||
12 | } | ||
13 | |||
14 | pattern opposite(a:EReference, b: EReference) { | ||
15 | EReference.eOpposite(a,b); | ||
16 | } | ||
17 | @Constraint(key={a}, severity="error", message="error") | ||
18 | pattern oppositeDifferentClass(a:EReference) { | ||
19 | EReference.eOpposite(a,b); | ||
20 | EReference.eContainingClass(a,aContaining); | ||
21 | EReference.eType(b,bTarget); | ||
22 | aContaining != bTarget; | ||
23 | } | ||
24 | |||
25 | @Constraint(key={a}, severity="error", message="error") | ||
26 | pattern nonSymmetricOpposite(a:EReference, b:EReference) { | ||
27 | find opposite(a,b); | ||
28 | neg find opposite(b,a); | ||
29 | } \ No newline at end of file | ||