Error Detection using Shape Analysis with Local Reasoning

Shape analyses are static analyses aimed at extracting invariants that describe the “shapes” of dynamically allocated recursive structures. Although existing shape analyses have been successful at verifying complex heap manipulations, they had limited success at being practical for larger programs. In particular, they have not been incorporated in scalable error-detection tools so far.

In this talk I will present a novel approach to shape analysis: using local reasoning about individual heap locations instead of global reasoning about entire heap abstractions. The key feature of this approach is a novel memory abstraction that models the heap using a set of independent configurations, each of which characterizes one single heap location. This approach: 1) leads to simpler algorithm specifications, because of local reasoning about the single location; 2) leads to efficient algorithms, because of the smaller abstraction granularity; and 3) makes it easier to develop context-sensitive, demand-driven, and incremental shape analyses.

I will also present a prototype system that uses shape analysis to detect memory leaks and accesses through dangling pointers in C programs. The current results suggest that the local reasoning approach is both sufficiently precise to accurately analyze a large class of heap manipulation algorithms, and sufficiently lightweight to scale to larger programs.

Speaker Details

Radu Rugina is an Assistant Professor in the Department of Computer Science at Cornell University. He received his Ph.D. from the University of California, Santa Barbara in 2001. Between 1997 and 2001 he was a visiting scholar at the M.I.T. Laboratory for Computer Science. Radu Rugina’s research interests are in static analysis and compilation techniques for program understanding, verification, and transformation. He is particularly interested in the analysis of pointer-based programs and its applications to error detection and region-based memory management.

Date:
Speakers:
Radu Rugina
Affiliation:
Cornell University
    • Portrait of Jeff Running

      Jeff Running