Fine-grain transformations for refactoring

Show simple item record

dc.contributor.advisor Kourie, Derrick G. en
dc.contributor.postgraduate Saadeh, Emmad I.M. en
dc.date.accessioned 2013-09-06T21:38:54Z
dc.date.available 2010-06-14 en
dc.date.available 2013-09-06T21:38:54Z
dc.date.created 2010-04-16 en
dc.date.issued 2010-06-14 en
dc.date.submitted 2010-06-11 en
dc.description Thesis (PhD)--University of Pretoria, 2010. en
dc.description.abstract This thesis proposes a new approach to formalize refactorings, principally at the UML class diagram design level (but incorporating a limited amount of code-level information—basic access-related information). A set of abstract and atomic fine-grain transformations (FGTs) is defined as prototypical building blocks for constructing refactorings. The semantics of each FGT is specified in terms of its pre- and postcondition conjuncts. Various logical relationships between FGT pre- and postcondition conjuncts are fully catalogued. These include uni- and bidirectional sequential dependency relationships; absorbing and cancelling reduction relationships; and uni- and bi-directional conflict relationships. The principle container for FGTs is an FGT-list in which the ordering of FGTs respects the sequential relationships between them. Such a list is characterised by the set of FGT precondition conjuncts (which a system should satisfy if the FGTs are to be sequentially applied to the system) as well as the resulting postcondition conjuncts (that describe the effect of applying the list). In the thesis, twenty-nine commonly used primitive refactorings are specified as such FGT-lists, together with their associated FGT-enabling precondition conjuncts. Refactoring-level pre- and postconditions are also identified for each primitive refactoring FGT-list. These are, of course, required to guarantee behaviour preservation.<p. An alternative container for FGTs is defined, called an FGT-DAG. It is a directed acyclic graph with FGTs as nodes, and with arcs that reflect the sequential dependency relationships between constituent FGTs. An algorithm is provided to convert a list of FGTs into a corresponding set of FGT-DAGs. Thus design level refactorings specified as FGT-lists can be also be converted to corresponding sets of FGT-DAGs. The precondition for applying such a refactoring to a given system is specified at two levels: the FGT-enabling precondition conjuncts that apply to each FGT-DAG, and the refactoring-level precondition conjuncts. The thesis provides various algorithms that operate on FGT-DAGs. These include an algorithm to remove redundancies from an FGT-DAG. It also includes algorithms that operate on the elements of a set of FGT-DAGs: to detect sequential dependencies between these elements, to detect whether they are in deadlock, and to detect and possibly remove or modify FGTs causing conflicts between them. In addition, an algorithm is provided to build composite refactorings from primitive refactorings. It indicates how composite-level and FGT-enabling precondition conjuncts can be derived and utilised to avoid the rollback problem. A Prolog prototype FGT-based refactoring tool has been implemented. The tool stores all of the above-mentioned catalogued information as Prolog rules and facts. This includes the twenty-nine commonly used primitive refactorings (stored as Prolog FGT-lists) and their associated refactoring-level pre- and postcondition conjuncts. The tool also implements all the previously mentioned algorithms as Prolog procedures. The thesis thus establishes the foundations for a tool in which end users can create (and apply without rollback) not only composite refactorings, but also completely new refactorings whose semantics is constrained only by the fine-grained semantics of FGTs, rather than by the more course-grained semantics of primitive refactorings. Furthermore, using FGTs as refactoring building blocks (i.e. instead of primitive refactorings) means that redundancies and conflicts can be more accurately pin-pointed and removed; and opportunities for parallel execution are exposed at a more fine-grained level. These advantages come at the cost of having to carry out more computations because analysis has to take place at the FGT-level rather than at the refactoring-level. en
dc.description.availability unrestricted en
dc.description.department Computer Science en
dc.identifier.citation Saadeh, EIM 2009, Fine-grain transformations for refactoring, PhD thesis, University of Pretoria, Pretoria, viewed yymmdd < http://hdl.handle.net/2263/25459 > en
dc.identifier.other D10/439/ag en
dc.identifier.upetdurl http://upetd.up.ac.za/thesis/available/etd-06112010-194103/ en
dc.identifier.uri http://hdl.handle.net/2263/25459
dc.language.iso en
dc.publisher University of Pretoria en_ZA
dc.rights © 2009, University of Pretoria. All rights reserved. The copyright in this work vests in the University of Pretoria. No part of this work may be reproduced or transmitted in any form or by any means, without the prior written permission of the University of Pretoria. en
dc.subject Abstract and atomic fine-grain transformations en
dc.subject Refactoring en
dc.subject UCTD en_US
dc.title Fine-grain transformations for refactoring en
dc.type Thesis en


Files in this item

This item appears in the following Collection(s)

Show simple item record