aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/language-model/src/main/resources
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-05-17 17:13:21 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-05-26 17:22:31 +0200
commit378d97f41ab9bf1a3dc2136f340bb57d263ea474 (patch)
tree55e4002d0bfb00392f4ab9538f804ee241c9d84e /subprojects/language-model/src/main/resources
parentchore(deps): bump dependencies (diff)
downloadrefinery-378d97f41ab9bf1a3dc2136f340bb57d263ea474.tar.gz
refinery-378d97f41ab9bf1a3dc2136f340bb57d263ea474.tar.zst
refinery-378d97f41ab9bf1a3dc2136f340bb57d263ea474.zip
feat: rule parsing
Diffstat (limited to 'subprojects/language-model/src/main/resources')
-rw-r--r--subprojects/language-model/src/main/resources/model/problem.ecore46
-rw-r--r--subprojects/language-model/src/main/resources/model/problem.genmodel41
2 files changed, 62 insertions, 25 deletions
diff --git a/subprojects/language-model/src/main/resources/model/problem.ecore b/subprojects/language-model/src/main/resources/model/problem.ecore
index 9a349490..e6af9fab 100644
--- a/subprojects/language-model/src/main/resources/model/problem.ecore
+++ b/subprojects/language-model/src/main/resources/model/problem.ecore
@@ -38,6 +38,9 @@
38 </eClassifiers> 38 </eClassifiers>
39 <eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="#//Variable"> 39 <eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="#//Variable">
40 <eStructuralFeatures xsi:type="ecore:EReference" name="parameterType" eType="#//Relation"/> 40 <eStructuralFeatures xsi:type="ecore:EReference" name="parameterType" eType="#//Relation"/>
41 <eStructuralFeatures xsi:type="ecore:EAttribute" name="concreteness" eType="#//Concreteness"/>
42 <eStructuralFeatures xsi:type="ecore:EAttribute" name="modality" eType="#//Modality"/>
43 <eStructuralFeatures xsi:type="ecore:EAttribute" name="binding" eType="#//ParameterBinding"/>
41 </eClassifiers> 44 </eClassifiers>
42 <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//VariableOrNode"/> 45 <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//VariableOrNode"/>
43 <eClassifiers xsi:type="ecore:EClass" name="Atom" eSuperTypes="#//Expr"> 46 <eClassifiers xsi:type="ecore:EClass" name="Atom" eSuperTypes="#//Expr">
@@ -109,7 +112,7 @@
109 <eStructuralFeatures xsi:type="ecore:EAttribute" name="stringValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> 112 <eStructuralFeatures xsi:type="ecore:EAttribute" name="stringValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
110 </eClassifiers> 113 </eClassifiers>
111 <eClassifiers xsi:type="ecore:EClass" name="NodeAssertionArgument" eSuperTypes="#//AssertionArgument"> 114 <eClassifiers xsi:type="ecore:EClass" name="NodeAssertionArgument" eSuperTypes="#//AssertionArgument">
112 <eStructuralFeatures xsi:type="ecore:EReference" name="node" eType="#//Node"/> 115 <eStructuralFeatures xsi:type="ecore:EReference" name="node" eType="#//VariableOrNode"/>
113 </eClassifiers> 116 </eClassifiers>
114 <eClassifiers xsi:type="ecore:EClass" name="AssertionArgument" abstract="true"/> 117 <eClassifiers xsi:type="ecore:EClass" name="AssertionArgument" abstract="true"/>
115 <eClassifiers xsi:type="ecore:EClass" name="NodeDeclaration" eSuperTypes="#//Statement"> 118 <eClassifiers xsi:type="ecore:EClass" name="NodeDeclaration" eSuperTypes="#//Statement">
@@ -128,6 +131,7 @@
128 eType="#//Consequent" containment="true"/> 131 eType="#//Consequent" containment="true"/>
129 <eStructuralFeatures xsi:type="ecore:EReference" name="preconditions" upperBound="-1" 132 <eStructuralFeatures xsi:type="ecore:EReference" name="preconditions" upperBound="-1"
130 eType="#//Conjunction" containment="true"/> 133 eType="#//Conjunction" containment="true"/>
134 <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//RuleKind"/>
131 </eClassifiers> 135 </eClassifiers>
132 <eClassifiers xsi:type="ecore:EClass" name="Consequent"> 136 <eClassifiers xsi:type="ecore:EClass" name="Consequent">
133 <eStructuralFeatures xsi:type="ecore:EReference" name="actions" upperBound="-1" 137 <eStructuralFeatures xsi:type="ecore:EReference" name="actions" upperBound="-1"
@@ -135,21 +139,12 @@
135 </eClassifiers> 139 </eClassifiers>
136 <eClassifiers xsi:type="ecore:EClass" name="Action" abstract="true"/> 140 <eClassifiers xsi:type="ecore:EClass" name="Action" abstract="true"/>
137 <eClassifiers xsi:type="ecore:EClass" name="AssertionAction" eSuperTypes="#//Action"> 141 <eClassifiers xsi:type="ecore:EClass" name="AssertionAction" eSuperTypes="#//Action">
138 <eStructuralFeatures xsi:type="ecore:EReference" name="atom" eType="#//Atom" containment="true"/> 142 <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//Expr"
139 <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//LogicValue"
140 defaultValueLiteral="TRUE"/>
141 <eStructuralFeatures xsi:type="ecore:EAttribute" name="overwrite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
142 defaultValueLiteral="FALSE"/>
143 </eClassifiers>
144 <eClassifiers xsi:type="ecore:EClass" name="DeleteAction" eSuperTypes="#//Action">
145 <eStructuralFeatures xsi:type="ecore:EReference" name="variableOrNode" eType="#//VariableOrNode"/>
146 </eClassifiers>
147 <eClassifiers xsi:type="ecore:EClass" name="NewAction" eSuperTypes="#//Action">
148 <eStructuralFeatures xsi:type="ecore:EReference" name="variable" eType="#//NewVariable"
149 containment="true"/> 143 containment="true"/>
150 <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//VariableOrNode"/> 144 <eStructuralFeatures xsi:type="ecore:EReference" name="relation" eType="#//Relation"/>
145 <eStructuralFeatures xsi:type="ecore:EReference" name="arguments" upperBound="-1"
146 eType="#//AssertionArgument" containment="true"/>
151 </eClassifiers> 147 </eClassifiers>
152 <eClassifiers xsi:type="ecore:EClass" name="NewVariable" eSuperTypes="#//Variable"/>
153 <eClassifiers xsi:type="ecore:EEnum" name="ComparisonOp"> 148 <eClassifiers xsi:type="ecore:EEnum" name="ComparisonOp">
154 <eLiterals name="LESS"/> 149 <eLiterals name="LESS"/>
155 <eLiterals name="LESS_EQ" value="1"/> 150 <eLiterals name="LESS_EQ" value="1"/>
@@ -264,4 +259,27 @@
264 <eClassifiers xsi:type="ecore:EClass" name="AssignmentExpr" eSuperTypes="#//BinaryExpr"/> 259 <eClassifiers xsi:type="ecore:EClass" name="AssignmentExpr" eSuperTypes="#//BinaryExpr"/>
265 <eClassifiers xsi:type="ecore:EClass" name="InfiniteConstant" eSuperTypes="#//Constant"/> 260 <eClassifiers xsi:type="ecore:EClass" name="InfiniteConstant" eSuperTypes="#//Constant"/>
266 <eClassifiers xsi:type="ecore:EClass" name="AggregatorDeclaration" eSuperTypes="#//Statement #//NamedElement"/> 261 <eClassifiers xsi:type="ecore:EClass" name="AggregatorDeclaration" eSuperTypes="#//Statement #//NamedElement"/>
262 <eClassifiers xsi:type="ecore:EClass" name="ModalExpr" eSuperTypes="#//UnaryExpr">
263 <eStructuralFeatures xsi:type="ecore:EAttribute" name="concreteness" eType="#//Concreteness"/>
264 <eStructuralFeatures xsi:type="ecore:EAttribute" name="modality" eType="#//Modality"/>
265 </eClassifiers>
266 <eClassifiers xsi:type="ecore:EEnum" name="Modality">
267 <eLiterals name="NONE"/>
268 <eLiterals name="MUST" value="1"/>
269 <eLiterals name="MAY" value="2"/>
270 </eClassifiers>
271 <eClassifiers xsi:type="ecore:EEnum" name="Concreteness">
272 <eLiterals name="PARTIAL"/>
273 <eLiterals name="CANDIDATE" value="1"/>
274 </eClassifiers>
275 <eClassifiers xsi:type="ecore:EEnum" name="RuleKind">
276 <eLiterals name="REFINEMENT"/>
277 <eLiterals name="PROPAGATION" value="1"/>
278 <eLiterals name="DECISION" value="2"/>
279 </eClassifiers>
280 <eClassifiers xsi:type="ecore:EEnum" name="ParameterBinding">
281 <eLiterals name="SINGLE"/>
282 <eLiterals name="FOCUS" value="1"/>
283 <eLiterals name="MULTI" value="2"/>
284 </eClassifiers>
267</ecore:EPackage> 285</ecore:EPackage>
diff --git a/subprojects/language-model/src/main/resources/model/problem.genmodel b/subprojects/language-model/src/main/resources/model/problem.genmodel
index 2a1d8522..7fc9f760 100644
--- a/subprojects/language-model/src/main/resources/model/problem.genmodel
+++ b/subprojects/language-model/src/main/resources/model/problem.genmodel
@@ -60,6 +60,25 @@
60 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LatticeBinaryOp/MEET"/> 60 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LatticeBinaryOp/MEET"/>
61 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LatticeBinaryOp/JOIN"/> 61 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LatticeBinaryOp/JOIN"/>
62 </genEnums> 62 </genEnums>
63 <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//Modality">
64 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Modality/NONE"/>
65 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Modality/MUST"/>
66 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Modality/MAY"/>
67 </genEnums>
68 <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//Concreteness">
69 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Concreteness/PARTIAL"/>
70 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//Concreteness/CANDIDATE"/>
71 </genEnums>
72 <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//RuleKind">
73 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//RuleKind/REFINEMENT"/>
74 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//RuleKind/PROPAGATION"/>
75 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//RuleKind/DECISION"/>
76 </genEnums>
77 <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//ParameterBinding">
78 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ParameterBinding/SINGLE"/>
79 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ParameterBinding/FOCUS"/>
80 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ParameterBinding/MULTI"/>
81 </genEnums>
63 <genClasses ecoreClass="problem.ecore#//Problem"> 82 <genClasses ecoreClass="problem.ecore#//Problem">
64 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/nodes"/> 83 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/nodes"/>
65 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/statements"/> 84 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/statements"/>
@@ -88,6 +107,9 @@
88 </genClasses> 107 </genClasses>
89 <genClasses ecoreClass="problem.ecore#//Parameter"> 108 <genClasses ecoreClass="problem.ecore#//Parameter">
90 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Parameter/parameterType"/> 109 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Parameter/parameterType"/>
110 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//Parameter/concreteness"/>
111 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//Parameter/modality"/>
112 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//Parameter/binding"/>
91 </genClasses> 113 </genClasses>
92 <genClasses ecoreClass="problem.ecore#//Variable"/> 114 <genClasses ecoreClass="problem.ecore#//Variable"/>
93 <genClasses ecoreClass="problem.ecore#//Atom"> 115 <genClasses ecoreClass="problem.ecore#//Atom">
@@ -153,24 +175,17 @@
153 <genClasses ecoreClass="problem.ecore#//RuleDefinition"> 175 <genClasses ecoreClass="problem.ecore#//RuleDefinition">
154 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//RuleDefinition/consequents"/> 176 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//RuleDefinition/consequents"/>
155 <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//RuleDefinition/preconditions"/> 177 <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//RuleDefinition/preconditions"/>
178 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//RuleDefinition/kind"/>
156 </genClasses> 179 </genClasses>
157 <genClasses ecoreClass="problem.ecore#//Consequent"> 180 <genClasses ecoreClass="problem.ecore#//Consequent">
158 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Consequent/actions"/> 181 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Consequent/actions"/>
159 </genClasses> 182 </genClasses>
160 <genClasses ecoreClass="problem.ecore#//Action"/> 183 <genClasses ecoreClass="problem.ecore#//Action"/>
161 <genClasses ecoreClass="problem.ecore#//AssertionAction"> 184 <genClasses ecoreClass="problem.ecore#//AssertionAction">
162 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//AssertionAction/atom"/> 185 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//AssertionAction/value"/>
163 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//AssertionAction/value"/> 186 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//AssertionAction/relation"/>
164 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//AssertionAction/overwrite"/> 187 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//AssertionAction/arguments"/>
165 </genClasses> 188 </genClasses>
166 <genClasses ecoreClass="problem.ecore#//DeleteAction">
167 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//DeleteAction/variableOrNode"/>
168 </genClasses>
169 <genClasses ecoreClass="problem.ecore#//NewAction">
170 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//NewAction/variable"/>
171 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//NewAction/parent"/>
172 </genClasses>
173 <genClasses ecoreClass="problem.ecore#//NewVariable"/>
174 <genClasses ecoreClass="problem.ecore#//Expr"/> 189 <genClasses ecoreClass="problem.ecore#//Expr"/>
175 <genClasses ecoreClass="problem.ecore#//VariableOrNodeExpr"> 190 <genClasses ecoreClass="problem.ecore#//VariableOrNodeExpr">
176 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//VariableOrNodeExpr/variableOrNode"/> 191 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//VariableOrNodeExpr/variableOrNode"/>
@@ -232,5 +247,9 @@
232 <genClasses ecoreClass="problem.ecore#//AssignmentExpr"/> 247 <genClasses ecoreClass="problem.ecore#//AssignmentExpr"/>
233 <genClasses ecoreClass="problem.ecore#//InfiniteConstant"/> 248 <genClasses ecoreClass="problem.ecore#//InfiniteConstant"/>
234 <genClasses ecoreClass="problem.ecore#//AggregatorDeclaration"/> 249 <genClasses ecoreClass="problem.ecore#//AggregatorDeclaration"/>
250 <genClasses ecoreClass="problem.ecore#//ModalExpr">
251 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ModalExpr/concreteness"/>
252 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ModalExpr/modality"/>
253 </genClasses>
235 </genPackages> 254 </genPackages>
236</genmodel:GenModel> 255</genmodel:GenModel>