Formalising refactorings with graph transformations (original) (raw)
Related papers
Object-oriented refactoring using graph rewriting
2001
Abstract. This paper advocates need for a formal foundation for refactoring object-oriented software. More specifically, it investigates the potential of graph rewriting as candidate formalism. Using a small Java application as a case study, it shows how a range of different notions of behaviour preservation can be expressed in a formal, yet intuitive, way. A number of other open research topics that can benefit from a graph rewriting formalism are discussed as well. Keywords.
Graph transformations for object-oriented refinement
Formal Aspects of Computing, 2009
UNU-IIST is jointly funded by the government of Macao and the governments of the People's Republic of China and Portugal through a contribution to the UNU Endowment Fund. As well as providing twothirds of the endowment fund, the Macao authorities also supply UNU-IIST with its office premises and furniture and subsidise fellow accommodation.
On the use of graph transformations for model refactoring
Model-driven software engineering promotes the use of models and transformations as primary artifacts. Several formalisms can be used for the specification of model transformations. We propose to represent models as graphs, and model transformations as graph transformations. In particular, we focus on the activity of model refactoring, and show how graph transformation theory can provide formal support for this activity. We also show how such support can be implemented in state-of-the-art graph transformation tools such as AGG and Fujaba, and provide two concrete experiments. Critical pair analysis in AGG enables the analysis of dependencies between model refactorings. The round-trip engineering facility of Fujaba enables the automatic generation of code for model refactorings.
Formalizing architectural refactorings as graph transformation systems
… and Parallel/Distributed Computing, 2005 and …, 2005
Architectural refactorings are an appropriate technique for the development and improvement of architectural specifications. However, these refactorings are often applied manually. This paper presents a mapping of an architectural specification language to a hypergraph-based data structure. Thus, architectural refactorings can be formalized as hypergraph transformation rules and can be applied automatically.
Formalising behaviour preserving program transformations
Lecture Notes in Computer Science, 2002
Abstract. The notion of refactoring —transforming the source-code of an object-oriented program without changing its external behaviour— has increased the need for a precise definition of refactorings and their properties. This paper introduces a graph representation of those aspects of the ...
( ICGT-DS 2010 ) Search-Based Refactoring based on Unfolding of Graph Transformation Systems
2011
To improve scalability and understandability of search-based refactoring, in this paper, we propose a formulation based on graph transformation which allows us to make use of partial order semantics and an associated analysis technique, the approximated unfolding of graph transformation systems. We use graphs to represent object-oriented software architectures at the class level and graph transformations to describe their refactoring operations. In the unfolding we can identify dependencies and conflicts between refactoring steps leading to an implicit and therefore more scalable representation of the search space. An optimisation algorithm based on the Ant Colony paradigm is used to explore this search space, aiming to find a sequence of refactoring steps that leads to the best design at a minimal costs.
Analysing Refactoring Dependencies Using Graph Transformation
Software and Systems Modeling, 2007
Refactoring is a widely accepted technique to improve the structure of object-oriented software. Nevertheless, existing tool support remains restricted to automatically applying refactoring transformations. Deciding what to refactor and which refactoring to apply still remains a difficult manual process, due to the many dependencies and interrelationships between relevant refactorings. In this paper, we represent refactorings as graph transformations, and we propose the technique of critical pair analysis to detect the implicit dependencies between refactorings. The results of this analysis can help the developer to make an informed decision of which refactoring is most suitable in a given context and why. We report on several experiments we carried out in the AGG graph transformation tool to support our claims.
Specifying Coherent Refactoring Software Artefacts with Distributed Graph Transformations
IGI Global eBooks, 2011
Refactoring changes the internal structure of a software system, while preserving its behavior. Even though the input/output view of a system's behavior does not change, refactoring can have several consequences for the computing process, as expressed for instance by the sequence of method calls or by state changes of an object or an activity. Such modifications must be reflected in the system model, generally expressed through UML diagrams. We propose a formal approach, based on distributed graph transformation, to the coordinated evolution of code and model, as effect of refactorings. The approach can be integrated into existing refactoring tools. Due to its formal background, it makes it possible to reason about the behavior preservation of each specified refactoring. 1.Introduction Software is subject to changes and a piece of software may need changes for several reasons. One such reason is the introduction of new requirements that cause the need for design changes. The introduction of a new requirement can be a consequence of either the iterative development process chosen for the project that constructs the system incrementally, or the fact that the requirement was overlooked in the initial specification and design of the system. As a simple example, consider an application developed around a single specific algorithm. If a new algorithm to perform the same calculations (graph layout, for example) becomes available, it may be useful to modify the application to add the option of using the new algorithm. Object oriented programming has made many changes easy to implement, often just by adding new classes, as opposed to more traditional approaches requiring many modifications. But adding classes may not be sufficient. Even in the simple example above, the application must evolve by means other than class addition. If the designer has not foreseen the possibility of alternatives for i Partially supported by the EC under Research and Training Network SeGraVis.