Professional Documents
Culture Documents
Departement Informatique
Telecom Bretagne
Author
GOLRA Fahad Rafique
Supervisors
DAGNAT Fabien
BEUGNARD Antoine
4 octobre 2010
1 Modeling Layers
When talking about the modeling layers, there are different poles ha-
ving different interpretations of their own. But they all take modeling as
a multi-layered phenomenon. Talking about two adjacent layers, one layer
would be M n−1 and the other would be M n , which allows us to think of an
unlimited number of layers upon which the system modeling can be based.
The other most common approach is the four-layers metamodeling pyramid
of Object Management Group(OMG) [3], presented in Figure 1. Here the
first layers is M 0 , the data layer where the final running system lies. Above
this layer is M 1 , the Models layer where lie all the models related to the
specific system under study. Then above this layer lies M 2 , the metamodel
layer. The metamodel layers is the concrete layer to which all the models
of M 1 conform. A very good example of this layer can be the metamodel
of Unified Modeling Language (UML) itself i.e. UML describes itself at this
layer. And finally in M 3 lies the Meta Object Facility (MOF), which can
be termed as meta-metamodel. All the metamodels further conform to this
MOF. Thus UML metamodels conform to the MOF, residing at a higher
layer of abstraction. MOF is the topmost layer and it is built upon itself.
1
Figure 1 – The four-layer metamodeling pyramid from MOF Specifications
after [2]
2
Figure 2 – OMG four-layer hierarchy after [8]
X−
→ Y : ∃Tα | X = Tα (Y ) (1)
α
X−
→ Y : ∃Tγ | Y = Tγ (X) (2)
γ
Till date there is no definition of metamodel upon which all the stake-
holders unanimously agree. According to UML2.0 MOF Model specification,
”A metamodel is a model used to model modeling itself” [3], where as many
contradict the idea of terming a metamodel as a model of models [13]. A me-
tamodel is also defined as a ”specification model for a class of SUS (System
Under Study) where each SUS in the class is itself a valid model expres-
sed in a certain modeling language” [4]. Amongst all the different points of
view regarding the metamodels, one common thing can be sensed that there
exists a relationship ”conforms-to” between the models and their metamo-
dels. This is the reason why, we disagree to Figure 2 and agree to Figure 3.
As already discussed we are using an unlimited number of modeling layers,
in order to have the flexibility of expression. In practice much of the layers
are not used, but taking off the restriction gives us the authority to model
with clarity. Other technical spaces are mostly using three levels.
3
Figure 3 – Conformance relationship between modeling layers
2 Model Transformation
There are different technologies used to model the system out of which
Model Driven Architecture (MDA) has been proposed by OMG in its UML2.0
specification [1]. MDA is in fact a representation of the system design in
terms of models that can be transformed from one form to another till the
generation of code and is based on a certain set of rules. An overview of
MDA can be found in [9].
As shown in the Figure 4, a transformation complies to its transforma-
tion definition, which contains all the transformation rules. A transforma-
tion rule is an equation which maps the constructs of source language to the
constructs of target languages. A rule is defined using different variables,
patterns and logic [9]. The model transformation is defined in [4], as :
4
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.
We do not agree with this definition of transformation, as it accounts only
for the automatic generation transformations. In our point of view, a trans-
formation can either be automatic or it can be semiautomatic. An automatic
transformation would be a transformation where no manual intervention is
required. But looking from an abstract point of view, a composite transfor-
mation(explained in the next section) may be composed of automatic trans-
formations and some manual interventions. Thus we stick to the fact that
a transformation can either be automatic or semi-automatic. Furthermore,
this definition does not take into account the fact that a transformation can
have multiple models as inputs and outputs. We also contradict with the
idea that the model changes from source language to target language, as at
times, like in optimization, the source and the target languages can be the
same.
Now the point here is that the models are transformed in the M n−1 layer
and their respective metamodels remain at M n layer, but the metamodels at
times remain the same. Figure 5 can be referred to see this transformation.
The transformed model Mι supposing that its not the first model created is
transformed to Mι+1 , where Mι conforms to some metamodel M Mι where
as the Mι+1 conforms to some other metamodel M Mι+1 . So in this case,
all the transformations are being done in the M n−1 layer (which if in the 4
5
Figure 4 – Transformation insight
6
Let M0 , Mn be the models that conform to the metamodels M M0 and
M Mn respectively. Then a transformation can be viewed as
TD
M M0 −→ M Mn M n Layer
↑ ↑
M0 −→ Mn M n−1 Layer
T
If M0 is the initial model and Mn is the goal model. Thus the composite
transformation 2 Tw transforming M0 to Mn (M0 → Mn ) is
Tw = Tj J∈[0,n]
| M Mι −→ M Mι+1 |
| ↑ ↑ |
| Mι −→ Mι+1 | ι∈I
Tι
2. Composite transformations are denoted using double headed arrow
7
2.3 Transformation Process
As we discussed earlier that modeling is no more an assistance to un-
derstand the system under study, it has become a part of the development
process. Now models can be transformed from the requirements gathering
process till the code generation and even testing using model transforma-
tions. So we take a transformation as a process, and we would define a
transformation process as :
8
Figure 6 – Intention modeling of vertical transformation
Using the intentional modeling defined in [16], we have modeled the dif-
ference between horizontal and vertical transformations. Taking abstraction
as a subset of the intention in the context of model transformations, we
denote it by S. M1 being the source model and M2 being the target model
in this intentional modeling, both have a representation of relationship bet-
ween them. Figure 6 is presenting the vertical transformation, where M2 is
a refinement of M1 . As the (subset of) intention S depicts that it has exten-
ded the intention for the transformation. Here, we have M1 as a synthetical
partial representation of M2 , depicting the fact that M2 is generated from
M1 . Then we have a synthetical partial representation of M1 as S, which
depicts that the intention of abstraction extends the initial level of abs-
traction of M1 . And finally we have an analytical complete representation of
M2 as S, which states that M2 and S have same intention generated from S.
9
Figure 7 – Intention modeling of horizontal transformation
(PDM) this PIM is transformed to a PSM. PSM’s in turn are free to use
DSL’s or general purpose languages. But this transformation from PIM to
PSM is not always a one step process, and each step produces a unique
transformed model. Each transformed model conforms to a metamodel. But
taking into account the horizontal transformations one (or more) source mo-
del(s) can be transformed to one (or more) target model(s), where both of
them lie in the same layer. Now considering both the transformations we
can say that it follows a two dimensional progression as in Figure 8
One can notice in Figure 8 that the vertical transformations span over
two adjacent layers, and the horizontal transformations remain within a
layer. This must not be confused with the fact that the source and the tar-
get models for horizontal transforms conform to the same metamodel. As a
matter of fact, this difference is explained well in [17], where the transfor-
mations between the models of the same modeling language are termed as
rephrasing and the transformations amongst models of different modeling
languages are called translation. A more clear taxonomy is provided in [15]
where the term endogenous transformations is used for the transformations
where the source and the target models conform to a single metamodel, whe-
reas exogenous transformations are defined as transformations where source
and target models conform to different metamodels. So in the transforma-
tions shown in the Figure 8 both the horizontal and the vertical transfor-
10
Figure 8 – Model Transformations spanning over multiple layers
11
Figure 9 – Relations between modeling layers
1. M10 = M1
2. M10 ' M1
In the case (2), the ( ' ) symbol means that both models conform-to
(µ) a single metamodel. This definition of conforms to can be stated as,
M ' M 0 ⇐⇒ ∃M M | (M µ M M ) ∧ (M 0 µ M M ) (3)
12
Figure 10 – A meta transformation definition
13
At the end, what we would want is an automatic generation of not only
the models but also the metamodels to which the methodology models map.
Thus rules would be needed to allow metamodel transformation that can im-
plement this novel idea. Such a collection of rules would be in fact a language
for metamodel transformation definition. This idea should not be confused
with Higher Order Transformations[14], as the higher-order transformations
take transformations as input and then produce a transformation as output.
This is true that they also handle transformation at a higher level of abstrac-
tion but they work on transformations instead of metamodels. In our work,
the source and target models are not transformations but the metamodels,
where we plan to add up business constraints and fine transformation defi-
nitions in transformation model and then add up some universal constraints
to the meta-transformation definition.
14
Références
[1] Model driven architecture specification. URL http://www.omg.org/
mda/specs.htm.
[2] Meta object facility (mof) specification. Version 1.4, April 2002.
[3] Meta object facility (mof) core specification. Version 2.0, January 2006.
[4] Wim Bast Anneke Kleppe, Jos Warmer. MDA Explained : The Model
Driven Architecture : Practice and Promise. Addison-Wesley, April
2003.
[6] Colin Atkinson. Supporting and applying the uml conceptual frame-
work. In P-A. Muller J. Bzivin, editor, The Unified Modeling Lan-
guage : Beyond the Notation, volume 1618 of Lecture Notes in Compu-
ter Science, pages 21–36. Berlin : Springer-Verlag, 1998.
[7] Colin Atkinson and Thomas Kuhne. The essence of multilevel meta-
modelling. In Proceedings of the 4th International Conference on The
Unified Modeling Language, Modeling Languages, Concepts, and Tools,
volume 2185 of Lecture Notes in Computer Science, pages 19–33. Sprin-
ger Verlag London, UK, 2001.
[12] Michael Jackson. Some basic tenets of description. Software and Sys-
tems Modeling, 1(1) :5–9, September 2002.
[13] Mokrane Bouzeghoub Jacky Estublier Jean Marie Favre Jean Bzivin,
Mireille Blay. Rapport de synthese. In J. Bzivin L. Duchien R. Marvie
15
S. Grard B. Baudry M. Bouzeghoub J-M. Jzquel M. Blay J. Estublier, J-
M. Favre and M. Riveil, editors, Action Specifique CNRS sur l’ingnierie
Dirige par les Modles. January 2005.
[14] Piero Fraternali Stefano Ceri Massimo Tisi, Frdric Jouault and Jean
Bzivin. On the use of higher-order model transformations. In Model
Driven Architecture - Foundations and Applications, volume 5562 of
Lecture Notes in Computer Science, pages 18–33. Springer Berlin /
Heidelberg, June 2009.
[15] Tom Mens and Pieter Van Gorp. A taxonomy of model transformation.
In International Workshop on Graph and Model Transformation (Gra-
MoT 2005), volume 152 of Electronic Notes in Theoretical Computer
Science, pages 125–142, March 2006.
16