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

Chapter 10. Advanced Constructs

This chapter describes all the constructs with which you can write more advanced expressions, ranging from expressions that can be used only in postconditions to definitions of variables that are local to a context definition.

Constructs for Postconditions

There are two ways to write constraints for operations: preconditions and postconditions. In postconditions, you can use a number of special constructs. Two special keywords represent, to some extent, the working of time: result and @pre. Another aspect of time is represented by messaging. The following subsections explain all the constructs that can be used in postconditions only.

The @pre Keyword

The @pre keyword indicates the value of an attribute or association ...

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