Skip to main content

ATL Use Case - Using a UML modeler to generate metamodels

ATL Logo Papyrus

This use case shows how to use and integrate a model transformation service in a UML Modeler to generate metamodels conforming to KM3, MOF 1.4, and Ecore.

Keywords

UML Modeler, UML 2, Metamodels, Ecore, MOF 1.4, KM3

Overview

This use case presents how the Papyrus UML Modeler could be used to generate metamodels. Papyrus is a dedicated tool for modelling within UML2 developed by CEA LIST. This open source tool is based on the Eclipse environment.

Metamodel definition

A metamodel is a model that defines the concepts and relationships that may be created in a model. A model always conforms to a metamodel. This relation is called conformance. The conformance relation has a different nature than the representation relation between a model and its system. A metamodel does not represent a model (that could be considered a system), but only the concepts and relationships that may be created. A metamodel conforms to a metametamodel.

The metamodel will be generated from its description done via a UML 2 Class Diagram produced with Papyrus (an open-source graphical modeler tool for UML2 and based on Eclipse). UML 2 Class Diagrams are the mainstay of object-oriented analysis and design. They show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and attributes of the classes. Class diagrams are used for a wide variety of purposes, including both conceptual/domain modeling and detailed design modeling. The figure below presents an example of UML Class Diagram made with Papyrus.



Sample of UML 2 Class Diagram

From a UML Class Diagram, there is the possibility to generate a metamodel in the following formats:

  • KM3: KM3 (Kernel Meta Meta Model) is a neutral language to write metamodels and to define Domain Specific Languages.
  • EMF XMI 2.0, conforming to Ecore: Ecore is the metametamodel used by EMF. The EMF project is a modeling framework and code generation facility for building tools and other applications based on a structured data model.
  • MDR XMI 1.2, conforming to MOF 1.4: MOF (Meta Object Facility) is an OMG standard enabling to describe metamodels through common semantics.

To see how to configure and run the "Generate Metamodel" ATL service, please take a look to the User Guide.

Each action (e.g. "Generate metamodel in Ecore") will execute a corresponding ATL model transformation (e.g. "UML 2.0 to Ecore"). Both following figures present samples of generated metamodels in EMF XMI 2.0 and KM3 formats.

Related Use Cases

None at the current time.

Download

Papyrus, an open-source graphical modeler tool for UML2 and based on Eclipse.

KM3

KM3 is a neutral language to write metamodels and to define DSL.

ATL Service

Papyrus add-in containing the implementation of this use case.

User Guide

This user guide explains how to configure and launch the ATL service in Papyrus.

Source code

Source code of the ATL scenario used in this use case.

Acknowledgement

The present work is being supported by the Usine Logicielle project of the System@tic Paris Region Cluster.
General Information

Back to the top