R. W. Bowdidge, ``Supporting the Restructuring of Data Abstractions through Manipulation of a Program Visualization'', Ph.D. Thesis, Technical Report CS95-457, Department of Computer Science and Engineering, University of California, San Diego, November 1995.


With a meaning-preserving restructuring tool, a software engineer can change a program's structure to ease future modifications. However, deciding how to restructure the program requires a global understanding of the program's structure, which cannot easily be derived from viewing the source code.

We describe a manipulable program visualization---the {\it star diagram}---that supports the restructuring task of encapsulating a global data structure. The star diagram graphically displays information pertinent to encapsulation; direct manipulation of the diagram causes the underlying program to be restructured. The visualization compactly presents all statements in the program that use the given global data structure, helping the programmer to choose the functions that completely encapsulate it. Additionally, the visualization elides code unrelated to the data structure and to the task, and collapses similar expressions to allow the programmer to identify frequently occurring code fragments and manipulate them together. The visualization is mapped directly to the program text, so manipulation of the visualization also restructures the program.

We present the concept of the star diagram, and describe an implementation of the star diagram upon a meaning-preserving restructuring tool for Scheme. We also create star diagram generators for C programs, and test the scalability of the star diagram for large commercial C programs. Finally, we evaluate the star diagram's ability to assist data encapsulation by observing programmers performing encapsulation using either standard UNIX tools or the star diagram.