diff options
author | 2019-02-15 12:42:15 -0500 | |
---|---|---|
committer | 2019-02-15 12:42:15 -0500 | |
commit | f1d9a50a3be2bfabc6091d51e120ca63ac1ab2d4 (patch) | |
tree | 90b96d89d5e6f7f4e6c15b06d34851753350e35d /Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql | |
parent | Fix FAM Test. Begin Grammar Fix. (diff) | |
download | VIATRA-Generator-f1d9a50a3be2bfabc6091d51e120ca63ac1ab2d4.tar.gz VIATRA-Generator-f1d9a50a3be2bfabc6091d51e120ca63ac1ab2d4.tar.zst VIATRA-Generator-f1d9a50a3be2bfabc6091d51e120ca63ac1ab2d4.zip |
Set up #19
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql')
-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 | ||