��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in...

25
Dipartimento di Ingegneria e Scienze Università degli Studi dell’Aquila dell’Informazione e Matematica Supporting Users to Manage Breaking and Unresolvable Changes in Coupled Evolution Alfonso Pierantonio joint work with Davide Di Ruscio, Juri Di Rocco, Ludovico Iovino

Transcript of ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in...

Page 1: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Dipartimento di Ingegneria e Scienze

Università degli Studi dell’Aquila

dell’Informazione e Matematica

Supporting Users to Manage

Breaking and Unresolvable

Changes in Coupled Evolution

Alfonso Pierantonio

joint work with

Davide Di Ruscio, Juri Di

Rocco, Ludovico Iovino

Page 2: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

2 Introduction

Metamodels play a key role in any metamodeling

ecosystem since they underpin the development of

a wide range of modeling artifacts.

- Similarly to any software component metamodels

are expected to evolve

- It is necessary to deal with the coupled evolution

problem, also called co-evolution

- Co-evolution involves all the artifacts co-existing in

the ecosystem, e.g. models, model

transformations, textual and graphical editors, and

code generators.

Page 3: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

3 Introduction

Metamodel changes can be classified as:

- non-breaking (NBC)

- breaking and resolvable (BRC)

- breaking and unresolvable (BUC)

depending on their impact

In the last case, user intervention is important to

provide additional information, which cannot be

inferred or derived.

Page 4: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

4 Existing approaches (selection) Over the last years, co-evolution has been largely investigated and different approaches have been proposed:

Model co-evolution:

[1] A. Cicchetti, D. Di Ruscio, R. Eramo, and A. Pierantonio. Automating co-evolution in model-driven engineering. In Procs.of EDOC 2008, pages 222–231. IEEE Computer So- ciety, 2008.

[2] F. Mantz, Y. Lamo, and G. Taentzer. Co-transformation of type and instance graphs supporting merging of types with retyping. ECEASST, (61), 2013.

[3] F. Mantz, G. Taentzer, and Y. Lamo. Customizing model migrations by rule schemes. In Procs. IWPSE’13, pages 1– 10. ACM, 2013.

Model transformations co-evolution:

[4] J. Di Rocco, D. Di Ruscio, L. Iovino, and A. Pierantonio. Dealing with the coupled evolution of metamodels and model- to-text transformations. In ME’14 at MoDELS 2014, 2014.

[5] Levendovszky, D. Balasubramanian, A. Narayanan, and G. Karsai. A Novel Approach to Semi-automated Evolution of DSML Model Transformation. In Procs. SLE’10, volume 5969 of LNCS, pages 23–41. Springer, 2010.

Other kind of artifacts co-evolution:

[6] D. Di Ruscio, L. Iovino, and A. Pierantonio. Managing the coupled evolution of metamodels and textual concrete syntax specifications. In SEAA’13, pages 114–121, Sept 2013.

[7] A. Kusel, J. Etzlstorfer, E. Kapsammer, P. Lange, W. Rets- chitzegger, J. Schoenboeck, W. Schwinger, and M. Wimmer. A Systematic Taxonomy of Metamodel Evolution Impacts on OCL Expressions. In ME’14 at MoDELS 2014, Sept. 2014.

Page 5: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

5 Existing approaches

All these approaches aim at automating the

management of non-breaking, and breaking and

resolvable changes

The management of breaking and unresolvable

changes is still a challenging and error-prone activity

– they are usually managed by applying default migration

actions according to predefined heuristics

Page 6: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

6 Proposal

In order to overcome the uncertainty or lack of

information during the automated consistency

restoring process, we propose a human-in-loop

approach

The user is interactively asked to contribute with the

missing information in order to complete the

adaptation process

Page 7: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

7 Motivating scenario

Page 8: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

8 Motivating scenario

Page 9: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

9 Motivating scenario

Page 10: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

10 Motivating scenario

Page 11: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

11 Motivating scenario

Page 12: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

12 Motivating scenario

Page 13: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

13 Metamodel Evolution

Applied changes in the motivating scenario:

1. split attribute

2. change reference type

3. extract metaclass

evolution

1 1

2 2

3

3

Page 14: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

14 Split attribute co-evolution

The expression [binding.url] has to be migrated,

however it is uncertainty whether to be replaced by

– [binding.requestUrl], or

– [binding.requestCookies]

Metamodel evolution Corrupted excerpt of the code generator

Page 15: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

15 Change Reference Type co-evolution

The template generateViewData cannot be invoked

on elements with type Data anymore (because of the

reference type change)

Metamodel evolution

Corrupted excerpt of the code generator

Page 16: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

16 Extract Metaclass co-evolution

The expression [aTemplate.style] cannot be

evaluated anymore, consistency can be restored

with:

– [aTemplate.style.src]

– [aTemplate.style.href]

Metamodel evolution Corrupted excerpt of the code generator

Page 17: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

17 Proposed Adaptation Approach

The adaptation process relies on an extension of

EMFMigrate realized by means of the epsilon

platform

D. Wagelaar, L. Iovino, D. Ruscio, and A. Pierantonio. Translational semantics of a co-evolution specific language with the EMF transformation virtual machine. In Theory and Practice of Model Transformations, ICMT 2012, LNCS 7307, 192–207.

Page 18: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

18 Proposed Adaptation Approach

The adaptation flow is formalized by the following sequence diagram

Page 19: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

19 Proposed Adaptation Approach

EMFMigrate is a co-evolution language for EMF-

based artifact migration

– It consists of migration rules applied on a given artifact A

conforming to a metamodel MM

– EMFMigrate has been extended to generate Epsilon

programs

Page 20: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

21 Migration Programs

- A (automatically generated) ANT specification

orchestrates the control-flow above

- Whenever necessary the user is prompt for

necessary information, which permits to resolve

uncertainty points

Page 21: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

22 Split attribute co-evolution

The expression [binding.url] has to be migrated,

however it is uncertainty whether to be replaced by

– [binding.requestUrl], or

– [binding.requestCookies]

Metamodel evolution Corrupted excerpt of the code generator

Page 22: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

23 Change Reference Type co-evolution

The template generateViewData cannot be invoked

on elements with type Data anymore (because of the

reference type change)

Metamodel evolution

Corrupted excerpt of the code generator

Page 23: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

24 Extract Metaclass co-evolution

The expression [aTemplate.style] cannot be

evaluated anymore, consistency can be restored

with:

– [aTemplate.style.src]

– [aTemplate.style.href]

Metamodel evolution Corrupted excerpt of the code generator

Page 24: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

25 Conclusions

– An approach has been proposed to pragmatically address

the adaptation of artifacts affected by BUCs

– A general adaptation process has been proposed with the

ability to interact with the user in case of BUCs with finite

resolution options

– Although it has been demonstrated on Acceleo templates,

the approach is ready to be applied to any EMF-based

artifact

– Future works include a off-the-shelf catalog of migration

programs in accordance with the refactorings catalog

http://www.metamodelrefactoring.org/

Page 25: ��Model-Driven Engineering in L Aquila · Title: ��Model-Driven Engineering in L Aquila Author: Alfonso Created Date: 10/27/2015 2:52:38 PM

Workshop on Domain-Specific Modeling – 27 OCT 2015, Pittsburgh, Pennsylvania, United States

26