AMW Examples HowTo

From Eclipsepedia

Jump to: navigation, search

< To: AMMA
< To: GMT

Contents

Graphical development of ATL transformations

The Atlas Model Weaver has a new plug-in extension that enables to graphically develop simple ATL transformations. This extension enables to create simple ATL transformations using the graphical interface of AMW. This extension does not intend to support all the features of the ATL metamodel. It is a first step to rapidly develop ATL transformations.

For the moment, the plug-in is available only in the AMW CVS. The plug-in name is "org.eclipse.gmt.weaver.qatl". It contains the weaving metamodel extension, the sources, and an illustrative example. We explain below how to use this extension.

First it is necessary to create a weaving model using the AMW wizard (this is explained in details in the User Guide).

It is necessary to do the following steps:

  • In the first page of the wizard, select the metamodels/mmw_qalt.km3 extension.
  • In the second page, select a name for the weaving model.
  • In the third page, add two new metamodels (Add model button), one for the input and other for the output. The input model must be associated with the InModelRef, and the output model with the OutModelRef.
  • After that, a weaving model only with a Module element is created. The user must use the context menu (right-click) to create the weaving elements. The prototype proposes the valid elements, such as rules, input and output elements, bindings.

An example of transformation is shown in the Figure below.

SimpleATL.jpg

After the weaving model is created, the user should generate the corresponding ATL model. This action is available in the context menu, Simple ATL to ATL. This action creates an ATL model in the same folder as the weaving model (e.g., family2person_atl.ecore). The last step is to extract this model into the ATL concrete syntax, by right-clicking in the ATL model and choosing Extract ATL-0.2 model into ATL-0.2 file

Multiple source patterns

Many AMW examples use ATL matching transformations with multiple source patterns, i.e., ATL rules that match more than one element. This feature needs the ATL 2006 compiler. The ATL 2006 page explains how to update your sources with this version, and how to select the correct compiler.

Installation from the sources

Check out the usual ATL sources from the CVS. Check out the "org.eclipse.gmt.atl.atl2006" project.

After the checkout, be sure the ATL transformation was recompiled. To do that, just modify and save the .atl file.

Use Cases HowTos

The AMW examples are being improved in the form of use cases. The Use Cases page contains a general overview and a HowTo for every example.

< To: AMMA
< To: GMT

AMW Examples

AMW Use Cases