Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Problems with type conformance and redefinition consistency
Problems with type conformance and redefinition consistency [message #470377] Mon, 12 February 2007 20:44 Go to next message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090809040509070700060606
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

RedefinableElement defines the following semantic variation point
(7.3.46 in ptc/06-04-02, p. 134):

> There are various degrees of compatibility between the redefined element and the redefining element, such as name
> compatibility (the redefining element has the same name as the redefined element), structural compatibility (the client
> visible properties of the redefined element are also properties of the redefining element), or behavioral compatibility (the
> redefining element is substitutable for the redefined element). Any kind of compatibility involves a constraint on
> redefinitions. The particular constraint chosen is a semantic variation point.

I created a simple model with several tests of conformance/redefinition
to gain a practical understanding of 3 operations:

RedefinableElement.isConsistentWith()
RedefinableElement.isRedefinitionContextValid()
Type.conformsTo()

I tried several UML tools and finally settled on
RSA7 because it provides an easier interface to
work with the Eclipse UML2 implementation (2.0.2.v200610251409)
I've attached the RSA model.

The UML2 XMI files are self-contained and seems to be standard compliant
but your actual interoperability mileage may vary.

I have several questions about this small example:

1) What does it take to redefine a "DataType"?
My attempt failed:

Redefining element '<Data Type> DataType2' is not consistent with
redefined element '<Data Type> DataType1'.

2) What does it take to redefine a simple "Class"?
A simple attempt fails but others succeed.
What are the minimal requirements for redefining a "Class"?

- Redefining element '<Class> Type2' is not consistent with redefined
element '<Class> Type1'.

3) What does it take to redefine an operation in a Class?
My attempts failed:

- Redefining element '<Class> Class1a' is not consistent with redefined
element '<Class> Class1'.
- Redefining element '<Class> Class1b' is not consistent with redefined
element '<Class> Class1'.

4) What does it take to redefine a property whose type is a DataType?
Again, no success here:

- Redefining element '<Class> Class2a' is not consistent with redefined
element '<Class> Class2'.
- Redefining element '<Class> Class2b' is not consistent with redefined
element '<Class> Class2'.

5) Class3a / Class3 is a valid redefinition even though it involves
redefining a property (x3a/x3) whose type (Type2) is itself an invalid
redefinition of another type (Type1). Why does this work?
What do I need to do to make this type of situation fail redefinition
consistency?

6) Class4a / Class4 is also a valid redefinition like (5) but this time,
the type redefinition is contravariant (Type1 / Type2). Class4a/Class4
is deemed a valid redefinition but what do I need to do to make
contravariance invalid for property type redefinitions?

-- Nicolas.

--------------090809040509070700060606
Content-Type: text/xml;
name="ProfileBase.profile.xmi"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ProfileBase.profile.xmi"

<?xml version="1.0" encoding="UTF-8"?>
<uml:Profile xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1 http://www.eclipse.org/uml2/2.0.0/UML"
xmi:id="_AFLCjLrMEduIK4Jr7J21bA"
name="ProfileBase"
metamodelReference="_AFLCvrrMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCjbrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<contents xmi:type="ecore:EPackage" xmi:id="_AFLCjrrMEduIK4Jr7J21bA" name="ProfileBase" nsURI="http:///schemas/ProfileBase/1" nsPrefix="ProfileBase">
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLCj7rMEduIK4Jr7J21bA" name="ProfileConstraint" eSuperTypes="_AFLCk7rMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCkLrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLCwrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLCkbrMEduIK4Jr7J21bA" name="messageKey" ordered="false">
<eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLCkrrMEduIK4Jr7J21bA" name="base_Constraint" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLCk7rMEduIK4Jr7J21bA" name="Default_AbstractMetaConstraint" abstract="true">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLClLrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="uml:Stereotype" href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
</eAnnotations>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLClbrMEduIK4Jr7J21bA" name="evaluationMode" ordered="false" lowerBound="1" eType="_AFLCl7rMEduIK4Jr7J21bA" defaultValueLiteral="batch"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLClrrMEduIK4Jr7J21bA" name="severity" ordered="false" lowerBound="1" eType="_AFLCm7rMEduIK4Jr7J21bA" defaultValueLiteral="error"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLCl7rMEduIK4Jr7J21bA" name="Default_ConstraintEvaluationMode">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCmLrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="uml:Enumeration" href="Default.profile.xmi#_AFLGTrrMEduIK4Jr7J21bA"/>
</eAnnotations>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCmbrMEduIK4Jr7J21bA" name="batch"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCmrrMEduIK4Jr7J21bA" name="live" value="1"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLCm7rMEduIK4Jr7J21bA" name="Default_ConstraintSeverity">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCnLrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="uml:Enumeration" href="Default.profile.xmi#_AFLGUbrMEduIK4Jr7J21bA"/>
</eAnnotations>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCnbrMEduIK4Jr7J21bA" name="error"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCnrrMEduIK4Jr7J21bA" name="warning" value="1"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCn7rMEduIK4Jr7J21bA" name="info" value="2"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLCoLrMEduIK4Jr7J21bA" name="ImageUsageHint">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCobrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLCyrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCorrMEduIK4Jr7J21bA" name="None"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCo7rMEduIK4Jr7J21bA" name="Icon" value="1"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCpLrMEduIK4Jr7J21bA" name="ShapeImage" value="2"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLCpbrMEduIK4Jr7J21bA" name="ExtendedImage">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCprrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLCzrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLCp7rMEduIK4Jr7J21bA" name="data" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EByteArray"/>
</eStructuralFeatures>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLCqLrMEduIK4Jr7J21bA" name="usageHint" ordered="false" lowerBound="1" eType="_AFLCoLrMEduIK4Jr7J21bA" defaultValueLiteral="None"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLCqbrMEduIK4Jr7J21bA" name="hint" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLCqrrMEduIK4Jr7J21bA" name="imageName" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLCq7rMEduIK4Jr7J21bA" name="base_Image" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Image"/>
</eStructuralFeatures>
</eClassifiers>
</contents>
<contents xmi:type="ecore:EPackage" xmi:id="_AFLCrLrMEduIK4Jr7J21bA" name="ProfileBase_0" nsURI="http:///ProfileBase_0.profile.uml2" nsPrefix="ProfileBase_0">
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLCrbrMEduIK4Jr7J21bA" name="ProfileBase__ProfileConstraint" eSuperTypes="_AFLCsbrMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCrrrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLCwrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLCr7rMEduIK4Jr7J21bA" name="base_Constraint">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
</eStructuralFeatures>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLCsLrMEduIK4Jr7J21bA" name="messageKey" defaultValueLiteral="">
<eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLCsbrMEduIK4Jr7J21bA" name="Default__AbstractMetaConstraint" abstract="true">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCsrrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="uml:Stereotype" href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
</eAnnotations>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLCs7rMEduIK4Jr7J21bA" name="evaluationMode" lowerBound="1" eType="_AFLCtbrMEduIK4Jr7J21bA" defaultValueLiteral="batch"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLCtLrMEduIK4Jr7J21bA" name="severity" lowerBound="1" eType="_AFLCubrMEduIK4Jr7J21bA" defaultValueLiteral="error"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLCtbrMEduIK4Jr7J21bA" name="Default__ConstraintEvaluationMode">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCtrrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="uml:Enumeration" href="Default.profile.xmi#_AFLGTrrMEduIK4Jr7J21bA"/>
</eAnnotations>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCt7rMEduIK4Jr7J21bA" name="batch"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCuLrMEduIK4Jr7J21bA" name="live" value="1"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLCubrMEduIK4Jr7J21bA" name="Default__ConstraintSeverity">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLCurrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="uml:Enumeration" href="Default.profile.xmi#_AFLGUbrMEduIK4Jr7J21bA"/>
</eAnnotations>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCu7rMEduIK4Jr7J21bA" name="error"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCvLrMEduIK4Jr7J21bA" name="warning" value="1"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLCvbrMEduIK4Jr7J21bA" name="info" value="2"/>
</eClassifiers>
</contents>
</eAnnotations>
</xmi:Extension>
<packageImport xmi:type="uml:PackageImport" xmi:id="_AFLCvrrMEduIK4Jr7J21bA" visibility="private">
<importedPackage xmi:type="uml:Model" href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
</packageImport>
<packageImport xmi:type="uml:PackageImport" xmi:id="_AFLCv7rMEduIK4Jr7J21bA" visibility="private">
<importedPackage xmi:type="uml:Model" href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
</packageImport>
<packageImport xmi:type="uml:PackageImport" xmi:id="_AFLCwLrMEduIK4Jr7J21bA" visibility="private">
<importedPackage xmi:type="uml:Profile" href="Default.profile.xmi#_AFLGDrrMEduIK4Jr7J21bA"/>
</packageImport>
<packageImport xmi:type="uml:PackageImport" xmi:id="_AFLCwbrMEduIK4Jr7J21bA" visibility="private">
<importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#_0"/>
</packageImport>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_AFLCwrrMEduIK4Jr7J21bA" name="ProfileConstraint">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLCw7rMEduIK4Jr7J21bA">
<general xmi:type="uml:Stereotype" href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
</generalization>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLCxLrMEduIK4Jr7J21bA" name="messageKey">
<type xmi:type="uml:PrimitiveType" href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AFLCxbrMEduIK4Jr7J21bA"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLCxrrMEduIK4Jr7J21bA" name="base_Constraint" association="_AFLCx7rMEduIK4Jr7J21bA">
<type xmi:type="uml:Class" href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#Constraint"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Extension" xmi:id="_AFLCx7rMEduIK4Jr7J21bA" name="Constraint_ProfileConstraint" memberEnd="_AFLCyLrMEduIK4Jr7J21bA _AFLCxrrMEduIK4Jr7J21bA">
<ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_AFLCyLrMEduIK4Jr7J21bA" name="extension_ProfileConstraint" type="_AFLCwrrMEduIK4Jr7J21bA" aggregation="composite" association="_AFLCx7rMEduIK4Jr7J21bA">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AFLCybrMEduIK4Jr7J21bA" value="1"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Enumeration" xmi:id="_AFLCyrrMEduIK4Jr7J21bA" name="ImageUsageHint">
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_AFLCy7rMEduIK4Jr7J21bA" name="None"/>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_AFLCzLrMEduIK4Jr7J21bA" name="Icon"/>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_AFLCzbrMEduIK4Jr7J21bA" name="ShapeImage"/>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_AFLCzrrMEduIK4Jr7J21bA" name="ExtendedImage">
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLCz7rMEduIK4Jr7J21bA" name="data">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EByt eArray"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLC0LrMEduIK4Jr7J21bA" name="usageHint" type="_AFLCyrrMEduIK4Jr7J21bA">
<defaultValue xmi:type="uml:InstanceValue" xmi:id="_AFLC0brMEduIK4Jr7J21bA" instance="_AFLCy7rMEduIK4Jr7J21bA"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLC0rrMEduIK4Jr7J21bA" name="hint">
<type xmi:type="uml:PrimitiveType" href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLC07rMEduIK4Jr7J21bA" name="imageName">
<type xmi:type="uml:PrimitiveType" href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLC1LrMEduIK4Jr7J21bA" name="base_Image" association="_AFLC1brMEduIK4Jr7J21bA">
<type xmi:type="uml:Class" href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#Image"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Extension" xmi:id="_AFLC1brMEduIK4Jr7J21bA" name="Image_ExtendedImage" memberEnd="_AFLC1rrMEduIK4Jr7J21bA _AFLC1LrMEduIK4Jr7J21bA">
<ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_AFLC1rrMEduIK4Jr7J21bA" name="extension_ExtendedImage" type="_AFLCzrrMEduIK4Jr7J21bA" aggregation="composite" association="_AFLC1brMEduIK4Jr7J21bA">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AFLC17rMEduIK4Jr7J21bA" value="1"/>
</ownedEnd>
</packagedElement>
</uml:Profile>

--------------090809040509070700060606
Content-Type: text/xml;
name="cscs.xmi"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="cscs.xmi"

<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1 http://www.eclipse.org/uml2/2.0.0/UML"
xmi:id="_AFLDG7rMEduIK4Jr7J21bA" name="CSCS">
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHLrMEduIK4Jr7J21bA" annotatedElement="_AFLDM7rMEduIK4Jr7J21bA">
<body>Class4b should not be consistent because x4b is not.</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHbrMEduIK4Jr7J21bA" annotatedElement="_AFLDLbrMEduIK4Jr7J21bA _AFLDObrMEduIK4Jr7J21bA _AFLDO7rMEduIK4Jr7J21bA">
<body>Class3, Class3a, Class3b are consistent even though Type2 is not consistent with Type1!</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHrrMEduIK4Jr7J21bA" annotatedElement="_AFLDPrrMEduIK4Jr7J21bA">
<body>Why is Class2b not consistent with Class2 is a mystery.</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDH7rMEduIK4Jr7J21bA" annotatedElement="_AFLDQLrMEduIK4Jr7J21bA">
<body>Class2a is not consistent with Class2. Is it due to the inconsistency between DataType2 &amp; DataType1?</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDILrMEduIK4Jr7J21bA">
<body>Covariant return type.</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDIbrMEduIK4Jr7J21bA" annotatedElement="_AFLDSLrMEduIK4Jr7J21bA">
<body>Covariant specialization (on argument type)</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDIrrMEduIK4Jr7J21bA" annotatedElement="_AFLDQ7rMEduIK4Jr7J21bA">
<body>Covariant specialization (on return type)</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDI7rMEduIK4Jr7J21bA" annotatedElement="_AFLDMrrMEduIK4Jr7J21bA _AFLDUrrMEduIK4Jr7J21bA">
<body>isSubstitutable = true</body>
</ownedComment>
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDJLrMEduIK4Jr7J21bA" annotatedElement="_AFLDVLrMEduIK4Jr7J21bA">
<body>redefines Type1; isSubstitutable = true; why is Type2 not consistent with Type1?</body>
</ownedComment>
<packageImport xmi:type="uml:PackageImport" xmi:id="_AFLDJbrMEduIK4Jr7J21bA">
<importedPackage xmi:type="uml:Model" href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
</packageImport>
<packagedElement xmi:type="uml:Class" xmi:id="_AFLDJrrMEduIK4Jr7J21bA" name="GeneralContext">
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDJ7rMEduIK4Jr7J21bA" name="Class1">
<ownedOperation xmi:type="uml:Operation" xmi:id="_AFLDKLrMEduIK4Jr7J21bA" name="Op1">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_AFLDKbrMEduIK4Jr7J21bA" name="result" type="_AFLDULrMEduIK4Jr7J21bA" direction="return"/>
<ownedParameter xmi:type="uml:Parameter" xmi:id="_AFLDKrrMEduIK4Jr7J21bA" name="arg1" type="_AFLDULrMEduIK4Jr7J21bA"/>
</ownedOperation>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDK7rMEduIK4Jr7J21bA" name="Class2">
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLDLLrMEduIK4Jr7J21bA" name="x2" visibility="private" type="_AFLDTrrMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDLbrMEduIK4Jr7J21bA" name="Class3">
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLDLrrMEduIK4Jr7J21bA" name="x3" visibility="private" type="_AFLDULrMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDL7rMEduIK4Jr7J21bA" name="Class4">
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLDMLrMEduIK4Jr7J21bA" name="x4" visibility="private" type="_AFLDU7rMEduIK4Jr7J21bA"/>
</nestedClassifier>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_AFLDMbrMEduIK4Jr7J21bA" name="SpecializedContext">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDMrrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDJrrMEduIK4Jr7J21bA"/>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDM7rMEduIK4Jr7J21bA" name="Class4b">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDNLrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDL7rMEduIK4Jr7J21bA"/>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLDNbrMEduIK4Jr7J21bA" name="x4b" visibility="private" type="_AFLDULrMEduIK4Jr7J21bA" redefinedProperty="_AFLDMLrMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDNrrMEduIK4Jr7J21bA" name="Class4a">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDN7rMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDL7rMEduIK4Jr7J21bA"/>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLDOLrMEduIK4Jr7J21bA" name="x4a" visibility="private" type="_AFLDU7rMEduIK4Jr7J21bA" redefinedProperty="_AFLDMLrMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDObrMEduIK4Jr7J21bA" name="Class3b">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDOrrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDLbrMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDO7rMEduIK4Jr7J21bA" name="Class3a">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDPLrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDLbrMEduIK4Jr7J21bA"/>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLDPbrMEduIK4Jr7J21bA" name="x3a" visibility="private" type="_AFLDU7rMEduIK4Jr7J21bA" redefinedProperty="_AFLDLrrMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDPrrMEduIK4Jr7J21bA" name="Class2b" redefinedClassifier="_AFLDK7rMEduIK4Jr7J21bA">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDP7rMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDK7rMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDQLrMEduIK4Jr7J21bA" name="Class2a" redefinedClassifier="_AFLDK7rMEduIK4Jr7J21bA">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDQbrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDK7rMEduIK4Jr7J21bA"/>
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLDQrrMEduIK4Jr7J21bA" name="x2a" visibility="private" type="_AFLDVbrMEduIK4Jr7J21bA" redefinedProperty="_AFLDLLrMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDQ7rMEduIK4Jr7J21bA" name="Class1b" redefinedClassifier="_AFLDJ7rMEduIK4Jr7J21bA">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDRLrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDJ7rMEduIK4Jr7J21bA"/>
<ownedOperation xmi:type="uml:Operation" xmi:id="_AFLDRbrMEduIK4Jr7J21bA" name="Op1b" redefinedOperation="_AFLDKLrMEduIK4Jr7J21bA">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_AFLDRrrMEduIK4Jr7J21bA" name="arg1b" type="_AFLDULrMEduIK4Jr7J21bA"/>
<ownedParameter xmi:type="uml:Parameter" xmi:id="_AFLDR7rMEduIK4Jr7J21bA" name="result1b" type="_AFLDU7rMEduIK4Jr7J21bA" direction="return"/>
</ownedOperation>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDSLrMEduIK4Jr7J21bA" name="Class1a" redefinedClassifier="_AFLDJ7rMEduIK4Jr7J21bA">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDSbrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDJ7rMEduIK4Jr7J21bA"/>
<ownedOperation xmi:type="uml:Operation" xmi:id="_AFLDSrrMEduIK4Jr7J21bA" name="Op1a" redefinedOperation="_AFLDKLrMEduIK4Jr7J21bA">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_AFLDS7rMEduIK4Jr7J21bA" name="result" type="_AFLDULrMEduIK4Jr7J21bA" direction="return"/>
<ownedParameter xmi:type="uml:Parameter" xmi:id="_AFLDTLrMEduIK4Jr7J21bA" name="arg1a" type="_AFLDU7rMEduIK4Jr7J21bA"/>
</ownedOperation>
</nestedClassifier>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_AFLDTbrMEduIK4Jr7J21bA" name="TypeContext1">
<nestedClassifier xmi:type="uml:DataType" xmi:id="_AFLDTrrMEduIK4Jr7J21bA" name="DataType1">
<ownedAttribute xmi:type="uml:Property" xmi:id="_AFLDT7rMEduIK4Jr7J21bA" name="attribute1" visibility="private"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDULrMEduIK4Jr7J21bA" name="Type1"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_AFLDUbrMEduIK4Jr7J21bA" name="TypeContext2">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDUrrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDTbrMEduIK4Jr7J21bA"/>
<nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDU7rMEduIK4Jr7J21bA" name="Type2" redefinedClassifier="_AFLDULrMEduIK4Jr7J21bA">
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDVLrMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDULrMEduIK4Jr7J21bA"/>
</nestedClassifier>
<nestedClassifier xmi:type="uml:DataType" xmi:id="_AFLDVbrMEduIK4Jr7J21bA" name="DataType2" redefinedClassifier="_AFLDTrrMEduIK4Jr7J21bA">
<ownedComment xmi:type="uml:Comment" xmi:id="_AFLDVrrMEduIK4Jr7J21bA" annotatedElement="_AFLDV7rMEduIK4Jr7J21bA">
<body>redefines DataType1, isSubstitutable = true; why is DataType2 not consistent with DataType1?</body>
</ownedComment>
<generalization xmi:type="uml:Generalization" xmi:id="_AFLDV7rMEduIK4Jr7J21bA" isSubstitutable="true" general="_AFLDTrrMEduIK4Jr7J21bA"/>
</nestedClassifier>
</packagedElement>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="_AFLDWLrMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLDWbrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href=" http://schema.omg.org/spec/UML/2.1.1/StandardProfileL2.xmi#_ yzU58YinEdqtvbnfB2L_5w"/>
</eAnnotations>
</xmi:Extension>
<appliedProfile xmi:type="uml:Profile" href=" http://schema.omg.org/spec/UML/2.1.1/StandardProfileL2.xmi#_ 0"/>
</profileApplication>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="_AFLDWrrMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLDW7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="Default.profile.xmi#_AFLGELrMEduIK4Jr7J21bA"/>
</eAnnotations>
</xmi:Extension>
<appliedProfile xmi:type="uml:Profile" href="Default.profile.xmi#_AFLGDrrMEduIK4Jr7J21bA"/>
</profileApplication>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="_AFLDXLrMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLDXbrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="Deployment.profile.xmi#_AFLEhLrMEduIK4Jr7J21bA"/>
</eAnnotations>
</xmi:Extension>
<appliedProfile xmi:type="uml:Profile" href="Deployment.profile.xmi#_AFLEgrrMEduIK4Jr7J21bA"/>
</profileApplication>
</uml:Model>

--------------090809040509070700060606
Content-Type: text/xml;
name="Default.profile.xmi"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Default.profile.xmi"

<?xml version="1.0" encoding="UTF-8"?>
<uml:Profile xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1 http://www.eclipse.org/uml2/2.0.0/UML"
xmi:id="_AFLGDrrMEduIK4Jr7J21bA" name="Default" metamodelReference="_AFLGTLrMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGD7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<contents xmi:type="ecore:EPackage" xmi:id="_AFLGELrMEduIK4Jr7J21bA" name="Default" nsURI="http:///schemas/Default/1" nsPrefix="Default">
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLGEbrMEduIK4Jr7J21bA" name="ConstraintEvaluationMode">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGErrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGTrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGE7rMEduIK4Jr7J21bA" name="batch"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGFLrMEduIK4Jr7J21bA" name="live" value="1"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLGFbrMEduIK4Jr7J21bA" name="ConstraintSeverity">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGFrrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGUbrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGF7rMEduIK4Jr7J21bA" name="error"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGGLrMEduIK4Jr7J21bA" name="warning" value="1"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGGbrMEduIK4Jr7J21bA" name="info" value="2"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGGrrMEduIK4Jr7J21bA" name="URL">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGG7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGVbrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGHLrMEduIK4Jr7J21bA" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGHbrMEduIK4Jr7J21bA" name="Documentation">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGHrrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGWrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGH7rMEduIK4Jr7J21bA" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGILrMEduIK4Jr7J21bA" name="Shortcut">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGIbrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGX7rMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGIrrMEduIK4Jr7J21bA" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGI7rMEduIK4Jr7J21bA" name="Perspective">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGJLrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGZLrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGJbrMEduIK4Jr7J21bA" name="base_Package" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Package"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGJrrMEduIK4Jr7J21bA" name="AbstractMetaConstraint" abstract="true">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGJ7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGabrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLGKLrMEduIK4Jr7J21bA" name="evaluationMode" ordered="false" lowerBound="1" eType="_AFLGEbrMEduIK4Jr7J21bA" defaultValueLiteral="batch"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLGKbrMEduIK4Jr7J21bA" name="severity" ordered="false" lowerBound="1" eType="_AFLGFbrMEduIK4Jr7J21bA" defaultValueLiteral="error"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGKrrMEduIK4Jr7J21bA" name="MetaConstraint" eSuperTypes="_AFLGJrrMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGK7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGbrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLGLLrMEduIK4Jr7J21bA" name="message" ordered="false">
<eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGLbrMEduIK4Jr7J21bA" name="base_Constraint" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
</eStructuralFeatures>
</eClassifiers>
</contents>
<contents xmi:type="ecore:EPackage" xmi:id="_AFLGLrrMEduIK4Jr7J21bA" name="Default_0" nsURI="http:///Default_0.profile.uml2" nsPrefix="Default_0">
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGL7rMEduIK4Jr7J21bA" name="Default__Documentation">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGMLrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGWrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGMbrMEduIK4Jr7J21bA" name="base_Comment">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGMrrMEduIK4Jr7J21bA" name="Default__MetaConstraint" eSuperTypes="_AFLGNrrMEduIK4Jr7J21bA">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGM7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGbrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGNLrMEduIK4Jr7J21bA" name="base_Constraint">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
</eStructuralFeatures>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLGNbrMEduIK4Jr7J21bA" name="message" defaultValueLiteral="">
<eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGNrrMEduIK4Jr7J21bA" name="Default__AbstractMetaConstraint" abstract="true">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGN7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGabrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLGOLrMEduIK4Jr7J21bA" name="evaluationMode" lowerBound="1" eType="_AFLGOrrMEduIK4Jr7J21bA" defaultValueLiteral="batch"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AFLGObrMEduIK4Jr7J21bA" name="severity" lowerBound="1" eType="_AFLGPrrMEduIK4Jr7J21bA" defaultValueLiteral="error"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLGOrrMEduIK4Jr7J21bA" name="Default__ConstraintEvaluationMode">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGO7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGTrrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGPLrMEduIK4Jr7J21bA" name="batch"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGPbrMEduIK4Jr7J21bA" name="live" value="1"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EEnum" xmi:id="_AFLGPrrMEduIK4Jr7J21bA" name="Default__ConstraintSeverity">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGP7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGUbrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGQLrMEduIK4Jr7J21bA" name="error"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGQbrMEduIK4Jr7J21bA" name="warning" value="1"/>
<eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AFLGQrrMEduIK4Jr7J21bA" name="info" value="2"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGQ7rMEduIK4Jr7J21bA" name="Default__Shortcut">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGRLrMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGX7rMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGRbrMEduIK4Jr7J21bA" name="base_Comment">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_AFLGRrrMEduIK4Jr7J21bA" name="Default__Perspective">
<xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AFLGR7rMEduIK4Jr7J21bA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_AFLGZLrMEduIK4Jr7J21bA"/>
</xmi:Extension>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AFLGSLrMEduIK4Jr7J21bA" name="base_Package">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/2.0.0/UML#//Package"/>
</eStructuralFeatures>
</
Re: Problems with type conformance and redefinition consistency [message #470378 is a reply to message #470377] Tue, 13 February 2007 00:22 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Nicolas,

The concept of redefinition in UML is meaningful only in the context of
generalization. By default, a redefinable element is not consistent with
another redefinable element; only in cases where the specification has
defined specific overrides of the isConsistentWith(RedefinableElement) will
it return a result other than 'false'. The metaclasses for which this has
been done include Operation, Property, RedefinableTemplateSignature, Region,
State, StateMachine, and Transition.

Specific answers to your questions are in-line, below.

Kenn

"Nicolas Rouquette" <nicolas.rouquette@jpl.nasa.gov> wrote in message
news:eqqjjs$flc$1@utils.eclipse.org...
> RedefinableElement defines the following semantic variation point
> (7.3.46 in ptc/06-04-02, p. 134):
>
>> There are various degrees of compatibility between the redefined element
>> and the redefining element, such as name
>> compatibility (the redefining element has the same name as the redefined
>> element), structural compatibility (the client
>> visible properties of the redefined element are also properties of the
>> redefining element), or behavioral compatibility (the
>> redefining element is substitutable for the redefined element). Any kind
>> of compatibility involves a constraint on
>> redefinitions. The particular constraint chosen is a semantic variation
>> point.
>
> I created a simple model with several tests of conformance/redefinition
> to gain a practical understanding of 3 operations:
>
> RedefinableElement.isConsistentWith()
> RedefinableElement.isRedefinitionContextValid()
> Type.conformsTo()
>
> I tried several UML tools and finally settled on
> RSA7 because it provides an easier interface to
> work with the Eclipse UML2 implementation (2.0.2.v200610251409)
> I've attached the RSA model.
>
> The UML2 XMI files are self-contained and seems to be standard compliant
> but your actual interoperability mileage may vary.
>
> I have several questions about this small example:
>
> 1) What does it take to redefine a "DataType"?
> My attempt failed:
>
> Redefining element '<Data Type> DataType2' is not consistent with
> redefined element '<Data Type> DataType1'.
>

Typically it doesn't make sense for a classifier (data type) to redefine
another classifier (data type) that it specializes, since a redefinition is
effectively a replacement... By definition (i.e. for the lack of an override
in the specification as described above), a data type is not consistent with
another data type.

> 2) What does it take to redefine a simple "Class"?
> A simple attempt fails but others succeed.

Likewise for classes. It is possible, however, to redefine features of a
data type or class (i.e. operations, properties).

> What are the minimal requirements for redefining a "Class"?
>
> - Redefining element '<Class> Type2' is not consistent with redefined
> element '<Class> Type1'.
>
> 3) What does it take to redefine an operation in a Class?
> My attempts failed:
>
> - Redefining element '<Class> Class1a' is not consistent with redefined
> element '<Class> Class1'.
> - Redefining element '<Class> Class1b' is not consistent with redefined
> element '<Class> Class1'.

The classes aren't consistent for the reasons above, but the redefinitions
between the operations are valid (and the operations are consistent).

>
> 4) What does it take to redefine a property whose type is a DataType?
> Again, no success here:
>
> - Redefining element '<Class> Class2a' is not consistent with redefined
> element '<Class> Class2'.
> - Redefining element '<Class> Class2b' is not consistent with redefined
> element '<Class> Class2'.
>

The classes aren't consistent for the reasons above, but the redefinitions
between the properties are valid (and the properties are consistent).

> 5) Class3a / Class3 is a valid redefinition even though it involves
> redefining a property (x3a/x3) whose type (Type2) is itself an invalid
> redefinition of another type (Type1). Why does this work?

Validation doesn't fail because there is no redefinition between the classes
(hence consistency isn't being checked). The properties are involved in a
valid redefinition and are consistent.

> What do I need to do to make this type of situation fail redefinition
> consistency?

You don't need to...

>
> 6) Class4a / Class4 is also a valid redefinition like (5) but this time,
> the type redefinition is contravariant (Type1 / Type2). Class4a/Class4
> is deemed a valid redefinition but what do I need to do to make
> contravariance invalid for property type redefinitions?
>

This redefinition is invalid, and the properties are not consistent; running
validation confirms this (Redefining element '<Property> x4b : Type1' is not
consistent with redefined element '<Property> x4 : Type2'.)

> -- Nicolas.
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Profile xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
> xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1
> http://www.eclipse.org/uml2/2.0.0/UML"
> xmi:id="_AFLCjLrMEduIK4Jr7J21bA"
> name="ProfileBase"
> metamodelReference="_AFLCvrrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCjbrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <contents xmi:type="ecore:EPackage" xmi:id="_AFLCjrrMEduIK4Jr7J21bA"
> name="ProfileBase" nsURI="http:///schemas/ProfileBase/1"
> nsPrefix="ProfileBase">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCj7rMEduIK4Jr7J21bA" name="ProfileConstraint"
> eSuperTypes="_AFLCk7rMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCkLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLCwrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCkbrMEduIK4Jr7J21bA" name="messageKey" ordered="false">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLCkrrMEduIK4Jr7J21bA" name="base_Constraint" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCk7rMEduIK4Jr7J21bA" name="Default_AbstractMetaConstraint"
> abstract="true">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLClLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Stereotype"
> href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLClbrMEduIK4Jr7J21bA" name="evaluationMode" ordered="false"
> lowerBound="1" eType="_AFLCl7rMEduIK4Jr7J21bA"
> defaultValueLiteral="batch"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLClrrMEduIK4Jr7J21bA" name="severity" ordered="false"
> lowerBound="1" eType="_AFLCm7rMEduIK4Jr7J21bA"
> defaultValueLiteral="error"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCl7rMEduIK4Jr7J21bA" name="Default_ConstraintEvaluationMode">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCmLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Enumeration"
> href="Default.profile.xmi#_AFLGTrrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCmbrMEduIK4Jr7J21bA" name="batch"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCmrrMEduIK4Jr7J21bA" name="live" value="1"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCm7rMEduIK4Jr7J21bA" name="Default_ConstraintSeverity">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCnLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Enumeration"
> href="Default.profile.xmi#_AFLGUbrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCnbrMEduIK4Jr7J21bA" name="error"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCnrrMEduIK4Jr7J21bA" name="warning" value="1"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCn7rMEduIK4Jr7J21bA" name="info" value="2"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCoLrMEduIK4Jr7J21bA" name="ImageUsageHint">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCobrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLCyrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCorrMEduIK4Jr7J21bA" name="None"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCo7rMEduIK4Jr7J21bA" name="Icon" value="1"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCpLrMEduIK4Jr7J21bA" name="ShapeImage" value="2"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCpbrMEduIK4Jr7J21bA" name="ExtendedImage">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCprrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLCzrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCp7rMEduIK4Jr7J21bA" name="data" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EByteArray"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCqLrMEduIK4Jr7J21bA" name="usageHint" ordered="false"
> lowerBound="1" eType="_AFLCoLrMEduIK4Jr7J21bA"
> defaultValueLiteral="None"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCqbrMEduIK4Jr7J21bA" name="hint" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCqrrMEduIK4Jr7J21bA" name="imageName" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLCq7rMEduIK4Jr7J21bA" name="base_Image" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Image"/>
> </eStructuralFeatures>
> </eClassifiers>
> </contents>
> <contents xmi:type="ecore:EPackage" xmi:id="_AFLCrLrMEduIK4Jr7J21bA"
> name="ProfileBase_0" nsURI="http:///ProfileBase_0.profile.uml2"
> nsPrefix="ProfileBase_0">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCrbrMEduIK4Jr7J21bA" name="ProfileBase__ProfileConstraint"
> eSuperTypes="_AFLCsbrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCrrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLCwrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLCr7rMEduIK4Jr7J21bA" name="base_Constraint">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCsLrMEduIK4Jr7J21bA" name="messageKey" defaultValueLiteral="">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCsbrMEduIK4Jr7J21bA" name="Default__AbstractMetaConstraint"
> abstract="true">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCsrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Stereotype"
> href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCs7rMEduIK4Jr7J21bA" name="evaluationMode" lowerBound="1"
> eType="_AFLCtbrMEduIK4Jr7J21bA" defaultValueLiteral="batch"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCtLrMEduIK4Jr7J21bA" name="severity" lowerBound="1"
> eType="_AFLCubrMEduIK4Jr7J21bA" defaultValueLiteral="error"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCtbrMEduIK4Jr7J21bA" name="Default__ConstraintEvaluationMode">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCtrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Enumeration"
> href="Default.profile.xmi#_AFLGTrrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCt7rMEduIK4Jr7J21bA" name="batch"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCuLrMEduIK4Jr7J21bA" name="live" value="1"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCubrMEduIK4Jr7J21bA" name="Default__ConstraintSeverity">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCurrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Enumeration"
> href="Default.profile.xmi#_AFLGUbrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCu7rMEduIK4Jr7J21bA" name="error"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCvLrMEduIK4Jr7J21bA" name="warning" value="1"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCvbrMEduIK4Jr7J21bA" name="info" value="2"/>
> </eClassifiers>
> </contents>
> </eAnnotations>
> </xmi:Extension>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLCvrrMEduIK4Jr7J21bA" visibility="private">
> <importedPackage xmi:type="uml:Model"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
> </packageImport>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLCv7rMEduIK4Jr7J21bA" visibility="private">
> <importedPackage xmi:type="uml:Model"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
> </packageImport>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLCwLrMEduIK4Jr7J21bA" visibility="private">
> <importedPackage xmi:type="uml:Profile"
> href="Default.profile.xmi#_AFLGDrrMEduIK4Jr7J21bA"/>
> </packageImport>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLCwbrMEduIK4Jr7J21bA" visibility="private">
> <importedPackage xmi:type="uml:Model"
> href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#_0"/>
> </packageImport>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_AFLCwrrMEduIK4Jr7J21bA" name="ProfileConstraint">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLCw7rMEduIK4Jr7J21bA">
> <general xmi:type="uml:Stereotype"
> href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
> </generalization>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLCxLrMEduIK4Jr7J21bA" name="messageKey">
> <type xmi:type="uml:PrimitiveType"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_AFLCxbrMEduIK4Jr7J21bA"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLCxrrMEduIK4Jr7J21bA" name="base_Constraint"
> association="_AFLCx7rMEduIK4Jr7J21bA">
> <type xmi:type="uml:Class"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#Constraint"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_AFLCx7rMEduIK4Jr7J21bA" name="Constraint_ProfileConstraint"
> memberEnd="_AFLCyLrMEduIK4Jr7J21bA _AFLCxrrMEduIK4Jr7J21bA">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_AFLCyLrMEduIK4Jr7J21bA"
> name="extension_ProfileConstraint" type="_AFLCwrrMEduIK4Jr7J21bA"
> aggregation="composite" association="_AFLCx7rMEduIK4Jr7J21bA">
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_AFLCybrMEduIK4Jr7J21bA" value="1"/>
> </ownedEnd>
> </packagedElement>
> <packagedElement xmi:type="uml:Enumeration"
> xmi:id="_AFLCyrrMEduIK4Jr7J21bA" name="ImageUsageHint">
> <ownedLiteral xmi:type="uml:EnumerationLiteral"
> xmi:id="_AFLCy7rMEduIK4Jr7J21bA" name="None"/>
> <ownedLiteral xmi:type="uml:EnumerationLiteral"
> xmi:id="_AFLCzLrMEduIK4Jr7J21bA" name="Icon"/>
> <ownedLiteral xmi:type="uml:EnumerationLiteral"
> xmi:id="_AFLCzbrMEduIK4Jr7J21bA" name="ShapeImage"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_AFLCzrrMEduIK4Jr7J21bA" name="ExtendedImage">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLCz7rMEduIK4Jr7J21bA" name="data">
> <type xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EByt eArray"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLC0LrMEduIK4Jr7J21bA" name="usageHint"
> type="_AFLCyrrMEduIK4Jr7J21bA">
> <defaultValue xmi:type="uml:InstanceValue"
> xmi:id="_AFLC0brMEduIK4Jr7J21bA" instance="_AFLCy7rMEduIK4Jr7J21bA"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLC0rrMEduIK4Jr7J21bA" name="hint">
> <type xmi:type="uml:PrimitiveType"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLC07rMEduIK4Jr7J21bA" name="imageName">
> <type xmi:type="uml:PrimitiveType"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLC1LrMEduIK4Jr7J21bA" name="base_Image"
> association="_AFLC1brMEduIK4Jr7J21bA">
> <type xmi:type="uml:Class"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#Image"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_AFLC1brMEduIK4Jr7J21bA" name="Image_ExtendedImage"
> memberEnd="_AFLC1rrMEduIK4Jr7J21bA _AFLC1LrMEduIK4Jr7J21bA">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_AFLC1rrMEduIK4Jr7J21bA"
> name="extension_ExtendedImage" type="_AFLCzrrMEduIK4Jr7J21bA"
> aggregation="composite" association="_AFLC1brMEduIK4Jr7J21bA">
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_AFLC17rMEduIK4Jr7J21bA" value="1"/>
> </ownedEnd>
> </packagedElement>
> </uml:Profile>
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Model xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
> xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1
> http://www.eclipse.org/uml2/2.0.0/UML"
> xmi:id="_AFLDG7rMEduIK4Jr7J21bA" name="CSCS">
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHLrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDM7rMEduIK4Jr7J21bA">
> <body>Class4b should not be consistent because x4b is not.</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHbrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDLbrMEduIK4Jr7J21bA _AFLDObrMEduIK4Jr7J21bA
> _AFLDO7rMEduIK4Jr7J21bA">
> <body>Class3, Class3a, Class3b are consistent even though Type2 is not
> consistent with Type1!</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHrrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDPrrMEduIK4Jr7J21bA">
> <body>Why is Class2b not consistent with Class2 is a mystery.</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDH7rMEduIK4Jr7J21bA"
> annotatedElement="_AFLDQLrMEduIK4Jr7J21bA">
> <body>Class2a is not consistent with Class2. Is it due to the
> inconsistency between DataType2 &amp; DataType1?</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDILrMEduIK4Jr7J21bA">
> <body>Covariant return type.</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDIbrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDSLrMEduIK4Jr7J21bA">
> <body>Covariant specialization (on argument type)</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDIrrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDQ7rMEduIK4Jr7J21bA">
> <body>Covariant specialization (on return type)</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDI7rMEduIK4Jr7J21bA"
> annotatedElement="_AFLDMrrMEduIK4Jr7J21bA _AFLDUrrMEduIK4Jr7J21bA">
> <body>isSubstitutable = true</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDJLrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDVLrMEduIK4Jr7J21bA">
> <body>redefines Type1; isSubstitutable = true; why is Type2 not
> consistent with Type1?</body>
> </ownedComment>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLDJbrMEduIK4Jr7J21bA">
> <importedPackage xmi:type="uml:Model"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
> </packageImport>
> <packagedElement xmi:type="uml:Class" xmi:id="_AFLDJrrMEduIK4Jr7J21bA"
> name="GeneralContext">
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDJ7rMEduIK4Jr7J21bA"
> name="Class1">
> <ownedOperation xmi:type="uml:Operation"
> xmi:id="_AFLDKLrMEduIK4Jr7J21bA" name="Op1">
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDKbrMEduIK4Jr7J21bA" name="result"
> type="_AFLDULrMEduIK4Jr7J21bA" direction="return"/>
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDKrrMEduIK4Jr7J21bA" name="arg1"
> type="_AFLDULrMEduIK4Jr7J21bA"/>
> </ownedOperation>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDK7rMEduIK4Jr7J21bA"
> name="Class2">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDLLrMEduIK4Jr7J21bA" name="x2" visibility="private"
> type="_AFLDTrrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDLbrMEduIK4Jr7J21bA"
> name="Class3">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDLrrMEduIK4Jr7J21bA" name="x3" visibility="private"
> type="_AFLDULrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDL7rMEduIK4Jr7J21bA"
> name="Class4">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDMLrMEduIK4Jr7J21bA" name="x4" visibility="private"
> type="_AFLDU7rMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_AFLDMbrMEduIK4Jr7J21bA"
> name="SpecializedContext">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDMrrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDJrrMEduIK4Jr7J21bA"/>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDM7rMEduIK4Jr7J21bA"
> name="Class4b">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDNLrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDL7rMEduIK4Jr7J21bA"/>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDNbrMEduIK4Jr7J21bA" name="x4b" visibility="private"
> type="_AFLDULrMEduIK4Jr7J21bA"
> redefinedProperty="_AFLDMLrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDNrrMEduIK4Jr7J21bA"
> name="Class4a">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDN7rMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDL7rMEduIK4Jr7J21bA"/>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDOLrMEduIK4Jr7J21bA" name="x4a" visibility="private"
> type="_AFLDU7rMEduIK4Jr7J21bA"
> redefinedProperty="_AFLDMLrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDObrMEduIK4Jr7J21bA"
> name="Class3b">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDOrrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDLbrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDO7rMEduIK4Jr7J21bA"
> name="Class3a">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDPLrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDLbrMEduIK4Jr7J21bA"/>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDPbrMEduIK4Jr7J21bA" name="x3a" visibility="private"
> type="_AFLDU7rMEduIK4Jr7J21bA"
> redefinedProperty="_AFLDLrrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDPrrMEduIK4Jr7J21bA"
> name="Class2b" redefinedClassifier="_AFLDK7rMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDP7rMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDK7rMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDQLrMEduIK4Jr7J21bA"
> name="Class2a" redefinedClassifier="_AFLDK7rMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDQbrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDK7rMEduIK4Jr7J21bA"/>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDQrrMEduIK4Jr7J21bA" name="x2a" visibility="private"
> type="_AFLDVbrMEduIK4Jr7J21bA"
> redefinedProperty="_AFLDLLrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDQ7rMEduIK4Jr7J21bA"
> name="Class1b" redefinedClassifier="_AFLDJ7rMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDRLrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDJ7rMEduIK4Jr7J21bA"/>
> <ownedOperation xmi:type="uml:Operation"
> xmi:id="_AFLDRbrMEduIK4Jr7J21bA" name="Op1b"
> redefinedOperation="_AFLDKLrMEduIK4Jr7J21bA">
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDRrrMEduIK4Jr7J21bA" name="arg1b"
> type="_AFLDULrMEduIK4Jr7J21bA"/>
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDR7rMEduIK4Jr7J21bA" name="result1b"
> type="_AFLDU7rMEduIK4Jr7J21bA" direction="return"/>
> </ownedOperation>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDSLrMEduIK4Jr7J21bA"
> name="Class1a" redefinedClassifier="_AFLDJ7rMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDSbrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDJ7rMEduIK4Jr7J21bA"/>
> <ownedOperation xmi:type="uml:Operation"
> xmi:id="_AFLDSrrMEduIK4Jr7J21bA" name="Op1a"
> redefinedOperation="_AFLDKLrMEduIK4Jr7J21bA">
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDS7rMEduIK4Jr7J21bA" name="result"
> type="_AFLDULrMEduIK4Jr7J21bA" direction="return"/>
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDTLrMEduIK4Jr7J21bA" name="arg1a"
> type="_AFLDU7rMEduIK4Jr7J21bA"/>
> </ownedOperation>
> </nestedClassifier>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_AFLDTbrMEduIK4Jr7J21bA"
> name="TypeContext1">
> <nestedClassifier xmi:type="uml:DataType"
> xmi:id="_AFLDTrrMEduIK4Jr7J21bA" name="DataType1">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDT7rMEduIK4Jr7J21bA" name="attribute1" visibility="private"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDULrMEduIK4Jr7J21bA"
> name="Type1"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_AFLDUbrMEduIK4Jr7J21bA"
> name="TypeContext2">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDUrrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDTbrMEduIK4Jr7J21bA"/>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDU7rMEduIK4Jr7J21bA"
> name="Type2" redefinedClassifier="_AFLDULrMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDVLrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDULrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:DataType"
> xmi:id="_AFLDVbrMEduIK4Jr7J21bA" name="DataType2"
> redefinedClassifier="_AFLDTrrMEduIK4Jr7J21bA">
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDVrrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDV7rMEduIK4Jr7J21bA">
> <body>redefines DataType1, isSubstitutable = true; why is DataType2
> not consistent with DataType1?</body>
> </ownedComment>
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDV7rMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDTrrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> </packagedElement>
> <profileApplication xmi:type="uml:ProfileApplication"
> xmi:id="_AFLDWLrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLDWbrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href=" http://schema.omg.org/spec/UML/2.1.1/StandardProfileL2.xmi#_ yzU58YinEdqtvbnfB2L_5w"/>
> </eAnnotations>
> </xmi:Extension>
> <appliedProfile xmi:type="uml:Profile"
> href=" http://schema.omg.org/spec/UML/2.1.1/StandardProfileL2.xmi#_ 0"/>
> </profileApplication>
> <profileApplication xmi:type="uml:ProfileApplication"
> xmi:id="_AFLDWrrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLDW7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="Default.profile.xmi#_AFLGELrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <appliedProfile xmi:type="uml:Profile"
> href="Default.profile.xmi#_AFLGDrrMEduIK4Jr7J21bA"/>
> </profileApplication>
> <profileApplication xmi:type="uml:ProfileApplication"
> xmi:id="_AFLDXLrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLDXbrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="Deployment.profile.xmi#_AFLEhLrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <appliedProfile xmi:type="uml:Profile"
> href="Deployment.profile.xmi#_AFLEgrrMEduIK4Jr7J21bA"/>
> </profileApplication>
> </uml:Model>
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Profile xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
> xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1
> http://www.eclipse.org/uml2/2.0.0/UML"
> xmi:id="_AFLGDrrMEduIK4Jr7J21bA" name="Default"
> metamodelReference="_AFLGTLrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGD7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <contents xmi:type="ecore:EPackage" xmi:id="_AFLGELrMEduIK4Jr7J21bA"
> name="Default" nsURI="http:///schemas/Default/1" nsPrefix="Default">
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLGEbrMEduIK4Jr7J21bA" name="ConstraintEvaluationMode">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGErrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGTrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGE7rMEduIK4Jr7J21bA" name="batch"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGFLrMEduIK4Jr7J21bA" name="live" value="1"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLGFbrMEduIK4Jr7J21bA" name="ConstraintSeverity">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGFrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGUbrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGF7rMEduIK4Jr7J21bA" name="error"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGGLrMEduIK4Jr7J21bA" name="warning" value="1"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGGbrMEduIK4Jr7J21bA" name="info" value="2"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGGrrMEduIK4Jr7J21bA" name="URL">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGG7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGVbrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGHLrMEduIK4Jr7J21bA" name="base_Comment" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGHbrMEduIK4Jr7J21bA" name="Documentation">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGHrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGWrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGH7rMEduIK4Jr7J21bA" name="base_Comment" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGILrMEduIK4Jr7J21bA" name="Shortcut">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGIbrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGX7rMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGIrrMEduIK4Jr7J21bA" name="base_Comment" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGI7rMEduIK4Jr7J21bA" name="Perspective">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGJLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGZLrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGJbrMEduIK4Jr7J21bA" name="base_Package" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Package"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGJrrMEduIK4Jr7J21bA" name="AbstractMetaConstraint"
> abstract="true">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGJ7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGabrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLGKLrMEduIK4Jr7J21bA" name="evaluationMode" ordered="false"
> lowerBound="1" eType="_AFLGEbrMEduIK4Jr7J21bA"
> defaultValueLiteral="batch"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLGKbrMEduIK4Jr7J21bA" name="severity" ordered="false"
> lowerBound="1" eType="_AFLGFbrMEduIK4Jr7J21bA"
> defaultValueLiteral="error"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGKrrMEduIK4Jr7J21bA" name="MetaConstraint"
> eSuperTypes="_AFLGJrrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGK7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGbrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLGLLrMEduIK4Jr7J21bA" name="message" ordered="false">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGLbrMEduIK4Jr7J21bA" name="base_Constraint" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
> </eStructuralFeatures>
> </eClassifiers>
> </contents>
> <contents xmi:type="ecore:EPackage" xmi:id="_AFLGLrrMEduIK4Jr7J21bA"
> name="Default_0" nsURI="http:///Default_0.profile.uml2"
> nsPrefix="Default_0">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGL7rMEduIK4Jr7J21bA" name="Default__Documentation">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
>
Re: Problems with type conformance and redefinition consistency [message #470380 is a reply to message #470378] Tue, 13 February 2007 01:23 Go to previous message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
Kenn,

Thanks for the answers/clarifications!

-- Nicolas.


Kenn Hussey wrote:
> Nicolas,
>
> The concept of redefinition in UML is meaningful only in the context of
> generalization. By default, a redefinable element is not consistent with
> another redefinable element; only in cases where the specification has
> defined specific overrides of the isConsistentWith(RedefinableElement) will
> it return a result other than 'false'. The metaclasses for which this has
> been done include Operation, Property, RedefinableTemplateSignature, Region,
> State, StateMachine, and Transition.
>
> Specific answers to your questions are in-line, below.
>
> Kenn
>
> "Nicolas Rouquette" <nicolas.rouquette@jpl.nasa.gov> wrote in message
> news:eqqjjs$flc$1@utils.eclipse.org...
>> RedefinableElement defines the following semantic variation point
>> (7.3.46 in ptc/06-04-02, p. 134):
>>
>>> There are various degrees of compatibility between the redefined element
>>> and the redefining element, such as name
>>> compatibility (the redefining element has the same name as the redefined
>>> element), structural compatibility (the client
>>> visible properties of the redefined element are also properties of the
>>> redefining element), or behavioral compatibility (the
>>> redefining element is substitutable for the redefined element). Any kind
>>> of compatibility involves a constraint on
>>> redefinitions. The particular constraint chosen is a semantic variation
>>> point.
>> I created a simple model with several tests of conformance/redefinition
>> to gain a practical understanding of 3 operations:
>>
>> RedefinableElement.isConsistentWith()
>> RedefinableElement.isRedefinitionContextValid()
>> Type.conformsTo()
>>
>> I tried several UML tools and finally settled on
>> RSA7 because it provides an easier interface to
>> work with the Eclipse UML2 implementation (2.0.2.v200610251409)
>> I've attached the RSA model.
>>
>> The UML2 XMI files are self-contained and seems to be standard compliant
>> but your actual interoperability mileage may vary.
>>
>> I have several questions about this small example:
>>
>> 1) What does it take to redefine a "DataType"?
>> My attempt failed:
>>
>> Redefining element '<Data Type> DataType2' is not consistent with
>> redefined element '<Data Type> DataType1'.
>>
>
> Typically it doesn't make sense for a classifier (data type) to redefine
> another classifier (data type) that it specializes, since a redefinition is
> effectively a replacement... By definition (i.e. for the lack of an override
> in the specification as described above), a data type is not consistent with
> another data type.
>
>> 2) What does it take to redefine a simple "Class"?
>> A simple attempt fails but others succeed.
>
> Likewise for classes. It is possible, however, to redefine features of a
> data type or class (i.e. operations, properties).
>
>> What are the minimal requirements for redefining a "Class"?
>>
>> - Redefining element '<Class> Type2' is not consistent with redefined
>> element '<Class> Type1'.
>>
>> 3) What does it take to redefine an operation in a Class?
>> My attempts failed:
>>
>> - Redefining element '<Class> Class1a' is not consistent with redefined
>> element '<Class> Class1'.
>> - Redefining element '<Class> Class1b' is not consistent with redefined
>> element '<Class> Class1'.
>
> The classes aren't consistent for the reasons above, but the redefinitions
> between the operations are valid (and the operations are consistent).
>
>> 4) What does it take to redefine a property whose type is a DataType?
>> Again, no success here:
>>
>> - Redefining element '<Class> Class2a' is not consistent with redefined
>> element '<Class> Class2'.
>> - Redefining element '<Class> Class2b' is not consistent with redefined
>> element '<Class> Class2'.
>>
>
> The classes aren't consistent for the reasons above, but the redefinitions
> between the properties are valid (and the properties are consistent).
>
>> 5) Class3a / Class3 is a valid redefinition even though it involves
>> redefining a property (x3a/x3) whose type (Type2) is itself an invalid
>> redefinition of another type (Type1). Why does this work?
>
> Validation doesn't fail because there is no redefinition between the classes
> (hence consistency isn't being checked). The properties are involved in a
> valid redefinition and are consistent.
>
>> What do I need to do to make this type of situation fail redefinition
>> consistency?
>
> You don't need to...
>
>> 6) Class4a / Class4 is also a valid redefinition like (5) but this time,
>> the type redefinition is contravariant (Type1 / Type2). Class4a/Class4
>> is deemed a valid redefinition but what do I need to do to make
>> contravariance invalid for property type redefinitions?
>>
>
> This redefinition is invalid, and the properties are not consistent; running
> validation confirms this (Redefining element '<Property> x4b : Type1' is not
> consistent with redefined element '<Property> x4 : Type2'.)
>
>> -- Nicolas.
>>
Re: Problems with type conformance and redefinition consistency [message #586973 is a reply to message #470377] Tue, 13 February 2007 00:22 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Nicolas,

The concept of redefinition in UML is meaningful only in the context of
generalization. By default, a redefinable element is not consistent with
another redefinable element; only in cases where the specification has
defined specific overrides of the isConsistentWith(RedefinableElement) will
it return a result other than 'false'. The metaclasses for which this has
been done include Operation, Property, RedefinableTemplateSignature, Region,
State, StateMachine, and Transition.

Specific answers to your questions are in-line, below.

Kenn

"Nicolas Rouquette" <nicolas.rouquette@jpl.nasa.gov> wrote in message
news:eqqjjs$flc$1@utils.eclipse.org...
> RedefinableElement defines the following semantic variation point
> (7.3.46 in ptc/06-04-02, p. 134):
>
>> There are various degrees of compatibility between the redefined element
>> and the redefining element, such as name
>> compatibility (the redefining element has the same name as the redefined
>> element), structural compatibility (the client
>> visible properties of the redefined element are also properties of the
>> redefining element), or behavioral compatibility (the
>> redefining element is substitutable for the redefined element). Any kind
>> of compatibility involves a constraint on
>> redefinitions. The particular constraint chosen is a semantic variation
>> point.
>
> I created a simple model with several tests of conformance/redefinition
> to gain a practical understanding of 3 operations:
>
> RedefinableElement.isConsistentWith()
> RedefinableElement.isRedefinitionContextValid()
> Type.conformsTo()
>
> I tried several UML tools and finally settled on
> RSA7 because it provides an easier interface to
> work with the Eclipse UML2 implementation (2.0.2.v200610251409)
> I've attached the RSA model.
>
> The UML2 XMI files are self-contained and seems to be standard compliant
> but your actual interoperability mileage may vary.
>
> I have several questions about this small example:
>
> 1) What does it take to redefine a "DataType"?
> My attempt failed:
>
> Redefining element '<Data Type> DataType2' is not consistent with
> redefined element '<Data Type> DataType1'.
>

Typically it doesn't make sense for a classifier (data type) to redefine
another classifier (data type) that it specializes, since a redefinition is
effectively a replacement... By definition (i.e. for the lack of an override
in the specification as described above), a data type is not consistent with
another data type.

> 2) What does it take to redefine a simple "Class"?
> A simple attempt fails but others succeed.

Likewise for classes. It is possible, however, to redefine features of a
data type or class (i.e. operations, properties).

> What are the minimal requirements for redefining a "Class"?
>
> - Redefining element '<Class> Type2' is not consistent with redefined
> element '<Class> Type1'.
>
> 3) What does it take to redefine an operation in a Class?
> My attempts failed:
>
> - Redefining element '<Class> Class1a' is not consistent with redefined
> element '<Class> Class1'.
> - Redefining element '<Class> Class1b' is not consistent with redefined
> element '<Class> Class1'.

The classes aren't consistent for the reasons above, but the redefinitions
between the operations are valid (and the operations are consistent).

>
> 4) What does it take to redefine a property whose type is a DataType?
> Again, no success here:
>
> - Redefining element '<Class> Class2a' is not consistent with redefined
> element '<Class> Class2'.
> - Redefining element '<Class> Class2b' is not consistent with redefined
> element '<Class> Class2'.
>

The classes aren't consistent for the reasons above, but the redefinitions
between the properties are valid (and the properties are consistent).

> 5) Class3a / Class3 is a valid redefinition even though it involves
> redefining a property (x3a/x3) whose type (Type2) is itself an invalid
> redefinition of another type (Type1). Why does this work?

Validation doesn't fail because there is no redefinition between the classes
(hence consistency isn't being checked). The properties are involved in a
valid redefinition and are consistent.

> What do I need to do to make this type of situation fail redefinition
> consistency?

You don't need to...

>
> 6) Class4a / Class4 is also a valid redefinition like (5) but this time,
> the type redefinition is contravariant (Type1 / Type2). Class4a/Class4
> is deemed a valid redefinition but what do I need to do to make
> contravariance invalid for property type redefinitions?
>

This redefinition is invalid, and the properties are not consistent; running
validation confirms this (Redefining element '<Property> x4b : Type1' is not
consistent with redefined element '<Property> x4 : Type2'.)

> -- Nicolas.
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Profile xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
> xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1
> http://www.eclipse.org/uml2/2.0.0/UML"
> xmi:id="_AFLCjLrMEduIK4Jr7J21bA"
> name="ProfileBase"
> metamodelReference="_AFLCvrrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCjbrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <contents xmi:type="ecore:EPackage" xmi:id="_AFLCjrrMEduIK4Jr7J21bA"
> name="ProfileBase" nsURI="http:///schemas/ProfileBase/1"
> nsPrefix="ProfileBase">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCj7rMEduIK4Jr7J21bA" name="ProfileConstraint"
> eSuperTypes="_AFLCk7rMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCkLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLCwrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCkbrMEduIK4Jr7J21bA" name="messageKey" ordered="false">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLCkrrMEduIK4Jr7J21bA" name="base_Constraint" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCk7rMEduIK4Jr7J21bA" name="Default_AbstractMetaConstraint"
> abstract="true">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLClLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Stereotype"
> href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLClbrMEduIK4Jr7J21bA" name="evaluationMode" ordered="false"
> lowerBound="1" eType="_AFLCl7rMEduIK4Jr7J21bA"
> defaultValueLiteral="batch"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLClrrMEduIK4Jr7J21bA" name="severity" ordered="false"
> lowerBound="1" eType="_AFLCm7rMEduIK4Jr7J21bA"
> defaultValueLiteral="error"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCl7rMEduIK4Jr7J21bA" name="Default_ConstraintEvaluationMode">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCmLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Enumeration"
> href="Default.profile.xmi#_AFLGTrrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCmbrMEduIK4Jr7J21bA" name="batch"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCmrrMEduIK4Jr7J21bA" name="live" value="1"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCm7rMEduIK4Jr7J21bA" name="Default_ConstraintSeverity">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCnLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Enumeration"
> href="Default.profile.xmi#_AFLGUbrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCnbrMEduIK4Jr7J21bA" name="error"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCnrrMEduIK4Jr7J21bA" name="warning" value="1"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCn7rMEduIK4Jr7J21bA" name="info" value="2"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCoLrMEduIK4Jr7J21bA" name="ImageUsageHint">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCobrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLCyrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCorrMEduIK4Jr7J21bA" name="None"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCo7rMEduIK4Jr7J21bA" name="Icon" value="1"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCpLrMEduIK4Jr7J21bA" name="ShapeImage" value="2"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCpbrMEduIK4Jr7J21bA" name="ExtendedImage">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCprrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLCzrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCp7rMEduIK4Jr7J21bA" name="data" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EByteArray"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCqLrMEduIK4Jr7J21bA" name="usageHint" ordered="false"
> lowerBound="1" eType="_AFLCoLrMEduIK4Jr7J21bA"
> defaultValueLiteral="None"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCqbrMEduIK4Jr7J21bA" name="hint" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCqrrMEduIK4Jr7J21bA" name="imageName" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLCq7rMEduIK4Jr7J21bA" name="base_Image" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Image"/>
> </eStructuralFeatures>
> </eClassifiers>
> </contents>
> <contents xmi:type="ecore:EPackage" xmi:id="_AFLCrLrMEduIK4Jr7J21bA"
> name="ProfileBase_0" nsURI="http:///ProfileBase_0.profile.uml2"
> nsPrefix="ProfileBase_0">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCrbrMEduIK4Jr7J21bA" name="ProfileBase__ProfileConstraint"
> eSuperTypes="_AFLCsbrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCrrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLCwrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLCr7rMEduIK4Jr7J21bA" name="base_Constraint">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCsLrMEduIK4Jr7J21bA" name="messageKey" defaultValueLiteral="">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLCsbrMEduIK4Jr7J21bA" name="Default__AbstractMetaConstraint"
> abstract="true">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCsrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Stereotype"
> href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCs7rMEduIK4Jr7J21bA" name="evaluationMode" lowerBound="1"
> eType="_AFLCtbrMEduIK4Jr7J21bA" defaultValueLiteral="batch"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLCtLrMEduIK4Jr7J21bA" name="severity" lowerBound="1"
> eType="_AFLCubrMEduIK4Jr7J21bA" defaultValueLiteral="error"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCtbrMEduIK4Jr7J21bA" name="Default__ConstraintEvaluationMode">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCtrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Enumeration"
> href="Default.profile.xmi#_AFLGTrrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCt7rMEduIK4Jr7J21bA" name="batch"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCuLrMEduIK4Jr7J21bA" name="live" value="1"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLCubrMEduIK4Jr7J21bA" name="Default__ConstraintSeverity">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLCurrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="uml:Enumeration"
> href="Default.profile.xmi#_AFLGUbrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCu7rMEduIK4Jr7J21bA" name="error"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCvLrMEduIK4Jr7J21bA" name="warning" value="1"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLCvbrMEduIK4Jr7J21bA" name="info" value="2"/>
> </eClassifiers>
> </contents>
> </eAnnotations>
> </xmi:Extension>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLCvrrMEduIK4Jr7J21bA" visibility="private">
> <importedPackage xmi:type="uml:Model"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
> </packageImport>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLCv7rMEduIK4Jr7J21bA" visibility="private">
> <importedPackage xmi:type="uml:Model"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
> </packageImport>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLCwLrMEduIK4Jr7J21bA" visibility="private">
> <importedPackage xmi:type="uml:Profile"
> href="Default.profile.xmi#_AFLGDrrMEduIK4Jr7J21bA"/>
> </packageImport>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLCwbrMEduIK4Jr7J21bA" visibility="private">
> <importedPackage xmi:type="uml:Model"
> href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#_0"/>
> </packageImport>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_AFLCwrrMEduIK4Jr7J21bA" name="ProfileConstraint">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLCw7rMEduIK4Jr7J21bA">
> <general xmi:type="uml:Stereotype"
> href="Default.profile.xmi#_AFLGabrMEduIK4Jr7J21bA"/>
> </generalization>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLCxLrMEduIK4Jr7J21bA" name="messageKey">
> <type xmi:type="uml:PrimitiveType"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_AFLCxbrMEduIK4Jr7J21bA"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLCxrrMEduIK4Jr7J21bA" name="base_Constraint"
> association="_AFLCx7rMEduIK4Jr7J21bA">
> <type xmi:type="uml:Class"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#Constraint"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_AFLCx7rMEduIK4Jr7J21bA" name="Constraint_ProfileConstraint"
> memberEnd="_AFLCyLrMEduIK4Jr7J21bA _AFLCxrrMEduIK4Jr7J21bA">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_AFLCyLrMEduIK4Jr7J21bA"
> name="extension_ProfileConstraint" type="_AFLCwrrMEduIK4Jr7J21bA"
> aggregation="composite" association="_AFLCx7rMEduIK4Jr7J21bA">
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_AFLCybrMEduIK4Jr7J21bA" value="1"/>
> </ownedEnd>
> </packagedElement>
> <packagedElement xmi:type="uml:Enumeration"
> xmi:id="_AFLCyrrMEduIK4Jr7J21bA" name="ImageUsageHint">
> <ownedLiteral xmi:type="uml:EnumerationLiteral"
> xmi:id="_AFLCy7rMEduIK4Jr7J21bA" name="None"/>
> <ownedLiteral xmi:type="uml:EnumerationLiteral"
> xmi:id="_AFLCzLrMEduIK4Jr7J21bA" name="Icon"/>
> <ownedLiteral xmi:type="uml:EnumerationLiteral"
> xmi:id="_AFLCzbrMEduIK4Jr7J21bA" name="ShapeImage"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_AFLCzrrMEduIK4Jr7J21bA" name="ExtendedImage">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLCz7rMEduIK4Jr7J21bA" name="data">
> <type xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EByt eArray"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLC0LrMEduIK4Jr7J21bA" name="usageHint"
> type="_AFLCyrrMEduIK4Jr7J21bA">
> <defaultValue xmi:type="uml:InstanceValue"
> xmi:id="_AFLC0brMEduIK4Jr7J21bA" instance="_AFLCy7rMEduIK4Jr7J21bA"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLC0rrMEduIK4Jr7J21bA" name="hint">
> <type xmi:type="uml:PrimitiveType"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLC07rMEduIK4Jr7J21bA" name="imageName">
> <type xmi:type="uml:PrimitiveType"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#String"/>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLC1LrMEduIK4Jr7J21bA" name="base_Image"
> association="_AFLC1brMEduIK4Jr7J21bA">
> <type xmi:type="uml:Class"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#Image"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_AFLC1brMEduIK4Jr7J21bA" name="Image_ExtendedImage"
> memberEnd="_AFLC1rrMEduIK4Jr7J21bA _AFLC1LrMEduIK4Jr7J21bA">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_AFLC1rrMEduIK4Jr7J21bA"
> name="extension_ExtendedImage" type="_AFLCzrrMEduIK4Jr7J21bA"
> aggregation="composite" association="_AFLC1brMEduIK4Jr7J21bA">
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_AFLC17rMEduIK4Jr7J21bA" value="1"/>
> </ownedEnd>
> </packagedElement>
> </uml:Profile>
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Model xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
> xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1
> http://www.eclipse.org/uml2/2.0.0/UML"
> xmi:id="_AFLDG7rMEduIK4Jr7J21bA" name="CSCS">
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHLrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDM7rMEduIK4Jr7J21bA">
> <body>Class4b should not be consistent because x4b is not.</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHbrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDLbrMEduIK4Jr7J21bA _AFLDObrMEduIK4Jr7J21bA
> _AFLDO7rMEduIK4Jr7J21bA">
> <body>Class3, Class3a, Class3b are consistent even though Type2 is not
> consistent with Type1!</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDHrrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDPrrMEduIK4Jr7J21bA">
> <body>Why is Class2b not consistent with Class2 is a mystery.</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDH7rMEduIK4Jr7J21bA"
> annotatedElement="_AFLDQLrMEduIK4Jr7J21bA">
> <body>Class2a is not consistent with Class2. Is it due to the
> inconsistency between DataType2 &amp; DataType1?</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDILrMEduIK4Jr7J21bA">
> <body>Covariant return type.</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDIbrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDSLrMEduIK4Jr7J21bA">
> <body>Covariant specialization (on argument type)</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDIrrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDQ7rMEduIK4Jr7J21bA">
> <body>Covariant specialization (on return type)</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDI7rMEduIK4Jr7J21bA"
> annotatedElement="_AFLDMrrMEduIK4Jr7J21bA _AFLDUrrMEduIK4Jr7J21bA">
> <body>isSubstitutable = true</body>
> </ownedComment>
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDJLrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDVLrMEduIK4Jr7J21bA">
> <body>redefines Type1; isSubstitutable = true; why is Type2 not
> consistent with Type1?</body>
> </ownedComment>
> <packageImport xmi:type="uml:PackageImport"
> xmi:id="_AFLDJbrMEduIK4Jr7J21bA">
> <importedPackage xmi:type="uml:Model"
> href="http://schema.omg.org/spec/UML/2.1.1/uml.xml#_0"/>
> </packageImport>
> <packagedElement xmi:type="uml:Class" xmi:id="_AFLDJrrMEduIK4Jr7J21bA"
> name="GeneralContext">
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDJ7rMEduIK4Jr7J21bA"
> name="Class1">
> <ownedOperation xmi:type="uml:Operation"
> xmi:id="_AFLDKLrMEduIK4Jr7J21bA" name="Op1">
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDKbrMEduIK4Jr7J21bA" name="result"
> type="_AFLDULrMEduIK4Jr7J21bA" direction="return"/>
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDKrrMEduIK4Jr7J21bA" name="arg1"
> type="_AFLDULrMEduIK4Jr7J21bA"/>
> </ownedOperation>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDK7rMEduIK4Jr7J21bA"
> name="Class2">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDLLrMEduIK4Jr7J21bA" name="x2" visibility="private"
> type="_AFLDTrrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDLbrMEduIK4Jr7J21bA"
> name="Class3">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDLrrMEduIK4Jr7J21bA" name="x3" visibility="private"
> type="_AFLDULrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDL7rMEduIK4Jr7J21bA"
> name="Class4">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDMLrMEduIK4Jr7J21bA" name="x4" visibility="private"
> type="_AFLDU7rMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_AFLDMbrMEduIK4Jr7J21bA"
> name="SpecializedContext">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDMrrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDJrrMEduIK4Jr7J21bA"/>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDM7rMEduIK4Jr7J21bA"
> name="Class4b">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDNLrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDL7rMEduIK4Jr7J21bA"/>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDNbrMEduIK4Jr7J21bA" name="x4b" visibility="private"
> type="_AFLDULrMEduIK4Jr7J21bA"
> redefinedProperty="_AFLDMLrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDNrrMEduIK4Jr7J21bA"
> name="Class4a">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDN7rMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDL7rMEduIK4Jr7J21bA"/>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDOLrMEduIK4Jr7J21bA" name="x4a" visibility="private"
> type="_AFLDU7rMEduIK4Jr7J21bA"
> redefinedProperty="_AFLDMLrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDObrMEduIK4Jr7J21bA"
> name="Class3b">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDOrrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDLbrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDO7rMEduIK4Jr7J21bA"
> name="Class3a">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDPLrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDLbrMEduIK4Jr7J21bA"/>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDPbrMEduIK4Jr7J21bA" name="x3a" visibility="private"
> type="_AFLDU7rMEduIK4Jr7J21bA"
> redefinedProperty="_AFLDLrrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDPrrMEduIK4Jr7J21bA"
> name="Class2b" redefinedClassifier="_AFLDK7rMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDP7rMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDK7rMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDQLrMEduIK4Jr7J21bA"
> name="Class2a" redefinedClassifier="_AFLDK7rMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDQbrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDK7rMEduIK4Jr7J21bA"/>
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDQrrMEduIK4Jr7J21bA" name="x2a" visibility="private"
> type="_AFLDVbrMEduIK4Jr7J21bA"
> redefinedProperty="_AFLDLLrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDQ7rMEduIK4Jr7J21bA"
> name="Class1b" redefinedClassifier="_AFLDJ7rMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDRLrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDJ7rMEduIK4Jr7J21bA"/>
> <ownedOperation xmi:type="uml:Operation"
> xmi:id="_AFLDRbrMEduIK4Jr7J21bA" name="Op1b"
> redefinedOperation="_AFLDKLrMEduIK4Jr7J21bA">
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDRrrMEduIK4Jr7J21bA" name="arg1b"
> type="_AFLDULrMEduIK4Jr7J21bA"/>
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDR7rMEduIK4Jr7J21bA" name="result1b"
> type="_AFLDU7rMEduIK4Jr7J21bA" direction="return"/>
> </ownedOperation>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDSLrMEduIK4Jr7J21bA"
> name="Class1a" redefinedClassifier="_AFLDJ7rMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDSbrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDJ7rMEduIK4Jr7J21bA"/>
> <ownedOperation xmi:type="uml:Operation"
> xmi:id="_AFLDSrrMEduIK4Jr7J21bA" name="Op1a"
> redefinedOperation="_AFLDKLrMEduIK4Jr7J21bA">
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDS7rMEduIK4Jr7J21bA" name="result"
> type="_AFLDULrMEduIK4Jr7J21bA" direction="return"/>
> <ownedParameter xmi:type="uml:Parameter"
> xmi:id="_AFLDTLrMEduIK4Jr7J21bA" name="arg1a"
> type="_AFLDU7rMEduIK4Jr7J21bA"/>
> </ownedOperation>
> </nestedClassifier>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_AFLDTbrMEduIK4Jr7J21bA"
> name="TypeContext1">
> <nestedClassifier xmi:type="uml:DataType"
> xmi:id="_AFLDTrrMEduIK4Jr7J21bA" name="DataType1">
> <ownedAttribute xmi:type="uml:Property"
> xmi:id="_AFLDT7rMEduIK4Jr7J21bA" name="attribute1" visibility="private"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDULrMEduIK4Jr7J21bA"
> name="Type1"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_AFLDUbrMEduIK4Jr7J21bA"
> name="TypeContext2">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDUrrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDTbrMEduIK4Jr7J21bA"/>
> <nestedClassifier xmi:type="uml:Class" xmi:id="_AFLDU7rMEduIK4Jr7J21bA"
> name="Type2" redefinedClassifier="_AFLDULrMEduIK4Jr7J21bA">
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDVLrMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDULrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> <nestedClassifier xmi:type="uml:DataType"
> xmi:id="_AFLDVbrMEduIK4Jr7J21bA" name="DataType2"
> redefinedClassifier="_AFLDTrrMEduIK4Jr7J21bA">
> <ownedComment xmi:type="uml:Comment" xmi:id="_AFLDVrrMEduIK4Jr7J21bA"
> annotatedElement="_AFLDV7rMEduIK4Jr7J21bA">
> <body>redefines DataType1, isSubstitutable = true; why is DataType2
> not consistent with DataType1?</body>
> </ownedComment>
> <generalization xmi:type="uml:Generalization"
> xmi:id="_AFLDV7rMEduIK4Jr7J21bA" isSubstitutable="true"
> general="_AFLDTrrMEduIK4Jr7J21bA"/>
> </nestedClassifier>
> </packagedElement>
> <profileApplication xmi:type="uml:ProfileApplication"
> xmi:id="_AFLDWLrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLDWbrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href=" http://schema.omg.org/spec/UML/2.1.1/StandardProfileL2.xmi#_ yzU58YinEdqtvbnfB2L_5w"/>
> </eAnnotations>
> </xmi:Extension>
> <appliedProfile xmi:type="uml:Profile"
> href=" http://schema.omg.org/spec/UML/2.1.1/StandardProfileL2.xmi#_ 0"/>
> </profileApplication>
> <profileApplication xmi:type="uml:ProfileApplication"
> xmi:id="_AFLDWrrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLDW7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="Default.profile.xmi#_AFLGELrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <appliedProfile xmi:type="uml:Profile"
> href="Default.profile.xmi#_AFLGDrrMEduIK4Jr7J21bA"/>
> </profileApplication>
> <profileApplication xmi:type="uml:ProfileApplication"
> xmi:id="_AFLDXLrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLDXbrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="Deployment.profile.xmi#_AFLEhLrMEduIK4Jr7J21bA"/>
> </eAnnotations>
> </xmi:Extension>
> <appliedProfile xmi:type="uml:Profile"
> href="Deployment.profile.xmi#_AFLEgrrMEduIK4Jr7J21bA"/>
> </profileApplication>
> </uml:Model>
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Profile xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://schema.omg.org/spec/UML/2.1.1"
> xsi:schemaLocation="http://schema.omg.org/spec/UML/2.1.1
> http://www.eclipse.org/uml2/2.0.0/UML"
> xmi:id="_AFLGDrrMEduIK4Jr7J21bA" name="Default"
> metamodelReference="_AFLGTLrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGD7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <contents xmi:type="ecore:EPackage" xmi:id="_AFLGELrMEduIK4Jr7J21bA"
> name="Default" nsURI="http:///schemas/Default/1" nsPrefix="Default">
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLGEbrMEduIK4Jr7J21bA" name="ConstraintEvaluationMode">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGErrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGTrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGE7rMEduIK4Jr7J21bA" name="batch"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGFLrMEduIK4Jr7J21bA" name="live" value="1"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EEnum"
> xmi:id="_AFLGFbrMEduIK4Jr7J21bA" name="ConstraintSeverity">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGFrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGUbrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGF7rMEduIK4Jr7J21bA" name="error"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGGLrMEduIK4Jr7J21bA" name="warning" value="1"/>
> <eLiterals xmi:type="ecore:EEnumLiteral"
> xmi:id="_AFLGGbrMEduIK4Jr7J21bA" name="info" value="2"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGGrrMEduIK4Jr7J21bA" name="URL">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGG7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGVbrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGHLrMEduIK4Jr7J21bA" name="base_Comment" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGHbrMEduIK4Jr7J21bA" name="Documentation">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGHrrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGWrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGH7rMEduIK4Jr7J21bA" name="base_Comment" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGILrMEduIK4Jr7J21bA" name="Shortcut">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGIbrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGX7rMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGIrrMEduIK4Jr7J21bA" name="base_Comment" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Comment"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGI7rMEduIK4Jr7J21bA" name="Perspective">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGJLrMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGZLrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGJbrMEduIK4Jr7J21bA" name="base_Package" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Package"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGJrrMEduIK4Jr7J21bA" name="AbstractMetaConstraint"
> abstract="true">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGJ7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGabrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLGKLrMEduIK4Jr7J21bA" name="evaluationMode" ordered="false"
> lowerBound="1" eType="_AFLGEbrMEduIK4Jr7J21bA"
> defaultValueLiteral="batch"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLGKbrMEduIK4Jr7J21bA" name="severity" ordered="false"
> lowerBound="1" eType="_AFLGFbrMEduIK4Jr7J21bA"
> defaultValueLiteral="error"/>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGKrrMEduIK4Jr7J21bA" name="MetaConstraint"
> eSuperTypes="_AFLGJrrMEduIK4Jr7J21bA">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
> <eAnnotations xmi:type="ecore:EAnnotation"
> xmi:id="_AFLGK7rMEduIK4Jr7J21bA"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_AFLGbrrMEduIK4Jr7J21bA"/>
> </xmi:Extension>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_AFLGLLrMEduIK4Jr7J21bA" name="message" ordered="false">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_AFLGLbrMEduIK4Jr7J21bA" name="base_Constraint" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/2.0.0/UML#//Constraint"/>
> </eStructuralFeatures>
> </eClassifiers>
> </contents>
> <contents xmi:type="ecore:EPackage" xmi:id="_AFLGLrrMEduIK4Jr7J21bA"
> name="Default_0" nsURI="http:///Default_0.profile.uml2"
> nsPrefix="Default_0">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_AFLGL7rMEduIK4Jr7J21bA" name="Default__Documentation">
> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
>
Re: Problems with type conformance and redefinition consistency [message #586987 is a reply to message #470378] Tue, 13 February 2007 01:23 Go to previous message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
Kenn,

Thanks for the answers/clarifications!

-- Nicolas.


Kenn Hussey wrote:
> Nicolas,
>
> The concept of redefinition in UML is meaningful only in the context of
> generalization. By default, a redefinable element is not consistent with
> another redefinable element; only in cases where the specification has
> defined specific overrides of the isConsistentWith(RedefinableElement) will
> it return a result other than 'false'. The metaclasses for which this has
> been done include Operation, Property, RedefinableTemplateSignature, Region,
> State, StateMachine, and Transition.
>
> Specific answers to your questions are in-line, below.
>
> Kenn
>
> "Nicolas Rouquette" <nicolas.rouquette@jpl.nasa.gov> wrote in message
> news:eqqjjs$flc$1@utils.eclipse.org...
>> RedefinableElement defines the following semantic variation point
>> (7.3.46 in ptc/06-04-02, p. 134):
>>
>>> There are various degrees of compatibility between the redefined element
>>> and the redefining element, such as name
>>> compatibility (the redefining element has the same name as the redefined
>>> element), structural compatibility (the client
>>> visible properties of the redefined element are also properties of the
>>> redefining element), or behavioral compatibility (the
>>> redefining element is substitutable for the redefined element). Any kind
>>> of compatibility involves a constraint on
>>> redefinitions. The particular constraint chosen is a semantic variation
>>> point.
>> I created a simple model with several tests of conformance/redefinition
>> to gain a practical understanding of 3 operations:
>>
>> RedefinableElement.isConsistentWith()
>> RedefinableElement.isRedefinitionContextValid()
>> Type.conformsTo()
>>
>> I tried several UML tools and finally settled on
>> RSA7 because it provides an easier interface to
>> work with the Eclipse UML2 implementation (2.0.2.v200610251409)
>> I've attached the RSA model.
>>
>> The UML2 XMI files are self-contained and seems to be standard compliant
>> but your actual interoperability mileage may vary.
>>
>> I have several questions about this small example:
>>
>> 1) What does it take to redefine a "DataType"?
>> My attempt failed:
>>
>> Redefining element '<Data Type> DataType2' is not consistent with
>> redefined element '<Data Type> DataType1'.
>>
>
> Typically it doesn't make sense for a classifier (data type) to redefine
> another classifier (data type) that it specializes, since a redefinition is
> effectively a replacement... By definition (i.e. for the lack of an override
> in the specification as described above), a data type is not consistent with
> another data type.
>
>> 2) What does it take to redefine a simple "Class"?
>> A simple attempt fails but others succeed.
>
> Likewise for classes. It is possible, however, to redefine features of a
> data type or class (i.e. operations, properties).
>
>> What are the minimal requirements for redefining a "Class"?
>>
>> - Redefining element '<Class> Type2' is not consistent with redefined
>> element '<Class> Type1'.
>>
>> 3) What does it take to redefine an operation in a Class?
>> My attempts failed:
>>
>> - Redefining element '<Class> Class1a' is not consistent with redefined
>> element '<Class> Class1'.
>> - Redefining element '<Class> Class1b' is not consistent with redefined
>> element '<Class> Class1'.
>
> The classes aren't consistent for the reasons above, but the redefinitions
> between the operations are valid (and the operations are consistent).
>
>> 4) What does it take to redefine a property whose type is a DataType?
>> Again, no success here:
>>
>> - Redefining element '<Class> Class2a' is not consistent with redefined
>> element '<Class> Class2'.
>> - Redefining element '<Class> Class2b' is not consistent with redefined
>> element '<Class> Class2'.
>>
>
> The classes aren't consistent for the reasons above, but the redefinitions
> between the properties are valid (and the properties are consistent).
>
>> 5) Class3a / Class3 is a valid redefinition even though it involves
>> redefining a property (x3a/x3) whose type (Type2) is itself an invalid
>> redefinition of another type (Type1). Why does this work?
>
> Validation doesn't fail because there is no redefinition between the classes
> (hence consistency isn't being checked). The properties are involved in a
> valid redefinition and are consistent.
>
>> What do I need to do to make this type of situation fail redefinition
>> consistency?
>
> You don't need to...
>
>> 6) Class4a / Class4 is also a valid redefinition like (5) but this time,
>> the type redefinition is contravariant (Type1 / Type2). Class4a/Class4
>> is deemed a valid redefinition but what do I need to do to make
>> contravariance invalid for property type redefinitions?
>>
>
> This redefinition is invalid, and the properties are not consistent; running
> validation confirms this (Redefining element '<Property> x4b : Type1' is not
> consistent with redefined element '<Property> x4 : Type2'.)
>
>> -- Nicolas.
>>
Previous Topic:Problems with type conformance and redefinition consistency
Next Topic:Navigability, ends owned by Association, how to relate ends and associated elements
Goto Forum:
  


Current Time: Wed Apr 24 16:31:22 GMT 2024

Powered by FUDForum. Page generated in 0.03362 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top