-
Key: OCL21-268
-
Legacy Issue Number: 9404
-
Status: closed
-
Source: Adaptive ( Mr. Pete Rivett)
-
Summary:
Section 7.5.3 of ptc/05-06-06 starts with the following: "Starting from a specific object, we can navigate an association on the class diagram to refer to other objects and their properties. To do so, we navigate the association by using the opposite association-end:"
However, unlike in UML 1.x, in UML2 this may well be ambiguous (since names of ends owned by Associations only have to be unique within the Association and not within the context of the Class).
OCL should therefore explicitly allow qualification using the name of the Association itself as well as the end name (it is not clear whether this is currently allowed as part of the syntax for 'associationendname' so there should be an example to show this. This would make it consistent with the metamodel which allows reference to specific Properties.For example we could have associations A1 and A2 both linking classes C1 and C2 and each with ends c1 and c2 owned by the respective associations.
OCL does not then address the fact that aC1.c2 is ambiguous - unlike the case with unnamed ends it does not even say that it may be ambiguous and is hence disallowed.
However rather than disallowing the navigation OCL should have a syntax to allow qualification by the association name
For example aC1.A1::c2The same could be used for missing association end names: If A1 had unnamed ends then one could use aC1.A1::C2
-
Reported: OCL 2.0 — Tue, 28 Feb 2006 05:00 GMT
-
Disposition: Resolved — OCL 2.1
-
Disposition Summary:
No Data Available
-
Updated: Fri, 6 Mar 2015 20:58 GMT