Program analysis with partial transfer functions

Program analyses used in compilers commonly use a transfer function (TF) to summarize the input/output behavior of a procedure or region, speeding convergence of analysis of the surrounding region or program. A partial transfer function (PTF) summarizes input/output behavior for only a subset of the possible inputs. In many cases, an exact characterization of input/output behavior is possible for the contexts occurring in a given program, even when a concise and exact total summary would not be feasible. In other cases, an approximate PTF can be used which, while not exact, is more precise than would be possible with a total approximation. As demonstrated by prior work in a flow- and context-sensitive pointer alias analysis, PTFs are effective in speeding the convergence of program analysis involving higher-order functions and complex transfer functions that cannot easily be summarized. This paper presents a formal definition of partial transfer functions and introduces a general framework that enables data flow systems with complex transfer functions to be decomposed into simpler partial transfer functions. This paper provides a foundation that will allow the further development of the PTF concept, as well as enabling application to many more program analyses.

[1]  Barbara G. Ryder,et al.  Relevant context inference , 1999, POPL '99.

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

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

[4]  Erik Ruf,et al.  Using Types to Avoid Redundant Specialization , 1991, PEPM.

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

[6]  Barry K. Rosen,et al.  High-level data flow analysis , 1977, CACM.

[7]  François Bourdoncle,et al.  Abstract interpretation by dynamic partitioning , 1992, Journal of Functional Programming.

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

[9]  Jong-Deok Choi,et al.  Automatic construction of sparse data flow evaluation graphs , 1991, POPL '91.

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

[11]  Niels Jørgensen Finding fixpoints in finite function spaces using neededness analysis and chaotic iteration , 1994 .

[12]  Helmut Seidl,et al.  An Even Faster Solver for General Systems of Equations , 1996, SAS.

[13]  Matthias Felleisen,et al.  Componential set-based analysis , 1997, TOPL.

[14]  Pascal Van Hentenryck,et al.  A Universal Top-Down Fixpoint Algorithm , 1992 .

[15]  Barry K. Rosen Applications of high level control flow , 1977, POPL '77.

[16]  Erik Ruf,et al.  Using types to avoid redundant specialization , 1991, PEPM '91.

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

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

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

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

[21]  Robert E. Tarjan,et al.  Iterative algorithms for global flow analysis , 1976 .

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

[23]  Rajiv Gupta,et al.  Reducing the Cost of Data Flow Analysis By Congruence Partitioning , 1994, CC.

[24]  Erik Ruf Topics in online partial evaluation , 1993 .

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

[26]  Martin C. Rinard,et al.  Pointer analysis for multithreaded programs , 1999, PLDI '99.