Parametric and Termination-Sensitive Control Dependence

A parametric approach to control dependence is presented, where the parameter is any prefix-invariant property on paths in the control-flow graph (CFG). Existing control dependencies, both direct and indirect, can be obtained as instances of the parametric framework for particular properties on paths. A novel control dependence relation, called termination-sensitive control dependence, is obtained also as an instance of the parametric framework. This control dependence is sensitive to the termination information of loops, which can be given via annotations. If all loops are annotated as terminating then it becomes the classic control dependence, while if all loops are annotated as non-terminating then it becomes the weak control dependence; since in practice some loops are terminating and others are not, termination-sensitive control dependence is expected to improve the precision of analysis tools using it. The unifying formal framework for direct and indirect control dependence suggests also, in a natural way, a unifying terminology for the various notions of control dependence, which is also proposed in this paper. Finally, a worst-case O(n2) algorithm to compute the indirect termination-sensitive control dependence for languages that allow only “structured” jumps (i.e., ones that do not jump into the middle of a different block), such as Java and C#, is given, avoiding the O(n3) complexity of the trivial algorithm calculating the transitive closure of the direct dependence.

[1]  Henny B. Sipma,et al.  Termination Analysis of Integer Linear Loops , 2005, CONCUR.

[2]  Frank Wolter,et al.  Monodic fragments of first-order temporal logics: 2000-2001 A.D , 2001, LPAR.

[3]  Henny B. Sipma,et al.  Practical Methods for Proving Program Termination , 2002, CAV.

[4]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[5]  Thomas W. Reps,et al.  The use of program dependence graphs in software engineering , 1992, International Conference on Software Engineering.

[6]  John Cocke,et al.  A program data flow analysis procedure , 1976, CACM.

[7]  Keshav Pingali,et al.  A framework for generalized control dependence , 1996, PLDI '96.

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

[9]  Matthew B. Dwyer,et al.  A new foundation for control dependence and slicing for modern program structures , 2005, TOPL.

[10]  Grigore Rosu,et al.  Predicting Concurrency Errors at Runtime using Sliced Causality , 2005 .

[11]  J. Büchi Weak Second‐Order Arithmetic and Finite Automata , 1960 .

[12]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[13]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[14]  Lori A. Clarke,et al.  A Formal Model of Program Dependences and Its Implications for Software Testing, Debugging, and Maintenance , 1990, IEEE Trans. Software Eng..

[15]  Vincent Danos,et al.  Transactions in RCCS , 2005, CONCUR.

[16]  Orna Kupferman,et al.  Reasoning About Systems with Transition Fairness , 2005, LPAR.

[17]  Robert E. Tarjan,et al.  A fast algorithm for finding dominators in a flowgraph , 1979, TOPL.

[18]  Peter J. Denning,et al.  Certification of programs for secure information flow , 1977, CACM.

[19]  Barbara G. Ryder,et al.  Elimination algorithms for data flow analysis , 1986, CSUR.