Semantic program dependence graphs
Parsons, Rebecca Jane
Felleisen, Matthias; Cartwright, Robert S.
Doctor of Philosophy
Semantic program dependence graphs, or semantic pdgs, are an attractive intermediate program representation for use in advanced optimizing and parallelizing compilers. The semantic pdg, which is based on the program dependence graph, has a compositional semantics that provides an elegant characterization of the types of dependences that arise in imperative programming languages. In addition, the semantic pdg has a simple operational semantics which serves as the basis of an equational calculus reasoning about semantic pdgs. Finally, the algorithms for creating the semantic pdg are efficient enough to allow the use of this program representation in actual compilers. The semantic pdg is the result of a study, using denotational semantics, into the notions of data and control dependence in imperative programming languages. Semantic pdgs include a new component, the valve node, which ensures the data flow character of the semantic pdg, even in the presence of conditional assignments, and provides the control information necessary to perform many important program optimizations. The valve node is a natural result of the derivation step that addresses the data dependence relation. The semantic pdg utilizes the new concept of a partial array to allow for optimizations of array accesses while maintaining the mathematical elegance of the data flow semantics of the pdg. The semantic pdg is not only an elegant representation from a mathematical perspective, but it is also a useful representation from a practical perspective. This structure is particularly well-suited for use in optimizing and parallelizing compilers since it explicates the important relationships among the different statements in a program. We have developed a program representation that is powerful enough to represent the behavior of a program, that provides the information needed to optimize the program, and that has a precise mathematical description. The development of the semantic pdg reconciles the often contradictory requirements of mathematical elegance and practicality.