Skip to main content

ATL Use Case - Measuring UML models

ATL Logo Papyrus

This use case shows how to use and integrate a model transformation service in a UML Modeler to compute and generate quality measures on UML models.


UML Modeler, UML 2, Measures


This use case presents how the Papyrus UML Modeler could be used to compute and generate quality measures on UML models. Papyrus is a dedicated tool for UML2 graphical modelling developed mainly by CEA LIST. This open source tool is based on the Eclipse environment.

The figure below presents an example of UML Class Diagram made with Papyrus. Measures will be generated and computed on this working example:

Sample of UML 2 Class Diagram

The generation of measures on a UML model allows to perform several investigations. For example measuring the various models may bring interesting insight into the consideration of these models. Furthermore comparing similar measures applied to models of various origins may bring interesting observations.

From a UML Class Diagram, the following measures are available and will be computed when the ATL service "Generate Measures" will be executed:

  • Total Number of Packages: TNP is the total number of packages in the model.

  • Total Number of Classes: TNC is the total number of classes in a package or the model.

  • Total Number of Attributes: TNA is the total number of attributes in a class, package or the model.

  • Depth Inheritance Tree: In cases involving multiple inheritances, the DIT will be the maximum length from the node to the root of the tree.

  • Number of Children: NOC is the number of immediate subclasses subordinated to a class in the class hierarchy.

  • Number of Attributes: NA is defined as the total number of attributes in a class.

  • Number of Attributes Inherited: NAI is defined as the total number of attributes inherited by a subclass.

  • Attribute Inheritance Factor: The Attribute Inheritance Factor (AIF) is defined as a quotient between the sum of inherited attributes in all classes of the system under consideration and the total number of available attributes (locally defined plus inherited) for all classes.

Others and more complex measures could be easily added and implemented by modifying the corresponding ATL transformation. To see how to configure and run the "Measuring UML models" ATL service, please take a look to the User Guide.

The computed metrics will be displayed in 3 different representations: Tabular HTML, SVG Bar Chart, and SVG Pie Chart. The figures below present the sample results generated from our working example:

  • Tabular HTML

  • SVG Bar Chart

  • SVG Pie Chart

Related Use Cases

None at the current time.


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

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.


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

Back to the top