<!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>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Fabien Garreau, Laurent Garcia, Claire Lefe`vre and Igor Ste ́phan LERIA University of Angers</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Answer set programming (ASP) is an appropriate formalism to represent various problems issued from artificial intelligence and arising when available information is incomplete. When dealing with information expressed in terms of ontologies in some tractable description logic language, ASP must be extended to handle existential variables. We present the syntax and semantics of an ASP language with existential variables using Skolemization. We formalize its links with standard ASP. This work has led to an implementation.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        This paper deals with the treatment of ontologies in Answer
Set Programming (ASP)
        <xref ref-type="bibr" rid="ref14">(Gelfond and Lifschitz 1988)</xref>
        . We
are interested in using ASP technologies for querying large
scale multisource heterogeneous web information. ASP is
considered to handle, by using default negation,
inconsistencies emerging by the fusion of the sources expressed by
scalable description logics. Moreover, ASP can enrich the
language of ontologies by allowing the expression of
default information (for instance, when expressing inclusion
of concepts with exceptions). When dealing with ontologies
in ASP, the problem stems from the presence of existential
variables in description logics which are not expressible in
normal logic programs. The present work proposes a
definition of ASP with existential variables in order to express, in
a unique formalism, ontologies enriched by default negation
and rules. Processing existential variables is done in terms
of Skolemization.
      </p>
      <p>
        The study of the combination of ontologies and rules is
not new (Rosati 2006; Eiter et al. 2008; de Bruijn et al.
        <xref ref-type="bibr" rid="ref6">2010;
Motik and Rosati 2010</xref>
        ; Ferraris, Lee, and Lifschitz 2011;
Lee and Palla 2011; Magka, Kro¨tzsch, and Horrocks 2013).
In most of these models, the knowledge base is viewed as
a hybrid knowledge base composed of two parts (T ,P): T
is a knowledge base describing the ontological information
expressed with a fragment of first-order logic, using for
example description logic, and P describes the rules in terms
of a logic program.
      </p>
      <p>
        The miscellaneous attempts to integrate the two
formalisms can be distributed into three classes
        <xref ref-type="bibr" rid="ref10 ref13 ref17">(Eiter et al.
2008; Lee and Palla 2011)</xref>
        .
      </p>
      <p>
        In the first class (like in
        <xref ref-type="bibr" rid="ref10">(Eiter et al. 2008)</xref>
        ), the two
formalisms are handled separately. T is seen as an external
source of information which can be used by the logic
program through special predicates querying the DL base. The
two bases are then independent with their own semantics
and the link between the two bases is performed using these
special predicates.
        <xref ref-type="bibr" rid="ref11">(Eiter et al. 2013)</xref>
        uses their extension of
ASP with external atoms to simulate rules with existential
variables in the head (external atoms in the body serve to
introduce new null values).
      </p>
      <p>
        The second case (like in
        <xref ref-type="bibr" rid="ref23 ref24">(Rosati 2006; Motik and Rosati
2010)</xref>
        ) corresponds to an hybrid formalism which integrates
DLs and rules in a consistent semantic framework.
Predicates of T can be used in the rules of the program.
Nevertheless, there are some restrictions: for instance, these
predicates can not be used in the negative part of the body of a
rule.
      </p>
      <p>The last case integrates DLs and rules in a unique
formalism. For instance, (de Bruijn et al. 2010) uses quantified
equilibrium logic (QEL). In this work, several hybrid
knowledge bases are defined (with safe restriction, safe restriction
without unique name assumption or with guarded
restriction) and it is proved that each category and their models
can be expressed in terms of QEL.</p>
      <p>A large part of these works concerns the questions of
complexity and decidability. In these frameworks,
existential variables are allowed in the part of the ontological
information but are not allowed in the head of the rules.</p>
      <p>
        Next to these models,
        <xref ref-type="bibr" rid="ref13 ref17">(Ferraris, Lee, and Lifschitz 2011)</xref>
        proposes a model allowing to cover both stable models
semantics and first-order logic by means of a second-order
formula issued from the initial information. Its links with the
previously cited works have been established in
        <xref ref-type="bibr" rid="ref13 ref17">(Lee and
Palla 2011)</xref>
        .
        <xref ref-type="bibr" rid="ref25">(You, Zhang, and Zhang 2013)</xref>
        proposes an
extension of ASP with existential variables in rule heads whose
semantics corresponds to that of
        <xref ref-type="bibr" rid="ref13 ref17">(Ferraris, Lee, and Lifschitz
2011)</xref>
        .
      </p>
      <p>
        Other works in logic programming take their origin in
Datalog and extend the language for specifying ontologies.
Datalog+/- is a family of such extensions with syntactical
restrictions so that decidability is ensured. Several approaches
with existential quantified variables based on
Datalog+/have been proposed in the literature but some have no non
monotonic negation
        <xref ref-type="bibr" rid="ref1">(Alviano et al. 2012)</xref>
        and other have
only stratified negation
        <xref ref-type="bibr" rid="ref5">(Cali et al. 2010)</xref>
        . Nevertheless, one
important and interesting point of these works is that they
focus on queries which is an important issue when dealing
with ontologies.
      </p>
      <p>
        In
        <xref ref-type="bibr" rid="ref22">(Magka, Kro¨tzsch, and Horrocks 2013)</xref>
        , the knowledge
base is a single one allowing existential variables and default
negation in the same rule. This work studies some conditions
of acyclicity and stratification that must be verified by the
base ensuring the existence of a unique finite stable model.
The work is both theoretical and practical but it is concerned
with a limited extension of ASP.
      </p>
      <p>
        As far as we know, the only works leading to an
implementation are those of
        <xref ref-type="bibr" rid="ref15 ref15 ref8 ref8">(Ianni et al. 2005; Eiter et al. 2005)</xref>
        ,
based on
        <xref ref-type="bibr" rid="ref10">(Eiter et al. 2008)</xref>
        , and of
        <xref ref-type="bibr" rid="ref22">(Magka, Kro¨tzsch, and
Horrocks 2013)</xref>
        which has been applied to information about
biochemistry.
      </p>
      <p>
        The aim of our present work is to describe knowledge in a
single framework which can lead to useful implementation.
We focus on ASP because it is a powerful framework for
knowledge representation and provides efficient solvers. The
work consists in enriching the ASP framework to take into
account existential variables. It can be seen as the other side
of the work consisting in introducing nonmonotonicity in
existential rules
        <xref ref-type="bibr" rid="ref4">(Baget et al. 2014b; 2014a)</xref>
        .
      </p>
      <p>Next section gives the preliminary notions and definitions
useful for the paper. Then, we define programs expressed in
9-ASP, an extension of ASP allowing existential variables,
and answer sets on this kind of programs. Last, we give the
links between 9-ASP and standard ASP with a method to
translate a program expressed in 9-ASP into a program
expressed in (standard) ASP and proofs about the
transformation.</p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>In this section, we give the formal definitions of the language
and some notions useful in the following of the paper.</p>
      <p>The set V denotes the infinite countable set of variables.
A language L is defined as a triplet (CS; F S; PS) which
denotes respectively the set of constant symbols, the set of
function symbols and the set of predicate symbols of the
language. It is assumed that the sets V, CS, F S and PS of any
language are disjoint. Function ar denotes the arity function
from F S to N and from PS to N which associates to each
function or predicate symbol its arity.</p>
      <p>The set T(L) denotes the set of terms of a language L =
(CS; F S; PS) defined by induction as follows:
if v 2 V then v 2 T(L),
if c 2 CS then c 2 T(L),
if f 2 F S with ar(f ) = n &gt; 0 and t1; : : : ; tn 2 T(L)
then f (t1; : : : ; tn) 2 T(L).</p>
      <p>The set GT(L) denotes the set of ground terms of a
language L = (CS; F S; PS) defined by induction as follows:
if c 2 CS then c 2 GT(L),
if f 2 F S with ar(f ) = n &gt; 0 and t1; : : : ; tn 2 GT(L)
then f (t1; : : : ; tn) 2 GT(L).</p>
      <p>The set A(L) denotes the set of atoms of a language L =
(CS; F S; PS) defined as follows:
if a 2 PS with ar(a) = 0 then a 2 A(L),
if p 2 PS with ar(p) = n &gt; 0 and t1; : : : ; tn 2 T(L)
then p(t1; : : : ; tn) 2 A(L).</p>
      <p>The set GA(L) denotes the set of ground atoms of a
language L = (CS; F S; PS) defined as follows:
if a 2 PS with ar(a) = 0 then a 2 GA(L),
if p 2 PS with ar(p) = n &gt; 0 and t1; : : : ; tn 2 GT(L)
then p(t1; : : : ; tn) 2 GA(L).</p>
      <p>A substitution over a language L is a mapping from the
set of variables to the set of the terms T(L). Let t be a term
(resp. a an atom) and a substitution, (t) (resp. (a)) is
an instance of t (resp. a).</p>
      <p>A ground substitution over a language L is a mapping
from the set of variables to the set of the ground terms
GT(L). Let t be a term (resp. a an atom) and a ground
substitution, (t) (resp. (a)) is a ground instance of t (resp.
a).</p>
      <p>A partial ground substitution for a set of variables V over
a language L is a mapping from V to the set of ground terms
GT(L). Let t be a term (resp. a an atom) and a partial
ground substitution for a set of variables V , (t) (resp. (a))
is a partial ground instance of t (resp. a) w.r.t. the set of
variables V .</p>
      <sec id="sec-2-1">
        <title>Syntax and semantics of 9-ASP</title>
        <p>In this section, we define a variant of ASP allowing the use
of existentially quantified variables (called existential
variables in the sequel). The rules proposed here extend classical
safe rules (without disjunction) of the form:</p>
        <p>H
where H; B1; : : : ; Bm; N1; : : : ; Ns are atoms. Safety
imposes that all variables that appear in a rule also appear in
the positive part of its body. In such a rule, all variables are
interpreted as universally quantified. In the sequel,
universally quantified variables will be called universal variables.</p>
        <p>These classical rules are extended in two ways. First, the
head of the rule, atom H, is replaced by a conjunction of
atoms and each negated atom Ni is also replaced by a
conjunction of atoms. These conjunctions allow multiple atoms
to refer to the same existential variable. Second, the safety
condition is relaxed by allowing these new conjunctions of
atoms to contain variables that do not appear in the positive
part of the rule. These variables are interpreted as existential
ones.</p>
        <p>For example, in the rule (p(X; Y )
q(X); not r(X; Z):), variable X is interpreted as
universal, and Y and Z are interpreted as existential. The rule
can be read as: “for all X, if q(X) is true and there does not
exist Z such that r(X; Z) is true, then one can conclude that
there exists Y such that p(X; Y ) is true”.</p>
        <sec id="sec-2-1-1">
          <title>Definition 1 (9-rule and 9-program) An 9-program P of</title>
          <p>language L = (CS; F S; PS) is a set of 9-rules r defined as
follows (m; s 0, n; u1; : : : ; us 1):
body (r) = ffN11; : : : ; Nu11 g; : : : ; fN1s; : : : ; Nuss gg.
V(r) the variables,
VH9(r) the variables which are in H1; : : : ; Hn but which
are not in B1; : : : ; Bm (i.e. existential variables of the
head of r),
V9(r)(N1i; : : : ; Nuii ) variables which are in N1i; : : : ; Nuii
but not in B1; : : : ; Bm, 1 i s (i.e. existential
variables of N1i; : : : ; Nuii ).</p>
          <p>VN9(r) = S1 i s V9(r)(N1i; : : : ; Nuii ),
VN9(r) = V(r) n VN9(r),
V9(r) = VH9(r) S VN9(r)
VH8(r) the variables which are at least in H1; : : : ; Hn
and in B1; : : : ; Bm (i.e. universal variables of the head of
r, the frontier variables).</p>
          <p>V8(r)(N1i; : : : ; Nuii ) the variables which are at least in
N1i; : : : ; Nuii and in B1; : : : ; Bm (i.e. universal variables
of N1i; : : : ; Nuii ).</p>
          <p>Moreover, the sets V9(r)(N1i; : : : ; Nuii ) for every 1 i s
must be disjoint and the sets VH9(r) and VN9(r) must
also be disjoint. (If a variable appears in several of the
N1i; : : : ; Nuii or if it appears in H1; : : : ; Hn and in one of the
N1i; : : : ; Nuii , 1 i s, then it must appear in B1; : : : ; Bm
and it is a universal variable.)</p>
          <p>For all rules r of a program P , V9(r) must be disjoint (i.e.
all the names of the existential variables of the program are
different).</p>
          <p>A rule r is a definite rule if body (r) = ; and a program
is a definite program if all the rules are definite.</p>
          <p>Let us note that in such a rule r, several atoms are allowed
in head(r) and in each set of body (r). In this case, a list of
atoms must be seen as the conjunction of each atom of the
list.</p>
          <p>Concerning the variables involved in the rule, they can be
quantified universally or existentially. The quantifiers are not
explicitly expressed in the rule but they depend on the
position in the rule: the variables appearing in body+(r) are
universally quantified while the ones not appearing in body+(r)
are existentially quantified. Let us note that the existential
variables, in the head or in each negative part of the body,
are locally quantified.</p>
          <p>Example 1 Let PU be an 9-program of language LU =
(fag; ;; fp; phdS; d; l; gCg) with ar(p) = ar(d) = ar(l) =
1 and ar(phdS) = ar(gC) = 2. p stands for person, phdS
for phDStudent, d for director, l for lecturer and gC for
givesCourses.</p>
          <p>PU = f
r0 : p(a):;
r1 : l(a):;
r2 : phdS(X; D); d(D)
p(X); not(l(X); gC(X; Y )):g</p>
          <p>The rule r2 means that for a person X there exists a
director D and X is a phD student of D, unless X is a lecturer and
it exists a course given by X.</p>
          <p>We have VH8(r) = fXg, VH9(r) = fDg,
V9(r)(l(X); gC(X; Y )) = fY g, VN9(r) = fX; Dg.</p>
          <p>For each program P , we consider that its language LP =
(CS; F S; PS) consists of exactly the constant symbols,
function symbols and predicate symbols appearing in P .
Proposition 1 Any (first-order classical) ASP program is an
9-program.</p>
          <p>Proof 1 This is a direct consequence of Definition 1.</p>
          <p>The semantics of 9-programs uses Skolemization of
existential variables appearing in the heads of the rules. We now
define this Skolemization.
n = 0 then skY is a Skolem constant symbol).</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Definition 2 (Skolem symbols) Let r be an 9-rule, n the</title>
          <p>caabrledionfarlittyheonf VskHYn8(irs)aaSnkdolYem2fuVnHct9io(rn)syamnbeoxilsotefnatriaitlyvnar(ii-f</p>
        </sec>
        <sec id="sec-2-1-3">
          <title>Example 2 (Example 1 continued) Symbol skD1 is a</title>
          <p>Skolem function symbol of arity 1 for the existential
variable D of the head of the rule r2.</p>
        </sec>
        <sec id="sec-2-1-4">
          <title>Definition 3 (Skolem Program) Let P be an 9-program of</title>
          <p>language LP .</p>
          <p>Let s be an ordered sequence of the variables VH8(r) of
an 9-rule r of P . sk(r) denotes a Skolem rule obtained from
r as follows: every existential variable v 2 VH9(r) is
substituted by the term skvn(s) with skvn the Skolem function
(constant) symbol associated to v and n = ar(skvn) the size
of s (zero if VH8(r) = ;). The Skolem program sk(P) of an
9-program P is defined by sk(P ) = fsk(r)jr 2 P g.
Example 3 (Example 1 continued) The Skolem rule of r2
is the rule:
sk(r2) = (phdS(X; skD1(X)); d(sk1 (X))</p>
          <p>D
p(X); not(l(X); gC(X; Y )):)
=</p>
          <p>Hence sk(PU ) = fr0; r1; sk(r2)g and Lsk(PU )
(fag; fskD1g; fp; phdS; d; l; gCg).</p>
          <p>Skolem rules are still not safe: existential variables
remain in the negative bodies. The grounding of such a rule
is a partial grounding restricted to the universal variables
of the rule, the existential ones remaining not ground.
Indeed, a non-ground rule (p(X) q(X); not r(X; Z):)
could be fired for some constant a if q(a) is true and, for all
z, r(a; z) is not true. Suppose two constants a and b. Then
(p(a) q(a); not r(a; a):) and (p(a) q(a); not r(a; b):)
are not equivalent to the non-ground rule for X = a
because the first instance could be fired if r(a; b) is true (but not
r(a; a)) and the second could be fired if r(a; a) is true (but
not r(a; b)). Yet neither r(a; b) nor r(a; a) should be true for
the initial rule to be fired. We thus define a partial
grounding, only concerning universal variables. For instance, a
partial ground instance of the above non-ground rule would be:
(p(a) q(a); not r(a; Z):).</p>
          <p>Definition 4 (Partial Ground Program) Set PG(r) for a
rule r of an 9-program P of language LP denotes the set
of all partial ground instances of r over the language LP
for VN9(r). The partial ground program PG(P ) of an
9program P is defined by PG(P ) = Sr2P PG(r).
Example 4 (Example 1 continued) The language of the
Skolem program sk(PU ) contains only one constant, a, and
only one function symbol, sk1 . The set of ground terms is</p>
          <p>D
infinite and the partial grounding leads then to the following
infinite program:</p>
          <p>PG(sk(PU )) = f
p(a):;
l(a):;
phdS(a; skD1(a)); d(skD1(a))</p>
          <p>p(a); not (l(a); gC(a; Y )):;
phdS(skD1(a); skD1(skD1(a))); d(skD1(skD1(a)))</p>
          <p>p(skD1(a)); not (l(skD1(a)); gC(skD1(a); Y )):;
: : : g
Proposition 2 The partial ground program of an 9-program
with no multiple head, no multiple default negation and no
existential variable is a ground (classical) ASP program.
Proof 2 This is a direct consequence of Definitions 1 and 4.
Definition 5 (Reduct) Let P be an 9-program of language
LP and X GA(Lsk(P )). The reduct of the partial ground
program PG(sk(P )) w.r.t. X is the definite partial ground
program
PG(sk(P ))X =
f head(r) body+(r):jr 2 PG(sk(P ));
for all N 2 body (r) and
for all ground substitution
Example 5 (Example 1 continued) Let</p>
          <p>X1 = fp(a); l(a); phdS(a; skD1(a)); d(skD1(a))g:
Then, for the rule
phdS(a; skD1(a)); d(skD1(a))</p>
          <p>p(a); not (l(a); gC(a; Y )):
there is no ground instance of l(a),gC(a; Y ) that is included
in X1 (since X1 does not contain any atom with gC) and the
positive part of the rule is kept. Other rules are kept for the
same reason. The obtained program is then:
over Lsk(P ); (N ) 6</p>
          <p>Xg
PG(sk(PU ))X1 = f
p(a):;
l(a):;
phdS(a; skD1(a)); d(skD1(a)) p(a):;
phdS(skD1(a); skD1(skD1(a))); d(skD1(skD1(a)))</p>
          <p>p(skD1(a)):;
: : : g</p>
          <p>Now, let X2 = X1 [ fgC(a; m)g and PU2 = PU [
fgC(a; m):g.</p>
          <p>Here, l(a),gC(a; m) is a ground instance of the negative
body of the rule
phdS(a; skD1(a)); d(skD1(a))
p(a); not (l(a); gC(a; Y )):
that is included in X2. Thus, the rule is excluded from the
reduct. Other rules are kept. The obtained program is then:
PG(sk(PU [ fgC(a; m):g))X[fgC(a;m)g = f
gC(a; m):;
p(a):;
l(a):;
phdS(skD1(a); skD1(skD1(a))); d(skD1(skD1(a)))</p>
          <p>p(skD1(a)):;
: : : g</p>
          <p>Note that the reduct of a program that is Skolemized and
partially grounded is a definite ground program: it no longer
contains variables. The consequence operator can then be
defined as usual, the only difference is that rules can have a
conjunction of atoms as head.</p>
          <p>Definition 6 (TP consequence operator and Cn its closure)
Let P be a definite partial ground program of an 9-program
of language LP . The operator TP : 2GA(LP ) ! 2GA(LP )
is defined by</p>
          <p>TP (X) = fajr 2 P; a 2 head(r); body+(r)
Xg:
Cn(P ) = Sn=+1 TPn(;) is the least fix-point of the
consen=0
quence operator TP .</p>
          <p>Example 6 (Example 1 continued)
Cn(PG(sk(PU ))X ) = X but Cn(PG(sk(PU [
fgC(a; m):g))X[fgC(a;m)g) = fp(a); l(a); gC(a; m)g.</p>
        </sec>
        <sec id="sec-2-1-5">
          <title>Definition 7 (9-answer set) Let P be an 9-program of lan</title>
          <p>guage LP and X GA(Lsk(P )). X is an 9-answer set of
P if and only if X = Cn(PG(sk(P ))X ).</p>
        </sec>
        <sec id="sec-2-1-6">
          <title>Example 7 (Example 1 continued) X is an 9-answer set</title>
          <p>of PU and fp(a); l(a); gC(a; m)g is an 9-answer set of PU [
fgC(a; m):g.</p>
          <p>Proposition 3 Let P be a (classical) ASP program of
language LP and X GA(LP ). X is an answer set of P
if and only if X is an 9-answer set of P considered as an
9-program.</p>
          <p>Proof 3 Since P is a classical ASP program, sk(P ) = P
and its (classical) ground ASP program corresponds
exactly to PG(P ) = PG(sk(P )). Hence X 2 GA(LP ) =
GA(Lsk(P )) is an answer set of ground P , by Definition 7,
if and only if it is an 9-answer set of P considered as an
9-program.</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>From 9-ASP to ASP</title>
        <p>In this section, we give the translation of an 9-ASP program
into a standard ASP program and we show that the 9-answer
sets of the initial program correspond to the answer sets of
the new program.</p>
        <p>The first step of the translation is the normalization whose
goal is twofold: to remove the conjunctions of atoms from
negative parts of the rules and to remove existential variables
from these negative parts. The obtained program is
equivalent in terms of answer sets.</p>
        <p>Definition 8 Let P be an 9-program of language LP . Let r
be an 9-rule of P (m; s 0, n; u1; : : : ; us 1):
with H1; : : : ; Hn; B1; : : : ; Bm; N11; : : : ; Nu11 ; : : : ; N1s; : : : ;
Nuss 2 A(LP ). Let N be a set of new predicate symbols
(i.e. N \ PS = ;).</p>
        <p>The normalization of such an 9-rule is the set of 9-rules</p>
        <p>N1s; : : : ; Nuss :g
N(r) =
f H1; : : : ; Hn B1; : : : ; Bm; not N1; : : : ; not Ns:;
N1 N11; : : : ; Nu11 :;
: : :</p>
        <p>Ns
with Ni the new atom pNi (X1; : : : ; Xv), pNi 2 N a new
predicate symbol for every Ni and V8(r)(N1i; : : : ; Nuii ) =
fX1; : : : ; Xvg.</p>
        <p>The normalization of P is defined as N(P ) =
Sr2P N(r).</p>
        <p>Set GAN(Lsk(P )) is the set of Skolem ground atoms for
the new predicate symbols defined as follows:
if a 2 N with ar(a) = 0 then a 2 GAN(Lsk(P )),
if p 2 N with ar(p) &gt; 0 and t1; : : : ; tn 2 GT(Lsk(P ))
then p(t1; : : : ; tn) 2 GAN(Lsk(P )).</p>
        <p>Example 8 (Example 1 continued) Let pN be a new
predicate symbol. The negative part of the rule r2:
not(l(X); gC(X; Y )) has only one universal variable, X.
It is replaced by not pN (X) (rule r2y). And a new rule rz
2
is added where Y that was an existential variable in r2
becomes a universal one in r2z.</p>
        <p>N(r2) = f
r2y : phdS(X; D); d(D) p(X); not pN (X):
r2z : pN (X) l(X); gC(X; Y ):g
and N(PU ) = fr0; r1; r2y; r2zg.</p>
        <p>The following proposition shows that normalization
preserves answer sets of an 9-program: it only adds some atoms
formed with the new predicate symbols from N .
Proposition 4 Let P be an 9-program of language LP and
X GA(Lsk(P )). If X is an 9-answer set of P then there
exists Y GAN(Lsk(P )) such that X [ Y is an 9-answer
set of N(P ). If X is an 9-answer set of N(P ) then X n
GAN(Lsk(P )) is an 9-answer set of P .</p>
        <p>The lemma used in the following proof shows that if the
normalization is applied on only one rule r and only one part
of the negative body of this rule, then the answer sets of the
original program are preserved up to the added atom. If r
has the following form:
then the ”partial normalization” of r for (N1s; : : : ; Nuss )
leads to the rules
ry = H1; : : : ; Hn</p>
        <p>B1; : : : ; Bm;
not (N11; : : : ; Nu11 ); : : : ; not (N1s 1; : : : ; Nuss 11 ); not Ns:
and rz=Ns N1s; : : : ; Nuss . A program P with the rule
r and the program P where the rule r is replaced by the
rules ry and rz have the same answer sets except for Ns.
The proof can be constructed by induction by applying the
lemma to each part of the negative body of r and, then, to
each rule of the program.</p>
        <p>Proof 4 The proof is by induction on the following lemma:
Let P be an 9-program of language LP , r = (H
C; not (N1; : : : ; Nu):) 2 PG(sk(P )), P 0 = PG(sk(P )) n
frg, ry = (H C; not N:) 2 PG(sk(N(P ))), Rz =
PG(N N1; : : : ; Nu:) PG(sk(N(P ))) and X
GA(Lsk(P )).</p>
        <p>If there exists a substitution such that
f (N1); : : : ; (Nu)g X then Cn((P 0 [ frg)X ) = X
if and only if Cn((P 0 [ fryg [ Rz)X[fNg) = X [ fN g.
If for all substitutions , f (N1); : : : ; (Nu)g 6 X
then Cn((P 0 [ frg)X ) = X if and only if
Cn((P 0 [ fryg [ Rz)X ) = X.</p>
        <p>Let us remark that N 62 Cn(P 0X ) [ X.</p>
        <p>If there exists a substitution such that
f (N1); : : : ; (Nu)g X then (P 0 [ frg)X = P 0X =
(P 0 [ fryg)X[fNg then Cn((P 0 [ f g
r )X ) = Cn(P 0X )
and Cn((P 0 [ fryg [ Rz)X[fNg) = Cn(P 0X ) [ fN g.
Then Cn((P 0 [ frg)X ) = X iff Cn(P 0X ) = X iff
Cn(P 0X ) [ fN g = X [ fN g iff Cn((P 0 [ fryg [
Rz)X[fNg) = X [ fN g.</p>
        <p>If for all substitutions , f (N1); : : : ; (Nu)g 6 X then
(RPz0)X[ frg)X = (P 0 [ fH C:g)X and (P 0 [ fryg [
= (P 0 [ fH C:g)X [ Rz. Then Cn((P 0 [
frg)X ) = Cn((P 0 [ fH C:g)X ) = Cn((P 0 [ fH
Cr:g))XX)[=RXz) =iff CCnn((((PP00 [ fryg [ Rz)X ) = X.</p>
        <p>[ fryg [ Rz)X ). Then Cn((P 0 [
f g
Example 9 (Example 1 continued) Program PU , after
normalization, is Skolemized and grounded. After
normalization and Skolemization, the program no longer contains
existential variables. Thus, after grounding, it does not
contain any more variables.</p>
        <p>PG(sk(N(PU ))) = f
p(a):;
l(a);
phdS(a; skD1(a)); d(skD1(a)) p(a); not pN (a):
pN (a) l(a); gC(a; a):;
pN (a) l(a); gC(a; skD1(a)):;
: : :;
phdS(skD1(a); skD1(skD1(a))); d(skD1(skD1(a)))
p(skD1(a)); not pN (skD1(a)):;
pN (skD1(a)) l(skD1(a)); gC(skD1(a); a):;
pN (skD1(a)) l(skD1(a)); gC(skD1(a); skD1(a)):;
: : : g</p>
        <p>The following proposition shows that Skolemization and
grounding preserve answer sets of a normalized 9-program.
Proposition 5 Let P be a normalized 9-program of
language LP and X GA(Lsk(P )). X is an 9-answer set
of P if and only if X is an 9-answer set of PG(sk(P )).
Proof 5 Since for all r 2 PG(sk(P )); VN9(r) = ; (since
r is normalized), VN9(r) = V(r) and VH9(r) = ; (since
r is Skolemized) then PG(sk(P )) = sk(PG(sk(P ))) =
PG(sk(PG(sk(P )))).</p>
        <p>By Definition 7, X is an 9-answer set of P iff X =
Cn(PG(sk(P ))X ) iff X = Cn(PG(sk(PG(sk(P ))))X )
iff X is an 9-answer set of PG(sk(P )).</p>
        <p>Once an 9-program is normalized and Skolemized, the
only non-standard parts that remain are the conjunctions of
atoms in rule heads. The last step of the translation is the
expansion where we remove the sets of atoms in each head
while keeping the link between the existential variables. It
simply consists to duplicate a rule as many time as the rule
contains atoms in its head, each new rule having only one
of these atoms in its head. Preceding Skolemization allows
to preserve the links between the existential variables of the
head. The obtained program is equivalent in terms of answer
sets.</p>
        <p>Definition 9 Let P be a ground Skolemized normalized
program and r 2 P (m; s 0, n &gt; 0):</p>
        <p>H1; : : : ; Hn
with H1; : : : ; Hn; B1; : : : ; Bm; N1; : : : ; Ns 2 GA(LP ).</p>
        <p>The expansion of such a rule is the set defined by:
Exp(r) =
f H1
: : :
Hn</p>
        <p>B1; : : : ; Bm; not N1; : : : ; not Ns:;</p>
        <p>B1; : : : ; Bm; not N1; : : : ; not Ns:g
The expansion of P is defined as Exp(P )
=
Sr2P Exp(r).</p>
        <p>Example 10 (Example 1 continued) The following rule of
the program from Example 9:</p>
        <p>phdS(a; skD1(a)); d(skD1(a)) p(a); not pN (a): is
splitted into the two rules:
phdS(a; skD1(a)) p(a); not pN (a): and
d(skD1(a)) p(a); not pN (a):</p>
        <p>The same treatment is applied to the other rules with both
predicates phdS and d in the head.</p>
        <p>The following program is obtained:
Exp(PG(sk(N(PU )))) = f
p(a):;
l(a):;
phdS(a; skD1(a)) p(a); not pN (a):;
d(skD1(a)) p(a); not pN (a):;
pN (a) l(a); gC(a; a):;
pN (a) l(a); gC(a; skD1(a)):;
: : : ;
phdS(skD1(a); skD1(skD1(a)))</p>
        <p>p(skD1(a)); not pN (skD1(a)):;
d(skD1(skD1(a))) p(skD1(a)); not pN (skD1(a)):;
pN (skD1(a)) l(skD1(a)); gC(skD1(a); a):;
pN (skD1(a)) l(skD1(a)); gC(skD1(a); sk(a)):;
: : : g
Proposition 6 Let P be a ground Skolemized normalized
9-program of language LP and X GA(LP ). X is an
9-answer set of P if and only if X is an 9-answer set of
Exp(P ).</p>
        <p>Proof 6 The only difference is on the computation of the
fixpoint of (classical) TP operator and new TP operator
defined in Definition 6 and clearly enough fix-point are
identical since P is ground.</p>
        <p>Proposition 7 Let P be an 9-program.
Exp(PG(sk(N(P )))) is an (ground classical) ASP
program.</p>
        <p>Proof 7 This proposition is a direct consequence of
Definitions 3, 4, 8, 9 and Proposition 2.</p>
        <p>The last proposition establishes equivalence, up to new
atoms introduced by normalization, between 9-answer sets
of an 9-program and classical answer sets of the program
after normalization, Skolemization and expansion.
Proposition 8 Let P be an 9-program of language LP and
X GA(Lsk(P )). If X is an 9-answer set of P then
there exists Y GAN(Lsk(P )) such that X [ Y is a
(classical) answer set of Exp(PG(sk(N(P )))). If X is
a (classical) answer set of Exp(PG(sk(N(P )))), then
X n GAN(Lsk(P )) is an 9-answer set of P .</p>
        <p>Proof 8 Let P be an 9-program and X
GA(Lsk(P )).
if X is an 9-answer set of P then, by proposition 4,
there exists Y GAN(Lsk(P )) such that X [ Y is
an 9-answer set of N(P ). By proposition 5, X [ Y is
an 9-answer set of PG(sk(N(P ))). By proposition 6,
X [ Y is an 9-answer set of Exp(PG(sk(N(P )))).
By propositions 3 and 7, X [ Y is an answer set of
Exp(PG(sk(N(P )))).</p>
        <p>If X is a (classical) answer set of Exp(PG(sk(N(P ))))
then, by propositions 3 and 7, X is an 9-answer set
of Exp(PG(sk(N(P )))). By proposition 6, X is an
9-answer set of PG(sk(N(P ))). By proposition 5, X
is an 9-answer set of N(P ). By proposition 4, X n
GAN(Lsk(P )) is an 9-answer set of P .</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>This paper is a first step of formalisation of ASP allowing
the use of existential variables. It is well suited to integrate
ontologies and rules in a unique formalism.</p>
      <p>
        From a practical point of view, the proposed translation
from 9-ASP to ASP allows us to use any solver. But let us
note that we have implemented this translation as a
frontend of the solver ASPeRiX which uses on-the-fly grounding
        <xref ref-type="bibr" rid="ref18">(Lefe`vre et al. 2015)</xref>
        . This should help, in the future, for
dealing with variables in a more efficient way.
      </p>
      <p>
        An in-depth comparison with other formalisms remains
to be done. One of the closest work is
        <xref ref-type="bibr" rid="ref4">(Baget et al. 2014b)</xref>
        dealing with existential rules extended with non monotonic
negation. In this work, existential variables are only allowed
in the rule heads, not in the negative bodies. ASPeRiX
semantics (defined via a notion of computation inspired from
        <xref ref-type="bibr" rid="ref20">(Liu et al. 2010)</xref>
        ) is adapted for defining different chases
(forward chaining algorithms) for non monotonic
existential rules. Our present work should be linked to one of these
chases, the Skolem-chase.
      </p>
      <p>Another ongoing work is to deal efficiently with queries in
this framework. This is not obvious due to the nonmonotonic
aspect of ASP and the potential inconsistency of an ASP
program. It seems that very little work has been done on
these aspects.</p>
    </sec>
    <sec id="sec-4">
      <title>Acknowledgements</title>
      <p>This work received support from ANR (French National
Research Agency), ASPIQ project reference
ANR-12-BS020003.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Alviano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ; Leone, N.; and Manna,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>Disjunctive datalog with existential quantifiers: Semantics, decidability, and complexity issues</article-title>
          .
          <source>Theory Pract</source>
          . Log. Program.
          <volume>12</volume>
          (
          <issue>4-5</issue>
          ):
          <fpage>701</fpage>
          -
          <lpage>718</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          2014a.
          <article-title>Extending acyclicity notions for existential rules</article-title>
          .
          <source>In ECAI 2014 - 21st European Conference on Artificial Intelligence</source>
          ,
          <fpage>18</fpage>
          -22
          <source>August</source>
          <year>2014</year>
          , Prague, Czech Republic,
          <fpage>39</fpage>
          -
          <lpage>44</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Baget</surname>
            ,
            <given-names>J.-F.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Garreau</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Mugnier</surname>
          </string-name>
          , M.-L.; and
          <string-name>
            <surname>Rocher</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <year>2014b</year>
          .
          <article-title>Revisiting Chase Termination for Existential Rules and their Extension to Nonmonotonic Negation</article-title>
          . In Konieczny, S., and
          <string-name>
            <surname>Tompits</surname>
          </string-name>
          , H., eds.,
          <source>NMR'2014: 15th International Workshop on Non-Monotonic Reasoning, volume INFSYS Research Report Series.</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Cali</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ; Lukasiewicz,
          <string-name>
            <given-names>T.</given-names>
            ;
            <surname>Marnette</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ; and
            <surname>Pieris</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          <year>2010</year>
          . Datalog+/
          <article-title>-: A family of logical knowledge representation and query languages for new applications</article-title>
          .
          <source>In 25th Annual IEEE Symposium on Logic in Computer Science (LICS)</source>
          ,
          <year>2010</year>
          ,
          <fpage>228</fpage>
          -
          <lpage>242</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          2010.
          <article-title>A semantical framework for hybrid knowledge bases</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Knowl</surname>
          </string-name>
          . Inf. Syst.
          <volume>25</volume>
          (
          <issue>1</issue>
          ):
          <fpage>81</fpage>
          -
          <lpage>104</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ; Schindlauer, R.; and Tompits,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>Dlv-hex: Dealing with semantic web under answer-set programming</article-title>
          .
          <source>In 4th International Semantic Web Conference (ISWC</source>
          <year>2005</year>
          )
          <article-title>-</article-title>
          Posters
          <string-name>
            <surname>Track</surname>
          </string-name>
          , Galway, Ireland,
          <year>November 2005</year>
          .
          <article-title>System poster</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ; Lukasiewicz,
          <string-name>
            <given-names>T.</given-names>
            ;
            <surname>Schindlauer</surname>
          </string-name>
          , R.; and Tompits,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <year>2008</year>
          .
          <article-title>Combining answer set programming with description logics for the semantic web</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>172</volume>
          (
          <issue>12</issue>
          - 13):
          <fpage>1495</fpage>
          -
          <lpage>1539</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Fink</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Krennwallner</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Redl</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <article-title>hex-programs with existential quantification</article-title>
          . In Hanus, M., and
          <string-name>
            <surname>Rocha</surname>
          </string-name>
          , R., eds.,
          <source>Declarative Programming and Knowledge Management</source>
          ,
          <string-name>
            <surname>KDPD</surname>
          </string-name>
          <year>2013</year>
          , volume
          <volume>8439</volume>
          of Lecture Notes in Computer Science,
          <volume>99</volume>
          -
          <fpage>117</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <surname>Ferraris</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <year>2011</year>
          .
          <article-title>Stable models and circumscription</article-title>
          .
          <source>Artificial Intelligence</source>
          <volume>175</volume>
          :
          <fpage>236</fpage>
          -
          <lpage>263</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <year>1988</year>
          .
          <article-title>The stable model semantics for logic programming</article-title>
          . In Kowalski, R. A., and
          <string-name>
            <surname>Bowen</surname>
          </string-name>
          , K., eds.,
          <source>Proceedings of the Fifth International Conference and Symposium on Logic Programming (ICLP'88)</source>
          ,
          <fpage>1070</fpage>
          -
          <lpage>1080</lpage>
          . Cambridge, Massachusetts: The MIT Press.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ; Eiter,
          <string-name>
            <given-names>T.</given-names>
            ;
            <surname>Tompits</surname>
          </string-name>
          , H.; and Schindlauer,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <article-title>Nlp-dl: A kr system for coupling nonmonotonic logic programs with description logics</article-title>
          .
          <source>In The Forth International Semantic Web Conference (ISWC2005).</source>
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Palla</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <year>2011</year>
          .
          <article-title>Integrating rules and ontologies in the first-order stable model semantics (preliminary report)</article-title>
          .
          <source>In Logic Programming and Nonmonotonic Reasoning - 11th International Conference, LPNMR 2011</source>
          , Vancouver, Canada, May
          <volume>16</volume>
          -19,
          <year>2011</year>
          . Proceedings,
          <volume>248</volume>
          -
          <fpage>253</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          <string-name>
            <surname>Lefe</surname>
          </string-name>
          `vre, C.; Be´atrix, C.; Ste´phan, I.; and
          <string-name>
            <surname>Garcia</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          <string-name>
            <surname>Asperix</surname>
          </string-name>
          ,
          <article-title>a first order forward chaining approach for answer set computing</article-title>
          .
          <source>CoRR abs/1503</source>
          .07717:(to appear in TPLP).
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Pontelli</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Son</surname>
            , T. C.; and Truszczynski,
            <given-names>M.</given-names>
          </string-name>
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          <article-title>Logic programs with abstract constraint atoms: The role of computations</article-title>
          .
          <source>Artificial Intelligence</source>
          <volume>174</volume>
          (
          <issue>3-4</issue>
          ):
          <fpage>295</fpage>
          -
          <lpage>315</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          <string-name>
            <surname>Magka</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ; Kro¨tzsch, M.; and
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          <year>2013</year>
          .
          <article-title>Computing stable models for nonmonotonic existential rules</article-title>
          .
          <source>In IJCAI 2013, Proceedings of the 23rd International Joint Conference on Artificial Intelligence</source>
          , Beijing, China,
          <source>August 3-9</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <year>2010</year>
          .
          <article-title>Reconciling description logics and rules</article-title>
          .
          <source>J. ACM</source>
          <volume>57</volume>
          (
          <issue>5</issue>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <year>2006</year>
          .
          <article-title>Dl+log: Tight integration of description logics and disjunctive datalog</article-title>
          .
          <source>In Proceedings, Tenth International Conference on Principles of Knowledge Representation and Reasoning</source>
          ,
          <source>Lake District of the United Kingdom, June 2-5</source>
          ,
          <year>2006</year>
          ,
          <fpage>68</fpage>
          -
          <lpage>78</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          <string-name>
            <surname>You</surname>
            ,
            <given-names>J.-H.</given-names>
          </string-name>
          ; Zhang, H.; and Zhang,
          <string-name>
            <surname>Y.</surname>
          </string-name>
          <year>2013</year>
          .
          <article-title>Disjunctive logic programs with existential quantification in rule heads</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          <source>Theory and Practice of Logic Programming</source>
          <volume>13</volume>
          :
          <fpage>563</fpage>
          -
          <lpage>578</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>