[509858] Add QVTc/QVTi isPartial WFRs
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore b/plugins/org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore
index 80469a3..0f84294 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore
+++ b/plugins/org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.ecore
@@ -42,10 +42,10 @@
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtbase-Domain-isCheckable"
- name="isCheckable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isCheckable" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
unsettable="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtbase-Domain-isEnforceable"
- name="isEnforceable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isEnforceable" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
unsettable="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" xmi:id="F-qvtbase-Domain-rule"
name="rule" lowerBound="1" eType="#T-qvtbase-Rule" transient="true" eOpposite="#F-qvtbase-Rule-domain"/>
@@ -177,7 +177,7 @@
name="domain" upperBound="-1" eType="#T-qvtbase-Domain" containment="true"
eOpposite="#F-qvtbase-Domain-rule"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtbase-Rule-isDefault"
- name="isDefault" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isDefault" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" xmi:id="F-qvtbase-Rule-overrides"
name="overrides" eType="#T-qvtbase-Rule" eOpposite="#F-qvtbase-Rule-overridden"/>
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ecore b/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ecore
index 582536f..0235c99 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ecore
+++ b/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ecore
@@ -29,10 +29,10 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtcore-Assignment-isDefault"
- name="isDefault" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isDefault" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false" unsettable="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtcore-Assignment-isPartial"
- name="isPartial" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isPartial" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false" unsettable="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" xmi:id="T-qvtcore-BottomPattern" name="BottomPattern"
@@ -185,12 +185,27 @@
<details key="body" value="targetProperty.opposite

"/>
</eAnnotations>
</eOperations>
- <eOperations name="validateCompatibleTypeForValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eOperations name="validateCompatibleTypeForPartialValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML">
- <details key="originalName" value="CompatibleTypeForValue"/>
+ <details key="originalName" value="CompatibleTypeForPartialValue"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="Tuple {
	message : String = 'OppositePropertyAssignment::CompatibleTypeForValue: ' + value.type?.name + ' must conform to ' + getReferredTargetProperty().type?.name + ' or vice-versa',
	status : Boolean = 
	let propertyType = getReferredTargetProperty().type in
	let valueType = value.type in
		valueType.conformsTo(propertyType)
		or propertyType.conformsTo(valueType)


}.status"/>
+ <details key="body" value="
	isPartial implies
		let propertyType = getReferredTargetProperty().type.oclAsType(ocl::CollectionType).elementType in
		let valueType = value.type in
		Tuple{
			status : Boolean = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),
			message : String = 'OppositePropertyAssignment::CompatibleTypeForPartialValue: ' + valueType?.name + ' must conform to ' + propertyType.name + ' or vice-versa'
		}.status

"/>
+ </eAnnotations>
+ <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
+ <eParameters name="context">
+ <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
+ <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ </eGenericType>
+ </eParameters>
+ </eOperations>
+ <eOperations name="validateCompatibleTypeForTotalValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <details key="originalName" value="CompatibleTypeForTotalValue"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details key="body" value="
	not isPartial implies
		let propertyType = getReferredTargetProperty().type in
		let valueType = value.type in
		Tuple{
			status : Boolean = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),
			message : String = 'OppositePropertyAssignment::CompatibleTypeForTotalValue: ' + valueType?.name + ' must conform to ' + propertyType?.name + ' or vice-versa'
		}.status

"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
@@ -244,12 +259,27 @@
<details key="body" value="targetProperty

"/>
</eAnnotations>
</eOperations>
- <eOperations name="validateCompatibleTypeForValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eOperations name="validateCompatibleTypeForPartialValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML">
- <details key="originalName" value="CompatibleTypeForValue"/>
+ <details key="originalName" value="CompatibleTypeForPartialValue"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="Tuple {
	message : String = 'PropertyAssignment::CompatibleTypeForValue: ' + value.type?.name + ' must conform to ' + getReferredTargetProperty().type?.name + ' or vice-versa',
	status : Boolean = 
	let propertyType = getReferredTargetProperty().type in
	let valueType = value.type in
		valueType.conformsTo(propertyType)
		or propertyType.conformsTo(valueType)


}.status"/>
+ <details key="body" value="
	isPartial implies
		let propertyType = getReferredTargetProperty().type.oclAsType(ocl::CollectionType).elementType in
		let valueType = value.type in
		Tuple{
			status : Boolean = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),
			message : String = 'PropertyAssignment::CompatibleTypeForPartialValue: ' + valueType?.name + ' must conform to ' + propertyType.name + ' or vice-versa'
		}.status

"/>
+ </eAnnotations>
+ <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
+ <eParameters name="context">
+ <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
+ <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ </eGenericType>
+ </eParameters>
+ </eOperations>
+ <eOperations name="validateCompatibleTypeForTotalValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <details key="originalName" value="CompatibleTypeForTotalValue"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details key="body" value="
	not isPartial implies
		let propertyType = getReferredTargetProperty().type in
		let valueType = value.type in
		Tuple{
			status : Boolean = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),
			message : String = 'PropertyAssignment::CompatibleTypeForTotalValue: ' + valueType?.name + ' must conform to ' + propertyType?.name + ' or vice-versa'
		}.status

"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.genmodel b/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.genmodel
index b9cdfae..ab46bd3 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.genmodel
+++ b/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.genmodel
@@ -84,9 +84,13 @@
<genClasses ecoreClass="QVTcore.ecore#T-qvtcore-OppositePropertyAssignment">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTcore.ecore#F-qvtcore-OppositePropertyAssignment-targetProperty"/>
<genOperations ecoreOperation="QVTcore.ecore#//OppositePropertyAssignment/getReferredTargetProperty"/>
- <genOperations ecoreOperation="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForValue">
- <genParameters ecoreParameter="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForValue/diagnostics"/>
- <genParameters ecoreParameter="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForValue/context"/>
+ <genOperations ecoreOperation="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForPartialValue">
+ <genParameters ecoreParameter="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForPartialValue/diagnostics"/>
+ <genParameters ecoreParameter="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForPartialValue/context"/>
+ </genOperations>
+ <genOperations ecoreOperation="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForTotalValue">
+ <genParameters ecoreParameter="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForTotalValue/diagnostics"/>
+ <genParameters ecoreParameter="QVTcore.ecore#//OppositePropertyAssignment/validateCompatibleTypeForTotalValue/context"/>
</genOperations>
<genOperations ecoreOperation="QVTcore.ecore#//OppositePropertyAssignment/validateOppositePropertyIsImplicit">
<genParameters ecoreParameter="QVTcore.ecore#//OppositePropertyAssignment/validateOppositePropertyIsImplicit/diagnostics"/>
@@ -100,9 +104,13 @@
<genClasses ecoreClass="QVTcore.ecore#T-qvtcore-PropertyAssignment">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference QVTcore.ecore#F-qvtcore-PropertyAssignment-targetProperty"/>
<genOperations ecoreOperation="QVTcore.ecore#//PropertyAssignment/getReferredTargetProperty"/>
- <genOperations ecoreOperation="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForValue">
- <genParameters ecoreParameter="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForValue/diagnostics"/>
- <genParameters ecoreParameter="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForValue/context"/>
+ <genOperations ecoreOperation="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForPartialValue">
+ <genParameters ecoreParameter="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForPartialValue/diagnostics"/>
+ <genParameters ecoreParameter="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForPartialValue/context"/>
+ </genOperations>
+ <genOperations ecoreOperation="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForTotalValue">
+ <genParameters ecoreParameter="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForTotalValue/diagnostics"/>
+ <genParameters ecoreParameter="QVTcore.ecore#//PropertyAssignment/validateCompatibleTypeForTotalValue/context"/>
</genOperations>
<genOperations ecoreOperation="QVTcore.ecore#//PropertyAssignment/validatePropertyIsNotImplicit">
<genParameters ecoreParameter="QVTcore.ecore#//PropertyAssignment/validatePropertyIsNotImplicit/diagnostics"/>
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ocl b/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ocl
index 82b38d3..cfa45b1 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ocl
+++ b/plugins/org.eclipse.qvtd.pivot.qvtcore/model/QVTcore.ocl
@@ -27,11 +27,23 @@
context OppositePropertyAssignment
def: getReferredTargetProperty() : pivot::Property[1] = targetProperty.opposite
-inv CompatibleTypeForValue('OppositePropertyAssignment::CompatibleTypeForValue: ' + value.type?.name + ' must conform to ' + getReferredTargetProperty().type?.name + ' or vice-versa'):
- let propertyType = getReferredTargetProperty().type in
- let valueType = value.type in
- valueType.conformsTo(propertyType)
- or propertyType.conformsTo(valueType)
+inv CompatibleTypeForPartialValue:
+ isPartial implies
+ let propertyType = getReferredTargetProperty().type.oclAsType(ocl::CollectionType).elementType in
+ let valueType = value.type in
+ Tuple{
+ status : Boolean = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),
+ message : String = 'OppositePropertyAssignment::CompatibleTypeForPartialValue: ' + valueType?.name + ' must conform to ' + propertyType.name + ' or vice-versa'
+ }.status
+
+inv CompatibleTypeForTotalValue:
+ not isPartial implies
+ let propertyType = getReferredTargetProperty().type in
+ let valueType = value.type in
+ Tuple{
+ status : Boolean = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),
+ message : String = 'OppositePropertyAssignment::CompatibleTypeForTotalValue: ' + valueType?.name + ' must conform to ' + propertyType?.name + ' or vice-versa'
+ }.status
inv OppositePropertyIsImplicit:
targetProperty.isImplicit
@@ -42,11 +54,23 @@
context PropertyAssignment
def: getReferredTargetProperty() : pivot::Property[1] = targetProperty
-inv CompatibleTypeForValue('PropertyAssignment::CompatibleTypeForValue: ' + value.type?.name + ' must conform to ' + getReferredTargetProperty().type?.name + ' or vice-versa'):
- let propertyType = getReferredTargetProperty().type in
- let valueType = value.type in
- valueType.conformsTo(propertyType)
- or propertyType.conformsTo(valueType)
+inv CompatibleTypeForPartialValue:
+ isPartial implies
+ let propertyType = getReferredTargetProperty().type.oclAsType(ocl::CollectionType).elementType in
+ let valueType = value.type in
+ Tuple{
+ status : Boolean = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),
+ message : String = 'PropertyAssignment::CompatibleTypeForPartialValue: ' + valueType?.name + ' must conform to ' + propertyType.name + ' or vice-versa'
+ }.status
+
+inv CompatibleTypeForTotalValue:
+ not isPartial implies
+ let propertyType = getReferredTargetProperty().type in
+ let valueType = value.type in
+ Tuple{
+ status : Boolean = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),
+ message : String = 'PropertyAssignment::CompatibleTypeForTotalValue: ' + valueType?.name + ' must conform to ' + propertyType?.name + ' or vice-versa'
+ }.status
inv PropertyIsNotImplicit:
not targetProperty.isImplicit
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore
index 2bc2bd2..6944fc0 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ecore
@@ -40,7 +40,7 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-AddStatement-isEnforcedUnique"
- name="isEnforcedUnique" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ name="isEnforcedUnique" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="True if the append is suppressed after a check for uniqueness of the value."/>
</eAnnotations>
@@ -129,7 +129,7 @@
<details key="documentation" value="A ConnectionVariable identifes a variable used as a connection buffer."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-ConnectionVariable-isStrict"
- name="isStrict" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isStrict" lowerBound="1" 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."/>
@@ -172,7 +172,7 @@
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-DeclareStatement-isCheck"
- name="isCheck" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isCheck" lowerBound="1" 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="True if the initial expression's type must be checked for conformance with the variable's type.
A non-conforming vlaue is a predicate failure causing the mapping to fail without doing anything.
This is a derivation of not ownedInit.type.conformsTo(self.type)."/>
@@ -210,7 +210,7 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-GuardParameterBinding-isCheck"
- name="isCheck" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isCheck" lowerBound="1" 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="True if each consumed value must be checked for conformance with the variable's type.
A non-conforming vlaue is a predicate failure causing the mapping invocation to fail without doing anything.
This is a derivation of not ownedInit.type.conformsTo(self.type)."/>
@@ -280,14 +280,14 @@
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-ImperativeTypedModel-isChecked"
- name="isChecked" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isChecked" lowerBound="1" 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="True for an input model."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-ImperativeTypedModel-isEnforced"
- name="isEnforced" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isEnforced" lowerBound="1" 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="True for an output model."/>
@@ -313,7 +313,7 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-LoopParameterBinding-isCheck"
- name="isCheck" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isCheck" lowerBound="1" 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)."/>
@@ -380,7 +380,7 @@
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-Mapping-isStrict"
- name="isStrict" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isStrict" lowerBound="1" 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."/>
@@ -403,7 +403,7 @@
<details key="originalName" value="MatchingCallBindings"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="Tuple {
	message : String = 'Mismatched bindings ' + referredMapping.name + joinNames(referredNames) + ' <= ' + joinNames(referringNames),
	status : Boolean = referredNames = referringNames

}.status"/>
+ <details key="body" value="Tuple {
	message : String = 'MappingCall::MatchingCallBindings: ' + referredMapping.name + joinNames(referredNames) + ' <= ' + joinNames(referringNames),
	status : Boolean = referredNames = referringNames

}.status"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
@@ -451,14 +451,14 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-MappingCall-isInstall"
- name="isInstall" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isInstall" lowerBound="1" 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 install MappingCall declares a MappingCall that consumes one or more connections and appends to zero or more connections.
Invocations of the mapping are driven by the availability of values in the connection."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-MappingCall-isInvoke"
- name="isInvoke" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isInvoke" lowerBound="1" 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 invoke MappingCall invokes a Mapping that uses one or more values and appends to zero or more connections.
Invocations of the mapping is requested by the caller."/>
@@ -600,7 +600,7 @@
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-NewStatement-isContained"
- name="isContained" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ name="isContained" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="True if the new element is guaranteed to be assigned to a container and so does not need to be tracked in the set of potential orphan elememnts to be contained at the model root."/>
</eAnnotations>
@@ -641,7 +641,7 @@
<details key="originalName" value="CompatibleClassForProperty"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="Tuple {
	message : String = targetVariable.type?.name + ' must conform to ' + resolvedProperty.owningClass?.name,
	status : Boolean = 
targetVariable.type.conformsTo(resolvedProperty.owningClass)

}.status"/>
+ <details key="body" value="
	let requiredType = resolvedProperty.owningClass in
	let actualType = targetVariable.type in
	Tuple{
		status : Boolean = actualType.conformsTo(requiredType),
		message : String = 'SetStatement::CompatibleClassForProperty: ' + actualType?.name + ' must conform to ' + requiredType?.name
	}.status

"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
@@ -651,12 +651,27 @@
</eGenericType>
</eParameters>
</eOperations>
- <eOperations name="validateCompatibleTypeForValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eOperations name="validateCompatibleTypeForPartialValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML">
- <details key="originalName" value="CompatibleTypeForValue"/>
+ <details key="originalName" value="CompatibleTypeForPartialValue"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="Tuple {
	message : String = ownedExpression.type?.name + ' must conform to ' + resolvedProperty.type?.name,
	status : Boolean = 
ownedExpression.type.conformsTo(resolvedProperty.type)

}.status"/>
+ <details key="body" value="
	isPartial implies
		let requiredType = resolvedProperty.type.oclAsType(ocl::CollectionType).elementType in
		let actualType = ownedExpression.type in
		Tuple{
			status : Boolean = actualType.conformsTo(requiredType),
			message : String = 'SetStatement::CompatibleTypeForPartialValue: ' + actualType?.name + ' must conform to ' + requiredType.name
		}.status

"/>
+ </eAnnotations>
+ <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
+ <eParameters name="context">
+ <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
+ <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ </eGenericType>
+ </eParameters>
+ </eOperations>
+ <eOperations name="validateCompatibleTypeForTotalValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <details key="originalName" value="CompatibleTypeForTotalValue"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details key="body" value="
	not isPartial implies
		let requiredType = resolvedProperty.type in
		let actualType = ownedExpression.type in
		Tuple{
			status : Boolean = actualType.conformsTo(requiredType),
			message : String = 'SetStatement::CompatibleTypeForTotalValue: ' + actualType?.name + ' must conform to ' + requiredType?.name
		}.status

"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
@@ -671,7 +686,7 @@
<details key="originalName" value="ValueDoesNotNavigateFromRealizedVariables"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="
ownedExpression->closure(e : ocl::OclElement | e.oclContents())->selectByKind(ocl::VariableExp)->select(referredVariable.oclIsKindOf(NewStatement))->select(s | s.oclContainer().oclIsKindOf(ocl::CallExp) and s.oclContainer().oclAsType(ocl::CallExp).ownedSource = s)->isEmpty()
"/>
+ <details key="body" value="
ownedExpression->closure(e : ocl::OclElement | e.oclContents())->selectByKind(ocl::VariableExp)->select(referredVariable.oclIsKindOf(NewStatement))->select(s | s.oclContainer().oclIsKindOf(ocl::CallExp) and s.oclContainer().oclAsType(ocl::CallExp).ownedSource = s)->isEmpty()

"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
@@ -701,17 +716,17 @@
<eStructuralFeatures xsi:type="ecore:EReference" xmi:id="F-qvtimperative-SetStatement-targetProperty"
name="targetProperty" lowerBound="1" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#T-pivot-Property"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-SetStatement-isPartial"
- name="isPartial" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isPartial" lowerBound="1" 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="If not isPartial, the value of the ownedExpression is assigned as the entirety of the targetProperty of the targetVariable.

If isPartial, the value of the ownedExpression is included within the targetProperty of the targetVariable."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-SetStatement-isNotify"
- name="isNotify" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isNotify" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-SetStatement-isOpposite"
- name="isOpposite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isOpposite" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" xmi:id="F-qvtimperative-SetStatement-ownedExpression"
name="ownedExpression" lowerBound="1" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#T-pivot-OCLExpression"
@@ -720,7 +735,7 @@
name="resolvedProperty" lowerBound="1" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#T-pivot-Property"
changeable="false" volatile="true" transient="true" derived="true" resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="derivation" value="if isOpposite then targetProperty.opposite else targetProperty endif
"/>
+ <details key="derivation" value="if isOpposite then targetProperty.opposite else targetProperty endif

"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
@@ -779,7 +794,7 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtimperative-SimpleParameterBinding-isCheck"
- name="isCheck" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isCheck" lowerBound="1" 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)."/>
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel
index 91f47ec..917d051 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.genmodel
@@ -175,9 +175,13 @@
<genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateCompatibleClassForProperty/diagnostics"/>
<genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateCompatibleClassForProperty/context"/>
</genOperations>
- <genOperations ecoreOperation="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForValue">
- <genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForValue/diagnostics"/>
- <genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForValue/context"/>
+ <genOperations ecoreOperation="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForPartialValue">
+ <genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForPartialValue/diagnostics"/>
+ <genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForPartialValue/context"/>
+ </genOperations>
+ <genOperations ecoreOperation="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForTotalValue">
+ <genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForTotalValue/diagnostics"/>
+ <genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateCompatibleTypeForTotalValue/context"/>
</genOperations>
<genOperations ecoreOperation="QVTimperative.ecore#//SetStatement/validateValueDoesNotNavigateFromRealizedVariables">
<genParameters ecoreParameter="QVTimperative.ecore#//SetStatement/validateValueDoesNotNavigateFromRealizedVariables/diagnostics"/>
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
index dec9e1e..fd223f9 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
@@ -40,7 +40,7 @@
context MappingCall
def: referredNames : OrderedSet(String) = referredMapping.ownedMappingParameters.name->asSet()->sortedBy(n | n)
def: referringNames : OrderedSet(String) = ownedMappingParameterBindings.boundVariable.name->asSet()->sortedBy(n | n)
-inv MatchingCallBindings('Mismatched bindings ' + referredMapping.name + joinNames(referredNames) + ' <= ' + joinNames(referringNames)): referredNames = referringNames
+inv MatchingCallBindings('MappingCall::MatchingCallBindings: ' + referredMapping.name + joinNames(referredNames) + ' <= ' + joinNames(referringNames)): referredNames = referringNames
inv NotBothInstallAndInvoke: not (isInstall and isInvoke)
inv UniqueCallBindings: ownedMappingParameterBindings->isUnique(boundVariable)
@@ -54,12 +54,36 @@
context SetStatement
def:resolvedProperty : ocl::Property[1] = if isOpposite then targetProperty.opposite else targetProperty endif
-inv CompatibleClassForProperty(targetVariable.type?.name + ' must conform to ' + resolvedProperty.owningClass?.name):
-targetVariable.type.conformsTo(resolvedProperty.owningClass)
-inv CompatibleTypeForValue(ownedExpression.type?.name + ' must conform to ' + resolvedProperty.type?.name):
-ownedExpression.type.conformsTo(resolvedProperty.type)
+
+inv CompatibleClassForProperty:
+ let requiredType = resolvedProperty.owningClass in
+ let actualType = targetVariable.type in
+ Tuple{
+ status : Boolean = actualType.conformsTo(requiredType),
+ message : String = 'SetStatement::CompatibleClassForProperty: ' + actualType?.name + ' must conform to ' + requiredType?.name
+ }.status
+
+inv CompatibleTypeForPartialValue:
+ isPartial implies
+ let requiredType = resolvedProperty.type.oclAsType(ocl::CollectionType).elementType in
+ let actualType = ownedExpression.type in
+ Tuple{
+ status : Boolean = actualType.conformsTo(requiredType),
+ message : String = 'SetStatement::CompatibleTypeForPartialValue: ' + actualType?.name + ' must conform to ' + requiredType.name
+ }.status
+
+inv CompatibleTypeForTotalValue:
+ not isPartial implies
+ let requiredType = resolvedProperty.type in
+ let actualType = ownedExpression.type in
+ Tuple{
+ status : Boolean = actualType.conformsTo(requiredType),
+ message : String = 'SetStatement::CompatibleTypeForTotalValue: ' + actualType?.name + ' must conform to ' + requiredType?.name
+ }.status
+
inv ValueDoesNotNavigateFromRealizedVariables:
ownedExpression->closure(e : ocl::OclElement | e.oclContents())->selectByKind(ocl::VariableExp)->select(referredVariable.oclIsKindOf(NewStatement))->select(s | s.oclContainer().oclIsKindOf(ocl::CallExp) and s.oclContainer().oclAsType(ocl::CallExp).ownedSource = s)->isEmpty()
+
inv TargetPropertyIsNotReadOnly:
not resolvedProperty.isReadOnly
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtrelation/model/QVTrelation.ecore b/plugins/org.eclipse.qvtd.pivot.qvtrelation/model/QVTrelation.ecore
index 00e2542..f99f044 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtrelation/model/QVTrelation.ecore
+++ b/plugins/org.eclipse.qvtd.pivot.qvtrelation/model/QVTrelation.ecore
@@ -144,7 +144,7 @@
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvtrelation-Relation-isTopLevel"
- name="isTopLevel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ name="isTopLevel" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EReference" xmi:id="F-qvtrelation-Relation-operationalImpl"
name="operationalImpl" ordered="false" upperBound="-1" eType="#T-qvtrelation-RelationImplementation"
containment="true" eOpposite="#F-qvtrelation-RelationImplementation-relation"/>
diff --git a/plugins/org.eclipse.qvtd.pivot.qvttemplate/model/QVTtemplate.ecore b/plugins/org.eclipse.qvtd.pivot.qvttemplate/model/QVTtemplate.ecore
index bd3b1bf..1d29a33 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvttemplate/model/QVTtemplate.ecore
+++ b/plugins/org.eclipse.qvtd.pivot.qvttemplate/model/QVTtemplate.ecore
@@ -187,7 +187,7 @@
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="F-qvttemplate-PropertyTemplateItem-isOpposite"
- name="isOpposite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ name="isOpposite" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" xmi:id="F-qvttemplate-PropertyTemplateItem-resolvedProperty"
name="resolvedProperty" lowerBound="1" eType="ecore:EClass ../../org.eclipse.ocl.pivot/model/Pivot.ecore#T-pivot-Property"
diff --git a/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdASModels.mwe2 b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdASModels.mwe2
index d1c361c..a9ad698 100644
--- a/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdASModels.mwe2
+++ b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdASModels.mwe2
@@ -209,4 +209,34 @@
// visitorPackageName = "org.eclipse.qvtd.pivot.qvtrelation.util"
// }
component = @GenerateQVTdScheduleModels {}
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvtbase/model"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvtbase/emf-gen"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvtcore/model"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvtcore/emf-gen"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvtimperative/model"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvtimperative/emf-gen"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvttemplate/model"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvttemplate/emf-gen"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvtrelation/model"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "org.eclipse.qvtd.pivot.qvtrelation/emf-gen"
+ }
}