Model-Driven Software Refactoring

Model-Driven Software Refactoring

Tom Mens (University of Mons-Hainaut, Belgium), Gabriele Taentzer (Philipps-Universität Marburg, Germany) and Dirk Müller (Chemnitz University of Technology, Germany)
Copyright: © 2009 |Pages: 34
DOI: 10.4018/978-1-60566-006-6.ch008
OnDemand PDF Download:
$37.50

Abstract

In this chapter, we explore the emerging research domain of model-driven software refactoring. Program refactoring is a proven technique that aims at improving the quality of source code. Applying refactoring in a model-driven software engineering context raises many new challenges such as how to define, detect and improve model quality, how to preserve model behavior, and so on. Based on a concrete case study with a state-of-the-art model-driven software development tool, AndroMDA, we explore some of these challenges in more detail. We propose to resolve some of the encountered problems by relying on well-understood techniques of meta-modeling, model transformation and graph transformation.
Chapter Preview
Top

Introduction

In the current research and practice on software engineering, there are two very important lines of research for which tool support is becoming widely available. The first line of research is program refactoring, the second one is model-driven software engineering. To this date, however, the links and potential synergies between these two lines of research have not been sufficiently explored. This will be the main contribution of this chapter.

Model-Driven Software Engineering

In the realm of software engineering, we are witnessing an increasing momentum towards the use of models for developing software systems. This trend commonly referred to as model-driven software engineering, emphasizes on models as the primary artifacts in all phases of software development, from requirements analysis over system design to implementation, deployment, verification and validation. This uniform use of models promises to cope with the intrinsic complexity of software-intensive systems by raising the level of abstraction, and by hiding the accidental complexity of the underlying technology as much as possible (Brooks, 1995). The use of models thus opens up new possibilities for creating, analyzing, manipulating and formally reasoning about systems at a high level of abstraction.

To reap all the benefits of model-driven engineering, it is essential to install a sophisticated mechanism of model transformation, that enables a wide range of different automated activities such as translation of models (expressed in different modeling languages), generating code from models, model refinement, model synthesis or model extraction, model restructuring etc. To achieve this, languages, formalisms, techniques and tools that support model transformation are needed. More importantly, their impact on the quality and semantics of models needs to be better understood.

Program Refactoring

Refactoring is a well-known technique to improve the quality of software. Martin Fowler (1999) defines it as “A change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior”.

The research topic of refactoring has been studied extensively at the level of programs (i.e., source code). As a result, all major integrated software development environments provide some kind of automated support for program refactoring.

As a simple example of a program refactoring, consider the refactoring Extract Method, one of the more than 60 refactorings proposed by Fowler. Essentially, it is applied to a method in which part of the method body needs to be extracted into a new method that will be called by the original one. The situation before this program refactoring on a piece of Java source code is shown in Figure 1, the situation after is shown in Figure 2. The code lines that differ between both versions are marked with an asterisk.

Figure 1.

Java source code example before applying the Extract Method program refactoring (©2007 Tom Mens, UMH. Used with permission)

Figure 2.

Java example after applying the Extract Method refactoring (©2007 Tom Mens, UMH. Used with permission)

For program refactoring, a wide variety of formalisms has been proposed to gain a deeper understanding, and to allow formal analysis. One of these formalisms is graph transformation theory (Mens et al., 2005). We mention it here explicitly, as we will show later in this chapter how this formalism can be applied to support model refactoring as well. It is, however, not our goal to provide a detailed overview of existing work on program refactoring here. For the interested reader, we refer to a detailed survey of the state-of-the-art in this domain (Mens & Tourwé, 2004).

Complete Chapter List

Search this Book:
Reset
Table of Contents
Foreword
Colin Atkinson
Preface
Jörg Rech, Christian Bunse
Acknowledgment
Jörg Rech, Christian Bunse
Chapter 1
Ariadi Nugroho
Many studies have been carried out to investigate what makes up good quality software. Some of the early models that define the quality of software... Sample PDF
Managing the Quality of UML Models in Practice
$37.50
Chapter 2
Teade Punter, Jeroen Voeten
This chapter argues that embedded systems design faces several challenges of which late integration and the difference in development productivity... Sample PDF
Quality in Model Driven Engineering
$37.50
Chapter 3
Examples and Evidence  (pages 57-77)
Sowmya Karunakaran
This chapter aims at highlighting the increased development productivity and quality that can be achieved by Model Driven Software Development... Sample PDF
Examples and Evidence
$37.50
Chapter 4
Anna E. Bobkowska
Successful realization of the model-driven software development visions in practice requires high quality models. This chapter focuses on the... Sample PDF
Integrating Quality Criteria and Methods of Evaluation for Software Models
$37.50
Chapter 5
Heiko Koziolek, Steffen Becker, Ralf Reussner, Jens Happe
Techniques from model-driven software development are useful to analyse the performance of a software architecture during early development stages.... Sample PDF
Evaluating Performance of Software Architecture Models with the Palladio Component Model
$37.50
Chapter 6
Esther Guerra, Juan de Lara, Paloma Díaz
The goal of this work is to facilitate the task of integrating measurement and redesign tools in modelling environments for Domain Specific Visual... Sample PDF
Integrating Measures and Redesigns in the Definition of Domain Specific Visual Languages
$37.50
Chapter 7
Measuring Models  (pages 147-169)
Martin Monperrus, Jean-Marc Jézéquel, Joël Champeau, Brigitte Hoeltzener
Model-Driven Engineering (MDE) is an approach to software development that uses models as primary artifacts, from which code, documentation and... Sample PDF
Measuring Models
$37.50
Chapter 8
Tom Mens, Gabriele Taentzer, Dirk Müller
In this chapter, we explore the emerging research domain of model-driven software refactoring. Program refactoring is a proven technique that aims... Sample PDF
Model-Driven Software Refactoring
$37.50
Chapter 9
Michael Wahler
Class models are typically specified at a high level of abstraction and subsequently refined with textual constraints to obtain higher maturity... Sample PDF
A Pattern Approach to Increasing the Maturity Level of Class Models
$37.50
Chapter 10
Miroslaw Staron
Introducing Model Driven Software Development (MDSD) into industrial projects is rarely done as a “green field” development. The usual path is to... Sample PDF
Transitioning from Code-Centric to Model-Driven Industrial Projects: Empirical Studies in Industry and Academia
$37.50
Chapter 11
Antonio Bucchiarone, Davide Di Ruscio, Henry Muccini, Patrizio Pelliccione
When engineering complex and distributed software and hardware systems (increasingly used in many sectors, such as manufacturing, aerospace... Sample PDF
From Requirements to Java Code: An Architecture-Centric Approach for Producing Quality Systems
$37.50
Chapter 12
Silvia Abrahão, Marcela Genero, Emilio Insfran, José Ángel Carsí, Isidro Ramos, Mario Piattini
Model-Driven Architecture (MDA) is a software engineering approach that promotes the use of models and model transformations as primary development... Sample PDF
Quality-Driven Model Transformations: From Requirements to UML Class Diagrams
$37.50
Chapter 13
Pankaj Kamthan
As software systems become ever more interactive, there is a need to model the services they provide to users, and use cases are one abstract way of... Sample PDF
A Framework for Understanding and Addressing the Semiotic Quality of Use Case Models
$37.50
Chapter 14
Stefan Wagner, Florian Deissenboeck, Stefan Teuchert, Jean-François Girard
In model-driven software development as much as in classical code-driven development maintenance costs make up the bulk of the total life cycle... Sample PDF
Assuring Maintainability in Model-Driven Development of Embedded Systems
$37.50
Chapter 15
Tibor Farkas
Premium quality and innovation are the cornerstones of the leading positions of car manufacturers and suppliers in the world market. The permanently... Sample PDF
Quality Improvement in Automotive Software Engineering Using a Model-Based Approach
$37.50
Chapter 16
Claus Pahl, Boškovic Marko, Ronan Barrett, Wilhelm Hasselbring
Service engineering and service-oriented architecture as an integration and platform technology is a recent approach to software systems... Sample PDF
Quality-Aware Model-Driven Service Engineering
$37.50
Chapter 17
Sven Abels, Wilhelm Hasselbring, Niels Streekmann, Mathias Uslar
This chapter introduces model-driven integration in complex information systems by giving two practical examples. It relies on the experiences the... Sample PDF
Model-Driven Integration in Complex Information Systems: Experiences from Two Scenarios
$37.50
Chapter 18
Jane M.C. Oh
This chapter examines the experience of using model-based design in the context of development of critical software. The software is being developed... Sample PDF
High-Quality Software Models of the Mid-Infrared Instrument for the James Webb Space Telescope
$37.50
About the Contributors