EMO2GGX converts model transformations developed with the EMF Modeling Operations (EMO) tool to graph transformations. Since the outputted graph transformations use AGG's native GGX file format, they can be imported by and analyzed with AGG. EMO2GGX is currently implemented as a prototype and is available as source code only.


The EMF Modeling Operations (EMO) tool provides a by-demonstration environment to specify model transformations, called operations, for Ecore-based models. The structure of an operation is specified by the Operation Specification (Meta-)Model, and persisted as XMI files.  For more information on EMO visit http://www.modelversioning.org/emf-modeling-operations.

The Attribute Graph Grammar (AGG) offers a state-of-the-art platform to specify algebraic graph transformations consisting of a left-hand side (LHS) and a right-hand side (RHS). Optionally, Negative Application Conditions and Graph Constraints may be specified. AGG saves the created graph transformations in its GGX format, for which a DTD is available and distributed with the AGG platform. For more information on AGG visit http://user.cs.tu-berlin.de/~gragra/agg/.


Currently, EMO2GGX is a research prototype, and as such it does have a couple of limitations regarding the conversion process. For example, EMO2GGX does neither support the conversion of OCL expressions nor does it resolve cross-references between EMO templates. Further, only a single rule may be exported to the generated GGX file. Moreover, inheritance relations found in the metamodel associated with the EMO operation are not (yet) converted.



The following pre-requisites are necessary to

EMO2GGX Installation

  • Download the EMO2GGX Eclipse project. The source code archive is available here.
  • Import the EMO2GGX project into Eclipse via File > Import... > Existing Projects Into Workspace > Select archive file by selecting the downloaded source code archive.

Running EMO2GGX

In order to run the prototypical implementation of EMO2GGX you need to configure an Acceleo Run Configuration. An Acceleo Run Configuration is created via Run > Run Configurations.... In the appearing dialog select Acceleo Application and click the New launch configuration button. The following figure depicts a sample configuration:

Setting entries Project, Main class, and Target of the Run Configuration to the values specified in the above figure, leaves entries Model and Properties to be specified by you. Entry Model needs to point to the location of the operation you want to convert to the GGX format.  The Properties entry needs to point to the location of the metamodel the operation is specified for.

The Enclose Variabe Example

The EMO2GGX prototype 'ships' with an example that converts an Enclose Variable refactoring operation specified with EMO to a correspondent GGX file. EMO2GGX reads in the operation, i.e., enclose-variable.operation, and the metamodel of the instances, on which the operation is able to perform the Enclose Variable refactoring, i.e., classdiagram.ecore. The result is written to encloseVariable.ggx located in the src-gen folder.

Running the Enclose Variable Example

In order to run the Enclose Variable example you need to create an Acceleo Run Configuration as outlined above and insert the values depicted in the figure below:


Then, hit Run and wait for the conversion to complete. You may now inspect the results of the conversion by opening the encloseVariable.ggx file located in the src-gen folder.