Issue 15820: Update and formalize the constraints that MOF applies to UML models (mof2core-rtf) Source: Adaptive (Mr. Pete Rivett, pete.rivett(at)adaptive.com) Nature: Uncategorized Issue Severity: Significant Summary: At the moment the constraints do not reflect the more rigorous process that was deployed when creating the MOF metamodel for UML 2.4. Resolution: Revised Text: Replace 12.4 [3], currently: [3] Names are required for all Types and Properties (though there is nothing to prevent these names being automatically generated by a tool). with the following: [3] Names are required for all NamedElements except for ValueSpecifications. Replace 12.4 [4], currently: [4] Core::Basic and EMOF does not support visibilities. All property visibilities expressed in the UML MOF model will be ignored (and everything assumed to be public). Name clashes through names thus exposed should be avoided. with the following: [4] Core::Basic and EMOF do not support visibilities. All property visibilities must be explicitly set to public where applicable, that is for all NamedElements, ElementImports and PackageImports. Furthermore, no alias is allowed for any ElementImport. Replace 12.4 [8] from resolution to 15398 in ballot 2, i.e: [8] An EMOF metamodel may not include instances of the following UML metaclasses: • AssociationClass • Constraint • DataType (only instances of PrimitiveType and Enumeration) • ElementImport • Expression • GeneralizationSet • InstanceValue • InstanceSpecification • Interface • OpaqueExpression • PackageImport • PackageMerge • Slot with the following: [8] An EMOF metamodel is restricted to use the following concrete metaclasses from UML’s Kernel: • Association • Class • Comment • DataType • Enumeration • EnumerationLiteral • Generalization • InstanceValue • LiteralBoolean • LiteralInteger • LiteralNull • LiteralReal • LiteralString • LiteralUnlimitedNatural • Operation • Package • Parameter • PrimitiveType • Property Replace 12.4 [9] from resolution to 15398 in ballot 2, i.e: [9] The following properties must be empty: • Class::nestedClassifier • Classifier::/general for instances of Datatype • Operation::bodyCondition • Operation::postcondition • Operation::precondition • Operation::redefinedOperation • Parameter::defaultValue • Property::qualifier • Property::redefinedProperty • Property::subsettedProperty with the following: [9] The following properties must be empty: • Association::navigableOwnedEnd • Class::nestedClassifier • Classifier::/general for instances of Datatype • Operation::bodyCondition • Operation::postcondition • Operation::precondition • Operation::redefinedOperation • Parameter::defaultValue • Property::qualifier • Property::redefinedProperty • Property::subsettedProperty Replace 12.4 [10] from resolution to 15398 in ballot 2, i.e: [10] The following properties must be false: • Association::isDerived • Association::ownedNavigableEnd • Classifier::isFinalSpecialization • Feature::isStatic • Operation::isQuery • Property::isDerivedUnion • RedefinableElement::isLeaf with the following: [10] The following properties must be false: • Association::isDerived • Classifier::isFinalSpecialization • Feature::isStatic • Property::isDerivedUnion • RedefinableElement::isLeaf Replace 12.4 [12] from resolution to 15398 in ballot 2, i.e: [12] An Association has exactly 2 memberEnds, may never have an ownedNavigableEnd (they will always be owned by Classes) and may have at most one ownedEnd with the following: [12] An Association has exactly 2 memberEnds, may never have a navigableOwnedEnd (they will always be owned by Classes) and may have at most one ownedEnd Replace 12.4 [13] from resolution to 15398 in ballot 2, i.e: [13] Parameter::direction is ignored unless the value is ‘return’ (it is used to derive the multiplicity of the Operation) with the following: [13] An Operation can have up to one Parameter whose direction is ‘return’; furthermore, an Operation cannot have any ParameterSet per 12.4 [8]. Replace 12.4 [16] from resolution to 15398 in ballot 2, i.e: [16] Property::aggregation values of ‘shared’ will be ignored and treated as ‘none’ with the following: [16] Property::aggregation must be either ‘none’ or ‘composite’ Add the following: [17] Enumerations may not have attributes or operations [18] BehavioralFeature must be sequential. [19] Class must not be active. [20] An EnumerationLiteral must not have a ValueSpecification. [21] An Operation Parameter must have no effect, exception or streaming characteristics. [22] A TypedElement cannot be typed by an Association. [23] A TypedElement other than a LiteralSpecification or an OpaqueExpression must have a Type. [24] A TypedElement that is a kind of Parameter or Property typed by a Class cannot have a default value. [25] For a TypedElement that is a kind of Parameter or Property typed by an Enumeration, the defaultValue, if any, must be a kind of InstanceValue. [26] For a TypedElement that is a kind of Parameter or Property typed by an PrimitiveType, the defaultValue, if any, must be a kind of LiteralSpecification. [27] A composite subsetting Property with mandatory multiplicity cannot subset another composite Property with mandatory multiplicity. [28] A Property typed by a kind of DataType must have aggregation = none. [29] A Property owned by a DataType can only be typed by a DataType. [30] Each Association memberEnd Property must be typed by a Class. [31] A multi-valued Property or Parameter cannot have a default value. [31] The values of MultiplicityElement::lowerValue and upperValue must be of kind LiteralInteger and LiteralUnlimitedNatural respectively. Add an appendix with the specification of EMOF constraints for clause 12.4 from the file EMOFConstraints.ocl In clause 14.3, replace the first paragraph, currently: This section details additional constraints owned by the CMOF package that are applied to metamodels to be processed by a CMOF implementation. with the following: This section details the constraints owned by the CMOF package that are applied to metamodels to be processed by a CMOF implementation. These constraints supersede the EMOF constraints from clause 12.4; that is, validating a CMOF should be done with respect to all the CMOF constraints defined in this clause ignoring all the constraint definitions from clause 12.4. Replace 14.3 [1], currently: [1] The multiplicity of Association::memberEnd is limited to 2 rather than 2..* (i.e., n-ary Associations are not supported). context Association inv: memberEnd->size() = 2 with the following: [1] The multiplicity of Association::memberEnd is limited to 2 rather than 2..* (i.e., n-ary Associations are not supported); unlike EMOF, CMOF associations can have navigable association-owned ends. In 14.3 [2], delete the following: context Operation inv: raisedException.oclIsType(Class) In 14.3 [3], delete the following: context Integer inv: value >= -2^31 and value <= 2^31 - 1 Replace 14.3 [6], currently: [6] Names are required for all classifiers and features (though there is nothing to prevent these names being automatically generated by a tool). context Classifier inv: not(name = OclUndefined) context StructuralFeature inv: not(name = OclUndefined) with the following: [6] Names are required for all NamedElements except for ValueSpecifications. Replace 14.3 [7], currently: [7] Visibilities will be ignored (and everything assumed to be public). Name clashes through names thus exposed should be avoided. with the following: [7] CMOF does not support visibilities. All property visibilities must be explicitly set to public where applicable, that is for all NamedElements, ElementImports and PackageImports. Furthermore, no alias is allowed for any ElementImport. In 14.3 [8], delete: context Enumeration inv: isEmpty(feature) Replace 14.3 [9] from resolution to 15398 in ballot 2, i.e: [9] A CMOF metamodel may not include instances of the following UML metaclasses: • AssociationClass • GeneralizationSet • InstanceValue • InstanceSpecification • Interface • Slot with the following: [9] A CMOF metamodel is restricted to use the concrete metaclasses from UML’s Kernel: • Association • Class • Comment • Constraint • DataType • ElementImport • Enumeration • EnumerationLiteral • Generalization • InstanceValue • LiteralBoolean • LiteralInteger • LiteralNull • LiteralReal • LiteralString • LiteralUnlimitedNatural • OpaqueExpression • Operation • Package • PackageImport • PackageMerge • Parameter • PrimitiveType • Property Replace 14.3 [12] from resolution to 15398 in ballot 2, i.e: [12] The value of Property::defaultValue and Parameter::defaultValue must be of kind LiteralSpecification with the following: [12] A multi-valued Property or Parameter cannot have a default value. The default value of a Property or Parameter typed by a PrimitiveType must be a kind of LiteralSpecification. The default value of a Property or Parameter typed by an Enumeration must be a kind of InstanceValue. A Property or Parameter typed by a Class cannot have a default value. Delete 14.3 [14] from resolution to 15398 in ballot 2, i.e: [14] Instances of Dependency (and subclasses) will be ignored Replace 14.3 [15] from resolution to 15398 in ballot 2, i.e: [15] Generalization::isSubstitutable must be true with the following: [14] Generalization::isSubstitutable must be true Replace 14.3 [16] from resolution to 15398 in ballot 2, i.e: [16] Only one member attribute of a Class may have isId=true. Any others (e.g. those inherited) must be redefined: either made unavailable or redefined to change isId = false. with the following: [15] Only one member attribute of a Class may have isId=true. Any others (e.g. those inherited) must be redefined: either made unavailable or redefined to change isId = false. Replace 14.3 [17] from resolution to 15398 in ballot 2, i.e: [17] Property::aggregation values of ‘shared’ will be ignored and treated as ‘none’ with the following: [16] Property::aggregation must be either ‘none’ or ‘composite’ Add the following: [17] BehavioralFeature must be sequential. [18] Class must not be active. [19] An EnumerationLiteral must not have a ValueSpecification. [20] An Operation Parameter must have no effect, exception or streaming characteristics. [21] A TypedElement cannot be typed by an Association. [22] A TypedElement other than a LiteralSpecification or an OpaqueExpression must have a Type. [23] A TypedElement that is a kind of Parameter or Property typed by a Class cannot have a default value. [24] For a TypedElement that is a kind of Parameter or Property typed by an Enumeration, the defaultValue, if any, must be a kind of InstanceValue. [25] For a TypedElement that is a kind of Parameter or Property typed by an PrimitiveType, the defaultValue, if any, must be a kind of LiteralSpecification. [26] A composite subsetting Property with mandatory multiplicity cannot subset another composite Property with mandatory multiplicity. [27] A Property typed by a kind of DataType must have aggregation = none. [28] A Property owned by a DataType can only be typed by a DataType. [29] Each Association memberEnd Property must be typed by a Class. [30] A Constraint must constrain at least one element and must be specified via an OpaqueExpression. [31] The body of an OpaqueExpression must not be empty. Actions taken: November 17, 2010: received issue April 25, 2011: closed issue Discussion: End of Annotations:===== ubject: MOF Core issues - issue numbers needed ASAP Date: Wed, 17 Nov 2010 13:30:30 -0800 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: MOF Core issues - issue numbers needed ASAP Thread-Index: AcuGnqauDNNTei/LShib0R1VhGHAJA== Priority: Urgent From: "Pete Rivett" To: I need issue numbers for these two issues ASAP. Thanks Pete 1. Update and formalize the constraints that MOF applies to UML models ---------------------------------------------------------------------- At the moment the constraints do not reflect the more rigorous process that was deployed when creating the MOF metamodel for UML 2.4.