Skip to content
Snippets Groups Projects
Commit b00f5d95 authored by Martti Käärik's avatar Martti Käärik
Browse files

Changed resolveDataType() to resolveBaseDataType() and re-added...

Changed resolveDataType() to resolveBaseDataType() and re-added resolveDataType() to return resolveBaseDataType() by default (TODO: resolve reduction in resolveDataType())
parent d88ad7e5
No related branches found
No related tags found
No related merge requests found
......@@ -193,6 +193,11 @@
<eClassifiers xsi:type="ecore:EClass" name="StaticDataUse" abstract="true" eSuperTypes="#//DataUse"/>
<eClassifiers xsi:type="ecore:EClass" name="DataUse" abstract="true" eSuperTypes="#//Element">
<eOperations name="resolveDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="&#xA; self.resolveBaseDataType()&#xA; "/>
</eAnnotations>
</eOperations>
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="null"/>
</eAnnotations>
......@@ -236,7 +241,7 @@
eType="#//DataType"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FormalParameterUse" eSuperTypes="#//DynamicDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="self.parameter.dataType"/>
</eAnnotations>
......@@ -250,7 +255,7 @@
eType="#//DataType"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FunctionCall" eSuperTypes="#//DynamicDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="self.function.returnType"/>
</eAnnotations>
......@@ -259,7 +264,7 @@
eType="#//Function"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="VariableUse" eSuperTypes="#//DynamicDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="self.variable.dataType"/>
</eAnnotations>
......@@ -333,14 +338,14 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="OmitValue" eSuperTypes="#//SpecialValueUse"/>
<eClassifiers xsi:type="ecore:EClass" name="SpecialValueUse" abstract="true" eSuperTypes="#//StaticDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="&#xA; if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA; self.container().oclAsType(MemberAssignment).member.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA; self.container().oclAsType(ParameterBinding).parameter.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(Interaction) and &#xA; self.oclIsTypeOf(AnyValue)) then&#xA; self.oclAsType(AnyValue).dataType&#xA; else&#xA; null&#xA; endif&#xA; endif&#xA; endif&#xA; "/>
</eAnnotations>
</eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AnyValue" eSuperTypes="#//SpecialValueUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="&#xA; if (not self.dataType.oclIsUndefined()) then&#xA; self.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA; self.container().oclAsType(MemberAssignment).member.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA; self.container().oclAsType(ParameterBinding).parameter.dataType&#xA; else&#xA; if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA; self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA; else&#xA; if (self.container().oclIsTypeOf(DataElementUse)) then&#xA; self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA; else&#xA; if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA; self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA; else&#xA; null&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; "/>
</eAnnotations>
......@@ -349,7 +354,7 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AnyValueOrOmit" eSuperTypes="#//SpecialValueUse"/>
<eClassifiers xsi:type="ecore:EClass" name="DataInstanceUse" eSuperTypes="#//StaticDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="&#xA; if (not self.dataInstance.oclIsUndefined()) then&#xA; self.dataInstance.dataType&#xA; else &#xA; if (not self.dataType.oclIsUndefined()) then&#xA; self.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA; self.container().oclAsType(MemberAssignment).member.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA; self.container().oclAsType(ParameterBinding).parameter.dataType&#xA; else&#xA; if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA; self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA; else&#xA; if (self.container().oclIsTypeOf(DataElementUse)) then&#xA; self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA; else&#xA; if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA; self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA; else&#xA; null&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; "/>
</eAnnotations>
......@@ -451,7 +456,7 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="gate" lowerBound="1" eType="#//GateInstance"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TimeLabelUse" eSuperTypes="#//DynamicDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="Time.allInstances()->asOrderedSet()->first()"/>
</eAnnotations>
......@@ -696,7 +701,7 @@
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PredefinedFunctionCall" eSuperTypes="#//DynamicDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="&#xA;&#x9; if not self.function.returnType.oclIsUndefined() then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;self.function.returnType&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else &#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;self.actualParameters.resolveDataType()->asOrderedSet()->first()&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;"/>
</eAnnotations>
......@@ -784,7 +789,7 @@
eType="#//PackageableElement"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LiteralValueUse" eSuperTypes="#//StaticDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="&#xA; if (not self.dataType.oclIsUndefined()) then&#xA; self.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA; self.container().oclAsType(MemberAssignment).member.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA; self.container().oclAsType(ParameterBinding).parameter.dataType&#xA; else&#xA; if (not self.intValue.oclIsUndefined()) then&#xA; SimpleDataType.allInstances()->select(t | t.name = 'Integer')->asOrderedSet()->first()&#xA; else&#xA; if (not self.boolValue.oclIsUndefined()) then&#xA; SimpleDataType.allInstances()->select(t | t.name = 'Boolean')->asOrderedSet()->first()&#xA; else &#xA; SimpleDataType.allInstances()->select(t | t.name = 'String')->asOrderedSet()->first()&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; "/>
</eAnnotations>
......@@ -809,7 +814,7 @@
eType="#//SimpleDataInstance" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DataElementUse" eSuperTypes="#//DataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="&#xA; if (not self.dataElement.oclIsUndefined()) then&#xA; if (self.dataElement.oclIsKindOf(DataType)) then&#xA; self.dataElement.oclAsType(DataType)&#xA; else&#xA; if (self.dataElement.oclIsKindOf(DataInstance)) then&#xA; self.dataElement.oclAsType(DataInstance).dataType&#xA; else &#xA; if (self.dataElement.oclIsTypeOf(FormalParameter)) then&#xA; self.dataElement.oclAsType(FormalParameter).dataType&#xA; else &#xA; if (self.dataElement.oclIsTypeOf(Function)) then&#xA; self.dataElement.oclAsType(Function).returnType&#xA; else&#xA; null&#xA; endif&#xA; endif &#xA; endif&#xA; endif&#xA; else &#xA; if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA; self.container().oclAsType(MemberAssignment).member.dataType&#xA; else &#xA; if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA; &#x9;self.container().oclAsType(ParameterBinding).resolveParameterType()&#xA; else&#xA; if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA; self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA; else&#xA; if (self.container().oclIsTypeOf(DataElementUse)) then&#xA; self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA; else&#xA; if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA; self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA; else&#xA; null&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; endif&#xA; "/>
</eAnnotations>
......@@ -824,7 +829,7 @@
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CastDataUse" eSuperTypes="#//StaticDataUse">
<eOperations name="resolveDataType" eType="#//DataType">
<eOperations name="resolveBaseDataType" eType="#//DataType">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="body" value="self.dataType"/>
</eAnnotations>
......
......@@ -130,6 +130,7 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//DataUse/argument"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//DataUse/reduction"/>
<genOperations ecoreOperation="tdl.ecore#//DataUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//DataUse/resolveBaseDataType"/>
<genOperations ecoreOperation="tdl.ecore#//DataUse/isEffectivelyStatic"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//ParameterBinding">
......@@ -148,7 +149,7 @@
</genClasses>
<genClasses ecoreClass="tdl.ecore#//FormalParameterUse">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//FormalParameterUse/parameter"/>
<genOperations ecoreOperation="tdl.ecore#//FormalParameterUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//FormalParameterUse/resolveBaseDataType"/>
</genClasses>
<genClasses image="false" ecoreClass="tdl.ecore#//DynamicDataUse"/>
<genClasses ecoreClass="tdl.ecore#//Variable">
......@@ -156,12 +157,12 @@
</genClasses>
<genClasses ecoreClass="tdl.ecore#//FunctionCall">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//FunctionCall/function"/>
<genOperations ecoreOperation="tdl.ecore#//FunctionCall/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//FunctionCall/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//VariableUse">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//VariableUse/componentInstance"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//VariableUse/variable"/>
<genOperations ecoreOperation="tdl.ecore#//VariableUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//VariableUse/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//ComponentInstance">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//ComponentInstance/type"/>
......@@ -188,11 +189,11 @@
<genClasses ecoreClass="tdl.ecore#//Timer"/>
<genClasses ecoreClass="tdl.ecore#//OmitValue"/>
<genClasses image="false" ecoreClass="tdl.ecore#//SpecialValueUse">
<genOperations ecoreOperation="tdl.ecore#//SpecialValueUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//SpecialValueUse/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//AnyValue">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//AnyValue/dataType"/>
<genOperations ecoreOperation="tdl.ecore#//AnyValue/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//AnyValue/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//AnyValueOrOmit"/>
<genClasses ecoreClass="tdl.ecore#//DataInstanceUse">
......@@ -200,7 +201,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute tdl.ecore#//DataInstanceUse/unassignedMember"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//DataInstanceUse/dataType"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//DataInstanceUse/item"/>
<genOperations ecoreOperation="tdl.ecore#//DataInstanceUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//DataInstanceUse/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//Time"/>
<genClasses ecoreClass="tdl.ecore#//TimeLabel"/>
......@@ -244,7 +245,7 @@
<genClasses ecoreClass="tdl.ecore#//TimeLabelUse">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//TimeLabelUse/timeLabel"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute tdl.ecore#//TimeLabelUse/kind"/>
<genOperations ecoreOperation="tdl.ecore#//TimeLabelUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//TimeLabelUse/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//TestConfiguration">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//TestConfiguration/componentInstance"/>
......@@ -366,7 +367,7 @@
<genClasses ecoreClass="tdl.ecore#//PredefinedFunctionCall">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//PredefinedFunctionCall/function"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//PredefinedFunctionCall/actualParameters"/>
<genOperations ecoreOperation="tdl.ecore#//PredefinedFunctionCall/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//PredefinedFunctionCall/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//LocalExpression">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//LocalExpression/expression"/>
......@@ -406,7 +407,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute tdl.ecore#//LiteralValueUse/intValue"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute tdl.ecore#//LiteralValueUse/boolValue"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//LiteralValueUse/dataType"/>
<genOperations ecoreOperation="tdl.ecore#//LiteralValueUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//LiteralValueUse/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//ConstraintType"/>
<genClasses ecoreClass="tdl.ecore#//Constraint">
......@@ -420,12 +421,12 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute tdl.ecore#//DataElementUse/unassignedMember"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//DataElementUse/dataElement"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//DataElementUse/item"/>
<genOperations ecoreOperation="tdl.ecore#//DataElementUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//DataElementUse/resolveBaseDataType"/>
</genClasses>
<genClasses ecoreClass="tdl.ecore#//CastDataUse">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//CastDataUse/dataUse"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//CastDataUse/dataType"/>
<genOperations ecoreOperation="tdl.ecore#//CastDataUse/resolveDataType"/>
<genOperations ecoreOperation="tdl.ecore#//CastDataUse/resolveBaseDataType"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment