Refactoring for generalization using type constraints

  • Authors:
  • Frank Tip;Adam Kiezun;Dirk Bäumer

  • Affiliations:
  • IBM T.J. Watson Research Center, Yorktown Heights, NY;MIT, Cambridge, MA;IBM Research OTI Labs, Zürich, Switzerland

  • Venue:
  • OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Refactoring is the process of applying behavior-preserving transformations (called "refactorings") in order to improve a program's design. Associated with a refactoring is a set of preconditions that must be satisfied to guarantee that program behavior is preserved, and a set of source code modifications. An important category of refactorings is concerned with generalization (e.g., Extract Interface for re-routing the access to a class via a newly created interface, and Pull Up Members for moving members into a superclass). For these refactorings, both the preconditions and the set of allowable source code modifications depend on interprocedural relationships between types of variables. We present an approach in which type constraints are used to verify the preconditions and to determine the allowable source code modifications for a number of generalization-related refactorings. This work is implemented in the standard distribution of Eclipse (see www.eclipse.org).