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
• Context
• Problem
• Related work
• Our approach
• Conclusions and future work
2
Agenda
Context
Model-driven software development is an approach
that proposes to use models as first-class entities for
creating software products.
3
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
Problem Software evolution in the context of MDSD
Grammars [[slave]]
Metamodel [[master]]
Transformations [[slave]]
Models [[slave]]
6
Problem Software evolution in the context of MDSD
Grammars [[slave]]
Transformations [[slave]]
Models [[slave]] Metamodel
[[master]]
7
Migration process
Changes propagation
Impact analysis
Changes detection
8
Migration process
Changes propagation
Impact analysis
Changes detection
Current approaches for model
changes detection
9
Comparison-based approaches
List of changes [2]
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
Comparison-based approaches
Compare two versions of the same metamodel and discover the differences
12
Metamodel [[master]]
Metamodel [[master]]
Changes model
Comparison-based approaches
Compare two versions of the same metamodel and discover the differences
13
Metamodel [[master]]
Metamodel [[master]]
Changes model
EMFCompare (syntactical) [3]
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
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]
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
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?
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
21
Changes taxonomy
Change
Syntactical
Semantical constrained
Semantical composite
Atomic
Composite
22
Changes taxonomy Detection
Change
Syntactical
Semantical constrained
Semantical composite
Atomic
Composite
Can be detected by syntactical analysis
(EMFCompare)
23
Syntactical changes
24
Change
Syntactical
Semantical constrained
Semantical composite
Atomic
Composite
A syntactical change that satisfies a structural
constraint
Changes taxonomy Detection
A satisfies C
A is semantical
constrained
25
Semantical constrained changes
RETYPE PROPERTY [[syntactical]]
The new type is super type of the old
one satisfies
GENERALIZE PROPERTY BY TYPE [[syntactical]]
26
Change
Syntactical
Semantical constrained
Semantical composite
Atomic
Composite
A set of syntactical changes that satisfy some
structural constraints
Changes taxonomy Detection
Set A satisfies C
A is semantical
composite
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:
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
Acknowledgements
29
Anne Etien Université de Lille I
Lille, France
Germán Méndez ECOPETROL S.A
Bogotá, Colombia
Louis Rose University of York
York, UK
• 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
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
Top Related