<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Satisfiability Modulo Theories, August</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>An SMT-LIB Theory of Heaps</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Zafer Esen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Philipp Rümmer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Regensburg</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Uppsala University</institution>
          ,
          <country country="SE">Sweden</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>1</volume>
      <fpage>1</fpage>
      <lpage>12</lpage>
      <abstract>
        <p>Constrained Horn Clauses (CHCs) are an intermediate program representation that can be generated by several verification tools, and that can be processed and solved by a number of Horn solvers. One of the main challenges when using CHCs in verification is the encoding of heap-allocated data-structures: such data-structures are today either represented explicitly using the theory of arrays, or transformed away with the help of invariants or refinement types, defeating the purpose of CHCs as a representation that is language-independent as well as agnostic of the algorithm implemented by the Horn solver. This paper presents an SMT-LIB theory of heaps tailored to CHCs, with the goal of enabling a standard interchange format for programs with heap data-structures. We introduce the syntax of the theory of heaps, define its semantics in terms of axioms and using a reduction to SMT-LIB arrays and data-types, provide an experimental evaluation and outline possible extensions and future work.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;SMT</kwd>
        <kwd>Constrained Horn Clauses</kwd>
        <kwd>Theory of Heaps</kwd>
        <kwd>SMT-LIB</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Constrained Horn Clauses (CHCs) are a convenient intermediate verification language that can
be generated by several verification tools in many settings, ranging from verification of smart
contracts [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to verification of computer programs in various languages [
        <xref ref-type="bibr" rid="ref2 ref3 ref4 ref5 ref6">2, 3, 4, 5, 6</xref>
        ]. The CHC
interchange language provides a separation of concerns, allowing the designers of verification
systems to focus on high-level aspects like the applied proof rules and verification methodology,
while giving CHC solver developers a clean framework that can be instantiated using various
model checking algorithms and specialised decision procedures. Solver performance is evaluated
in the annually held CHC-COMP [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        CHCs are usually expressed using the SMT-LIB standard, which itself is a common language
and interface for SMT solvers [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Abstractly, both SMT solvers and CHC solvers are tools that
determine if a first-order formula is satisfiable modulo background theories such as arithmetic,
bit-vectors, or arrays.
      </p>
      <p>
        One of the main challenges when using CHCs, and in verification in general, is the encoding
of programs with mutable, heap-allocated data-structures. Since there is no native theory of
heaps in SMT-LIB, one approach to represent such data-structures is using the theory of arrays
(e.g., [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ]). This is a natural encoding since a heap can be seen as an array of memory locations;
however, as the encoding is byte-precise, in the context of CHCs it tends to be low-level and
often yields clauses that are hard to solve.
      </p>
      <p>
        An alternative approach is to transform away such data-structures with the help of invariants
or refinement types (e.g., [
        <xref ref-type="bibr" rid="ref11 ref12 ref13 ref4">11, 12, 13, 4</xref>
        ]). In contrast to approaches that use the theory of arrays,
the resulting CHCs tend to be over-approximate (i.e., can lead to false positives), even with
smart refinement strategies that aim at increasing precision. This is because every operation
that reads, writes, or allocates a heap object is replaced with assertions and assumptions about
local object invariants, so that global program invariants might not be expressible. In cases
where local invariants are suficient, however, they can enable eficient and modular verification
even of challenging programs.
      </p>
      <p>Both approaches leave little design choice with respect to handling of heap to CHC solvers.
Dealing with heap at encoding level implies repeated efort when designing verifiers for diferent
programming languages, makes it hard to compare diferent approaches to encode heap, and is
time-consuming when a verifier wants to switch to another encoding. The benefits of CHCs are
partly negated, since the discussed separation of concerns does not carry over to heap.</p>
      <p>The vision of this paper is to extend CHCs to a standardised interchange format for programs
with heap data-structures. To this end, we present a high-level theory of heaps that does not
restrict the way in which CHC solvers approach heap, while covering the main functionality
of heap needed for program verification: (i) representation of the type system associated with
heap data; (ii) reading and updating of data on the heap; (iii) handling of object allocation.</p>
      <p>
        We use algebraic data-types (ADTs), as already standardised by SMT-LIB v2.6, as a flexible
way to handle (i). The theory ofers operations akin to the theory of arrays to handle (ii) and
(iii). The theory is deliberately kept simple, so that it is easy to add support to SMT and CHC
solvers: a solver can, for instance, internally encode heap using the existing theory of arrays
(we provide one such encoding in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]), or implement transformational approaches like [
        <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
        ].
Since we want to stay high-level, arithmetic operations on pointers are excluded in our theory,
as are low-level tricks like extracting individual bytes from bigger pieces of data through pointer
manipulation. Being language-agnostic, the theory of heaps allows for common encodings
across diferent applications, and is in the spirit of both CHCs and SMT-LIB.
      </p>
      <p>Contributions of the paper are (i) the definition of syntax and semantics of the theory of
heaps, (ii) a collection of an initial set of benchmarks, (iii) experimental results.</p>
      <p>
        Acknowledgements This is the first full paper introducing the theory of heaps (a detailed
account of an earlier version of the theory is available as a technical report [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]). Earlier versions
of the theory were presented at the HCVS Workshop 2020 [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] and the SMT Workshop 2020 [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ].
An invited paper at LOPSTR 2020 discusses preliminary work on decision and interpolation
procedures [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. We are grateful for the discussion and feedback provided by the diferent
communities. This work was supported by the Swedish Research Council (VR) under grant
2018-04727, by the Swedish Foundation for Strategic Research (SSF) under the project WebSec
(Ref. RIT17-0011), and by the Knut and Alice Wallenberg Foundation under the project UPDATE.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Motivating Example</title>
      <p>We start with a high-level explanation how heap is handled by our theory. Listing 1 shows
Listing 1</p>
      <p>The motivating example in Java
1 abstract c l a s s IntList {
2 p r o t e c t e d i n t _sz ;
3 abstract i n t hd ( ) ;
4 abstract v o i d setHd ( i n t hd ) ;
5 abstract IntList tl ( ) ;
6 i n t sz ( ) { r e t u r n _sz ; } }
7
8 c l a s s Nil extends IntList {
9 Nil ( ) { _sz = 0 ; }
10 i n t hd ( ) { err ( ) ; }
11 v o i d setHd ( i n t hd ) { err ( ) ; }
12 IntList tl ( ) { err ( ) ; } }
13
14 c l a s s Cons extends IntList {
15 i n t _hd ;
16 IntList _tl ;
17 i n t hd ( ) { r e t u r n _hd ; }
18 v o i d setHd ( i n t hd ) { _hd=hd ; }
19 IntList tl ( ) { r e t u r n _tl ; }
20 Cons ( i n t hd , IntList tl ) {
21 _hd = hd ;
22 _tl = tl ;
23 _sz = 1 + tl . sz ( ) ; } }
24 c l a s s Motivation {
25 v o i d main ( ) {
26 IntList l = new Cons ( 4 2 ,
27 new Nil ( ) ) ;
28 l . setHd ( l . hd ( ) + 1 ) ;
29 assert ( l . hd ( ) == 4 3 ) ;
30 }
31 }
a simple Java program that constructs a singly-linked list through heap operations such as
allocation on the heap (lines 26–27), reading (lines 28–29) and modifying (line 28) heap data.</p>
      <p>
        In order to encode this program we use constrained Horn clauses (CHCs). We refer to sources
such as [
        <xref ref-type="bibr" rid="ref18 ref2">18, 2</xref>
        ] for a comprehensive explanation of using CHCs in this context. Although the
theory of heaps is presented in the context of CHCs, there is nothing CHC-specific in the theory
itself; the theory can be supported by both SMT and CHC solvers since it is kept deliberately
high level and simple. The encoding is given in Listing 2 in SMT-LIB v2.6 format.
Heap declaration To encode this program using the theory of heaps, first a heap has to be
declared that covers the program types as shown at lines 1–12 of Listing 2. Each heap comes
with its own sorts for the heap itself and for heap locations (or addresses). Lines 2 and 3 are the
names of declared heap and address sorts. We next need to define which data can be placed on
the heap, which is done by choosing the sort of heap objects; this sort can be any of the sorts
declared prior to or together with the heap declaration, excluding the heap sort itself. Line 4
specifies the object sort to be the ADT Object, declared later.
      </p>
      <p>Line 5 defines the object assumed to be stored at unallocated heap locations. Since functions
in SMT-LIB are total, semantics has to be defined also for reads from such unallocated addresses.
The theory of heaps leaves the choice of object produced by such reads to the user; the term
specified at line 5 must have the object sort chosen at line 4. We call this the default object (or
defObj ), which in this case is created using the object constructor O_Empty. There are two
main reasons why the result of a read from an unallocated location is not left unspecified: 1. the
axioms become more complicated (for instance [row2] from Table 2 would require limiting 2
to allocated addresses); 2. deallocation semantics can be partly achieved (see Section 4).</p>
      <p>The rest of the heap declaration at lines 6–12 corresponds to an SMT-LIB data-type declaration.
In line 6, in addition to Object we declare data-types IntList, Cons, and Nil, encoding the
classes of the program. The constructors at lines 7–9 specify the fields of each class, and in
addition give Cons and Nil each a field containing the parent IntList object. In lines 10–12,
the constructors of the Object sort are declared, which correspond to the classes Cons and
Nil, as well as the default object O_Empty. The class IntList is abstract and does not occur
directly on the heap, so that no constructor for this type is provided.</p>
      <p>
        Since each heap theory has its own address sort, cases are immediately prevented in which
multiple heaps share the same address sort, or in which some other interpreted sort (say, Int)
is used to store addresses. This rules out accidental cases of pointer arithmetic, and leaves full
lfexibility to solvers on how to internally represent addresses (e.g., see [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]). This choice also
implies that ADT declarations for heap objects that refer to address sorts need to be part of
declare-heap.
      </p>
      <p>Within one heap, all pointers are represented using a single Addr sort. No distinction is made
between pointers to objects from diferent constructors. This is close in semantics to languages
like C, where casts between arbitrary pointer types are possible and it has to be verified for
each heap access that indeed an object of the right type is accessed. In languages like Java, the
Listing 2: SMT-LIB encoding of the motivating example from Listing 1. The symbols of some
sorts and operations of the theory are abbreviated and the list of quantified variables
is skipped in some cases for brevity.
stronger type system will provide information about the objects a variable can refer to, but
exceptions can be raised when performing casts. The theory of heaps is flexible enough to cover
those diferent settings.</p>
      <p>Apart from the sorts mentioned, the heap declaration implicitly declares (among others) an
ADT ARHeap (also called Heap later in the paper) that holds pairs ⟨Heap, Addr ⟩
returned as a result of allocations.</p>
      <p>Program encoding Predicates representing program states are declared at lines 14–17. The
ifrst set of arguments in the parentheses lists the sorts of the variables we want to keep track of
at that point. E.g., for line 17, we want to have a global view of the heap, as well as all variables
on the stack at that point. The only variable on the stack at this point is a temporary variable p
that corresponds to the newly allocated Nil object’s address (line 27 in Listing 1).</p>
      <p>Line 19 is the program entry point, where the heap is initially empty. The function emptyHeap
returns an empty heap (i.e., unallocated at all locations) of the declared Heap sort specified at
line 2. Lines 20–26 allocate, respectively, a Nil object and a Cons object on the heap. Allocation
is done using the alloc function of the theory, which takes as arguments the old heap and the
new object to be put on the heap, and returns an ARHeap pair with the new heap and the
allocated address. Constructor calls are inlined and slightly simplified in the encoding. For
example, line 25 shows the simplified encoding of the Java constructor for Cons at lines 20–23
of Listing 1. The update of the _sz field is simplified by directly assigning a value to it, which
would actually require another clause with a read due to the statement at line 23.</p>
      <p>Lines 27–33 illustrate the use of read and write functions. read reads from the provided heap
at the given location, and write writes the provided object to the heap at the specified location.
The assertion at lines 27–28 checks the validity of accesses in order to ensure memory safety.
The dynamic dispatch needed when calling hd is implemented through pattern matching using
the O_Cons and O_Nil constructors: in lines 29–31 the method call is successful, and the heap
object is subsequently updated, while the clause at lines 32–33 models the error when executing
Nil.hd. The same property can be expressed using the tester is-O_Cons in lines 37–38. Lastly,
lines 34–36 encode the assertion at line 29 from Listing 2.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Vocabulary and Syntax of the Theory of Heaps</title>
      <sec id="sec-3-1">
        <title>3.1. SMT-LIB-style Declaration of Heaps</title>
        <p>A theory of heaps is declared as follows:</p>
        <p>
          (declare-heap ℎ     (( 11) ... ( )) (1...))
where ℎ, ,  are symbols corresponding to the names of declared heap, declared address
and chosen object respectively.   is a term of the chosen object which is returned on invalid
accesses (i.e. the default object). The object sort can be chosen as any sort without ℎ in its
signature. The rest of the declaration resembles the declare-datatypes declaration from the
SMT-LIB standard v2.6 [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], with the exception that polymorphism is (currently) not supported
in constructor declarations (a discussion is provided in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]), and that there should be  (where
 ≥ 0) instead of  + 1 ADT sort declarations (i.e., the object sort can also be declared before the
heap declaration and specified using , if it does not use the address sort () in its declaration).
        </p>
        <p>The concrete syntax for the heap declaration is given below, which extends ⟨command ⟩ in
the concrete syntax of SMT-LIB v2.6.</p>
        <p>⟨command ⟩ ::= ...
⟨heap_datatype_dec⟩
|
::=
( declare-heap ⟨symbol ⟩ ⟨symbol ⟩ ⟨sort ⟩ ⟨term⟩
( ⟨sort _dec⟩ ) ( ⟨heap_datatype_dec⟩ ) )
⟨constructor _dec⟩+</p>
        <p>The first two symbols and the following sort in the declaration correspond respectively to ℎ,
 and  from the abstract syntax. ⟨term⟩ is the default object.
3.2. Sorts
Each heap declaration introduces several sorts: 1. a sort Heap of heaps, 2. a sort Addr of heap
addresses, 3. zero or more ADT sorts used to represent heap data, 4. an additional ADT sort
that holds the pair ⟨Heap, Addr ⟩ which is the result of calling alloc. In order to make this ADT
sort distinguishable, it is sufixed with its associated heap sort Heap (e.g. Heap).
The names of these sorts are defined by the variables in the declare-heap command, which
we assume in this paper to be Heap for ℎ and Addr for .</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.3. Operations and Semantics</title>
        <p>A list of operations of the theory of heaps is given in Table 1. Although not listed in the table,
we also assume access to all ADT operations for the ADTs declared by the theory of heaps.
Some operations contain the symbols Heap and Addr in their signatures. This is done with the
assumption that the declared heap and address sorts are named Heap and Addr respectively.
E.g., nullAddress would be nullA if the declared address sort was named , and it would
return a value of sort . Including the sort name in some function and sort names makes it
possible to determine their associated heap declarations without using the SMT-LIB command
“as”. This is not required in sorts and operations where the associated heap sort is clear, such as
in read (its first argument is of heap sort).</p>
        <p>
          A set of axioms formalising the semantics of the theory of heaps is given in Table 2. In
addition, a definition of the axioms in terms of the theory of arrays is provided in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. Below
we provide an informal description for each operation of the theory.
        </p>
        <p>Function alloc takes a Heap and an Object , and returns a data-type Heap
representing the pair ⟨Heap, Addr ⟩. The returned Heap at Addr contains the passed Object , with
all other locations unchanged. The pair ADT is required as the return sort since it is not possible
in SMT-LIB to return the two values separately. In Section 4 we discuss other alternatives such
as using multiple allocation functions.</p>
        <p>
          Functions read and write are similar to the array select and store operations [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]; however,
unlike an array, a heap also carries information about allocatedness. The predicate valid checks
if accesses to a given Heap at a given Addr are valid. We say that an access is valid if and only
if that location was allocated beforehand by using the function alloc, and invalid otherwise.
The function nullAddr returns the Addr that is always unallocated and emptyHeap returns the
Heap that is unallocated at all locations.
        </p>
        <p>The functions read and write behave as their array counterparts if the access is valid. Invalid
reads return a default Object to make the function total (as explained in Section 2). The
write function returns a new Heap if the access is valid, otherwise the original Heap is returned
without any changes. Validity of a write can be independently checked via memory-safety
assertions as shown in lines 27–28 of Listing 2.</p>
        <p>We propose a further short-hand notation nthAddr, which is useful when presenting
satisfying assignments. It is used to concisely represent Addr values which would be returned after 
alloc calls. This short-hand notation is only possible with the deterministic allocation axiom
[alloc2] given in Table 2.</p>
        <p>
          The properties of the theory of heaps are given in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. In particular, satisfiability of
quantifierfree heap formulas is NP-complete (provided that the theory chosen to represent heap objects
is by itself in NP). Like for arrays, NP-completeness can be observed already for conjunctions of
heap literals.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Alternative Definitions and Extensions</title>
      <p>This section explains the rationale behind some of the design choices in the theory of heaps, as
well as some natural extensions. It is intended as a starting point for further discussions and a
standardisation within SMT-LIB.
Heap Allocation on the heap needs to produce both a new heap and a fresh
address. In our theory, the pair of new heap and new address is handled using the ADT
Heap, which enables us to stick to just a single allocation function alloc.
Alternatively, alloc could be represented using a pair of functions, choosing for instance alloc(ℎ, ) =
⟨allocHeap(ℎ, ), allocAdress(ℎ, )⟩; this would be preferable from a solver implementation
point of view, but not necessarily for users. Altogether this point is more of aesthetic concern.
Deterministic allocation In its current semantics, object allocation in the theory of heaps
is deterministic: since alloc is a function, it will always produce the same fresh address when</p>
      <p>valid(ℎ, ) → read(write(ℎ, , ), ) = 
1 ̸= 2 → read(write(ℎ, 1, ), 2) = read(ℎ, 2)</p>
      <p>alloc(ℎ, ) =  → read(._1, ._2) = 
alloc(ℎ, ) =  ∧  ̸= ._2 → read(._1, ) = read(ℎ, )
alloc(ℎ, ) =  → ¬valid(ℎ, ._2) ∧ valid(._1, ._2) ∧
(∀ : Addr .(._2 ̸=  → (valid(ℎ, ) ↔ valid(._1, ))))
(∀ : Addr .(valid(ℎ1, ) ↔ valid(ℎ2, ))) →
alloc(ℎ1, 1)._2 = alloc(ℎ2, 2)._2
¬valid(ℎ, ) → write(ℎ, , ) = ℎ
¬valid(ℎ, ) → read(ℎ, ) = defObj
¬valid(emptyHeap, )</p>
      <p>¬valid(ℎ, nullAddr)
ℎ2 = write(ℎ1, 1, 1) → (valid(ℎ1, 2) ↔ valid(ℎ2, 2))
(∀ : Addr .(valid(ℎ1, ) ↔ valid(ℎ2, )) ∧</p>
      <p>read(ℎ1, ) = read(ℎ2, )) → ℎ1 = ℎ2
∃ : N → Heap,  : N → Addr . (0) = emptyHeap ∧</p>
      <p>
        (0) = nullAddr ∧
∀ : N. ⟨ ( + 1), ( + 1)⟩ = alloc( (), defObj ) ∧
∀ : Addr . ∃ : N. () = 
[row1]
[row2]
[roa1]
[roa2]
[alloc1]
[alloc2]
[ivwt]
[ivrd]
[vld1]
[vld2]
[vld3]
[ext]
[cons]
applied to the same arguments. Moreover, [alloc2] implies that the new address is determined
entirely by the set of already allocated addresses on the heap. Determinism simplifies the
presentation of models and counterexamples through the function nthAddr. Determinism also
simplifies the computation of program invariants, since it implies the existence of a linear order
of the heap addresses (as witnessed by the array semantics discussed in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]): an invariant
can distinguish fresh and used addresses using a simple inequality. Determinism will in many
practical cases not be observable in programs: the syntax of the theory of heaps prevents
arithmetic on addresses, and normal program semantics does not allow alloc to be called
repeatedly on the same heap in any case.
      </p>
      <p>In cases where it is needed, there is an elegant way to reintroduce non-determinism: the
alloc function can be given a third argument (nonce/entropy), as in alloc(ℎ, , ), and the axiom
[cons] be relativised to only hold for fixed values of . The axiom [alloc2] could be dropped.
The translation of programs to CHCs can then choose a non-deterministic value for  when
encoding an allocation operation like new. A side efect of this change would be that decision
procedures and correct encoding of heaps using arrays become more complex, and for instance
have to store the allocation status of each address using a bit-array.</p>
      <p>Deallocation A natural extension of the theory is the addition of a function for deallocating
objects, which would be helpful to capture languages without garbage collection like C/C++; for
such languages deallocation otherwise has to be encoded using an explicit flag added to objects.
The efect on the theory semantics would be similar as for non-deterministic allocation: decision
procedures would need to maintain a bit-array to remember the allocatedness of addresses.</p>
      <p>The theory of heaps already provides a way to obtain partial deallocation semantics without
the additional bit-array. If the default object sort is chosen to be one of the sorts not
corresponding to any program type, then the semantics of deallocation in most programming languages
can be achieved by writing back the default object to deallocated locations. Then valid
heap/address pairs that return the default object on a read imply that they were deallocated. Although
this covers most properties to be verified (i.e., detecting memory leaks and deallocation of
unallocated locations), this is partial semantics because those addresses can still not be returned
from an allocation.</p>
      <sec id="sec-4-1">
        <title>Sorts and operations ranging over sequences of addresses Program arrays can be</title>
        <p>modelled by introducing an additional AddrRange sort and related operations, such as those
shown in Table 3. batchAlloc would return an AddrRange containing  addresses, where 
is its last argument. batchWrite can be used to batch update an address range, nthInRange to
extract an address from an address range, contains to check if an address range contains an
address, and validRange to check whether all addresses in a range are allocated. In our tools
TriCera and Eldarica, we are already using this extended version of the theory of heaps.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Related Work</title>
      <p>
        Separation Logic extends the assertions of Hoare’s logic [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] to succinctly express properties
of heap and shared mutable data-structures [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Research has been done on specialised decision
procedures for separation logic in SMT [
        <xref ref-type="bibr" rid="ref22 ref23">22, 23</xref>
        ], and there is a proposal for encoding separation
logic in SMT-LIB 2.5 [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ].
      </p>
      <p>The theory of heaps and separation logic both provide mechanisms for reasoning about
the heap; however, their approaches are orthogonal. Separation logic extends the assertion
language with additional operators, while the theory of heaps provides an interchange format
for encoding programs with the goal of preserving as much information about the heap as
possible. Both could be used in a complementary way to encode program assertions and the
program itself.</p>
      <p>
        Linear Maps provide a similar proof strategy to that of separation logic, while staying within
the confines of classical logic [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ]. The authors describe a two-way erasure transformation,
transforming between imperative programs with a single unified heap and programs with
multiple disjoint linear maps. Since the transformation is completely in classical logic,
of-theshelf SMT solvers and theorem provers can be used without a special decision procedure by
making use of the existing theories such as the theory of arrays and the theory of sets.
      </p>
      <p>Unlike the transformational approach of linear maps, the theory of heaps aims to defer the
handling of heap to the solvers. In fact, the linear maps strategy could also make use of the
theory of heaps in order to have access to more specialised decision procedures, and not be
restricted to the theory of arrays.</p>
      <p>
        Other related work The authors of [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ] extend an SMT solver with a decision procedure to
decide unbounded heap reachability with support for Boolean and integer data fields. [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ] also
describes a decision procedure for verification of heap-manipulating programs. Both papers are
about verifying heap reachability, and both of them highlight the need for a standard theory
of heaps as that would have provided a framework for the research and ease the adoption of
proposed decision procedures by diferent solvers.
      </p>
    </sec>
    <sec id="sec-6">
      <title>6. Experiments</title>
      <p>
        In order to highlight the feasibility of using the theory in a more concrete setting, we have
collected C benchmarks from the ReachSafety and MemSafety categories of SV-COMP 2022 [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ].
TriCera1, a CHC-based model checker for C programs, was extended to produce CHCs in the
theory of heaps. To create a preliminary set of CHC benchmarks modulo heaps, we filtered out
programs that require heap, but none of the features not yet supported by TriCera (e.g., stack
pointers, floats etc.). We have also excluded benchmarks that any of the tested tools reported a
parsing error for, in the end, 361 benchmarks remained.
      </p>
      <p>
        In order to focus on the evaluation of the theory of heaps rather than that of bit-vectors
(which are already challenging for Horn solvers on their own [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ]), integer types in the CHCs
were encoded using mathematical integers. This meant some benchmarks did not return their
expected result, as some of them depend on the correct modelling of overflow; however, no
conflicting answers were observed in the results by Eldarica and Z3/Spacer.
      </p>
      <p>
        We then compared the performance of diferent solvers on those 361 benchmarks. As tools
providing (early) native support for the theory of heaps, the SMT solver Princess [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ] was
extended to support the theory using the reasoning and interpolation procedures from [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ],
and the CHC solver Eldarica [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ] was extended to make use of the newly added theory in
Princess. Other solvers can process CHCs output by TriCera after converting constraints
in the theory of heaps to array constraints; we used an extended2 version of the encoding
given in [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ] implemented in the tool heap2array3 for this conversion. Both Eldarica and
Z3/Spacer [
        <xref ref-type="bibr" rid="ref33">33</xref>
        ] were run on the array versions of the benchmarks. Lastly, we provide results
that CPAchecker [
        <xref ref-type="bibr" rid="ref34">34</xref>
        ] (version 2.1.1), one of the top C model checkers [
        <xref ref-type="bibr" rid="ref35">35</xref>
        ], produced on the
source SV-Comp benchmarks. We have made available all benchmarks used in our experiments
[
        <xref ref-type="bibr" rid="ref36">36</xref>
        ].
      </p>
      <p>The experiments were run on an AMD Opteron 2220 SE (2.8 GHZ with 4 CPUs) machine
running 64-bit Linux with 6 GB of RAM and a wall-clock timeout of 900 seconds.</p>
      <p>The results are shown in Table 4. In the first three rows, Eldarica with the array encoded
benchmarks performed best. One benchmark could only be solved by Eldarica (heap), 16
benchmarks only by Eldarica (array) and one benchmark only by Z3/Spacer. The best results
that can be obtained using a portfolio approach (i.e., running the solvers in parallel and taking
the first result) are shown in the Portfolio row. The last row shows CPAchecker’s performance
on the source C programs with the combined results of checking memory safety and reachability
properties. There were 27 benchmarks that could only be solved by CPAchecker.</p>
      <p>The comparison with CPAchecker shows that real-world C programs can indeed be encoded
and analysed using the proposed theory of heaps, resulting in a competitive verification tool.
Although our current decision procedure for the theory of heaps does not perform as well as its
array counterpart yet, the theory provides a uniform representation of programs that can easily
be mapped to diferent back-ends.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusions and Outlook</title>
      <p>We have proposed a theory of heaps, along with its syntax and semantics, and discussed possible
alternative definitions and extensions. The intention is that the ideas presented here will initiate
discussions, and eventually result in a common interchange language for programs with heap.
2encoding of sorts and operations ranging over sequences of addresses discussed in Section 4
3https://github.com/zafer-esen/heap2array
As a long-term goal, we would like to include a heap track also at the CHC-COMP competition;
a part of the benchmarks in the LIA-nonlin-Arrays-nonrecADT category of CHC-COMP 2022
already stems from heap theory benchmarks, using an encoding into the theory of arrays.</p>
      <p>
        The algorithms from [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] are direct and unrefined adaptions of procedures for the theory
of arrays, and more work is needed to obtain, e.g., practical interpolation methods. However,
now that the design choice is shifted to the solvers, alternative approaches can be employed to
improve the results without changing the CHC representation of programs. In this context, two
directions we are currently pursuing are improved decision and interpolation procedures for
the heap theory, and the adaptation of the invariant-based heap encoding used in JayHorn [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Kalra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Goel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dhawan</surname>
          </string-name>
          , S. Sharma,
          <article-title>ZEUS: analyzing safety of smart contracts, in: 25th Annual Network and Distributed System Security Symposium</article-title>
          ,
          <string-name>
            <surname>NDSS</surname>
          </string-name>
          <year>2018</year>
          , San Diego, California, USA, February
          <volume>18</volume>
          -
          <issue>21</issue>
          ,
          <year>2018</year>
          , The Internet Society,
          <year>2018</year>
          . URL: http://wp.internetsociety.org/ndss/wp-content/uploads/sites/25/2018/02/ndss2018_
          <fpage>09</fpage>
          -
          <lpage>1</lpage>
          _Kalra_paper.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Grebenshchikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. P.</given-names>
            <surname>Lopes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Popeea</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rybalchenko</surname>
          </string-name>
          ,
          <article-title>Synthesizing software verifiers from proof rules</article-title>
          , in: J.
          <string-name>
            <surname>Vitek</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Tip</surname>
          </string-name>
          (Eds.),
          <source>ACM SIGPLAN Conference on Programming Language Design and Implementation</source>
          , PLDI '
          <fpage>12</fpage>
          , Beijing, China - June 11 - 16,
          <year>2012</year>
          , ACM,
          <year>2012</year>
          , pp.
          <fpage>405</fpage>
          -
          <lpage>416</lpage>
          . URL: https://doi.org/10.1145/2254064.2254112. doi:
          <volume>10</volume>
          .1145/2254064.2254112.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Gurfinkel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Kahsai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Komuravelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Navas</surname>
          </string-name>
          ,
          <article-title>The SeaHorn verification framework</article-title>
          , in: D.
          <string-name>
            <surname>Kroening</surname>
          </string-name>
          , C. S. Pasareanu (Eds.),
          <source>Computer Aided Verification - 27th International Conference, CAV</source>
          <year>2015</year>
          , San Francisco, CA, USA, July
          <volume>18</volume>
          -
          <issue>24</issue>
          ,
          <year>2015</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>I</given-names>
          </string-name>
          , volume
          <volume>9206</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2015</year>
          , pp.
          <fpage>343</fpage>
          -
          <lpage>361</lpage>
          . URL: https: //doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -21690-4_
          <fpage>20</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -21690-4\_
          <fpage>20</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>T.</given-names>
            <surname>Kahsai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kersten</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Schäf</surname>
          </string-name>
          ,
          <article-title>Quantified heap invariants for object-oriented programs</article-title>
          , in: T.
          <string-name>
            <surname>Eiter</surname>
          </string-name>
          , D. Sands (Eds.), LPAR-
          <volume>21</volume>
          , 21st International Conference on Logic for Programming,
          <source>Artificial Intelligence and Reasoning</source>
          , Maun, Botswana, May 7-
          <issue>12</issue>
          ,
          <year>2017</year>
          , volume
          <volume>46</volume>
          of EPiC Series in Computing, EasyChair,
          <year>2017</year>
          , pp.
          <fpage>368</fpage>
          -
          <lpage>384</lpage>
          . URL: https://easychair. org/publications/paper/Pmh.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Matsushita</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Tsukada</surname>
          </string-name>
          , N. Kobayashi,
          <article-title>RustHorn: CHC-based verification for Rust programs</article-title>
          , in: P. Müller (Ed.),
          <source>Programming Languages and Systems - 29th European Symposium on Programming, ESOP</source>
          <year>2020</year>
          ,
          <article-title>Held as Part of the European Joint Conferences on Theory and Practice of Software</article-title>
          ,
          <source>ETAPS</source>
          <year>2020</year>
          , Dublin, Ireland,
          <source>April 25-30</source>
          ,
          <year>2020</year>
          , Proceedings, volume
          <volume>12075</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2020</year>
          , pp.
          <fpage>484</fpage>
          -
          <lpage>514</lpage>
          . URL: https: //doi.org/10.1007/978-3-
          <fpage>030</fpage>
          -44914-8_
          <fpage>18</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -44914-8\_
          <fpage>18</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>Sato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Iwayama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Kobayashi</surname>
          </string-name>
          ,
          <article-title>Combining higher-order model checking with reifnement type inference</article-title>
          , in: M. V.
          <string-name>
            <surname>Hermenegildo</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . Igarashi (Eds.),
          <source>Proceedings of the 2019 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation</source>
          ,
          <source>PEPM@POPL</source>
          <year>2019</year>
          , Cascais, Portugal, January
          <volume>14</volume>
          -
          <issue>15</issue>
          ,
          <year>2019</year>
          , ACM,
          <year>2019</year>
          , pp.
          <fpage>47</fpage>
          -
          <lpage>53</lpage>
          . URL: https://doi.org/10.1145/3294032.3294081. doi:
          <volume>10</volume>
          .1145/3294032.3294081.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <source>Competition report: CHC-COMP-20</source>
          , in: L.
          <string-name>
            <surname>Fribourg</surname>
          </string-name>
          , M. Heizmann (Eds.),
          <source>Proceedings 8th International Workshop on Verification and Program Transformation and 7th Workshop on Horn Clauses for Verification and Synthesis</source>
          , VPT/HCVS@ETAPS
          <year>2020</year>
          2020,
          <article-title>and</article-title>
          7th Workshop on Horn Clauses for Verification and SynthesisDublin, Ireland,
          <fpage>25</fpage>
          -26th
          <source>April</source>
          <year>2020</year>
          , volume
          <volume>320</volume>
          <source>of EPTCS</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>197</fpage>
          -
          <lpage>219</lpage>
          . URL: https://doi.org/10.4204/ EPTCS.320.15. doi:
          <volume>10</volume>
          .4204/EPTCS.320.15.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>C.</given-names>
            <surname>Barrett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fontaine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Tinelli</surname>
          </string-name>
          ,
          <source>The SMT-LIB Standard: Version 2</source>
          .6,
          <string-name>
            <surname>Technical</surname>
            <given-names>Report</given-names>
          </string-name>
          , Department of Computer Science, The University of Iowa,
          <year>2017</year>
          . Available at www.
          <source>SMT-LIB.org.</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Komuravelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Bjørner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gurfinkel</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. L. McMillan</surname>
          </string-name>
          ,
          <article-title>Compositional verification of procedural programs using Horn clauses over integers and arrays</article-title>
          , in: R. Kaivola, T. Wahl (Eds.), Formal Methods in Computer-Aided Design,
          <string-name>
            <surname>FMCAD</surname>
          </string-name>
          <year>2015</year>
          , Austin, Texas, USA, September
          <volume>27</volume>
          -
          <issue>30</issue>
          ,
          <year>2015</year>
          , IEEE,
          <year>2015</year>
          , pp.
          <fpage>89</fpage>
          -
          <lpage>96</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>E. De Angelis</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Fioravanti</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Pettorossi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Proietti</surname>
          </string-name>
          ,
          <article-title>Program verification using constraint handling rules and array constraint generalizations</article-title>
          ,
          <source>Fundam. Inform</source>
          .
          <volume>150</volume>
          (
          <year>2017</year>
          )
          <fpage>73</fpage>
          -
          <lpage>117</lpage>
          . URL: https://doi.org/10.3233/FI-2017-1461. doi:
          <volume>10</volume>
          .3233/FI-2017-1461.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>P. M. Rondon</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Kawaguchi</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Jhala</surname>
          </string-name>
          ,
          <article-title>Liquid types</article-title>
          , in: R.
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>S. P.</given-names>
          </string-name>
          Amarasinghe (Eds.),
          <source>Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation</source>
          , Tucson,
          <string-name>
            <surname>AZ</surname>
          </string-name>
          , USA, June 7-13,
          <year>2008</year>
          , ACM,
          <year>2008</year>
          , pp.
          <fpage>159</fpage>
          -
          <lpage>169</lpage>
          . URL: https://doi.org/10.1145/1375581.1375602. doi:
          <volume>10</volume>
          .1145/1375581.1375602.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>N.</given-names>
            <surname>Bjørner</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. L. McMillan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Rybalchenko</surname>
          </string-name>
          ,
          <article-title>On solving universally quantified Horn clauses</article-title>
          , in: F. Logozzo, M. Fähndrich (Eds.),
          <source>Static Analysis - 20th International Symposium, SAS</source>
          <year>2013</year>
          , Seattle, WA, USA, June 20-22,
          <year>2013</year>
          . Proceedings, volume
          <volume>7935</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2013</year>
          , pp.
          <fpage>105</fpage>
          -
          <lpage>125</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -38856-
          <issue>9</issue>
          _ 8. doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -38856-9\_8.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>D.</given-names>
            <surname>Monniaux</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Gonnord</surname>
          </string-name>
          ,
          <article-title>Cell morphing: From array programs to array-free Horn clauses</article-title>
          , in: X.
          <string-name>
            <surname>Rival</surname>
          </string-name>
          (Ed.),
          <source>Static Analysis - 23rd International Symposium, SAS</source>
          <year>2016</year>
          ,
          <article-title>Edinburgh</article-title>
          , UK, September 8-
          <issue>10</issue>
          ,
          <year>2016</year>
          , Proceedings, volume
          <volume>9837</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2016</year>
          , pp.
          <fpage>361</fpage>
          -
          <lpage>382</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>662</fpage>
          -53413-7_
          <fpage>18</fpage>
          . doi:
          <volume>10</volume>
          . 1007/978-3-
          <fpage>662</fpage>
          -53413-7\_
          <fpage>18</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Esen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <article-title>A theory of heap for constrained Horn clauses</article-title>
          (extended
          <source>technical report)</source>
          ,
          <source>CoRR abs/2104</source>
          .04224 (
          <year>2021</year>
          ). URL: https://arxiv.org/abs/2104.04224. arXiv:
          <volume>2104</volume>
          .
          <fpage>04224</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Esen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <article-title>Towards an SMT-LIB theory of heap (extended abstract)</article-title>
          , in: L.
          <string-name>
            <surname>Fribourg</surname>
          </string-name>
          , M. Heizmann (Eds.),
          <source>8th International Workshop on Verification and Program Transformation and 7th Workshop on Horn Clauses for Verification and Synthesis</source>
          , VPT/HCVS@ETAPS
          <year>2020</year>
          2020,
          <article-title>and</article-title>
          7th Workshop on Horn Clauses for Verification and SynthesisDublin, Ireland,
          <fpage>25</fpage>
          -26th
          <source>April</source>
          <year>2020</year>
          , volume
          <volume>320</volume>
          <source>of EPTCS</source>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Esen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <article-title>Abstract: Towards an SMT-LIB theory of heap</article-title>
          , in: F. Bobot, T. Weber (Eds.),
          <source>Proceedings of the 18th International Workshop on Satisfiability Modulo Theories colocated with the 10th International Joint Conference on Automated Reasoning (IJCAR</source>
          <year>2020</year>
          ),
          <article-title>Online (initially</article-title>
          located in Paris, France),
          <source>July 5-6</source>
          ,
          <year>2020</year>
          , volume
          <volume>2854</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2020</year>
          , p.
          <fpage>60</fpage>
          . URL: http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2854</volume>
          /abstract4.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Esen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <article-title>Reasoning in the theory of heap: Satisfiability and interpolation</article-title>
          , in: M.
          <string-name>
            <surname>Fernández</surname>
          </string-name>
          (Ed.),
          <source>Logic-Based Program Synthesis and Transformation</source>
          , LNCS, Springer, Cham,
          <year>2021</year>
          , pp.
          <fpage>173</fpage>
          -
          <lpage>191</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>N.</given-names>
            <surname>Bjørner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gurfinkel</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. L. McMillan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Rybalchenko</surname>
          </string-name>
          ,
          <article-title>Horn clause solvers for program verification</article-title>
          , in: L.
          <string-name>
            <surname>D. Beklemishev</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Blass</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Dershowitz</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Finkbeiner</surname>
          </string-name>
          , W. Schulte (Eds.),
          <article-title>Fields of Logic and Computation II - Essays Dedicated to Yuri Gurevich on the Occasion of His 75th Birthday</article-title>
          , volume
          <volume>9300</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2015</year>
          , pp.
          <fpage>24</fpage>
          -
          <lpage>51</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -23534-
          <issue>9</issue>
          _2. doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -23534-9\_2.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <surname>J. McCarthy</surname>
          </string-name>
          ,
          <article-title>Towards a mathematical science of computation</article-title>
          ,
          <source>in: Information Processing, Proceedings of the 2nd IFIP Congress</source>
          <year>1962</year>
          , Munich, Germany,
          <source>August 27 - September 1</source>
          ,
          <year>1962</year>
          , North-Holland,
          <year>1962</year>
          , pp.
          <fpage>21</fpage>
          -
          <lpage>28</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>C. A. R.</given-names>
            <surname>Hoare</surname>
          </string-name>
          ,
          <article-title>An axiomatic basis for computer programming</article-title>
          ,
          <source>Commun. ACM</source>
          <volume>12</volume>
          (
          <year>1969</year>
          )
          <fpage>576</fpage>
          -
          <lpage>580</lpage>
          . URL: https://doi.org/10.1145/363235.363259. doi:
          <volume>10</volume>
          .1145/363235.363259.
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Reynolds</surname>
          </string-name>
          ,
          <article-title>Separation logic: A logic for shared mutable data structures</article-title>
          ,
          <source>in: 17th IEEE Symposium on Logic in Computer Science (LICS</source>
          <year>2002</year>
          ),
          <fpage>22</fpage>
          -
          <issue>25</issue>
          <year>July 2002</year>
          , Copenhagen, Denmark, Proceedings, IEEE Computer Society,
          <year>2002</year>
          , pp.
          <fpage>55</fpage>
          -
          <lpage>74</lpage>
          . URL: https://doi.org/10. 1109/LICS.
          <year>2002</year>
          .
          <volume>1029817</volume>
          . doi:
          <volume>10</volume>
          .1109/LICS.
          <year>2002</year>
          .
          <volume>1029817</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>A.</given-names>
            <surname>Reynolds</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Iosif</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Serban</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>King</surname>
          </string-name>
          ,
          <article-title>A decision procedure for separation logic in SMT</article-title>
          , in: C.
          <string-name>
            <surname>Artho</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Legay</surname>
          </string-name>
          , D. Peled (Eds.),
          <source>Automated Technology for Verification and Analysis - 14th International Symposium, ATVA</source>
          <year>2016</year>
          , Chiba, Japan,
          <source>October 17-20</source>
          ,
          <year>2016</year>
          , Proceedings, volume
          <volume>9938</volume>
          of Lecture Notes in Computer Science,
          <year>2016</year>
          , pp.
          <fpage>244</fpage>
          -
          <lpage>261</lpage>
          . URL: https://doi.org/ 10.1007/978-3-
          <fpage>319</fpage>
          -46520-3_
          <fpage>16</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -46520-3\_
          <fpage>16</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>J. A. N.</given-names>
            <surname>Pérez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rybalchenko</surname>
          </string-name>
          ,
          <article-title>Separation logic modulo theories</article-title>
          , in: C.
          <string-name>
            <surname>Shan</surname>
          </string-name>
          (Ed.),
          <source>Programming Languages and Systems - 11th Asian Symposium, APLAS</source>
          <year>2013</year>
          ,
          <article-title>Melbourne</article-title>
          ,
          <string-name>
            <surname>VIC</surname>
          </string-name>
          , Australia, December 9-
          <issue>11</issue>
          ,
          <year>2013</year>
          . Proceedings, volume
          <volume>8301</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2013</year>
          , pp.
          <fpage>90</fpage>
          -
          <lpage>106</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -03542-
          <issue>0</issue>
          _7. doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -03542-0\_7.
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>R.</given-names>
            <surname>Iosif</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Serban</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Reynolds</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Sighireanu</surname>
          </string-name>
          , Encoding separation logic in
          <source>smt-lib v2.5</source>
          ,
          <year>2018</year>
          . URL: https://sl-comp.github.io/docs/smtlib-sl.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>S. K.</given-names>
            <surname>Lahiri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Qadeer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Walker</surname>
          </string-name>
          ,
          <article-title>Linear maps</article-title>
          , in: R.
          <string-name>
            <surname>Jhala</surname>
          </string-name>
          , W. Swierstra (Eds.),
          <source>Proceedings of the 5th ACM Workshop Programming Languages meets Program Verification</source>
          ,
          <string-name>
            <surname>PLPV</surname>
          </string-name>
          <year>2011</year>
          , Austin, TX, USA, January
          <volume>29</volume>
          ,
          <year>2011</year>
          , ACM,
          <year>2011</year>
          , pp.
          <fpage>3</fpage>
          -
          <lpage>14</lpage>
          . URL: https://doi.org/10. 1145/1929529.1929531. doi:
          <volume>10</volume>
          .1145/1929529.1929531.
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Rakamaric</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bruttomesso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. J.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Cimatti</surname>
          </string-name>
          ,
          <article-title>Verifying heap-manipulating programs in an SMT framework</article-title>
          , in: K. S. Namjoshi,
          <string-name>
            <given-names>T.</given-names>
            <surname>Yoneda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Higashino</surname>
          </string-name>
          , Y. Okamura (Eds.),
          <source>Automated Technology for Verification and Analysis, 5th International Symposium, ATVA</source>
          <year>2007</year>
          , Tokyo, Japan,
          <source>October 22-25</source>
          ,
          <year>2007</year>
          , Proceedings, volume
          <volume>4762</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2007</year>
          , pp.
          <fpage>237</fpage>
          -
          <lpage>252</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>540</fpage>
          -75596-8_
          <fpage>18</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>540</fpage>
          -75596-8\_
          <fpage>18</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>S.</given-names>
            <surname>Lahiri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Qadeer</surname>
          </string-name>
          ,
          <article-title>A decision procedure for well-founded reachability</article-title>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>D.</given-names>
            <surname>Beyer</surname>
          </string-name>
          , SV-Benchmarks:
          <article-title>Benchmark Set for Software Verification and Testing (SVCOMP 2022 and Test</article-title>
          - Comp
          <year>2022</year>
          ),
          <year>2022</year>
          . URL: https://doi.org/10.5281/zenodo.5831003. doi:
          <volume>10</volume>
          .5281/zenodo.5831003.
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>P.</given-names>
            <surname>Backeman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zeljic</surname>
          </string-name>
          ,
          <article-title>Bit-vector interpolation and quantifier elimination by lazy reduction</article-title>
          , in: N.
          <string-name>
            <given-names>S.</given-names>
            <surname>Bjørner</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Gurfinkel (Eds.), 2018 Formal Methods in Computer Aided Design,
          <string-name>
            <surname>FMCAD</surname>
          </string-name>
          <year>2018</year>
          , Austin, TX, USA,
          <source>October 30 - November 2</source>
          ,
          <year>2018</year>
          , IEEE,
          <year>2018</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          . URL: https://doi.org/10.23919/FMCAD.
          <year>2018</year>
          .
          <volume>8603023</volume>
          . doi:
          <volume>10</volume>
          .23919/FMCAD.
          <year>2018</year>
          .
          <volume>8603023</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <article-title>A constraint sequent calculus for first-order logic with linear integer arithmetic</article-title>
          ,
          <source>in: Proceedings, 15th International Conference on Logic for Programming</source>
          ,
          <source>Artificial Intelligence and Reasoning</source>
          , volume
          <volume>5330</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2008</year>
          , pp.
          <fpage>274</fpage>
          -
          <lpage>289</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <given-names>H.</given-names>
            <surname>Hojjat</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <article-title>The ELDARICA horn solver</article-title>
          , in: N.
          <string-name>
            <surname>Bjørner</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . Gurfinkel (Eds.), 2018 Formal Methods in Computer Aided Design,
          <string-name>
            <surname>FMCAD</surname>
          </string-name>
          <year>2018</year>
          , Austin, TX, USA,
          <source>October 30 - November 2</source>
          ,
          <year>2018</year>
          , IEEE,
          <year>2018</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>7</lpage>
          . URL: https://doi.org/10.23919/FMCAD.
          <year>2018</year>
          .
          <volume>8603013</volume>
          . doi:
          <volume>10</volume>
          .23919/FMCAD.
          <year>2018</year>
          .
          <volume>8603013</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Esen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rümmer</surname>
          </string-name>
          ,
          <article-title>A theory of heap for constrained Horn clauses</article-title>
          (extended
          <source>technical report)</source>
          ,
          <source>CoRR abs/2104</source>
          .04224 (
          <year>2021</year>
          ). URL: https://arxiv.org/abs/2104.04224. arXiv:
          <volume>2104</volume>
          .
          <fpage>04224</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [33]
          <string-name>
            <given-names>A.</given-names>
            <surname>Komuravelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gurfinkel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. M.</given-names>
            <surname>Clarke</surname>
          </string-name>
          ,
          <article-title>Automatic abstraction in SMTbased unbounded software model checking</article-title>
          , in: N.
          <string-name>
            <surname>Sharygina</surname>
          </string-name>
          , H. Veith (Eds.),
          <source>Computer Aided Verification - 25th International Conference, CAV</source>
          <year>2013</year>
          ,
          <string-name>
            <given-names>Saint</given-names>
            <surname>Petersburg</surname>
          </string-name>
          , Russia,
          <source>July 13-19</source>
          ,
          <year>2013</year>
          . Proceedings, volume
          <volume>8044</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2013</year>
          , pp.
          <fpage>846</fpage>
          -
          <lpage>862</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -39799-8_
          <fpage>59</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -39799-8\_
          <fpage>59</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          [34]
          <string-name>
            <given-names>D.</given-names>
            <surname>Beyer</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. E. Keremoglu,</surname>
          </string-name>
          <article-title>CPAchecker: A tool for configurable software verification</article-title>
          , in: G. Gopalakrishnan, S. Qadeer (Eds.),
          <source>Computer Aided Verification - 23rd International Conference, CAV</source>
          <year>2011</year>
          ,
          <article-title>Snowbird</article-title>
          ,
          <string-name>
            <surname>UT</surname>
          </string-name>
          , USA, July
          <volume>14</volume>
          -
          <issue>20</issue>
          ,
          <year>2011</year>
          . Proceedings, volume
          <volume>6806</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2011</year>
          , pp.
          <fpage>184</fpage>
          -
          <lpage>190</lpage>
          . URL: https://doi.org/10. 1007/978-3-
          <fpage>642</fpage>
          -22110-1_
          <fpage>16</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -22110-1\_
          <fpage>16</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          [35]
          <string-name>
            <given-names>D.</given-names>
            <surname>Beyer</surname>
          </string-name>
          ,
          <source>Progress on software verification: SV-COMP</source>
          <year>2022</year>
          , in: D.
          <string-name>
            <surname>Fisman</surname>
          </string-name>
          , G. Rosu (Eds.),
          <article-title>Tools and Algorithms for the Construction and Analysis of Systems -</article-title>
          28th International Conference, TACAS 2022,
          <article-title>Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022</article-title>
          , Munich, Germany, April 2-
          <issue>7</issue>
          ,
          <year>2022</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , volume
          <volume>13244</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2022</year>
          , pp.
          <fpage>375</fpage>
          -
          <lpage>402</lpage>
          . URL: https: //doi.org/10.1007/978-3-
          <fpage>030</fpage>
          -99527-0_
          <fpage>20</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -99527-0\_
          <fpage>20</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          [36]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Esen</surname>
          </string-name>
          , P. Rümmer, TriCera Benchmarks:
          <article-title>SMT-LIB Encodings of SV-COMP 2022 Benchmarks by TriCera</article-title>
          ,
          <year>2022</year>
          . URL: https://doi.org/10.5281/zenodo.6950363. doi:
          <volume>10</volume>
          .5281/ zenodo.6950363.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>