diff options
author | Kristóf Marussy <kris7topher@gmail.com> | 2019-04-08 00:58:00 +0200 |
---|---|---|
committer | Kristóf Marussy <kris7topher@gmail.com> | 2019-04-08 00:58:00 +0200 |
commit | c1f185fd8fc2c3dfc123d9271726c588963c7c01 (patch) | |
tree | 88a5bb94017e7d3f0fbce0a51a78c2549b0977bd /Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs | |
parent | Infrastructure for objective functions (diff) | |
download | VIATRA-Generator-c1f185fd8fc2c3dfc123d9271726c588963c7c01.tar.gz VIATRA-Generator-c1f185fd8fc2c3dfc123d9271726c588963c7c01.tar.zst VIATRA-Generator-c1f185fd8fc2c3dfc123d9271726c588963c7c01.zip |
Objective POC implementation
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamMetamodel.genmodel | 48 | ||||
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql | 8 |
2 files changed, 54 insertions, 2 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamMetamodel.genmodel b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamMetamodel.genmodel new file mode 100644 index 00000000..b325a20c --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamMetamodel.genmodel | |||
@@ -0,0 +1,48 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" | ||
3 | xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/hu.bme.mit.inf.dslreasoner.application.FAMTest/src" | ||
4 | modelPluginID="hu.bme.mit.inf.dslreasoner.application.FAMTest" modelName="FamMetamodel" | ||
5 | rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore" | ||
6 | complianceLevel="8.0" copyrightFields="false" operationReflection="true" importOrganizing="true"> | ||
7 | <foreignModel>FamMetamodel.ecore</foreignModel> | ||
8 | <genPackages prefix="Functionalarchitecture" disposableProviderFactory="true" ecorePackage="FamMetamodel.ecore#/"> | ||
9 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="FamMetamodel.ecore#//FunctionType"> | ||
10 | <genEnumLiterals ecoreEnumLiteral="FamMetamodel.ecore#//FunctionType/Root"/> | ||
11 | <genEnumLiterals ecoreEnumLiteral="FamMetamodel.ecore#//FunctionType/Intermediate"/> | ||
12 | <genEnumLiterals ecoreEnumLiteral="FamMetamodel.ecore#//FunctionType/Leaf"/> | ||
13 | </genEnums> | ||
14 | <genClasses image="false" ecoreClass="FamMetamodel.ecore#//FunctionalElement"> | ||
15 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalElement/interface"/> | ||
16 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalElement/model"/> | ||
17 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalElement/parent"/> | ||
18 | </genClasses> | ||
19 | <genClasses ecoreClass="FamMetamodel.ecore#//FunctionalArchitectureModel"> | ||
20 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalArchitectureModel/rootElements"/> | ||
21 | </genClasses> | ||
22 | <genClasses ecoreClass="FamMetamodel.ecore#//Function"> | ||
23 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//Function/subElements"/> | ||
24 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute FamMetamodel.ecore#//Function/type"/> | ||
25 | </genClasses> | ||
26 | <genClasses ecoreClass="FamMetamodel.ecore#//FAMTerminator"> | ||
27 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FAMTerminator/data"/> | ||
28 | </genClasses> | ||
29 | <genClasses ecoreClass="FamMetamodel.ecore#//InformationLink"> | ||
30 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference FamMetamodel.ecore#//InformationLink/from"/> | ||
31 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//InformationLink/to"/> | ||
32 | </genClasses> | ||
33 | <genClasses ecoreClass="FamMetamodel.ecore#//FunctionalInterface"> | ||
34 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalInterface/data"/> | ||
35 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalInterface/element"/> | ||
36 | </genClasses> | ||
37 | <genClasses ecoreClass="FamMetamodel.ecore#//FunctionalInput"> | ||
38 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalInput/IncomingLinks"/> | ||
39 | </genClasses> | ||
40 | <genClasses ecoreClass="FamMetamodel.ecore#//FunctionalOutput"> | ||
41 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalOutput/outgoingLinks"/> | ||
42 | </genClasses> | ||
43 | <genClasses image="false" ecoreClass="FamMetamodel.ecore#//FunctionalData"> | ||
44 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalData/terminator"/> | ||
45 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference FamMetamodel.ecore#//FunctionalData/interface"/> | ||
46 | </genClasses> | ||
47 | </genPackages> | ||
48 | </genmodel:GenModel> | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql index 013d0419..31b9286e 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql | |||
@@ -5,8 +5,12 @@ import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam" | |||
5 | @Constraint(message="terminatorAndInformation", severity="error", key={T}) | 5 | @Constraint(message="terminatorAndInformation", severity="error", key={T}) |
6 | pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { | 6 | pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { |
7 | FunctionalOutput.outgoingLinks(Out,I); | 7 | FunctionalOutput.outgoingLinks(Out,I); |
8 | FunctionalOutput.terminator(Out,T); | 8 | FunctionalOutput.terminator(Out,T); |
9 | } or { | 9 | } or { |
10 | InformationLink.to(I,In); | 10 | InformationLink.to(I,In); |
11 | FunctionalInput.terminator(In,T); | 11 | FunctionalInput.terminator(In,T); |
12 | } \ No newline at end of file | 12 | } |
13 | |||
14 | pattern informationLink(I : InformationLink) { | ||
15 | InformationLink(I); | ||
16 | } | ||