A model transformation, in
model-driven engineering
Model-driven engineering (MDE) is a software development methodology that focuses on creating and exploiting domain models, which are conceptual models of all the topics related to a specific problem. Hence, it highlights and aims at abstract re ...
, is an automated way of modifying and creating models. An example use of model transformation is ensuring that a family of
model
A model is an informative representation of an object, person or system. The term originally denoted the Plan_(drawing), plans of a building in late 16th-century English, and derived via French and Italian ultimately from Latin ''modulus'', a mea ...
s is consistent, in a precise sense which the software engineer can define. The aim of using a model transformation is to save effort and reduce errors by automating the building and modification of models where possible.
Overview
Model transformations can be thought of as programs that take models as input. There is a wide variety of kinds of model transformation and uses of them, which differ in their inputs and outputs and also in the way they are expressed.
A model transformation usually specifies which models are acceptable as input, and if appropriate what models it may produce as output, by specifying the
metamodel
A metamodel or surrogate model is a model of a model, and metamodeling is the process of generating such metamodels. Thus metamodeling or meta-modeling is the analysis, construction and development of the frames, rules, constraints, models and ...
to which a model must conform.
Classification of model transformations
Model transformations and languages for them have been classified in many ways.
Some of the more common distinctions drawn are:
Number and type of inputs and outputs
In principle a model transformation may have many inputs and outputs of various types; the only absolute limitation is that a model transformation will take at least one model as input. However, a model transformation that did not produce any model as output would more commonly be called a model analysis or model query.
Endogenous versus exogenous
Endogenous transformations are transformations between models expressed in the same language. Exogenous transformations are transformations between models expressed using different languages.
[Tom Mens, Pieter Van Gorp: A Taxonomy of Model Transformation. Electr. Notes Theor. Comput. Sci. 152: 125-142 (2006)] For example, in a process conforming to the
OMG Model Driven Architecture
Model Driven Architecture (MDA) is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models. Model Driven Architecture is a kind of doma ...
, a
platform-independent model
A platform-independent model (PIM) in software engineering is a model of a software system or business system that is independent of the specific technological platform used to implement it.
The term platform-independent model is most frequently ...
might be transformed into a
platform-specific model
A platform-specific model is a model of a software or business system that is linked to a specific technological platform (e.g. a specific programming language, operating system, document file format or database). Platform-specific models are indis ...
by an exogenous model transformation.
Unidirectional versus bidirectional
A unidirectional model transformation has only one mode of execution: that is, it always takes the same type of input and produces the same type of output. Unidirectional model transformations are useful in compilation-like situations, where any output model is read-only. The relevant notion of consistency is then very simple: the input model is consistent with the model that the transformation would produce as output, only.
For a bidirectional model transformation, the same type of model can sometimes be input and other times be output.
Bidirectional transformation
In computer programming, bidirectional transformations (bx) are programs in which a single piece of code can be run in several ways, such that the same data are sometimes considered as input, and sometimes as output. For example, a bx run in the fo ...
s are necessary in situations where people are working on more than one model and the models must be kept consistent. Then a change to either model might necessitate a change to the other, in order to maintain consistency between the models. Because each model can incorporate information which is not reflected in the other, there may be many models which are consistent with a given model. Important special cases are:
*bijective transformations, in which there is exactly one model which is consistent with any given model; that is, the consistency relation is bijective. A pair of models is consistent if and only if it is related by the consistency bijection. Both models contain the same information, but presented differently.
*view transformations, in which a concrete model determines a single view model, but the same view model might be produced from many different concrete models. The view model is an abstraction of the concrete model. If the view may be updated, a bidirectional transformation is needed. This situation is known in the database field as
view-update. Any concrete model is consistent with its view.
It is particularly important that a bidirectional model transformation has appropriate properties to make it behave sensibly: for example, not making changes unnecessarily, or discarding deliberately made changes.
Languages for model transformations
A model transformation may be written in a general purpose programming language, but specialised model transformation languages are also available. Bidirectional transformations, in particular, are best written in a language that ensures the directions are appropriately related. The
OMG-standardised model transformation languages are collectively known as
QVT
QVT (Query/View/Transformation) is a standard set of languages for model transformation defined by the Object Management Group.
Overview
Model transformation is a key technique used in model-driven architecture. As the name QVT indicates, the ...
.
In some model transformation languages, for example the
QVT
QVT (Query/View/Transformation) is a standard set of languages for model transformation defined by the Object Management Group.
Overview
Model transformation is a key technique used in model-driven architecture. As the name QVT indicates, the ...
languages, a model transformation is itself a model, that is, it conforms to a metamodel which is part of the model transformation language's definition. This facilitates the definition of Higher Order Transformations (HOTs),
i.e. transformations which have other transformations as input and/or output.
See also
*
Model-driven engineering
Model-driven engineering (MDE) is a software development methodology that focuses on creating and exploiting domain models, which are conceptual models of all the topics related to a specific problem. Hence, it highlights and aims at abstract re ...
(MDE)
*
Model-driven architecture
Model Driven Architecture (MDA) is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models. Model Driven Architecture is a kind of doma ...
(MDA)
*
Domain-specific language
A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging f ...
(DSL)
*
Model transformation language
*
Refinement
Refinement may refer to: Mathematics
* Equilibrium refinement, the identification of actualized equilibria in game theory
* Refinement of an equivalence relation, in mathematics
** Refinement (topology), the refinement of an open cover in mathem ...
*
Transformation (disambiguation)
Transformation may refer to:
Science and mathematics
In biology and medicine
* Metamorphosis, the biological process of changing physical form after birth or hatching
* Malignant transformation, the process of cells becoming cancerous
* Tran ...
*
Program transformation
A program transformation is any operation that takes a computer program and generates another program. In many cases the transformed program is required to be semantically equivalent to the original, relative to a particular formal semantics and ...
*
Data transformation
In computing, data transformation is the process of converting data from one format or structure into another format or structure. It is a fundamental aspect of most data integrationCIO.com. Agile Comes to Data Integration. Retrieved from: http ...
*
Graph transformation
In computer science, graph transformation, or graph rewriting, concerns the technique of creating a new graph out of an original graph algorithmically. It has numerous applications, ranging from software engineering (software construction and also ...
References
Further reading
* ''Model Driven Software Engineering in Practice'', Marco Brambilla, Jordi Cabot, Manuel Wimmer, foreword by
Richard Soley
Richard Mark Soley (born c. 1960, in Baltimore, Maryland) is an American computer scientist and businessman, and chairman and CEO of the Object Management Group, Inc. (OMG). He is also executive director of the Cloud Standards Customer Council, ...
(
OMG Chairman), Morgan & Claypool, USA, 2012, Synthesis Lectures on Software Engineering #1. 182 pages. (paperback), {{ISBN, 9781608458837 (ebook) http://www.mdse-book.com
Systems engineering
Unified Modeling Language