Towards the Completion of the Formal Semantics of OCL 2.0

The Object Constraint Language (OCL) is part of the Unified Modeling Language (UML) to specify restrictions on values of a given UML model. As part of the UML 2.0 standardization process, a proposal for the new version OCL 2.0 has recently been adopted by the Object Management Group. This proposal provides extensive semantic descriptions by both a metamodel-based as well as a formal mathematical approach, but these two semantics are currently neither consistent nor complete. In particular, the formal semantics of the OCL 2.0 proposal currently lacks descriptions of ordered sets, global OCL variable definitions, UML Statechart states, and OCL messages. This article provides corresponding definitions to overcome these deficiencies. We also define a notion of execution traces that capture all system changes of a running system that are necessary to be able to evaluate OCL constraints.