-
Key: OCL23-13
-
Legacy Issue Number: 14582
-
Status: closed
-
Source: Model Driven Solutions ( Dr. Edward Willink)
-
Summary:
Issue 11098 resolved the missing precedence of let-in as lowest. This requires "2 * let a:Integer=1 in a + 1" to be interpreted as "(2 * (let a:Integer=1 in a)) + 1" making use of a non-trivial let body surprising and needlessly complicated. The problem with the open-ended right hand side can be resolved by assigning let-in the highest atomic expression precedence and defining its resolution as right-associative. The above example then has the obvious meaning "2 * (let a:Integer=1 in (a + 1))".
Issue 6544 introduces ^ and ^^ at higher precedence than . and ->. However since these operators can only return left hand arguments for each other, there is no need to assign these to different levels.
if-then-else-endif has an intermediate precedence in OCL 2.1. Since this term has keywords at start and end, the term is equivalent to an atomic expression. In so far as precedence is meaningful it is a high precedence.
Parentheses should be bulletted at high precedence.
Non commutative operators such as / have no defined order of evaluation leaving the value of "8 / 4 / 2" undefined. Binary operators should be specified as left-associative; i.e "(8 / 4) / 2".
Section 9.3.2 duplicates 7.4.7.
-
Reported: OCL 2.1 — Tue, 27 Oct 2009 04:00 GMT
-
Disposition: Resolved — OCL 2.3
-
Disposition Summary:
No Data Available
-
Updated: Fri, 6 Mar 2015 20:58 GMT
OCL23 — OCL 2.1 7.4.7 Inconsistent Operator Associativity and Precedence
- Key: OCL23-13
- OMG Task Force: OCL 2.3 RTF