Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-09-17 09:29:00 +0000
committerEd Willink2016-09-19 11:19:51 +0000
commite410c022cdfe999fa6ad2b66a658487123427667 (patch)
tree529ce8513a4e1d6cab5554fa1dc410f5682c9b26
parent211f532bf3f0744ced061b79cf61fcbf9d233e3b (diff)
downloadorg.eclipse.qvtd-e410c022cdfe999fa6ad2b66a658487123427667.tar.gz
org.eclipse.qvtd-e410c022cdfe999fa6ad2b66a658487123427667.tar.xz
org.eclipse.qvtd-e410c022cdfe999fa6ad2b66a658487123427667.zip
[500369] Introduce ObservableStatements to models
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore84
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel22
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl10
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore45
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.genmodel18
-rw-r--r--plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/QVTimperative.xtext32
6 files changed, 80 insertions, 131 deletions
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore
index d15ca9537..d0fd64c3e 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore
@@ -8,7 +8,7 @@
<eAnnotations source="http://www.eclipse.org/OCL/Import">
<details key="qvtb" value="../../org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore#/"/>
</eAnnotations>
- <eClassifiers xsi:type="ecore:EClass" name="AddStatement" eSuperTypes="#//MappingStatement">
+ <eClassifiers xsi:type="ecore:EClass" name="AddStatement" eSuperTypes="#//MappingStatement #//ObservableStatement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A ConnectionStatement assigns results to a ConnectionVariable."/>
</eAnnotations>
@@ -18,23 +18,15 @@
<details key="body" value="assignment"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedInit" lowerBound="1"
- eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
- containment="true">
- <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName">
- <details key="body" value="valueAssignment"/>
- </eAnnotations>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isEnforcedUnique" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
+ containment="true"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="CheckStatement" eSuperTypes="#//Statement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedCondition" lowerBound="1"
+ <eClassifiers xsi:type="ecore:EClass" name="CheckStatement" eSuperTypes="#//ObservableStatement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
- containment="true">
- <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName">
- <details key="body" value="predicate"/>
- </eAnnotations>
- </eStructuralFeatures>
+ containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ConnectionVariable" abstract="true"
eSuperTypes="../../org.eclipse.ocl.pivot/model/Pivot.ecore#//VariableDeclaration">
@@ -42,16 +34,16 @@
<details key="documentation" value="A ConnectionVariable accumulates one or more assignments."/>
</eAnnotations>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="DeclareStatement" eSuperTypes="#//VariableStatement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedInit" lowerBound="1"
- eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
- containment="true"/>
+ <eClassifiers xsi:type="ecore:EClass" name="DeclareStatement" eSuperTypes="#//VariableStatement #//ObservableStatement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isChecked" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Whether the variable initialization needs to be checked as a predicate. This is a derivation of not ownedInit.type.conformsTo(self.type)."/>
</eAnnotations>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
+ containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GuardVariable" eSuperTypes="../../org.eclipse.ocl.pivot/model/Pivot.ecore#//VariableDeclaration">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
@@ -60,14 +52,6 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="referredTypedModel" lowerBound="1"
eType="#//ImperativeTypedModel"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ImperativeDomain" eSuperTypes="../../org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore#//Domain">
- <eStructuralFeatures xsi:type="ecore:EReference" name="checkedProperties" ordered="false"
- upperBound="-1" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//Property">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="The properties whose accesses must be polled for readiness prior to use here."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ImperativeModel" eSuperTypes="../../org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore#//BaseModel">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The Model of an Imperative QVT transformation."/>
@@ -101,12 +85,6 @@
upperBound="-1" eType="#//InConnectionVariable" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedStatements" upperBound="-1"
eType="#//Statement" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="checkedProperties" ordered="false"
- upperBound="-1" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//Property">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="The properties whose accesses must be polled for readiness prior to use here."/>
- </eAnnotations>
- </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MappingCall" eSuperTypes="#//MappingStatement ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//ReferringElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
@@ -141,12 +119,6 @@
<details key="documentation" value="The variable with the mappingCall.referredMapping bound to the/a value"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="isPolled" eType="ecore:EDataType ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//Boolean"
- defaultValueLiteral="false">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="A polled MappingCallBinding requires invocation of the mapping to be deverred until all relevant properties are available."/>
- </eAnnotations>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="mappingCall" eType="#//MappingCall"
eOpposite="#//MappingCall/binding">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
@@ -160,7 +132,7 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="MappingLoop" eSuperTypes="#//MappingStatement">
+ <eClassifiers xsi:type="ecore:EClass" name="MappingLoop" eSuperTypes="#//MappingStatement #//ObservableStatement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An Imperative MappingLoop support an iterated nested mapping call."/>
</eAnnotations>
@@ -168,7 +140,8 @@
eType="#//LoopVariable" containment="true" eOpposite="#//LoopVariable/owningMappingLoop"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedMappingStatements"
upperBound="-1" eType="#//MappingStatement" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedSource" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MappingStatement" abstract="true" eSuperTypes="#//Statement">
@@ -176,20 +149,29 @@
<details key="documentation" value="A MappingCall specifies the invocation of a referredMapping with a set of bindings&#xA;of the bound variables of the referredMapping to values provided in the invocation.&#xA;Where Collections of values are provided for isLoop bindings, a distinct invocation&#xA;is performed for each distinct permutation of Collection elements."/>
</eAnnotations>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="NewStatement" eSuperTypes="#//VariableStatement">
+ <eClassifiers xsi:type="ecore:EClass" name="NewStatement" eSuperTypes="#//VariableStatement #//ObservableStatement">
<eStructuralFeatures xsi:type="ecore:EReference" name="referredTypedModel" lowerBound="1"
eType="#//ImperativeTypedModel"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedInit" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
containment="true"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="OutConnectionVariable" eSuperTypes="#//ConnectionVariable #//VariableStatement">
+ <eClassifiers xsi:type="ecore:EClass" name="ObservableStatement" abstract="true"
+ eSuperTypes="#//Statement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="observedProperties" ordered="false"
+ upperBound="-1" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//Property">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The properties whose accesses must be polled for readiness prior to use here."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OutConnectionVariable" eSuperTypes="#//ConnectionVariable #//VariableStatement #//ObservableStatement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A ConnectionVariable accumulates one or more assignments."/>
</eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedInit" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
containment="true"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="SetStatement" eSuperTypes="#//Statement">
+ <eClassifiers xsi:type="ecore:EClass" name="SetStatement" eSuperTypes="#//ObservableStatement">
<eStructuralFeatures xsi:type="ecore:EReference" name="targetVariable" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//VariableDeclaration">
<eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName">
@@ -202,15 +184,11 @@
<details key="body" value="assignment"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedInit" lowerBound="1"
- eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
- containment="true">
- <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName">
- <details key="body" value="valueAssignment"/>
- </eAnnotations>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isOpposite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isNotify" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//OCLExpression"
+ containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Statement" abstract="true" eSuperTypes="../../org.eclipse.ocl.pivot/model/Pivot.ecore#//NamedElement"/>
<eClassifiers xsi:type="ecore:EClass" name="VariableStatement" abstract="true" eSuperTypes="../../org.eclipse.ocl.pivot/model/Pivot.ecore#//VariableDeclaration #//Statement"/>
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel
index 8ed0fcff2..7497f09fd 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel
@@ -20,23 +20,20 @@
ecorePackage="QVTimperative.ecore#/">
<genClasses ecoreClass="QVTimperative.ecore#//AddStatement">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//AddStatement/targetVariable"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//AddStatement/ownedInit"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperative.ecore#//AddStatement/isEnforcedUnique"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//AddStatement/ownedExpression"/>
</genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//CheckStatement">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//CheckStatement/ownedCondition"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//CheckStatement/ownedExpression"/>
</genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//ConnectionVariable"/>
<genClasses ecoreClass="QVTimperative.ecore#//DeclareStatement">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//DeclareStatement/ownedInit"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperative.ecore#//DeclareStatement/isChecked"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//DeclareStatement/ownedExpression"/>
</genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//GuardVariable">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//GuardVariable/referredTypedModel"/>
</genClasses>
- <genClasses ecoreClass="QVTimperative.ecore#//ImperativeDomain">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//ImperativeDomain/checkedProperties"/>
- </genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//ImperativeModel"/>
<genClasses ecoreClass="QVTimperative.ecore#//ImperativeTypedModel">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperative.ecore#//ImperativeTypedModel/isChecked"/>
@@ -50,7 +47,6 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//Mapping/ownedGuardVariables"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//Mapping/inoutVariables"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//Mapping/ownedStatements"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//Mapping/checkedProperties"/>
</genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//MappingCall">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//MappingCall/binding"/>
@@ -59,29 +55,31 @@
</genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//MappingCallBinding">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//MappingCallBinding/boundVariable"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperative.ecore#//MappingCallBinding/isPolled"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference QVTimperative.ecore#//MappingCallBinding/mappingCall"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//MappingCallBinding/value"/>
</genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//MappingLoop">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//MappingLoop/ownedIterators"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//MappingLoop/ownedMappingStatements"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//MappingLoop/ownedSource"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//MappingLoop/ownedExpression"/>
</genClasses>
<genClasses image="false" ecoreClass="QVTimperative.ecore#//MappingStatement"/>
<genClasses ecoreClass="QVTimperative.ecore#//NewStatement">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//NewStatement/referredTypedModel"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//NewStatement/ownedInit"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//NewStatement/ownedExpression"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="QVTimperative.ecore#//ObservableStatement">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//ObservableStatement/observedProperties"/>
</genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//OutConnectionVariable">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//OutConnectionVariable/ownedInit"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//OutConnectionVariable/ownedExpression"/>
</genClasses>
<genClasses ecoreClass="QVTimperative.ecore#//SetStatement">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//SetStatement/targetVariable"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//SetStatement/targetProperty"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//SetStatement/ownedInit"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperative.ecore#//SetStatement/isOpposite"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperative.ecore#//SetStatement/isNotify"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperative.ecore#//SetStatement/ownedExpression"/>
</genClasses>
<genClasses image="false" ecoreClass="QVTimperative.ecore#//Statement"/>
<genClasses image="false" ecoreClass="QVTimperative.ecore#//VariableStatement"/>
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
index 8c1e128f7..3010a426f 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
@@ -11,7 +11,6 @@ endpackage
package qvtimperative
context Mapping
-def: allAreas : Set(qvtimperative::ImperativeDomain) = self.domain.oclAsType(qvtimperative::ImperativeDomain)->asSet()
def: guardVariables : Set(ocl::Variable) = ownedGuardVariables
def: boundGuardVariables : Set(ocl::Variable) = ownedStatements->selectByKind(DeclareStatement)
/* Mapping guard variables that are assigned */
@@ -48,17 +47,12 @@ package qvtimperative
--context BottomPattern
--inv UniquePropertyAssignments: assignment->select(PropertyAssignment)->isUnique(a : PropertyAssignment | a.targetProperty) -- FIXME redundant "a : PropertyAssignment | a."
-context ImperativeDomain
-def: mapping : qvtimperative::Mapping = rule.oclAsType(qvtimperative::Mapping)
-inv CheckableXorEnforceable: isCheckable xor isEnforceable
---inv NoSideBottomPatternVariables: bottomPattern.variable->isEmpty()
---inv NoSideBottomPatternAssignments: bottomAssignments->isEmpty()
context SetStatement
inv IsNotReadOnly: not targetProperty.isReadOnly
inv PropertyOfSlot(targetVariable.type.name + ' must conform to ' + targetProperty.owningClass.name): targetVariable.type.conformsTo(targetProperty.owningClass)
-inv CompatibleType(ownedInit.type.name + ' must conform to ' + targetProperty.type.name): ownedInit.type.conformsTo(targetProperty.type)
-inv NoRealizedVariableNavigations: ownedInit->closure(oclContents())->selectByKind(ocl::VariableExp)->select(referredVariable.oclIsKindOf(NewStatement))->select(oclContainer().oclIsKindOf(ocl::CallExp))->isEmpty()
+inv CompatibleType(ownedExpression.type.name + ' must conform to ' + targetProperty.type.name): ownedExpression.type.conformsTo(targetProperty.type)
+inv NoRealizedVariableNavigations: ownedExpression->closure(oclContents())->selectByKind(ocl::VariableExp)->select(referredVariable.oclIsKindOf(NewStatement))->select(oclContainer().oclIsKindOf(ocl::CallExp))->isEmpty()
--context NewStatement
--def: isBottom : Boolean = oclContainer().oclIsKindOf(BottomPattern)
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore b/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore
index c41c2a776..06519b942 100644
--- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore
+++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore
@@ -2,19 +2,19 @@
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="qvtimperativecs" nsURI="http://www.eclipse.org/qvt/2015/QVTimperativeCS"
nsPrefix="qvtics">
- <eClassifiers xsi:type="ecore:EClass" name="AddStatementCS" eSuperTypes="#//MappingStatementCS">
+ <eClassifiers xsi:type="ecore:EClass" name="AddStatementCS" eSuperTypes="#//MappingStatementCS #//ObservableStatementCS">
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="targetVariable" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore#//ConnectionVariable"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="CheckStatementCS" eSuperTypes="#//StatementCS">
+ <eClassifiers xsi:type="ecore:EClass" name="CheckStatementCS" eSuperTypes="#//StatementCS #//ObservableStatementCS">
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedCondition" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS"
containment="true"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="DeclareStatementCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS #//StatementCS">
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedInit" lowerBound="1"
+ <eClassifiers xsi:type="ecore:EClass" name="DeclareStatementCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS #//StatementCS #//ObservableStatementCS">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isChecked" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
@@ -23,30 +23,15 @@
<eClassifiers xsi:type="ecore:EClass" name="DirectionCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//NamedElementCS">
<eStructuralFeatures xsi:type="ecore:EReference" name="imports" upperBound="-1"
eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//Package"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="uses" upperBound="-1" eType="ecore:EClass ../../org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore#//ImperativeDomain"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isChecked" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isEnforced" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="DomainCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//NamedElementCS">
- <eStructuralFeatures xsi:type="ecore:EReference" name="direction" eType="ecore:EClass ../../org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore#//ImperativeTypedModel"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="isCheck" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="isEnforce" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="checkedProperties" ordered="false"
- upperBound="-1" eType="ecore:EClass ../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//PathNameCS"
- containment="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="The properties whose accesses must be polled for readiness prior to use here."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GuardVariableCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS">
<eStructuralFeatures xsi:type="ecore:EReference" name="referredTypedModel" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore#//ImperativeTypedModel"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="InoutVariableCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS"/>
<eClassifiers xsi:type="ecore:EClass" name="MappingCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//NamedElementCS">
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedDomains" upperBound="-1"
- eType="#//DomainCS" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedInPathName" eType="ecore:EClass ../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//PathNameCS"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedGuardVariables" upperBound="-1"
@@ -57,8 +42,6 @@
eType="#//StatementCS" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MappingCallBindingCS" eSuperTypes="../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="isPolled" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedValue" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS"
containment="true"/>
@@ -77,7 +60,7 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="referredMapping" eType="ecore:EClass ../../org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore#//Mapping"
derived="true" resolveProxies="false"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="MappingLoopCS" eSuperTypes="#//MappingStatementCS">
+ <eClassifiers xsi:type="ecore:EClass" name="MappingLoopCS" eSuperTypes="#//MappingStatementCS #//ObservableStatementCS">
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedIterator" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//VariableCS"
containment="true"/>
@@ -89,12 +72,22 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MappingStatementCS" abstract="true"
eSuperTypes="#//StatementCS"/>
- <eClassifiers xsi:type="ecore:EClass" name="NewStatementCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS #//StatementCS">
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedInit" eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS"
+ <eClassifiers xsi:type="ecore:EClass" name="NewStatementCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS #//ObservableStatementCS">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referredTypedModel" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore#//ImperativeTypedModel"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ObservableStatementCS" abstract="true"
+ eSuperTypes="#//StatementCS">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="observedProperties" ordered="false"
+ upperBound="-1" eType="ecore:EClass ../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//PathNameCS"
+ containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The properties whose accesses must be polled for readiness prior to use here."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="OutVariableCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS #//StatementCS"/>
<eClassifiers xsi:type="ecore:EClass" name="ParamDeclarationCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS"/>
<eClassifiers xsi:type="ecore:EClass" name="QueryCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS">
@@ -109,12 +102,12 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isTransient" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="SetStatementCS" eSuperTypes="#//StatementCS">
+ <eClassifiers xsi:type="ecore:EClass" name="SetStatementCS" eSuperTypes="#//ObservableStatementCS">
<eStructuralFeatures xsi:type="ecore:EReference" name="referredProperty" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//Property"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referredVariable" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#//VariableDeclaration"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="ownedInit" lowerBound="1"
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" lowerBound="1"
eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isNotify" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.genmodel b/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.genmodel
index ebed618fa..64914244b 100644
--- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.genmodel
+++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.genmodel
@@ -23,34 +23,25 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//CheckStatementCS/ownedCondition"/>
</genClasses>
<genClasses ecoreClass="QVTimperativeCS.ecore#//DeclareStatementCS">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//DeclareStatementCS/ownedInit"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//DeclareStatementCS/ownedExpression"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperativeCS.ecore#//DeclareStatementCS/isChecked"/>
</genClasses>
<genClasses ecoreClass="QVTimperativeCS.ecore#//DirectionCS">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//DirectionCS/imports"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//DirectionCS/uses"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperativeCS.ecore#//DirectionCS/isChecked"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperativeCS.ecore#//DirectionCS/isEnforced"/>
</genClasses>
- <genClasses ecoreClass="QVTimperativeCS.ecore#//DomainCS">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//DomainCS/direction"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperativeCS.ecore#//DomainCS/isCheck"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperativeCS.ecore#//DomainCS/isEnforce"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//DomainCS/checkedProperties"/>
- </genClasses>
<genClasses ecoreClass="QVTimperativeCS.ecore#//GuardVariableCS">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//GuardVariableCS/referredTypedModel"/>
</genClasses>
<genClasses ecoreClass="QVTimperativeCS.ecore#//InoutVariableCS"/>
<genClasses ecoreClass="QVTimperativeCS.ecore#//MappingCS">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//MappingCS/ownedDomains"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//MappingCS/ownedInPathName"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//MappingCS/ownedGuardVariables"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//MappingCS/ownedInoutVariables"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//MappingCS/ownedStatements"/>
</genClasses>
<genClasses ecoreClass="QVTimperativeCS.ecore#//MappingCallBindingCS">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperativeCS.ecore#//MappingCallBindingCS/isPolled"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//MappingCallBindingCS/ownedValue"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//MappingCallBindingCS/owningMappingCall"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//MappingCallBindingCS/referredVariable"/>
@@ -68,9 +59,12 @@
</genClasses>
<genClasses image="false" ecoreClass="QVTimperativeCS.ecore#//MappingStatementCS"/>
<genClasses ecoreClass="QVTimperativeCS.ecore#//NewStatementCS">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//NewStatementCS/ownedInit"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//NewStatementCS/ownedExpression"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//NewStatementCS/referredTypedModel"/>
</genClasses>
+ <genClasses ecoreClass="QVTimperativeCS.ecore#//ObservableStatementCS">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//ObservableStatementCS/observedProperties"/>
+ </genClasses>
<genClasses ecoreClass="QVTimperativeCS.ecore#//OutVariableCS"/>
<genClasses ecoreClass="QVTimperativeCS.ecore#//ParamDeclarationCS"/>
<genClasses ecoreClass="QVTimperativeCS.ecore#//QueryCS">
@@ -83,7 +77,7 @@
<genClasses ecoreClass="QVTimperativeCS.ecore#//SetStatementCS">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//SetStatementCS/referredProperty"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//SetStatementCS/referredVariable"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//SetStatementCS/ownedInit"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference QVTimperativeCS.ecore#//SetStatementCS/ownedExpression"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute QVTimperativeCS.ecore#//SetStatementCS/isNotify"/>
</genClasses>
<genClasses image="false" ecoreClass="QVTimperativeCS.ecore#//StatementCS"/>
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/QVTimperative.xtext b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/QVTimperative.xtext
index f70b97bff..3b521559e 100644
--- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/QVTimperative.xtext
+++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/src/org/eclipse/qvtd/xtext/qvtimperative/QVTimperative.xtext
@@ -24,7 +24,8 @@ TopLevelCS:
(ownedPackages+=QualifiedPackageCS | ownedTransformations+=TransformationCS | ownedMappings+=MappingCS | ownedQueries+=QueryCS)*
;
-AddStatementCS: 'add' targetVariable=[qvtimperative::ConnectionVariable|UnrestrictedName] '+=' ownedExpression=ExpCS ';';
+AddStatementCS: ('observe' observedProperties+=PathNameCS (',' observedProperties+=PathNameCS)*)?
+ 'add' targetVariable=[qvtimperative::ConnectionVariable|UnrestrictedName] '+=' ownedExpression=ExpCS ';';
CommitStatementCS returns StatementCS: NewStatementCS | SetStatementCS;
@@ -32,11 +33,11 @@ CheckStatementCS: 'check' ownedCondition=ExpCS ';';
ControlStatementCS returns MappingStatementCS: AddStatementCS | MappingCallCS | MappingLoopCS;
-DeclareStatementCS: isChecked?='check'? 'var' name=UnrestrictedName (':' ownedType=TypeExpCS)? ':=' ownedInit=ExpCS ';';
+DeclareStatementCS: ('observe' observedProperties+=PathNameCS (',' observedProperties+=PathNameCS)*)?
+ isChecked?='check'? 'var' name=UnrestrictedName (':' ownedType=TypeExpCS)? ':=' ownedExpression=ExpCS ';';
DirectionCS: {DirectionCS} (isChecked?='check'|isEnforced?='enforce')? name=UnrestrictedName?
'imports' imports+=[pivot::Package|UnrestrictedName] (',' imports+=[pivot::Package|UnrestrictedName])*
- ('uses' uses+=[qvtimperative::ImperativeDomain|UnrestrictedName] (',' uses+=[qvtimperative::ImperativeDomain|UnrestrictedName])*)?
;
GuardStatementCS returns StatementCS: OutVariableCS | DeclareStatementCS | DeclareStatementCS | CheckStatementCS;
@@ -50,7 +51,6 @@ InoutVariableCS: 'inout' name=UnrestrictedName ':' ownedType=TypeExpCS ';';
MappingCS: {MappingCS} 'map' name=UnrestrictedName ('in' ownedInPathName=PathNameCS)?
'{'
- ownedDomains+=(SourceDomainCS | TargetDomainCS)*
(ownedGuardVariables+=GuardVariableCS | ownedInoutVariables+=InoutVariableCS)*
ownedStatements+=GuardStatementCS*
ownedStatements+=CommitStatementCS*
@@ -60,14 +60,15 @@ MappingCS: {MappingCS} 'map' name=UnrestrictedName ('in' ownedInPathName=PathNam
MappingCallCS: {MappingCallCS} isInfinite?='infinite'? 'call' ownedPathName=PathNameCS
'{' ownedBindings+=MappingCallBindingCS* '}';
-MappingCallBindingCS: referredVariable=[pivot::VariableDeclaration|UnrestrictedName] (':='|isPolled?='?=') ownedValue=ExpCS ';';
+MappingCallBindingCS: referredVariable=[pivot::VariableDeclaration|UnrestrictedName] ':=' ownedValue=ExpCS ';';
-MappingLoopCS: 'for' ownedIterator=MappingIteratorCS 'in' ownedInExpression=ExpCS '{' ownedMappingStatements+=ControlStatementCS+ '}';
+MappingLoopCS: ('observe' observedProperties+=PathNameCS (',' observedProperties+=PathNameCS)*)?
+ 'for' ownedIterator=MappingIteratorCS 'in' ownedInExpression=ExpCS '{' ownedMappingStatements+=ControlStatementCS+ '}';
MappingIteratorCS returns essentialocl::VariableCS: name=UnrestrictedName (':' ownedType=TypeExpCS)?;
-NewStatementCS:
- 'new' ':' referredTypedModel=[qvtimperative::ImperativeTypedModel|UnrestrictedName] name=UnrestrictedName ':' ownedType=TypeExpCS (':=' ownedInit=ExpCS)?';'
+NewStatementCS: ('observe' observedProperties+=PathNameCS (',' observedProperties+=PathNameCS)*)?
+ 'new' ':' referredTypedModel=[qvtimperative::ImperativeTypedModel|UnrestrictedName] name=UnrestrictedName ':' ownedType=TypeExpCS (':=' ownedExpression=ExpCS)?';'
;
OutVariableCS: 'out' name=UnrestrictedName ':' ownedType=TypeExpCS ';';
@@ -90,21 +91,12 @@ QueryCS: isTransient?='transient'? 'query' ownedPathName=ScopeNameCS name=Unrest
ScopeNameCS returns base::PathNameCS:
ownedPathElements+=FirstPathElementCS '::' (ownedPathElements+=NextPathElementCS '::')*;
-SetStatementCS: (isNotify?='notify')? 'set' referredVariable=[pivot::VariableDeclaration|UnrestrictedName] '.' referredProperty=[pivot::Property|UnrestrictedName] ':=' ownedInit=ExpCS ';';
+SetStatementCS: ('observe' observedProperties+=PathNameCS (',' observedProperties+=PathNameCS)*)?
+ (isNotify?='notify')? 'set' referredVariable=[pivot::VariableDeclaration|UnrestrictedName] '.' referredProperty=[pivot::Property|UnrestrictedName] ':=' ownedExpression=ExpCS ';';
-SourceDomainCS returns DomainCS: isCheck?='check' direction=[qvtimperative::ImperativeTypedModel|UnrestrictedName]
- ('{' ('check' checkedProperties+=PathNameCS (',' checkedProperties+=PathNameCS)*)? '}')?
- '(' ')' '{' '}'
-;
-
TransformationCS:
'transformation' ownedPathName=ScopeNameCS? name=UnreservedName '{' (ownedDirections+=DirectionCS ';')* '}';
-
-TargetDomainCS returns DomainCS: isEnforce?='enforce' direction=[qvtimperative::ImperativeTypedModel|UnrestrictedName]
- ('{' ('check' checkedProperties+=PathNameCS (',' checkedProperties+=PathNameCS)*)? '}')?
- '(' ')' '{' '}'
-;
-
+
UnrestrictedName returns ecore::EString:
EssentialOCLUnrestrictedName
| 'check'

Back to the top