EMF Tiger - Component Proposal

The project has been created. Please visit the project page.

Introduction

EMF Tiger is a proposed new open source project under Eclipse Modeling Framework Technology (EMFT) to provide a model transformation based on structured data models and graph transformation concepts.

This component is in the Pre-Proposal Phase (as defined in the Eclipse Development Process) and this document is written to declare its intent and scope. This proposal is written to solicit additional participation and input from the Eclipse community. You are invited to comment on and/or join in the development of the component. Please send all feedback to the eclipse.technology.emft newsgroup.

Scope

In this document, we propose a new model transformation framework for EMF, called EMF Tiger.

Model Transformation Languages

In model driven engineering, the notion of model transformation refers to techniques for defining and performing complex operations on structural data models. Two different types of model transformations can be distinguished:

  1. Exogenous / source-target transformations: a model of a source language is translated into a model of a target language.
  2. Endogenous / in-place transformations: a single model is modified directly.
Endogenous transformations are often considered as a special case of exogenous transformations where the source and the target metamodel are identical. From another perspective, one can also regard the source, target and an additional reference metamodel in an exogenous transformation as a joint metamodel of an endogenous transformation. Both viewpoints are valid. To that end, the purpose of a model transformation often determines its type, e.g. language translations are usually exogenous while refactorings or reconfigurations are endogenous.

There are different ways of defining and executing model transformations and it is important to note that there is in fact a difference between the two types of transformations. Just as with programming languges, there are also different kinds of model transformation languages which usually support both types of transformations but in fact are more suited for only one of them. One can basically distinguish between declarative (using pattern matching), procedural (using control-flow structures) and hybrid languages which combine both approaches. Similar to ordinary programming languages (or e.g. compilers), verification of correctness and termination of model transformations is a crucial and at the same time non-trivial task.

EMF Tiger

EMF Tiger is a tool environment for EMF model transformation. Transformations are defined and executed directly on EMF models, ensuring type safety and efficiency. Model transformation can be executed either using generated code or in an interpreter mode.

The rule-based transformation language of EMF Tiger is inspired by graph transformation concepts and combines both declarative and procedural concepts. In particular, transformation rules are declarative in the sense that a structural pattern is used to define the precondition of a rule. Procedural concepts, i.e., control-flow strutures such as layers and loops can be used to apply a set of transformation rules in a controlled manner.

Since most EMF transformations performed by EMF Tiger can be formalized by the theory of algebraic graph transformation (see e.g. [BET08] (PDF)), these model transformations can be verified. In currently ongoing research, we investigate how existing techniques for termination and confluence (correctness) checks can be adapted to EMF transformations. As future work, we also plan to incorporate model checking techniques for a detailed analysis of model transformations.

The EMF Tiger tool environment currently consists of the following constituents:

  • a transformation model
  • a transformation engine (interpreter approach)
  • a code generator that produces self-contained transformation code in Java (based on EMF-generated code)
  • a tree-based editor for transformations rules (generated with EMF)
  • a graphical editor for transformations rules
  • export utilities for third-party graph transformation tools (for analysis)

The frontend is currently under reconstruction. We plan a set of GMF-generated editors for instance models and transformation rules. Furthermore, a visual debugger for model transformations is planned.

Our long-term goal is to make EMF Tiger a comprehensive tool environment for endogenous in-place EMF model transformations. It shall comprise convenient user-friendly editors for complete model transformation systems, including already existing EMF model editors, a visual debugger, code generator facilities, as well as validation and verification tools for EMF model transformation.

Language Concepts

EMF Tiger is a rule-based transformation language with both, declarative (pattern matching) and procedural aspects (control-flow structures). A transformation rule consists of two model instances (a set of objects with references between them): a left-hand side (LHS) and a right-hand side (RHS). The LHS defines the pattern to be matched (precondition) and the RHS the in-place modification (postcondition) of the matched model instances. Optional negative application conditions (NACs) can be defined for restricting the rule application further.

Rules can be executed nondeterministally (from a pool) or using control-flow structures (e.g. layers and loops). Transformations can further include calculations on attributes. The calculations are defined as an expression on the attributes that may also involve (primitive-valued) variables.

The transformation language is defined through a metamodel. Currently, there exists a tree-based editor generated using EMF, and a graphical editor shown in the screenshot below.

This front-end consists of a (read-only) viewer for the domain models and a three-pane editor for defining rules. In this example a model for a simple refactoring for a statechart variant is shown. This particular rule moves a state (3:State) out of a composite state (2:State) up into its parent (1:State). This is possible, if all adjacent transitions already belong to the surrounding state. This condition is checked by two similar NACs, one of which is shown together with the rule.

EMF Tiger supports code generation from transformation specifications as well as an interpreted runtime mode.

Comparison with other Model Transformation Languages

The most important model transformation approaches for EMF are:

Comparing the EMF Tiger transformation language to these languages, the first obvious commonality is the rule-based definition of transformations and the use of declarative and procedural concepts. At second glance, the approach of EMF Tiger for defining and executing both source-target and in-place transformations is quite different to the other languages.

Particularly in-place transformations are not very well supported by the existing languages. For instance, ATL is defined as a language that 'provides ways to produce a set of target models from a set of source models'. Although it is basically possible to define in-place transformations in ATL, this way is not that natural because in-place transformations have to be regarded as exogenous transformations where the source and the target metamodels are the same. This has major consequences on the execution of in-place transformations, i.e., instead of performing the transformations directly on a given a model (as it is natural for e.g. refactorings or reconfigurations), large parts of the source model have to be copied in ATL. Especially for large models and small changes this is highly inefficient. It is similar with QVT, since in-place transformations are also defined as a special type of source-target transformations.

EMF Tiger supports both in-place and source-target transformation. In-place transformations in particular can be very elegantly described and executed efficiently, since the transformations are applied directly to an existing instance model. In contrast to in-place transformations, source-to-target translations require an additional reference model that keeps track of newly created elements. Note that the transformation engine itself is oblivious to the type of transformation performed, i.e., internally source-target and in-place transformations are treated in the same way.

Another key difference of EMF Tiger is its formalization by graph transformation theory (see [EEPT06] or this tutorial), which enables formal analysis of transformations. Moreover, EMF Tiger supports the visual development of transformations through its native graphical notation.

Relationship to other Eclipse Projects

Apart from the core EMF tools, EMF Tiger uses JET for code generation and GEF for the graphical editor. We currently adapt the graphical editor to use the GMF notation view model and runtime. As a longterm goal, we are planning to partially generate the editor using GMF's code generator.

As a first case study we are working on a number of refactoring rules for EMF itself (defined on its metamodel) and UML-2.

Organization

Mentors

Initial Committers

The initial committers for this project are:

Code Contributions

The EMF Tiger Developer Group at the TU-Berlin will provide an initial code contribution including the code generator and the graphical user interface.

Interested Parties

The following parties have expressed their interest in EMF Tiger:

Developer Community

The team of initial committers will explore statements of interest from additional developers experienced with EMF model transformations or willing to gain such experience.

User Community

It is expected that the user community for this component will consist of two kinds of users. On the one hand, there will be researchers and developers who design EMF transformations and on the other, there will be developers who integrate the generated EMF model transformation code in their own applications.

Tentative Plan

The first community technical preview release is scheduled for Winter 2009 and the first release is targeted for Summer 2010.

Further Information

Further information can be found on the EMF Tiger Website at the TU-Berlin.