diff options
author | 2024-02-29 02:24:06 +0100 | |
---|---|---|
committer | 2024-04-07 14:55:46 +0200 | |
commit | 71fc54a96bf33dde7895ade0bd280887553125b0 (patch) | |
tree | 5b475f117ba9e999d9df8699d0bea77555e45bb5 /subprojects/language-model/src | |
parent | feat(query): left join for data variables (diff) | |
download | refinery-71fc54a96bf33dde7895ade0bd280887553125b0.tar.gz refinery-71fc54a96bf33dde7895ade0bd280887553125b0.tar.zst refinery-71fc54a96bf33dde7895ade0bd280887553125b0.zip |
refactor(language): assignment and cast expression
Also reorganizes operator names for easier future extension.
Diffstat (limited to 'subprojects/language-model/src')
-rw-r--r-- | subprojects/language-model/src/main/resources/model/problem.ecore | 15 | ||||
-rw-r--r-- | subprojects/language-model/src/main/resources/model/problem.genmodel | 15 |
2 files changed, 24 insertions, 6 deletions
diff --git a/subprojects/language-model/src/main/resources/model/problem.ecore b/subprojects/language-model/src/main/resources/model/problem.ecore index bac409f9..eed134fd 100644 --- a/subprojects/language-model/src/main/resources/model/problem.ecore +++ b/subprojects/language-model/src/main/resources/model/problem.ecore | |||
@@ -199,8 +199,6 @@ | |||
199 | <eLiterals name="MUL" value="2"/> | 199 | <eLiterals name="MUL" value="2"/> |
200 | <eLiterals name="DIV" value="3"/> | 200 | <eLiterals name="DIV" value="3"/> |
201 | <eLiterals name="POW" value="4"/> | 201 | <eLiterals name="POW" value="4"/> |
202 | <eLiterals name="MEET" value="5"/> | ||
203 | <eLiterals name="JOIN" value="6"/> | ||
204 | </eClassifiers> | 202 | </eClassifiers> |
205 | <eClassifiers xsi:type="ecore:EClass" name="ArithmeticUnaryExpr" eSuperTypes="#//UnaryExpr"> | 203 | <eClassifiers xsi:type="ecore:EClass" name="ArithmeticUnaryExpr" eSuperTypes="#//UnaryExpr"> |
206 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//UnaryOp"/> | 204 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//UnaryOp"/> |
@@ -249,7 +247,6 @@ | |||
249 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="modality" eType="#//Modality"/> | 247 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="modality" eType="#//Modality"/> |
250 | </eClassifiers> | 248 | </eClassifiers> |
251 | <eClassifiers xsi:type="ecore:EClass" name="RangeExpr" eSuperTypes="#//BinaryExpr"/> | 249 | <eClassifiers xsi:type="ecore:EClass" name="RangeExpr" eSuperTypes="#//BinaryExpr"/> |
252 | <eClassifiers xsi:type="ecore:EClass" name="InfConstant" eSuperTypes="#//Constant"/> | ||
253 | <eClassifiers xsi:type="ecore:EClass" name="LogicConstant" eSuperTypes="#//Constant"> | 250 | <eClassifiers xsi:type="ecore:EClass" name="LogicConstant" eSuperTypes="#//Constant"> |
254 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="logicValue" eType="#//LogicValue"/> | 251 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="logicValue" eType="#//LogicValue"/> |
255 | </eClassifiers> | 252 | </eClassifiers> |
@@ -267,4 +264,16 @@ | |||
267 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="alias" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | 264 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="alias" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
268 | </eClassifiers> | 265 | </eClassifiers> |
269 | <eClassifiers xsi:type="ecore:EClass" name="DatatypeDeclaration" eSuperTypes="#//Relation #//Statement"/> | 266 | <eClassifiers xsi:type="ecore:EClass" name="DatatypeDeclaration" eSuperTypes="#//Relation #//Statement"/> |
267 | <eClassifiers xsi:type="ecore:EClass" name="LatticeBinaryExpr" eSuperTypes="#//BinaryExpr"> | ||
268 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="op" eType="#//LatticeBinaryOp"/> | ||
269 | </eClassifiers> | ||
270 | <eClassifiers xsi:type="ecore:EEnum" name="LatticeBinaryOp"> | ||
271 | <eLiterals name="MEET"/> | ||
272 | <eLiterals name="JOIN" value="1"/> | ||
273 | </eClassifiers> | ||
274 | <eClassifiers xsi:type="ecore:EClass" name="CastExpr" eSuperTypes="#//Expr"> | ||
275 | <eStructuralFeatures xsi:type="ecore:EReference" name="body" eType="#//Expr" containment="true"/> | ||
276 | <eStructuralFeatures xsi:type="ecore:EReference" name="targetType" eType="#//Relation"/> | ||
277 | </eClassifiers> | ||
278 | <eClassifiers xsi:type="ecore:EClass" name="AssignmentExpr" eSuperTypes="#//BinaryExpr"/> | ||
270 | </ecore:EPackage> | 279 | </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 29df79cf..927ec609 100644 --- a/subprojects/language-model/src/main/resources/model/problem.genmodel +++ b/subprojects/language-model/src/main/resources/model/problem.genmodel | |||
@@ -51,8 +51,6 @@ | |||
51 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/MUL"/> | 51 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/MUL"/> |
52 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/DIV"/> | 52 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/DIV"/> |
53 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/POW"/> | 53 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/POW"/> |
54 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/MEET"/> | ||
55 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//BinaryOp/JOIN"/> | ||
56 | </genEnums> | 54 | </genEnums> |
57 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//AggregationOp"> | 55 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//AggregationOp"> |
58 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//AggregationOp/SUM"/> | 56 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//AggregationOp/SUM"/> |
@@ -69,6 +67,10 @@ | |||
69 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//NodeKind/ATOM"/> | 67 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//NodeKind/ATOM"/> |
70 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//NodeKind/MULTI"/> | 68 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//NodeKind/MULTI"/> |
71 | </genEnums> | 69 | </genEnums> |
70 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//LatticeBinaryOp"> | ||
71 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LatticeBinaryOp/MEET"/> | ||
72 | <genEnumLiterals ecoreEnumLiteral="problem.ecore#//LatticeBinaryOp/JOIN"/> | ||
73 | </genEnums> | ||
72 | <genClasses ecoreClass="problem.ecore#//Problem"> | 74 | <genClasses ecoreClass="problem.ecore#//Problem"> |
73 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/nodes"/> | 75 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/nodes"/> |
74 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/statements"/> | 76 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//Problem/statements"/> |
@@ -226,7 +228,6 @@ | |||
226 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ModalExpr/modality"/> | 228 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ModalExpr/modality"/> |
227 | </genClasses> | 229 | </genClasses> |
228 | <genClasses ecoreClass="problem.ecore#//RangeExpr"/> | 230 | <genClasses ecoreClass="problem.ecore#//RangeExpr"/> |
229 | <genClasses ecoreClass="problem.ecore#//InfConstant"/> | ||
230 | <genClasses ecoreClass="problem.ecore#//LogicConstant"> | 231 | <genClasses ecoreClass="problem.ecore#//LogicConstant"> |
231 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//LogicConstant/logicValue"/> | 232 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//LogicConstant/logicValue"/> |
232 | </genClasses> | 233 | </genClasses> |
@@ -235,5 +236,13 @@ | |||
235 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ImportStatement/alias"/> | 236 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ImportStatement/alias"/> |
236 | </genClasses> | 237 | </genClasses> |
237 | <genClasses ecoreClass="problem.ecore#//DatatypeDeclaration"/> | 238 | <genClasses ecoreClass="problem.ecore#//DatatypeDeclaration"/> |
239 | <genClasses ecoreClass="problem.ecore#//LatticeBinaryExpr"> | ||
240 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//LatticeBinaryExpr/op"/> | ||
241 | </genClasses> | ||
242 | <genClasses ecoreClass="problem.ecore#//CastExpr"> | ||
243 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//CastExpr/body"/> | ||
244 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//CastExpr/targetType"/> | ||
245 | </genClasses> | ||
246 | <genClasses ecoreClass="problem.ecore#//AssignmentExpr"/> | ||
238 | </genPackages> | 247 | </genPackages> |
239 | </genmodel:GenModel> | 248 | </genmodel:GenModel> |