diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql new file mode 100644 index 00000000..269a4242 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql | |||
@@ -0,0 +1,24 @@ | |||
1 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries | ||
2 | |||
3 | import epackage "FileSystemMetamodel" | ||
4 | |||
5 | pattern patternContent(o1: FSObject, o2: FSObject) { | ||
6 | Dir.contents(o1,o2); | ||
7 | } | ||
8 | |||
9 | @QueryBasedFeature | ||
10 | pattern live(this: FileSystem, l: FSObject) { | ||
11 | FileSystem.root(this,l); | ||
12 | } or { | ||
13 | FileSystem.root(this,root); | ||
14 | find patternContent+(root,l); | ||
15 | } | ||
16 | |||
17 | @Constraint(key={child}, severity="error", message="error") | ||
18 | pattern contentInNotLive(parent : Dir, child: FSObject) { | ||
19 | Dir.contents(parent,child); | ||
20 | neg find live(_,parent); | ||
21 | } or { | ||
22 | Dir.contents(parent,child); | ||
23 | neg find live(_,child); | ||
24 | } | ||