W. G. Griswold, D. Notkin, "Architectural Tradeoffs for a Meaning-Preserving Program Restructuring Tool", IEEE Transactions of Software Engineering, April, 1995.

See also an on-line talk on this subject.


Maintaining the consistency of multiple program representations--such as abstract syntax trees and program dependence graphs--in a program manipulation tool is difficult. This paper describes a hybrid software architecture for a meaning-preserving program restructuring tool. Layering is the primary architectural paradigm, which successively provides increasingly integrated and unified abstract machines to implement the tool. However, layering does not provide adequate control over extensibility or the independence of components. Consequently, we also adopted the paradigm of keeping the key program abstractions separate throughout the layering, providing independent ``columns'' of abstract data types. A pair of columns is integrated by a mapping column that translates elements in one column's data type into related elements in the other column's data type. Thus integration of function and separation of representation can be achieved simultaneously in this complex domain.

This hybrid architecture was crucial in overcoming severe performance problems--classic in traditional layered systems--that became apparent once the basic tool was completed. By taking advantage of the independence of the columns and the special characteristics of meaning-preserving restructuring, it was possible to extend one representation column of the architecture to the uppermost layer to provide the required access for efficient update without compromising independence. The cost of the extended architecture is that the upper layers are no longer as simple because they expose operations that only guarantee consistency under careful usage. However, the structural constraints of the hybrid architecture and provided models for building the more complicated layers minimizes the negative impact of this tradeoff.