MOLA Tool Architecture

MOLA Tool is designed as a freeware tool for supporting research and development in the MDA and MDSD areas. Current version of MOLA Tool (MOLA2 Tool) implements the MOLA transformation language (MOLA2 final). MOLA Tool consists of two parts - the Transformation Development Environment (TDE) and the Transformation Execution Environment (TEE).
The main components of TDE are:

The TEE consists of the metamodel-based in-memory repository and the transformation executable. Currently mii_rep
, JGralab and EMF are supported. The repository must contain the respective metamodel (which also can be built by the MOLA Tool). We offer several solutions to execute compiled transformations in such a way staying more flexible:

This section provides a more detailed view to MOLA Tool architecture.
MOLA Tool is an academic non-commercial tool which implements the MOLA model transformation language (MOLA2 final version). The development of MOLA program is done using the MOLA Transformation Development Environment (TDE). Since MOLA is a graphical transformation language, graphical editors are required. Metamodel and MOLA diagram editors are built on the basis of METAclipse framework, a plug-in of metamodel based platform Eclipse. Therefore, the look and feel of editors are very similar to Eclipse standards. Extensions of GEF, GMF runtime, Common Navigator and Tabbed Properties Eclipse views are used.
The metamodel editor allows creating the metamodels which are used by MOLA transformation. The metamodel may consist of more than one class diagram; the same element (class, enumeration, etc.) may be displayed in several diagrams. The integrity of metamodel is maintained automatically by metamodel editor, if an element in a class diagram is changed, e.g. the name of a class is changed, then appropriate changes are made in all other class and even MOLA diagrams. MOLA diagram editor allows creating transformation diagrams (MOLA procedures). Since information from the metamodel is widely used in MOLA procedures, the MOLA diagram editor offers sophisticated prompters, e.g. displaying a list of associations which can be used as type for association link. Thus, mostly syntactic correct constructs are allowed in MOLA diagram editor.     
Another important part of TDE is the MOLA compiler (actually, set of compilers). MOLA compiler checks the syntax correctness of MOLA program and creates the executable. If errors are found, then the list of errors is displayed and the "problematic" elements are highlighted in MOLA diagrams. Compiler generates OOPL code from a MOLA transformation, which after the compilation is capable of executing against an appropriate model repository. Three different target repositories are available. Compiler generates C++ code against the API of high performance custom model repository mii_rep built by UL IMCS. Two other compiler versions generate Java code, one against the open source high performance graph/metamodel based repository JGraLab built at the University of Koblenz. However, the most important for wide usage of MOLA is the compiler version generating Java against the API of Eclipse EMF, which is the most popular model repository kind so far. The result of compilation is the executable file (jar or dll). The definition of corresponding repository is also created by MOLA compiler. 

Figure 1: MOLA TDE and MOLA TEE

METAclipse framework is a metamodel and transformation based tool building platform, which is specially fit for the support of complicated graphical domain specific languages, and MOLA is such a language. From the technical point of view, METAclipse is a set of Eclipse plug-ins which extends the functionality of standard Eclipse components EMF, GEF and partially, GMF. It contains advanced presentation engines, which support graphical diagram building, property editing and all other diagram and model related facilities. More precisely, the engines perform all the various visualisation and user interaction related tasks in a standard way typical to Eclipse environment, they do these jobs on the basis of a fixed presentation metamodel. However, the main functionality of a tool based on METAclipse is defined by transformations, which link the domain and presentation (visualisation) models in the tool, fill up property dialogs, and process the updated property values. In METAclipse framework these tool-specific transformations are built in MOLA. More about METAclipse you can find in our Publications page (A. Kalnins, O. Vilitis, E. Celms, E. Kalnina, A. Sostaks, J. Barzdins: Building Tools by Model Transformations in Eclipse.  and O. Vilitis, A. Kalnins. Technical Solutions for the Transformation-Driven Graphical Tool Building Platform METAclipse)

MOLA Compiler uses lower level model transformation language L3 as an intermediate compilation target language. Actually, a chain of compilers is used. L3 transformation is compiled further to L0 language transformation which is compiled to Java or C++ code. Finally Java or C++ compiler is used to obtain the executable (jar or dll) file. Since a MOLA program is stored in the METAclipse repository as a model, compilation steps, MOLA to L3 and L3 to L0, are the model-to-model transformations written in L3 language. Use of model transformations specifying compilers is called model-driven compiling. More about model-driven compiling you can find in our Publications page (A. Sostaks, A. Kalnins. The Implementation of MOLA to L3 Compiler.)

Execution of MOLA transformations are performed using MOLA Transformation Execution Environment (MOLA TEE). MOLA TEE consists of the metamodel-based in-memory repository and the appropriately compiled transformation executable. Repository must contain the respective metamodel (which also can be built by the MOLA TDE). MOLA TEE offers several possibilities how to run transformations:
Transformation Runner is built as an Eclipse plug-in. It allows executing MOLA transformation on an EMF model.
- Repository Browser is built as Java application which allows browsing the content of repository in tabular view and executing transformations. It is compatible with all supported repositories.
- Transformation can be integrated directly in your software. If your software uses one of mii_rep, JGralab or EMF repositories, then transformations can be executed directly on models loaded in the memory. MOLA transformations are suitable for integration into a modelling tools as plug-ins, e.g. as Rational Software Architect plug-in (it uses EMF) or Enterprise Architect plug-in (import/export facilities needed from EA repository).

MOLA TDE and MOLA TEE are available in our Downloads page.
Older versions of MOLA Tool are described here: MOLA1 Tool, MOLA2 early versions.