The Model Synchronization Tool

This page is no longer maintained, please visit the new page at IPL.


 

Introduction

When models are modified after transformation, they need to be synchronized. This tool is used to synchronize models related by an ATL byte-code program. 

This tool is an experimental tool and is under its early development stage, so please do not put it into serious use.

Publications

Yingfei Xiong, Dongxi Liu, Zhenjiang Hu, Haiyan Zhao, Masato Takeichi, Hong Mei. Towards Automatic Model Synchronization from Model Transformations. In Proceedings of the 22nd IEEE/ACM International Conference on Automated Software Engineering, Atlanta, Georgia, November 5-9, 2007. To appear.

Download

Prerequirement: JRE 1.5 ( not work with JRE 1.6 )

Download the synchronization tool

Download the UML2Java sample (used as a running example in the paper)

Download the Class2Relational sample (used in the case study section in the paper)


A Guide to the Samples

The following steps apply when running the tool under Windows. I have not tested the tool under other operation systems. 

  1. Download a sample file and extract it to the same folder as the "BiXM.jar".
  2. Run "transform.bat" to perform the original transformation. This file also create a "*-modified.*" files for users to make modifications.
  3. Modify the files.
  4. Run "synchronize.bat" and the tool will produce the synchronized models, "*-synchronized.*" .
  5. After you have finished the test, run "clear.bat" to delete the files created during the process.

Detailed Usage of the tool

The tool has two execution mode. One is used to invoke the original ATL model transformation. This command parameters are:

java -jar BiXM.jar --f --trans <transformation url>
[--src <id>=<model> <id>=<metamodel>]
[--tgt <id>=<model> <id>=<metamodel>]

The "<transformation url>" is the url to the ATL byte-code transformation program. The parameters after "--src" specifies the input model of the program and "--tgt" specifies the output models of the program. You should use one "--src" or one "--tgt" for each input model or output model. The file "transform.bat" is a sample showing how to invoke this model.

The other mode is to synchronize models. To synchronize models, first we must annotate some attributes as key attributes that uniquely identifies model elements. This tool use the key attributes to compare models and assume no modifications will be made on key attributes.

To annotate a key attributes, we add an "eAnnotations" to an "eStructuralFeatures" element. The "eAnnotations" must have a source of "http:///jp.ac.u_tokyo.ipl.BiXM.AttributeAnnotations" and with a detail "PrimaryAttribute=true", as shown by the following example:

<eStructuralFeatures xsi:type="ecore:EAttribute" name="ID" eType="/0/Integer" iD="true">
<eAnnotations source="http:///jp.ac.u_tokyo.ipl.BiXM.AttributeAnnotations">
<details key="PrimaryAttribute" value="true"/>
</eAnnotations>
</eStructuralFeatures>

The attribute "ID" is annotated as a key attribute. You can annotate multiple attributes in one classifier, and all of them uniquely identify a model element as a group.

The command line parameters for synchronizing are:

java -jar BiXM.jar --s --trans <transformation url>
[--src <id>=<model> <id>=<metamodel>]

[--tgt <id>=<model> <id>=<metamodel>]
[--modifiedSrc <id>=<model>]
[--outSrc <id>=<model> ]
[--outTgt <id>=<model> ]
[--checkif]

--s: indicating the tool should run in synchronization mode.
--trans: specifying the URL to the ATL byte-code program. The URL contains a protocol. If you are refering to a local file, please add "file:" before the file.
--src: specifying a source model. The <id> must be consistent with the names used in the ATL program. The <model> and <metamodel> are the URLs to the model and the meta model, respectively. You can specifies multiple model by using the parameter multiple times.
--tgt: as same as "--src" excepting it specifies a modified target model.
--modifiedSrc: specifying a URL to a modified source model. The <id> should be consistent with the <id> in "--src" and the model names used in the transformation program.
--outSrc: specifying a path where the synchronized source model will be stored. The path must be a local path without "file:" prefix.
--outTgt: specifying a path where the synchronized target model will be stored. The path must be a local path without "file:" prefix.
--checkif: when this parameter is present, the tool will check the violation of conditional expressions. See the companion paper for more details.

The file "synchronize.bat" is a example to invoke the tool in the synchronization mode.

Limitations

  •  Only supporting using EMF as the model handler
  •  Only a small portion of the ATL standard library is supported

Support of other transformation languages

Our tool can support the QVT procedure language by using the transformation from QVT to ATL byte-code.