UML&OCL Modeling Languages


OCL Constraints

  1. A (software) system CAN NOT be fully graphically represented !
    Take a look at the following picture and detect the mistakes ...

Syntactically but not semantically correct diagram.
  1. There is 2 kinds of restrictions/constraints to be checked (i.e. to be "correct"):
    a. invariants that are true during the whole life cycle, e.g. if X is parent of Y then Y is children of X
    b. pre-post conditions on the operations, e.g. age is incremented by 1 with an "happy birthday"

2 - 9