- Tech know how online

model transformation

A model transformation is a model-to-model mapping. The transformation term is directly related to the terms model and metamodel, and its understanding is required in the context of Model Driven Software Development( MDSD). Model transformation transforms platform-independent models into platform-dependent models as well as program code.

Transformation rules describe how elements of the source model are transformed into a target model. A transformation rule for Unified Modeling Language ( UML) models, for example, is typically formulated at the UML metamodel level and often uses UML profiles - the mechanism for extending UML. Distinctions exist for transformations with respect to the source and target models - a distinction is made between endogenous and exogenous transformations. In addition in dependence on the abstraction levels into horizontal and vertical transformations one differentiates. In connection with MDSD characteristics developed for the differentiation of transformations regarding their conversion. Transformation methods are distinguished between model-to- text transformations and model-to-model transformations. Transformation systems support specific transformation methods.

Known transformation systems

Well-known transformation systems include the ATLAS Transformation Language( ATL), the IBM Model Transformation Framework( MTF), the Java Emitter Templates( JET), transformations with the ARIS Business Architect, and XLST. With Query View Transformation( QVT), a budding standard for describing model transformations has existed for some time. Further transformation languages are UMLX - a graphical language for the specification of transformations on UML object models - as well as languages for the so-called graph transformation like TIGER( TU Berlin) and VIATRA2 (University of Budapest).

A transformation generally refers to a reshaping or reshaping. In the context of MDSD, a model transformation is defined as the automated transition from a source model to a target model depending on a so-called transformation definition - which is a set of transformation rules. Thus, a transformation rule represents a description of how one or more elements of the source model are transformed into one or more elements of the target model. The rules always consist of a right and left part. Parts of the rule that refer to the source model are also called Left-Hand-Side (LHS) - analogously, parts that refer to the target model are called Right-Hand-Side (RHS).

The concepts and their relationships in a language are generally defined by its abstract syntax - this also applies in the context of specific modeling languages. Based on this abstraction, a distinction is also made with regard to endogenous or exogenous transformations. With an endogenous transformation between models their abstract syntax of the modeling languages is in each case the same. In the context with program transformations in the literature also of Reprashing one speaks. As examples of endogenous transformations optimizations, simplifications or normalizations of source models are to be called. Consequently with an exogenous transformation the syntaxes of the model transformations to be considered are explicitly different, which leads to call the exogenous transformation also translation. Synthesis, reverse engineering or migration are classical exogenous transformations.

The vertical and horizontal transformation

In addition, one distinguishes horizontal and vertical transformations. This definition is based on the idea that models can represent the underlying originals on different levels of abstraction. Provided that source and target model are on the same abstraction level, this is called horizontal transformation. An example is the migration of software, where models of a source language are transferred to a target language considering the same aspects. In contrast to this; if source and target model are not on the same abstraction level, one speaks of vertical transformation. If, for example, the source language is on a higher level of abstraction than the target language, a vertical transformation is to be assumed - this is also referred to as refinement. The transformation of a specification into executable program code is such a Refinement.

The conversion of transformations can take place in different way. In this connection, different characteristics have developed in the context of the MDSD, which are ultimately also the basis for different languages for model transformation. Regarding their conversion transformations are differentiated on the basis following characteristics:

  • The transformation rules, which can be unidirectional or bidirectional. Unidirectional means mapping from the source model to the target model, in contrast, the bidirectional rule specifies mapping in both directions.
  • In rule scheduling, multiple rules must be applied for transformation.
  • In localization, a rule is applied only to a certain part of the source model.
  • The direction of transformations - again unidirectional and bidirectional transformations are distinguished. This aspect must be taken into account when synchronizing models.
  • The organization of rules, which can be divided into modules depending on certain criteria.

From so-called transaction systems different transformation methods as well as techniques are distinguished. The following transformation techniques have emerged:

  • Model-to-text transformations
  • Model-to-model transformations
In the first approach text is produced, which is not checked however thereby for the underlying metamodel. This is different with a model transformation; here the conformity of the model to the metamodel is checked during the execution. With the transformation methods are differentiated:

Visitor Method This approach implements a so-called visitor mechanism. This then allows the model representation - for example UML - to be traversed and the code to be generated from it as a text stream. A well-known project in this context is Jamda. This represents UML models by Java classes and realizes a code writer, which runs through the models and generates the code from it.

Template method The basis of the generation are templates. These are in text format and consist of two parts. One part provides access to the source model, while the second part consists of text and expressions that allow modifying the text depending on the source model.

Direct Manipulation An API is provided to specifically access the model representation. An object-oriented framework implements this application programming interface (API).

Structure Driven First, the hierarchical structure of the target model is created. In a second step, attributes and references to the various model elements are then added to this model.

Operational Extends the Direct Manipulation approach in the sense that additional information is available for transformation. In the simplest case, this can be realized, for example, by extending a language such as OCL.

Model Template Here, the template again consists of fragments of a model, so that when the target model is created, a check is made to ensure that it conforms to the metamodel.

Relational Here the relationships between model elements are expressed by the mathematical concept of relations

Graph transformation Models are represented by graphs, which in turn are generated by corresponding graphical notations. Specific graph transformation rules are defined for the transformation.

Only the main transformation methods have been mentioned here, besides there are other hybrid approaches that combine the different transformation methods and techniques.

Systems that support transformation methods and techniques are called transformation systems. A wide spectrum of transformation systems exists. Examples in this respect are:

  • ATLAS Transformation Language (ATL), a language for describing transformation definitions,
  • Java Emitter Templates (JET), part of the Eclipse Modeling Framework( EMF), text artifacts are generated by applying templates,
  • IBM Model Transformation Framework, prototype transformation system for relational transformation methods,
  • Transformation in ARIS Business Architect, supports transformation formulated through a JavaScriptinterface,
  • Extensible Stylesheet Language Transformation( XSLT), transformation rules are described using templates,
  • Query View Transformation (QVT), imperative language for describing model transformations,
  • UMLX, graphical language for specifying transformation based on UML object models.
Englisch: model transformation
Updated at: 13.04.2010
#Words: 1216
Links: transformation, mapping, model driven software development (MDSD), platform, program
Translations: DE

All rights reserved DATACOM Buchverlag GmbH © 2022