Effectively-Propositional reasoning about reachability in linked data structures

  • Authors:
  • Shachar Itzhaky;Anindya Banerjee;Neil Immerman;Aleksandar Nanevski;Mooly Sagiv

  • Affiliations:
  • Tel Aviv University, Tel Aviv, Israel;IMDEA Software Institute, Madrid, Spain;University of Massachusetts, Amherst;IMDEA Software Institute, Madrid, Spain;Tel Aviv University, Tel Aviv, Israel

  • Venue:
  • CAV'13 Proceedings of the 25th international conference on Computer Aided Verification
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

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.