Issue 13992: lowerBound/upperBound constraints and derivations wrong (uml2-rtf) Source: Adaptive (Mr. Pete Rivett, pete.rivett(at)adaptive.com) Nature: Uncategorized Issue Severity: Summary: Issue on UML 2.2 Superstructure, Section 7.3.32: 1. There are 2 constraints numbered [1] 2. The 2nd of these is: lowerBound()->notEmpty() implies lowerBound() >= 0. However the way lowerBound() is defined (operation [4]) means it can never be empty: lowerBound = if lowerValue->isEmpty() then 1 else lowerValue.integerValue() endif It makes more sense to have the constraint condition apply to the stored lowerValue. i.e. lowerValue()->notEmpty() implies lowerBound() >= 0 3. Likewise constraint [2] should be: upperValue()->notEmpty() implies upperBound() >= lowerBound() 4. Note that this omits the test currently in constraint for lowerValue notEmpty since lowerBound will then default to 1 – and it’s necessary to have the constraint check that upperValue is not less. 5. /upper and /lower are defined as [0..1]. However since they are defined in terms of upper/lowerValue – which always has a value - then they will never be empty so should be declared as [1]. Resolution: Revised Text: Actions taken: June 15, 2009: received issue Discussion: End of Annotations:===== ubject: lowerBound/upperBound constraints and derivations wrong Date: Mon, 15 Jun 2009 08:29:33 -0700 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: lowerBound/upperBound constraints and derivations wrong Thread-Index: AcntzhWkO+ZS9816Rm23amhHwoyMCA== From: "Pete Rivett" To: Issue on UML 2.2 Superstructure, Section 7.3.32: 1. There are 2 constraints numbered [1] 2. The 2nd of these is: lowerBound()->notEmpty() implies lowerBound() >= 0. However the way lowerBound() is defined (operation [4]) means it can never be empty: lowerBound = if lowerValue->isEmpty() then 1 else lowerValue.integerValue() endif It makes more sense to have the constraint condition apply to the stored lowerValue. i.e. lowerValue()->notEmpty() implies lowerBound() >= 0 3. Likewise constraint [2] should be: upperValue()->notEmpty() implies upperBound() >= lowerBound() 4. Note that this omits the test currently in constraint for lowerValue notEmpty since lowerBound will then default to 1 . and it.s necessary to have the constraint check that upperValue is not less. 5. /upper and /lower are defined as [0..1]. However since they are defined in terms of upper/lowerValue . which always has a value - then they will never be empty so should be declared as [1]. Pete Rivett (pete.rivett@adaptive.com) CTO, Adaptive Inc 65 Enterprise, Aliso Viejo, CA 92656 tel: +1 949 330 7677, cell: +1 949 338 3794 Follow me on Twitter @rivettp or http://twitter.com/rivettp