On the Complexity of Pointer Arithmetic in Separation Logic (an extended version)

03/08/2018
by   James Brotherston, et al.
0

We investigate the complexity consequences of adding pointer arithmetic to separation logic. Specifically, we study extensions of the points-to fragment of symbolic-heap separation logic with various forms of Presburger arithmetic constraints. Most significantly, we find that, even in the minimal case when we allow only conjunctions of simple "difference constraints" (x'≤ x+k) where k is an integer, polynomial-time decidability is already impossible: satisfiability becomes NP-complete, while quantifier-free entailment becomes coNP-complete and quantified entailment becomes P2-complete (P2 is the second class in the polynomial-time hierarchy) In fact we prove that the upper bound is the same, P2, even for the full pointer arithmetic but with a fixed pointer offset, where we allow any Boolean combinations of the elementary formulas (x'=x+k0), (x'≤ x+k0), and (x'<x+k0), and, in addition to the points-to formulas, we allow spatial formulas of the arrays the length of which is bounded by k0 and lists which length is bounded by k0, etc, where k0 is a fixed integer. However, if we allow a significantly more expressive form of pointer arithmetic - namely arbitrary Boolean combinations of elementary formulas over arbitrary pointer sums - then the complexity increase is relatively modest for satisfiability and quantifier-free entailment: they are still NP-complete and coNP-complete respectively, and the complexity appears to increase drastically for quantified entailments.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/27/2020

Beyond formulas-as-cographs: an extension of Boolean logic to arbitrary graphs

We propose a graph-based extension of Boolean logic called Boolean Graph...
research
02/16/2018

Decidability for Entailments of Symbolic Heaps with Arrays

This paper presents two decidability results on the validity checking pr...
research
04/10/2018

The Complexity of Prenex Separation Logic with One Selector

We first show that infinite satisfiability can be reduced to finite sati...
research
12/11/2014

Logic of temporal attribute implications

We study logic for reasoning with if-then formulas describing dependenci...
research
08/28/2017

Short Presburger arithmetic is hard

We study the computational complexity of short sentences in Presburger a...
research
11/02/2018

Separation Logic with Linearly Compositional Inductive Predicates and Set Data Constraints

We identify difference-bound set constraints (DBS), an analogy of differ...
research
05/27/2021

Learning Union of Integer Hypercubes with Queries (Technical Report)

We study the problem of learning a finite union of integer (axis-aligned...

Please sign up or login with your details

Forgot password? Click here to reset