7.3 Precedence Rules


With so many operations available on an instance of a type, rules are needed to determine the precedence of the operations. Table 7-4 shows the OCL operations, starting with the highest precedence. In case of doubt, the use of parentheses () is always allowed to specify the precedence explicitly.

Table 7-4. Precedence for OCL operations (highest to lowest )

Name

Syntax

Pathname

::

Time expression

@pre

The dot, arrow, and message operations

., ->, ^, ^^

Unary operations

-, not

Multiplication and division

*, /

Addition and substraction

+, -

Relational operations

<, >, <=, >=, <>, =

Logical operations

and, or, xor

Logical implies

implies



Object Constraint Language, The. Getting Your Models Ready for MDA
The Object Constraint Language: Getting Your Models Ready for MDA (2nd Edition)
ISBN: 0321179366
EAN: 2147483647
Year: 2003
Pages: 137

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net