Affiliation:
1. Tel-Aviv Univ., Tel-Aviv, Israel
2. Univ. of Wisconsin, Madison
3. Univ. des Saarlandes, Saarbrücken, Germany
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.”
Publisher
Association for Computing Machinery (ACM)
Cited by
175 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献