|
ABSTRACT
This article concerns the static analysis of programs that perform
destructive updating on heap-allocated storage. We give an algorithm
that uses finite shape graphs to approximate conservatively the
possible “shapes” that heap-allocated structures in a program can take on. For certain programs, our technique is able to determine
such properties as (1) when the input to the program is a list, the
output is also a list and (2) when the input to the program is a tree,
the output is also a tree. For example, the method can determine that
“listness” is preserved by (1) a program that performs list reversal
via destructive updating of the input list and (2) a program that
searches a list and splices a new element into the list. None of the previously known methods that use graphs to model the
program's store are capable of determining that “listness” is
preserved on these examples (or examples of similar complexity).
In contrast with most previous work, our shape analysis algorithm is
even accurate for certain programs that update cyclic data structures;
that is, it is sometimes able to show that when the input to the
program is a circular list, the output is also a circular list. For
example, the shape-analysis algorithm can determine that an insertion
into a circular list preserves “circular listness.”
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
ASSMANN, W. AND WEINHARDT, M. 1993. Interprocedural heap analysis for parallelizing imperative programs. In Programming Models For Massively Parallel Computers, W. K. Giloi, S. JS~hnichen, and B. D. Shriver, Eds. IEEE Computer Society, Washington, D.C., 74-82.
|
 |
2
|
|
 |
3
|
|
 |
4
|
|
| |
5
|
DEUTSCH, t. 1992. A storeless model for aliasing and its abstractions using finite representations of right-regular equivalence relations. In Proceedings of the IEEE International Conference on Computer Languages. IEEE Computer Society, Washington, D.C., 2-13.
|
 |
6
|
|
 |
7
|
Rakesh Ghiya , Laurie J. Hendren, Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.1-15, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237724]
|
| |
8
|
|
| |
9
|
|
| |
10
|
HENDREN, L. AND GAO, G. 1992. Designing programming languages for analyzability: A fresh look at pointer data structures. In Proceedings of the International Conference on Computer Languages. IEEE Computer Society, Washington, D.C., 242-251.
|
 |
11
|
Laurie J. Hendren , Joseph Hummell , Alexandru Nicolau, Abstractions for recursive pointer data structures: improving the analysis and transformation of imperative programs, Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and implementation, p.249-260, June 15-19, 1992, San Francisco, California, United States
|
| |
12
|
|
 |
13
|
S. Horwitz , P. Pfeiffer , T. Reps, Dependence analysis for pointer variables, Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation, p.28-40, June 19-23, 1989, Portland, Oregon, United States
|
| |
14
|
JONES, N. AND MUCHNICK, S. 1981. Flow analysis and optimization of Lisp-like structures. In Program Flow Analysis: Theory and Applications, S. Muchnick and N. Jones, Eds. Prentice- Hall, Englewood Cliffs, N.J., Chapter 4, 102-131.
|
 |
15
|
|
| |
16
|
|
 |
17
|
|
 |
18
|
|
| |
19
|
|
 |
20
|
|
| |
21
|
LINDSTROM, G. 1973. Scanning list structures without stacks or tag bits. Inf. Process. Lett. 2, 2 (June), 47-51.
|
| |
22
|
MOGENSEN, T. 1988. Partially static structures in a self-applicable partial evaluator. In Partial Evaluation and Mixed Computation: Proceedings of the IFIP TC2 Workshop on Partial Evaluation and Mixed Computation (Gammel Avernaes, Denmark, Oct 18-24, 1987). North-Holland, Amsterdam, 325-347.
|
 |
23
|
|
 |
24
|
|
| |
25
|
|
 |
26
|
Raghu Ramakrishnan , Divesh Srivastava , S. Sudarshan , Praveen Seshadri, Implementation of the CORAL deductive database system, Proceedings of the 1993 ACM SIGMOD international conference on Management of data, p.167-176, May 25-28, 1993, Washington, D.C., United States
|
 |
27
|
|
 |
28
|
|
| |
29
|
REYNOLDS, J. 1968. Automatic computation of data set definitions. In Information Processing 68: Proceedings of the IFIP Congress. North-Holland, Amsterdam, 456-461.
|
| |
30
|
SAGIV, ~/{., REP$, T., AND WILHELM, R. 1995. Solving shape-anMysis problems in languages with destructive updating. Tech. Rep. TR-1276, Computer Sciences Dept., Univ. of Wisconsin, Madison, Wisc. July. Available via http:////www.cs.wisc.edu//trs.html.
|
| |
31
|
|
| |
32
|
SHARIR, ~/{. AND PNUELI, t. 1981. Two approaches to interprocedurM data flow analysis. In Program Flow Analysis: Theory and Applications, S. Muchnick and N. Jones, Eds. Prentice- Hall, Englewood Cliffs, N.J., 189-234.
|
| |
33
|
|
 |
34
|
|
CITED BY 61
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mooly Sagiv , Thomas Reps , Reinhard Wilhelm, Parametric shape analysis via 3-valued logic, Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.105-118, January 20-22, 1999, San Antonio, Texas, United States
|
|
|
|
|
|
|
|
|
|
|
|
Karl Crary , David Walker , Greg Morrisett, Typed memory management in a calculus of capabilities, Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.262-275, January 20-22, 1999, San Antonio, Texas, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Oscar Plata , Rafael Asenjo , Eladio Gutiérrez , Francisco Corbera , Angeles Navarro , Emilio L. Zapata, On the parallelization of irregular and dynamic programs, Parallel Computing, v.31 n.6, p.544-562, June 2005
|
|
|
Milind Kulkarni , Patrick Carribault , Keshav Pingali , Ganesh Ramanarayanan , Bruce Walter , Kavita Bala , L. Paul Chew, Scheduling strategies for optimistic parallel execution of irregular programs, Proceedings of the twentieth annual symposium on Parallelism in algorithms and architectures, June 14-16, 2008, Munich, Germany
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Milind Kulkarni , Martin Burtscher , Rajeshkar Inkulu , Keshav Pingali , Calin Casçaval, How much parallelism is there in irregular applications?, Proceedings of the 14th ACM SIGPLAN symposium on Principles and practice of parallel programming, February 14-18, 2009, Raleigh, NC, USA
|
|
|
Cristiano Calcagno , Dino Distefano , Peter O'Hearn , Hongseok Yang, Compositional shape analysis by means of bi-abduction, Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, January 21-23, 2009, Savannah, GA, USA
|
|
|
|
|
|
|
ADDITIONAL RESOURCES
Appendices A-B do not appear in the print version of this
article. They are contained in the online version of this article
and are also available in a separate online document.
INDEX TERMS
Primary Classification:
F.
Theory of Computation
F.3
LOGICS AND MEANINGS OF PROGRAMS
F.3.2
Semantics of Programming Languages
Subjects:
Program analysis
Additional Classification:
D.
Software
D.2
SOFTWARE ENGINEERING
D.2.5
Testing and Debugging
Subjects:
Symbolic execution
D.3
PROGRAMMING LANGUAGES
D.3.3
Language Constructs and Features
Subjects:
Data types and structures
D.3.4
Processors
Subjects:
Optimization
E.
Data
E.1
DATA STRUCTURES
Subjects:
Trees;
Graphs and networks;
Lists, stacks, and queues
E.2
DATA STORAGE REPRESENTATIONS
Subjects:
Linked representations
F.
Theory of Computation
F.3
LOGICS AND MEANINGS OF PROGRAMS
F.3.3
Studies of Program Constructs
Subjects:
Type structure
General Terms:
Algorithms,
Languages,
Theory,
Verification
Keywords:
abstract interpretation,
alias analysis,
dataflow analysis,
destructive updating,
pointer analysis,
shape analysis,
shape graphs,
static analysis
REVIEW
"Max Hailperin : Reviewer"
An abstract interpretation of imperative programs mutating
pointer-based structures is presented. This interpretation can reach
conclusions such as that inserting into a circular list yields a
circular list, while inserting into an acyclic lis
more...
|