Content deleted Content added
Rewrote, expanded, added refs |
|||
Line 1:
A '''model transformation''', in [[model-driven engineering]], is an automatable way of ensuring that a family of models 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
== Classification of model transformations ==
Model transformations and languages for them have been classified in many ways<ref name="CzarneckiHelsen"/><ref name="Stevens-landscape"/>.
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. For the remainder of this entry we assume the commonest case, in which the transformation takes one model as input and gives one model as output.
=== Endogenous versus exogenous ===
An endogenous model transformation modifies a model which is given to it as input (in-place transformation). For example, a model refactoring could be implemented using an endogenous model transformation. An exogenous model transformation produces a new model as output. For example, in a process conforming to the [[OMG]] [[Model Driven Architecture]], a Platform Independent Model might be transformed into a Platform Specific Model 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 the 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 transformations 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 models, 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 consistent 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<ref name="Stevens-properties"/>.
== Languages for model transformations ==
Main article: [[Model transformation language]].
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]].
In some model transformation languages, for example the [[QVT]] languages, a model transformation is itself a model, that is, it conforms to a metamodel which is part of the model tranformation language's definition. This facilitates the definition of '''Higher Order Transformation'''s (HOTs)<ref name="Tisi"/>, i.e. transformations which have other transformations as input and/or output.
==See also==
Line 24 ⟶ 52:
== References ==
{{Reflist
<ref name="CzarneckiHelsen">
{{Cite journal
| doi=10.1147/sj.453.0621
| last1=Czarnecki
| last2=Helsen
| title=Feature-based survey of model transformation approaches
| year=2006
| journal=IBM Systems Journal}}
</ref>
<ref name="Stevens-landscape">
{{Cite journal
| doi=10.1007/978-3-540-88643-3_10
| last=Stevens
| first=Perdita
| title=A landscape of bidirectional model transformations
| publisher=[[Springer]]
| ___location=Berlin / Heidelberg
| year=2008}}
</ref>
<ref name="Stevens-properties">
{{Cite journal
| doi=10.1007/s10270-008-0109-9
| last=Stevens
| first=Perdita
| title=Bidirectional model transformations in QVT: semantic issues and open questions
| publisher=[[Springer]]
| ___location=Berlin / Heidelberg
| year=2010
| journal=Software and Systems Modeling}}
</ref>
<ref name="Tisi">
{{Cite journal
| doi=10.1007/978-3-642-02674-4_3
| last=Tisi
| first=Massimo
| title=On the Use of Higher-Order Model Transformations
| publisher=[[Springer]]
| ___location=Berlin / Heidelberg
| year=2009
| series=LNCS
| volume=5562
| journal=ECMDA-FA '09}}
</ref>
}}
{{DEFAULTSORT:Model Transformation}}
|