You are on page 1of 13

Measuring the Level of Abstraction and Detail of Models in the Context of MDD

Student:
Institution: Date:

HENG Sotharith
University of Bretagne Occidendale 13 January 2012

Presentation Plan

Transformation in MDD
Motivation Model definition Measuring as a transformation chain

Metrics
Example Conclusion
1

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Transformation in MDD

Models in MDD are transformed automatically into other models. This lead to transformation chains.
Abstract (platform independent) models are used to define the systems semantic. Concrete (platform specific) models are used to define platform detail The code is generated from this concrete models If the platform is changed only the platform specific models (PSM) have to be redefine, while platform independent models (PIM) can be reused.

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Motivation
Goal:
Setup or improve an efficient transformation chain.

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Model definition

In this work, we define models as graphs G = (V,E) with vertices V and edges E or labeled graphs G = (V, E, l) with labels l.
The elements of the graph are associated to elements of the metamodel. In his General Model Theory Stachowiak defines models using three features:

Mapping feature: A model is always a model of some original, in which the original can be a model itself. Reduction feature: A model does not reflect all attributes of the original. Pragmatic feature: Models are assigned to an original by some subject (human or machine).
4

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Measuring as a transformation chain

In terms of MDD, measuring can interpreted as a transformation chain.

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Metrics

The semantic size of a model M is defined here as the number of its attributes A.
sem(M) = |A| (1)

For sem(M1) we also write sem1 or |A1|

The size of a model M is defined here as the sum of the vertices of the model graph, its edges and the graph itself.
size(M) = |V | + |E| + 1 (2)

For size(M1) we also write size1. We add 1 to the number of vertices and edges in order to count the graph itself.
6

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Metrics (contd)

Models M1 is more abstract than a model M2, if it omits more attributes.


Or model M1 contains less platform detail than a model M2, if less graph elements represent the attributes expressed by the model. We expect a transformation to preserve semantics. The semantic can only be added manually.

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Metrics (contd)

We can calculate how much semantics is stored in a single graph element (ratio of abstraction and detail) as below:
(3)

We cannot measure the semantic size. For transformation chain generated by a transformation. , M1 was not

We assume that a special domain specific language was used to create that model, and thus we minimize the necessary glue elements. We assume: (4) We assume that the ratio is constant:
1 2 1 = 2 => = 1 2

(5)
8

We can calculate semantic size of M2 as below:


1 2 2 = 2 = 1

(6)

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Example

Transformation of use case models to class models:

We can write two transformation chain as follows:

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Example (contd)

We can easily see that the second transformation chain C2 (dotted line) is more efficient than C1 (solid line). So, according to our goal, we choose C2 when setting up the development process.

10

[Transformation in MDD][Motivation][Model Definition][Measuring as Transformation chain][Metrics][Example][Conclusion]

Conclusion

These metrics solves the goal of setting up an efficient transformation chains.


Even if it is not possible to explicitly count or retrieve the semantic content of a model, it is still possible to compare several models. In longer transformation chains, we have to develop further efficiency criteria, e.g. by measuring the area below the transformation chain graphs.

11

Thank you

You might also like