Software Open Access

Modular Verification of Heap Reachability Properties in Separation Logic (Artifact)

Ter-Gabrielyan, Arshavir; Summers, Alexander J.; Müller, Peter

Abstract

The correctness of many algorithms and data structures depends on reachability properties, that is, on the existence of chains of references between objects in the heap. Reasoning about reachability is difficult for two main reasons. First, any heap modification may affect an unbounded number of reference chains, which complicates modular verification, in particular, framing. Second, general graph reachability is not supported by SMT solvers, which impedes automatic verification.

In this paper, we present a modular specification and verification technique for reachability properties in separation logic. For each method, we specify reachability only locally within the fragment of the heap on which the method operates.

A novel form of reachability framing for relatively convex subheaps allows one to extend reachability properties from the heap fragment of a callee to the larger fragment of its caller, enabling precise procedure-modular reasoning.

Our technique supports practically important heap structures, namely acyclic graphs with a bounded outdegree as well as (potentially cyclic) graphs with at most one path (modulo cycles) between each pair of nodes. The integration into separation logic allows us to reason about reachability and other properties in a uniform way, to verify concurrent programs, and to automate our technique via existing separation logic verifiers. We demonstrate that our verification technique is amenable to SMT-based verification by encoding a number of benchmark examples into the Viper verification infrastructure.

Artifact

We submit an artifact with all the software needed to reproduce our experiments. Based on a number of benchmarks, including the running examples from our paper, we demonstrate how the claimed classes of programs (methods with relatively convex DAG or ZOPG footprints) can be systematically translated into the Viper verification language and verified using one of Viper’s standard verification backends. Our experiments confirm the precision claims of the paper by demonstrating that examples with precise structural invariants (that specify reachability and unreachability at the same time) can be encoded and verified in our technique. Beyond successful verification attempts, we show that bugs in the implementation and the specification of such programs are also efficiently detected by the tool. Additionally, our experiments support the following claims from the paper:

  • The complicated quantifiers employed for reachability framing, local updates, checking acyclicity, etc. are hidden from the user (in our examples, these are encapsulated in macros, representing the systematic steps of our encoding). Note that, since the preliminary version of the paper, we improved the encoding such that manual assertions (previously mentioned in the evaluation) beyond those generated systematically are no-longer needed
  • Our technique allows the user to efficiently combine reachability predicates over different sets of reference fields.
  • Specifications of conceptually different properties in our technique do not result in entangled proof obligations and can be verified independently.

Files (5.5 GB)
Name Size
17.zip
md5:42ab6461b3ef5ed56c7d3a80b3562b6a
397.3 MB Download
LICENSE.txt
md5:815ca599c9df247a0c7f619bab123dad
16.7 kB Download
OOPSLA-2019-Graphs (paper
md5:bd1b359182cc14f5fde3cb54bf2d74ca
5.1 GB Download
README.txt
md5:d47b1757b66ed29d1ea6a81ed459f75c
1.8 kB Download
  • Ter-Gabrielyan, Arshavir et al. (2019)

29
6
views
downloads
All versions This version
Views 2929
Downloads 66
Data volume 5.5 GB5.5 GB
Unique views 1717
Unique downloads 11

Share

Cite as