Date post: | 01-Nov-2014 |
Category: |
Technology |
Upload: | baran19901990 |
View: | 605 times |
Download: | 4 times |
MDA
Content
• MDA framework – Transformation
• Meta-model – Meta-language
• A transformation tool takes a PIM and transforms it into a PSM.
• A second (or the same) transformation tool transforms the PSM to code.
• We have shown the transformation tool as a black box. It takes one model as input and produces a second model as its output.
• When we open up the transformation tool and take a look inside, we can see what elements are involved in performing the transformation.
• Somewhere inside the tool there is a definition that describes how a model should be transformed.
• For example, define a transformation definition from UML to C#, which describes which C# should be generated for a (or any!) UML model.
• Transformation definition consists of a collection of transformation rules (unambiguous).
• We can now define transformation, transformation rule, and transformation definition.
• A transformation is the automatic generation of a target model from a source model, according to a transformation definition.
• A transformation definition is a set of transformation rules that together describe how a model in the source language can be transformed into a model in the target language.
• A transformation rule is a description of how one or more constructs in the source language can be transformed into one or more constructs in the target language.
METAMODELINGIntroduction to Metamodeling
• We defined a model as a description of (part of) a system written in a well-defined language.
• How do we define such a well-defined language?
Models, languages, metamodels, and metalanguages
• Languages were often defined using a grammar in BNF.
• For example, have a graphical syntax, like UML.
• However, BNF restricts us to languages that are purely text based.
• We will need a different mechanism for defining languages in the MDA context.
• This mechanism is called metamodeling.
• A model defines what elements can exist in a system.
• The model of the language describes the elements that can be used in the language.
Models, languages, metamodels, and metalanguages
• Because a metamodel is also a model, a metamodel itself must be written in a well-defined language.
• This language is called a metalanguage.• First, a metalanguage plays a different role than a modeling language in
the MDA framework, because it is a specialized language to describe modeling languages.
• Secondly, the metamodel completely defines the language.
The Use of Metamodeling in the MDA
• First, we need a mechanism to define modeling languages, such that they are unambiguously defined, a transformation tool can then read, write, and understand the models. Within MDA we define languages through metamodels.
• Secondly, the transformation rules that constitute a transformation definition describe how a model in a source language can be transformed into a model in a target language. These rules use the metamodels of the source and target languages to define the transformations.