Automatic verification of pointer programs using grammar-based shape analysis

  • Authors:
  • Oukseh Lee;Hongseok Yang;Kwangkeun Yi

  • Affiliations:
  • Dept. of Computer Science & Engineering, Hanyang University, Korea;ERC-ACI, Seoul National University, Korea;School of Computer Science & Engineering, Seoul National University, Korea

  • Venue:
  • ESOP'05 Proceedings of the 14th European conference on Programming Languages and Systems
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a program analysis that can automatically discover the shape of complex pointer data structures. The discovered invariants are, then, used to verify the absence of safety errors in the program, or to check whether the program preserves the data consistency. Our analysis extends the shape analysis of Sagiv et al. with grammar annotations, which can precisely express the shape of complex data structures. We demonstrate the usefulness of our analysis with binomial heap construction and the Schorr-Waite tree traversal. For a binomial heap construction algorithm, our analysis returns a grammar that precisely describes the shape of a binomial heap; for the Schorr-Waite tree traversal, our analysis shows that at the end of the execution, the result is a tree and there are no memory leaks.