Effective Detection of Model Changes

29
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

Transcript of Effective Detection of Model Changes

Page 1: Effective Detection of Model Changes

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

Page 2: Effective Detection of Model Changes

• Context

• Problem

• Related work

• Our approach

• Conclusions and future work

2

Agenda

Page 3: Effective Detection of Model Changes

Context

Model-driven software development is an approach

that proposes to use models as first-class entities for

creating software products.

3

Page 4: Effective Detection of Model Changes

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

Page 5: Effective Detection of Model Changes

5

Problem Software evolution in the context of MDSD

Grammars [[slave]]

Metamodel [[master]]

Transformations [[slave]]

Models [[slave]]

Page 6: Effective Detection of Model Changes

6

Problem Software evolution in the context of MDSD

Grammars [[slave]]

Transformations [[slave]]

Models [[slave]] Metamodel

[[master]]

Page 7: Effective Detection of Model Changes

7

Migration process

Changes propagation

Impact analysis

Changes detection

Page 8: Effective Detection of Model Changes

8

Migration process

Changes propagation

Impact analysis

Changes detection

Page 9: Effective Detection of Model Changes

Current approaches for model

changes detection

9

Comparison-based approaches

List of changes [2]

Page 10: Effective Detection of Model Changes

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

Page 11: Effective Detection of Model Changes

Comparison-based approaches

Compare two versions of the same metamodel and discover the differences

12

Metamodel [[master]]

Metamodel [[master]]

Changes model

Page 12: Effective Detection of Model Changes

Comparison-based approaches

Compare two versions of the same metamodel and discover the differences

13

Metamodel [[master]]

Metamodel [[master]]

Changes model

EMFCompare (syntactical) [3]

Page 13: Effective Detection of Model Changes

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

Page 14: Effective Detection of Model Changes

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]

Page 15: Effective Detection of Model Changes

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

Page 16: Effective Detection of Model Changes

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?

Page 17: Effective Detection of Model Changes

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

Page 18: Effective Detection of Model Changes

21

Changes taxonomy

Change

Syntactical

Semantical constrained

Semantical composite

Atomic

Composite

Page 19: Effective Detection of Model Changes

22

Changes taxonomy Detection

Change

Syntactical

Semantical constrained

Semantical composite

Atomic

Composite

Can be detected by syntactical analysis

(EMFCompare)

Page 20: Effective Detection of Model Changes

23

Syntactical changes

Page 21: Effective Detection of Model 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

Page 22: Effective Detection of Model Changes

25

Semantical constrained changes

RETYPE PROPERTY [[syntactical]]

The new type is super type of the old

one satisfies

GENERALIZE PROPERTY BY TYPE [[syntactical]]

Page 23: Effective Detection of Model Changes

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

Page 24: Effective Detection of Model Changes

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:

Page 25: Effective Detection of Model Changes

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

Page 26: Effective Detection of Model 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

Page 27: Effective Detection of Model Changes

• 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

Page 28: Effective Detection of Model Changes

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