W. G. Griswold, M. I. Chen, R. W. Bowdidge, Jenny L. Cabaniss, Van B. Nguyen, J. D. Morgenthaler, ``Tool Support for Planning the Restructuring of Data Abstractions in Large Systems,'' UCSD CSE Technical Report CS97-559, October 1997.


Restructuring software to improve its design can lower software maintenance costs. One problem in restructuring is planning out the redesign. The star diagram manipulable visualization can help a programmer redesign a program based on abstract data types. However, the underlying meaning-preserving transformational support for restructuring is costly to provide. In particular, an efficient data flow analysis implementation is needed, and multi-language analysis and transformation is needed for any program written in multiple languages (a common practice in large projects). We also found that a star diagram view can be too large for a programmer to effectively assimilate and inflexible for a complicated restructuring, such as one involving complex types.

To solve this problem we moved away from meaning-preserving transformational support and focused on helping programmers plan and carry out their restructurings. For example, we created a way of manipulating a star diagram--called trimming--that mimics the way that basic restructuring transformations affect the star diagram display, allowing a programmer to plan a restructuring without depending upon restructuring transformations. With the ability to annotate trimmed star diagram components, plans can be recorded and later recalled. Also, programmer-controlled elision can remove clutter from the star diagram view.

We built a star diagram planning tool for C programs, measured its elision capabilities, and performed a programmer study for the encapsulation of a widely-used data structure in a 28,000 line program. We found that elision is effective in controlling star diagram size. In the study we found that each programming team successfully planned its restructuring in rather different, unanticipated ways. These experiments indirectly influenced important improvements in the tool's software design and user interface.