Issue 8460: UML 2 Super / Kernel / invalid restriction in isConsistentWith() (uml2-rtf) Source: International Business Machines (Mr. Jim Amsden, jamsden(at)us.ibm.com) Nature: Uncategorized Issue Severity: Summary: A derived union association end represents a union of all of its subsets. The leaf subsets clearly have to be non-derived. However, in operation Property::isConsistentWith(), defined on page 127 of ptc/-04-10-02, it is stated that a derived property cannot be redefined by a non-derived property. This means that all such subsets of derived unions will be incorrect. Clearly, this restriction should be removed. Recommendation: Remove the constraint: (prop.isDerived implies isDerived) from the operation Property::isConsistentWith() (on pg. 127) Resolution: see below Revised Text: The leaf subsetting properties do not have to be non-derived, a derived property can contribute to a derived union. Such a leaf property would be calculated from, or essentially rename some other property or properties. But it does seem that a derived property should be able to be redefined as non-derived by some subclass. Revised Text: In section 7.3.44 of Superstructure, change Additional Operations [1] from: [1] The query isConsistentWith() specifies, for any two Properties in a context in which redefinition is possible, whether redefinition would be logically consistent. A redefining property is consistent with a redefined property if the type of the redefining property conforms to the type of the redefined property, the multiplicity of the redefining property (if specified) is contained in the multiplicity of the redefined property, and the redefining property is derived if the redefined attribute is property. Property::isConsistentWith(redefinee : RedefinableElement) : Boolean pre: redefinee.isRedefinitionContextValid(self) isConsistentWith = redefinee.oclIsKindOf(Property) and let prop : Property = redefinee.oclAsType(Property) in (prop.type.conformsTo(self.type) and ((prop.lowerBound()->notEmpty() and self.lowerBound()->notEmpty()) implies prop.lowerBound() >= self.lowerBound()) and ((prop.upperBound()->notEmpty() and self.upperBound()->notEmpty()) implies prop.lowerBound() <= self.lowerBound()) and (self.isDerived implies prop.isDerived) and (self.isComposite implies prop.isComposite)) To: [1] The query isConsistentWith() specifies, for any two Properties in a context in which redefinition is possible, whether redefinition would be logically consistent. 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. Property::isConsistentWith(redefinee : RedefinableElement) : Boolean pre: redefinee.isRedefinitionContextValid(self) isConsistentWith = redefinee.oclIsKindOf(Property) and let prop : Property = redefinee.oclAsType(Property) in (prop.type.conformsTo(self.type) and ((prop.lowerBound()->notEmpty() and self.lowerBound()->notEmpty()) implies prop.lowerBound() >= self.lowerBound()) and ((prop.upperBound()->notEmpty() and self.upperBound()->notEmpty()) implies prop.lowerBound() <= self.lowerBound()) and (self.isComposite implies prop.isComposite)) In section 11.3.5 of InfrastructureLibrary, change Additional Operations [1] from: [1] The query isConsistentWith() specifies, for any two Properties in a context in which redefinition is possible, whether redefinition would be logically consistent. A redefining property is consistent with a redefined property if the type of the redefining property conforms to the type of the redefined property, the multiplicity of the redefining property (if.specified) is contained in the multiplicity of the redefined property, and the redefining property is derived if the redefined property is derived. Property::isConsistentWith(redefinee : RedefinableElement) : Boolean pre: redefinee.isRedefinitionContextValid(self) isConsistentWith = redefinee.oclIsKindOf(Property) and let prop : Property = redefinee.oclAsType(Property) in (prop.type.conformsTo(self.type) and ((prop.lowerBound()->notEmpty() and self.lowerBound()->notEmpty()) implies prop.lowerBound() >= self.lowerBound()) and ((prop.upperBound()->notEmpty() and self.upperBound()->notEmpty()) implies prop.lowerBound() <= self.lowerBound()) and (self.isDerived implies prop.isDerived) and (self.isComposite implies prop.isComposite)) To: [1] The query isConsistentWith() specifies, for any two Properties in a context in which redefinition is possible, whether redefinition would be logically consistent. 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. Property::isConsistentWith(redefinee : RedefinableElement) : Boolean pre: redefinee.isRedefinitionContextValid(self) isConsistentWith = redefinee.oclIsKindOf(Property) and let prop : Property = redefinee.oclAsType(Property) in (prop.type.conformsTo(self.type) and ((prop.lowerBound()->notEmpty() and self.lowerBound()->notEmpty()) implies prop.lowerBound() >= self.lowerBound()) and ((prop.upperBound()->notEmpty() and self.upperBound()->notEmpty()) implies prop.lowerBound() <= self.lowerBound()) and (self.isComposite implies prop.isComposite)) Actions taken: March 4, 2005: received issue April 25, 2011: closed issue Discussion: Disposition: Deferred to UML 2.4 RTF End of Annotations:===== ssue X5: UML 2 Super / Kernel / invalid restriction in isConsistentWith() Source: Jim Amsden, IBM Software Summary: A derived union association end represents a union of all of its subsets. The leaf subsets clearly have to be non-derived. However, in operation Property::isConsistentWith(), defined on page 127 of ptc/-04-10-02, it is stated that a derived property cannot be redefined by a non-derived property. This means that all such subsets of derived unions will be incorrect. Clearly, this restriction should be removed. Recommendation: Remove the constraint: (prop.isDerived implies isDerived) from the operation Property::isConsistentWith() (on pg. 127) Subject: RE: Issue 8460 - do not completely remove the constraint Date: Sun, 6 Mar 2005 13:21:07 -0500 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Issue 8460 - do not completely remove the constraint Thread-Index: AcUg5KDSyQonHK4eRJGPhNFmZalwtwBkXrbA From: "Pete Rivett" To: X-Virus-Scanned: by amavisd-new at sentraliant.com 8460: Rather than removing the constraint completely it seems safer at this stage to relax it minimally to cover only the problem raised by the issue: to remove the constraint completely goes further than is necessary, and may result in further problems (implementation or otherwise). In other words we should only allow derived unions to be redefined by non-derived properties. So rather than completely removing: (prop.isDerived implies isDerived) We should replace it with: ((prop.isDerived and not(prop.isDerivedUnion)) implies isDerived) Pete Pete Rivett (mailto:pete.rivett@adaptive.com) CTO, Adaptive Inc. Dean Park House, 8-10 Dean Park Crescent, Bournemouth, BH1 1HL, UK Tel: +44 (0)1202 449419 Fax: +44 (0)1202 449448 http://www.adaptive.com -------------------------------------------------------------------------------- From: Juergen Boldt [mailto:juergen@omg.org] Sent: Friday, March 04, 2005 5:48 PM To: issues@omg.org; uml2-rtf@omg.org Subject: issues 8459 - 8461 -- UML 2 RTF (superstructure) issue ================================================================== This is issue # 8460 Source: Jim Amsden, IBM Software UML 2 Super / Kernel / invalid restriction in isConsistentWith() A derived union association end represents a union of all of its subsets. The leaf subsets clearly have to be non-derived. However, in operation Property::isConsistentWith(), defined on page 127 of ptc/-04-10-02, it is stated that a derived property cannot be redefined by a non-derived property. This means that all such subsets of derived unions will be incorrect. Clearly, this restriction should be removed. Recommendation: Remove the constraint: (prop.isDerived implies isDerived) from the operation Property::isConsistentWith() (on pg. 127) Tel. +1 781 444 0404 ext. 132 Fax: +1 781 444 0320 email: juergen@omg.org www www.omg.org Subject: RE: Draft ballot 10 Date: Tue, 13 Sep 2005 05:55:08 -0700 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Draft ballot 10 Thread-Index: AcW2aOQD6ZfxzYXAQZu1pJpSW7CuewAbw2MQ From: "Pete Rivett" To: "Branislav Selic" , Issue 8134: If DeployedArtifact does indeed inherit from 2 versions of Element (and this is not achieved via PackageMerge) then why can the diagram not show 2 classes Element (from kernel) and Element (from Dependencies)? Issue 8136: the same applies Issue 8139: the policy is NOT to have constraints on diagrams - we have had other issue resolutions explicitly removing them! Issues 8137, 8140: we should really use the style {subsets X} rather than the English text "This association specializes...". Maybe we want a separate resolution to clean all these up? There are some resolutions in this ballot that use (subsets X) and others that use {subsets X} Issue 8433 needs tidying - I think this was already spotted Issue 8457: should move the first section under Revised text to Discussion (since these are just general directions not detailed changes to the document), so that Revised text now starts with 'Superstructure'. Issue 8459: I disagree with the paragraph at the end of the resolution which states the following which I think is not at all justified by the spec which has keywords and stereotypes as quite separate things (albeit regrettably using the same notation).Since none of these standard stereotypes provides any new properties or associations, they can be regarded as keywords and therefore do not require profile capabilities in order to be applied to L1 models." Moreover this explanation appears under 'revised text' and it's not clear what Text it's revising - it seems to be making a (invalid IMHO) justification for 'no change' which should be under Discussion. If we really do want to allow stereotypes to be considered keywords at L1 then there should be some very clear text added to the spec. Issue 8460: I think we're hasty removing the constraint. The reason I can see for not allowing non-derived properties to redefine derived ones is that a non-derived property requires a slot. An implementation could work on the basis that a redefinition always reuses and never needs to obtain a new slot. Issue 8462: I object to removing the constraint on subsetting. To me it's as simple as this - in order for a property C.P1 to subset a property P2 then P2 must be accessible/in the namespace of C: either directly owned by C or inherited. (C here is the Classifier that owns P1). Issue 8468: The last changes to constraints [2] and [3] would have been better to provide the OCL than adding 'OCL not available' On a more general note I think we should have a policy for when/whether to reference the finalized spec ptc/04-10-02 or the newly available formal spec. Pete -------------------------------------------------------------------------------- From: Branislav Selic [mailto:bselic@ca.ibm.com] Sent: Saturday, September 10, 2005 8:34 PM To: uml2-rtf@omg.org Subject: Draft ballot 10 Just 31 proposed resolutions. Apologies for the messay state of the draft ballot, but I did not have time to clean it up fully. Thought it better to have it out on time. Also, I have not yet had a chance to actually review the proposed resolutions. Please review them carefully and comment on anything that you feel is controversial or needs fixing -- the official ballot will be sent out on Friday. Regards, Bran Selic IBM Distinguished Engineer IBM Rational Software 770 Palladium Drive Kanata, Ontario, Canada K2V 1C8 ph.: (613) 591-7915 fax: (613) 599-3912 Subject: Issue 8460 To: uml2-rtf@omg.org X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Maged Elaasar Date: Fri, 19 Mar 2010 09:55:55 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 8.0.1|February 07, 2008) at 03/19/2010 09:55:56 I just need a clarification about resolution 8460. It means that it is now legal for a non-derived property to redefine a derived property (including one that is a derived union), correct? Maged Elaasar, PhD Candidate Senior Software Engineer, Rational Modeling Tools IBM Representative@OMG, CAS Research Staff Member IBM Canada, Ottawa Lab, +1 613 270 4651 From: Steve Cook To: Maged Elaasar , "uml2-rtf@omg.org" Subject: RE: Issue 8460 Thread-Topic: Issue 8460 Thread-Index: AQHKx2xVRd+Blh6foUCS524FYhGMy5H5S2/A Date: Fri, 19 Mar 2010 14:12:18 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: I re-read it. The issue is not very well stated, I think. The original specification text is nonsense: and the redefining property is derived if the redefined attribute is property. This must have intended to say and the redefining property is derived if the redefined property is derived. Note this does not say and the redefined property is derived if the redefining property is derived. However the original OCL says (self.isDerived implies prop.isDerived) Where prop is the .redefinee., i.e the redefined property. Translated into English this says .if the redefining property is derived then the redefined property is derived., i.e. exactly what the English text does not say. So the original spec was both nonsensical and contradictory, if that.s possible. The result of the resolution is to allow it in either direction, i.e. a derived property can redefine a non-derived, or vice versa. -- Steve From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: 19 March 2010 13:56 To: uml2-rtf@omg.org Subject: Issue 8460 I just need a clarification about resolution 8460. It means that it is now legal for a non-derived property to redefine a derived property (including one that is a derived union), correct? Maged Elaasar, PhD Candidate Senior Software Engineer, Rational Modeling Tools IBM Representative@OMG, CAS Research Staff Member IBM Canada, Ottawa Lab, +1 613 270 4651