Automated assistance for program restructuring

William G. Griswold, David Notkin

ACM Transactions on Software Engineering and Methodology · 1993 · 188 citations · 44 references

Concepts

TL;DR

Software maintenance degrades program structure, increasing costs, and while restructuring can ease changes, manual restructuring is error‑prone and expensive. The study aims to provide a tool that separates structural manipulations from other maintenance tasks, preserving semantics and allowing human focus on judgment‑intensive aspects, by automating repetitive, error‑prone restructuring through a model based on data‑flow and control‑flow dependence. The tool implements a model that exploits data‑flow and control‑flow dependence to generate meaning‑preserving transformations, introducing a set of automatable transformations and a prototype for restructuring Scheme programs. The introduced transformations’ impact on structure is described and their usefulness demonstrated in examples, with the prototype tool’s performance discussed.

Abstract

Maintenance tends to degrade the structure of software, ultimately making maintenance more costly. At times, then, it is worthwhile to manipulate the structure of a system to make changes easier. However, manual restructuring is an error-prone and expensive activity. By separating structural manipulations from other maintenance activities, the semantics of a system can be held constant by a tool, assuring that no errors are introduced by restructuring. To allow the maintenance team to focus on the aspects of restructuring and maintenance requiring human judgment, a transformation-based tool can be provided—based on a model that exploits preserving data flow dependence and control flow dependence—to automate the repetitive, error-prone, and computationally demanding aspects of restructuring. A set of automatable transformations is introduced; their impact on structure is described, and their usefulness is demonstrated in examples. A model to aid building meaning-preserving restructuring transformations is described, and its realization in a functioning prototype tool for restructuring Scheme programs is discussed.

References

44