A Meta-Modelling Technology for CMOF-based Models

UML/MOF 2.0 offers new unique features to capture abstractions, specializations, and redefinitions. Now there is a meta-modelling standard that allows spezialisation relations between the properties of a classifier. This gives concept specialisation and reuse much more flexibility and expresivness. These new opportunities are covered by the more sophisticated flavour of MOF 2 called the CMOF-model. When you are familar UML's infrastructure or superstructure, you have already seen what CMOF is capable of, and how modular an exceptional large language can be modelled.

CMOF allows to use object-oriented techniques in a modelling environment to describe the concepts of a computer language with possibilities to reuse and extend them. This way of modelling is not only needed to model large-scale languages, like the UML, it is also useful to create domain specific extensions (UML-Profiles) or smaller domain specific languages.

Rationale

We wanted to develop a meta-modelling tool based on UML/MOF 2.0 and the CMOF-model. The goal is to capture the new modelling capabilities and provide them to the programming environment of a modern implementation language. In contrast to the earlier MOF versions 1.x, where abstraction hierarchies were usually rooted in a single "Element", leading to a limited modelling of abstractions, the new UML/MOF2.0 uses multiple abstractions, each covering a simple aspect of data-modelling, as a library for itself and your meta-modelling tasks.

We wanted to created a MOF 2.0 for the Java programming language with a featureset that is tailored to create languages and implement language tools based on meta-modelling. The main features are:

  • Implementation of the CMOF model
  • Implementation of the UML Infrastructure library. This library is used as a basis for the CMOF model, and it can be used in user meta-models, thus allowing easy development of new languages, based on a given abstract basis.
  • XMI import and export of meta-models and models
  • Reflection facilities
  • Generation of user repositories based on meta-models
  • Integration of user code for derived features and operations
  • Programming with repositories through a easy to use and type-safe API
  • Implemented redefinition and property subsetting semantics

Not yet another MOF repository

Most implementation of MOF or other meta-modelling standards, concentrate on the storage of models. They offer functionality that can be compared with those of databases or source versioning systems. Our tool is different. We are looking for a tool that allows easy programing with meta-data. Therefore, we offer a non persistent but fast model storage, and a Java language mapping that allows type-safe programming without type-casts. Combined with our MOPA tool and an integrated OCL processor, anything is there that is needed to develop model driven development tools or create domain specifc languages, using the Java programming language. Comparable technologies like IBM's Eclipse EMF, or SUN's Netbeans MDR (or other JMI implementations) do not support property supsetting or ather advanced redinfinition features and are thus only capable to cover meta-modelling at the level of MOF1.x or MOF2:EMOF. Furthermore they are based on older Java-versions, hence do not take advantage of generics or covariant return types; programming with those platforms often leads to satically unsafe programming.

Paper

The paper On Implementing MOF 2.0: New Features for Modelling Abstractions explains Javamapping and Propertyredefiniton issues and how it is done in A MOF 2.0 for Java.

  Markus Scheidgen; On Implementing MOF 2.0: New Features for Modelling Abstractions, Juni 2005

Javadoc

The Javadoc can be obtained from the download section at the bottom of this page.

Version 1.0

A MOF is now available in version 1.0; it is stable, and has proven its robustnes in a course with 30 students that where confronted with a modelling framework for their first time. Note that the newer versions can only be downloaded from our project site at berliOS.de. In addition to version 0.9 this version supports the following features:

  • Bugfixes, Bugfixes, Bugfixes.
  • Support for package merges.
  • The UML meta-model in different compliance levels; tested with MagicDraw UML-models.
  • A set of four examples, demonstrating different functionality of A MOF.

Version 0.9

A lot of important features have been implemented latelly. Note that the newer versions can only be downloaded from our project site at berliOS.de. In addition to version 0.8 this version supports the following features:

  • A lot of bugfixes and performance improvements; especially a much lower memory usage.
  • Integration of an open-source OCL processor. We integrated the OSLO OCL processor (berliOS.de in a MOF 2, it can be used for evaluating both OCL invariants and abitrary OCL queries, e.g. to implement derived attributes.
  • Distributed access to repositories for multiple clients. A MOF 2 now has EJB support; using a transparent interface, you can program agains a remote repository.
  • A model browser as eclipse plugin can be obtained seperately from our new project site (berliOS.de.)
  • The a MOF 2 distribution contains an implementation for MOPA nodes (refere to MOPA).
  • The complete UML Infrastructure abstractions library with implementations for derived features and operations
  • ANT-tasks for a simpler invocation of repository generation during automated build processes

Version 0.8

We recently released version 0.8 of the meta-modelling tool; it can be downloaded in the download section at the bottom of this page. In addition to version 0.7 this version supports the following features:

  • A revised update semantics, the setting of subsetted, redefined and associated properties does now follow more intuitive semantics
  • An import for XMI data created by the popular unisys UML/MOF 1.x plugin for rational rose. You can use the UML export funtionality and import created XMI into the A MOF 2 for Java.
  • A refactored and revised source code structure. The source code is available since this version.
  • User code can now be provided for operations.

There are some important MOF features that are still not yet implemented. Those are:

  • Package merges
  • Element identification based on the Identifier package defined in MOF 2.0 Core
  • Meta-modelling based on EMOF - this is not planed to be implemented

Version 0.7

The version 0.7 of our model repository tool is an older version; it can be downloaded at the bottom of this page. This version supports the following features:

  • The CMOF model is available. It is used as the tools M3-Model
  • The abstractions part and the primitive types of the UML Infrastructure are available.
  • Interfaces and repositories can be generated based on user-models written in CMOF. Repositories can be extended by user code in a transparent way.
  • Import and Export of XMI 2.0
  • CMOF-Reflection can be used.
  • A very simple query language.

There are important MOF features that are not yet implemented. Those are:

  • Package merges
  • Element identification based on the Identifier package defined in MOF 2.0 Core
  • User code can only be provided for derived features.
  • Meta-modelling based on EMOF - this is not planed to be implemented

Downloads

Please note: A MOF 2.0 for Java has now its own project at the open source development site berliOS; use the link A MOF 2 at berliOS to navigate to it. Newer downloads can only be optained from there. The older versions can still be found below on this now deprecated site.

There are two file for download; one containing A MOF 2.0 for Java as a library of compiled class files, and one containing Javadoc.

The source code is provided under the LGPL. Apache ant and a Java 5 are needed to build the sources; download the sources, use "ant dist" to initiate the build. It will create exactly those two files that you can also download as the binary distribution.

A MOF 2.0 for Java uses jdom and xerces. Jdom is an open source implementation for a simpler version of the DOM XML recommendation, which can be downloaded from www.jdom.org. Xerces is a XML tool set, which can be downloaded from www.apache.org. We included jdom and xerces binaries in our source and binary releases, please be aware of different licenses and copyrights that apply to those files.

The tutorial gives an simple introduction into how you use A MOF 2.0 for Java.