aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql')
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql24
1 files changed, 24 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql
new file mode 100644
index 00000000..269a4242
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql
@@ -0,0 +1,24 @@
1package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries
2
3import epackage "FileSystemMetamodel"
4
5pattern patternContent(o1: FSObject, o2: FSObject) {
6 Dir.contents(o1,o2);
7}
8
9@QueryBasedFeature
10pattern 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")
18pattern 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}