diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam')
4 files changed, 4 insertions, 107 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/Function.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/Function.java index 1fed3a2d..b2e5af29 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/Function.java +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/Function.java | |||
@@ -53,7 +53,7 @@ public interface Function extends FunctionalElement { | |||
53 | * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType | 53 | * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType |
54 | * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunction_Type() | 54 | * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunction_Type() |
55 | * @model required="true" transient="true" changeable="false" volatile="true" derived="true" | 55 | * @model required="true" transient="true" changeable="false" volatile="true" derived="true" |
56 | * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='ca.mcgill.ecse.dslreasoner.standalone.test.xyz.type'" | 56 | * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type'" |
57 | * @generated | 57 | * @generated |
58 | */ | 58 | */ |
59 | FunctionType getType(); | 59 | FunctionType getType(); |
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalElement.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalElement.java index c3ed76d6..acfffbc0 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalElement.java +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalElement.java | |||
@@ -63,7 +63,7 @@ public interface FunctionalElement extends EObject { | |||
63 | * @see #setModel(FunctionalArchitectureModel) | 63 | * @see #setModel(FunctionalArchitectureModel) |
64 | * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalElement_Model() | 64 | * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalElement_Model() |
65 | * @model required="true" transient="true" volatile="true" derived="true" | 65 | * @model required="true" transient="true" volatile="true" derived="true" |
66 | * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='ca.mcgill.ecse.dslreasoner.standalone.test.xyz.model'" | 66 | * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model'" |
67 | * @generated | 67 | * @generated |
68 | */ | 68 | */ |
69 | FunctionalArchitectureModel getModel(); | 69 | FunctionalArchitectureModel getModel(); |
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famPackageImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famPackageImpl.java index 74efeeeb..e928e04e 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famPackageImpl.java +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famPackageImpl.java | |||
@@ -561,13 +561,13 @@ public class famPackageImpl extends EPackageImpl implements famPackage { | |||
561 | (getFunctionalElement_Model(), | 561 | (getFunctionalElement_Model(), |
562 | source, | 562 | source, |
563 | new String[] { | 563 | new String[] { |
564 | "patternFQN", "ca.mcgill.ecse.dslreasoner.standalone.test.xyz.model" | 564 | "patternFQN", "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model" |
565 | }); | 565 | }); |
566 | addAnnotation | 566 | addAnnotation |
567 | (getFunction_Type(), | 567 | (getFunction_Type(), |
568 | source, | 568 | source, |
569 | new String[] { | 569 | new String[] { |
570 | "patternFQN", "ca.mcgill.ecse.dslreasoner.standalone.test.xyz.type" | 570 | "patternFQN", "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type" |
571 | }); | 571 | }); |
572 | } | 572 | } |
573 | 573 | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql deleted file mode 100644 index 02d34dcd..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries | ||
2 | |||
3 | import "FamMetamodel" | ||
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 | @QueryBasedFeature | ||
15 | pattern type(This : Function, Target : FunctionType) = { | ||
16 | find rootElements(_Model, This); | ||
17 | Target == FunctionType::Root; | ||
18 | } or { | ||
19 | neg find parent(_Child, This); | ||
20 | neg find rootElements(_Model, This); | ||
21 | Target == FunctionType::Leaf; | ||
22 | } or { | ||
23 | find parent(This, _Par); | ||
24 | find parent(_Child, This); | ||
25 | Target == FunctionType::Intermediate; | ||
26 | } | ||
27 | |||
28 | pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { | ||
29 | FunctionalArchitectureModel.rootElements(Model, Root); | ||
30 | } | ||
31 | |||
32 | pattern parent(Func : Function, Par : Function) = { | ||
33 | Function.parent(Func, Par); | ||
34 | } | ||
35 | |||
36 | @QueryBasedFeature | ||
37 | pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { | ||
38 | FunctionalElement(This); | ||
39 | FunctionalArchitectureModel(Target); | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | @Constraint(message="noRoot", severity="error", key={fam}) | ||
44 | pattern noRoot(fam: FunctionalArchitectureModel) { | ||
45 | FunctionalArchitectureModel(fam); | ||
46 | neg find hasRoot(_); | ||
47 | } | ||
48 | @Constraint(message="noIntermediate", severity="error", key={fam}) | ||
49 | pattern noInt(fam: FunctionalArchitectureModel) { | ||
50 | FunctionalArchitectureModel(fam); | ||
51 | neg find hasInt(_); | ||
52 | } | ||
53 | @Constraint(message="noLeaf", severity="error", key={fam}) | ||
54 | pattern noLeaf(fam: FunctionalArchitectureModel) { | ||
55 | FunctionalArchitectureModel(fam); | ||
56 | neg find hasLeaf(_); | ||
57 | } | ||
58 | */ | ||
59 | |||
60 | /* | ||
61 | @QueryBasedFeature | ||
62 | pattern model(This : FunctionalElement, Target : FunctionalArchitectureModel) = { | ||
63 | find parent+(This, Parent); | ||
64 | find rootElements(Target, Parent); | ||
65 | } or { | ||
66 | find rootElements(Target, This); | ||
67 | } | ||
68 | |||
69 | pattern interfaceData(FI : FunctionalInterface, FD : FunctionalData) = { | ||
70 | FunctionalInterface.data(FI, FD); | ||
71 | } | ||
72 | |||
73 | @QueryBasedFeature | ||
74 | pattern inputs(This : FunctionalInterface, Target : FunctionalInput) = { | ||
75 | find interfaceData(This, Target); | ||
76 | } | ||
77 | |||
78 | @QueryBasedFeature | ||
79 | pattern outputs(This : FunctionalInterface, Target : FunctionalOutput) = { | ||
80 | find interfaceData(This, Target); | ||
81 | } | ||
82 | |||
83 | @QueryBasedFeature | ||
84 | pattern outgoingLinks(This : FunctionalElement, Target : InformationLink) = { | ||
85 | FunctionalElement.interface.outputs(This, Output); | ||
86 | InformationLink.from(Target, Output); | ||
87 | } | ||
88 | |||
89 | @QueryBasedFeature | ||
90 | pattern incomingLinks(This : FunctionalElement, Target : InformationLink) = { | ||
91 | FunctionalElement.interface.inputs(This, Input); | ||
92 | InformationLink.to(Target, Input); | ||
93 | } | ||
94 | |||
95 | @QueryBasedFeature | ||
96 | pattern connects(This : FunctionalElement, Target : FunctionalElement) = { | ||
97 | FunctionalElement.outgoingLinks(This,Link); | ||
98 | FunctionalElement.incomingLinks(Target,Link); | ||
99 | }*/ | ||
100 | |||
101 | /*pattern frequency(a: Function, b : EInt) { | ||
102 | Function.minimumFrequency(a,b); | ||
103 | }*/ | ||