Program Refactoring
Program-Transformation.Org: The Program Transformation Wiki
Definition
Refactoring is typically applied at the level of programs (i.e., source code). A program refactoring is a
program transformation that improves the design of a program while preserving its behaviour.
MartinFowler defines a
refactoring as:
- a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior
He then continues to define the verb
to refactor as
- to restructure software by applying a series of refactorings without changing its observable behavior.
Refactoring is an important component of the
Extreme Programming software engineering methodology. In this context, refactorings are often associated with:
- many small changes applied repeatedly
- a catalog of widely discussed changes
- explicit unit tests applied before and after each minimal change
- interactive, perhaps tool-supported, but not automated.
Tools
The following indicative list of refactoring tools is inevitable incomplete but gives a clear idea about the diversity of tools for refactoring available.
For a more up to date list of refactoring tools, we refer to the Google Web Directory on
Code Refactoring
JavaLanguage
Smalltalk
Special Refactoring Tools
Tools for carrying out specific refactorings have been built over the years.
Commercial tools for restructuring spaghetti code in
COBOL and FORTRAN have been available
since the late 1970s. There are reputed to be tools that will restructure
C programs and headers to use minimal numbers of INCLUDEs. Specific tools include:
- CloneDR - Finds (and possibly removes) redundant source code
Resources
A more extensive and up to date list of
software refactoring literature is available.
Books
Surveys
PhD Theses
- Sander Tichelaar. Modeling Object-Oriented Software for Reverse Engineering and Refactoring. University of Bern, 2001.
- Don Bradley Roberts. Practical Analysis for Refactoring. University of Illinois at Urbana-Champaign, 1999.
- William F. Opdyke. Refactoring: A Program Restructuring Aid in Designing Object-Oriented Application Frameworks. University of Illinois at Urbana-Champaign, 1992.
- William G. Griswold. Program Restructuring as an Aid to Software Maintenance. University of Washington, August 1991.
Useful links
Research Projects
Events
People
CategoryTransformationParadigm |
CategoryReengineeringPages |
CategorySoftwareEvolution | Contributors:
EelcoVisser,
ArieVanDeursen,
MartinBravenboer,
TomMens - 5 April 2004