Beyond reachability: shape abstraction in the presence of pointer arithmetic

  • Authors:
  • Cristiano Calcagno;Dino Distefano;Peter W. O'Hearn;Hongseok Yang

  • Affiliations:
  • Imperial College, London;Queen Mary, University of London;Queen Mary, University of London;Seoul National University

  • Venue:
  • SAS'06 Proceedings of the 13th international conference on Static Analysis
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Previous shape analysis algorithms use a memory model where the heap is composed of discrete nodes that can be accessed only via access paths built from variables and field names, an assumption that is violated by pointer arithmetic. In this paper we show how this assumption can be removed, and pointer arithmetic embraced, by using an analysis based on separation logic. We describe an abstract domain whose elements are certain separation logic formulae, and an abstraction mechanism that automatically transits between a low-level RAM view of memory and a higher, fictional, view that abstracts from the representation of nodes and multiword linked-lists as certain configurations of the RAM. A widening operator is used to accelerate the analysis. We report experimental results obtained from running our analysis on a number of classic algorithms for dynamic memory management.