diff options
author | 2021-06-27 14:22:40 +0200 | |
---|---|---|
committer | 2021-06-27 14:22:40 +0200 | |
commit | 07719e927f9d398765e661c84fd8778cefb39083 (patch) | |
tree | 9652080f7e580f09a0763a3e258348dea6e02684 /language-model/src/main/resources/model | |
parent | Add enum support (diff) | |
download | refinery-07719e927f9d398765e661c84fd8778cefb39083.tar.gz refinery-07719e927f9d398765e661c84fd8778cefb39083.tar.zst refinery-07719e927f9d398765e661c84fd8778cefb39083.zip |
Simplify project layout
Diffstat (limited to 'language-model/src/main/resources/model')
-rw-r--r-- | language-model/src/main/resources/model/problem.ecore | 107 | ||||
-rw-r--r-- | language-model/src/main/resources/model/problem.genmodel | 96 |
2 files changed, 203 insertions, 0 deletions
diff --git a/language-model/src/main/resources/model/problem.ecore b/language-model/src/main/resources/model/problem.ecore new file mode 100644 index 00000000..99404f61 --- /dev/null +++ b/language-model/src/main/resources/model/problem.ecore | |||
@@ -0,0 +1,107 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="problem" nsURI="http://www.eclipse.org/viatra/solver/language/model/Problem" | ||
4 | nsPrefix="problem"> | ||
5 | <eClassifiers xsi:type="ecore:EClass" name="Problem" eSuperTypes="#//NamedElement"> | ||
6 | <eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1" | ||
7 | eType="#//Node" containment="true"/> | ||
8 | <eStructuralFeatures xsi:type="ecore:EReference" name="statements" upperBound="-1" | ||
9 | eType="#//Statement" containment="true"/> | ||
10 | </eClassifiers> | ||
11 | <eClassifiers xsi:type="ecore:EClass" name="Relation" abstract="true" eSuperTypes="#//NamedElement"/> | ||
12 | <eClassifiers xsi:type="ecore:EClass" name="ClassDeclaration" eSuperTypes="#//Relation #//Statement"> | ||
13 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="abstract" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
14 | <eStructuralFeatures xsi:type="ecore:EReference" name="superTypes" upperBound="-1" | ||
15 | eType="#//Relation"/> | ||
16 | <eStructuralFeatures xsi:type="ecore:EReference" name="referenceDeclarations" | ||
17 | upperBound="-1" eType="#//ReferenceDeclaration" containment="true"/> | ||
18 | <eStructuralFeatures xsi:type="ecore:EReference" name="newNode" eType="#//Node" | ||
19 | containment="true"/> | ||
20 | </eClassifiers> | ||
21 | <eClassifiers xsi:type="ecore:EClass" name="ReferenceDeclaration" eSuperTypes="#//Relation"> | ||
22 | <eStructuralFeatures xsi:type="ecore:EReference" name="referenceType" eType="#//Relation"/> | ||
23 | <eStructuralFeatures xsi:type="ecore:EReference" name="opposite" eType="#//ReferenceDeclaration"/> | ||
24 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="containment" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
25 | <eStructuralFeatures xsi:type="ecore:EReference" name="multiplicity" eType="#//Multiplicity" | ||
26 | containment="true"/> | ||
27 | </eClassifiers> | ||
28 | <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true"> | ||
29 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
30 | </eClassifiers> | ||
31 | <eClassifiers xsi:type="ecore:EClass" name="PredicateDefinition" eSuperTypes="#//Relation #//Statement"> | ||
32 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="error" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
33 | <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1" | ||
34 | eType="#//Parameter" containment="true"/> | ||
35 | <eStructuralFeatures xsi:type="ecore:EReference" name="bodies" upperBound="-1" | ||
36 | eType="#//Conjunction" containment="true"/> | ||
37 | </eClassifiers> | ||
38 | <eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="#//Variable"> | ||
39 | <eStructuralFeatures xsi:type="ecore:EReference" name="parameterType" eType="#//Relation"/> | ||
40 | </eClassifiers> | ||
41 | <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//VariableOrNode"/> | ||
42 | <eClassifiers xsi:type="ecore:EClass" name="Conjunction" eSuperTypes="#//ExistentialQuantifier"> | ||
43 | <eStructuralFeatures xsi:type="ecore:EReference" name="literals" upperBound="-1" | ||
44 | eType="#//Literal" containment="true"/> | ||
45 | </eClassifiers> | ||
46 | <eClassifiers xsi:type="ecore:EClass" name="Literal" abstract="true"/> | ||
47 | <eClassifiers xsi:type="ecore:EClass" name="Atom" eSuperTypes="#//Literal"> | ||
48 | <eStructuralFeatures xsi:type="ecore:EReference" name="relation" eType="#//Relation"/> | ||
49 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="transitiveClosure" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
50 | <eStructuralFeatures xsi:type="ecore:EReference" name="arguments" upperBound="-1" | ||
51 | eType="#//Argument" containment="true"/> | ||
52 | </eClassifiers> | ||
53 | <eClassifiers xsi:type="ecore:EClass" name="ImplicitVariable" eSuperTypes="#//Variable"/> | ||
54 | <eClassifiers xsi:type="ecore:EClass" name="NegativeLiteral" eSuperTypes="#//ExistentialQuantifier #//Literal"> | ||
55 | <eStructuralFeatures xsi:type="ecore:EReference" name="atom" eType="#//Atom" containment="true"/> | ||
56 | </eClassifiers> | ||
57 | <eClassifiers xsi:type="ecore:EClass" name="ExistentialQuantifier" abstract="true" | ||
58 | interface="true"> | ||
59 | <eStructuralFeatures xsi:type="ecore:EReference" name="implicitVariables" upperBound="-1" | ||
60 | eType="#//ImplicitVariable" containment="true"/> | ||
61 | </eClassifiers> | ||
62 | <eClassifiers xsi:type="ecore:EClass" name="Assertion" eSuperTypes="#//Statement"> | ||
63 | <eStructuralFeatures xsi:type="ecore:EReference" name="relation" eType="#//Relation"/> | ||
64 | <eStructuralFeatures xsi:type="ecore:EReference" name="arguments" upperBound="-1" | ||
65 | eType="#//Node"/> | ||
66 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//LogicValue"/> | ||
67 | </eClassifiers> | ||
68 | <eClassifiers xsi:type="ecore:EClass" name="Node" eSuperTypes="#//VariableOrNode"/> | ||
69 | <eClassifiers xsi:type="ecore:EEnum" name="LogicValue"> | ||
70 | <eLiterals name="TRUE" literal="TRUE"/> | ||
71 | <eLiterals name="FALSE" value="1"/> | ||
72 | <eLiterals name="UNKNOWN" value="2"/> | ||
73 | </eClassifiers> | ||
74 | <eClassifiers xsi:type="ecore:EClass" name="ScopeDeclaration" eSuperTypes="#//Statement"> | ||
75 | <eStructuralFeatures xsi:type="ecore:EReference" name="typeScopes" upperBound="-1" | ||
76 | eType="#//TypeScope" containment="true"/> | ||
77 | </eClassifiers> | ||
78 | <eClassifiers xsi:type="ecore:EClass" name="Statement" abstract="true" interface="true"/> | ||
79 | <eClassifiers xsi:type="ecore:EClass" name="TypeScope"> | ||
80 | <eStructuralFeatures xsi:type="ecore:EReference" name="targetType" eType="#//ClassDeclaration"/> | ||
81 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="increment" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
82 | <eStructuralFeatures xsi:type="ecore:EReference" name="multiplicity" eType="#//Multiplicity" | ||
83 | containment="true"/> | ||
84 | </eClassifiers> | ||
85 | <eClassifiers xsi:type="ecore:EClass" name="Multiplicity" abstract="true"/> | ||
86 | <eClassifiers xsi:type="ecore:EClass" name="RangeMultiplicity" eSuperTypes="#//Multiplicity"> | ||
87 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="lowerBound" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" | ||
88 | defaultValueLiteral="0"/> | ||
89 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="upperBound" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" | ||
90 | defaultValueLiteral="-1"/> | ||
91 | </eClassifiers> | ||
92 | <eClassifiers xsi:type="ecore:EClass" name="ExactMultiplicity" eSuperTypes="#//Multiplicity"> | ||
93 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="exactValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" | ||
94 | defaultValueLiteral="1"/> | ||
95 | </eClassifiers> | ||
96 | <eClassifiers xsi:type="ecore:EClass" name="UnboundedMultiplicity" eSuperTypes="#//Multiplicity"/> | ||
97 | <eClassifiers xsi:type="ecore:EClass" name="Argument"> | ||
98 | <eStructuralFeatures xsi:type="ecore:EReference" name="variableOrNode" eType="#//VariableOrNode"/> | ||
99 | <eStructuralFeatures xsi:type="ecore:EReference" name="singletonVariable" eType="#//ImplicitVariable" | ||
100 | containment="true"/> | ||
101 | </eClassifiers> | ||
102 | <eClassifiers xsi:type="ecore:EClass" name="EnumDeclaration" eSuperTypes="#//Relation #//Statement"> | ||
103 | <eStructuralFeatures xsi:type="ecore:EReference" name="literals" upperBound="-1" | ||
104 | eType="#//Node" containment="true"/> | ||
105 | </eClassifiers> | ||
106 | <eClassifiers xsi:type="ecore:EClass" name="VariableOrNode" abstract="true" eSuperTypes="#//NamedElement"/> | ||
107 | </ecore:EPackage> | ||
diff --git a/language-model/src/main/resources/model/problem.genmodel b/language-model/src/main/resources/model/problem.genmodel new file mode 100644 index 00000000..8a881ff7 --- /dev/null +++ b/language-model/src/main/resources/model/problem.genmodel | |||
@@ -0,0 +1,96 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" | ||
4 | modelDirectory="/language-model/src/main/emf-gen" creationIcons="false" | ||
5 | editDirectory="/language-edit/src/main/emf-gen" editorDirectory="/org.eclipse.viatra.solver.language.model.editor/src-gen" | ||
6 | modelPluginID="language-model" modelName="Problem" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" | ||
7 | codeFormatting="true" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" | ||
8 | copyrightFields="false" operationReflection="true" importOrganizing="true"> | ||
9 | <foreignModel>problem.ecore</foreignModel> | ||
10 | <testsDirectory xsi:nil="true"/> | ||
11 | <genPackages prefix="Problem" basePackage="org.eclipse.viatra.solver.language.model" | ||
12 | disposableProviderFactory="true" ecorePackage="problem.ecore#/"> | ||
13 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//LogicValue"> | ||
14 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LogicValue/TRUE"/> | ||
15 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LogicValue/FALSE"/> | ||
16 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LogicValue/UNKNOWN"/> | ||
17 | </genEnums> | ||
18 | <genClasses ecoreClass="problem.ecore#//Problem"> | ||
19 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/nodes"/> | ||
20 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/statements"/> | ||
21 | </genClasses> | ||
22 | <genClasses ecoreClass="problem.ecore#//Relation"/> | ||
23 | <genClasses ecoreClass="problem.ecore#//ClassDeclaration"> | ||
24 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ClassDeclaration/abstract"/> | ||
25 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//ClassDeclaration/superTypes"/> | ||
26 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//ClassDeclaration/referenceDeclarations"/> | ||
27 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//ClassDeclaration/newNode"/> | ||
28 | </genClasses> | ||
29 | <genClasses ecoreClass="problem.ecore#//ReferenceDeclaration"> | ||
30 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//ReferenceDeclaration/referenceType"/> | ||
31 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//ReferenceDeclaration/opposite"/> | ||
32 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ReferenceDeclaration/containment"/> | ||
33 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//ReferenceDeclaration/multiplicity"/> | ||
34 | </genClasses> | ||
35 | <genClasses ecoreClass="problem.ecore#//NamedElement"> | ||
36 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//NamedElement/name"/> | ||
37 | </genClasses> | ||
38 | <genClasses ecoreClass="problem.ecore#//PredicateDefinition"> | ||
39 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//PredicateDefinition/error"/> | ||
40 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//PredicateDefinition/parameters"/> | ||
41 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//PredicateDefinition/bodies"/> | ||
42 | </genClasses> | ||
43 | <genClasses ecoreClass="problem.ecore#//Parameter"> | ||
44 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Parameter/parameterType"/> | ||
45 | </genClasses> | ||
46 | <genClasses ecoreClass="problem.ecore#//Variable"/> | ||
47 | <genClasses ecoreClass="problem.ecore#//Conjunction"> | ||
48 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Conjunction/literals"/> | ||
49 | </genClasses> | ||
50 | <genClasses ecoreClass="problem.ecore#//Literal"/> | ||
51 | <genClasses ecoreClass="problem.ecore#//Atom"> | ||
52 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Atom/relation"/> | ||
53 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//Atom/transitiveClosure"/> | ||
54 | <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Atom/arguments"/> | ||
55 | </genClasses> | ||
56 | <genClasses ecoreClass="problem.ecore#//ImplicitVariable"/> | ||
57 | <genClasses ecoreClass="problem.ecore#//NegativeLiteral"> | ||
58 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//NegativeLiteral/atom"/> | ||
59 | </genClasses> | ||
60 | <genClasses ecoreClass="problem.ecore#//ExistentialQuantifier"> | ||
61 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//ExistentialQuantifier/implicitVariables"/> | ||
62 | </genClasses> | ||
63 | <genClasses ecoreClass="problem.ecore#//Assertion"> | ||
64 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Assertion/relation"/> | ||
65 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Assertion/arguments"/> | ||
66 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//Assertion/value"/> | ||
67 | </genClasses> | ||
68 | <genClasses ecoreClass="problem.ecore#//Node"/> | ||
69 | <genClasses ecoreClass="problem.ecore#//ScopeDeclaration"> | ||
70 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//ScopeDeclaration/typeScopes"/> | ||
71 | </genClasses> | ||
72 | <genClasses ecoreClass="problem.ecore#//Statement"/> | ||
73 | <genClasses ecoreClass="problem.ecore#//TypeScope"> | ||
74 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//TypeScope/targetType"/> | ||
75 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//TypeScope/increment"/> | ||
76 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//TypeScope/multiplicity"/> | ||
77 | </genClasses> | ||
78 | <genClasses ecoreClass="problem.ecore#//Multiplicity"/> | ||
79 | <genClasses ecoreClass="problem.ecore#//RangeMultiplicity"> | ||
80 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//RangeMultiplicity/lowerBound"/> | ||
81 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//RangeMultiplicity/upperBound"/> | ||
82 | </genClasses> | ||
83 | <genClasses ecoreClass="problem.ecore#//ExactMultiplicity"> | ||
84 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ExactMultiplicity/exactValue"/> | ||
85 | </genClasses> | ||
86 | <genClasses ecoreClass="problem.ecore#//UnboundedMultiplicity"/> | ||
87 | <genClasses ecoreClass="problem.ecore#//Argument"> | ||
88 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Argument/variableOrNode"/> | ||
89 | <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Argument/singletonVariable"/> | ||
90 | </genClasses> | ||
91 | <genClasses ecoreClass="problem.ecore#//EnumDeclaration"> | ||
92 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//EnumDeclaration/literals"/> | ||
93 | </genClasses> | ||
94 | <genClasses ecoreClass="problem.ecore#//VariableOrNode"/> | ||
95 | </genPackages> | ||
96 | </genmodel:GenModel> | ||