diff options
Diffstat (limited to 'Metrics/Metrics-Calculation/SocialNetwork_plugin/bin/ca/mcgill/ecse/socialnetwork/plugin/Queries.vql')
-rw-r--r-- | Metrics/Metrics-Calculation/SocialNetwork_plugin/bin/ca/mcgill/ecse/socialnetwork/plugin/Queries.vql | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/bin/ca/mcgill/ecse/socialnetwork/plugin/Queries.vql b/Metrics/Metrics-Calculation/SocialNetwork_plugin/bin/ca/mcgill/ecse/socialnetwork/plugin/Queries.vql new file mode 100644 index 00000000..3e7fc68c --- /dev/null +++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/bin/ca/mcgill/ecse/socialnetwork/plugin/Queries.vql | |||
@@ -0,0 +1,54 @@ | |||
1 | package ca.mcgill.ecse.socialnetwork.plugin | ||
2 | |||
3 | import epackage "http://ecse.mcgill.ca/socialnetwork" | ||
4 | |||
5 | //@Constraint(message="terminatorAndInformation", severity="error", key={T}) | ||
6 | //pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { | ||
7 | // FunctionalOutput.outgoingLinks(Out,I); | ||
8 | // FunctionalOutput.terminator(Out,T); | ||
9 | //} or { | ||
10 | // InformationLink.to(I,In); | ||
11 | // FunctionalInput.terminator(In,T); | ||
12 | //} | ||
13 | |||
14 | @Constraint(message="singleFriendship", severity="error", key={p1}) | ||
15 | pattern singleFriendship(p1: Person) { | ||
16 | find friendship(p1, p); | ||
17 | neg find friendship(p, p1); | ||
18 | } | ||
19 | |||
20 | //@Constraint(message="cycle", severity="error", key={p}) | ||
21 | //pattern cycleInParenthood(p: Person) { | ||
22 | // find isAncestor(p, p); | ||
23 | //} | ||
24 | |||
25 | @Constraint(message="noFriend", severity="error", key={p}) | ||
26 | pattern noFriend(p: Person){ | ||
27 | neg find friendship(p, _); | ||
28 | } | ||
29 | |||
30 | //@Constraint(message="brothhoodParent", severity="error", key={p1,p2}) | ||
31 | //pattern brothhoodParent(p1: Person, p2: Person){ | ||
32 | // Person.parents(p1, parent1); | ||
33 | // Person.parents(p2, parent2); | ||
34 | // parent1 == parent2; | ||
35 | // find isAncestor(p1, p2); | ||
36 | //} | ||
37 | @Constraint(message="selfFriend", severity="error", key={p}) | ||
38 | pattern selfFriend(p: Person){ | ||
39 | Person.friends(p,p); | ||
40 | } | ||
41 | |||
42 | pattern friendship(p1: Person, p2: Person){ | ||
43 | Person.friends(p1,p2); | ||
44 | } | ||
45 | |||
46 | //pattern isAncestor(person : Person, ancestor : Person){ | ||
47 | // Person.parents(person, ancestor); | ||
48 | //} or { | ||
49 | // Person.parents(person, parent); | ||
50 | // find isAncestor(parent, ancestor); | ||
51 | //} | ||
52 | |||
53 | |||
54 | |||