blob: 269a42428c4463033a2eaccc69d4d538c4028728 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries
import epackage "FileSystemMetamodel"
pattern patternContent(o1: FSObject, o2: FSObject) {
Dir.contents(o1,o2);
}
@QueryBasedFeature
pattern live(this: FileSystem, l: FSObject) {
FileSystem.root(this,l);
} or {
FileSystem.root(this,root);
find patternContent+(root,l);
}
@Constraint(key={child}, severity="error", message="error")
pattern contentInNotLive(parent : Dir, child: FSObject) {
Dir.contents(parent,child);
neg find live(_,parent);
} or {
Dir.contents(parent,child);
neg find live(_,child);
}
|