Issue 17612: isConsistentWith() definition broken (uml25-ftf) Source: Object Management Group (Mr. Andrew Watson, andrew(at)omg.org) Nature: Revision Severity: Significant 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(i)" (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. Resolution: Revised Text: Actions taken: September 19, 2012: received issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 19 Sep 2012 17:25:52 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Andrew Watson Employer: OMG mailFrom: andrew@omg.org Terms_Agreement: I agree Specification: UML Simplification Submission Section: 9.9 FormalNumber: ad/12-08-01 Version: 2.5 Doc_Year: 2012 Doc_Month: August Doc_Day: Day Page: 158 Title: isConsistentWith() definition broken Nature: Revision Severity: Significant CODE: 3TMw8 B1: Report Issue Description: 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(i)" (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.