HowTo - Model difference use case
|
This is a step by step document that explains how to generate the generic match and difference transformations, and how
to execute them.
The use case was applied to two different KM3 models,
Relational and
Class. The initial configuration is set up to
the
Relational models.
Installation
-
Install ATL, AM3 (tested with CVS version of Feb 21st, 2007). Do not forget the antlr.jar
and ant-contrib.jar files. These jars are used in
the Ant Scripts.
-
Install the Atlas Model Weaver (tested with CVS version of Feb 21st, 2007). See the
download page. This use case requires the installation
of the AMW Model Handler plug-in (org.eclipse.gmt.weaver.amw4atl).
-
Create a new Eclipse launch config (Eclipse Application). Tested with JRE 1.5.0_06.
-
Import the project HOTMatchAndDiff into the workspace
Configuration
Folder's description
build/
-
ATLFiles/ : contains the HOTs (higher-order transformations) used to generate the match, diff and patch transformations.
-
metamodels/ : contains the weaving metamodels for the match&diff, match parameters & TCS (for ATLModel2ATLFile).
-
models/ : contains the TCS (textual concrete syntax) model used to extract an ATL model into an ATL file. (ATL-0.2-TCS.ecore)
metamodels/
This folder contains the input metamodels (Class and Relational). It is necessary to have a KM3 an an Ecore version of each metamodel.
models/
This folder contains the sample input models (KM3 and Relational), and the patched model.
output_matchAndDiff_<KM3>/
This folder contains the weaving models generated after the match and diff transformations, and the patch transformation.
Configuration of the Ant Scripts
-
Refresh Tab: select "Refresh the project containing the selected resource"
-
Build Tab: select "Build the project containing the selected resource"
-
Classpath Tab: add antcontrib.jar & antlr.jar
-
JRE Tab: select "Run in the same JRE as workspace"