Model transformation
Model transformations (also model-to-model transformation or M2M transformation ) are an important means in model-driven software development (MDSD) or model-driven architecture (MDA).
Model transformations usually occur as an additional step between validation and code generation . You prepare the imported models as the code generator expects. Transformation rules are defined at the metamodel level. Both the source and the target model must be instances of defined metamodels.
Types of model transformations
Model-to-model transformation (M2M)
Model modification (also: in-place transformation) : Here, the transformation does not create a new model, but rather modifies the source model . This type of transformation is often used to add a few simple things to models. For example, you could add an 'emergency stop' state for a state machine and then connect this to all modeled states via new transitions. The following always applies here: source model == target model
Outplace transformation : In these somewhat more complex scenarios, one or more source models are transformed into one or more target models. The source models are not changed and the metamodels can (but do not have to) be different. The following always applies here: source model = target model
Model-to-Text Transformation (M2T)
The generation of text artifacts from models is known as a model-to-text transformation. The generation of source code from models, i.e. H. the code generation can be considered as a model transformation.
Technologies
- QVT - The OMG standard for meta-model-based model-to-model transformation
- MOF2Text - The OMG standard for metamodel-based model to text transformation
- Xpand - part of the OpenArchitectureWare generator framework to describe model-to-model transformations, model modifications and code generators .
- Atlas Transformation Language (ATL) - A model to model transformation toolkit based on the Eclipse Modeling Framework
-
Graph replacement - Models are typically graphs that can be transformed using graph replacement tools and declarative graph replacement rules.
- Triple Graph Grammar - A model transformation technique based on graph substitution
- EMorF - A toolkit based on the Eclipse Modeling Framework for in-place model transformations and model-to-model transformations
See also
literature
Overview work on model transformations
- Krzysztof Czarnecki, Simon Helsen: Classification of Model Transformation Approaches. In: OOPSLA'03 Workshop on Generative Techniques in the Context of Model-Driven Architecture. (PDF)
- K. Czarnecki, S. Helsen: Feature-based survey of model transformation approaches. In: IBM Syst. J. Volume 45, No. 3, 2006, pp. 621-645, ISSN 0018-8670 , doi: 10.1147 / sj.453.0621 - Revised version of the workshop paper from 2003
On model-driven software development in general
- Thomas Stahl, Markus Völter, Sven Efftinge: Model-driven software development. Techniques, engineering, management . 2nd, updated and expanded edition. Dpunkt-Verlag, Heidelberg 2007, ISBN 978-3-89864-448-8 .
- Georg Pietrek, Jens Trompeter (Ed.): Model-driven software development. MDA and MDSD in practice. Developer Press, Frankfurt am Main 2007, ISBN 978-3-939084-11-2 .