ACM Transactions on Programming Languages and Systems · 1998 · 324 citations · 29 references
ComputingComputer ScienceAlgorithmsData StructuresProgramming LanguagesData Structure AlgorithmsData-flow AnalysisCycle DetectionHeap Analysis
The article addresses static analysis of programs that perform destructive updating on heap‑allocated storage. The authors propose an algorithm that approximates the possible shapes of heap‑allocated structures in such programs. The algorithm employs finite shape graphs to conservatively model these shapes. It proves that listness and circular listness are preserved in programs that reverse, splice, or insert into lists, and it can handle cyclic data structures where prior graph‑based methods fail.
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.”
29
Patrick Cousot, Radhia Cousot · 1977 · 6.2K citations
The Art of Computer Programming
G.E. Whitesides · Nuclear Science and Engineering · 1970 · 6.1K citations
Analysis of pointers and structures
David Chase, Mark N. Wegman, F. K. Zadeck · ACM SIGPLAN Notices · 2004 · 437 citations
Undecidability of static analysis
William Landi · ACM Letters on Programming Languages and Systems · 1992 · 382 citations · Full text