AMW Use Case - Bridge between Domain Specific Languages (DSLs) and UML profiles

AMW Logo

This use case presents a bridge between Domain Specific Languages (DSLs) and UML profiles. Domain Specific Languages (DSLs) and UML profiles are two different views of Model Driven Engineering (MDE). DSLs aims at using small, well-focused languages dedicated to a particular domain. Each DSL can be associated to different metamodel. It provides appropriate abstractions and notations to describe a particular domain. UML profiles provide some extension mechanisms to customize UML models to a specific domain. UML profiles are used to model those aspects of systems or applications that are not directly describable by native UML elements.

Both approaches are currently used by different communities. It is important to provide tools to interoperate between them. The Object Management Group (OMG) has specified several UML Profiles (see the UML Profile Catalog) and the mappings to different metamodels (DSLs). However, the mappings are specified in a table in a text document. They cannot be processed by any tool. The bridges must be implemented manually.

We describe below how a bridge between a UML Profile and a DSL can be rapidly developed using AMW and ATL. We illustrate our approach using the UML Profile for MOF (see the OMG specification).

Overview

The bridge takes as input an UML model designed with a profile Ma.uml* and a model Ma of a specific application domain. It transforms the profiled model Ma.uml* into model Ma (conforms to the metamodel MMa), and vice-versa. The figure below shows the translation between the profiled UML into the domain specific model Ma. It is also possible to do the opposite transformation: creating Ma.uml from Ma.



Bridge between DSLs and UML profiles

Now we explain the general architecture using weaving models created with AMW and ATL transformations (see figure below). The weaving model MWeaver conforms to the weaving metamodel extension MMWeaver. This extension is available in the weaving metamodel Zoo. The weaving model defines the mappings details between the UML profile and the DSL. The mapping details describe the relationships between the concepts of the UML profile and the concepts of the DSL metamodel.

It is possible to use the UML metamodel to define every profiled UML model. However, this use case creates a specific profile metamodel. Thus, we have different profile models. This way it is not necessary to handle with different UML versions, neither to load the whole UML metamodel plus the profiles into AMW. Hence, the mapping details of the weaving model are created between the DSL metamodel MMa and a profile model ProfileForMMa (conforms to the profile metamodel ProfileMeta).

The same weaving model is used to produce two different ATL transformations: T1atl and T2atl. T1atl transforms the models conforming to the metamodel MMa to UML models created with the specific profiles. T2atl transforms UML models to models conforming to MMa.

The benefit of using a bridge separated in two levels is that we automatically produce two ATL transformations from a single weaving model. Consequently, it is possible to execute transformations in both directions. In addition, the only step that requires human intervention is the creation of the weaving model. The subsequent steps are all automatic.



General overview

The figure below shows a screenshot of a weaving model created in the AMW prototype. This weaving model contains the mapping details between a UML profile for MOF, and the MOF metamodel. This example shows the declarative definition of the weaving model. This enables to have mapping specifications independent of the transformation language, and also bi-directional. In this case we produce two ATL transformations to transform the profile for MOF into the MOF metamodel, and in the opposite direction as well.



Weaving a metamodel and a UML profile


Download and examples

Detailed description

This document contains a complete and detailed description of this use case. It identifies more precisely the relations between UML profiles and metamodels, and presents a tool using AMW and ATL that enables to bridge between these two approaches.

Presentation

This presentation is a general overview of the approach. It was created based on the detailed documentation.

Publication

The publication titled "A Practical Approach to Bridging Domain Specific Languages with UML profiles" presents the motivations of creating bridges between DSLs and UML profiles. It also shows the main issues that appeared while developing a MDE solution.

Example

This example implements a bridge between MOF and a UML profile for MOF.

User guide

This user guide presents the main steps on how to configure AMW an ATL to run the example.

Related use cases

Matching

Matching is the generic process that creates weaving models. This use case gives a general overview of the matching process, and how it is handled by AMW and ATL.

Metamodel comparison

This use case demonstrates how weaving models are used to compare different metamodels and to produce executable model transformations (we use two metamodels used to define embedded software in the avionics industry).

Bridge between SQL and KM3

This use case shows how weaving models and model transformations are used to translate SQL-DDL (Data Definition Language) into KM3 (a modeling technical space) and to translate KM3 into SQL.

Relational DB to XML

This use case shows how weaving models can be used to perform the data mapping between relational DBs and XML.

Merge of geographical information (GML) and statistical data

This use case presents a weaving model used to define a merge operation between a metamodel with geographical information (an extension of GML) and a metamodel with statistical data into a graphical representation (SVG).

System Architecture (SA) management

This use case shows how to map the overlapping concepts of different views of a complex system. It uses a System Architecture (SA) framework called DoDAF (Department of Defense Architecture Framework).

Acknowledgement

This work is supported by the OpenEmbeDD project.