Shape analysis as a generalized path problem

This paper concerns a method for approximating the possible “shapes” that heap-allocated structures in a program can take on. We present a new approach to finding solutions to shape-analysis problems that involves formulating them as generalized graph-reachability problems. The reachability problem that arises is not an ordinary reachability problem (e.g., transitive closure), but one in which a path is considered to connect two vertices only if the concatenation of the labels on the edges of the path is a word in a certain context-free language. This graph-reachability approach allows us to give polynomial bounds on the running time of an algorithm for shape analysis. It also permits us to obtain a demand algorithm for shape analysis. (In a demand algorithm, the goal is to determine shape information selectively—i.e., for particular variables at particular points in the program, rather than for every variable at every point in the program.)

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

[2]  Mihalis Yannakakis,et al.  Graph-theoretic methods in database theory , 1990, PODS.

[3]  John C. Reynolds,et al.  Automatic computation of data set definitions , 1968, IFIP Congress.

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

[5]  Neil D. Jones,et al.  Flow analysis and optimization of LISP-like structures , 1979, POPL.

[6]  Nevin Heintze,et al.  Set-based analysis of ML programs , 1994, LFP '94.

[7]  David Maier,et al.  Magic sets and other strange ways to implement logic programs (extended abstract) , 1985, PODS '86.

[8]  John McCarthy,et al.  A BASIS FOR A MATHEMATICAL THEORY OF COMPUTATION 1) , 2018 .

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

[10]  Catriel Beeri,et al.  On the power of magic , 1987, J. Log. Program..

[11]  Thomas W. Reps,et al.  Demand Interprocedural Program Analysis Using Logic Databases , 1993, Workshop on Programming with Logic Databases , ILPS.

[12]  Jeffrey D. Ullman,et al.  Principles of Database and Knowledge-Base Systems, Volume II , 1988, Principles of computer science series.

[13]  James R. Larus,et al.  Detecting conflicts between structure accesses , 1988, PLDI '88.

[14]  Daniel H. Younger,et al.  Recognition and Parsing of Context-Free Languages in Time n^3 , 1967, Inf. Control..

[15]  Torben Æ. Mogensen Separating binding times in language specifications , 1989, Conference on Functional Programming Languages and Computer Architecture.

[16]  Jeffrey D. Ullman,et al.  Principles Of Database And Knowledge-Base Systems , 1979 .

[17]  Tadao Kasami,et al.  An Efficient Recognition and Syntax-Analysis Algorithm for Context-Free Languages , 1965 .

[18]  Raghu Ramakrishnan,et al.  Performance Evaluation of Data Intensive Logic Programs , 1988, Foundations of Deductive Databases and Logic Programming..

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

[20]  Neil D. Jones,et al.  Complexity of flow analysis, inductive assertion synthesis and a language due to Dijkstra , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[21]  Nevin Heintze Set Based Analysis of ML Programs (Extended Abstract) , 1993 .

[22]  Jeffrey D. Uuman Principles of database and knowledge- base systems , 1989 .

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

[24]  Letizia Tanca,et al.  What you Always Wanted to Know About Datalog (And Never Dared to Ask) , 1989, IEEE Trans. Knowl. Data Eng..

[25]  Alexandru Nicolau,et al.  Parallelizing Programs with Recursive Data Structures , 1989, IEEE Trans. Parallel Distributed Syst..

[26]  Phil Pfeiffer,et al.  Dependence analysis for pointer variables , 1989, PLDI '89.

[27]  John McCarthy,et al.  A basis for a mathematical theory of computation, preliminary report , 1899, IRE-AIEE-ACM '61 (Western).

[28]  Uwe Aßmann On Edge Addition Rewrite Systems and their Relevance to Program Analysis , 1994, TAGT.

[29]  Uwe Aamann On Edge Addition Rewrite Systems and Their Relevance to Program Analysis , 1994 .