HowTo - Metamodel comparison use case

This HowTo explains how to create weaving models that are used to compare metamodels and to produce ATL transformation.

The general approach of this use case is explained in more details in the Use Cases section.

Instructions

Metamodels: these metamodels are injected into Ecore by clicking in the context menu "Inject KM3 into Ecore metamodel":
- Scade.km3
- ScadeNew.km3;

Producing a new weaving model

A weaving model containing a reference to the woven models (Scade versions) is created manually using the AMW wizard. It creates one root element:

Executing the matching transformations

The AMW plug-in provides a set of matching transformations that automate the task of creating weaving models. To execute these transformations, open the context menu of the weaving panel (the middle panel) and select the "Match" submenu. This submenu contains a list of the matching transformations available.
This use case executes 5 matching transformations: "Cartesian product", "Name Equality", "Threshold", "Link rewriting" and "Link rewriting - non equivalence". Each matching transformation produces a new weaving model, and adds a predefined suffix to it. This is because we don't want to override the current model. Thus, the new weaving model should be opened to be able to execute the subsequent transformation.

Generating and extracting the ATL transformation

The AMW plug-in contains a higher-order transformation (HOT) that interprets the weaving model and that produces an ATL transformation. To execute this transformation, open the context menu of the weaving panel (the middle panel) and select the "Transform" submenu. Then click on "Generate transformation (HOT)". This action produces an ATL model (ScadeCmp_cp_equal_thres_lr_hot.ecore).
The output transformation model is extracted to an ATL file by clicking in the context menu "Extract ATL-0.2 model to ATL-0.2 file".

Installation requirements:

The AMW, ATL and AM3 plug-ins must be installed. See the download page.

Remark(s):

All the injection and extraction menus (Ecore and ATL) are available in the "AM3" perspective and in the "AM3 Resource Navigator" view.