The UML project

UCL Logo
Sourceforge project page
UML 1.5 API Logo

Formalising the UML meta-model

As part of ongoing research at the Department of Computer Science University College London we are looking into ways to improve the usability of the UML specification from the OMG.

Past research has looked at a number of different ways to formalise the semantics of languages such as UML, many of them based on formal mathematical notions.

We take a more evolutionary approach. First, we wish to recover from OMG language specifications, which are currently distributed in PDF form, and contain large amounts of natural language, those elements that are well-defined, such as the meta-model and OCL constraints. These we will convert into concrete redistributable artefacts. In particular this will involve ensuring the quality of the OCL constraints, which are notoriously prone to syntax, type and semantic errors when included in informal documents. Second, we will embed the remaining natural language elements of the definition as documentation accessible in the meta-model. This documentation is not necessarily machine interpreted, but will always be present when the meta-model is used, for example via the reflective interfaces in a JMI repository. This approach, which is analogous to literate programming, supports a range of semantic definition styles, from natural language to mathematical formalism, as almost any data can be embedded in the meta-model.

To demonstrate the approach we have begun the implementation of the UML 1.5 standard as what we call a 'language specification', in effect a documented meta-model. In the future we may progress to converting the UML 2 standard also.

In practice, converting the standard amounts to producing an EMOFOCL specification for the language, as described in the EMOFOCL2 module documentation.

The status of the work is as follows:

  • All static elements of the UML 1.5 meta-model have been represented. This includes all packages, types, attributes and operations. Due to the lack of association classes in the EMOF meta-model some features of these classes in the standard have been merged with other classes.
  • All types in the meta-model have been documented according to the descriptions provided by the semantics chapter of the specification.
  • All features in the Model Management, Core and Extension Mechanisms packages are also documented.
  • All side-effect free operations and invariants in Model Management, Core and Extension Mechanisms have been rewritten into conformant, apparently logical OCL expressions.
  • The specification as it stands passes syntax and type checking by the EMOFOCLToXMI parser and has been compiled to a JMI repository and also to HTML documentation.

The HTML documentation for the language is available here.

The API documentation for the generated UML JMI repository is available here.

The JMI repository generated for the specification is available as a project file release and via CVS in the module UCLUML.

Remaining tasks are completion of documentation and translation of OCL constraints. Furthermore, having the documentation in this form, with the possibility to implement a JMI repository for the language opens the possibility of testing the OCL constraints and meta-model for semantic consistency with the natural language definitions, a level of validation not previously applied to any OMG modelling language specification.

Back home