An OCL expression acting as the derived value of an attribute must conform to the defined type of the attribute. An OCL expression acting as the derived value of an association end must conform to the type of the association end, i.e. the type of the attached Classifier when the multiplicity is maximum one, or OrderedSet with element type the type of the attached Classifier when the multiplicity is maximum more than one.
A derived value expression is an invariant that states that the value of the attribute or association end must always be equal to the value obtained from evaluating the expression.
Note The placement of a derived value expression is dependent
upon the UML 2.0 metamodel. So are the well-formedness rules for this case.