O'Reilly logo

Object Constraint Language, The: Getting Your Models Ready for MDA, Second Edition by Anneke Kleppe, Jos Warmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix E. Differences Between OCL Versions 1.1 and 2.0

The previous edition of this book, which appeared in 1999, described OCL version 1.1. This edition describes OCL version 2.0. This appendix lists the differences between both versions of the OCL standard.

Syntax Changes

Context Declaration

In version 1.1, there was no syntax for declaring the context of an expression; there was only the convention to underline the classname (for invariants) or the operation name (for pre- and postconditions) to indicate the context. In version 2.0, the context declaration is formalized. A new syntax is provided using the keyword context, and several different keywords indicate how the expression should be interpreted, e.g., inv and derive.

Enumerations and Class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required