Issue 14888: No postcondition for NamedElement::getType() when self.oclIsKindOf(Namespace) (ocl2-rtf) Source: (, ) Nature: Revision Severity: Significant Summary: 9.4.2 NamedElement NamedElement, as defined by OCL, links to ModelElement (from Core) and has an operation getType(): Classifier Postconditions are given when the referred modelelelement is an instance of Classifier, VariableDeclaration or State. However, from subclause [4] of section 9.4.1 it follows that the referred modelelelement may also be an instance of Namespace. (let firstNamespace : ModelElement = lookupLocal( names->first() ).referredElement, where lookupLocal returns an OCL NamedElement) In the UML Infrastructure, Namespace specializes Core::NamedElement, which does not defines a type attribute (Core::TypedElement does) Namespace is a generalization of Classifier. At least, add: post: referredElement.oclIsKindOf(Namespace) implies result = -- TBD: when aligning with UML 2.0 Should it be result.oclIsUndefined() ? Resolution: Revised Text: Actions taken: December 19, 2009: received issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 19 Dec 2009 22:35:11 -0500 To: Subject: Issue/Bug Report ******************************************************************************* Name: Javier Godoy Company: Universidad Nacional del Litoral mailFrom: rjgodoy@fich.ul.edu.ar Notification: Yes Specification: OCL Section: 9.4.2 FormalNumber: 09-05-02 Version: 2.1 RevisionDate: 05/02/09 Page: 94 Title: No postcondition for NamedElement::getType() when self.oclIsKindOf(Namespace) Nature: Revision Severity: Significant test: 3qw8 B1: Report Issue Description: 9.4.2 NamedElement NamedElement, as defined by OCL, links to ModelElement (from Core) and has an operation getType(): Classifier Postconditions are given when the referred modelelelement is an instance of Classifier, VariableDeclaration or State. However, from subclause [4] of section 9.4.1 it follows that the referred modelelelement may also be an instance of Namespace. (let firstNamespace : ModelElement = lookupLocal( names->first() ).referredElement, where lookupLocal returns an OCL NamedElement) In the UML Infrastructure, Namespace specializes Core::NamedElement, which does not defines a type attribute (Core::TypedElement does) Namespace is a generalization of Classifier. At least, add: post: referredElement.oclIsKindOf(Namespace) implies result = -- TBD: when aligning with UML 2.0 Should it be result.oclIsUndefined() ?