A formal, language-independent, and compositional approach to interprocedural control dependence analysis

Dependence relationships among the statements of a program are important to understand for various software development and maintenance purposes. The program's dependence graph is used as a base for various types of program analyses. A dependence graph represents the potential for one statement in a program to affect another in terms of the control and data dependencies among a program's statements. A dependence graph is a directed multi-graph; the vertices of the graph represent the statements in a program and the arcs represent control and data dependencies separately. During the past two decades the value of a dependence graph as a program representation has been recognized by a wide audience and the definition has been extended in various ways in order to incorporate dependence relationships in various types of programs. This dissertation concentrates on the control dependence aspect of program dependence and describes a new approach to identifying control dependencies in sequential, imperative, multi-procedure programs. The approach is formal, compositional, and language independent. It addresses previously identified pitfalls associated with identifying control dependencies in programs that contain procedure calls. Additionally, because it is rigorously defined, it provides a foundation for reasoning about its potential use as a base for formal extension to other types of programs. Models of control dependencies for uni-procedure program are typically based on composing two program representations: the control flow graph and the forward dominance tree. The key observation underlying the work described in this dissertation is that the notion of forward dominance has not been carried forward into approaches to computing control dependencies in more complex types of programs. The forward dominance relationship, as previously defined, is not effective for use in identifying control dependencies in non-inlined control flow representations of multi-procedure programs. In this thesis we extend the definitions of control flow. forward dominance, and control dependence for application to multi-procedure programs. We describe structures that represent the interprocedural relationships in a program. We describe and define interprocedural forward dominance and a related program representation called the forward dominance forest and its use to identify control dependencies in multi-procedure programs.