A practical framework for demand-driven interprocedural data flow analysis

The high cost and growing importance of interprocedural data flow analysis have led to an increased interest in demand-driven algorithms. In this article, we present a general framework for developing demand-driven interprocedural data flow analyzers and report our experience in evaluating the performance of this approach. A demand for data flow information is modeled as a set of queries. The framework includes a generic demand-driven algorithm that determines the response to query by iteratively applying a system of query propagation rules. The propagation rules yield precise responses for the class of distributive finite data flow problems. We also describe a two-phase framework variation to accurately handle nondistributive problems. A performance evaluation of our demand-driven approach is presented for two data flow problems, namely, reaching-definitions and copy constant propagation. Our experiments show that demand-driven analysis performs well in practice, reducing both time and space requirements when compared with exhaustive analysis.

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

[2]  F. Kenneth Zadeck,et al.  Incremental data flow analysis in a structured program editor , 1984, SIGPLAN '84.

[3]  Neil D. Jones,et al.  Data flow analysis of applicative programs using minimal function graphs , 1986, POPL '86.

[4]  Mary Lou Soffa,et al.  An Incremental Version of Iterative Data Flow Analysis , 1989, IEEE Trans. Software Eng..

[5]  Thomas W. Reps,et al.  Precise interprocedural dataflow analysis via graph reachability , 1995, POPL '95.

[6]  M. Wegman,et al.  Global value numbers and redundant computations , 1988, POPL '88.

[7]  Jong-Deok Choi,et al.  Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects , 1993, POPL '93.

[8]  Thomas W. Reps,et al.  Demand interprocedural dataflow analysis , 1995, SIGSOFT FSE.

[9]  Jong-Deok Choi,et al.  On the Efficient Engineering of Ambitious Program Analysis , 1994, IEEE Trans. Software Eng..

[10]  Daniel M. Yellin,et al.  Extending Typestate Checking Using Conditional Liveness Analysis , 1993, IEEE Trans. Software Eng..

[11]  Keith D. Cooper,et al.  Analyzing aliases of reference formal parameters , 1985, POPL.

[12]  Thomas W. Reps,et al.  Precise Interprocedural Dataflow Analysis with Applications to Constant Propagation , 1995, TAPSOFT.

[13]  Rajiv Gupta,et al.  A demand-driven approach for efficient interprocedural data flow analysis , 1996 .

[14]  François Bourdoncle,et al.  Abstract debugging of higher-order imperative languages , 1993, PLDI '93.

[15]  Monica S. Lam,et al.  Efficient context-sensitive pointer analysis for C programs , 1995, PLDI '95.

[16]  S LamMonica,et al.  Efficient context-sensitive pointer analysis for C programs , 1995 .

[17]  Barbara G. Ryder,et al.  A safe approximate algorithm for interprocedural aliasing , 1992, PLDI '92.

[18]  Thomas W. Reps,et al.  Precise Interprocedural Dataflow Analysis with Applications to Constant Propagation , 1995, TAPSOFT.

[19]  Ron Cytron,et al.  Efficient accommodation of may-alias information in SSA form , 1993, PLDI '93.

[20]  Chris Hankin,et al.  A Type-based Framework for Program Analysis , 1994, SAS.

[21]  Thomas W. Reps,et al.  Solving Demand Versions of Interprocedural Analysis Problems , 1994, CC.

[22]  Barbara G. Ryder Incremental data flow analysis , 1983, POPL '83.

[23]  Thomas W. Reps,et al.  Incremental Context-Dependent Analysis for Language-Based Editors , 1983, TOPL.

[24]  Wolfgang A. Halang,et al.  Enabling efficient schedulability analysis through conditional linking and program transformations , 1993 .

[25]  Ken Kennedy,et al.  Procedure cloning , 1992, Proceedings of the 1992 International Conference on Computer Languages.

[26]  John Hughes,et al.  Reversing Abstract Interpretations , 1992, Sci. Comput. Program..

[27]  Elaine J. Weyuker,et al.  An Applicable Family of Data Flow Testing Criteria , 1988, IEEE Trans. Software Eng..

[28]  Rajiv Gupta,et al.  Demand-driven computation of interprocedural data flow , 1995, POPL '95.

[29]  Bernhard Steffen,et al.  The Interprocedural Coincidence Theorem , 1992, CC.

[30]  William G. Griswold,et al.  Automated assistance for program restructuring , 1993, TSEM.

[31]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[32]  GhiyaRakesh,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994 .

[33]  M. Burke,et al.  Eecient Flow-sensitive Interprocedural Computation of Pointer-induced Aliases and Side Eeects , 1993 .

[34]  Rudolf Eigenmann,et al.  Demand-Driven, Symbolic Range Propagation , 1995, LCPC.

[35]  Patrick Cousot,et al.  Semantic foundations of program analysis , 1981 .

[36]  Barbara G. Ryder,et al.  An efficient hybrid algorithm for incremental data flow analysis , 1989, POPL '90.

[37]  Patrick Cousot,et al.  Static Determination of Dynamic Properties of Recursive Procedures , 1977, Formal Description of Programming Concepts.