Issue 15218: OCL 2.2 UML-alignment of redefinition (ocl2-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Uncategorized Issue Severity: Summary: At the end of Section 7.4.6 OCL 2.2 says "For example, if class Employee redefines the age() : Integer operation of the Person class, a constraint may access the Person definition as in context Employee inv: self.age() <= self.Person::age() For clarity, the qualified form may only be used with an explicit source expression." and in Section 7.5.8: "Whenever properties are redefined within a type, the property of the supertypes can be accessed using the oclAsType() operation. Whenever we have a class B as a subtype of class A, and a property p1 of both A and B, we can write:" a clarifying example follows that is actually a disambiguation not a redefinition. In UML redefinition replaces an old definition with something else, which is not what the above excerpts imply. In the case of redefining "Person::age() : Integer". If the redefinition is "Employee::age() : UnlimitedNatural" the redefinition is compatible (valid UML), so perhaps self.age() being UnlimitedNatural and self.Person::age() being Integer just might be useful. But allowing them to invoke different operation bodies seems to violate UML. Suggest that use of a path qualification may select an occluded definition signature for static analysis, but may not use a redefined value or body. [This then avoids a need for the AST to persist the distinction between X::y as an explicit feature for static resolution or as an implicit feature for dynamic resolution. All features in the AST are identified by static analysis and evaluated by dynamic resolution.] Resolution: Revised Text: Actions taken: April 22, 2010: received issue Discussion: End of Annotations:===== m: "Willink, Ed" To: "'issues@omg.org'" Subject: OCL 2.2 UML-alignment of redefinition Date: Thu, 22 Apr 2010 14:24:18 +0100 X-Mailer: Internet Mail Service (5.5.2657.72) Hi [Juergen: Please use: "Issue xyzzy: OCL 2.2 - UML-alignment of redefinition" rather than just "Issue xyzzy - OCL 2.2 Issue" as the moderated email title.] At the end of Section 7.4.6 OCL 2.2 says "For example, if class Employee redefines the age() : Integer operation of the Person class, a constraint may access the Person definition as in context Employee inv: self.age() <= self.Person::age() For clarity, the qualified form may only be used with an explicit source expression." and in Section 7.5.8: "Whenever properties are redefined within a type, the property of the supertypes can be accessed using the oclAsType() operation. Whenever we have a class B as a subtype of class A, and a property p1 of both A and B, we can write:" a clarifying example follows that is actually a disambiguation not a redefinition. In UML redefinition replaces an old definition with something else, which is not what the above excerpts imply. In the case of redefining "Person::age() : Integer". If the redefinition is "Employee::age() : UnlimitedNatural" the redefinition is compatible (valid UML), so perhaps self.age() being UnlimitedNatural and self.Person::age() being Integer just might be useful. But allowing them to invoke different operation bodies seems to violate UML. Suggest that use of a path qualification may select an occluded definition signature for static analysis, but may not use a redefined value or body. [This then avoids a need for the AST to persist the distinction between X::y as an explicit feature for static resolution or as an implicit feature for dynamic resolution. All features in the AST are identified by static analysis and evaluated by dynamic resolution.] Regards Ed Willink **************************************************************************** Please consider the environment before printing this email. Thales Research and Technology (UK) Limited DISCLAIMER: The information contained in this e-mail is confidential. It may also be legally privileged. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained herein. Such unauthorised use may be unlawful. We may monitor all e-mail communications through our networks. If you have received this e-mail in error, please inform us immediately on +44 (0)1293 575987 and delete it and all copies from your system. We accept no responsibility for changes to any e-mail which occur after it has been sent. Attachments to this e-mail may contain software viruses which could damage your system. We therefore recommend you virus-check all attachments before opening. The registered office of Thales Research and Technology (UK) Limited is at: 2 Dashwood Lang Road, The Bourne Business Park, Addlestone, Weybridge, Surrey KT15 2NX. Registered in England No. 774298. ****************************************************************************