Quantitative Separation Logic and Programs with Lists

This paper presents an extension of a decidable fragment of Separation Logic for singly-linked lists, defined by Berdine, Calcagno and O'Hearn [8]. Our main extension consists in introducing atomic formulae of the form lsk(x, y) describing a list segment of length k, stretching from xto y, where kis a logical variable interpreted over positive natural numbers, that may occur further inside Presburger constraints. We study the decidability of the full first-order logic combining unrestricted quantification of arithmetic and location variables. Although the full logic is found to be undecidable, validity of entailments between formulae with the quantifier prefix in the language $\exists^*{\{\exists_\mathbb{N},\forall_\mathbb{N}\}^*}$ We provide here a model theoretic method, based on a parametric notion of shape graphs. We have implemented our decision technique, providing a fully automated framework for the verification of quantitative properties expressed as pre- and post-conditions on programs working on lists and integer counters.

[1]  Sumit Gulwani,et al.  An Abstract Domain for Analyzing Heap-Manipulating Low-Level Software , 2007, CAV.

[2]  Sumit Gulwani,et al.  Lifting abstract interpreters to quantified logical domains , 2008, POPL '08.

[3]  Felix Klaedtke,et al.  Monadic Second-Order Logics with Cardinalities , 2003, ICALP.

[4]  Antoine Meyer,et al.  A logic of reachable patterns in linked data-structures , 2007, J. Log. Algebraic Methods Program..

[5]  Michael Benedikt,et al.  A Decidable Logic for Describing Linked Data Structures , 1999, ESOP.

[6]  Viorica Sofronie-Stokkermans,et al.  Locality Results for Certain Extensions of Theories with Bridging Functions , 2009, CADE.

[7]  Ahmed Bouajjani,et al.  Programs with Lists Are Counter Automata , 2006, CAV.

[8]  Marvin Minsky,et al.  Computation : finite and infinite machines , 2016 .

[9]  Constantin Enea,et al.  A Logic-Based Framework for Reasoning about Composite Data Structures , 2009, CONCUR.

[10]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[11]  Peter W. O'Hearn,et al.  Computability and Complexity Results for a Spatial Assertion Language for Data Structures , 2001, APLAS.

[12]  Peter W. O'Hearn,et al.  A Decidable Fragment of Separation Logic , 2004, FSTTCS.

[13]  Henny B. Sipma,et al.  Decision Procedures for Recursive Data Structures with Integer Constraints , 2004, IJCAR.

[14]  Edmund M. Clarke,et al.  Arithmetic Strengthening for Shape Analysis , 2007, SAS.

[15]  Ahmed Bouajjani,et al.  TReX: A Tool for Reachability Analysis of Complex Systems , 2001, CAV.

[16]  David Walker,et al.  Types and full abstraction for polyadic pi-calculus , 2005, Inf. Comput..

[17]  Pierre Wolper,et al.  Verifying Systems with Infinite but Regular State Spaces , 1998, CAV.

[18]  Neil Immerman,et al.  Verification via Structure Simulation , 2004, CAV.

[19]  Bernhard Thalheim,et al.  Abstract State Machines 2004. Advances in Theory and Practice , 2004, Lecture Notes in Computer Science.