Model transformation: Difference between revisions

Content deleted Content added
 
(40 intermediate revisions by 28 users not shown)
Line 1:
{{Data transformation}}
{{Refimprove|date=April 2009}}
 
A '''model transformation''' in [[Model-driven engineering]] takes as input a model conforming to a given [[Metamodeling|metamodel]] and produces as output another model conforming to a given metamodel.
A '''model transformation''', in [[model-driven engineering]], is an automated way of modifying and creating [[platform-specific model]] from platform-independent ones. An example use of model transformation is ensuring that a family of [[Computer model|model]]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.
If the source and target metamodels are identical, the transformation is called '''endogeneous'''. If they are different the transformation is called '''exogeneous'''.
If the level of abstraction does not change, the transformation is called '''horizontal'''. If the level of abstraction does change, the transformation is called '''vertical'''.
These two distinctions are [[orthogonal]].
 
A model transformation usually specifies which models are acceptable as input, and if appropriate what models it may produce as output, by specifying the [[Metamodeling|metamodel]] to which a model must conform.
A model transformation may also have several source models and several target models.
One of the characteristics of a model transformation is that it is also a model, i.e. it conforms to a given metamodel. This facilitates the definition of '''Higher Order Transformation'''s (HOTs)<ref>(See [[Massimo Tisi et. al. On the Use of Higher-Order Model Transformations. Lecture Notes in Computer Science, 2009, Volume 5562/2009, 18-33, DOI: 10.1007/978-3-642-02674-4_3 ]]</ref>, i.e. transformations taking other transformations as input and/or transformations producing other transformations as output.
 
== Classification of model transformations ==
Several [[model transformation language]]s (in short MTL) are presently available <ref>(See [[Model Transformation Language#Available transformation languages|list of available transformation languages]]</ref>
 
Model transformations and languages for them have been classified in many ways.<ref name="CzarneckiHelsen"/><ref name="Stevens-landscape"/><ref name="Jakumeit"/>
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.<ref>Tom Mens, Pieter Van Gorp: A Taxonomy of Model Transformation. Electr. Notes Theor. Comput. Sci. 152: 125-142 (2006)</ref> For example, in a process conforming to the [[Object Management Group|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 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]]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 (database)|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|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 [[Object Management Group|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 transformation 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 17 ⟶ 45:
* [[Domain-specific language]] (DSL)
* [[Model transformation language]]
* [[Program refinement|Refinement]]
* [[Transformation (disambiguation)]]
* [[Program transformation]]
Line 24 ⟶ 52:
 
== References ==
{{Reflist}}|refs=
<ref name="CzarneckiHelsen">
== Further reading ==
{{Cite journal
*''Model Driven Architecture: Applying MDA to Enterprise Computing'', [[David S. Frankel]], John Wiley & Sons, ISBN 0-471-31920-1
| doi=10.1147/sj.453.0621
*''[http://drops.dagstuhl.de/opus/volltexte/2005/11 A Taxonomy of Model Transformations]'', Tom Mens, Krzysztof Czarnecki and Pieter Van Gorp, 2005
| last1=Czarnecki
| last2=Helsen
| title=Feature-based survey of model transformation approaches
| year=2006
| journal=IBM Systems Journal| volume=45
| issue=3
| pages=621–645
| citeseerx=10.1.1.124.9674
}}
</ref>
 
<ref name="Stevens-landscape">
=== External links ===
{{Cite book
*[http://www.omg.org/mda/mda_files/Model-Driven_Architecture.pdf ''Model-Driven Architecture: Vision, Standards And Emerging Technologies''] at omg.org
| doi=10.1007/978-3-540-88643-3_10
*[http://www-128.ibm.com/developerworks/rational/library/3100.html ''An Introduction to Model Driven Architecture''] at ibm.com
| last=Stevens
*[http://www.methodsandtools.com/archive/archive.php?id=5 ''Understanding the Model Driven Architecture (MDA)''] from Methods & Tools
| first=Perdita | title=Generative and Transformational Techniques in Software Engineering II
*Czarnecki, K, and Helsen, S : Classification of Model Transformation Approaches. In: Proceedings of the OOPSLA'03 Workshop on the Generative Techniques in the Context Of Model-Driven Architecture, Anaheim, California, USA. [http://www.swen.uwaterloo.ca/~kczarnec/ECE750T7/czarnecki_helsen.pdf ''Webpublished.'']
| chapter=A Landscape of Bidirectional Model Transformations
* Portal site ''MDA and Model Transformation'': [http://www.model-transformation.org/ site access]
|author-link=Perdita Stevens
| volume=5235
| pages=408–424
| publisher=[[Springer Publishing|Springer]]
| year=2008| series=Lecture Notes in Computer Science
| isbn=978-3-540-88642-6
| chapter-url=https://www.research.ed.ac.uk/en/publications/f1706efc-3370-472c-b506-bd65680a04b6
}}
</ref>
 
<ref name="Stevens-properties">
{{Cite journal
| doi=10.1007/s10270-008-0109-9
| last=Stevens
| first=Perdita |author-link=Perdita Stevens
| title=Bidirectional model transformations in QVT: semantic issues and open questions
| year=2010
| journal=Software and Systems Modeling| volume=9
| pages=7–20
| s2cid=371579
| url=https://www.pure.ed.ac.uk/ws/files/12628301/bidirectional.pdf
}}
</ref>
 
<ref name="Tisi">
{{Cite book
| doi=10.1007/978-3-642-02674-4_3
| last=Tisi
| first=Massimo
| title=Model Driven Architecture - Foundations and Applications
| chapter=On the Use of Higher-Order Model Transformations
| publisher=[[Springer Publishing|Springer]]
| year=2009
| series=LNCS
| volume=5562
| pages=18–33
| journal=Ecmda-Fa '09| isbn=978-3-642-02673-7
}}
</ref>
 
<ref name="Jakumeit">
{{Cite journal
| doi=10.1016/j.scico.2013.10.009
| last1=Jakumeit
| last2=Buchwald
| last3=Wagelaar
| last4=Dan
| last5=Hegedüs
| last6=Herrmannsdörfer
| last7=Horn
| last8=Kalnina
| last9=Lano
| last10=Lepper
| last11=Rensink
| last12=Rose
| last13=Wätzoldt
| last14=Mazanek
| title=A survey and comparison of transformation tools based on the transformation tool contest
| year=2014
| journal=Science of Computer Programming| volume=85
| pages=41–99
| doi-access=free
}}
</ref>
}}
 
==Further reading==
* ''Model Driven Software Engineering in Practice'', Marco Brambilla, Jordi Cabot, Manuel Wimmer, foreword by [[Richard Soley]] ([[Object Management Group|OMG]] Chairman), Morgan & Claypool, USA, 2012, Synthesis Lectures on Software Engineering #1. 182 pages. {{ISBN|9781608458820}} (paperback), {{ISBN|9781608458837}} (ebook) http://www.mdse-book.com
 
{{DEFAULTSORT:Model Transformation}}
[[Category:Systems engineering]]
[[Category:Unified Modeling Language]]
 
[[de:Modelltransformation]]
[[fr:Model driven architecture]]
[[gl:Model-driven architecture]]
[[ja:モデル変換]]
[[zh:模型驱动架构]]