Restructuring a software system as it evolves promises to reduce associated maintenance costs. To simplify restructuring, we have developed a tool that preserves the meaning of a program as the engineer applies structural transformations. To help evaluate the prototype tool and its underlying approach, we ran an experiment to compare how people using standard editing tools restructure a program against the computer-aided style that our tool supports.We drew three conclusions from the experiment. First, the subjects generally used a mix of copy/paste and cut/paste editing paradigms; our tool gives the engineer the safety of copy/paste and the speed of cut/paste. Second, most of the subjects made mistakes, including simple syntactic errors and semantic errors (such as not updating the call site after modifying a function definition); our tool avoids errors by the engineer using compensation (for instance, it automatically updates call sites when a procedure definition is changed) or by signalling an error. Third, manual restructuring tends to be haphazard, with engineers handling the order of changes, testing, etc. in inconsistent and potentially error-prone ways; by separating restructuring from functional maintenance and by ensuring preservation of meaning during restructuring, our approach can make the maintenance process more orderly.
[1]
Edsger W. Dijkstra,et al.
Notes on structured programming
,
1970
.
[2]
D. L. Parnas,et al.
On the criteria to be used in decomposing systems into modules
,
1972,
Software Pioneers.
[3]
Thomas Reps,et al.
Programming Techniques and Data Structures
,
1981
.
[4]
Barbara G. Ryder,et al.
A Critical Analysis of Incremental Iterative Data Flow Analysis Algorithms
,
1990,
IEEE Trans. Software Eng..
[5]
Bernard Lang,et al.
Programming Environments Based on Structured Editors: The MENTOR Experience,
,
1980
.
[6]
James R. Larus,et al.
Restructuring symbolic programs for concurrent execution on multiprocessors
,
1989
.
[7]
David Notkin,et al.
Gandalf: Software development environments
,
1986,
IEEE Transactions on Software Engineering.
[8]
Richard J. Lipton,et al.
Social processes and proofs of theorems and programs
,
1977,
POPL.
[9]
William G. Griswold.
Program restructuring as an aid to software maintenance
,
1992
.
[10]
Tim Teitelbaum.
The Cornell Program Synthesizer: a syntax-directed programming environment
,
1979,
SIGP.