Practical Analysis for Refactoring

  • Authors:
  • Donald B Roberts

  • Affiliations:
  • -

  • Venue:
  • Practical Analysis for Refactoring
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

One of the important ways to make software soft, (i.e., easy to change, reuse, and develop), is to automate the various program transformations that occur as software evolves. Automating refactorings is hard because a refactoring tool must be both fast and reliable, but program analysis is often undecidable. This dissertation describes several ways to make a refactoring tool that is both fast enough and reliable enough to be useful. First, it gives a new definition of refactoring that focuses on preconditions and postconditions of the refactorings, rather than on the program transformation itself. Preconditions are assertions that a program must satisfy for the refactoring to be applied, and postconditions specify how the assertions are transformed by the refactoring. The postconditions can be used for several purposes: to reduce the amount of analysis that later refactorings must perform, to derive preconditions of composite refactorings, and to calculate dependencies between refactorings. These techniques can be used in a refactoring tool to support undo, user-defined composite refactorings, and multi-user refactoring. This dissertation also examines techniques for using runtime analysis to assist refactoring, presents the design of the Refactoring Browser, a refactoring tool for Smalltalk that is used by commercial software developers, and identifies the criteria that are necessary for any refactoring tool to succeed.