-
Key: UML25-207
-
Legacy Issue Number: 17612
-
Status: closed
-
Source: Object Management Group ( Andrew Watson)
-
Summary:
The definition of "isConsistentWith(redefinee : RedefinableElement) : Boolean" is broken in at least two ways.
Firstly, the OCL includes the term "op.ownedParameter->at(1)" which should presumably be "op.ownedParameter->at" (substitute letter "i" for digit "1").
Secondly, the OCL and textual definition say that each parameter is checked for conformance in the same direction, regardless of whether they're "in" or "out" parameters.
To deliver a safe substitutability (aka conformsTo) relationship, the "in" parameters of the substituting operation must conform to the "in" parameters of the substituted operation, but the "out" parameters must conform in the opposite direction (i.e. "out" parameters of the substituted operation conform to the "out" parameters of the substituting operation).
Since "inout" parameters pass parameters in both directions, they must conform in both directions simultaneously (which is a good definition of being "the same type").
Correcting the first bug is trivial. However, unless the second bug is also corrected, the given definition of isConsistentWith() will flag many type-safe substitutions as "not consistent", and many unsafe substitutions as "consistent". It must be corrected.
-
Reported: UML 2.5b1 — Wed, 19 Sep 2012 04:00 GMT
-
Disposition: Resolved — UML 2.5
-
Disposition Summary:
Merged with 15499
-
Updated: Fri, 6 Mar 2015 20:59 GMT
UML25 — isConsistentWith() definition broken
- Key: UML25-207
- OMG Task Force: Unified Modeling Language 2.5 (UML) FTF