<!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 />
    <article-meta>
      <title-group>
        <article-title>clingo goes Linear Constraints over Reals and Integers</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>T. Janhunen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>R. Kaminski</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>M. Ostrowski</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>T. Schaub</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>S. Schellhorn</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>P. Wanko</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Aalto University</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Potsdam</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>The recent series 5 of the ASP system clingo provides generic means to enhance basic Answer Set Programming (ASP) with theory reasoning capabilities. We instantiate this framework with di erent forms of linear constraints and elaborate upon its formal properties. Given this, we discuss the respective implementations, and present techniques for using these constraints in a reactive context. More precisely, we introduce extensions to clingo with di erence and linear constraints over integers and reals, respectively, and realize them in complementary ways. Finally, we empirically evaluate the resulting clingo derivatives clingo[dl] and clingo[lp] on common language fragments and contrast them to related ASP systems.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Answer Set Programming (ASP; [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]) has become an established paradigm for knowledge
representation and reasoning, in particular, when it comes to solving knowledge-intense
combinatorial (optimization) problems. Despite its versatility, however, ASP falls short
in handling non-Boolean constraints, such as linear constraints over reals or unlimited
integers. This shortcoming was broadly addressed in the recent clingo 5 series [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] by
providing generic means for incorporating theory reasoning. They span from theory
grammars for seamlessly extending clingo’s input language with theory expressions to a
simple interface for integrating theory propagators into clingo’s solver component.
      </p>
      <p>
        We instantiate this framework with di erent forms of linear constraints and elaborate
upon its formal properties. Given this, we discuss the respective implementations, and
present techniques for using these constraints in a reactive context. In more detail, we
introduce extensions to clingo with di erence and linear constraints over integers and
reals, respectively, and realize them in complementary ways. For handling di erence
constraints, we provide customized implementations of well-established algorithms in
Python and C++, while we use clingo’s Python API to connect to o -the-shelf linear
programming solvers, viz. cplex and lpsolve, to deal with linear constraints. In both
settings, we support integer as well as real valued variables. For a complement, we
also consider clingcon, a derivative of clingo, integrating constraint propagators for
handling linear constraints over integers at a low-level. While this fine integration must
be done at compile-time, the aforementioned Python extensions are added at run-time.
Our empirical analysis complements the study in [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] with experimental results on our
new systems clingo[dl] and clingo[lp]. Finally, we provide a comparison of di erent
semantic options for integrating theories into ASP and a systematic overview of the
various features of state-of-the-art ASP systems handling linear constraints.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Answer Set Programming with Linear Constraints</title>
      <p>Our paper centers upon the theory reasoning capabilities of clingo that allow us to
extend ASP with linear constraints, also referred to as ASP[lc]. We focus below on the
corresponding syntactic and semantic features, and refer the reader to the literature for
an introduction to the basics of ASP.</p>
      <p>We consider (disjunctive) logic programs with linear constraints, for short1
lcprograms, over sets A and L of ground regular and linear constraint atoms, respectively.
An expression is said to be ground, if it contains no ASP variables. Accordingly, such
programs consist of rules of the form</p>
      <p>a1 ;...; am :- am+1 ,... , an ,not an+1 ,... , not ao
where each ai is either a regular atom in A of form p(t1,...,tk ) such that all ti are
ground terms or an lc-atom in L of form2 ‘&amp;sum{a1*x1;: : :;al *xl }&lt;=k’ that stands
for the linear constraint a1 x1 + + al xl k. All ai and k are finite sequences of
digits with at most one dot3 and represent real-valued coe cients ai and k. Similarly
all xi stand for the real (or integer) valued variables xi . As usual, not denotes (default)
negation. A rule is called a fact if m; o = 1, normal if m = 1, and an integrity constraint
if m = 0. A linear constraint of form x1 x2 k is called a di erence constraint,
and represented as ‘&amp;sum{x1; -1*x2}&lt;=k’ (or ‘&amp;diff{x1-x2}&lt;=k’ in pure di erence
logic settings).</p>
      <p>To ease the use of ASP in practice, several extensions have been developed. First of
all, rules with ASP variables are viewed as shorthands for the set of their ground instances.
Further language constructs include conditional literals and cardinality constraints [21].
The former are of the form a:b1,...,bm , the latter can be written as s{d1;...;dn }t,
where a and bi are possibly default-negated (regular) literals and each dj is a conditional
literal; s and t provide optional lower and upper bounds on the number of satisfied literals
in the cardinality constraint. We refer to b1,...,bm as a condition, and call it static if it
is evaluated during grounding, otherwise it is called dynamic. The practical value of such
constructs becomes apparent when used with ASP variables. For instance, a conditional
literal like a(X):b(X) in a rule’s antecedent expands to the conjunction of all instances
of a(X) for which the corresponding instance of b(X) holds. Similarly, 2{a(X):b(X)}4
is true whenever at least two and at most four instances of a(X) (subject to b(X)) are
true.</p>
      <p>Likewise, clingo’s syntax of linear constraints o ers several convenience features. As
above, elements in linear constraint atoms can be conditioned (and use ASP variables),
viz. ‘&amp;sum{a1*x1:c1;...;al *xl :cn }&lt;=k’ where each ci is a condition. As above, the
usage of ASP variables allows for forming arbitrarily long expressions (cf. Listing 1.2).
That is, by using static or dynamic conditions, we may formulate linear constraints that
are determined relative to a problem instance during grounding and even dynamically
during solving, respectively. Also, linear constraints can be formed with further relations,
viz. &gt;=, &lt;, &gt;, =, and !=. Moreover, the theory language for linear constraints o ers a
domain declaration for real variables, ‘&amp;dom{lb..ub}=x’ expressing that all values of
1 We keep using the prefix ‘lc-’ throughout as a shorthand for concepts related to linear constraints.
2 In clingo, theory atoms are preceded by ‘&amp;’.
3 In the input language of clingo, sequences containing dots must be quoted to avoid clashes.
x must lie between lb and ub, inclusive. And finally the maximization (or minimization)
of an objective function can be expressed with &amp;maximize{a1*x1:c1;...;al *xl :cn }
(or by minimize). The full theory grammar for linear constraints over reals is available
at https://potassco.org/clingo/examples.</p>
      <p>
        Semantically, a logic program induces a set of stable models, being distinguished
models of the program determined by the stable models semantics [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. To extend
this concept to logic programs with linear constraints, we follow the approach of lazy
theory solving [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. We abstract from the specific semantics of a theory by
considering the lc-atoms representing the underlying linear constraints. The idea is that a
regular stable model X of a program over A [ L is only valid wrt the theory, if
the constraints induced by the truth assignment to the lc-atoms in L are satisfiable
in the theory. In our setting, this amounts to finding an assignment of reals (or
integers) to all numeric variables that satisfies a set of linear constraints induced by
X \ L. Although this can be done in several ways, as detailed below, let us
illustrate this by a simple example. The (non-ground) logic program containing the fact
‘a("1.5").’ along with the rule ‘&amp;sum{R*x}&lt;=7 :- a(R).’ has the regular
stable model fa("1.5"); &amp;sum{"1.5"*x}&lt;=7g. Here, we easily find an assignment, e.g.
f x 7! 4:2g, that satisfies the only associated linear constraint ‘1:5 x 7’.
      </p>
      <p>
        In what follows, we make this precise by instantiating the general framework of logic
programs with theories in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] to the case of linear constraints over reals and integers
(and so di erence constraints). Also, we focus on one theory at a time. Thereby, our
emphasis lies on the elaboration of alternative semantic options for stable models with
linear constraints, which pave the way for di erent implementation techniques discussed
in Section 4.
      </p>
      <p>We use the following notation. Given a rule r as above, we call fa1; : : : ; am g its head
and denote it by H (r ). Furthermore, we define H (P) = Sr 2P H (r ).</p>
      <p>First of all, we may distinguish whether linear constraints are only determined
outside or additionally inside a program. Accordingly, we partition L into defined and
external lc-atoms, namely L \ H (P) and L n H (P), respectively.4 Thus, while external
lc-atoms must only be satisfied by the respective theory, defined ones must additionally
be derivable through rules in the program. The second distinction is about the logical
correspondence between theory atoms and theory constraints. To this end, we partition
L into strict and non-strict lc-atoms, denoted by L$ and L!. The strict correspondence
requires a linear constraint to be satisfied i the associated lc-atom in L$ is true. A
weaker condition is imposed in the non-strict case. Here, a linear constraint must hold
only if the associated lc-atom in L! is true. Thus, only lc-atoms in L! assigned true
impose requirements, while constraints associated with falsified lc-atoms in L! are free
to hold or not. However, by contraposition, a violated constraint leads to a false lc-atom.</p>
      <p>
        Di erent combinations of such correspondences are possible, and we may even treat
some constraints di erently than others. In view of this, we next provide an extended
definition of stable models that accommodates all above correspondences. Following [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ],
we accomplish this by mapping the semantics of lc-programs back to regular stable
models. To this end, we abstract from the actual constraints and identify a solution with a
4 This distinction is analogous to that between head and input atoms, defined via rules or
#external directives [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], respectively.
set of linear constraint atoms. More precisely, we call S L a linear constraint solution,
if there is an assignment of reals (or integers) to all real (integer) valued variables
represented in L that
(i) satisfies all linear constraints associated with strict and non-strict lc-atoms in S and
(ii) falsifies all linear constraints associated with strict lc-atoms in L$ n S.
      </p>
      <p>Then, we define a set X A [ L as an lc-stable model of an lc-program P, if there
is some lc-solution S L such that X is a (regular) stable model of the logic program
P [ fa. j a 2 (L$ n H (P)) \ Sg [ f:- not a. j a 2 (L$ \ H (P)) \ Sg
[ f{a}. j a 2 (L! n H (P)) \ Sg [ f:- a. j a 2 (L \ H (P)) n Sg.
(1)
(2)
The rules added to P express conditions aligning the lc-atoms in X \ L with a
corresponding lc-solution S. To begin with, the set of facts on the left in (1) makes sure
that all lc-atoms in S that are external and strict also belong to X . Unlike this, the
corresponding set of choice rules in (2) merely says that non-strict external lc-atoms
from S may be included in X or not. The integrity constraints in (1) and (2) take care of
defined lc-atoms, viz. the ones in H (P). The respective set in (1) again focuses on strict
lc-atoms and stipulates the ones from S are included in X as well. Finally, for both strict
and non-strict defined lc-atoms, the integrity constraints in (2) assert the falsity of atoms
that are not in S.</p>
      <p>In what follows, we elaborate upon the formal relationships among the di erent
types of lc-atoms. To this end, we distinguish four homogeneous settings, in which all
lc-atoms are either defined+strict, defined+non-strict, external+strict, or
external+nonstrict, respectively. We use the following notation. For an lc-program P over A [ L and
an lc-solution S L, we define PjS as the extension of program P given in (1) and
(2). Also, let X (P) denote the set of (regular) stable models of program P over A [ L,
and Xlc (P) = SS L lc-solution X (PjS ) its set of lc-stable models. Note that the respective
semantic setting is determined by the type of lc-atoms in L. In fact, two syntactically
equivalent lc-programs may yield di erent lc-models in di erent settings. This is made
precise in the following propositions.</p>
      <p>Theorem 1. Let P be an lc-program over A [ L and P0 an lc-program over A [ L 0
such that P = P0.
1. If L = L \ H (P), then Xlc (P) X (P)
2. If L = L! n H (P), then X (P) Xlc (P)
3. If L 0 = L 0!, then Xlc (P) Xlc (P0)
Note that P = P0 also makes L and L 0 syntactically equivalent, although they may
represent di erent types of lc-atoms. The above results draw on the observation that
if all atoms in L 0 are non-strict, then fS L j S is an lc-solutiong fS L 0! j
S is an lc-solutiong. This is because the former set of lc-solutions at least need to satisfy
condition (i) while the latter only have to satisfy (i). Note that Proposition 1 does not
just apply to ASP[lc] but to ASP modulo arbitrary theories.</p>
      <p>In more detail, Proposition 1.1 expresses that each lc-stable model is also a regular
stable model in a setting involving defined lc-atoms only. Conversely, Proposition 1.2
expresses that each regular stable model is also an lc-stable model in the
external+nonstrict setting. Proposition 1.3 portrays that handling lc-atoms in a strict or non-strict way
may lead to fewer (or equal) lc-stable models than treating them just in a non-strict way.</p>
      <p>In contrast to the observations of Proposition 1, the following proposition tells us that
regular and lc-stable models are in general incomparable in the external+strict setting.
Theorem 2. There exist lc-programs P over A [ L with L = L$ n H (P), so that
X (P) * Xlc (P) or Xlc (P) * X (P).</p>
      <p>This results from the fact that the treatment of strict lc-atoms may prune regular stable
models and, on the other hand, the pure external evaluation of lc-atoms may induce
additional stable models.</p>
      <p>Now that we have explored the formal correspondence among the alternative settings,
let us discuss their appropriateness for ASP[lc]. To this end, let us consider two examples.</p>
      <p>We first asses the two defined settings. Modifying our above example, let P1 be
{ a ("1.5")}. &amp; sum {"1.5"* x } &lt;=7 : - a ("1.5").</p>
      <p>&amp; sum { x } &lt;"4.5".
along with its two regular stable models X1 = f &amp;sum{x}&lt;"4.5" g and X2 =
f a("1.5"), &amp;sum{"1.5"*x}&lt;=7, &amp;sum{x}&lt;"4.5" g.</p>
      <p>Let us first consider the defined+strict case, in which the lc-atoms
&amp;sum{"1.5"*x}&lt;=7 and &amp;sum{x}&lt;"4.5" belong to L$ \ H (P). Then, Sa = ; is
an lc-solution, since both 1:5 x 7 and x &lt; 4:5 can be falsified. However, the
resulting program P1 jSa contains rules ‘&amp;sum{x}&lt;"4.5".’ and ‘:- &amp;sum{x}&lt;"4.5".’
and thus admits no regular stable model. The same result is obtained for Sb =
f &amp;sum{"1.5"*x}&lt;=7 g. Unlike this, Sc = f &amp;sum{x}&lt;"4.5" g is no lc-solution
although it appears to support X1 as an lc-model. In a strict setting, an i correspondence
is imposed between lc-atoms and their associated linear constraints. This excludes Sc
as an lc-solution, since there is no real-valued assignment satisfying x &lt; 4:5 while
falsifying 1:5 x 7. This situation is caused by the non-derivabality of lc-atom
&amp;sum{"1.5"*x}&lt;=7, which is in turn falsified by the stable models semantics. The
strict interpretation of the lc-atom then requires the falsification of 1:5 x 7. Finally,
Sd = f &amp;sum{x}&lt;"4.5", &amp;sum{"1.5"*x}&lt;=7 g is another lc-solution. Given that
P1 jSd = P1 [ f :- not &amp;sum{"1.5"*x}&lt;=7. :- not &amp;sum{x}&lt;"4.5". g has the
regular stable model X2, we establish that X2 is the only lc-stable model of P1.</p>
      <p>This example has illustrated that strict lc-atoms impose a rather strong connection to
their associated constraints in a defined setting. Hence, let us consider next the above
example in a defined+non-strict setting, requiring merely an only if condition between
constraints and their lc-atoms. Now, Sc = f &amp;sum{x}&lt;"4.5" g is an lc-solution since
1:5 x 7 must not be falsified. Accordingly, the regular stable model X1 of P1 jSc =
P1 [ f :- &amp;sum{"1.5"*x}&lt;=7. g attests that X1 is also an lc-stable model of P1. The
other lc-solutions yield the same results as above.</p>
      <p>Next, let us analyze the two external settings. For this, let the lc-program P2 be
: - not &amp; sum { x } &lt;"4.5". a ("1.5") : - &amp; sum {"1.5"* x } &lt;=7.
admitting no regular stable models, due to the included integrity constraint.</p>
      <p>First, we examine the external+non-strict setting. In this case, each combination
of the lc-atoms &amp;sum{"1.5"*x}&lt;=7 and &amp;sum{x}&lt;"4.5" in L! n H (P) results in an
lc-solution. However, the existence of lc-stable models depends upon the presence of
lcatom &amp;sum{x}&lt;"4.5". Lc-models are obtained if it is included, otherwise the integrity
constraint in P2 denies them. The lc-solution Sa = f &amp;sum{x}&lt;"4.5" g results in the
identical lc-stable model. Note that all underlying assignments must satisfy x &lt; 4:5
and hence 1:5 x 7. However, the non-strict nature of &amp;sum{"1.5"*x}&lt;=7 leaves
its truth value open. Thus, stable model semantics sets it to false and a("1.5") is not
obtained although the actual constraint 1:5 x 7 in the rule body in P2 is satisfied.
Similarly, the lc-solution Sb = f &amp;sum{x}&lt;"4.5", &amp;sum{"1.5"*x}&lt;=7 g induces
the same counter-intuitive lc-model f &amp;sum{x}&lt;"4.5" g along with a second, arguably
more intuitive lc-model f a("1.5"), &amp;sum{"1.5"*x}&lt;=7, &amp;sum{x}&lt;"4.5" g.</p>
      <p>The previous discussion has revealed that non-strict lc-atoms may ignore
information induced by the theory in an external setting. This lack is
compensated in an external+strict setting by the above condition (ii) and the
resulting assertion of lc-atoms representing satisfied constraints in (1). Accordingly,
f a("1.5"), &amp;sum{"1.5"*x}&lt;=7, &amp;sum{x}&lt;"4.5" g is the only lc-stable model
of P2. By interpreting both lc-atoms in a strict manner, the inclusion of &amp;sum{x}&lt;"4.5"
entails that of &amp;sum{"1.5"*x}&lt;=7 as well. Hence, the singleton f &amp;sum{x}&lt;"4.5" g
cannot be an lc-model of P2 in a external+strict setting.</p>
      <p>The previous discussion has shown that certain semantic combinations are more
appropriate for treating linear constraints than others. This may be di erent for other
theories. We have seen that a defined+strict interpretation of lc-atoms may be overly
strong, since the non-derivability of lc-atoms may severely restrict real-valued
assignments. Conversely, the external+non-strict treatment of lc-atoms may be too weak, since
it admits real-valued variable assignments satisfying constraints that are not reflected in
the corresponding lc-stable models. As a consequence, we focus in what follows on the
external+strict and defined+non-strict settings for lc-atoms.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Multi-Shot ASP Solving with Linear Constraints</title>
      <p>
        Multi-shot solving [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] is about solving continuously changing logic programs in an
operative way. This can be controlled via reactive procedures that loop on solving while
reacting, for instance, to outside changes or previous solving results. These reactions may
entail the addition or retraction of rules that the operative approach can accommodate by
leaving the una ected program parts intact within the solver. This avoids re-grounding
and benefits from heuristic scores and nogoods learned over time. In fact, evolving logic
programs with linear constraints can be extremely useful in dynamic applications, for
example, to add new resources in a planning domain, or to set the value of an observed
variable measured using sensors. The abstraction from actual constraints to constraint
atoms allows us to easily extend multi-shot solving to lc-programs.
      </p>
      <p>
        To illustrate how seamlessly our systems clingo[dl] and clingo[lp] support
multishot solving, let us apply the exemplary Python script, shipped with clingo to illustrate
incremental solving, to model the spoiling Yale shooting scenario [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Multi-shot solving
in clingo relies on two directives (cf. [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]), the #program directive for regrouping rules
and the #external directive for declaring atoms as being external to the program at hand.
The truth value of such external atoms is set via clingo’s API. The aforementioned Python
script loops over increasing integers until a stop criterion is met. It presupposes three
groups of rules declared via #program directives. At step 0 the programs named base
and check(n) are grounded and solved for n = 0. Then, in turn programs check(n)
and step(n) are added for n &gt; 0, grounded, and the resulting overall program solved.
In addition, at each step n an external atom query(n) is introduced; it is set to true for
the current iteration n and false for all previous instances with smaller integers than n.
We refer the reader to [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] for further details on the Python part. Notably, for dealing
with lc-programs, we can use the exemplary Python script as is—once the respective
propagator is registered with the solver.
      </p>
      <p>
        In the spoiled Yale shooting scenario [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], we have a gun and two actions, load and
shoot. If we load, the gun becomes loaded. If we shoot, it kills the turkey, if the gun was
loaded for no more than 35 minutes. Otherwise, the gun powder is spoiled. We model
this planning problem in ASP[lc]. We start by including the incremental Python program,
1 #include "incmode_lc.lp".
      </p>
      <sec id="sec-3-1">
        <title>3 #program base.</title>
        <p>4 action(load ). action(shoot ). action(wait ).
5 duration(load ,25). duration(shoot ,5). duration(wait ,36).
6 unloaded (0).
7 &amp;sum { at(0) } = 0.
8 &amp;sum { armed (0) } = 0.</p>
        <p>Listing 1.1. Spoiled Yale shooting instance
the grammar, and the propagator for linear constraints in the first line of Listing 1.1.5
This listing is the base program. All actions and their durations are introduced in Lines 4
and 5. At the initial situation, the gun is unloaded (Line 6). Line 7 and 8 initialize integer
variables at(0) and armed(0) with 0 (see below). Listing 1.2 gives the dynamic part
of the problem; it is grounded for each step n. Line 2 enforces that exactly one action is
done per step. The exact times at which each step takes place is captured by the integer
variables at(n). The di erence between two consecutive time steps is the duration of
the respective action (Line 3). The next three lines make the fluents inertial, viz. the
gun stays loaded/unloaded if it was loaded/unloaded before, and the turkey stays dead.</p>
        <p>Lines 9 and 10 use the integer variable armed(n) to describe for how long the weapon
has been loaded at step n. Whenever it is unloaded, armed(n) is 0, otherwise it is
increased by the duration of the last action. The upcoming four lines (12–15) encode the
conditions and e ects of the actions. When we load the gun, it becomes loaded; when
we shoot, it becomes unloaded. If we shoot and the gun was loaded for no longer than
35 minutes (and thus the gun powder is unspoiled), then the turkey is dead. The last line
ensures that we cannot shoot if the gun is not loaded. Together with the initial situation
and the actions from Listing 1.1 this encodes the spoiled Yale shooting problem, and
any solution represents an executable plan. Listing 1.3 adds a query to our problem.</p>
        <p>5 For uniformity, we use semi-colons ’;’ rather than ’,’ for separating body elements.
1 #program step(n).
2 1{do(X,n) : action(X)}1.
3 &amp;sum { at(n); -1*at(N') } = D :- do(X,n); duration(X,D); N'=n-1.
5 loaded(n) :- loaded(n-1); not unloaded(n).
6 unloaded(n) :- unloaded(n-1); not loaded(n).
7 dead(n) :- dead(n-1).
9 &amp;sum { armed(n) } = 0 :- unloaded(n-1).
10 &amp;sum { armed(n); -1*armed(N') } = D :- do(X,n); duration(X,D); N'=n-1; loaded(N').
12 loaded(n) :- do(load ,n).
13 unloaded(n) :- do(shoot ,n).
14 dead(n) :- do(shoot ,n); &amp;sum { armed(n) } &lt;= 35.
15 :- do(shoot ,n); unloaded(n-1).</p>
        <p>Listing 1.2. Spoiled Yale shooting scenario</p>
      </sec>
      <sec id="sec-3-2">
        <title>1 #program check(n). 2 :- not dead(n); query(n). 3 :- not &amp;sum { at(n) } &lt;= 100; query(n). 4 :- do(shoot ,n); not &amp;sum { at(n) } &gt; 35.</title>
        <p>Listing 1.3. Query for the spoiled Yale Shooting Scenario.</p>
        <p>In Line 2 we require that the turkey is dead at step n. As this constraint is subject to
the external atom query(n), it is only active at solving step n. The next line ensures
that we kill the turkey within 100 minutes. And as an additional constraint, we added
some preparation time such that we are not allowed to shoot in the first 35 minutes.
It is possible to solve this problem within three steps. There exist two solutions at
this time point, one of them containing unloaded(0), do(wait,1), unloaded(1),
do(load,2), loaded(2), do(shoot,3), unloaded(3), dead(3). That is, we simply
wait before loading and shooting. The second solution loads the gun instead of waiting,
thus loading the gun twice before shooting.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4 clingo derivatives and related systems</title>
      <p>In this section, we give an overview of systems extending ASP with linear constraints.
We start with our own systems clingo[dl] and clingo[lp] both relying upon clingo’s
interface for theory propagators. We also include clingcon, since it is based on a much
lower level API using the internal functions of clingo (and clasp) in C++. While clingcon
implements a highly sophisticated system using advanced preprocessing and solving
techniques, the Python variants of clingo[dl] and clingo[lp] provide easily modifiable
and maintainable propagators for di erence and linear constraints, respectively. This
carries over to the C++ variant of clingo[dl] since the C++ and Python API share the
same functionality. Table 1 shows a comparative list of features for these systems. The
two flexible clingo derivatives support all four combinations of strict/non-strict and
defined/external lc-atom types, whereas clingcon has a fixed one. Also the bandwidth of
supported constraints is di erent. While clingo[dl] only supports di erence constraints,
the other two support n-ary linear constraints. clingo[dl] and clingo[lp] support
(approximations of) real numbers (see below). Moreover, all three clingo derivatives allow for
optimizing objective functions over the numeric variables (in addition to optimization in
ASP).</p>
      <p>
        clingo[dl] extends clingo with di erence constraints of the form x y k, where
x and y are integer (or real) variables and k is an integer (real) constant. Despite the
restriction to two variables, they allow for naturally encoding timing related problems, as
e.g., in scheduling, and are solvable in polynomial time. clingo[dl] uses clingo’s theory
interface to realize a stateful propagator that checks during search whether the current
set of implied di erence constraints is satisfiable [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. To this end, it makes use of the
stateful nature of the theory interface that allows for incrementally updating internal
states and thus for backtracking to previous states without having to rebuild the internal
representation. By default, all di erence constraint atoms are considered to be non-strict.
In this case, it is only necessary to keep track of lc-atoms that are assigned true since only
then the constraint is required to hold. In the strict case, false assignments to di erence
constraint atoms are considered as well. This is done by adding y x k 1 whenever
‘&amp;diff{x-y}&lt;=k’ is assigned false. As a side-product of the satisfiability check, an
integer (real) assignment for all variables is obtained and ultimately printed for all
lc-stable models. Usually, several or even an infinite number of assignments exist. The
returned assignment is the one with the lowest sum of the absolute values of all variables.
For instance, in terms of scheduling problems, this amounts to scheduling each job as
soon as possible.
      </p>
      <p>
        clingo[lp] fully covers the extension of ASP[lc] described in Section 2. This clingo
derivative accepts lc-atoms containing integer and real variables possibly subject to
dynamic conditions. That is, clingo[lp] extends ASP with constraints as dealt with in Linear
Programming (LP; [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]) as well as according objective functions for optimization. In
clingo[lp], the latter takes all linear constraints induced by the Boolean assignment into
account. As above, the theory interface of clingo is used to integrate a stateful propagator
that checks during search the satisfiability of the current set of linear constraints. Here,
however, this is done with a generic interface to dedicated LP solvers, currently
supporting cplex and lpsolve. (Note that both LP solvers do an exponential consistency check.)
The Python interfaces of cplex and lpsolve natively support relations =, , and . We add
support for &lt;, &gt;, and ,. To this end, we translate &lt; and &gt; into and by subtracting or
adding an " to the right-hand-side of a linear constraint, respectively.6 Furthermore, , is
treated as a disjunction of &lt; and &gt;. By default, clingo[lp] treats lc-atoms in a non-strict
manner. Thus only linear constraints represented by true lc-atoms are considered. When
treating them strictly, false lc-atoms are handled using the complementary relation. In
this case, the corresponding linear constraint is derived by using the complementary
relation. Notably, clingo[lp] o ers dynamic conditions in lc-atoms. This allows for linear
constraints of variable length even during search. All conditions have to be decided
before such a constraint is included in the consistency check. Furthermore, clingo[lp] is
able to update its internal state incrementally but rebuilds the linear constraint system
after backtracking to avoid accumulating rounding errors. Also, it uses an Irreducible
Inconsistent Set algorithm [24] for extracting minimal sets of conflicting constraints to
support conflict learning in the ASP solver. On the one hand, this extraction is expensive,
on the other hand, such core conflicts may significantly reduce the search space. To
control this trade-o , clingo[lp] only enables this feature after a certain percentage of
lc-atoms and conditions is assigned (by default 20%). Similarly, frequent theory
consistency checks are expensive and a conflict is less likely to be found within a small
assignment; accordingly, an analogous percentage based threshold allows for controlling
their invocation (default 0%).
      </p>
      <p>
        clingcon series 3 o ers a clingo-based ASP system with constraints over integers [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ];
it is implemented in C++ and features a strict, external semantics. Sophisticated
preprocessing techniques are supported and non-linear constraints such as the global distinct
constraint are translated into linear ones. Integer variables are represented using the
order encoding [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], and customized propagators using state-of-the-art lazy nogood and
variable generation are employed. The propagators do not only ensure bound consistency
on the variables but also derive new bounds. Furthermore, multi-objective optimization
on the integer variables is supported. In contrast to clingo[lp], conditions on integer
variables must be static.
      </p>
      <p>All systems are available at https://potassco.org/{clingoDL,clingoLP,
clingcon}.</p>
      <p>
        Big picture. Finally, let us relate our systems with others extending ASP with linear
constraints. The first category, referred to as translation-based approaches, includes
systems such as ezsmt [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], dingo [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], aspmt2smt [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and mingo [19]. The first three
translate both ASP and constraints into SAT Modulo Theories (SMT; [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]); dingo is
restricted to di erence constraints. Unlike this, mingo’s target formalism is Mixed
Integer Linear Programming (MILP). Furthermore, aspartame [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] translates ASP[lc] (over
integers) back to ASP by using the order encoding. Once the input program is
translated, only a solver for the target formalism is needed. This is one of the advantages of
translation-based approaches. Also, they benefit from the features and performance of
the respective target systems. A drawback is the translation itself since it may result in
large propositional representations or weak propagation strength. The second category
extends the standard Conflict Driven Nogood Learning (CDNL; [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]) machinery of
6 This " can be configured using the command line and defaults to 10 3 (as in cplex).
ASP solvers with constraint propagators. This allows for propagating both Boolean
and linear constraints during search. The latter is thus continuously checked for
consistency and even new constraints may get derived. For instance, the clingo-based system
dlvhex[cp] [20] uses gecode, while ezcsp uses a Prolog constraint solver for consistency
checking. Unlike this, inca [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] extends a previous clingo version with a customized
lazy propagator generating constraints according to the order encoding. This approach
allows for deriving new constraints such as bounds of the integer variables.
      </p>
      <p>
        The clingo derivatives clingo[dl] and clingo[lp] belong to the second category of
systems, just like clingcon 3. Table 2 summarizes important similarities and di erences
clingo clingo clingcon aspartame inca ezcsp ezsmt mingo dingo aspmt2smt dlvhex
[dl] [lp] [cp]
of the aforementioned systems. The first row tells us whether a system relies on a
translation to SMT, MILP, or ASP. The second one indicates whether the approach
uses some form of explicit variable representation. This is the case when using an
encoding and usually results in a large number of propositional atoms to represent
variables with large domains. Half of the systems are able to handle constraints over
reals while the other half is restricted to integers. Note that for a system of inequalities, a
solution over reals can be found much easier than one over integers. For all systems, real
numbers are implemented as floating point numbers. Due to this, round-o errors cannot
completely be avoided. Note that since computers are finite precision machines, the
imprecision of floating point computations is common to any computer systems and/or
languages [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. cplex uses numerically stable methods to perform its linear algebra so
that round-o errors usually do not cause problems.7 With “non-linear” we distinguish
systems handling global or non-linear constraints, and “non-tight” indicates whether a
system can deal with recursive programs. Finally, the table lists all systems that are able
to optimize an objective function over the integer and/or real variables.
7 See Numeric di culties at https://www.ibm.com/support/knowledgecenter/SSSA5P_
12.7.0/ilog.odms.studio.help/pdf/usrcplex.pdf
      </p>
    </sec>
    <sec id="sec-5">
      <title>Experimental analysis</title>
      <p>We begin with an empirical analysis of our clingo derivatives in di erent settings. We
investigate, first, di erent types of lc-atoms, viz. defined+non-strict versus external+strict,
second, di erent levels of theory interfaces, Python or C++, for clingo[dl], and, third,
di erent levels of integration, namely, dedicated implementations versus o -the-shelf
solver. Finally, we contrast the performance of our systems with other systems for
ASP[lc].</p>
      <p>
        We ran each benchmark on a Xeon E5520 2.4 GHz processor under Linux limiting
RAM to 20 GB and execution time to 1800s. For clingo[dl] and clingo[lp], we use
clingo 5.2.0. Furthermore, we use clingcon 3.2.0, dingo v.2011-09-23, mingo
v.2012-0930, ezsmt 1.0.0, and ezcsp 1.7.9 for our experiments. We upgraded dingo and mingo to
use recent versions of their back-end solvers. Hence, in our experiments, the LP-based
systems clingo[lp] and mingo use cplex 12.7.0.0 and the SMT-based systems dingo
and ezsmt use z3 4.4.2. The benchmark set consists of 165 instances, among which
110 can be encoded using di erence constraints (dl) and 55 require linear constraints
with more than two variables (lc). In detail, the dl set consists of 38 instances of
twodimensional strip packing (2sp) [22], and 72 instances of flow shop (fs), job shop (js),
and open shop (os) problems [23], selecting three instances for each job and machine at
random. Since not all systems support optimization over variable values, we bounded the
instances with 1.2 times the best known bound and solved the resulting decision problem.
The lc instance set includes 20 instances of incremental scheduling (is), 15 instances of
reverse folding (rf), and 20 instances of weighted sequence (ws). Encodings have been
adopted from [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] in combination with the instances from the ASP competition.8 Our
empirical evaluation focuses on available systems sharing comparable encodings. This
was not the case for aspartame, aspmt2smt, inca, and dlvhex[cp]. The first two systems
have a proper and thus di erent input language and encoding philosophy, inca produced
incorrect results (cf. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for details), and dlvhex[cp] is no longer maintained.
      </p>
      <p>Table 3 compares clingo[dl] and clingo[lp] with di erent encoding techniques, types
of theory atoms, and programming language hosting the theory interface by measuring
average time (t) and timeouts (to). Each column consists of one combination of form
8 We refrained from using the other three benchmark classes from this source because the
available instances were too easy in view of producing informative results.
system/atom/language, where system is either dl or lp for clingo[dl] and clingo[lp],
atom either dns or es for defined+non-strict and external+strict lc-atoms, and language
either py or cpp for Python and C++, respectively. To compare clingo[dl] and clingo[lp],
we restrict the set of benchmarks to dl. We observe that dns performs better than es
in all settings. Under lc-stable model semantics, defined lc-atoms are more tightly
constrained. External lc-atoms, on the other hand, induce an implicit choice leading to a
larger search space and might introduce duplicate solutions with di erent assignments.
Furthermore, strict lc-atoms double the amount of implications that have to be considered
by the propagator. As expected, the C++ variant of clingo[dl] outperforms its Python
counterpart, even though the performance gain does not reach an order of magnitude.</p>
      <p>Table 4 compares di erent systems dealing with ASP[lc] by average time (t) and
timeouts (to). Only the best configurations from Table 3 were selected for comparison.
All systems were tested using their default configurations. For dl, dl/dns/cpp performs
best overall, even though clingcon is better for 2sp and js. The class fs generates the
most di erence constraints among all benchmark classes, making it less suited for
translation-based approaches, like dingo, mingo, and ezsmt, and producing overhead
for more involved propagation as in clingcon. By default, ezcsp performs the theory
consistency check on full answer sets, and by doing so avoids handling vast amounts
of constraints during search and therefore performs comparatively well on fs. For the
other classes though, this generate and test approach is less e ective. Regarding lc
and overall results, clingcon clearly dominates the competition, followed by the two
translation-based approaches mingo and ezsmt with underlying state-of-the-art solvers
cplex and z3, respectively. lp/dns/py falls behind, since it is a straightforward Python
implementation and uses an exponential consistency check. In addition, distinct features
of clingo[lp] like real-valued variables and optimization as well as dynamic conditions
are not supported by other systems and thus not included in the benchmark set.</p>
    </sec>
    <sec id="sec-6">
      <title>Summary</title>
      <p>We presented several truly hybrid ASP systems incorporating di erence and linear
constraints. Previous approaches addressed this by resorting to translations into foreign
solving paradigms like MILP or SMT. This di erence is analogous to the one between
genuine ASP solvers like clasp and wasp and earlier ones like assat and cmodels that
translate ASP to SAT. The resulting systems clingo[dl] and clingo[lp] comprise several
complementary aspects. For instance, clingo[dl] relies upon customized propagators, one
variant using a Python API, the other a C++ API. This is similar to the approach of inca
and clingcon 3 for Constraint ASP. Unlike this, clingo[lp] builds upon the Python API to
incorporate o -the-shelf LP solvers for propagation, optionally cplex or lpsolve. This is
similar to the approach of dlvhex[cp] and clingcon 2 integrating gecode for constraint
processing. Both clingo[dl] and clingo[lp] allow for dealing with integer as well as real
variables. The former admits two, the latter an arbitrary number of such variables per
linear constraint. This is complemented by clingcon 3 adding constraint processing to
clingo by using a low level API.</p>
      <p>
        We accomplished this by instantiating the generic framework of ASP modulo theories
described in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. We defined lc-stable models and elaborated upon di erent types of
lc-atoms, ultimately settling on the combinations defined+non-strict and external+strict
for clingo[dl] and clingo[lp].9 Our underlying formal analysis on the interaction of
strictand definedness has actually a much broader impact given that other systems follow
similar principles. Although we lack a deeper analysis, inca and dlvhex[cp] appear to
adhere to an external+strict treatment of constraint atoms, just as our previous systems
clingcon, dingo, and mingo, while ezsmt and ezcsp seem to follow an external+non-strict
approach. Moreover, the results in Proposition 1 are of a general nature and apply well
beyond ASP systems dealing with linear constraints.
      </p>
      <p>We provided a conceptual and empirical comparison of clingo[dl] and clingo[lp]
with related systems for dealing with di erent forms of linear constraints in ASP. Our
experiments focused on, first, examining di erent types of lc-atoms and APIs for both
clingo derivatives, and, second, comparing them with related systems. In the first case,
clingo[dl] using defined+non-strict lc-atoms along with the C++ API yields the best
results, and in the second one, the aforementioned clingo[dl] configuration outperforms
the other systems for the set of benchmarks only involving di erence constraints, and
clingcon has an edge over all other systems regarding the set of benchmarks featuring
arbitrary (integer-based) linear constraints.</p>
      <p>Finally, we showed how easily our machinery can be applied to online reasoning
scenarios by using clingo‘s multi-shot and theory reasoning capabilities in tandem.
9 This is our recommendation in view of our analysis in Section 2; both systems actually support
all four combinations of strict/non-strict and defined/external lc-atoms.
19. G. Liu, T. Janhunen, and I. Niemelä. Answer set programming via mixed integer programming.</p>
      <p>In G. Brewka, T. Eiter, and S. McIlraith, editors, Proceedings of the Thirteenth International
Conference on Principles of Knowledge Representation and Reasoning (KR’12), pages 32–42.</p>
      <p>AAAI Press, 2012.
20. A. De Rosis, T. Eiter, C. Redl, and F. Ricca. Constraint answer set programming based on
HEX-programs. In Eighth Workshop on Answer Set Programming and Other Computing
Paradigms (ASPOCP 2015), August 31, 2015, Cork, Ireland, August 2015.
21. P. Simons, I. Niemelä, and T. Soininen. Extending and implementing the stable model
semantics. Artificial Intelligence, 138(1-2):181–234, 2002.
22. T. Soh, K. Inoue, N. Tamura, M. Banbara, and H. Nabeshima. A SAT-based method for solving
the two-dimensional strip packing problem. Fundamenta Informaticae, 102(3-4):467–487,
2010.
23. E. Taillard. Benchmarks for basic scheduling problems. European Journal of Operational</p>
      <p>Research, 64(2):278–285, 1993.
24. J. van Loon. Irreducibly inconsistent systems of linear inequalities. In European Journal of
Operational Research, volume 3, pages 283–288. Elsevier Science, 1981.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>M.</given-names>
            <surname>Banbara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gebser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ostrowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Peano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Soh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Tamura</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Weise</surname>
          </string-name>
          .
          <article-title>aspartame: Solving constraint satisfaction problems with answer set programming</article-title>
          . In F. Calimeri, G. Ianni, and M. Truszczyn´ski, editors,
          <source>Proceedings of the Thirteenth International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'15)</source>
          , volume
          <volume>9345</volume>
          <source>of Lecture Notes in Artificial Intelligence</source>
          , pages
          <fpage>112</fpage>
          -
          <lpage>126</lpage>
          . Springer-Verlag,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>M.</given-names>
            <surname>Banbara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kaufmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ostrowski</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          . Clingcon:
          <article-title>The next generation</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          ,
          <year>2017</year>
          . To appear.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>C.</given-names>
            <surname>Baral</surname>
          </string-name>
          .
          <article-title>Knowledge Representation, Reasoning and Declarative Problem Solving</article-title>
          . Cambridge University Press,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>C.</given-names>
            <surname>Barrett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Sebastiani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Seshia</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Tinelli</surname>
          </string-name>
          .
          <article-title>Satisfiability modulo theories</article-title>
          . In A. Biere,
          <string-name>
            <given-names>M.</given-names>
            <surname>Heule</surname>
          </string-name>
          ,
          <string-name>
            <surname>H. van Maaren</surname>
          </string-name>
          , and T. Walsh, editors,
          <source>Handbook of Satisfiability</source>
          , volume
          <volume>185</volume>
          <source>of Frontiers in Artificial Intelligence and Applications</source>
          , chapter
          <volume>26</volume>
          , pages
          <fpage>825</fpage>
          -
          <lpage>885</lpage>
          . IOS Press,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>M.</given-names>
            <surname>Bartholomew</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Lee</surname>
          </string-name>
          .
          <article-title>System aspmt2smt: Computing ASPMT theories by SMT solvers</article-title>
          . In E. Fermé and J. Leite, editors,
          <source>Proceedings of the Fourteenth European Conference on Logics in Artificial Intelligence (JELIA'14)</source>
          , volume
          <volume>8761</volume>
          <source>of Lecture Notes in Artificial Intelligence</source>
          , pages
          <fpage>529</fpage>
          -
          <lpage>542</lpage>
          . Springer-Verlag,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>P.</given-names>
            <surname>Cabalar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Otero</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Pose</surname>
          </string-name>
          .
          <article-title>Temporal constraint networks in action</article-title>
          . In W. Horn, editor,
          <source>Proceedings of the Fourteenth European Conference on Artificial Intelligence (ECAI'00)</source>
          , pages
          <fpage>543</fpage>
          -
          <lpage>547</lpage>
          . IOS Press,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>M.</given-names>
            <surname>Carro</surname>
          </string-name>
          and
          <string-name>
            <surname>A</surname>
          </string-name>
          . King, editors.
          <source>Technical Communications of the Thirty-second International Conference on Logic Programming (ICLP'16)</source>
          , volume
          <volume>52</volume>
          . Open Access Series in Informatics (OASIcs),
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>S.</given-names>
            <surname>Cotton</surname>
          </string-name>
          and
          <string-name>
            <given-names>O.</given-names>
            <surname>Maler</surname>
          </string-name>
          .
          <article-title>Fast and flexible di erence constraint propagation for DPLL (T)</article-title>
          . In A. Biere and C. Gomes, editors,
          <source>Proceedings of the Ninth International Conference on Theory and Applications of Satisfiability Testing (SAT'06)</source>
          , volume
          <volume>4121</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>170</fpage>
          -
          <lpage>183</lpage>
          . Springer-Verlag,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>J.</given-names>
            <surname>Crawford</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Baker</surname>
          </string-name>
          .
          <article-title>Experimental results on the application of satisfiability algorithms to scheduling problems</article-title>
          . In B.
          <string-name>
            <surname>Hayes-Roth</surname>
          </string-name>
          and R. Korf, editors,
          <source>Proceedings of the Twelfth National Conference on Artificial Intelligence (AAAI'94)</source>
          , pages
          <fpage>1092</fpage>
          -
          <lpage>1097</lpage>
          . AAAI Press,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. G. Dantzig.
          <article-title>Linear Programming and Extensions</article-title>
          . Princeton University Press,
          <year>1963</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>C.</given-names>
            <surname>Drescher</surname>
          </string-name>
          and
          <string-name>
            <given-names>T.</given-names>
            <surname>Walsh</surname>
          </string-name>
          .
          <article-title>A translational approach to constraint answer set solving</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          ,
          <volume>10</volume>
          (
          <issue>4-6</issue>
          ):
          <fpage>465</fpage>
          -
          <lpage>480</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>M. Gebser</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Kaufmann</surname>
            , M. Ostrowski,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Schaub</surname>
            , and
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Wanko</surname>
          </string-name>
          .
          <article-title>Theory solving made easy with clingo 5</article-title>
          .
          <source>In Carro and King [7]</source>
          , pages
          <fpage>2</fpage>
          :
          <fpage>1</fpage>
          -
          <lpage>2</lpage>
          :
          <fpage>15</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>M. Gebser</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Kaufmann</surname>
            , and
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          .
          <article-title>Clingo = ASP + control: Preliminary report</article-title>
          . In M. Leuschel and T. Schrijvers, editors,
          <source>Technical Communications of the Thirtieth International Conference on Logic Programming (ICLP'14)</source>
          , volume arXiv:
          <volume>1405</volume>
          .
          <article-title>3694v1 of Theory and Practice of Logic Programming</article-title>
          ,
          <source>Online Supplement</source>
          ,
          <year>2014</year>
          . Available at http://arxiv.org/abs/1405.3694v1.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>M. Gebser</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Kaufmann</surname>
            , and
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          .
          <article-title>Conflict-driven answer set solving: From theory to practice</article-title>
          .
          <source>Artificial Intelligence</source>
          ,
          <fpage>187</fpage>
          -
          <lpage>188</lpage>
          :
          <fpage>52</fpage>
          -
          <lpage>89</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          .
          <article-title>Classical negation in logic programs</article-title>
          and disjunctive databases.
          <source>New Generation Computing</source>
          ,
          <volume>9</volume>
          :
          <fpage>365</fpage>
          -
          <lpage>385</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>D.</given-names>
            <surname>Goldberg</surname>
          </string-name>
          .
          <article-title>What every computer scientist should know about floating-point arithmetic</article-title>
          .
          <source>ACM Computing Surveys (CSUR)</source>
          ,
          <volume>23</volume>
          (
          <issue>1</issue>
          ):
          <fpage>5</fpage>
          -
          <lpage>48</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. T. Janhunen, G. Liu,
          <string-name>
            <surname>and I. Niemelä.</surname>
          </string-name>
          <article-title>Tight integration of non-ground answer set programming and satisfiability modulo theories</article-title>
          . In P. Cabalar,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mitchell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pearce</surname>
          </string-name>
          , and E. Ternovska, editors,
          <source>Proceedings of the First Workshop on Grounding and Transformation for Theories with Variables (GTTV'11)</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>13</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lierler</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Susman</surname>
          </string-name>
          .
          <article-title>SMT-based constraint answer set solver EZSMT (system description)</article-title>
          .
          <source>In Carro and King [7]</source>
          , pages
          <fpage>1</fpage>
          :
          <fpage>1</fpage>
          -
          <lpage>1</lpage>
          :
          <fpage>15</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>