E.5 Other Changes


Note a number of other difference between version 1.1 and version 2.0:

  • In version 1.1 you were able to specify constraints only. In version 2.0 you may use OCL expressions to specify not only constraints, but value specifications in general, for instance, an initial value, derivation rule, or operation body.

  • A new construct called Let is added to OCL version 2.0. This allows for the definition of local variables within constraints.

  • The operation oclType for OclAny has been removed, because objects may have multiple types.

  • States can be referenced from OCL. The operation oclInState() is added to check whether an object is in a certain state.

  • Use of user -defined infix operators (+, -, *, /, etc.) is defined.

  • The precedence rules have been extended and changed.

  • One may use /* and */ to indicate large comments.

  • One may use packaging expressions to group expressions together.

  • One can explicitly state the type of the elements of a collection.



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