ATL Use Case - Rational Rose to UML2 Tools

ATL Logo

This use case shows how we can reuse UML projects created with Rational Rose and import them in GMF (specifically in UML2 Tools) using ATL transformations. In this use case, we only support UML class diagrams. In practice, this use case was applied to the QVT metamodel available on the OMG site (document ad/2005-09-01).

Keywords

Rational Rose, MDL, GMF, UML2, UML2 Tools

Overview

In this use case, we essentially have to deal with two problems. The first problem is that the UML Model created by Rational Rose conforms to a specific grammar based on Petal syntax, and called MDL. This syntax is neither XML nor XMI, so we need a specific reader. The second problem is that the MDL model contains more than one UML diagram, whereas each GMF diagram is a separate model. Therefore, we need to find out how we can generate n models using the same ATL transformation.

To deal with these problems, we start by developing the MDL reader using TCS. The MDL metamodel is depicted in Figure1. The whole project is available in the TCS Zoo.



Figure 1: The MDL metamodel

Once we can read the MDL model, the next step is to write the transformation to UML. In this transformation, we preserve the same structure of packages as in the MDL file.

The second step is to write a transformation from MDL and UML to GMF diagrams. The MDL model is needed to gather the graphical information. The UML model is necessary because some GMF elements points to UML elements.

Finally, we create an ant script in order to assemble all these transformations into a single executable entity. This script must additionally deal with the multi-diagram generation problem mentioned above.

The full transformation scenario is depicted in Figure 2:



Figure 2: MDL to UML2.1 and GMF

As we can see on the left, the input of this transformation is an MDL file, and the result on the right is a several GMF models which refer to an only one UML model.

In this transformation scenario, we needed to produce not only one GMF model but several models, that it is why we used two ATL transformations instead of only one which could produce the UML and the GMF model in one shot. The important thing here is how we can propagate the reference of uml elements generated by the first transformation to the second. The solution implemented is to generate with the first transformation an annotation for each UML element which can hold the [MDL ID].

Screenshots

The first screenshot below shows an example of result which is a QVT relation diagram imported to UML2 tools using ATL. And the second shows how the diagram looks like in Rational Rose (This tool is no longer available, so we used RSM).

As we can see, the positions and colors of nodes are preserved. Some features like: the state of compartments (collapsed or not), associations, and dependencies are not supported in the diagram. The reason is that UML2 Tools do not provide full multi-diagram support.

Imports results from Rational Rose to UML2 tools


UML2 Tools : QVT Relation diagram


Imports results from Rational Rose to RSM


RSM: QVT Relation diagram

Available features

  • Support of 14 UML elements.
  • Export the color and position of nodes.
  • Multi-diagrams support.

Possible extensions

  • Preserve the same bendpoints used in MDL file for links.
  • Produce shortcuts for associations (It is not possible with current UML2 tools).
  • Produce the state for compartments (It is not possible with current UML2 tools).
  • Test performance on emfvm (Actually, It is not possible because emfvm has not yet supported metamodel extension)
  • Tests and enhancements maybe needed for the MDL reader.
  • Resolve the problem of scale (Elements are relatively small compared to distances between them).
  • Resolve the problem of scale (Elements are relatively small compared to distances between them).
  • Complete class diagram (95% done)
  • Work on other diagrams.

Related Use Cases

None at the current time.

Download

Complete scenario

Scenario MDL to GMF available in the ATL transformation zoo (with source files).

Acknowledgement

The present work is being partially supported by the OpenEmbeDD project.
General Information