Developing matching heuristics and integrating with AMW

The AMW plug-in provides a set of matching transformations that automatically create weaving models. However, it may be necessary to develop new transformations, due to several reasons: to develop new heuristic methods; to better tune the existing heuristics; or to execute several transformations at the same time and with different weights.

The AMW plug-in provides an extension point that enables to easily plug new matching transformations. This page explains how to contribute to this extension point. This is a technical document that requires previous knowledge about development of Eclipse plug-ins.

Extension point to plug transformations




AMW 2006


This extension point enables defining matching transformations and higher order transformations that are executed using the context menus of the weaving panel. The transformations must follow a specific signature.

There is two types of transformations that can be executed:

- matching: the matching transformations are added in the menu "Match". The matching transformations produce a new weaving model with a suffix added to the file name.

create OUT : AMW from IN : AMW, left : MOF, right : MOF;

- HOT; the higher-order transformations are added in the menu "Transform". The higher-order transformations produce an ATL transformation model. This model is used to transform the models conforming to the left metamodel into models conforming to the right metamodel.

create OUT : ATL from IN : AMW, left: MOF, right: MOF;

The developer must indicate the transformation file ('.asm'). The weaving model opened in the weaving panel is the input weaving model.

The developer must also indicate which references from the weaving model are equivalent to the left and right input models (from the transformation signature). This allows using different metamodel extensions tp define the left and right models.

Configuration Markup:

<!ELEMENT extension (matching* , hot*)>

<!ATTLIST extension



<!ELEMENT matching (binding+)>

<!ATTLIST matching

transformation CDATA #REQUIRED

description    CDATA #REQUIRED

file_suffix    CDATA #REQUIRED>

<!ELEMENT binding EMPTY>

<!ATTLIST binding


header    CDATA #REQUIRED>


This example defines one matching and one higher order transformation. The "leftM" reference of the weaving model is assigned to the "left" model of the transformation. The "rightM" reference of the weaving model is assigned to the "right" model of the transformation. The other models are assigned automatically.


<extension id="TransformationExtension" point="org.eclipse.weaver.transformationID">

<matching transformation="transformations/Assign_NameSimbyType.asm" description="Name equality" file_suffix="eq">

	<binding reference="leftM" header="left"/>
	<binding reference="rightM" header="right"/>


<hot transformation="transformations/AMWtoATL_Match.asm" description="Generate transformation" file_suffix="hot">

	<binding reference="leftM" header="left"/>
	<binding reference="rightM" header="right"/>


Supplied Implementation:

There is a default implementation of this extension point in the Transformation Extension plugin: "org.eclipse.weaver.transformation".