Effectively-Propositional Reasoning about Reachability in Linked Data Structures

  • Shachar Itzhaky
  • Anindya Banerjee
  • Neil Immerman
  • Aleksandar Nanevski
  • Mooly Sagiv
Conference paper

DOI: 10.1007/978-3-642-39799-8_53

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8044)
Cite this paper as:
Itzhaky S., Banerjee A., Immerman N., Nanevski A., Sagiv M. (2013) Effectively-Propositional Reasoning about Reachability in Linked Data Structures. In: Sharygina N., Veith H. (eds) Computer Aided Verification. CAV 2013. Lecture Notes in Computer Science, vol 8044. Springer, Berlin, Heidelberg

Abstract

This paper proposes a novel method of harnessing existing SAT solvers to verify reachability properties of programs that manipulate linked-list data structures. Such properties are essential for proving program termination, correctness of data structure invariants, and other safety properties. Our solution is complete, i.e., a SAT solver produces a counterexample whenever a program does not satisfy its specification. This result is surprising since even first-order theorem provers usually cannot deal with reachability in a complete way, because doing so requires reasoning about transitive closure.

Our result is based on the following ideas: (1) Programmers must write assertions in a restricted logic without quantifier alternation or function symbols. (2) The correctness of many programs can be expressed in such restricted logics, although we explain the tradeoffs. (3) Recent results in descriptive complexity can be utilized to show that every program that manipulates potentially cyclic, singly- and doubly-linked lists and that is annotated with assertions written in this restricted logic, can be verified with a SAT solver.

We implemented a tool atop Z3 and used it to show the correctness of several linked list programs.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Shachar Itzhaky
    • 1
  • Anindya Banerjee
    • 2
  • Neil Immerman
    • 3
  • Aleksandar Nanevski
    • 2
  • Mooly Sagiv
    • 1
  1. 1.Tel Aviv UniversityTel AvivIsrael
  2. 2.IMDEA Software InstituteMadridSpain
  3. 3.University of MassachusettsAmherstUSA

Personalised recommendations