Evolution of Models and MDA-Based Refactoring

Evolution of Models and MDA-Based Refactoring

Liliana María Favre
DOI: 10.4018/978-1-61520-649-0.ch009
OnDemand:
(Individual Chapters)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

In MDA is crucial to define, manage, and maintain traces and relationships between different models, and automatically transform them and produce implementations. Refactoring is a powerful technique when is repeatedly applied to a model to obtain another one with the same behavior but enhancing some non functionality quality factor such as simplicity, flexibility, understandability and performance (Fowler, 1999) (Mens, Van Eetvelde, Demeyer & Janssens, 2005). Refactorings are horizontal transformations for supporting perfective model evolution. In MDA, a crucial part of the evolution from abstract models to executable components or applications (forward engineering) or, from code to abstract models (reverse engineering) is accomplished by means of refactoring. Although the most effective forms of refactorings are at the design levels (for example, PIMs or PSMs), MDA-based CASE tools provide limited facilities for refactoring only on source code through an explicit selection made by the designer (CASE, 2009). MDA-based refactorings can be specified in OCL as contracts between meta-patterns (MOF metamodel), consisting of pre- and post-conditions that hold for the model before/after refactoring. Besides, we propose an alternative formalization based on the NEREUS language. We propose a uniform treatment of refactoring at platform independent, platform specific and implementation specific abstraction levels.
Chapter Preview
Top

This section shows the evolution of refactoring techniques and remarks the advantages of an MDA approach.

The first relevant publication on refactoring was carried out by Opdyke (1992), showing how functionalities and attributes can migrate among classes, how classes can be joined and separated using a class diagram notation (subset of current UML). Roberts (1999) completed this work describing techniques based on refactoring contracts. Fowler (1999) is the classical book on code refactoring. It informally analyzes refactoring techniques on Java source code, explaining the structural changes through examples with class diagrams.

Several approaches provide support to restructure UML models. In (Sunyé, Pollet, LeTraon, and Jézéquel, 2001) a set of refactorings is presented and how they may be designed to preserve the behavior of UML models is explained. Mens, Demeyer, DuBois, Stenten, and Van Gorp (2003) provide an overview of existing research in the field of refactoring. Porres (2003) defines and implements model refactorings as rule-based transformations. Van Gorp, Stenten, Mens, and Demeyer (2003) propose a set of minimal extensions to UML metamodel, which allows reasoning about refactoring for all common object-oriented languages.

There is a tendency to integrate refactoring tools into industrial software development environments. For example, Together ControlCenter (CASE, 2009) applies code refactoring on user requirements. Mens, Van Eetvelde, Demeyer, and Janssens (2005) explore the use of graph rewriting for specifying refactorings and prove that them preserve some properties. (France, Ghosh, Song, & Kim, 2003), (Laplante, & Neill, 2005) and Kerievsky (2004) describe methods for pattern-directed refactorings.

Complete Chapter List

Search this Book:
Reset