<!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>Query Answering in Resource-Based answer set semantics?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Stefania Costantini</string-name>
          <email>stefania.costantini@univaq.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Formisano</string-name>
          <email>formis@dmi.unipg.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DISIM, Universita` di L'Aquila</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>DMI, Universita` di Perugia</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <fpage>69</fpage>
      <lpage>83</lpage>
      <abstract>
        <p>In recent work, we defined Resource-Based answer set semantics, which is an extension to traditional answer set semantics stemming from the study of its relationship with linear logic. In this setting there are no inconsistent programs, and constraints are defined “per se” in a separate layer. In this paper, we propose a query-answering procedure reminiscent of Prolog for answer set programs under this extended semantics.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        1 Introduction
Answer set programming (ASP) is nowadays a well-established and successful
programming paradigm based upon answer set semantics [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1, 2, 3</xref>
        ], with applications in
many areas (cf., e.g., [
        <xref ref-type="bibr" rid="ref4 ref5 ref6">4, 5, 6</xref>
        ] and the references therein). Nevertheless, as noted in
[
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ], few attempts to construct a goal-oriented proof procedure exist. Rather, an
ASPsolver is used (see [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]) to find the answer sets, if any exists. This is due to the very
nature of the answer set semantics, where a program may admit none or several answer
sets, and where the semantics enjoys no locality, or, better, no relevance in the sense of
[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]: i.e., no subset of the given program can in general be identified, from where the
decision of atom A (intended as a goal, or query) belonging or not to some answer set
can be drawn. The work of [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] suggests an incremental construction of approximations
of answer sets, so as to provide local computations and top-down query answering. A
sound and complete proof procedure for the approach is provided. The work of [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] can
be used with non-ground queries and with non-ground, and possibly infinite, programs.
Soundness and completeness results are proved for large classes of logic programs.
      </p>
      <p>However, another problem related to goal-oriented answer-set-based computation
is that of repeated queries. Assume that one would be able to pose a query ? Q1
receiving an answer “yes”, to signify that Q1 is entailed by some answer set of given
program ⇧ . Presumably, one might intend subsequent queries to be answered in the
same context, i.e., a subsequent query ? Q2 might reasonably ask whether some of
the answer sets entailing Q1 also entail Q2. This might go on until the user explicitly
“resets” the context. Such an issue, though reasonable in practical applications, has been
hardly addressed up to now, due to the semantic difficulties that we have mentioned.</p>
      <p>
        In recent work, stemming from our research on RASP [
        <xref ref-type="bibr" rid="ref11 ref12 ref13">11, 12, 13</xref>
        ], which is a
recent extension of ASP, obtained by explicitly introducing the notion of resource, we
? This research will be presented at the ASPOCP14 workshop. This research is partially
supported by GNCS-13 and GNCS-14 projects.
proposed in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] a comparison between RASP, ASP and linear logic [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. For
establishing this correspondence, we introduced a RASP and linear-logic modeling of
default negation as understood under the answer set semantics. This led to the definition
of an extension to the answer set semantics which we called Resource-Based answer
set semantics (RAS) [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. This extension finds an alternative equivalent definition in a
variation of the auto-epistemic logic characterization of answer set semantics discussed
in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. In resource-based answer set semantics we have no inconsistent programs, and
constraints are defined “per se” in a separate layer.
      </p>
      <p>
        This allows us to propose here top-down procedure for the new semantics which,
via a form of tabling, also provides contextualization. Differently from [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], this
procedure does not require actual incremental answer set construction when answering a
query. Rather, it exploits the fact that resource-based answer set semantics enjoys the
property of relevance [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] (where answer set semantics does not), which guarantees
that truth value of an atom can be established on the basis of the subprogram it depends
upon, and thus allows for top-down computation starting from a query. As answer set
semantics and resource-based answer set semantics extend the well-founded semantics
[
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], we take as a starting point XSB-resolution [
        <xref ref-type="bibr" rid="ref19 ref20">19, 20</xref>
        ], an efficient, fully described
and fully implemented procedure which is correct and, for the class programs
considered in the answer set semantics, always complete w.r.t. the well-founded semantics of
given program. In this paper we do not provide the full detail of the proposed procedure,
which we call RAS-XSB-resolution. In fact, this would imply suitably extending and
reworking all definitions related to XSB. We rather lay the foundation, however with a
precision and formality that should be sufficient to allow such a refinement as the next
step. We also provide formal properties of the proposed procedure.
      </p>
      <p>
        Notice that RAS-XSB resolution can be used for “traditional” answer set
programming under the software engineering discipline of dividing the program into a
consistent “base” level and a “top” level including constraints. Therefore, even to readers not
particularly interested in the new semantics, the paper proposes a full top-down
queryanswering procedure for ASP, though applicable with previously mentioned
(reasonable) limitation. With respect to top-down procedure proposed [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], we do not aim at
managing function symbols (and thus programs with infinite grounding), so under this
extent our work is more limited. However, we get correctness and completeness for
every program (under the new semantics).
      </p>
      <p>
        In the rest of the paper, after a short introduction of the answer set semantics we
summarize resource-based answer set semantics. We then proceed to present the
original contributions of this paper, that consist in introducing some useful properties of
RAS, and in the definition of RAS-XSB-resolution. Background notions which are
useful for a better understanding and proof of the main theorem are provided in the
extended version of this paper, available online [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ].
2
      </p>
      <p>
        Background on ASP
In the Answer Set Semantics (originally named “stable model semantics”), a (logic)
program ⇧ (cf., [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]) is a collection of rules of the form H L1, . . . , Ln. where H is
an atom, n 0 and each literal Li is either an atom Ai or its default negation not Ai.
An answer set program can be seen as a Datalog program with negation (cf. [
        <xref ref-type="bibr" rid="ref22 ref23">22, 23</xref>
        ]
for definitions about logic programming and Datalog). In what follows, unless
explicitly differently specified we refer to ground programs, i.e., programs not containing
variables. Below is the specification of the answer set semantics, reported from [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
Definition 1. Given ASP program ⇧ and set of atoms I, the operator performs the
following steps: (a) Computes the reduct ⇧ I of ⇧ , by:
(1) removing from ⇧ all rules which contain a negative premise not A such that A 2 I;
(2) removing from the remaining rules those negative premises not A such that A 62 I;
notice that ⇧ I is a positive logic program.
(b) Computes the Least Herbrand Model of ⇧ I , denoted as ⇧ (I).
      </p>
      <p>Definition 2. A set of atoms I is an answer set for a program ⇧ iff ⇧ (I) = I.</p>
      <p>
        Answer sets are minimal supported models of the program interpreted in the obvious
way as a first-order theory ( stands for implication, comma for conjunction and not
for classical negation). It will be useful in what follows to consider a simple property
of ⇧ (see [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ]): if M is a minimal model of ⇧ , then, ⇧ (M ) ✓ M .
      </p>
      <p>In the answer set semantics, a rule of the form L1, . . . , Ln. is called constraint,
and states that the Lis cannot be all true w.r.t. any answer set. It is rephrased into a
standard rule Q not Q, L1, . . . , Ln. with Q fresh atom, as a contradiction on Q
leads to inconsistency, i.e., non-existence of answer sets (which in fact can in general
be several, one, or none) unless one of the Lis is false.</p>
      <p>In this paper we refer for lack of space to the basic version of the answer set
semantics. Therefore, we do not consider the various extensions and useful programming
constructs that have appeared in the wide existing literature about ASP.
3</p>
      <p>
        Resource-Based answer set semantics
In this section we introduce a formal definition of resource-based answer set semantics,
which is needed in order to be able to define the proposed proof procedure and prove
its properties. However, some preliminary observations are in order so as to explain
why resource-based answer set semantics is reasonable, and might possibly be adopted
as a proper extension of the answer set semantics. As it is well-known, the answer set
semantics extends the well-founded semantics [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], which assigns to a logic program ⇧
a unique, three-valued model, called well-founded model and denoted by WFS (⇧ ) =
hW +, W i, where W + and W are disjoint. In particular, W + is the set of atoms
deemed true, W is the set of atoms deemed false, while atoms belonging to neither
set are deemed undefined. Atoms with truth value ‘undefined’ under the well-founded
semantics are exactly the atoms which are of interest for finding the answer sets, and
are, in particular, atoms involved in negative cycles, i.e. cycles through negation (as
extensively discussed, e.g., in [
        <xref ref-type="bibr" rid="ref24 ref25 ref26">24, 25, 26</xref>
        ] and in the references therein).
      </p>
      <p>In particular, the answer set semantics selects some of the (two-valued) classical
models of given program so as for each atom A which is true w.r.t. an answer set M ,
two conditions hold: (i) A is supported in M by some rule of the given program; (ii) the
support of A does not depend (directly or indirectly) upon the negation of another true
atom, including itself. For even cycles3 such as {e not f. f not e.}, two answer
sets can be found, namely {e} and {f }, respecting both conditions. This extends to
wider program including such cycles. For odd cycles (such as unary odd cycles of the
form {p not p.} and ternary odd cycles of the form {a not b. b not c. c
not a.}) it is not possible to assign truth values to their composing atoms in classical
models. Thus, under the answer set semantics a program including such cycles is
inconsistent, i.e., it has no answer sets4. In a sense, the answer set semantics is still
threevalued, as sometimes it is able to assign truth value to atoms, and sometimes (when the
program is inconsistent) leaves them all undefined.</p>
      <p>Resource-based answer set semantics is able to cope with any kind of cycle, and
always assigns a truth value to all atoms while fulfilling conditions (i) and (ii). This
by resorting to supported subsets of classical models. For the unary odd cycle, p is
deemed to be false because were it true, it would depend upon the negation of a true
atom (itself). The ternary odd cycle has the three resource-based answer sets {a}, {b}
and {c}. Taking for instance {a}, atom b must be false to fulfill condition (i), and atom
c must be false to fulfill condition (i) for itself and (ii) for a.</p>
      <p>
        Logical foundations of resource-based answer set semantics are discussed in depth
in [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ]. A characterization can be obtained by elaborating the auto-epistemic-logic
characterization of answer set semantics discussed in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. Intuitively (for precise definitions
please refer to [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ]), a rule A A1, . . . , An, not B1, . . . , not Bm can be seen as
standing for A1 ^ . . . ^ An ^ L¬B1 ^ . . . ^ L¬Bm ^ LA˙ A. Where L ' can be understood
as “' is believed”, or also “we assume ' ”, and A˙ can be understood as “one intends to
prove A”. The overall reading is that A is derived whenever the positive conditions hold,
we assume that the negative conditions hold as well, and we assume that we indeed
intend to prove A. Clearly, we have to state that A ^ L¬A ? (if we have A we cannot
believe its negation) and LA˙ ^ L¬A ? (we cannot intend to prove A if we believe its
negation). This characterization can be transposed into plain ASP by interpreting modal
literals as fresh atoms. The answer sets (which are among the classical models) of the
transposition ⇧ 0 of a given program ⇧ coincide, when removing fresh atoms, with the
resource-based answer sets of ⇧ . Every program admits at least one (possibly empty)
resource-based answer set.
      </p>
      <p>
        The denomination of resource-based answer set semantics stems from the linear
logic formulation of ASP that we proposed in [
        <xref ref-type="bibr" rid="ref14 ref16">14, 16</xref>
        ], which constituted the original
inspiration for the new semantics. This formulation interprets negation not A of atom
A as a resource that is unlimitedly available unless A is proved. Therefore, not A can
be freely used whenever needed but: (1) not A becomes unavailable if A is proved; (2)
whenever not A has been used, A can no longer be proved. For unary odd cycles such as
{p not p.} in the linear logic formulation upon the attempt of using not p for proving
p, by condition (2) p becomes no longer provable (and thus it is false). Similarly for
ternary odd cycles. Thus, under the resource-based answer set semantics a 3-atoms odd
cycle is interpreted as an exclusive disjunction, exactly like 2-atoms even cycles. In the
generate-and-test perspective which is the basis of the ASP programming methodology,
3 Even (resp. odd) cycles are cycles involving an even (resp. odd) number of negative
dependencies, cf., e.g., [
        <xref ref-type="bibr" rid="ref24 ref25 ref26">24, 25, 26</xref>
        ] for precise definitions.
4 Unless “handles” are provided from other parts of the program, see [
        <xref ref-type="bibr" rid="ref24 ref25 ref26">24, 25, 26</xref>
        ] for details.
even cycles are commonly used to generate the search space. Thus, our new semantics
provides some additional flexibility in this sense.
      </p>
      <p>
        Resource-based answer set semantics is significantly different from other valuable
semantic approaches aimed at managing odd cycles, such as [
        <xref ref-type="bibr" rid="ref28 ref29">28, 29</xref>
        ] and [
        <xref ref-type="bibr" rid="ref30 ref31">30, 31</xref>
        ].
Such a semantics can be characterized, similarly to traditional answer set semantics,
by means of the operator (cf. Definition 1 in Sect. 2). In fact, the resource-based
interpretation of negation requires that the negation of an atom (seen as a resource)
that has been proved, becomes unavailable: the effect of is in fact exactly that of
eliminating rules that make such use of negation.
      </p>
      <p>
        For providing the formal definition, some preliminary consideration is needed. As
discussed in [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], a nonempty answer set program ⇧ (that below we call simply
“program”) can be seen as divided into a sequence of components, or layers, C1, . . . , Cn,
n 1, where each Ci is the union of a set of cyclic or acyclic subprograms
(subcomponents) independent of each other (with no atoms in common); each subcomponent of
C1, which is called the bottom of ⇧ , is standalone, i.e., the atoms occurring therein do
not depend upon other parts of the program; each subcomponent of Ci, i &gt; 1, is on top
of some subcomponent of Ci 1, i.e., the atoms occurring therein depend upon atoms
occurring in Ci 1. For the formal definition of cyclic, acyclic on-top and standalone
subprograms, refer to [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Based upon such a decomposition, as first discussed in [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ],
the answer sets of a program can be computed incrementally in a bottom-up fashion.
Proposition 1. Consider a nonempty ASP program ⇧ , divided into components
C1, . . . , Cn, n 1. An answer set S of ⇧ (if any exists) can be computed incrementally
by means of the following steps:
0. Set i = 1.
1. Compute an answer set Si of component Ci (for i = 1, this accounts to computing
an answer set of the bottom component).
2. Simplify program Ci+1 by: (i) deleting all rules in which have not B in their body,
B 2 Si; (ii) deleting (from the body of the remaining rules) every literal not F
where F does not occur in the head of rules of Ci+1, F 62 Si, and every atom E
with E 2 S1. Notice that, once simplified, Ci+1 becomes standalone.
3. If i &lt; n set i = i + 1 and go to step 1, else set S = S1 [ . . . [ Sn.
      </p>
      <p>Resource-based answer sets can be computed in a similar way. We start by defining
the notion of resource-based answer sets of a given standalone program. In particular,
they are obtained from some of its minimal models, specifically from the ⇧ -based
minimal models:
Definition 3. A ⇧ -based minimal model I of an ASP program ⇧ is either the empty
set (in case it is the unique minimal model), or a nonempty minimal model such that
8 A 2 I, there is a rule in ⇧ with head A, where A does not occur positively in the body.</p>
      <p>The restriction to ⇧ -based minimal models is due to the fact that resource-based
answer sets are supported sets of atoms. Thus, we aim at avoiding unsupported minimal
models, such as, for sample one-rule program a not c, the minimal model {c}. Being
⇧ -based is only a prerequisite for supportedness which however will be guaranteed by
other conditions. Below we provide a variation of the answer set semantics that defines
resource-based answer sets.
Definition 4. Let ⇧ be a standalone program, and let I be a ⇧ -based minimal model.
M is a resource-based answer set of ⇧ iff M = ⇧ (I) (we remind the reader that, for
any model I and program ⇧ , ⇧ (I) ✓ I).</p>
      <p>We are now ready to define resource-based answer sets of a generic program ⇧ .
Definition 5. Consider a nonempty ASP program ⇧ , divided into components
C1, . . . , Cn, n 1. A resource-based answer set S of ⇧ is defined as M1 [ . . . [ Mn
where M1 is a resource-based answer set of C1, and each Mi, 1 &lt; i  n, is a
resource-based answer set of standalone component Ci0, obtained by simplifying Ci
w.r.t. S = M1 [ . . . [ Mi 1, where the simplification consists in: (i) deleting all rules
in Ci which have not B in their body, B 2 S; (ii) deleting (from the body of remaining
rules) every literal not D where D does not occur in the head of rules of Ci and D 62 S,
and also every atom D with D 2 S (notice in fact that, once simplified, Ci+1 becomes
standalone and therefore Definition 4 can be applied).</p>
      <p>
        The above definition brings clear analogies to the procedure for answer set
computation specified in [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Therefore, it is easy to see that, for consistent ASP programs,
answer sets are among resource-based answer sets. Proposed program decomposition
is also reminiscent of the one adopted in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. However, in general, resource-based
answer sets are not models in the classical sense: rather, they are sets of atoms which are
subsets of some minimal model, and are supported (similarly to answer sets, which are
minimal supported models): in fact, from the above definitions it can be easily seen that
for every atom A in a resource-based answer set M , there exists a rule with head A,
and body which is true w.r.t. M . Non-empty resource-based answer sets still form an
anti-chain w.r.t. set inclusion.
      </p>
      <p>We now explain by means of an example why the incremental construction of
resource-based answer set is needed. Let ⇧ E be the following:
a
not p.</p>
      <p>p
not p.</p>
      <p>q</p>
      <p>Suppose to apply Definition 4 directly to the overall program. It admits a unique ⇧ E
based minimal model S = {p, q}, and we have ⇧ E (S) = ; . This is reasonable for p
and q: in fact, they depend upon their own negation, so in our perspective there is not
“enough” negation to prove them, thus they must be deemed to be false. It is reasonable
also for e, which is involved (though through negation) in a positive circularity. It is
however not reasonable for a, which depends upon negation of a false atom. However,
according to Definition 5, we divide ⇧ E into a standalone bottom component C1,
consisting of the last three rules, with M1 = ; as the unique resource-based answer set,
and a top component C2 consisting of the first rule a not p: after simplification, C20
is simply fact a, unique resource-based answer set M2 = {a}, which coincides with the
unique resource-based answer set of the overall program, thus meeting the intuition.</p>
      <p>
        We have called the new semantics Resource-Based Answer Set semantics (RAS),
w.r.t. AS (Answer Set) semantics. Differently from answer sets, a (possibly empty)
resource-based answer set always exists. Complexity of RAS semantics is however
higher than complexity of AS semantics: in fact, [
        <xref ref-type="bibr" rid="ref33">33</xref>
        ] proves that deciding whether a set
of formulas is a minimal model of a propositional theory is co-NP-complete. Clearly,
checking whether a minimal model I is ⇧ -based and computing ⇧ s (I) has
polynomial complexity. Then, checking whether a set of atom I is a resource-based answer set
of program ⇧ is co-NP-complete.
      </p>
      <p>In resource-based answer set semantics there are no inconsistent programs. This
means that constraints cannot be modeled (as done in ASP) in terms of odd cycles.
Hence, they have to be modeled explicitly. Without loss of generality we will assume in
the rest of the paper the following simplification concerning constraints. Each constraint
L1, . . . , Lk, k &gt; 0, where each Li is a literal, can be rephrased as simple constraint
H, where H is a fresh atom, plus rule H L1, . . . , Lk to be added to given program
⇧ . We will from now on implicitly consider the version of ⇧ enriched by such rules.
Definition 6. Let ⇧ be a program and {C1, . . . , Ck} be a set of constraints, each Ci
in the form Hi. A resource-based answer set M for ⇧ is admissible if it fulfills all
constraints, i.e., if for all i  k, Hi 62 M . M is admissible w.r.t. a single constraint Cj
if Hj 62 M .
4</p>
      <p>
        Properties of Resource-Based answer set semantics
It is relevant, also for what follows, to evaluate RAS with respect to general properties
of semantics of logic programs introduced in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], that we recall below.
Definition 7. The sets of atoms a single atom A depends upon, directly or indirectly,
positively of negatively, is defined as dependencies of (A) = {B : A depends on B}.
      </p>
      <p>
        The former definition is provided with some approximation, as dependencies should
be formally checked on the dependency graph of given program [
        <xref ref-type="bibr" rid="ref22 ref23">22, 23</xref>
        ].
Definition 8. Given a program ⇧ and an atom A, rel rul (⇧ ; A) is the set of
relevant rules of ⇧ with respect to A, i.e. the set of rules that contain an atom B 2
dependencies of (A) in their heads.
      </p>
      <p>Note that the notions introduced by Definitions 7 and 8 for an atom A are plainly
generalized to any set X of atoms. Notice, moreover, that given an atom (or a set of atoms)
X, rel rul (⇧ ; X) is a subprogram of ⇧ .</p>
      <p>
        Definition 9. Given any semantics SEM and a ground program ⇧ , Relevance states
that for all literals L it holds that SEM (⇧ )(L) = SEM (rel rul (⇧ ; L))(L).
Relevance implies that the truth value of any literal under that semantics in a given
programs is determined solely by the subprogram consisting of the relevant rules. The
answer set semantics does not enjoy relevance [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. This is one reason for the lack of
goal-oriented proof procedures. Instead, it is easy to see that
Proposition 2. Resource-based answer set semantics enjoys Relevance.
      </p>
      <p>
        Resource-based answer set semantics, like most semantics for logic programs with
negation, enjoys Reduction, which simply assures that the atoms not occurring in the
heads of a program are always assigned truth value ‘false’. Resource-based answer set
semantics also enjoys Modularity [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] (where the reduct ⇧ M of program ⇧ w.r.t. set
of atoms M is recalled in Definition 1.):
Definition 10. Given any semantics SEM , a ground program ⇧ let ⇧ = ⇧ 1 [ ⇧ 2
where for every atom A occurring in ⇧ 2, rel rul (⇧ ; A) ✓ ⇧ 2. SEM enjoys Modularity
if SEM (⇧ ) = SEM (⇧ 1SEM(⇧ 2) [ ⇧ 2).
      </p>
      <p>We can in fact prove the following proposition:
Proposition 3. Given a ground program ⇧ let ⇧ = ⇧ 1 [ ⇧ 2, where for every atom A
occurring in ⇧ 2, rel rul (⇧ ; A) ✓ ⇧ 2. A set M of atoms is a resource-based answer
set of ⇧ iff there exists a resource-based answer set S of ⇧ 2 such that M is a
resourcebased answer set of ⇧ 1S [ ⇧ 2.</p>
      <p>Modularity is an important property, that also impacts on constraint checking, i.e.,
on the check of admissibility of resource-based answer sets. Considering, in fact, a
set of constraints {C1, . . . , Cn}, n &gt; 0, each Ci in the form Hi, and letting for
each i  n rel rul (⇧ ; Hi) ✓ ⇧ 2, from Prop. 3 it follows that, if a resource-based
answer set X of ⇧ 2 is admissible (in terms of Definition 6) w.r.t. {C1, . . . , Cn}, then
any resource-based answer set M of ⇧ such that X ✓ M is also admissible w.r.t. this
set of constraints. In particular, ⇧ 2 can be identified in relation to a certain query, i.e.:</p>
    </sec>
    <sec id="sec-2">
      <title>H associated to ⇧ is relevant for</title>
    </sec>
    <sec id="sec-3">
      <title>Definition 11. Given a program ⇧ , a constraint</title>
      <p>query ? A if rel rul (⇧ ; A) ✓ rel rul (⇧ ; H).
5</p>
      <p>A Proof Procedure for RAS
As said before, the answer set semantics extends the well-founded semantics.
Resourcebased answer set semantics still extends the well-founded semantics, as it still deals
with assigning a truth value to atoms which are undefined under the this semantics:
however, it is able to cope with odd cycles that the answer set semantics interprets as
inconsistencies. Assuming to devise a query-answering device for ASP, query ? A to
ASP program ⇧ may be reasonably expected to succeed or fail if A belongs to W + or
W respectively, but how to find an answer if A is undefined because it is involved in
a negative circularity remains to be understood.</p>
      <p>An additional problem with answer set semantics is that query ? A might locally
succeed, but still, for the lack of relevance, the overall program may not have answer
sets (i.e., the program is inconsistent). In resource-based answer set semantics instead,
there are no inconsistent programs and every program has at least one (possibly empty)
resource-based answer set: each of them taken singularly is then admissible or not w.r.t.
the integrity constraints. This allows one to defer constraint checking in case the proof
of query A succeeds. In this section, we present and discuss the foundations of a proof
procedure for logic programs under resource-based answer set semantics.</p>
      <p>
        We take as a starting point a well-established proof procedure for the well-founded
semantics, namely XSB-resolution. An ample literature exists for XSB-resolution, from
the seminal work in [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] to the most recent work in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] where many useful references
can also be found. XSB resolution is fully implemented, and information and downloads
can be find on the XSB web site, xsb.sourceforge.net/index.html.
      </p>
      <p>
        For lack of space, here we do not describe XSB-resolution in detail. We provide in
[
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] some definitions and results useful for a general understanding. In the rest of this
section, we proceed to illustrate how we mean to extend XSB in order to cope with
undefined atoms.
      </p>
      <p>
        XSB-resolution [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] adopts tabling, that will also be useful in what follows. Tabled
logic programming was first formalized in the early 1980’s, and several formalisms and
systems have been based both on tabled resolution and on magic sets, which can also
be seen as a form of tabled logic programming (c.f. [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] for references). In the Datalog
context, tabling simply means that whenever atom S is established to be true or false,
it is recorded in a table. Thus, when subsequent calls are made to S, the evaluation
ensures that the answer to S refers to the record rather than being re-derived using
program rules. Seen abstractly, the table represents the given state of a computation: in this
case, subgoals called and their answers so far derived. One powerful feature of tabling
is its ability to maintain other global elements of a computation in the “table”, such as
information about whether one subgoal depends on another, and whether the
dependency is through negation. By maintaining this global information, tabling is useful for
evaluating logic programs under the well-founded semantics. The essential idea is that
global information about dependencies is used to determine the truth value of literals
that do not have a derivation. If such literals are involved in a cyclic dependency through
negation, they are undefined under WFS; if not, the literals belong to an unfounded set
and are false in WFS. In fact, it can be shown that tabling allows Datalog programs
with negation to terminate with polynomial data complexity under the well-founded
semantics.
      </p>
      <p>
        We will now define the foundations of a top-down proof procedure for
resourcebased answer set semantics, which we call RAS-XSB-Resolution. The procedure has to
cope with the fact that there are atoms which are involved in negative circularities, and
must be assigned a truth value according to some resource-based answer set. We build
upon XSB-Resolution, which is by no means elementary, so we refer the reader to the
references for a proper understanding. An abridged specification is provided below for
the reader’s convenience, based upon preliminary definition reported in [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. In order
to give an intuitive idea, we resort, in fact, to the following “naive” formulation, relying
upon general definitions reported in [
        <xref ref-type="bibr" rid="ref22 ref23">22, 23</xref>
        ].
      </p>
      <p>Definition 12 (A “naive” XSB-resolution). Given a program ⇧ , let Table(⇧ ) be the
data structure used by the proof procedure for tabling purposes, i.e., the table
associated with the program (or simply “program table”). Given a query ? A, the list of
current subgoals is initially set to L1 = {A} and Table(⇧ ) is initialized to be the
empty set. If in the construction of a proof-tree for ? A, a literal Lij is selected in
the list of current subgoals Li, we have that: if Lij definitely succeeds (in case of a
negative literal Lij = not B, it definitely succeeds if B definitely fails) then we take Lij
as proved and proceed to prove Lij+1 after the related updates to the program table.
Otherwise, we have to backtrack to previous list Li 1 of subgoals. Success and failure
determine suitable modifications to Table(⇧ ).</p>
      <p>On Datalog programs XSB is correct and complete, therefore, under
XSBresolution, atom A definitely succeeds iff A 2 W + and definitely fails iff A 2 W .
Note that definite failure occurs not only when at some point there is an atom not
defined by any rules, but also whenever an atom depends positively in any possible (even
indirect) way upon itself. In our extension, we take the above result as a starting point
for success and failure.</p>
      <p>In order to represent the notion of negation as a resource, we initialize the program
table prior to posing queries and we manage the table during a proof so as to state
that: the negation of any atom which is not a fact is available unless this atom has
been proved; the negation of an atom which has been proved becomes unavailable; the
negation of an atom which cannot be proved is always available.</p>
      <p>Definition 13 (Table Initialization in RAS-XSB-Resolution). Given a program ⇧
and an associated table T able(⇧ ), Initialization of T able(⇧ ) is performed by inserting,
for each atom A occurring as the conclusion of some rule in ⇧ , a fact yesA (where
yesA is a fresh atom).</p>
      <p>The meaning of yesA is that the whole amount of A’s negation is still available. If
yesA is present then A can possibly succeed. Success of A “absorbs” yesA and prevents
not A from success. Resource-based answer set semantics in fact dictates that proving
A consumes the whole amount of A’s negation. Table(⇧ ) will evolve during a proof
into subsequent “knowledge states”. In the following, without loss of generality we can
assume that a query is of the form ? A, where A is an atom. A proof of query ? A is
performed by XSB-resolution, though with the following additive modifications.
Definition 14 (Success and failure in RAS-XSB-Resolution). Given program ⇧ and
its associated table T able(⇧ ), notions of success and failure and of modifications to
T able(⇧ ) are extended as follows with respect to XSB-Resolution.
(1) Atom A succeeds if one of the following is the case:
(a) A is present in Table(⇧ ).
(b) Fact yesA is present in Table(⇧ ), and there exists in ⇧ either fact A or a rule of the
form A L1, . . . , Ln, n &gt; 0, such that every Li, i n, succeeds. Definite success of
A is a particular case.</p>
      <p>In consequence of success of A, fact A is added to Table(⇧ ) (if not already present), and
fact yesA is removed.
(2) Atom A fails if one of the following is the case:
(a) Fact yesA is not present in Table(⇧ ), and therefore A is unprovable.
(b) A definitely fails.
(c) There exists no rule of the form A L1, . . . , Ln, n &gt; 0, such that every Li succeeds,
as one of the following is the case:
(i) Some positive literal, among L1, . . . , Ln, fails.
(ii) Some negative literal, among L1, . . . , Ln, fails.
(iii) Any possible derivation of some of the Lis, i  n, incurs into not A directly, i.e.,
not through layers of negation.
(iv) Any possible derivation of some of the Lis i  n, incurs into A through layers of
negation that do not involve not A.</p>
      <p>In cases (iii) and (iv) we say that A is forced to failure. In consequence of failure of A,
fact yesA is removed from Table(⇧ ) (if present). In case A is forced to failure, for every
positive literal B encountered in the derivation from A to, respectively, A or not A, fact
yesB is removed from Table(⇧ ) (if present).
(3) Literal not A succeeds if one of the following is the case:
(a) Fact not A is present in Table(⇧ ).
(b) A fails.
(c) A does not fail, rather any derivation of not A incurs through layers of negation again
into not A; In this case we say that not A is allowed to succeed.</p>
      <p>In consequence of success of not A, fact yesA is removed from Table(⇧ ) (if present), and
fact not A is added to Table(⇧ ). In case however not A is allowed to succeed, in case the
parent subgoal fails yesA is restored and not A is removed.
(4) Literal not A fails if A succeeds.</p>
      <p>From this extension of the notions of success and failure we obtain
RAS-XSBResolution as an extended XSB-Resolution. The “naive” definition is the following
(a precise operational definition will require a punctual modification of all definitions
related to XSB).</p>
      <p>Definition 15 (A “naive” RAS-XSB-resolution). Given a program ⇧ , let assume as
input the data structure Table(⇧ ) used by the proof procedure for tabling purposes,
i.e., the table associated with the program (or simply “program table”). Given a query
? A, the list of current subgoals is initially set to L1 = {A}. If in the construction
of a proof-tree for ? A a literal Lij is selected in the list of current subgoals Li,
we have that: if Lij succeeds then we take Lij as proved and proceed to prove Lij+1
after the related updates to the program table. Otherwise, we have to backtrack to the
previous list Li 1 of subgoals. Conditions for success and failure are those specified in
Definition 14. Success and failure determine the modifications to Table(⇧ ) specified for
XSB-resolution, plus those specified in Definition 14. Backtracking involves restoring
previous contents of Table(⇧ ).</p>
      <p>Definition 16. Given a program ⇧ , its associated table Table(⇧ ), a free query is a
query ? A which is posed on ⇧ when the table has just been initialized. A contextual
query is a query ? B which is posed on ⇧ leaving the associated table in the state
created by former queries.</p>
      <p>Success of query ? A means that there exist resource-based answer sets that
contain A. These sets are further characterized by the final content of Table(⇧ ), which
encompasses a number of literals which hold in therein. Backtracking on ? A accounts
to asking whether there are other different resource-based answer sets containing A,
and implies accordingly backtracking Table(⇧ ) to previous contents. Instead, posing a
subsequent query ? B without resetting the contents of Table(⇧ ), which constitutes a
context, accounts to asking whether some of the already-computed resource-based
answer sets containing A also contain B. Contextual queries and sequences of contextual
queries are formally defined below.</p>
      <p>Definition 17 (Query sequence). Given a program ⇧ and k &gt; 1 queries ? A1, . . . ,
? Ak performed one after the other, Table(⇧ ) is initialized only before posing ? A1.
Thus, ? A1 is a free query where each ? Ai, is contextual w.r.t. the previous ones.</p>
      <p>To show the application of RAS-XSB-resolution to single queries and to a query
sequence, let us consider the following sample program ⇧ , which includes virtually
all cases of potential success and failure. The well-founded model of this program is
h{e}, {d}i, since e is true as it is a fact, d is false as it has no defining rules, and
all the other atoms are undefined. In fact, they are involved in negative circularities
either directly or indirectly (through dependencies, like s and f ). There is an even cycle
involving a and g, and a unary odd cycle on p, which however depends upon its own
negation indirectly, i.e., p depends upon h which in turn depends upon not p.
r1. a not g. r3. s not p. r5. h not p. r7. f not g, e.
r2. g not a. r4. p h. r6. f not a, d. r8. e.
The resource-based answer sets of such ⇧ are M1 = {e, a, f, s} and M2 = {e, s, g}.</p>
      <p>Below we illustrate some derivations. Initially, Table(⇧ ) includes yesA for
every atom occurring in some rule head: Table(⇧ ) = {yesa,yesb,yesc,yese,yesf ,yesg ,
yesp,yesh,yess}. Let us go through the proof of query ? f , assuming to adopt a
Prologlike search strategy: applicable rules from first to last as they occur in the program,
literals in rule bodies from left to right. Each additional layer of ? indicates nested
derivation of A whenever literal not A is encountered. In the comment, we refer to
cases of RAS-XSB-resolution as specified in Definition 14.</p>
      <p>? f.
? not a, d. % via r6
? ? a.
? ? not g. % via r1
? ? ? g.
? ? ? not a. % via r2. not a succeeds by case 3.c, Table(⇧ ) = Table(⇧ ) [ { not a} \ {yesa}
? d. % d fails by case 2b, previous Table(⇧ ) restored, backtracking
? not g, e. % via r7
? ? g.
? ? not a. % via r2
? ? ? a.
? ? ? not g. % via r1. not g succeeds by case 3.c, a succeeds by case 1.b,</p>
      <p>Table(⇧ ) = Table(⇧ ) [ { a, not g} \ {yesa, yesg}
? e. % e succeeds by case 1.b, overall query f succeeds by case 1.b</p>
      <p>Table(⇧ ) = Table(⇧ ) [ { e, f } \ {yese, yesf }
Assuming now to go on to query the same context, i.e., without re-initializing
Table(⇧ ), queries ? c and ? g quickly fail by cases 3.c and 1.a, since a 2 T able(⇧ ).
Query ? e succeeds immediately by case 1.a as e 2 T able(⇧ ). We can see that the
context we are within corresponds to resource-based answer set M1, where only s remains
to be proved. This can be done as follows:
? s.
? not p. % via r3
? ? p.
? ? h. % via r4
? ? not p. % via r5, p fails by case 2.c.iii, h fails by case 2.c.ii, Table(⇧ ) =
Table(⇧ ) \ {yesp, yesh}. not p succeeds by case 3.b, s succeeds by case 1.b,
Table(⇧ ) = Table(⇧ ) [ { not p, s} \ {yess}
It remains to show how the derivation of h proceeds, as it involves the tricky case
of a positive dependency through negation, where h is still undefined under the
wellfounded semantics.</p>
      <p>? h.
? not p. % via r5
? ? p.</p>
      <sec id="sec-3-1">
        <title>Properties of RAS-XSB-resolution</title>
        <p>Properties of resource-based answer set semantics are strictly related to properties of
RAS-XSB-resolution. In fact, thanks to Relevance we can have soundness and
correctness, and Modularity allows for contextual query and locality in constraint-checking.
Theorem 1. RAS-XSB-resolution is correct and complete w.r.t. resource Answer Set
semantics, in the sense that, given program ⇧ , query ? A succeeds under
RAS-XSBresolution with an initialized Table(⇧ ) iff there exists resource-based answer set M
for ⇧ where A 2 M .</p>
        <p>Theorem 2. RAS-XSB-resolution is contextually correct and complete w.r.t. resource
Answer Set semantics, in the sense that, given program ⇧ and query sequence
? A1, . . . , ? Ak, k &gt; 1, we have that, for {B1, . . . , Br} ✓ { A1, . . . , Ak} and
{D1, . . . , Ds} ✓ { A1, . . . , Ak}, the queries ? B1, . . . , ? Br succeed while ? D1,
. . . , ? Ds fail under RAS-XSB-resolution, iff there exists resource-based answer set M
for ⇧ where {B1, . . . , Br} ✓ M and {D1, . . . , Ds} \ M = ; .</p>
        <p>In fact, keeping in Table(⇧ ) atoms and literals proved so far accounts to
performing the simplification of given program ⇧ w.r.t. a resource-based answer set computed
for the subprogram including relevant rules of previous queries. Therefore, the result
descends from Modularity of resource-based answer set semantics. It remains to
consider the issue of constraint checking. Notice that, due to modularity of RAS, if ⇧ is
admissible, then only constraints relevant to given query need to be checked.
Proposition 4. Let ⇧ be an admissible program w.r.t. the constraints H1, . . . ,
Hh (it has admissible answer sets). Let H1, . . . , Hk, k  h be the relevant
constraints for a query ? A. Then, if ? A succeeds and each Hi, i  k, considered as a
query, contextually succeeds as well, then there exists some admissible resource-based
answer set M for ⇧ with A 2 M .</p>
        <p>If admissibility of ⇧ is unknown, all constraints must instead be checked. Checking
constraints on the state of Table(⇧ ) left by a query alleviates the efficiency problem.
“Smart” heuristics, such as those presently adopted by answer set solvers, for checking
constraints during the proof process might also be in order.
7</p>
      </sec>
      <sec id="sec-3-2">
        <title>Discussion and Concluding Remarks</title>
        <p>A relevant question about RAS-XSB-resolution concerns whether it is applicable to
non-ground queries and programs. By resorting to standard unification, non-ground
queries on ground programs are managed without substantial modifications. We claim
that the procedure can be extended to non-ground programs without requiring
preliminary program grounding. Transforming this claim into evidence requires however an
actual reworking of XSB-resolution definitions and proofs. This is a topic for future work.</p>
        <p>
          Another relevant question is whether RAS-XSB-resolution might be extended to
plain ASP. Unfortunately, an ASP program may have a quite complicated structure: the
effort of in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] has been in fact that of performing a layer-based computation upon some
conditions. Thus, the adoption of RAS-XSB-resolution is possible at the condition of
structuring an ASP program so that constraints are at the top layer. Many applications
are already expressed in this form, which means that the proposed procedure may have
an impact beyond resource-based answer set semantics.
        </p>
        <p>
          In summary, we have proposed the theoretical foundations of a proof procedure
related to a reasonable extension of answer set programming. The procedure has been
obtained by exploiting properties of both answer set semantics and resource-based
answer set semantics, which enable us to resort as a starting point to XSB-resolution. The
new procedure has drawn inspiration from the tabling feature of XSB-resolution.
Future work includes a precise definition of RAS-XSB-resolution, and an implementation,
that should then be checked and experimented on (suitable versions of) well-established
benchmarks (see, e.g., [
          <xref ref-type="bibr" rid="ref34 ref35">34, 35</xref>
          ]). We also intend to investigate an integration of
RASXSB-resolution with principle and techniques proposed in [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], so as to further enlarge
its applicability.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>The stable model semantics for logic programming</article-title>
          . In Kowalski, R.,
          <string-name>
            <surname>Bowen</surname>
          </string-name>
          , K., eds.
          <source>: 5th ICSLP</source>
          , MIT Press (
          <year>1988</year>
          )
          <fpage>1070</fpage>
          -
          <lpage>1080</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Classical negation in logic programs</article-title>
          and disjunctive databases.
          <source>New Generation Computing</source>
          <volume>9</volume>
          (
          <year>1991</year>
          )
          <fpage>365</fpage>
          -
          <lpage>385</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Marek</surname>
            ,
            <given-names>V.W.</given-names>
          </string-name>
          , Truszczyn´ski, M. In:
          <article-title>Stable logic programming - an alternative logic programming paradigm</article-title>
          . Springer (
          <year>1999</year>
          )
          <fpage>375</fpage>
          -
          <lpage>398</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Baral</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Knowledge representation, reasoning and declarative problem solving</article-title>
          . Cambridge University Press (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5] Truszczyn´ski, M.:
          <article-title>Logic programming for knowledge representation</article-title>
          . In Dahl, V., Niemela¨, I., eds.:
          <source>Logic Programming, 23rd Intl. Conference</source>
          ,
          <string-name>
            <surname>ICLP</surname>
          </string-name>
          <year>2007</year>
          .
          <article-title>(</article-title>
          <year>2007</year>
          )
          <fpage>76</fpage>
          -
          <lpage>88</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Answer sets</article-title>
          .
          <source>In: Handbook of Knowledge Representation. Chapter</source>
          <volume>7</volume>
          .
          <string-name>
            <surname>Elsevier</surname>
          </string-name>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gharib</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mercer</surname>
            ,
            <given-names>R.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Monotonic answer set programming</article-title>
          .
          <source>J. Log. Comput</source>
          .
          <volume>19</volume>
          (
          <issue>4</issue>
          ) (
          <year>2009</year>
          )
          <fpage>539</fpage>
          -
          <lpage>564</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Bonatti</surname>
            ,
            <given-names>P.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pontelli</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Son</surname>
          </string-name>
          , T.C.:
          <article-title>Credulous resolution for answer set programming</article-title>
          . In Fox, D.,
          <string-name>
            <surname>Gomes</surname>
          </string-name>
          , C.P., eds.
          <source>: AAAI</source>
          <year>2008</year>
          , AAAI Press (
          <year>2008</year>
          )
          <fpage>418</fpage>
          -
          <lpage>423</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>[9] Web references on ASP: Clasp: potassco.sourceforge.net; Cmodels: www</article-title>
          .cs. utexas.edu/users/tag/cmodels; DLV: www.dbai.tuwien.ac.at/proj/ dlv; Smodels: www.tcs.hut.fi/Software/smodels.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Dix</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>A classification theory of semantics of normal logic programs I-II. Fundam</article-title>
          . Inform.
          <volume>22</volume>
          (
          <issue>3</issue>
          ) (
          <year>1995</year>
          )
          <fpage>227</fpage>
          -
          <lpage>255</lpage>
          and
          <fpage>257</fpage>
          -
          <lpage>288</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Formisano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Answer set programming with resources</article-title>
          .
          <source>Journal of Logic and Computation</source>
          <volume>20</volume>
          (
          <issue>2</issue>
          ) (
          <year>2010</year>
          )
          <fpage>533</fpage>
          -
          <lpage>571</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Formisano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Modeling preferences and conditional preferences on resource consumption and production in ASP</article-title>
          .
          <source>Journal of Algorithms in Cognition, Informatics and Logic</source>
          <volume>64</volume>
          (
          <issue>1</issue>
          ) (
          <year>2009</year>
          )
          <fpage>3</fpage>
          -
          <lpage>15</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Formisano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Petturiti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Extending and implementing RASP</article-title>
          .
          <source>Fundamenta Informaticae</source>
          <volume>105</volume>
          (
          <issue>1-2</issue>
          ) (
          <year>2010</year>
          )
          <fpage>1</fpage>
          -
          <lpage>33</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Formisano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>RASP and ASP as a fragment of linear logic</article-title>
          .
          <source>Journal of Applied Non-Classical Logics (JANCL) 23</source>
          (
          <issue>1-2</issue>
          ) (
          <year>2013</year>
          )
          <fpage>49</fpage>
          -
          <lpage>74</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>Girard</surname>
            ,
            <given-names>J.Y.</given-names>
          </string-name>
          :
          <article-title>Linear logic</article-title>
          .
          <source>Theoretical Computer Science</source>
          <volume>50</volume>
          (
          <year>1987</year>
          )
          <fpage>1</fpage>
          -
          <lpage>102</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Formisano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Negation as a resource: A novel view on answer set semantics</article-title>
          . In Cabalar, P.,
          <string-name>
            <surname>Son</surname>
          </string-name>
          , T.C., eds.
          <source>: LPNMR 2013</source>
          . Vol.
          <volume>8148</volume>
          of LNCS., Springer (
          <year>2013</year>
          )
          <fpage>257</fpage>
          -
          <lpage>263</lpage>
          Long Version in [36].
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>Marek</surname>
            ,
            <given-names>V.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Truszczynski</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Reflective autoepistemic logic and logic programming</article-title>
          .
          <source>In: LPNMR</source>
          . (
          <year>1993</year>
          )
          <fpage>115</fpage>
          -
          <lpage>131</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <surname>Van Gelder</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ross</surname>
            ,
            <given-names>K.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schlipf</surname>
            ,
            <given-names>J.S.:</given-names>
          </string-name>
          <article-title>The well-founded semantics for general logic programs</article-title>
          .
          <source>J. ACM</source>
          <volume>38</volume>
          (
          <issue>3</issue>
          ) (
          <year>1991</year>
          )
          <fpage>620</fpage>
          -
          <lpage>650</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <surname>Swift</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Warren</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          : Xsb:
          <article-title>Extending Prolog with tabled logic programming</article-title>
          .
          <source>TPLP</source>
          <volume>12</volume>
          (
          <issue>1-2</issue>
          ) (
          <year>2012</year>
          )
          <fpage>157</fpage>
          -
          <lpage>187</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Warren</surname>
            ,
            <given-names>D.S.:</given-names>
          </string-name>
          <article-title>A goal-oriented approach to computing the well-founded semantics</article-title>
          .
          <source>J. Log. Program</source>
          .
          <volume>17</volume>
          (
          <issue>2</issue>
          /3&amp;4) (
          <year>1993</year>
          )
          <fpage>279</fpage>
          -
          <lpage>300</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Formisano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Query answering in resource-based answer set semantics</article-title>
          . Extended version, available at http://www.dmi.unipg.it/formis/papers/ CosForASPOCPExtended.pdf
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <surname>Lloyd</surname>
            ,
            <given-names>J.W.</given-names>
          </string-name>
          :
          <article-title>Foundations of Logic Programming</article-title>
          . Springer-Verlag (
          <year>1987</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <surname>Apt</surname>
            ,
            <given-names>K.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bol</surname>
            ,
            <given-names>R.N.</given-names>
          </string-name>
          :
          <article-title>Logic programming and negation: A survey</article-title>
          .
          <source>J. Log. Program. 19/20</source>
          (
          <year>1994</year>
          )
          <fpage>9</fpage>
          -
          <lpage>71</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Contributions to the stable model semantics of logic programs with negation</article-title>
          .
          <source>Theoretical Computer Science</source>
          <volume>149</volume>
          (
          <issue>2</issue>
          ) (
          <year>1995</year>
          )
          <fpage>231</fpage>
          -
          <lpage>255</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>On the existence of stable models of non-stratified logic programs</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          <volume>6</volume>
          (
          <issue>1</issue>
          -2) (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>On odd and even cycles in normal logic programs</article-title>
          . In
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ferguson</surname>
          </string-name>
          , G., eds.
          <source>: Proceedings of AAAI</source>
          <year>2004</year>
          , AAAI Press / The MIT Press (
          <year>2004</year>
          )
          <fpage>80</fpage>
          -
          <lpage>85</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Formisano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Resource-based answer set semantics. Submitted to a journal, draft available at www</article-title>
          .dmi.unipg.it/formis/papers/CF_NARdraft.pdf
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>L.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pinto</surname>
            ,
            <given-names>A.M.:</given-names>
          </string-name>
          <article-title>Revised stable models - a semantics for logic programs</article-title>
          . In Bento,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Cardoso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Dias</surname>
          </string-name>
          , G., eds.
          <source>: Progress in Artificial Intelligence, Proc. of EPIA 2005</source>
          . Vol.
          <volume>3808</volume>
          of LNCS., Springer (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>L.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pinto</surname>
            ,
            <given-names>A.M.:</given-names>
          </string-name>
          <article-title>Tight semantics for logic programs</article-title>
          . In Hermenegildo,
          <string-name>
            <given-names>M.V.</given-names>
            ,
            <surname>Schaub</surname>
          </string-name>
          , T., eds.:
          <source>Tech. Comm. ICLP 2010</source>
          . Vol.
          <volume>7</volume>
          of LIPIcs. (
          <year>2010</year>
          )
          <fpage>134</fpage>
          -
          <lpage>143</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <surname>Osorio</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Lo´pez, A.:
          <article-title>Expressing the stable semantics in terms of the pstable semantics</article-title>
          .
          <source>In: Proc. of the LoLaCOM06 Workshop</source>
          . Vol.
          <volume>220</volume>
          <source>of CEUR Workshop Proc. .</source>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <surname>Osorio</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Pe´rez,
          <string-name>
            <surname>J.A.N.</surname>
          </string-name>
          , Ram´ırez,
          <string-name>
            <surname>J.R.A.</surname>
          </string-name>
          , Mac´ıas, V.B.:
          <article-title>Logics with common weak completions</article-title>
          .
          <source>J. Log. Comput</source>
          .
          <volume>16</volume>
          (
          <issue>6</issue>
          ) (
          <year>2006</year>
          )
          <fpage>867</fpage>
          -
          <lpage>890</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Turner</surname>
          </string-name>
          , H.:
          <article-title>Splitting a logic program</article-title>
          .
          <source>In: Proc. of ICLP'94</source>
          . (
          <year>1994</year>
          )
          <fpage>23</fpage>
          -
          <lpage>37</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [33]
          <string-name>
            <surname>Cadoli</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The complexity of model checking for circumscriptive formulae</article-title>
          .
          <source>Inf. Process. Lett</source>
          .
          <volume>44</volume>
          (
          <issue>3</issue>
          ) (
          <year>1992</year>
          )
          <fpage>113</fpage>
          -
          <lpage>118</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          [34]
          <string-name>
            <surname>Calimeri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krennwallner</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The answer set programming competition</article-title>
          .
          <source>AI</source>
          Magazine
          <volume>33</volume>
          (
          <issue>4</issue>
          ) (
          <year>2012</year>
          )
          <fpage>114</fpage>
          -
          <lpage>118</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          [35]
          <string-name>
            <surname>Alviano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          et al.:
          <article-title>The fourth answer set programming competition: Preliminary report</article-title>
          . In Cabalar, P.,
          <string-name>
            <surname>Son</surname>
          </string-name>
          , T.C., eds.
          <source>: Proc. of LPNMR 2013</source>
          . Vol.
          <volume>8148</volume>
          of LNCS. (
          <year>2013</year>
          )
          <fpage>42</fpage>
          -
          <lpage>53</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          [36]
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Formisano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Negation as a resource: A novel view on answer set semantics</article-title>
          . In Cantone, D.,
          <string-name>
            <surname>Nicolosi</surname>
            <given-names>Asmundo</given-names>
          </string-name>
          , M., eds.
          <source>: CILC 2013</source>
          . Vol.
          <volume>1068</volume>
          of CEUR Workshop Proceedings. (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>