Refactoring for generalization using type constraints

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).

[1]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[2]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[3]  Adam Kiezun,et al.  Integrating Refactoring Support into a Java Development Tool , 2001, OOPSLA 2001.

[4]  Frank Tip,et al.  Class hierarchy specialization , 1997, OOPSLA '97.

[5]  Cohan Sujay Carlos The Elimination of Overheads due to Type Annotations and the Identification of Candidate Refactorings , 2002 .

[6]  Martin Fowler. Refactoring Improving the Design of Existing Code , 1999 .

[7]  Ralph E. Johnson,et al.  Creating abstract superclasses by refactoring , 1993, CSC '93.

[8]  Frank Tip,et al.  Understanding class hierarchies using concept analysis , 2000, TOPL.

[9]  Don S. Batory,et al.  Evolving Object-Oriented Designs with Refactorings , 2004, Automated Software Engineering.

[10]  K. Beck,et al.  Extreme Programming Explained , 2002 .

[11]  Jens Palsberg,et al.  Object-oriented type systems , 1994, Wiley professional computing.

[12]  Jens Palsberg Efficient Inference of Object Types , 1995, Inf. Comput..

[13]  Laurie J. Hendren,et al.  Efficient Inference of Static Types for Java Bytecode , 2000, SAS.

[14]  Frank Tip,et al.  Reengineering class hierarchies using concept analysis , 1998, SIGSOFT '98/FSE-6.

[15]  Jens Palsberg,et al.  Type-safe method inlining , 2004, Sci. Comput. Program..

[16]  James Gosling The Java Language Specification - Second Edition , 2000 .

[17]  Dominic Duggan Modular type-based reverse engineering of parameterized types in Java code , 1999, OOPSLA '99.

[18]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[19]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[20]  William L. Scherlis,et al.  Models of thumb: assuring best practice source code in large java software systems , 2002 .