Abstract

This thesis defines a set of program restructuring operations (refactorings) that support the design, evolution and reuse of object-oriented application frameworks. The focus of the thesis is on automating the refactorings in a way that preserves the behavior of a program. The refactorings are defined to be behavior preserving, provided that their preconditions are met. Most of the refactorings are simple to implement and it is almost trivial to show that they are behavior preserving. However, for a few refactorings, one or more of their preconditions are in general undecidable. Fortunately, for some cases it can be determined whether these refactorings can be applied safely. Three of the most complex refactorings are defined in detail: generalizing the inheritance hierarchy, specializing the inheritance hierarchy and using aggregations to model the relationships among classes. These operations are decomposed into more primitive parts, and the power of these operations is discussed from the perspectives of automatability and usefulness in supporting design. Two design constraints needed in refactoring are class invariants and exclusive components. These constraints are needed to ensure that behavior is preserved across some refactorings. This thesis gives some conservative algorithms for determining whether a program satisfies these constraints, and describes how to use this design information to refactor a program.

Keywords

Code refactoringComputer scienceHierarchyProgramming languageInheritance (genetic algorithm)Set (abstract data type)Object-oriented programmingReuseClass (philosophy)ReusabilityClass hierarchyUndecidable problemSoftware engineeringFocus (optics)Theoretical computer scienceSoftwareArtificial intelligenceEngineering

Related Publications

Object-oriented programming with flavors

This paper describes Symbolics' newly redesigned object-oriented programming system, Flavors. Flavors encourages program modularity, eases the development of large, complex prog...

1986 ACM SIGPLAN Notices 302 citations

Object-oriented programming with flavors

This paper describes Symbolics' newly redesigned object-oriented programming system, Flavors. Flavors encourages program modularity, eases the development of large, complex prog...

1986 Conference proceedings on Object-orie... 198 citations

From Concept to Software

To understand technological innovation (be it the design of a mouse trap or a piece of computer software), it is crucial to understand the process of design. Design is not simpl...

1999 Journal of Research on Computing in E... 13 citations

Publication Info

Year
1992
Type
article
Citations
1020
Access
Closed

External Links

Citation Metrics

1020
OpenAlex

Cite This

William F. Opdyke (1992). Refactoring object-oriented frameworks. .