@@ -24,7 +24,7 @@ Given the symbolic heaps $\varphi$ and $\psi$ in \slah\ such that

Our goal in this section is to show that the entailment problem is decidable, as stated in the following theorem.

\begin{theorem}\label{thm-entail}

The entailment problem of {\slah} is in EXPTIME.

The entailment problem of {\slah} is in EXPTIME.\mihaela{state upperbound}

\end{theorem}

For comparison, the entailment problem of quantifier-free ASL formulas is in coNP~\cite{BrotherstonGK17}.

...

...

@@ -75,7 +75,8 @@ Recall that a \emph{preorder} $\preceq$ over a set $A$

%\vspace{-2mm}

\begin{definition}[Total preorder compatible with $\abs(\varphi)$]

Let $\preceq$ be a total preorder over $\addr(\varphi)\cup\addr(\psi)$. Then $\preceq$ is said to be \emph{compatible with}$\varphi$ if $\abs(\varphi)\wedge C_\preceq$ is satisfiable, where

Let $\preceq$ be a total preorder over $\addr(\varphi)\cup\addr(\psi)$. Then $\preceq$ is said to be \emph{compatible with}$\varphi$ if\mihaela{r2: symmetry?}

$\abs(\varphi)\wedge C_\preceq$ is satisfiable, where

The decision procedures presented are implemented as an extension of the \cspen\ solver~\cite{GuCW16,CompSpenSite}, called \cspenp.

The decision procedures presented are implemented as an extension of the \cspen\ solver~\cite{GuCW16}, called \cspenp, available at~\cite{CompSpenSite}.

Let us briefly recall some information about {\cspen}. {\cspen} is written in C++ and includes several decision procedures for symbolic heap fragments including

(i) inductive predicates that are compositional~\cite{EneaSW15}

(the predicate $\ls{}(x,y)$ for list segments is a simple example)

...

...

@@ -71,7 +71,9 @@ and the satisfiability or entailment queries in the SL-COMP format~\cite{DBLP:co

\medskip

\mypar{Benchmarks.}

We generated 133 benchmarks, %with 66 and 67 instances for the satisfiability and entailment problem respectively. These benchmarks are

We generated 133 benchmarks,

available at~\cite{CompSpenSite} (directory \texttt{samples}),

%with 66 and 67 instances for the satisfiability and entailment problem respectively. These benchmarks are

classified into four suites, whose sizes are given in Table~\ref{tab-exp}, as follows:

%%MS: not clear what is the number here, leave it to the table.

%MEM-SAT (38), MEM-ENT (38), RANDOM-SAT (28), RANDOM-ENT (29), where SAT and ENT represent satisfiability and entailment respectively, moreover,

where if $t^\infty\equiv\infty$, then $\Pi'\equivx=x$, otherwise,

$\Pi' \equivx'-x\le t^\infty$,

where if $t^\infty\equiv\infty$, then $\Pi'\equiv\top$, otherwise,

$\Pi' \equivz-t_1\le t^\infty$,

\item

$s,h \models\Sigma_1\sepc\Sigma_2\mbox{ iff }

...

...

@@ -147,14 +149,14 @@ because we consider that the location $y$ is the first after the last location i

%

Intuitively, an atom $\hls{}(x,y;v)$ with $v$ a variable

defines a heap lists where all chunks have sizes between $2$ and the value of $v$.

Notice that if $v < 2$ then the atom $\hls{}(x,y;v)$ has no model and is unsatisfiable.

Notice that if $v < 2$ then the atom $\hls{}(x,y;v)$ has a model iff $x=y$.\mihaela{r2 CADE}

%

With this semantics, the $\blk$ and $\hls{}$ predicates are compositional predicates~\cite{EneaSW15} and therefore they satisfy the following composition lemmas:

With this semantics, the $\blk$ and $\hls{}$ predicates are compositional predicates~\cite{EneaSW15} and therefore they satisfy the following composition lemmas:\mihaela{r2 CADE}

@@ -52,7 +52,7 @@ that encodes its satisfiability:

\item At first, points-to atoms $t_1\pto t_2$ are transformed into $\blk(t_1, t_1+1)$.

\item Then, the block atoms $\blk(t_1, t_2)$ are encoded by the constraint $t_1 < t_2$.

\item Also, the predicate atoms $\hls{}(t_1, t_2; t_3)$ are encoded by a formula in {\EPbA}, $\abs^+(\hls{}(t_1, t_2; t_3))$.

\item Lastly, the separating conjunction is encoded by an {\EPbA} formula constraint the address terms of spatial atoms.

\item Lastly, the separating conjunction is encoded by an {\EPbA} formula constraining the address terms of spatial atoms.

\end{compactitem}

The Appendix~\ref{app:sat-hls} provides more details.

%

...

...

@@ -99,7 +99,11 @@ $\exists k.\ k \ge 1 \wedge 2 k \le t_2 - t_1 \le k t_3$ can actually be turned

\begin{lemma}[Summary of $\hls{}$ atoms]

Let $\hls{}(x, y; z)$ be an atom in \slah\

representing a non-empty heap, where $x, y, z$ are three distinct variables in $\cV$.

Then there is an {\EPbA} formula, denoted by $\abs^+(\hls{}(x,y; z))$, which summarizes $\hls{}(x, y; z)$, namely for every stack $s$, $s \models\abs^+(\hls{}(x,y; z))$ iff there exists a heap $h$ such that $s, h \models\hls{}(x, y, z)$.

%Then there is an {\EPbA} formula, denoted by $\abs^+(\hls{}(x,y; z))$,

We can construct in polynomial time an {\EPbA} formula $\abs^+(\hls{}(x,y; z))$

which summarizes $\hls{}(x, y; z)$, namely we have

for every stack $s$, $s \models\abs^+(\hls{}(x,y; z))$ iff

there exists a heap $h$ such that $s, h \models\hls{}(x, y, z)$.

%Similarly for $ \hls{}(x, y; \infty)$ and $ \hls{}(x, y; d)$ with $d \in \NN$.

\end{lemma}

...

...

@@ -152,8 +156,7 @@ To sum up, we obtain

\vspace{-2eX}\qed

\end{proof}

The formula $\abs(\varphi)$ is constructed in polynomial time from $\varphi$.

Moreover, it is essentially a quantifier-free \PbA\ formula containing modulo constraints $t_1\equiv r \bmod n$; the satisfiability of such formulas is still NP-complete.

The formula $\abs(\varphi)$ is essentially a quantifier-free \PbA\ formula containing modulo constraints $t_1\equiv r \bmod n$; the satisfiability of such formulas is still NP-complete.

%We are using $\abs^+(\hls{}(x, y; z))$ defined above

%to obtain in polynomial time an equi-satisfiable \EPbA\ abstraction for a symbolic heap $\varphi$, denoted by $\abs(\varphi)$.

Therefore, the satisfiability problem of \slah\ is in NP.