A generalized theory of bit vector data flow analysis

The classical theory of data flow analysis, which has its roots in unidirectional flows, is inadequate to characterize bidirectional data flow problems. We present a generalized theory of bit vector data flow analysis which explains the known results in unidirectional and bidirectional data flows and provides a deeper insight into the process of data flow analysis. Based on the theory, we develop a worklist-based generic algorithm which is uniformly applicable to unidirectional and bidirectional data flow problems. It is simple, versatile, and easy to adapt for a specific problem. We show that the theory and the algorithm are applicable to all bounded monotone data flow problems which possess the property of the separability of solution. The theory yields valuable information about the complexity of data flow analysis. We show that the complexity of worklist-based iterative analysis is the same for unidirectional and bidirectional problems. We also define a measure of the complexity of round-robin iterative analysis. This measure, called width, is uniformly applicable to unidirectional and bidirectional problems and provides a tighter bound for unidirectional problems than the traditional measure of depth. Other applications include explanation of isolated results in efficient solution techniques and motivation of new techniques for bidirectional flows. In particular, we discuss edge splitting and edge placement and develop a feasibility criterion for decomposition of a bidirectional flow into a sequence of unidirectional flows.

[1]  John C. Cherniavsky,et al.  Validation, Verification, and Testing of Computer Software , 1982, CSUR.

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

[3]  Fred C. Chow,et al.  A portable machine-independent global optimizer--design and measurements , 1984 .

[4]  Gary A. Kildall,et al.  A unified approach to global program optimization , 1973, POPL.

[5]  Dhananjay M. Dhamdhere Register Assignment Using Code Placement Techniques , 1988, Comput. Lang..

[6]  Dhananjay M. Dhamdhere A Usually Linear Algorithm for Register Assignment Using Edge Placement of Load and Store Instructions , 1990, Comput. Lang..

[7]  Barry K. Rosen A Lubricant for Data Flow Analysis , 1982, SIAM J. Comput..

[8]  Barbara G. Ryder,et al.  An incremental algorithm for software analysis , 1987, SDE 2.

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

[10]  Dhananjay M. Dhamdhere,et al.  Complexity of bi-directional data flow analysis , 1993, POPL '93.

[11]  Mark N. Wegman,et al.  A Fast and Usually Linear Algorithm for Global Flow Analysis , 1976, J. ACM.

[12]  Barbara G. Ryder,et al.  A Critical Analysis of Incremental Iterative Data Flow Analysis Algorithms , 1990, IEEE Trans. Software Eng..

[13]  Robert Paige,et al.  Program Derivation by Fixed Point Computation , 1989, Sci. Comput. Program..

[14]  Dhananjay M. Dhamdhere,et al.  How to analyze large programs efficiently and informatively , 1992, PLDI '92.

[15]  Barry K. Rosen Monoids for rapid data flow analysis , 1978, POPL '78.

[16]  Dhananjay M. Dhamdhere,et al.  An elimination algorithm for bidirectional data flow problems using edge placement , 1993, TOPL.

[17]  Robert E. Tarjan,et al.  Fast Algorithms for Solving Path Problems , 1981, JACM.

[18]  Fred C. Chow Minimizing register usage penalty at procedure calls , 1988, PLDI '88.

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

[20]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

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

[22]  Vida Ghodssi Incremental analysis of programs , 1983 .

[23]  Etienne Morel,et al.  Global optimization by suppression of partial redundancies , 1979, CACM.

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

[25]  Robert E. Tarjan,et al.  A Unified Approach to Path Problems , 1981, JACM.

[26]  Neil D. Jones,et al.  Program Flow Analysis: Theory and Application , 1981 .

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

[28]  Robert E. Tarjan,et al.  Testing flow graph reducibility , 1973, J. Comput. Syst. Sci..

[29]  Jeffrey D. Ullman,et al.  Introduction to Automata Theory, Languages and Computation , 1979 .

[30]  Barbara G. Ryder,et al.  Conditions for incremental iteration: Examples and counterexamples , 1988, Sci. Comput. Program..

[31]  Dhananjay M. Dhamdhere,et al.  Complexity of Bidirectional Data Flow Analysis. , 1993 .

[32]  Matthew S. Hecht,et al.  Flow Analysis of Computer Programs , 1977 .

[33]  G. P. Bhattacharjee,et al.  A comparison of some algorithms for live variable analysis , 1980 .

[34]  Dhananjay M. Dhamdhere Practical adaption of the global optimization algorithm of Morel and Renvoise , 1991, TOPL.

[35]  Bernhard Steffen,et al.  Lazy code motion , 1992, PLDI '92.

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

[37]  Dhananjay M. Dhamdhere A fast algorithm for code movement optimisation , 1988, SIGP.

[38]  Barry K. Rosen Linear cost is sometimes quadratic , 1981, POPL '81.

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