Defining OCL expressions using templates.

OCL expressions are an essential part of UML. The current versions of OCL fail to have a meta-model which means that the integration of OCL with the UML meta-model cannot be formally defined [1]. This can result in ambiguous descriptions of systems which may compromise designs. The need to redesign the OCL has been addressed by a number of proposals submitted to the OMG. In this paper we demonstrate how a definition for OCL can be stamped out from a small number of templates. Such an approach enables a high level of reuse and an increased confidence that the definition is correct. This work forms part of the 2U consortium’s efforts for the definition of UML 2.0.