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 ...

Get Object Constraint Language, The: Getting Your Models Ready for MDA, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.