Issue 10437: 11.2.5 (02) (ocl2-rtf) Source: NIST (Mr. Peter Denno, peter.denno(at)nist.gov) Nature: Uncategorized Issue Severity: Summary: oclAsType(typespec : OclType) : T "Evaluates to self, where self is of the type identified by typespec. post: (result = self) and result.oclIsTypeOf(typeName) (BTW , that ought to be "typespec" not typeName). This description is inadequate. The text in 7.4.6 describes the important condition on the use of this method ("An object can only be re-typed to one of its subtypes.") But chapter 7 is informative, not normative. Even with that text moved into 11.2.5, additional discussion is required. For example, referring to the properties that are only defined on the subtype, what would the value of those properties be, once the object is re-typed? Resolution: Revised Text: Update the text in section 11.2.5 to read: oclAsType(t : Classifier) : T Evaluates to self, where self is of the type identified by t. The type t may be any classifier defined in the UML model; if the actual type of self at evaluation time does not conform to t, then the oclAsType operation evaluates to null. In the case of feature redefinition, casting an object to a supertype of its actual type does not access the supertype’s definition of the feature; according to the semantics of redefinition, the redefined feature simply does not exist for the object. However, when casting to a supertype, any features additionally defined by the subtype are suppressed. post: (result = self) and result.oclIsTypeOf( t ) Actions taken: November 2, 2006: received issue October 16, 2009: closed issue Discussion: Note that this resolution depends on the proposal for resolution of Issue 6532 that discards the OclType metatype in favour of Classifier. End of Annotations:===== s is issue # 10437 11.2.5 (02) oclAsType(typespec : OclType) : T "Evaluates to self, where self is of the type identified by typespec. post: (result = self) and result.oclIsTypeOf(typeName) (BTW , that ought to be "typespec" not typeName). This description is inadequate. The text in 7.4.6 describes the important condition on the use of this method ("An object can only be re-typed to one of its subtypes.") But chapter 7 is informative, not normative. Even with that text moved into 11.2.5, additional discussion is required. For example, referring to the properties that are only defined on the subtype, what would the value of those properties be, once the object is re-typed?