diff options
author | Ed Willink | 2016-10-15 10:19:32 +0000 |
---|---|---|
committer | Ed Willink | 2016-10-30 11:37:38 +0000 |
commit | 53f7e8b965fb7b20f6e35ebc52220276ce3b43b8 (patch) | |
tree | d88c9a0f31ae4c7ed0cbe6dda67aa8d65c7dd2ec | |
parent | edbe6374157f9eaca26c8dfa156cf0231a219e8e (diff) | |
download | org.eclipse.qvtd-53f7e8b965fb7b20f6e35ebc52220276ce3b43b8.tar.gz org.eclipse.qvtd-53f7e8b965fb7b20f6e35ebc52220276ce3b43b8.tar.xz org.eclipse.qvtd-53f7e8b965fb7b20f6e35ebc52220276ce3b43b8.zip |
[500962] Use strict Mapping/Connection rather than infinite MappingCall
3 files changed, 20 insertions, 11 deletions
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore index e4b89a862..8583f0b80 100644 --- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore +++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore @@ -70,6 +70,12 @@ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A ConnectionVariable identifes a variable used as a connection buffer."/>
</eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="isStrict" 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="Duplicate elements in a strict ConnectionVariable are suppressed at run-time.

Duplicate elements in a not-strict ConnectionVariable are guaranteed not to occur."/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DeclareStatement" eSuperTypes="#//VariableStatement #//ObservableStatement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
@@ -170,6 +176,12 @@ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An Imperative Mapping extends the abstract declarative mapping to support
explicit nested invocation of mappings with bindings for the invoked mapping's
bound variables."/>
</eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="isStrict" 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="Repeated invocations of a strict Mapping are suppressed at run-time.

Repeated invocations of a not-strict Mapping are guaranteed not to occur."/>
+ </eAnnotations>
+ </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedParameters" ordered="false"
upperBound="-1" eType="#//MappingParameter" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedStatements" upperBound="-1"
@@ -185,12 +197,6 @@ <details key="documentation" value="The Set of bindings of variables or expressions to forma parameters."/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="isInfinite" 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="An infinite MappingCall requires re-invocation of the called mapping to be suppressed to avoid an infinite loop.

Deprecated ?? not needed once install works."/>
- </eAnnotations>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isInstall" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
diff --git a/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore b/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore index 78d7e5594..f0bb3da1a 100644 --- a/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore +++ b/plugins/org.eclipse.qvtd.xtext.qvtimperative/model/QVTimperativeCS.ecore @@ -15,6 +15,8 @@ </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="AppendParameterCS" eSuperTypes="#//MappingParameterCS"/> <eClassifiers xsi:type="ecore:EClass" name="BufferStatementCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//TypedElementCS #//StatementCS"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isStrict" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" + defaultValueLiteral="false"/> <eStructuralFeatures xsi:type="ecore:EReference" name="ownedExpression" eType="ecore:EClass ../../org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.ecore#//ExpCS" containment="true"/> </eClassifiers> @@ -55,6 +57,8 @@ defaultValueLiteral="false"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="MappingCS" eSuperTypes="../../org.eclipse.ocl.xtext.base/model/BaseCS.ecore#//NamedElementCS"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="isStrict" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" + defaultValueLiteral="false"/> <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="ownedParameters" upperBound="-1" @@ -63,8 +67,6 @@ eType="#//StatementCS" containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="MappingCallCS" eSuperTypes="#//MappingStatementCS"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="isInfinite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="false"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="isInstall" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="isInvoke" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" 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 63de34ccc..2058791a5 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 @@ -31,7 +31,7 @@ AppendParameterBindingCS: referredVariable=[qvtimperative::AppendParameter|Unres AppendParameterCS: 'append' name=UnrestrictedName ':' ownedType=TypeExpCS ';'; -BufferStatementCS: 'buffer' name=UnrestrictedName (':' ownedType=TypeExpCS)? (':=' ownedExpression=ExpCS)? ';'; +BufferStatementCS: isStrict?='strict'? 'buffer' name=UnrestrictedName (':' ownedType=TypeExpCS)? (':=' ownedExpression=ExpCS)? ';'; CommitStatementCS returns StatementCS: NewStatementCS | SetStatementCS; @@ -57,7 +57,7 @@ ImportCS returns base::ImportCS: LoopParameterBindingCS: isCheck?='check'? referredVariable=[qvtimperative::GuardParameter|UnrestrictedName] 'iterates' value=[qvtimperative::LoopVariable|UnrestrictedName] ';'; -MappingCS: {MappingCS} 'map' name=UnrestrictedName ('in' ownedInPathName=PathNameCS)? +MappingCS: {MappingCS} isStrict?='strict'? 'map' name=UnrestrictedName ('in' ownedInPathName=PathNameCS)? '{' ownedParameters+=MappingParameterCS* ownedStatements+=GuardStatementCS* @@ -65,7 +65,7 @@ MappingCS: {MappingCS} 'map' name=UnrestrictedName ('in' ownedInPathName=PathNam ownedStatements+=ControlStatementCS* '}'; -MappingCallCS: {MappingCallCS} isInfinite?='infinite'? ('call'|isInstall?='install'|isInvoke?='invoke') ownedPathName=PathNameCS +MappingCallCS: {MappingCallCS} ('call'|isInstall?='install'|isInvoke?='invoke') ownedPathName=PathNameCS '{' ownedBindings+=MappingParameterBindingCS* '}'; MappingLoopCS: ('observe' observedProperties+=PathNameCS (',' observedProperties+=PathNameCS)*)? @@ -120,6 +120,7 @@ UnrestrictedName returns ecore::EString: | 'query' | 'realize' | 'refines' +| 'strict' | 'transformation' | 'uses' ; |