diff options
Diffstat (limited to 'Domains')
3 files changed, 124 insertions, 29 deletions
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore index a8a3bf64..3b138659 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore +++ b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore | |||
@@ -1,4 +1,5 @@ | |||
1 | <<<<<<< HEAD | 1 | <<<<<<< HEAD |
2 | <<<<<<< HEAD | ||
2 | <?xml version="1.0" encoding="UTF-8"?> | 3 | <?xml version="1.0" encoding="UTF-8"?> |
3 | <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 4 | <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
4 | xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="functionalarchitecture" nsURI="http://www.inf.mit.bme.hu/viatrasolver/example/fam" | 5 | xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="functionalarchitecture" nsURI="http://www.inf.mit.bme.hu/viatrasolver/example/fam" |
@@ -131,3 +132,74 @@ | |||
131 | </eClassifiers> | 132 | </eClassifiers> |
132 | </ecore:EPackage> | 133 | </ecore:EPackage> |
133 | >>>>>>> 71108d46... VAMPIRE: Implement wf constraint handling | 134 | >>>>>>> 71108d46... VAMPIRE: Implement wf constraint handling |
135 | ======= | ||
136 | <?xml version="1.0" encoding="UTF-8"?> | ||
137 | <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
138 | xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="functionalarchitecture" nsURI="http://www.inf.mit.bme.hu/viatrasolver/example/fam" | ||
139 | nsPrefix="functionalarchitecture"> | ||
140 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
141 | <details key="settingDelegates" value="org.eclipse.viatra.query.querybasedfeature"/> | ||
142 | </eAnnotations> | ||
143 | <eClassifiers xsi:type="ecore:EClass" name="FunctionalElement" abstract="true"> | ||
144 | <eStructuralFeatures xsi:type="ecore:EReference" name="interface" eType="#//FunctionalInterface" | ||
145 | containment="true" eOpposite="#//FunctionalInterface/element"/> | ||
146 | <eStructuralFeatures xsi:type="ecore:EReference" name="model" lowerBound="1" eType="#//FunctionalArchitectureModel" | ||
147 | volatile="true" transient="true" derived="true"> | ||
148 | <eAnnotations source="org.eclipse.viatra.query.querybasedfeature"> | ||
149 | <details key="patternFQN" value="hu.bme.mit.inf.dslreasoner.domains.transima.fam.model"/> | ||
150 | </eAnnotations> | ||
151 | </eStructuralFeatures> | ||
152 | <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//Function" | ||
153 | eOpposite="#//Function/subElements"/> | ||
154 | </eClassifiers> | ||
155 | <eClassifiers xsi:type="ecore:EClass" name="FunctionalArchitectureModel"> | ||
156 | <eStructuralFeatures xsi:type="ecore:EReference" name="rootElements" upperBound="-1" | ||
157 | eType="#//FunctionalElement" containment="true"/> | ||
158 | </eClassifiers> | ||
159 | <eClassifiers xsi:type="ecore:EClass" name="Function" eSuperTypes="#//FunctionalElement"> | ||
160 | <eStructuralFeatures xsi:type="ecore:EReference" name="subElements" upperBound="-1" | ||
161 | eType="#//FunctionalElement" containment="true" eOpposite="#//FunctionalElement/parent"/> | ||
162 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" lowerBound="1" eType="#//FunctionType" | ||
163 | changeable="false" volatile="true" transient="true" derived="true"> | ||
164 | <eAnnotations source="org.eclipse.viatra.query.querybasedfeature"> | ||
165 | <details key="patternFQN" value="hu.bme.mit.inf.dslreasoner.domains.transima.fam.type"/> | ||
166 | </eAnnotations> | ||
167 | </eStructuralFeatures> | ||
168 | </eClassifiers> | ||
169 | <eClassifiers xsi:type="ecore:EClass" name="FAMTerminator"> | ||
170 | <eStructuralFeatures xsi:type="ecore:EReference" name="data" eType="#//FunctionalData" | ||
171 | eOpposite="#//FunctionalData/terminator"/> | ||
172 | </eClassifiers> | ||
173 | <eClassifiers xsi:type="ecore:EClass" name="InformationLink"> | ||
174 | <eStructuralFeatures xsi:type="ecore:EReference" name="from" eType="#//FunctionalOutput" | ||
175 | eOpposite="#//FunctionalOutput/outgoingLinks"/> | ||
176 | <eStructuralFeatures xsi:type="ecore:EReference" name="to" lowerBound="1" eType="#//FunctionalInput" | ||
177 | eOpposite="#//FunctionalInput/IncomingLinks"/> | ||
178 | </eClassifiers> | ||
179 | <eClassifiers xsi:type="ecore:EClass" name="FunctionalInterface"> | ||
180 | <eStructuralFeatures xsi:type="ecore:EReference" name="data" upperBound="-1" eType="#//FunctionalData" | ||
181 | containment="true" eOpposite="#//FunctionalData/interface"/> | ||
182 | <eStructuralFeatures xsi:type="ecore:EReference" name="element" eType="#//FunctionalElement" | ||
183 | eOpposite="#//FunctionalElement/interface"/> | ||
184 | </eClassifiers> | ||
185 | <eClassifiers xsi:type="ecore:EClass" name="FunctionalInput" eSuperTypes="#//FunctionalData"> | ||
186 | <eStructuralFeatures xsi:type="ecore:EReference" name="IncomingLinks" upperBound="-1" | ||
187 | eType="#//InformationLink" eOpposite="#//InformationLink/to"/> | ||
188 | </eClassifiers> | ||
189 | <eClassifiers xsi:type="ecore:EClass" name="FunctionalOutput" eSuperTypes="#//FunctionalData"> | ||
190 | <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingLinks" upperBound="-1" | ||
191 | eType="#//InformationLink" containment="true" eOpposite="#//InformationLink/from"/> | ||
192 | </eClassifiers> | ||
193 | <eClassifiers xsi:type="ecore:EClass" name="FunctionalData" abstract="true"> | ||
194 | <eStructuralFeatures xsi:type="ecore:EReference" name="terminator" eType="#//FAMTerminator" | ||
195 | containment="true" eOpposite="#//FAMTerminator/data"/> | ||
196 | <eStructuralFeatures xsi:type="ecore:EReference" name="interface" eType="#//FunctionalInterface" | ||
197 | eOpposite="#//FunctionalInterface/data"/> | ||
198 | </eClassifiers> | ||
199 | <eClassifiers xsi:type="ecore:EEnum" name="FunctionType"> | ||
200 | <eLiterals name="Root"/> | ||
201 | <eLiterals name="Intermediate" value="1"/> | ||
202 | <eLiterals name="Leaf" value="2"/> | ||
203 | </eClassifiers> | ||
204 | </ecore:EPackage> | ||
205 | >>>>>>> ce5aafc0... VAMPIRE: fix model generation | ||
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml index c7fcc081..19fa9181 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml +++ b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml | |||
@@ -1,4 +1,5 @@ | |||
1 | <<<<<<< HEAD | 1 | <<<<<<< HEAD |
2 | <<<<<<< HEAD | ||
2 | <?xml version="1.0" encoding="UTF-8"?><plugin> | 3 | <?xml version="1.0" encoding="UTF-8"?><plugin> |
3 | <extension id="extension.derived.hu.bme.mit.inf.dslreasoner.domains.transima.fam.model" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features"> | 4 | <extension id="extension.derived.hu.bme.mit.inf.dslreasoner.domains.transima.fam.model" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features"> |
4 | <wellbehaving-derived-feature classifier-name="FunctionalElement" feature-name="model" package-nsUri="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/> | 5 | <wellbehaving-derived-feature classifier-name="FunctionalElement" feature-name="model" package-nsUri="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/> |
@@ -36,3 +37,26 @@ | |||
36 | </extension> | 37 | </extension> |
37 | </plugin> | 38 | </plugin> |
38 | >>>>>>> 71108d46... VAMPIRE: Implement wf constraint handling | 39 | >>>>>>> 71108d46... VAMPIRE: Implement wf constraint handling |
40 | ======= | ||
41 | <?xml version="1.0" encoding="UTF-8"?><plugin> | ||
42 | <extension point="org.eclipse.emf.ecore.generated_package"> | ||
43 | <!-- @generated FamMetamodel --> | ||
44 | <package class="functionalarchitecture.FunctionalarchitecturePackage" genModel="model/FamMetamodel.genmodel" uri="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/> | ||
45 | </extension> | ||
46 | <extension id="extension.derived.hu.bme.mit.inf.dslreasoner.domains.transima.fam.model" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features"> | ||
47 | <wellbehaving-derived-feature classifier-name="FunctionalElement" feature-name="model" package-nsUri="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/> | ||
48 | </extension> | ||
49 | <extension id="extension.derived.hu.bme.mit.inf.dslreasoner.domains.transima.fam.type" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features"> | ||
50 | <wellbehaving-derived-feature classifier-name="Function" feature-name="type" package-nsUri="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/> | ||
51 | </extension> | ||
52 | <extension id="hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns" point="org.eclipse.viatra.query.runtime.queryspecification"> | ||
53 | <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns" id="hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns"> | ||
54 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.terminatorAndInformation"/> | ||
55 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.type"/> | ||
56 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.rootElements"/> | ||
57 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.parent"/> | ||
58 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.model"/> | ||
59 | </group> | ||
60 | </extension> | ||
61 | </plugin> | ||
62 | >>>>>>> ce5aafc0... VAMPIRE: fix model generation | ||
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql index 15f70963..24348eb0 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql +++ b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql | |||
@@ -11,35 +11,34 @@ pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { | |||
11 | FunctionalInput.terminator(In,T); | 11 | FunctionalInput.terminator(In,T); |
12 | } | 12 | } |
13 | 13 | ||
14 | //@QueryBasedFeature | 14 | @QueryBasedFeature |
15 | //pattern type(This : Function, Target : FunctionType) = { | 15 | pattern type(This : Function, Target : FunctionType) = { |
16 | // find rootElements(_Model, This); | 16 | find rootElements(_Model, This); |
17 | // Target == FunctionType::Root; | 17 | Target == FunctionType::Root; |
18 | //} or { | 18 | } or { |
19 | // neg find parent(_Child, This); | 19 | neg find parent(_Child, This); |
20 | // neg find rootElements(_Model, This); | 20 | neg find rootElements(_Model, This); |
21 | // Target == FunctionType::Leaf; | 21 | Target == FunctionType::Leaf; |
22 | //} or { | 22 | } or { |
23 | // find parent(This, _Par); | 23 | find parent(This, _Par); |
24 | // find parent(_Child, This); | 24 | find parent(_Child, This); |
25 | // Target == FunctionType::Intermediate; | 25 | Target == FunctionType::Intermediate; |
26 | //} | 26 | } |
27 | // | 27 | |
28 | ////@Constraint | 28 | pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { |
29 | //pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { | 29 | FunctionalArchitectureModel.rootElements(Model, Root); |
30 | // FunctionalArchitectureModel.rootElements(Model, Root); | 30 | } |
31 | //} | 31 | |
32 | // | 32 | pattern parent(Func : Function, Par : Function) = { |
33 | //pattern parent(Func : Function, Par : Function) = { | 33 | Function.parent(Func, Par); |
34 | // Function.parent(Func, Par); | 34 | } |
35 | //} | 35 | |
36 | // | 36 | @QueryBasedFeature |
37 | //@QueryBasedFeature | 37 | pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { |
38 | //pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { | 38 | FunctionalElement(This); |
39 | // FunctionalElement(This); | 39 | FunctionalArchitectureModel(Target); |
40 | // FunctionalArchitectureModel(Target); | 40 | } |
41 | //} | 41 | |
42 | // | ||
43 | //pattern hasRoot(F : Function) { | 42 | //pattern hasRoot(F : Function) { |
44 | // find rootElements(_Model, F); | 43 | // find rootElements(_Model, F); |
45 | //} | 44 | //} |