Efficient construction of program dependence graphs

We present a new technique for constructing a program dependence graph that contains a program's control flow, along with the usual control and data dependence information. Our algorithm constructs a program dependence graph while the program is being parsed. For programs containing only structured transfers of control, our algorithm does not require information provided by the control flow graph or post dominator tree and therefore obviates the construction of these auxiliary graphs. For programs containing explicit transfers of control, our algorithm adjusts the partial control dependence subgraph, constructed during the parse, to incorporate exact control dependence information. There are several advantages to our approach. For many programs, our algorithm may result in substantial savings in time and memory since our construction of the program dependence graph does not require the auxiliary graph. Furthermore, since we incorporate control and data flow as well as exact control dependence information into the program dependence graph, our graph has a wide range of applicability. We have implemented our algorithm by incorporating it into the Free Software Foundation's GNU C compiler; currently we are performing experiments that compare our technique with the traditional approach.

[1]  Mark Weiser,et al.  Program Slicing , 1981, IEEE Transactions on Software Engineering.

[2]  Arthur Bernard Maccabe,et al.  Program Dependence Graphs for the Rest of Us , 1992 .

[3]  David Binkley,et al.  Using semantic differencing to reduce the cost of regression testing , 1992, Proceedings Conference on Software Maintenance 1992.

[4]  RothermelGregg,et al.  Efficient construction of program dependence graphs , 1993 .

[5]  Rajiv Gupta,et al.  An approach to regression testing using slicing , 1992, Proceedings Conference on Software Maintenance 1992.

[6]  Barbara G. Ryder,et al.  Directed Tracing to Detect Race Conditions , 1992, ICPP.

[7]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[8]  Brian A. Malloy,et al.  A unified interprocedural program representation for a maintenance environment , 1991, Proceedings. Conference on Software Maintenance 1991.

[9]  Susan Horwitz,et al.  Incremental program testing using program dependence graphs , 1993, POPL '93.

[10]  Joseph Robert Horgan,et al.  Dynamic program slicing , 1990, PLDI '90.

[11]  Bogdan Korel The Program Dependence Graph in Static Program Testing , 1987, Inf. Process. Lett..

[12]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1984, TOPL.

[13]  Eugene H. Spafford,et al.  Dynamic slicing in the presence of unconstrained pointers , 1991, TAV4.

[14]  Brian A. Malloy,et al.  Data flow testing of parallelized code , 1992, Proceedings Conference on Software Maintenance 1992.

[15]  Rajiv Gupta,et al.  Automatic Generation of a Compact Test Suit , 1992, IFIP Congress.

[16]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1990, TOPL.

[17]  FerranteJeanne,et al.  The program dependence graph and its use in optimization , 1987 .