software engineering Chapter 5 System modeling.pptx
Effective Detection of Model Changes
1. Universidad de los Andes
Departamento de Ingeniería de Sistemas y Computación
Effective detection of model changes
David Méndez Acuña
Rubby Casallas Gutierrez
SÉPTIMO CONGRESO COLOMBIANO DE COMPUTACIÓN
1
2. • Context
• Problem
• Related work
• Our approach
• Conclusions and future work
2
Agenda
4. Problem
Software evolution in the context of MDSD
The problem of software evolution remains relevant in the
context of model-driven software development
A particular case of software evolution is the
master/slave co-evolution [1].
4
[[master]] [[slave]]
[[master]] [[slave]]
consistency
consistency
5. 5
Problem
Software evolution in the context of MDSD
Grammars
[[slave]]
Metamodel
[[master]]
Transformations
[[slave]]
Models
[[slave]]
6. 6
Problem
Software evolution in the context of MDSD
Grammars
[[slave]]
Transformations
[[slave]]
Models
[[slave]]Metamodel
[[master]]
9. Current approaches for model
changes detection
9
Comparison-based approaches
List of changes [2]
10. List of changes
• Add class/property
• Delete class/property
• Retype property
• Modify property multiplicity
• Generalize property by type
• Generalize property by
multiplicity
• Restrict property by type
• Restrict property by
multiplicity
• Rename class/property
• Add inheritance
• Delete inheritance
• Move property
• Pull property
• Push property
• Extract superclass
• Flatten hierarchy
• Extract class
• Inline class
11
11. Comparison-based approaches
Compare two versions of the same metamodel and discover
the differences
12
Metamodel
[[master]]
Metamodel
[[master]]
Changes
model
12. Comparison-based approaches
Compare two versions of the same metamodel and discover
the differences
13
Metamodel
[[master]]
Metamodel
[[master]]
Changes
model
EMFCompare
(syntactical) [3]
13. List of changes
• Add class/property
• Delete class/property
• Retype property
• Modify property multiplicity
• Generalize property by type
• Generalize property by
multiplicity
• Restrict property by type
• Restrict property by
multiplicity
• Rename class/property
• Add inheritance
• Delete inheritance
• Move property
• Pull property
• Push property
• Extract superclass
• Flatten hierarchy
• Extract class
• Inline class
14
14. Comparison-based approaches
Compare two versions of the same metamodel and discover
the differences
15
Metamodel
[[master]]
Metamodel
[[master]]
Changes
model
EMFCompare
(syntactical) [3]
Heuristics [4]
15. List of changes
• Add class/property
• Delete class/property
• Retype property
• Modify property multiplicity
• Generalize property by type
• Generalize property by
multiplicity
• Restrict property by type
• Restrict property by
multiplicity
• Rename class/property
• Add inheritance
• Delete inheritance
• Move property
• Pull property
• Push property
• Extract superclass
• Flatten hierarchy
• Extract class
• Inline class
16
16. 19
How to detect all the changes by
using a comparison-based approach?
It is possible to infer all the changes
from the syntactical changes that
EMFCompare supports?
17. 20
Our approach
Objectives and overview
Detect all the changes of the Wachsmuth list from the syntactical
changes detected by EMFCompare
Metamodel
[[master]]
Metamodel
[[master]]
Changes
model
(entire list)
EMFCompare
(syntactical)
Changes
taxonomy
+
Inference
rules
22. 25
Semantical constrained changes
RETYPE PROPERTY
[[syntactical]]
The new type is
super type of the old
one
satisfies
GENERALIZE PROPERTY BY TYPE
[[syntactical]]
24. 27
Semantical composite changes
MOVE PROPERTY
[[syntactical]]
A and B refer to different
properties.
A and B are moved from
the same initial class to
the same final class.
The deleted class is the
initial class of the moved
properties
satisfy
INLINE CLASS
[[syntactical]]
MOVE PROPERTY
[[syntactical]]
DELETE CLASS
[[syntactical]]
A:
B:
C:
25. Changes taxonomy
• Add class/property
• Delete class/property
• Retype property
• Modify property multiplicity
• Generalize property by type
• Generalize property by
multiplicity
• Restrict property by type
• Restrict property by
multiplicity
• Rename class/property
• Add inheritance
• Delete inheritance
• Move property
• Pull property
• Push property
• Extract superclass
• Flatten hierarchy
• Extract class
• Inline class
28
Syntactical
changes
Constrained
changes
Composite
changes
27. • It is possible to infer semantics of changes from analysis
of the syntactic differences between two versions of the
same metamodel.
• Some stronger validation is required.
• We aim at presenting this tool to the eclipse community
expecting to be accepted as an eclipse project.
30
Conclusions and future work
28. References
[1] L. Rose, R. Paige, D. Kolovos, and F. Polack. An analysis of approaches to model migration. In Proceedings of
the Models and Evolution Workshop, 12th ACM/IEEE International Conference on Model Driven Engineering,
Languages and Systems, MoDSE-MCCM. ACM, October 2009.
[2] G. Wachsmuth. Metamodel adaptation and model co-adaptation. In E. Ernst, editor, Proceedings of the 21st
European Conference on Object-Oriented Programming (ECOOP’07), volume 4609 of Lecture Notes in
Computer Science, pages 600–624. Springer-Verlag, July 2007.
[3] EMFCompare. Eclipse Community. Accesed: 10 April 2012. http://www.eclipse.org/emf/compare/
[4] K. Garcés, F. Jouault, P. Cointe, and J. Bézivin. Managing model adaptation by precise detection of
metamodel changes. In Proceedings of the 5th European Conference on Model Driven Architecture –
Foundations and Applications, ECMDA-FA ’09, Berlin, Heidelberg, 2009. Springer-Verlag.
[5] M. Herrmannsdoerfer, S. Benz, and E. Juergens. Cope – automating coupled evolution of metamodels and
models. In S. Drossopoulou, editor, ECOOP 2009 Object-Oriented Programming, volume 5653 of Lecture Notes
in Computer Science, pages 52–76. 2009
31