UML&OCL Modeling Languages


OCL Constraints: vocabulary

  1. There is a standard language to express constraints: the OCL whose main components are represented in the following figure:

OCL's elements.
  1. Another way to express invariant is:
context p:Person
invariant age_correct: 
  (p.age>0) and (p.age<150)

3 - 9