<!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>The CHR-based Implementation of the S CIFF Abductive System</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Marco Alberti</string-name>
          <email>m.alberti@fct.unl.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marco Gavanelli</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Evelina Lamma</string-name>
          <email>evelina.lammag@unife.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CENTRIA - DI/FCT - Universidade Nova de Lisboa Quinta da Torre - 2829-516 Caparica</institution>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>ENDIF - Universita di Ferrara Via Saragat</institution>
          ,
          <addr-line>1 - 44100 Ferrara</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Abduction is a form of inference that supports hypothetical reasoning and has been applied to a number of domains, such as diagnosis, planning, protocol veri cation. Abductive Logic Programming (ALP) is the integration of abduction in logic programming. Usually, the operational semantics of an ALP language is de ned as a proof procedure. The rst implementations of ALP proof-procedures were based on the meta-interpretation technique, which is exible but limits the use of the built-in predicates of logic programming systems. Another, more recent, approach exploits theoretical results on the similarity between abducibles and constraints. With this approach, which bears the advantage of an easy integration with built-in predicates and constraints, Constraint Handling Rules has been the language of choice for the implementation of abductive proof procedures. The rst CHR-based implementation mapped integrity constraints directly to CHR rules, which is an e cient solution, but prevents de ned predicates from being in the body of integrity constraints and does not allow a sound treatment of negation by default. In this paper, we describe the CHR-based implementation of the SCIFF abductive proof-procedure, which follows a di erent approach. The SCIFF implementation maps integrity constraints to CHR constraints, and the transitions of the proof-procedure to CHR rules, making it possible to treat default negation, while retaining the other advantages of CHRbased implementations of ALP proof-procedures.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        cause. Besides diagnosis, abductive reasoning has been applied to a number of
applications, like planning [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], protocol veri cation [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], etc.
      </p>
      <p>
        Abductive Logic Programming (ALP) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] is a language that embeds
abductive reasoning into logic programming. In ALP, we have a set of predicates that
have no de nition, and are called abducibles. The truth of such predicates cannot
be proven, but it can be assumed: the abductive derivation will provide in the
computed answer the set of abduced hypotheses, together with the binding (the
classical answer of Logic Programming languages). However, in typical
applications, not all combinations of assumptions make sense: some illnesses are to be
excluded beforehand, depending e.g. on the sex of the patient. For this reason,
in ALP the user can typically de ne a set of rules, called Integrity Constraints,
that must be satis ed by the set of hypotheses. The operational semantics of
an ALP is typically de ned as a proof-procedure. A number of proof-procedures
have been proposed in the past for performing abductive reasoning; they are
typically implemented as Prolog meta-interpreters [5{8].
      </p>
      <p>
        A number of researchers have become interested in abductive reasoning
because it deals in a simple and sound way with negation [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Literal not(a) is
rewritten as an integrity constraint a ! false, and then handled appropriately
by the proof procedure. This type of negation is also called negation by default.
      </p>
      <p>
        ALP has also been integrated with Constraint Logic Programming [
        <xref ref-type="bibr" rid="ref10 ref6 ref8">6, 8, 10</xref>
        ],
in order to use both abductive reasoning and constraint propagation.
      </p>
      <p>
        Kowalski et al. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] studied the theoretical similarities between constraints
and abducibles. Such similarity was later exploited for the implementation of
abductive proof-procedures where abducibles are mapped to CLP constraints.
For this purpose, a promising is Constraint Handling Rules (CHR) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] a
language designed to implement new constraints and constraint solvers in a simple
and e cient way.
      </p>
      <p>The rst works on the implementation of abductive reasoning in CHR [13{16]
implemented directly the integrity constraints into CHR rules: in a sense, CHR
becomes also the language for writing integrity constraints. Thus, the user can
write rules such as</p>
      <p>
        p ^ q ! r;
where p and q are abducible predicates and r can be either an abducible or
a de ned predicate. The interest of a CHR implementation is not only
theoretical: thanks to the tight integration of CHR in the host language (which is
often Prolog), those proof-procedures can seamlessly access built-in constructs
and constraint solvers. This means that they have access to the innumerable
libraries written in Prolog, and they can even recurse through external predicates:
the abductive program can invoke Prolog predicates, and also meta-predicates
(e.g., findall, minimize, . . . ), which can in their turn request the abduction
of atoms, etc. A proof-procedure written in CHR bene ts immediately from all
the improvements of CHR engines, as recently happened with the Leuven CHR
implementation [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. Finally, those ALP which do not exploit abduction (or use
abduction only in a limited subset of the application) do not su er from the
meta-interpretation overhead, but run at full speed.
      </p>
      <p>However, a rule with a de ned predicate in the antecedent is not allowed:
these languages sacri ce negation by default on the altar of e ciency, which is
a sensible thing to do in some applications, but it is not in others.</p>
      <p>
        The SCIFF proof-procedure [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] was developed in 2003 with an alternative
CHR implementation, in which integrity constraints are rst-class objects, and
the proof-procedure can actively reason about them. In particular, we map
abducibles into CHR constraints and implement the transitions of the operational
semantics as CHR rules; in this way, the implementation follows very closely the
operational semantics. Thanks to the sound operational semantics, SCIFF has
a sound treatment of default (and also explicit) negation. Thanks to the CHR
implementation, SCIFF is smoothly integrated with a constraint solver. From a
language viewpoint, SCIFF has unique features that do not appear in other
abductive proof-procedures: it handles universally quanti ed variables both in the
abducibles and in the integrity constraints; CLP constraints (treated as
quanti er restrictions [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]) can be imposed both on existentially and on universally
quanti ed variables.
      </p>
      <p>SCIFF has been continuously developed and improved in the past few years,
and now it is smoothly integrated in graphical interfaces, semantic web
applications; it is considerably faster, more robust, and provides more features.</p>
      <p>In this paper, we show the implementation in CHR of the abductive
proofprocedure SCIFF, and we report about its recent improvements.</p>
      <p>The rest of the paper is organised as follows. We rst describe the SCIFF
abductive framework in Section 2. After some preliminaries on CHR (Section 3),
we present the implementation of SCIFF in CHR (Section 4). Discussion of
related work (Section 5) and conclusions (Section 6) follow.
2</p>
    </sec>
    <sec id="sec-2">
      <title>An abductive framework</title>
      <p>Abductive Logic Programming is a family of programming languages that
integrate abductive reasoning into logic programming. An ALP is a logic program,
consisting of a set of clauses, that can contain in the body some distinguished
predicates, belonging to a set A and called abducibles, (that will be shown in
the following in boldface). The aim is nding a set of abducibles A that,
together with the knowledge base, is an explanation for a given known e ect
(also called goal G):</p>
      <p>KB [
j= G:</p>
      <sec id="sec-2-1">
        <title>Also, should satisfy a set of logic formulae, called Integrity Constraints IC: E.g., if a patient has a headache, a physician may consult a knowledge base</title>
        <p>KB [</p>
        <p>j= IC:
headache
headache
headache</p>
        <p>u:
migraine:
meningitis:
and the abductive system will return one of the three explanations.</p>
        <p>
          SCIFF [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ] is a language in the ALP class. CLP [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] constraints can be
imposed on variables (which allows, for instance, to express that an event is
expected to happen in a given time interval). For example, we might have an
integrity constraint
        </p>
        <p>u ! temp(T ); T &lt; 39
saying that the explanation u is acceptable only if the temperature of the
patient is less than 39oC. The computed answer includes in general three elements:
a substitution for the variables in the goal (as usual in Prolog), the constraint
store (as in CLP), and the set of abduced literals.</p>
        <p>
          SCIFF was originally developed for the veri cation of interaction in
multiagent systems [
          <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
          ] and it is an extension of the IFF proof-procedure [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>A brief introduction to Constraint Handling Rules</title>
      <p>
        Constraint Handling Rules [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] (CHR for brevity hereafter) are essentially a
committed-choice language consisting of guarded rules that rewrite constraints
in a store into simpler ones until they are solved. CHR de ne both simpli cation
(replacing constraints by simpler constraints while preserving logical
equivalence) and propagation (adding new, logically redundant but computationally
useful, constraints) over user-de ned constraints.
      </p>
      <p>The main intended use for CHR is to write constraint solvers, or to extend
existing ones. However, the computational model of CHR presents features that
make it a useful tool for the implementation of the SCIFF proof-procedure.</p>
      <p>There are three types of CHRs: simpli cation, propagation and simpagation.</p>
      <sec id="sec-3-1">
        <title>Simpli cation CHRs. Simpli cation rules are of the form</title>
        <p>H1; : : : ; Hi () G1; : : : ; Gj jB1; : : : ; Bk
(1)
with i &gt; 0, j 0, k 0 and where the multi-head H1; : : : ; Hi is a nonempty
sequence of CHR constraints, the guard G1; : : : ; Gj is a sequence of built-in
constraints, and the body B1; : : : ; Bk is a sequence of built-in and CHR constraints.</p>
        <p>Declaratively, a simpli cation rule states that, if the guard is true, then the
left-hand-side and the right-hand-side are equivalent.</p>
        <p>Operationally, when constraint instances H1; : : : ; Hi in the head are in the
store and the guard G1; : : : ; Gj is true, they are replaced by constraints B1; : : : ; Bk
in the body.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Propagation CHRs. Propagation rules have the form</title>
        <p>H1; : : : ; Hi =) G1; : : : ; Gj jB1; : : : ; Bk
(2)
where the symbols have the same meaning of those in the simpli cation rules
(1).</p>
        <p>Declaratively, a propagation rule is an implication, provided that the guard
is true. Operationally, when the constraints in the head are in the store, and the
guard is true, the constraints in the body are added to the store.</p>
        <p>H1; : : : ; HlnHl+1; : : : ; Hi () G1; : : : ; Gj jB1; : : : ; Bk
where l &gt; 0 and the other symbols have the same meaning and constraints of
those of simpli cation CHRs (1).</p>
        <p>Declaratively, the rule of Eq. (3) is equivalent to</p>
        <p>H1; : : : ; Hl; Hl+1; : : : ; Hi () G1; : : : ; Gj jB1; : : : ; Bk; H1; : : : ; Hl
(4)
Operationally, when the constraints in the head are in the store and the guard is
true, H1; : : : ; Hl remain in the store, and Hl+1; : : : ; Hi are replaced by B1; : : : ; Bk.</p>
        <p>For example, the constraint can be implemented in CHR by giving its base
properties, namely the following rules:
Simpagation CHRs. Simpagation rules have the form
(3)
(5)
(6)
(7)
A
A</p>
        <p>A
B; B
B; B</p>
        <p>A , true
C ) A
A , A = B</p>
        <p>C
where the symbol '=' stands for uni cation. The CHR engine rewrites the
constraints in the store occurring as in the left-hand-side of the rules; for example,
if the constraints X Y , Y X are in the store, they are removed from
the store and the variables X and Y are uni ed, as prescribed by rule 6. Note
that on the left-hand-side of a CHR rule only constraints de ned with CHR can
appear: while the right-hand-side can contain any Prolog predicate (including
CLP(FD) constraints, uni cations, etc.), these elements cannot appear on the
left-hand-side.
4</p>
        <p>Implementation of the S CIFF proof-procedure
One of the features obtained through a CHR implementation (avoiding
metainterpretation) is that the resolvent of the proof is directly represented as the
Prolog resolvent. This allows us to exploit the Prolog stack for depth- rst
exploration of the tree of states. More importantly, this means that we extensively
reuse the Prolog machinery, and that built-in predicates in the host Prolog
system can be called from the user's Abductive Logic Programs. We remark again
that this feature comes for free together with the CHR implementation, and
is not easily available in metainterpreter-based implementations of abductive
proof-procedures.</p>
        <p>
          In the same way, the constraint store of the constrained abductive
proofprocedure3 is represented as the union of the CLP constraint stores. For the
implementation of the proof-procedure, we used the CLP(FD) and CLP(B)
libraries, available both on SICStus [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ] and SWI Prolog [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ] We also have a
3 This constraint store, which contains CLP constraints over variables, should not be
confused with the CHR constraint store, which is used for the implementation of the
other data structures.
        </p>
        <p>
          CHR-based solver on nite and in nite domains, and we de ned an ad-hoc solver
for rei ed uni cation. Recently, the interface between SCIFF and the constraint
solver has been re-engineered, and now it allows the developer to adopt any
constraint solver that implements a given interface. In this way, the user can choose
for each application which solver he/she wants to use; moreover, new solvers
can be added with very limited e ort. For example, the constraint solver on the
reals, CLP(R) [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ] has been integrated into SCIFF: the new solver is based on
the simplex algorithm (plus branch-and-bound), which is very e cient for linear
constraints.
        </p>
        <p>
          To the best of our knowledge, the other abductive proof-procedures
implemented in CHR map abducibles to CHR constraints. Integrity constraints,
instead, are often represented as CHR rules (typically, propagation rules) [
          <xref ref-type="bibr" rid="ref13 ref15">13, 15</xref>
          ].
Since a propagation CHR can have only CHR constraints in the multiple heads,
the corresponding abductive proof-procedure can contain only abducibles in the
precondition. This limitation forbids in the proof-procedure the implementation
of default negation, that was one of the main motivations behind Abductive
Logic Programming [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. The operational semantics is then an extension of the
operational semantics of CHR.
        </p>
        <p>
          SCIFF was developed following a di erent idea: we wanted increased
exibility in our language, while retaining the features that come for free with the CHR
implementation. We rst de ned the declarative and operational semantics of
SCIFF as extensions of the IFF [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. The operational semantics is given through
a set of transitions that transform a state into another. The implementation,
which maps integrity constraints, as well as the other relevant data strutures, to
CHR constraints (rather than CHR rules) and transitions to CHR rules, follows
the operational semantics very closely.
        </p>
        <p>
          In the following, we rst show some examples of transitions; the interested
reader can nd the complete list of transitions in a previous publication [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ],
together with the proofs of soundness and completeness of the SCIFF
proofprocedure. We then describe the implementation of some transitions in
Section 4.2.
4.1
        </p>
        <p>Examples of transitions</p>
      </sec>
      <sec id="sec-3-3">
        <title>Given an abducible a(X) and an integrity constraint</title>
        <p>a(Y ) ^ p(Z) ^ Y &gt; Z ! r(Z)
transition propagation generates the following implication (that we call Partially
Solved Integrity Constraint or PSIC for short):</p>
        <p>X = Y ^ p(Z) ^ Y &gt; Z ! r(Z)
(8)
Now, a transition case analysis generates two nodes of an OR-tree: in the rst
we consider the case X = Y , so the previous implication is transformed into
p(Z) ^ X &gt; Z ! r(Z);
in the second node, we consider the case that X 6= Y , and in this case the
implication (8) is already satis ed.</p>
        <p>Suppose we choose the rst node, and that the knowledge base contains the
de nition of predicate p(Z), e.g., as a fact p(1). Transition unfolding generates
the following implication:</p>
        <p>X &gt; 1 ! r(1)
Now, case analysis is again applied to the implication: in the rst node we
consider the case X &gt; 1, while in the second X 1. In the rst case, the goal
r(1) is invoked.</p>
        <p>These are just some examples of the transitions. SCIFF contains
transitions for handling correctly the various items (abducibles, expectations,
happened events, CLP constraints, negation by default, explicit negation, etc.) in
the SCIFF language.
4.2</p>
        <p>CHR implementation
The implementation of the transitions in CHR follows very closely the
operational semantics. The various types of data are mapped to CHR constraints,
while the transitions are mapped into CHR rules. For example, abducibles are
represented as abd(X); this means that abducibles can be directly used in the
knowledge base, and CHR will take care of all the machinery necessary to abduce
a new literal and propagate its consequences. For example, the clause
can be written as</p>
      </sec>
      <sec id="sec-3-4">
        <title>A (partially solved) integrity constraint</title>
        <p>g(X) : a(X); b:
g(X) :- abd(a(X)), b.</p>
        <p>a(X) ^ p(Y ) ! r(Z) _ q(Z)
is mapped to the CHR constraint</p>
        <p>psic([abd(a(X)),p(Y)],(r(Z);q(Z))):</p>
        <p>As a rst attempt, the propagation transition (together with case analysis)
can be implemented via the CHR rule
abd(X), psic([abd(Y)|Rest],Head)</p>
        <p>
          ==&gt;
copy(psic([abd(Y)|Rest],Head),psic([abd(Y1)|Rest1],Head1)),
reif_unify(X,Y1,B),
(B#=1, psic(Rest1,Head1) ; B#=0).
(9)
where copy performs a renaming of an atom (which also considers the various
types of quanti cation in the SCIFF [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ], as well as CLP constraints attached
to the variables), #= is the nite domain equality constraint and reif_unify is
a CHR implementation of rei ed uni cation [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ].
        </p>
        <p>reif_unify is a CHR constraint that declaratively imposes that either B = 1
and the rst two arguments unify, or B = 0 and the two atoms do not unify; in
logics, reif_unify(X,Y,B) is true i</p>
        <p>X = Y $ B = 1:</p>
        <p>Note that some of the details are taken care of directly by CHR: if we have
a set of abducibles and a set of PSICs we do not have to remember explicitly
which PSICs have been tried with which abducibles (in order to avoid loops), as
CHR itself does this work.</p>
        <p>Note also that propagation is attempted only with the rst element of the
partially solved integrity constraint's antecedent, but this does not impact on
what integrity constraints will be completely solved. For instance, given the
integrity constraint a; b ! c, if b and a are abduced in sequence, b will not
be propagated as soon as it is abduced, but only after a has been abduced and
propagated, and the partially solved integrity constraint b ! c has been added
to the constraint store; in the end, c will be abduced anyway. In this way, we
ensure that each atom is propagated only once with each integrity constraint,
without a need to keep track of previous propagations.</p>
        <p>A number of improvements can be done to rule (9). First of all, CHR uses
e cient indexing and hash tables to avoid checking all the possible pairs of CHR
constraints. Sadly, rule (9) does not exploit such features of CHR. Note that the
constraints in the antecedent of the propagation CHR do not share any variable,
thus the CHR engine has to try each possible pair of constraints of types abd
and psic, while, intuitively, one should try only those pairs whose arguments
may unify. A rst idea would be to rewrite the transition as:
abd(X), psic([abd(X)|Rest],Head)</p>
        <p>==&gt; ...
which would use CHR hash tables much more e ciently, but it would propagate
only when the arguments are already ground or bound to the same term. This
would be a very lazy propagation, that does not exploit the rei ed uni cation
algorithm.</p>
        <p>However, since abducibles are atoms, they always have a main functor, thus
the argument of abd is always a term, which can contain variables, but it cannot
be a variable itself. It is sensible to exploit the main functor for improving
the selection of candidates. We represent each abducible as a CHR constraint
with two arguments, where the rst argument contains a ground term used to
improve the hashing: in the current implementation, it is a list containing the
main functor and its arity. The code for abducing an atom X is then:
abd(X) :- functor(X,F,A), abd([F,A],X).</p>
        <p>Now, the propagation transition can be implemented with the CHR propagation
rule:
abd(F,X), psic([abd(F,Y)|Rest],Head)
==&gt;
fn_ok(X,Y) |
copy(psic([abd(Y)|Rest],Head),psic([abd(Y1)|Rest1],Head1)), (10)
reif_unify(X,Y1,B),
(B#=1, psic(Rest1,Head1) ; B#=0).
i.e., only those pairs with identical rst argument (i.e., abducibles that share the
same functor and arity) are tried. fn_ok is a predicate that checks if the two
arguments can possibly unify, and is also used for improving e ciency.</p>
        <p>Many of the transitions of SCIFF open a choice point, as we can see from
the example of Eq. (10). However, in case reif_unify immediately yields 0
or 1, there is no point in opening a choice point. Otherwise, one could delay
the disjunction, in order to open choice points as late as possible, hoping that
other transitions might constrain the value of the B variable, possibly making it
ground. In other words, it would be more desirable to delay as much as possible
the non-deterministic transitions (those opening choice points), while expediting
the deterministic ones (those that do not open choice points). One reason is
that the deterministic may fail, and in this case the choice points opened by
nondeterministic choices would be useless.</p>
        <p>In order to implement the delay mechanism, we de ned a CHR constraint
'nondeterministic' that holds, as argument, a non-deterministic goal. In the
previous example, the propagation transition is actually rewritten as
abd(F,X), psic([abd(F,Y)|Rest],Head)
==&gt;
fn_ok(X,Y) |
copy(psic([abd(Y)|Rest],Head),psic([abd(RenY)|RenRest],RenHead)),
reif_unify(X,RenY,B),
(B == 1 -&gt; psic(RenRest,RenHead) ;</p>
        <p>B == 0 -&gt; true ;
nondeterministic((B#=1, psic(RenRest,RenHead)) ; B#=0)).
i.e., we check if rei ed uni cation imposed a value on the boolean variable B, and
we open a choice point only in case it did not. The choice point is not actually
opened immediately, but it is declared in a CHR constraint.</p>
        <p>
          Then, we de ned a set of CHRs for dealing with nondeterministic
constraints. We alternate a deterministic and a non-deterministic phase: initially, in
the derivation, only deterministic transitions can be activated. Later, when the
xed point of the deterministic ones is reached, one non-deterministic transition
can be applied, and we return to the deterministic phase. In CHR:
switch2det @ phase(nondeterministic), nondeterministic(G) &lt;=&gt;
call(G),
phase(deterministic).
switch2nondet @ phase(deterministic) &lt;=&gt; phase(nondeterministic).
where rule switch2nondet should be one of the last rules to be tried.
Transition Unfolding. Di erently from HYPROLOG [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ], integrity constraints
can involve literals built on de ned predicates. This allows for a sound treatment
of default negation: a negative literal not(a) is converted into an implication
a ! f alse. Given a PSIC whose body contains a literal of a predicate de ned
in the KB, transition unfolding unfolds the literal:
psic([Atom|Rest],Head) &lt;=&gt;
is_defined_literal(Atom) |
findall(clause(Atom,Body),clause(Atom,Body),Clauses),
unfold(Clauses,psic([Atom|Rest],Head)).
unfold([],_).
unfold([clause(Atom,Body)|Clauses],psic([Atom1|Rest1],Head1)):ccopy(psic([Atom1,Rest1],Head1),psic([Atom2|Rest2],Head2)),
Atom = Atom2,
append(Body,Rest2,NewBody),
psic(NewBody,Head2),
unfold(Clauses,psic([Atom1|Rest1],Head1)).
        </p>
        <p>This might pose problems of termination: if the unfolded predicate is
recursive, there exists an in nite branch in the derivation. For example, consider the
IC:
a(List); member(T erm; List) ! b(T erm)
(11)
with the knowledge base:
member(X; [XjT ]):
member(X; [Y jT ]) : member(X; T ):
g : a([1; 2; 3]):
Intuitively, the goal g is true provided that we abduce a([1; 2; 3]) and b(1), b(2),
b(3). However, if we unfold predicate member in the IC (11) before the atom
a([1; 2; 3]) was abduced, the unfolding generates an in nite number of
implications. For this reason, early versions of SCIFF delay the unfolding after the
other transitions, in the hope of binding some of the variables. In this particular
example, if member is unfolded only after a([1; 2; 3]) is abduced, the number of
implications generated is equal to the number of elements in the list L, which is
nite.</p>
        <p>However, in other cases de ned predicates provide just the value of a
parameter, in this example, a deadline:
start(a; Ta) ^ deadline(D) ! end(b; Tb) ^ Tb
The knowledge base contains a simple fact deadline(5) stating that the deadline
is 5 time units. In this case, if the unfolding of deadline is postponed after
propagation of the start(a; Ta) event, it is repeated as many times as the number
of start atoms that will be abduced, which might be a big number. For this
reason, recent versions of SCIFF unfold eagerly the predicates de ned only by
facts, and lazily the other predicates.</p>
        <p>
          Results. The e ciency of SCIFF has greatly improved with respect to earlier
versions [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ]. The following experiments were run on a 1.5GHz Pentium M 715
processor, 512MB RAM computer running SICStus 4.0.7.
        </p>
        <p>Experiment
Auction Protocol
Block World
AlLoWS Feeble conformance
AlLoWS non-conformant</p>
        <p>
          The aim of these experiments is not to compete with other abductive
proofprocedures, but to show the improvements obtained taking into consideration the
features of CHR. The version 2011 features improved hashing, eager unfolding,
and other minor improvements. The experiments are real-life applications that
we developed in SCIFF: the proof of conformance of agents to an auction
protocol, planning in the abductive event calculus, and AlLoWS [
          <xref ref-type="bibr" rid="ref28">28</xref>
          ], a system based
on SCIFF for the conformance veri cation of web services to choreographies.
From a software engineering perspective, since its rst prototypical
implementation [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ] SCIFF has been greatly improved, and it is now a fully edged
development system (see Fig. 1). An integrated development environment for
SCIFF ALPs, implemented as an Eclipse plugin, is now available. Through a
RuleML parser, ALPs can be obtained dynamically from the web. Animations
of the output are possible through Scalable Vector Graphics (SVG), the W3C
standard for vector graphics and animations. A Graphical User Interface
displays relevant information to the user [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. Facts can be added dynamically from
a number of sources, including Linda blackboards, Apache log les, Jade Sni er
Agent output.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Related work</title>
      <p>
        The SCIFF abductive framework is derived from the IFF proof procedure [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ],
which it extends in several directions: dynamic update of the knowledge base by
Fig. 1. Architecture of the SCIFF system, illustrating some of the available inputs and
outputs.
happening events, con rmation and discon rmation of hypotheses, hypotheses
with universally quanti ed variables, CLP constraints. Many other abductive
proof-procedures have been proposed in the past; the interested reader can refer
to the exhaustive survey by Kakas et al. [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ].
      </p>
      <p>
        Other proof-procedures deal with constraints; in particular we mention ACLP
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and the A-system [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], which are deeply focussed on e ciency issues.
      </p>
      <p>
        Some conspicuous work has been done with the integration of the IFF
proofprocedure with constraints [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Endriss et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] present an implementation
of an abductive proof-procedure that extends IFF [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] in two ways: by dealing
with constraint predicates and with non-allowed abductive logic programs. The
cited work, however, does not deal with con rmation and discon rmation of
hypotheses and universally quanti ed variables in abducibles, as ours does.
      </p>
      <p>All of these proof-procedures are implemented as Prolog meta-interpreters.
However, we believe that a CHR implementation has features that a
metainterpreted version cannot have, as we explained in the introduction.</p>
      <p>
        Abdennadher and Christiansen [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and Christiansen and Dahl [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ] propose
to exploit the CHR language to extend SICStus Prolog to support abduction
more e ciently than with metainterpretation-based solutions. They represent
abducibles as CHR constraints as we do, but they represent integrity constraints
directly as CHR propagation rules, using the built-in CHR matching mechanism
for propagation: this does not seem possible in our framework, in which we pose
no limitations on the type of literals that occur in the conditions of integrity
constraints. We also experimented with a similar implementation [
        <xref ref-type="bibr" rid="ref14 ref16">14, 16</xref>
        ], but
it proved insu cient for our needs, as we needed a sound treatment of default
negation and more exibility in the quanti cation of variables.
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and future work</title>
      <p>
        In this paper, we have presented the implementation of an abductive
proofprocedure in CHR. We believe that the use of CHR in writing abductive
proofprocedures has several advantages, compared to traditional approaches based
on meta-interpretation. The rst advantage is that SCIFF bene ts immediately
from new implementations and improvements of CHR engines [
        <xref ref-type="bibr" rid="ref17 ref31 ref32">31, 32, 17</xref>
        ].
Another advantage is that the proof-procedure does not require meta-interpretation,
which lets the user invoke built-in Prolog (meta)predicates within an Abductive
Logic Program, without the need of contemplating explicitly their occurrence
in the meta-interpreter. Also, Prolog is an instance of ALP (that does not use
abduction): in SCIFF, a Prolog program that does not use abduction runs at
full speed, without the overhead of meta-interpretation.
      </p>
      <p>An interesting extension of this work would be to integrate the two main
ideas for implementing abduction in CHR in a unique framework. Each of the
ideas have their own pros and cons: HYPROLOG, that implements integrity
constraints as CHR rules, has less overhead, while SCIFF, that maps integrity
constraints into CHR constraints, is able to deal with default negation and is
provably sound and complete. We are currently studying the idea of selecting
syntactically the integrity constraints in an ALP in a preprocessing phase, and
implementing each in the most e cient possible way, i.e., as CHR rules,
whenever possible, or as CHR constraints when they contain de ned predicates or
CLP(FD) constraints.</p>
      <p>Concerning con rmation, there are many possible extensions of this work,
which we intend to pursue in the future. For instance, it would be worthwhile
to let the user impose the failure of a branch of the reasoning tree, regardless
of the con rmation or discon rmation of the hypotheses made in the branch, in
order to explore branches that the user nds more promising. We also intend
to support a breadth- rst exploration of the computation tree, as an alternative
to the depth- rst exploration of the current implementation. Besides, we believe
that the formal framework would bene t from the introduction of a formalism
to express priorities among the possible alternative hypotheses, in a given state
of the computation.</p>
      <p>
        Another direction of improvement could be towards better computational
performance, possibly exploiting alternative e cient CHR implementations, such
as the one proposed by Wolf [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ].
      </p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>This work has been supported by the European Commission within the e-Policy
project (n. 288147).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Hartshorne</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weiss</surname>
          </string-name>
          , P., eds.:
          <source>Collected Papers of Charles Sanders Peirce</source>
          ,
          <year>1931</year>
          {
          <year>1958</year>
          . Volume 2. Harvards University Press (
          <year>1965</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Eshghi</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Abductive planning with the event calculus</article-title>
          .
          <source>In: Logic Programming</source>
          ,
          <source>Proceedings of the Fifth International Conference and Symposium</source>
          , Seattle, Washington, Cambridge, MA, MIT Press (
          <year>1988</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Alberti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chesani</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gavanelli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mello</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torroni</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Compliance veri cation of agent interaction: a logic-based tool</article-title>
          .
          <source>Applied Arti cial Intelligence</source>
          <volume>20</volume>
          (
          <year>2006</year>
          )
          <volume>133</volume>
          {
          <fpage>157</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kakas</surname>
            ,
            <given-names>A.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kowalski</surname>
            ,
            <given-names>R.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toni</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Abductive Logic Programming</article-title>
          .
          <source>Journal of Logic and Computation</source>
          <volume>2</volume>
          (
          <year>1993</year>
          )
          <volume>719</volume>
          {
          <fpage>770</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Denecker</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schreye</surname>
          </string-name>
          , D.D.:
          <article-title>SLDNFA: an abductive procedure for abductive logic programs</article-title>
          .
          <source>Journal of Logic Programming</source>
          <volume>34</volume>
          (
          <year>1998</year>
          )
          <volume>111</volume>
          {
          <fpage>167</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Kakas</surname>
            ,
            <given-names>A.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Michael</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mourlas</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>ACLP: Abductive Constraint Logic Programming</article-title>
          .
          <source>Journal of Logic Programming</source>
          <volume>44</volume>
          (
          <year>2000</year>
          )
          <volume>129</volume>
          {
          <fpage>177</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Fung</surname>
            ,
            <given-names>T.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kowalski</surname>
            ,
            <given-names>R.A.</given-names>
          </string-name>
          :
          <article-title>The IFF proof procedure for abductive logic programming</article-title>
          .
          <source>Journal of Logic Programming</source>
          <volume>33</volume>
          (
          <year>1997</year>
          )
          <volume>151</volume>
          {
          <fpage>165</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Kakas</surname>
            , A.C., van Nu elen,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Denecker</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A-System: Problem solving through abduction</article-title>
          . In Nebel, B., ed.
          <source>: Proceedings of the Seventeenth International Joint Conference on Arti cial Intelligence</source>
          , Seattle, Washington, USA (IJCAI-01), Seattle, Washington, USA, Morgan Kaufmann Publishers (
          <year>2001</year>
          )
          <volume>591</volume>
          {
          <fpage>596</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Eshghi</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kowalski</surname>
            ,
            <given-names>R.A.</given-names>
          </string-name>
          :
          <article-title>Abduction compared with negation by failure</article-title>
          . In Levi, G.,
          <string-name>
            <surname>Martelli</surname>
          </string-name>
          , M., eds.
          <source>: Proceedings of the 6th International Conference on Logic Programming</source>
          , Cambridge, MA, MIT Press (
          <year>1989</year>
          )
          <volume>234</volume>
          {
          <fpage>255</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Endriss</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mancarella</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sadri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Terreni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toni</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The CIFF proof procedure for abductive logic programming with constraints</article-title>
          . In Alferes,
          <string-name>
            <given-names>J.J.</given-names>
            ,
            <surname>Leite</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.A</surname>
          </string-name>
          ., eds.
          <source>: Proc. JELIA 2004</source>
          .
          <article-title>Volume 3229 of LNAI</article-title>
          ., Springer-Verlag (
          <year>2004</year>
          )
          <volume>31</volume>
          {
          <fpage>43</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kowalski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toni</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wetzel</surname>
          </string-name>
          , G.:
          <article-title>Executing suspended logic programs</article-title>
          .
          <source>Fundamenta Informaticae</source>
          <volume>34</volume>
          (
          <year>1998</year>
          )
          <volume>203</volume>
          {
          <fpage>224</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. Fruhwirth, T.:
          <article-title>Theory and practice of constraint handling rules</article-title>
          .
          <source>Journal of Logic Programming</source>
          <volume>37</volume>
          (
          <year>1998</year>
          )
          <volume>95</volume>
          {
          <fpage>138</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Abdennadher</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Christiansen</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          :
          <article-title>An experimental CLP platform for integrity constraints and abduction</article-title>
          . In Larsen, H.,
          <string-name>
            <surname>Kacprzyk</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zadrozny</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Andreasen</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Christiansen</surname>
          </string-name>
          , H., eds.: FQAS,
          <article-title>Flexible Query Answering Systems</article-title>
          . LNCS, Warsaw, Poland, Springer-Verlag (
          <year>2000</year>
          )
          <volume>141</volume>
          {
          <fpage>152</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Gavanelli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mello</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Milano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torroni</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Interpreting abduction in CLP</article-title>
          . In
          <string-name>
            <surname>Buccafurri</surname>
          </string-name>
          , F., ed.
          <source>: APPIA-GULP-PRODE Joint Conference on Declarative Programming</source>
          , Reggio Calabria, Italy, Universita Mediterranea di Reggio Calabria (
          <year>2003</year>
          )
          <volume>25</volume>
          {
          <fpage>35</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Christiansen</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dahl</surname>
          </string-name>
          , V.:
          <article-title>HYPROLOG: A new logic programming language with assumptions and abduction</article-title>
          . In Gabbrielli,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Gupta</surname>
          </string-name>
          , G., eds.
          <source>: Proc. ICLP 2005</source>
          .
          <article-title>Volume 3668 of LNCS</article-title>
          ., Springer (
          <year>2005</year>
          )
          <volume>159</volume>
          {
          <fpage>173</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Alberti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chesani</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daolio</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gavanelli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mello</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torroni</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Speci cation and veri cation of agent interaction protocols in a logic-based system</article-title>
          .
          <source>Scalable Computing: Practice and Experience</source>
          <volume>8</volume>
          (
          <year>2007</year>
          )
          <volume>1</volume>
          {
          <fpage>13</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Schrijvers</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Demoen</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>The K.U. Leuven CHR system: implementation and application</article-title>
          . In Frhwirth, T.,
          <string-name>
            <surname>Meister</surname>
          </string-name>
          , M., eds.
          <source>: Proc. CHR'04</source>
          ,
          <string-name>
            <surname>Ulm</surname>
          </string-name>
          , Germany (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Alberti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chesani</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gavanelli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mello</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torroni</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Veri able agent interaction in abductive logic programming: the SCIFF framework</article-title>
          .
          <source>ACM Transactions on Computational Logic</source>
          <volume>9</volume>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. Burckert, H.:
          <article-title>A resolution principle for constrained logics</article-title>
          .
          <source>Arti cial Intelligence</source>
          <volume>66</volume>
          (
          <year>1994</year>
          )
          <volume>235</volume>
          {
          <fpage>271</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Ja</surname>
            <given-names>ar</given-names>
          </string-name>
          , J.,
          <string-name>
            <surname>Maher</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>Constraint logic programming: a survey</article-title>
          .
          <source>Journal of Logic Programming</source>
          <volume>19</volume>
          -
          <fpage>20</fpage>
          (
          <year>1994</year>
          )
          <volume>503</volume>
          {
          <fpage>582</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Alberti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gavanelli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mello</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torroni</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Speci cation and veri cation of agent interactions using social integrity constraints</article-title>
          .
          <source>Electronic Notes in Theoretical Computer Science</source>
          <volume>85</volume>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Alberti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gavanelli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mello</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torroni</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>An Abductive Interpretation for Open Agent Societies</article-title>
          . In Cappelli,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Turini</surname>
          </string-name>
          , F., eds.:
          <source>AI*IA</source>
          <year>2003</year>
          :
          <article-title>Advances in Arti cial Intelligence, Proceedings of the 8th Congress of the Italian Association for Arti cial Intelligence, Pisa</article-title>
          . Volume
          <volume>2829</volume>
          of Lecture Notes in Arti cial Intelligence., Springer-Verlag (
          <year>2003</year>
          )
          <volume>287</volume>
          {
          <fpage>299</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Carlsson</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , et al.:
          <article-title>SICStus Prolog user's manual</article-title>
          . Swedish Institute of Computer Science, Kista,
          <source>Sweden. 4.0.7 edn</source>
          . (
          <year>2009</year>
          )
          <article-title>www</article-title>
          .sics.se/sicstus/.
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Wielemaker</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schrijvers</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Triska</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lager</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>SWI-Prolog</article-title>
          .
          <article-title>Theory and Practice of Logic Programming (</article-title>
          <year>2011</year>
          ) http://arxiv.org/abs/1011.5332.
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Holzbaur</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>OFAI clp(q,r) Manual</article-title>
          . Austrian Research Institute for Arti cial Intelligence, Vienna. 1.
          <issue>3</issue>
          .3 edn. (
          <year>1995</year>
          ) TR-
          <volume>95</volume>
          -09.
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26. Nu elen,
          <string-name>
            <surname>B.V.</surname>
          </string-name>
          :
          <article-title>Abductive Constraint Logic Programming: Implementation and Applications</article-title>
          .
          <source>PhD thesis</source>
          , Katholieke Universiteit Leuven (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Alberti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chesani</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gavanelli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <article-title>The CHR-based Implementation of a System for Generation and Con rmation of Hypotheses</article-title>
          .
          <source>Number</source>
          <year>2005</year>
          -01 in Ulmer Informatik-Berichte (
          <year>2005</year>
          )
          <volume>111</volume>
          {
          <fpage>122</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Alberti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chesani</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gavanelli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mello</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Montali</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>An abductive framework for a-priori veri cation of web services</article-title>
          . In Maher, M., ed.
          <source>: Proceedings of the Eighth Symposium on Principles and Practice of Declarative Programming, July 10-12</source>
          ,
          <year>2006</year>
          , Venice, Italy, New York, USA, Association for Computing Machinery (ACM),
          <source>Special Interest Group on Programming Languages (SIGPLAN)</source>
          , ACM Press (
          <year>2006</year>
          )
          <volume>39</volume>
          {
          <fpage>50</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Kakas</surname>
            ,
            <given-names>A.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kowalski</surname>
            ,
            <given-names>R.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toni</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The role of abduction in logic programming</article-title>
          . In Gabbay,
          <string-name>
            <given-names>D.M.</given-names>
            ,
            <surname>Hogger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.J.</given-names>
            ,
            <surname>Robinson</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.A</surname>
          </string-name>
          ., eds.:
          <article-title>Handbook of Logic in Arti cial Intelligence and Logic Programming</article-title>
          . Volume
          <volume>5</volume>
          ., Oxford University Press (
          <year>1998</year>
          )
          <volume>235</volume>
          {
          <fpage>324</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Christiansen</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dahl</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Assumptions and abduction in Prolog</article-title>
          . In Mun~ozHernandez,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Gomez-Perez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.M.</given-names>
            ,
            <surname>Hofstedt</surname>
          </string-name>
          , P., eds.
          <source>: Workshop on Multiparadigm Constraint Programming Languages (MultiCPL'04)</source>
          , Saint-Malo, France (
          <year>2004</year>
          ) Workshop notes.
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Holzbaur</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , Fruhwirth, T.:
          <article-title>Compiling constraint handling rules into Prolog with attributed variables</article-title>
          . In Nadathur, G., ed.
          <source>: PPDP</source>
          . (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          32.
          <string-name>
            <surname>Wolf</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Adaptive constraint handling with CHR in Java</article-title>
          . In Walsh, T., ed.:
          <source>Principles and Practice of Constraint Programming - CP 2001. Volume 2239 of Lecture Notes in Computer Science</source>
          .,
          <string-name>
            <surname>Paphos</surname>
          </string-name>
          , Cyprus, Springer Verlag (
          <year>2001</year>
          )
          <volume>256</volume>
          {
          <fpage>270</fpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>