3.11 Summary


In this chapter you have learned how a model can benefit from OCL expressions. For every UML diagram, we have indicated where OCL expressions can be added.

The class diagram may benefit from OCL expressions stating derivation rules, initial values, body of query operations, invariants, and preconditions and postconditions. OCL expressions can also be helpful in specifying cycles, defining derived classes, and specifying dynamic and optional multiplicity.

In component or deployment diagrams, OCL expressions can be used to specify explicitly mentioned interfaces and classes.

The interaction diagram and activity diagram can be improved by specifying instances and actual parameter values, and by stating conditions.

The statechart may be augmented with guards , explicit targets of actions, and actual parameter values. Change events and restrictions on states can also be expressed using OCL.

In a use case, the pre- and postconditions can be written using OCL.

Finally, we examined different modeling styles, and learned some useful tips for building models.



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