Issue 15500: isConsistentWith (uml2-rtf) Source: International Business Machines (Dr. Maged Elaasar, melaasar(at)ca.ibm.com) Nature: Uncategorized Issue Severity: Summary: The operation RedefinableElement::isConsistentWith(redefinee : RedefinableElement) has the documentation: "The query isConsistentWith() specifies, for any two RedefinableElements in a context in which redefinition is possible, whether redefinition would be logically consistent. By default, this is false" It is not clear from this description above whether the parameter "redefinee" is the redefining or the redefined element. A look at some of the overrides of this operation like Property::isConsistentwith(redefinee : RedefinableElement): " A redefining property is consistent with a redefined property if the type of the redefining property conforms to the type of the redefined property, and the multiplicity of the redefining property (if specified) is contained in the multiplicity of the redefined property. " The description suggests that the "redefinee" is probably the "redefined" property. On the other hand, the precondition provided in OCL suggests that "refinee" is definitely the "redefining" property: pre: redefinee.isRedefinitionContextValid(self) since RedefinableElement::isRedefinitionContext(redefined : RedefinableElement) has the description: "...at least one of the redefinition contexts of this element must be a specialization of at least one of the redefinition contexts of the specified element." In summary, this means RedefinableElement has the two operations: RedefinableElement::isConsistentWith(redefining : RedefinableElement) RedefinableElement::isRedefinitionContext(redefined : RedefinableElement) At least "redefinee" should be renamed to "redfining" since this is the term used in the descriptions. However, having the two closely related operations taking opposite parameters make it very confusing and inconsistent. Resolution: Revised Text: Actions taken: September 13, 2010: received issue Discussion: End of Annotations:===== ubject: isConsistentWith To: uml2-rtf@omg.org X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Maged Elaasar Date: Sun, 12 Sep 2010 23:47:34 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 8.0.1|February 07, 2008) at 09/12/2010 23:47:36 The operation RedefinableElement::isConsistentWith(redefinee : RedefinableElement) has the documentation: "The query isConsistentWith() specifies, for any two RedefinableElements in a context in which redefinition is possible, whether redefinition would be logically consistent. By default, this is false" It is not clear from this description above whether the parameter "redefinee" is the redefining or the redefined element. A look at some of the overrides of this operation like Property::isConsistentwith(redefinee : RedefinableElement): " A redefining property is consistent with a redefined property if the type of the redefining property conforms to the type of the redefined property, and the multiplicity of the redefining property (if specified) is contained in the multiplicity of the redefined property. " The description suggests that the "redefinee" is probably the "redefined" property. On the other hand, the precondition provided in OCL suggests that "refinee" is definitely the "redefining" property: pre: redefinee.isRedefinitionContextValid(self) since RedefinableElement::isRedefinitionContext(redefined : RedefinableElement) has the description: "...at least one of the redefinition contexts of this element must be a specialization of at least one of the redefinition contexts of the specified element." In summary, this means RedefinableElement has the two operations: RedefinableElement::isConsistentWith(redefining : RedefinableElement) RedefinableElement::isRedefinitionContext(redefined : RedefinableElement) At least "redefinee" should be renamed to "redfining" since this is the term used in the descriptions. However, having the two closely related operations taking opposite parameters make it very confusing and inconsistent. Maged ubject: RE: isConsistentWith Date: Mon, 13 Sep 2010 09:36:20 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: isConsistentWith thread-index: ActS9qgrHnrEAL+MTheHGLM3KgS77QAUYZxg From: "Ed Seidewitz" To: "Maged Elaasar" Cc: Maged . The .redefine. in isConsistentWith is definitely the .redefining. element. You can see this from the use of isConsistentWith in constraint [2] of RedefinableElement: [2] A redefining element must be consistent with each redefined element. self.redefinedElement->forAll(re | re.isConsistentWith(self)) Here, .re. is clearly a redefined element, while .self. is the redefining element. I agree with you that renaming the isConsistentWith parameter to .redefining. would be clearer. This one of the cases in which the OCL is actually correct, but the text is not clear (which are rarer than the cases in which the problem is the other way around!). -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Sunday, September 12, 2010 11:48 PM To: uml2-rtf@omg.org Subject: isConsistentWith The operation RedefinableElement::isConsistentWith(redefinee : RedefinableElement) has the documentation: "The query isConsistentWith() specifies, for any two RedefinableElements in a context in which redefinition is possible, whether redefinition would be logically consistent. By default, this is false" It is not clear from this description above whether the parameter "redefinee" is the redefining or the redefined element. A look at some of the overrides of this operation like Property::isConsistentwith(redefinee : RedefinableElement): " A redefining property is consistent with a redefined property if the type of the redefining property conforms to the type of the redefined property, and the multiplicity of the redefining property (if specified) is contained in the multiplicity of the redefined property. " The description suggests that the "redefinee" is probably the "redefined" property. On the other hand, the precondition provided in OCL suggests that "refinee" is definitely the "redefining" property: pre: redefinee.isRedefinitionContextValid(self) since RedefinableElement::isRedefinitionContext(redefined : RedefinableElement) has the description: "...at least one of the redefinition contexts of this element must be a specialization of at least one of the redefinition contexts of the specified element." In summary, this means RedefinableElement has the two operations: RedefinableElement::isConsistentWith(redefining : RedefinableElement) RedefinableElement::isRedefinitionContext(redefined : RedefinableElement) At least "redefinee" should be renamed to "redfining" since this is the term used in the descriptions. However, having the two closely related operations taking opposite parameters make it very confusing and inconsistent. Maged