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.
In this document, we propose a new model transformation framework for EMF, called EMF Tiger.
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:
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 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:
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.
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.
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.
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.
The following parties have expressed their interest in EMF Tiger:
Back to the top