<!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>Reasoning with Forest Logic Programs Using Fully Enriched Automata</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Cristina Feier</string-name>
          <email>cristina.feier@cs.ox.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Thomas Eiter</string-name>
          <email>eiter@kr.tuwien.ac.at</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Oxford</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute of Information Systems, Vienna University of Technology</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Forest Logic Programs (FoLP) are a decidable fragment of Open Answer Set Programming (OASP) which have the forest model property. OASP extends Answer Set Programming (ASP) with open domains-a feature which makes it possible for FoLPs to simulate reasoning with the expressive description logic SHOQ. At the same time, the fragment retains the attractive rule syntax and the non-monotonicity specific to ASP. In the past, several tableaux algorithms have been devised to reason with FoLPs, the most recent of which established a NEXPTIME upper bound for reasoning with the fragment. While known to be EXPTIME-hard, the exact complexity characterization of reasoning with the fragment was still unknown. In this paper we settle this open question by a reduction of reasoning with FoLPs to emptiness checking of fully enriched automata, a form of automata which run on forests, and which are known to be EXPTIME-complete.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <sec id="sec-1-1">
        <title>Open Answer Set Programming (OASP) (Heymans,</title>
      </sec>
      <sec id="sec-1-2">
        <title>Van Nieuwenborgh, and Vermeir 2008) extends Answer Set</title>
        <p>
          Programming (ASP)
          <xref ref-type="bibr" rid="ref13">(Gelfond and Lifschitz 1988)</xref>
          with an
open domain semantics: programs are interpreted w.r.t.
arbitrary domains that might contain individuals which do
not occur explicitly in the program. This makes it
possible to state generic knowledge using OASP. At the same
time, OASP inherits from ASP the negation under the
stable model semantics. Thus, OASP bridges two important
knowledge representation paradigms: the classical First
Order Logic (FOL) open world and the non-monotonic rules
closed world. It is part of a broad line of research which
includes approaches like DL-safe rules (Motik, Sattler, and
        </p>
        <sec id="sec-1-2-1">
          <title>Studer 2005), DL+log (Rosati 2006), dl-programs (Eiter</title>
          <p>
            et al. 2008), Description Logic Rules
            <xref ref-type="bibr" rid="ref17">(Kro¨tzsch, Rudolph,
and Hitzler 2008)</xref>
            , r-hybrid knowledge bases
            <xref ref-type="bibr" rid="ref22">(Rosati 2008)</xref>
            ,
Datalog
            <xref ref-type="bibr" rid="ref2 ref6 ref9">(Cal`ı, Gottlob, and Lukasiewicz 2009)</xref>
            , MKNF+
knowledge bases
            <xref ref-type="bibr" rid="ref19">(Motik and Rosati 2010)</xref>
            , and
Nonmonotonic Existential Rules
            <xref ref-type="bibr" rid="ref10 ref18">(Magka, Kro¨tzsch, and Horrocks
2013)</xref>
            .
          </p>
          <p>Copyright c 2015 for this paper by its authors. Copying permitted
for private and academic purposes.</p>
        </sec>
      </sec>
      <sec id="sec-1-3">
        <title>In general, OASP is undecidable. To achieve decidability,</title>
        <p>several fragments have been defined by imposing
syntactical restrictions on the shape of rules. Such a fragment are</p>
      </sec>
      <sec id="sec-1-4">
        <title>Forest Logic Programs (FoLP) which enjoy the forest model</title>
        <p>property: a unary predicate is satisfiable iff it is satisfied by
a model that can be represented as a labeled forest, where
nodes and arcs are labeled with sets of unary predicates and
binary predicates, respectively.</p>
        <p>
          FoLPs are quite an expressive fragment as they allow, for
instance, the simulation of standard reasoning tasks (like
concept satisfiability and KB consistency) with SHOQ
ontologies
          <xref ref-type="bibr" rid="ref10">(Feier and Heymans 2013)</xref>
          . This property of FoLPs
led to f-hybrid KBs, a combination of rules and ontologies
which distinguish themselves among other approaches like
dl-safe rules, r-hybrid knowledge bases, or MKNF+
knowledge bases, by the fact that they impose no restrictions on the
interaction between the signatures of the two components.
        </p>
      </sec>
      <sec id="sec-1-5">
        <title>Such restrictions prevent the need for reasoning with un</title>
        <p>known individuals in the rule component. As f-hybrid KBs
are based on the simulation of SHOQ KBs within FoLPs,
no such restriction is needed. Conceptual modeling using</p>
        <sec id="sec-1-5-1">
          <title>FoLPs is not restricted to simulating reasoning with SHOQ</title>
        </sec>
      </sec>
      <sec id="sec-1-6">
        <title>KBs: it is also possible to translate object-role modeling</title>
        <p>
          (ORM) models as sets of FoLP rules, e.g.
          <xref ref-type="bibr" rid="ref14 ref16">(Heymans 2006)</xref>
          .
        </p>
      </sec>
      <sec id="sec-1-7">
        <title>As they can simulate reasoning within the Description</title>
        <p>
          Logic (DL) SHOQ, it follows that reasoning with FoLPs
is EXPTIME-hard. However, the exact complexity
characterization of FoLPs was still open. Previously, reasoning
with FoLPs was addressed by means of tableau-based
algorithms:
          <xref ref-type="bibr" rid="ref10">(Feier and Heymans 2013)</xref>
          described a 2NEXPTIME
tableau algorithm, while an improved algorithm which runs
in the worst case in NEXPTIME has been described in
          <xref ref-type="bibr" rid="ref11">(Feier
2012)</xref>
          . While in the latter work it has been speculated that
the non-deterministic tableau algorithm can be determinized
in order to lead to an EXPTIME procedure which would be
worst-case optimal, the determinization in the case of FoLPs
proved elusive. Such a deterministic worst-case optimal
algorithm has been devised for CoLPs, which restrict FoLPs to
programs without constants, and simple FoLPs, a fragment
in which recursion is restricted: the technique does not scale
up to FoLPs (see
          <xref ref-type="bibr" rid="ref12">(Feier 2014)</xref>
          ).
        </p>
        <p>In this paper, we settle the open question regarding the
exact complexity characterization of FoLPs: by using a
reduction to emptiness checking of Fully Enriched Automata
(FEAs), we show that satisfiability checking of unary
predicates w.r.t. FoLPs is EXPTIME-complete. Hence, reasoning
with FoLP rules and SHOQ ontologies is not harder than
reasoning with SHOQ ontologies themselves.</p>
        <p>
          Fully enriched automata have been introduced in
          <xref ref-type="bibr" rid="ref1">(Bonatti et al. 2008)</xref>
          as a tool to reason with hybrid graded
calculus, which extends -calculus with graded modalities
and nominals. They offer an elegant device for our
encoding as they accept forests as inputs and also feature a parity
acceptance condition that is useful in distinguishing
wellsupported models
          <xref ref-type="bibr" rid="ref8">(Fages 1991)</xref>
          , a fundamental
characteristic of (open) answer sets. However, FoLPs exhibit a specific
form of the forest model property, in which every node can
point back to any root of the forest, and as such the encoding
is not without its challenges.
        </p>
      </sec>
      <sec id="sec-1-8">
        <title>The automata-based method has been previously applied</title>
        <p>to reason with CoLPs (Heymans, Van Nieuwenborgh, and</p>
      </sec>
      <sec id="sec-1-9">
        <title>Vermeir 2006): satisfiability checking of unary predicates</title>
        <p>
          w.r.t. a CoLP has been reduced to non-emptiness checking
of two-way alternating tree automata (2ATA)
          <xref ref-type="bibr" rid="ref24">(Vardi 1998)</xref>
          .
        </p>
      </sec>
      <sec id="sec-1-10">
        <title>2ATAs have also been used to check consistency of nor</title>
        <p>mal bidirectional ASP programs (bd-programs) (Eiter and</p>
        <sec id="sec-1-10-1">
          <title>Sˇ imkus 2009), which are a decidable fragment of ASP ex</title>
          <p>tended with function symbols that also exhibit the tree model
property. In the context of DL, 2ATAs have been employed
to check concept satisfiability (Calvanese, Giacomo, and</p>
        </sec>
        <sec id="sec-1-10-2">
          <title>Lenzerini 2002) and satisfiability of ALCQIbreg KBs (Cal</title>
          <p>vanese, Eiter, and Ortiz 2007)–in the latter case, canonical
models are forest-shaped, and as such they were encoded as
trees in order to be processed using 2ATAs. In the case of</p>
        </sec>
      </sec>
      <sec id="sec-1-11">
        <title>FoLPs, it is not clear how such an encoding would work due</title>
        <p>to the special form of their forest model property. Finally,</p>
        <sec id="sec-1-11-1">
          <title>FEAs were used to encode satisfiability checking of ZOIQ</title>
          <p>
            concepts
            <xref ref-type="bibr" rid="ref4 ref6 ref9">(Calvanese, Eiter, and Ortiz 2009)</xref>
            .
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <sec id="sec-2-1">
        <title>We start by introducing the open answer set syntax and se</title>
        <p>
          mantics
          <xref ref-type="bibr" rid="ref15">(Heymans, Van Nieuwenborgh, and Vermeir 2008)</xref>
          .
We assume countably infinite disjoint sets of constants,
variables, and predicate symbols. Terms and atoms are defined
as usual. We refer to an atom where the predicate symbol is
unary or binary, as a unary or binary atom, resp. A literal is
an atom a or a negated atom not a. We allow for inequality
literals of the form s 6= t, where s and t are terms. A literal
that is not an inequality literal will be called a regular literal.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>For a set S of literals or (possibly negated) predicates,</title>
        <p>S+ = fa j a 2 Sg and S = fa j not a 2 Sg. If S is a
set of (possibly negated) predicates of arity n and t1; : : : ; tn
are terms, then S(t1; : : : ; tn) = fl(t1; : : : ; tn) j l 2 Sg. For
a set S of atoms, not S = fnot a j a 2 Sg.</p>
        <p>A program is a finite set of rules r : , where is a
finite set of regular literals and is a finite set of literals. We
denote as head(r)/body(r) the set / , where / stands for
a disjunction/conjunction.</p>
        <p>Atoms, literals, rules, and programs that do not contain
variables are ground. For a rule or a program R, let vars(R),
preds(R), and cts(R) be the sets of variables, predicates,
and constants that occur in R, resp. A universe U for P is
a non-empty countable superset of the constants in P : U
cts(P ). We call PU the ground program obtained from P
by substituting every variable in P by every element in U .</p>
        <sec id="sec-2-2-1">
          <title>Let BP be the set of regular atoms that can be formed from</title>
          <p>a ground program P .</p>
          <p>An interpretation I of a ground program P is a subset
of BP . We write I j= p(t1; : : : ; tn) if p(t1; : : : ; tn) 2 I
and I j= not p(t1; : : : ; tn) if I 6j= p(t1; : : : ; tn). Also, for
ground terms s; t, we write I j= s 6= t if s 6= t. For a set of
ground literals L, I j= L if I j= l for every l 2 L. A ground
rule r : is satisfied w.r.t. I, denoted I j= r, if I j= l
for some l 2 whenever I j= . A ground constraint
is satisfied w.r.t. I if I 6j= .</p>
        </sec>
      </sec>
      <sec id="sec-2-3">
        <title>For a positive ground program P , i.e., a program without</title>
        <p>not , an interpretation I of P is a model of P if I satisfies
every rule in P ; it is an answer set of P if it is a - minimal
model of P . When P is definite (does not contain
disjunction) the minimal model of P can be computed using the
well-known TP operator: for a set of atoms B, let TP (B) =
B [ fa j a 2 P ^ B j= g. Then, let TP0 (B) = B and
T i+1(B) = TP (TPi (B)); the minimal model (answer set)</p>
        <p>P
of P , M(P ), is defined as S1</p>
        <p>i=0 TPn(;). The derivation level
of an atom a in M(P ), level(a; M(P )), is the least integer
k such that a 2 T k (;). For ground programs P containing</p>
        <p>
          P
not , the GL-reduct
          <xref ref-type="bibr" rid="ref13">(Gelfond and Lifschitz 1988)</xref>
          w.r.t. I is
defined as P I , where P I contains + + for in
P , I j= not and I j= . I is an answer set of a ground
P if I is an answer set of P I .
        </p>
        <p>
          An open interpretation of a program P is a pair (U; M )
where U is a universe for P and M is an interpretation
of PU . An open answer set of P is an open
interpretation (U; M ) of P , with M an answer set of PU . For every
atom a 2 M , where (U; M ) is an open answer set of P ,
level(a; M(PUM ) = M ) is finite
          <xref ref-type="bibr" rid="ref14 ref16">(Heymans 2006)</xref>
          .
        </p>
        <p>
          Trees and forests: we introduce notation for trees and
forests which extend those in
          <xref ref-type="bibr" rid="ref24">(Vardi 1998)</xref>
          . Let be a
concatenation operator between sequences of constants or
natural numbers, N+ be the set of positive integers, and hN+i
be the set of all sequences of positive integers formed using
the concatenation operator. We denote with " the empty
sequence: for every constant or natural number c, c " = c. A
tree T with root c, also denoted as Tc, is a set of nodes, where
each node is a sequence of the form c s, where s 2 hN+i,
and for every x d 2 Tc, d 2 N+, it must be the case that
x 2 Tc. When the root of the tree is irrelevant, we will
simply refer to the tree as T .
        </p>
        <p>Given a tree T , its set of arcs is AT = f(x; y) j x; y 2
TT;j9yn =2 xN+i:;yi =2 xN +ng. We denote with succT (x) = fy 2
g the successors of a node x in T . For
a node y = x i 2 T , precT (y) = x.</p>
        <sec id="sec-2-3-1">
          <title>A forest F is a set of trees fTc j c 2 Cg, where C is a</title>
          <p>finite set of arbitrary constants. The set of nodes, NF , and
the set of arcs, AF , of a forest F are defined as: NF =
[T 2F T , and AF = [T 2F AT , resp. For a node x 2 NF ,
let succF (x) = succT (x), where x 2 T and T 2 F . For a
node y = x i 2 T and T 2 F , precF (y) = precT (y) = x.</p>
          <p>An interconnected forest EF is a tuple (F; ES ), where
F = fTc j c 2 Cg is a forest and ES NF C. The sets
of nodes NEF and arcs AEF of an interconnected forest EF
are defined as: NEF = NF , and AEF = AF [ ES , resp.</p>
        </sec>
      </sec>
      <sec id="sec-2-4">
        <title>A -labelled forest is a tuple (F; f ) where F is an inter</title>
        <p>connected forest/tree and f : NF ! is a labelling
function, with being a set of arbitrary symbols.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Forest Logic Programs</title>
      <p>Forest Logic Programs (FoLPs) are a fragment of OASP
which have the forest model property. They allow only for
unary and binary predicates and tree-shaped rules. The
treelike structure of rules refers to the chaining pattern of rule
variables: one variable can be seen as the root of a tree
and the others as descendants such that for every arc in the
tree, there is a positive binary literal in the body which
connects the two corresponding variables. Inequalities between
‘successor’ variables can also appear in the body of such a
rule; we will refer to the set of literals in the body of a rule
formed only with the ‘root’ variable as the ‘local part’ and
to the remaining part as the ‘successor part’. FoLPs allow
also for so-called ‘free’ rules, which are rules of the form:
p(~t ) _ not p(~t ) , where p is a unary/binary predicate
and ~t is a unary/binary tuple of terms.</p>
      <p>Definition 1 A forest logic program (FoLP) is an open
answer set program with only unary and binary predicates, and
s. t. a rule is either:
a free rule:
or
a unary rule:
a(s) _ not a(s)</p>
      <p>;
f (s; t ) _ not f (s; t )
(1)
(2)
(3)
(4)
a(s)</p>
      <p>(s); ( i (s; ti ); i (ti ))1 6i6m ;
with S16i6=j6mfti 6= tj g and m 2 N,
or a binary rule:
f (s; t )</p>
      <p>(s); (s; t ); (t );
where in each rule above:
– a is a unary predicate, and f is a binary predicate,
– s, t, and (ti)16i6m are distinct terms,
– ; ; and ( i)16i6m are sets of (possibly negated)
unary predicates,
– , and ( i)16i6m are sets of (possibly negated) binary
predicates,
– inequality does not appear in any : 6= 2= m, for 1 6
m 6 k, and 6=2= ;
– there is a positive atom that connects the head term s
with any successor term which is a variable: i+ 6= ;,
if ti is a variable, for every 1 6 i 6 m, and + 6= ;, if
t is a variable.</p>
      <p>A predicate q is free if it occurs in a free rule in P .
Example 1 The following program P is a FoLP: it
describes the fact that somebody who has read two different
novels is a literature lover (unary rule r1), a novel is
something written by a novelist (unary rule r2), and a novelist
is somebody who wrote at least one novel (unary rule r3).
There are three free rules describing binary predicates read,
writtenBy, and wrote as being free. Finally, there are two
facts (unary rules with empty bodies): f1 and f2.
r1 : LitLover (X ) read (X ; Y1 ); read (X ; Y2 );</p>
      <p>Novel (Y1 ); Novel (Y2 ); Y1 6= Y2
r2 : Novel (X ) wrBy (X ; Y ); Novelist (Y )
r3 : Novelist (X ) wrote(X ; Y ); Novel (Y )
r4 : read (X ; Y ) _ not read (X ; Y )
r5 : wrBy (X ; Y ) _ not wrBy (X ; Y )
r6 : wrote(X ; Y ) _ not wrote(X ; Y )
f1 : Novel (a)
f2 : Novelist (b)</p>
      <sec id="sec-3-1">
        <title>For a FoLP P , we denote with upr (P ), bpr (P ), urul (P ),</title>
        <p>and brul (P ), the sets of unary and binary predicates and
unary and binary rules which occur in P , resp.</p>
        <p>For a unary rule r of type (3), the degree of r, denoted as
deg(r), is the number k of successor variables which appear
in the rule. Intuitively, it indicates the maximum number of
successor individuals needed to make the body of the rule
true. The degree of a free rule is 0. For a unary predicate
p: deg(p) = maxfdeg(r) j p 2 preds(head(r))g: Finally,
the degree of a FoLP P is deg(P ) = Pp2upr(P ) deg(p):</p>
      </sec>
      <sec id="sec-3-2">
        <title>It over-approximates the number of successor individuals</title>
        <p>needed to satisfy all atoms of the form p(x), where p 2
upr (P ), for a given individual x.</p>
        <p>Example 2 Let P be the FoLP from Example 1. Then,
deg(LitLover) = 2, deg(N ovel) = 1, deg(N ovelist) = 1,
and thus, deg(P ) = 4.</p>
        <p>Forest models: The forest model property of an OASP P is
as follows: if a unary predicate p is satisfiable, then there
exists a model which satisfies p that can be seen as an
interconnected forest. The forest contains for each constant in P
a tree having the constant as root, and possibly an additional
tree with an anonymous root. The predicate checked to be
satisfiable, p, belongs to the label of one of the root nodes.
Definition 2 Let P be a program. A predicate p 2 upr (P )
is forest satisfiable w.r.t. P if there exist an open answer set
(U; M ) of P ; an interconnected forest EF = (fT g [ fTa j
a 2 cts(P )g; ES ), where is a constant, possibly from
cts(P ); and a labelling function ef : fT g [ fTa j a 2
cts(P )g [ AEF ! 2preds(P ) such that:
p 2 ef ( ),
U = NEF ,
ef (x) 2 2upr(P ), when x 2 T [ fTa j a 2 cts(P )g,
ef (x) 2 2bpr(P ), when x 2 AT ,
M = fp(x) j p 2 ef (x); x 2 NEF g [ ff (x; y) j f 2
ef (x; y); (x; y) 2 AEF g, and
for every (z; z i) 2 AEF : ef (z; z i) 6= ;.</p>
        <p>
          We call such a pair (U; M ) a forest model. A program P
has the forest model property, if every unary predicate p that
is satisfiable w.r.t. P , is forest satisfiable w.r.t. P .
Proposition 1 FoLPs have the forest model property.
Example 3 Consider again the FoLP P from Example 1.
Figure 1 a) depicts a forest model which satisfies the unary
predicate LitLover. Intuitively, the predicate is satisfied
at the anonymous root as there are two distinct
readsuccessors of where N ovel holds: a and 1, and thus
LitLover( ) is ‘supported’ by a ground version of rule r1.
In turn, N ovel holds at 1 as it is supported by rule r2
grounded such that X is replaced with 1 and Y is replaced
with b. Note that every atom in the model is finitely
supported: there is no infinite chain of dependencies of atoms
in the model. This is a property of (open) answer sets also
known as ‘well-supportedness’
          <xref ref-type="bibr" rid="ref8">(Fages 1991)</xref>
          .
        </p>
        <p>Consider in contrast the tentative model depicted in
Figure 1 b). There, N ovel( 1) is motivated by a
wrBysuccessor where N ovelist holds, which in turn is motivated
by a wrote-successor where N ovel holds, etc. The
interpretation is not a model, as N ovel( 1) is not finitely motivated.
One of the main challenges when designing algorithms to
reason with FoLPs is ensuring that every atom in a model is
well-supported.</p>
        <p>
          As explained in the Introduction, FoLPs can be used to
simulate reasoning with SHOQ ontologies. Thus, they can
be viewed as an integrative formalism for reasoning with
both ontologies and rules:
          <xref ref-type="bibr" rid="ref6 ref9">(Feier and Heymans 2009)</xref>
          introduces so-called f-hybrid knowledge bases (fKBs) which are
pairs of the form ( ; P ), where is a SHOQ KB and P is
a FoLP. The semantics of fKBs is defined in terms of pairs
of interpretations, one for each component, which share the
same domain and which agree on the interpretation of
common symbols between the two components. The salient
feature of f-hybrid KBs is that they impose no restriction on the
occurrence of DL symbols in the FoLP KB.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>A concept/unary predicate satisfiability preserving, poly</title>
        <p>
          nomial, and modular translation from SHOQ to FoLPs is
provided in
          <xref ref-type="bibr" rid="ref6 ref9">(Feier and Heymans 2009)</xref>
          . The translation
extends to fKBs as follows: given an fKB ( ; P ), its
translation is simply ( ) [ P . Thus, any reasoning procedure for
        </p>
      </sec>
      <sec id="sec-3-4">
        <title>FoLPs can be employed to reason with fKBs. More details about the semantics, translation, and an extended example can be found in (Feier and Heymans 2013).</title>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Fully Enriched Automata</title>
      <sec id="sec-4-1">
        <title>Fully enriched automata (FEAs) were introduced in (Bonatti</title>
        <p>et al. 2008) as a tool to reason in hybrid graded -calculus.</p>
      </sec>
      <sec id="sec-4-2">
        <title>They accept forests as input. We describe them following (Bonatti et al. 2008).</title>
        <p>For a set Y , we denote with B+(Y ) the set of
positive Boolean formulas over Y , where true and f alse are
also allowed and where ^ has precedence over _. For a
set X Y and a formula 2 B+(Y ), we say that</p>
      </sec>
      <sec id="sec-4-3">
        <title>X satisfies iff assigning true to elements in X and as</title>
        <p>signing false to elements in Y X makes true. For
b &gt; 0, let Db = fh0i; h1i; : : : ; hbig [ f[0]; [1]; : : : ; [b]g [
f 1; "; hrooti; [root]g.</p>
        <p>A fully enriched automaton (FEA) is a tuple A =
h ; b; Q; ; q0; F i, where is a finite input alphabet, b &gt; 0
is a counting bound, Q is a finite set of states, : Q !
B+(Db Q) is a transition function, q0 2 Q is an initial
state, and F = fF1; F2; : : : ; Fkg, where F1 F2 : : :
Fk = Q is a parity acceptance condition. The number k of
sets in F is the index of the automaton.</p>
        <p>A run of a FEA on a labeled forest (F; V ) is an NF
Qlabeled tree (Tc; r) such that:
r(c) = (d; q0), for some root d in F , and
for all y 2 Tc with r(y) = (x; q) and (q; V (x)) = ,
there is a (possibly empty) set S Db Q such that S
satisfies and for all (d; s) 2 S, the following hold:
– if d 2 f 1; "g, then x d is defined and there is j 2 N+
such that y j 2 Tc and r(y j) = (x d; s);
– if d = hni, then there is a set M succF (x) of
cardinality n + 1 such that for all z 2 M , there is j 2 N+
such that y j 2 Tc and r(y j) = (z; s);
– if d = [n], then there is a set M succF (x) of
cardinality n such that for all z 2 succF (x) M , there is
j 2 N+ such that y j 2 Tc and r(y j) = (z; s);
– if d = hrooti (d = [root]), then for some (all) root(s)
c 2 F there exists j 2 N+ such that y j 2 Tc and
r(y j) = (c; s);</p>
      </sec>
      <sec id="sec-4-4">
        <title>If above is true, then y does not need to have successors.</title>
        <p>Moreover, since no set S satisfies = f alse, there cannot
be any run that takes a transition with = f alse. A run is
accepting if each of its infinite paths is accepting, that is if
the minimum i for which Inf ( )\Fi 6= ;, where Inf ( ) is
the set of states occurring infinitely often in , is even. The
automaton accepts a forest iff there exists an accepting run
of the automaton on the forest. The language of A, denoted</p>
        <sec id="sec-4-4-1">
          <title>L(A), is the set of forests accepted by A. We say that A is non-empty if L(A) 6= ;.</title>
          <p>
            Theorem 1 (Corollary 4.3
            <xref ref-type="bibr" rid="ref1">(Bonatti et al. 2008)</xref>
            ) Given a
FEA A = h ; b; Q; ; q0; F i with n states and index k,
deciding whether L(A) = ; is possible in time (b +
2)O(n3 k2 log k log b2).
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>From Forest Logic Programs to Fully</title>
    </sec>
    <sec id="sec-6">
      <title>Enriched Automata</title>
      <sec id="sec-6-1">
        <title>In this section we encode satisfiability checking of unary</title>
        <p>predicates with respect to FoLPs as emptiness checking for</p>
      </sec>
      <sec id="sec-6-2">
        <title>FEAs.</title>
        <p>We start by introducing for every FoLP P and unary
predicate p a class of FEAs Ap;;P , where is one of cts(P )
or a new anonymous individual and
: cts(P ) [ f g !
2upr(P )[cts(P )[f g is a function which has the following
properties: oi 2 (oi), and oj 2= (oi), for every oi; oj 2
cts(P ) [ f g, such that oi 6= oj . Furthermore, p 2 (c),
where c is one of cts(P ) [ f g and c is if 2= cts(P ).
Intuitively Ap;;P will accept forest models of p with respect
to P encoded in a certain fashion: in particular, for every
root in the forest model, the root node will appear in its own
label; function fixes a content for the label of each root of
accepted forest models.</p>
        <p>In the following, let d = deg(P ). We will also denote
with PATP the set f g [ cts(P ) of term patterns, where
stands for a generic anonymous individual: we say that
a term t matches a term pattern pt, and write t 7! pt iff
t = pt, when t is a constant. In all other cases, the match
trivially holds. Term patterns will be used in our encoding as
a unification mechanism between terms occurring in a FoLP
(variables and constants) and elements in a universe
(anonymous individuals and constants): a variable will match with
a constant or an anonymous individual, but a constant will
match only with itself. The automata Ap;;P will run on
forests labelled using the following alphabet: = 2S , where
o
S = upr (P ) [ f1; : : : ; dg [ cts(P ) [ f g [ f"f j f 2
t
bpr (P )g [ f#f j f 2 bpr (P ); t 2 PATP g.</p>
        <p>Unlike the case for forest models, the arcs of forests
accepted by FEAs are not labelled: as such, binary
predicates occur in the label of nodes in an adorned form. These
adorned predicates are either of the form #tf , in which case
they represent an f -link between the predecessor of the
labelled node, which has term pattern t and the node itself, or
of the form "fo , in which case the current node is linked to
a constant o from P via the binary predicate f .
Additionally, besides unary predicates, labels might contain natural
numbers and constants, which will be used as an addressing
mechanism for successors of a given node and nodes which
stand for constants in accepted forests, resp. The set of states
of the automaton are as follows: Q = Qi [ Q+ [ Q , with:
Qi = fq0; q1; qo; q:kg,
Q+ = fqt;a; qt;ra ; qt1;t2;u; qt1;t2;rf ; qk;t; ;ug, and
Q</p>
        <p>= fqt;a; qt;ra ; qt1;t2;u; qt1;t2;rf ; qk;t; ;ug,
where o 2 cts(P ) [ f g, a 2 upr (P ), f 2 bpr (P ),
u is of the form a, f , not a or not f , k 2 f1; : : : ; dg,
ra 2 urul (P ), rf 2 brul (P ), and t; t1; t2 2 PATP . We
will refer to Q+ and Q as the positive and the negative
states of Ap;;P , resp. Intuitively, positive states are used to
motivate the presence of atoms in an open answer set while
negative states are used to motivate the absence of atoms in
an open answer set. Qi contains some additional states, like
q0, the initial state, q1, a state which will be visited
recursively in every node of the forest, qo, a state corresponding
to the initial visit of constant nodes, and q:k, a state which
asserts that for every node in an accepted forest there must
be at most one successor which has k in the label.</p>
        <p>We describe in detail the transition function of Ap;;P . The
initial transition prescribes that the automaton visits a root
of the forest in state qo, for every o 2 cts(P ) [ f g:
(q0; ) =
^
o2cts(P )[f g</p>
        <p>In every such state qo, it should hold that o and only o
is part of the label. Furthermore, the automaton justifies the
presence and absence of each unary predicate a and each
adorned upward binary predicate in the label1 by entering
states qo;a, qo;o0;f , qo;a, and qo;o0;f resp. At the same time
every successor of the constant node is visited in state q1.
Let coP = cts(P ) [ f g fog. Then:
(qo; ) = o 2
^</p>
        <p>^ o0 2=
o02coP
^</p>
        <p>^ ("; qo;a) ^
a2 (o)</p>
        <p>^
a2= (o)
("; qo;a) ^
^ ("; qo;o0;f ) ^
^ ("; qo;o0;f ) ^ ([0]; q1)
(6)
"fo0 2 (o)</p>
        <p>"fo0 2= (o)</p>
        <p>Whenever the automaton finds itself in state q1 it tries
to motivate the presence and absence of each unary and
adorned binary predicate in its label and then it recursively
enters the same state into each successor of the current node.
It also ensures that for each integer 1 6 k 6 d, the labels of
each but one successor do not contain k:
(q1; )=([0]; q1)^ ^ ([1]; q:k)^^("; q ;a) ^^ ("; q ;a)^
16k6d a2 a2=
^("; qt; ;f ) ^ ^("; qt; ;f ) ^^("; q ;o0;f ) ^
^ ("; q ;o0;f )
(7)
t
#f 2
#tf 2=
"fo0 2</p>
        <p>"fo0 2=
(q:k; ) = k 2= (8)</p>
        <p>To motivate the presence of a unary/binary predicate in
the label of a node, the automaton checks whether the given
predicate is free (we assume that f ree(a) evaluates to true
if a is free, and, to false, otherwise) or finds a unary/binary
rule which supports the predicate. Note the distinction
concerning the term pattern for the node where the predicate
has to hold. In the case of unary predicates, if the node is a
constant, there is first a preliminary check that we are at the
right node - this is needed as later the automaton will visit all
roots in this state. In the case of binary predicates, depending
on the term pattern, the label is checked for different types
of adorned binary atoms. In all cases, only rules whose head
terms match the given term patterns are chosen to motivate
the presence of predicates in the label.</p>
        <p>(q ;a; ) = a 2
^ f ree(a) _
1As constants have no predecessors in the forest, there will be
no adorned downward predicates in the label.
for every ji 2 Jra , vi 2 cts(P ) implies ji = vi, and
for every ji; jl 2 Jra , vi 6= vl 2 implies ji 6= jl.
Intuitively, a multiset provides a way to satisfy the successor
part of a unary rule in a forest model by identifying the
successor terms of the rule with either successors of the current
element in the model or constants in the program. We next
describe the transition function for unary rules:
(qt;ra ; ) = ^ ("; q ;t;u) ^ 9Jra :
u2
qk;t; ;u) ^
^
^
d
^ ^
k=1ji=ku2 i[ i
^
("; qt;o;u)
^ (h0i;
(13)
o2cts(P ) ji=o u2 i[ i</p>
        <p>State qk;t; ;u enforces that the (possibly negated) unary or
adorned binary predicate u is (is not) part of the label of the
k-th successor of a given node; we thus define:
(qk;t1;t2;u; ) = k 2
^ ("; qt1;t2;u) (14)
^ ^ j 2=</p>
        <p>j6=k</p>
        <p>The state qt1;t2;u can be seen as a multi-state with
different transitions depending on its arguments (two transitions
have already been introduced as rules (11) and (12) above):
if t2 = , one has the justify the presence/absence of u in
the label of the current node; otherwise, when t2 = o, one
has to justify it from the label of the root node corresponding
to constant o: note that, as it is not possible to jump directly
to a given root node in the forest, nor to enforce that there
will be a single root node corresponding to each constant, in
transition (17) we visit each root node in state qo;a:
(qt1;t2;u; ) =
8 ("; q ;a); if t2 = and u = a (15)
&gt;
&gt;&gt;&gt;&gt; ([root]; qo;a); if t2 = o and u = a (16)
&gt;&lt;&gt;&gt; a 2= ; if t2 = and u = not a (17)</p>
        <p>a 2= (o); if t2 = o and u = not a (18)
&gt;
&gt;
&gt;&gt;&gt;&gt; #tf 2= ; if t2 = and u = not f (19)
&gt;
&gt;
: "fo 2= (o); if t2 = o and u = not f (20)</p>
        <p>For binary rules: rf : f (s; v) (s); (s; v); (v), when
v is grounded using an anonymous individual, the check
involves looking to the predecessor node to see if the local part
of the rule is satisfied. When v is grounded using a constant,
the local part of the rule is checked at the current node and
the successor part at the respective constant. Note that the
first term pattern in the first conjunct in both rules (21) and
(22) is irrelevant as contains only unary predicates:
(qt; ;rf ; ) =
^ ( 1; q ;t;u) ^
^ f ree(f )_
(qt; ;rf ; ) =
_ ( 1; q ;t;u) _
u2</p>
        <p>_ ("; qt; ;u)
u2 [
(qt;o;rf ; ) = _ ("; q ;t;u) _ _ ("; qt;o;u) (36)
u2 u2 [</p>
        <p>Finally we specify the parity acceptance condition. The
index of the automaton is 2, with F1 = fqt;a; qt1;t2;f j a 2
upr (P ); f 2 bpr (P ); t; t1; t2 2 PATP g and F2 = Q.
Intuitively, paths in a run of the automaton correspond to
dependencies of literals in the accepted model and by disallowing
the infinite occurrence on a path of states associated to atoms
in the model we ensure that only well-supported models are
accepted.</p>
        <p>Theorem 2 Let P be a FoLP and let p be a unary
predicate symbol. Then, p is satisfiable w.r.t. P iff there exists an
automaton Ap;;P such that L(Ap;;P ) 6= ;.</p>
        <p>^ ("; q ;t;u) ^
u2</p>
        <p>In the following, we describe the transitions of the
automaton in the negative states, i.e. the states which are used
to motivate the absence of certain unary/binary predicates in
the labels of the forest. If one ignores the checks for the
absence of unary/adorned binary predicates in the label of the
current node, the transition rules can be seen as dual versions
of the ones for the counterpart positive states.</p>
        <p>(q ;a; ) = a 2=
^
Proof Sketch. ()): Assume p is satisfiable w.r.t. P . Then,
by Prop. 1, p is satisfied by a forest model (U; M ). Let
(EF; ef ), with EF = (F; ES) be the labelled forest which
induces (U; M ), as in Definition 2. Then, let l : fTc j c 2
cts(P ) [ f gg be a labelling function such that for every
y 2 fTc j c 2 cts(P ) [ f gg, l(y) is the least set
cono
taining: (i) ef (y), (ii) f"f j f 2 ef (y; o); o 2 cts(P )g,
(iii) f#fy j f 2 ef (z; y); z = precF (y); z 2= cts(P )g,
(iv) f#zf j f 2 ef (z; y); z = precF (y); z 2 cts(P )g,
(v) fyg, when y 2 cts(P ) [ , and (vi) fig if y = z i.</p>
        <p>We define an automaton Ap;;P which accepts (F; l). Let
be the same as its homonym in the considered forest
model and let be such that (o) = l(o), for every o 2
cts(P ) [ f g. We construct a run (Tc; r) of Ap;;P on (F; l)
by first setting r(c) = ( ; q0), where is the root of some
forest in F . Then, for each o 2 cts(P ) [ f g, we introduce
a successor of c, c i, such that r(c i) = (o; qo).</p>
      </sec>
      <sec id="sec-6-3">
        <title>We then proceed inductively with the construction by</title>
        <p>maintaining the following invariant, for each w 2 Tr:
r(w) = (y; q ;a) implies a 2 l(y);
r(w) = (y; qo;a) implies o 2= l(y) or a 2 (o);
r(w) = (y; qt;ra ) implies a 2 l(y), a is not free, and there
is a rule s 2 P M derived from ra such that head(s) =</p>
        <p>U
a(y), M j= body(s), and maxb2body(s)(level(b; M )) &lt;
level(a(y); M );
r(w) = (y; qt; ;u) implies a 2 l(y), if u = a; a 2= l(y), if
u = not a; #tf 2 l(y), if u = f ; #tf 2= l(y), if u = not f ;
r(w) = (y; qt;o;u) implies a 2 l(o), if u = a; a 2= l(o), if
u = not a; "fo 2 l(y), if u = f ; "tf 2= l(y), if u = not f ;
r(w) = (y; qk;t; ;u) implies k 2 l(y), and j 2= l(y), for
every 1 6 j 6= k 6 d; a 2 l(y), if u = a; a 2= l(y), if
u = not a; #tf 2 l(y), if u = f ; #tf 2= l(y), if u = not f ;
r(w) = (y; qt; ;rf ) implies #tf 2 l(y), f is not free,
and there is a rule s 2 PUM derived from r such
that head(s) = f (precF (y); y), M j= body(s), and
maxb2body(s) level(b; M ) &lt; level(f (precF (y); y); M );
o
r(w) = (y; qt;o;rf ) implies "f 2 l(y), f is not free,
and there is a rule s 2 P M derived from r such that</p>
        <p>U
head(s) = f (y; o), M j= body(s), and maxb2body(s)
level(b; M ) &lt; level(f (y; o); M );
r(w) = (y; qt;a) implies a 2= l(y);
r(w) = (y; qt;ra ) implies a 2= l(y);
r(w) = (y; qt; ;u) implies a 2= l(y), if u = a; a 2 l(y), if
u = not a; #tf 2= l(y), if u = f ; #tf 2 l(y), if u = not f ;
r(w) = (y; qt;o;f ) implies a 2= l(o), if u = a; a 2 l(o), if
u = not a; "fo 2= l(y), if u = f ; "tf 2 l(y), if u = not f ;
r(w) = (y; qk;t; ;u) implies k 2= l(y) or a 2= l(y), if
u = a; a 2 l(y), if u = not a; #tf 2= l(y), if u = f ;
t
#f 2 l(y), if u = not f ;
r(w) = (y; qt; ;f ) implies #tf 2= l(y);
r(w) = (y; qt;o;rf ) implies "fo 2= l(y).</p>
      </sec>
      <sec id="sec-6-4">
        <title>We show how the invariant is preserved in two cases of the construction:</title>
        <p>Assume r(w) = (y; qt;a), for some w 2 Tr. Then, from
the IH: a 2 l(y), and a(y) 2 M . Then, there must be a
finite n such that level(a(y); M ) = n and some rule s in
PUM such that maxb2body(s)(level(b; M )) = n 1 (from
which a(y) has been derived at iteration n). Let ra be the
rule in P from which s has been derived and let w i be
a successor of w in Tr such that r(w i) = (y; qt;ra ). The
invariant is preserved.</p>
        <p>Assume r(w) = (y; qt;ra ), for some w 2 Tr. Then,
from the IH: a 2 l(y), a is not free, and there exists
some rule s in PUM derived from ra: a(y) +(y) [
S16i6m( i+(y; zi) [ i+(zi)) such that M j= body(s)
and maxb2body(s)(level(b; M )) &lt; level(a(y); M ). Note
that M j= (y) [ Sim=1( i(y; zi) [ i(zi)). As (U; M )
is a forest model, each zm must be of the form y k, for
some 1 6 k 6 d, or of the form o 2 cts(P ). Let Jra be
a multiset such that ji = zi, if zi 2 cts(P ) and ji = k if
zi = y k. Then, we introduce the following successors
of w in Tc (denoted just by their label):
– (y; q ;t;u), for every u 2
(y).</p>
        <p>: the invariant holds as M j=
– (y k; qk;t; ;u), for every 1 6 k 6 d, i such that ji = k,
and u 2 i [ i: the invariant holds as M j= i(y; y
k) [ i(y k). It is also the case that k 2 l(y k) and
j 2= l(y k), for every 1 6 j 6= k leqd.
– (y; qt;o;u), for every o and i such that ji = o and u 2
i [ i: the invariant holds as M j= i(y; o) [ i(o).</p>
        <p>The invariant ensures the existence of a run. We next
show that every run Tc constructed as above is accepting,
i.e. on every path of Tc there are finitely many occurrences
of states of the form qt;a or qt1;t2;f . Assume that every
element w 2 Tc for which r(w) = (y; qt;a), r(w) = (y; qt; ;f ),
or r(w) = (y; qt;o;f ) is annotated with level(a(y); M ),
level(f (prec(y); y); M ), or level(f (y; o); M ), resp. From
the invariant of the construction it follows that level
annotations decrease along each path of Tc. But the level of
every atom in an open answer set is finite. Thus, the number
of level annotations, and consequently the number of
occurrences of such states must be finite.</p>
        <p>((): Assume that there exists an automaton Ap;;P such
that L(Ap;;P ) 6= ;. Then, there exists a labelled forest
(F 0; f 0) and an accepting run (Tc; r) on (F 0; f 0) such that
r(c) = ( ; q0), for some root in F 0. Let F be the
forest containing the nodes y 2 NF 0 for which either (i)
there exists some w 2 Tc such that r(w) = (y; qo) or
(ii) precF 0 (y) 2 NF and there exists some w 2 Tc
such that r(w) = (y; qk;t1;t2;u). Assume C is the set of
roots in F . Then let : NF ! NF [ cts(P ) [ f g be
as follows: (y) = oi; if oi 2 l(y); and
(c) s; if y = c s; for c 2 C
let l be the following labeling function for NF : l(y) =
:
( (y)); if (y) 2 cts(P )
f 0(y);</p>
        <p>if (y) 2 NF cts(P )</p>
        <p>Also, let: U = f (y) j y 2 NF g, M = fa( (y)) j a 2
l(y)\upr (P )^y 2 NF g[ff ( (z); (z) i) j#f 2 l(y)^y =
oi
z i ^ y 2 NF g [ ff ( (y); oi) j"f 2 l(y) ^ y 2 NF g.</p>
      </sec>
      <sec id="sec-6-5">
        <title>We show that (U; M ) is a forest model of P by showing</title>
        <p>that:
(i) M is a model of PUM , i.e every rule in PUM is satisfied by</p>
        <sec id="sec-6-5-1">
          <title>M : we check that every rule in PUM is satisfied.</title>
          <p>Let r0 : a( (y)) +( (y)); ( i+( (y); (yi)); i+(
(yi)))16i6m be a rule in P M derived from a unary rule</p>
          <p>U
r : a(s) (s); ( i(s; ti); i(ti))16i6m; in P . Let Jr
be the multiset formed of elements ji, 1 6 i 6 m, such
that:
ji =</p>
          <p>(yi); if (yi) 2 cts(P );
k; if (yi) = (x) k:
Assume M j= body(r0), but M 6j= a( (y)). Then, a 2=
l(y) and there must be some w 2 Tc such that either:
– r(w) = (y; qx;a). Then, for every rule ra : a(s)
2 P , there must be a node wra 2 Tc such that
r(wra ) = (y; qx;ra ). This holds also for rule r. Then,
one of the following holds:
there exists w0 2 Tc such that r(w0) = (y; qx;x;u),
for some u 2 : then, either u = a and (y; q ;a) 2 Tc
and thus a 2= l(y) or M 6j= a( (y)) – contradiction,
or for some u = not a, a 2 l(y) or M j= a( (y)) –
contradiction.
for every multiset Jra as in transition rule (14)
(including Jr above) and every ji 2 Jra either:
there exist 1 6 k 6 d, 1 6 i 6 m, and
u 2 i [ i such that ji = k and for every
y g 2 F , there is a node wg 2 Tc such that
r(wg) = (y g; qk;t;x;u): then, there is wk 2 Tc
such that r(wk) = (y k; qk;t;x;u) and either (1)
k 2= l(y k) – contradiction, (2) u = a, a 2= l(y k):
a( (y k)) 2= M or M 6j= a( (yi)), and thus
M 6j= i( (yi)) – contradiction, (3) u = not a,
a 2 l(y k): a( (y k)) 2 M or M j= a( (yi)),
and thus M 6j= i( (yi)) – contradiction, (4) u = f ,
#tf 2= l(y k): f ( (y); (y k)) 2= M or M 6j=
f ( (y); (yi)), and thus M 6j= i( (y); (yi)) –
contradiction, (5) for some u = not f , #tf 2 l(y k):
f ( (y); (y k)) 2 M or M j= f ( (y); (yi)), and
thus M 6j= i( (y); (yi)) – contradiction.
there exists 1 6 i 6 m such that ji = o, for some
o 2 cts(P ), a node wo 2 Tc, and u 2 i [ i such
that r(wo) = (y; qt;o;u): similar to above we reach a
contradiction with the fact that M j= i( (y); o) [
i(o).
– r(w) = (y; qo;a) with (y) = o. Then, o 2= l(y) =
(o) – contradiction or a 2= (o) and for every rule
ra : a(s) 2 P , such that s 7! o there must be a
node wra 2 Tc such that r(wra ) = (y; qo;ra ) – similar
to above.</p>
          <p>Thus, in each case we obtained a contradiction and M j=
a( (y)): every unary rule is satisfied by M . Similarly it
can be shown that every binary rule is satisfied as well.
(i) M is minimal: from the fact that (Tc; r) is accepting, it
follows that every path starting at a state in Q+ must be
finite. For every node w 2 Tc, such that r(w) = (y; q),
for some q 2 Q+, let:
d(w) =
0; if w has no successors in Tc;</p>
        </sec>
        <sec id="sec-6-5-2">
          <title>1 + maxw i2Tc (d(w i)); otherwise.</title>
        </sec>
      </sec>
      <sec id="sec-6-6">
        <title>We show by induction on d(w) that:</title>
        <p>r(w) = (y; qx;a) implies a( (y)) 2 M(PUM ),
r(w) = (y; qo;a) implies o 2= l(y) or a(o) 2 M(PUM ),
r(w) = (y; qt;ra ) implies PUM contains a rule a( (y))
such that M(PUM ) j= ,
r(w) = (y; qt;x;rf ) implies y = z i, for some i, and P M
U
contains f ( (z); (z) i) such that M(PUM ) j= ,
r(w) = (y; qt;o;rf ) implies PUM contains f ( (y); o)
such that M(PUM ) j= ,
r(w) = (y; qk;t;x;u) implies y = z i, k 2 l(y), for every
j 6= k: j 2= l(y), and: a( (y)) 2 M(PUM ), if u = a;
a( (y)) 2= M(PUM ), if u = not a; f ( (z); (z) i) 2
M(PUM ), if u = f ; f ( (z); (z) i) 2= M(PUM ), if u =
not f ;
r(w) = (y; qt;x;u) implies y = z i, and: a( (y)) 2
M(PUM ), if u = a; a( (y)) 2= M(PUM ), if u = not a;
f ( (z); (z) i) 2 M(PUM ), if u = f ; f ( (z); (z) i) 2=
M(PUM ), if u = not f ;
r(w) = (y; qt;o;u) implies: a(o) 2 M(PUM ), if u = a;
a(o) 2= M(PUM ), if u = not a; f ( (y); o) 2 M(PUM ), if
u = f ; f ( (y); o) 2= M(PUM ), if u = not f .</p>
        <p>Induction base: assume w is a leaf in Tc and r(w) =
(y; q), for some q 2 Q+ (d(w) = 0). Then, one of the
following holds:
r(w) = (y; qt;a) and a is free: in this case a( (y)) 2
M and thus PUM will contain rule a( (y)) . Thus,
a( (y)) 2 M(PUM ).
r(w) = (y; qt1;t2;f ) and f is free: similar to above.
r(w) = (y; qt1;t2;u) and u = not a or u = not f : from
the fact that (Tr; t) is a run and transition rules (17-20),
it follows that a 2= l(y) or #tf2 (t2 = )= "fo (t2 = o) 2=
l(y). Then, the claim follows from the definition of M .</p>
        <p>Induction step: consider a non-leaf node w 2 Tc (d(w) &gt;
0). We will analyse the case when r(w) = (y; qt;ra ): then,
for every u 2 there is a successor w i ;u of w such that
r(w i ;u) = (y; qx;t;u) and there exists a multiset Jra and
successors w mk;i;u and w mo;i;u for w such that:
r(w mk;i;u) = (y zk;i;u; qk;t;x;u), for all pairs (k; i) such
that ji = k and u 2 i [ i;
r(w mo;i;u) = (y; qt;o;u), for all pairs (o; i) such that
ji = o and u 2 i [ i.</p>
      </sec>
      <sec id="sec-6-7">
        <title>From the IH, it follows that:</title>
        <p>M(PUM ) j= u( (y)), for every u 2
M(PUM ) j= ( (y)) (*1),
, and thus
M(PUM ) j= u( (y); (y) zk;i;u), for every u 2 i
and M(PUM ) j= u( (y) zk;i;u), for every u 2 i
and k 2 l( (y) zk;i;u): as there is a unique
successor y zk of y such that k 2 l(y zk), it follows that:
M(PUM ) j= u( (y); (y) zk), for every u 2 i and
M(PUM ) j= u( (y) zk), for every u 2 i and thus
M(PUM ) j= i( (y); (y) zk) [ i( (y) zk) (*2),
M(PUM ) j= u( (y); o), for every u 2 i and M(PUM ) j=
u(o)), for every u 2 i, where ji = o, and thus
M(PUM ) j= i( (y); o) [ i(o) (*3).</p>
        <p>From (*1)-(*3) and the fact that ji 6= jl
implies zji 6= zjl , it follows that M(PUM ) j=
( (y)) [ S16k6d( i( (y); (y) zk) [ i( (y)
zk))ji=k [ So2cts(P )( i( (y); o)[ i(o))ji=o; , which
is the body of a grounding of ra in PU with head
a( (y)). Then, by applying the reduct one obtains that
+( (y)) [ S16k6d( i+( (y); (y)
M(PUM ) j= zk) [
i+( (y) zk))ji=k [ So2cts(P )( i+( (y); o) [ i+(o))ji=o,
which is the body of a rule with head a( (y)) in PUM .</p>
      </sec>
      <sec id="sec-6-8">
        <title>The other cases can be treated similarly.</title>
        <p>Then, as a 2 l(y) \ upr (P ) implies that there exists a
node w 2 Tr such that r(w) = (y; qt;a), #tf 2 l(y) implies
that there exists a node w 2 Tr such that r(w) = (y; qt;x;f ),
o
and "f 2 l(y) implies that there exists a node w 2 Tr such
that r(w) = (y; qt;o;f ) (from transition rule (7)), it follows
that M M(PUM ), and thus M is a minimal model of PUM .
2
Theorem 3 Satisfiability checking of unary predicates w.r.t.
FoLPs is EXPTIME-complete.</p>
      </sec>
      <sec id="sec-6-9">
        <title>Proof Sketch. That the task is EXPTIME-hard follows from</title>
        <p>the fact that satisfiability checking of unary concepts w.r.t.</p>
        <sec id="sec-6-9-1">
          <title>SHOQ ontologies is EXPTIME-complete (Schild 1991); the</title>
          <p>
            latter has been reduced to satisfiability checking of unary
predicates w.r.t. FoLPs in
            <xref ref-type="bibr" rid="ref10">(Feier and Heymans 2013)</xref>
            .
          </p>
          <p>For the upper bound, we observe that for a given P and p,
there is an exponential number of automata Ap;;P (as there
are an exponential number of possible ). Each such
automaton can be constructed in exponential time, and emptiness
checking for Ap;;P can be performed again in exponential
time. The latter follows from Theorem 1 and the fact that
the branching factor and the number of states of Ap;;P are
polynomial in the size of P , while its index is constant (viz.</p>
        </sec>
      </sec>
      <sec id="sec-6-10">
        <title>2). Then, from Theorem 2 it follows that satisfiability checking of unary predicates w.r.t. FoLPs is in EXPTIME. 2</title>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Discussion and Conclusion</title>
      <sec id="sec-7-1">
        <title>We have described a reduction of satisfiability checking of unary predicates w.r.t. FoLPs to emptiness checking of</title>
      </sec>
      <sec id="sec-7-2">
        <title>FEAs. This enabled us to establish a tight complexity bound</title>
        <p>
          on this reasoning task for FoLPs. Other reasoning tasks like
consistency checking of FoLPs and skeptical and brave
entailment of ground atoms can be polynomially reduced to
satisfiability checking of unary predicates
          <xref ref-type="bibr" rid="ref14 ref16">(Heymans 2006)</xref>
          ;
thus, the complexity result applies to those tasks as well.
        </p>
      </sec>
      <sec id="sec-7-3">
        <title>Also, by virtue of the translation from fKBs to FoLPs, the re</title>
        <p>sult applies to fKBs as well: satisfiability checking of unary
predicates w.r.t. fKBs is EXPTIME-complete. Thus,
reasoning with FoLP rules and SHOQ ontologies is not harder
than reasoning with SHOQ ontologies themselves.</p>
        <p>In the introduction, we mentioned the special form of
forest model property as one of the reasons FoLPs cannot
be straightforwardly dealt with using 2ATAs. An additional
technical difficulty we had to overcome compared to both
encodings using 2ATAs and other encodings using FEAs,
is the fact that FEAs, unlike 2ATAs, cannot explicitly
address successor nodes in runs: they are suitable for encoding
graded modalities/number restrictions where the same
property has to hold/not to hold at a given number of successors.</p>
      </sec>
      <sec id="sec-7-4">
        <title>In our encoding, in order to assert that different properties</title>
        <p>hold at different successors (as the structure of FoLP rules
allows), we had to devise an addressing mechanism for
successors. Furthermore, as terms occurring in any position in</p>
      </sec>
      <sec id="sec-7-5">
        <title>FoLP rules might be constants, our encoding also made use of a unification mechanism.</title>
      </sec>
      <sec id="sec-7-6">
        <title>Finally, as our result shows that FoLPs have the same</title>
        <p>complexity as CoLPs, we plan to further investigate the
extension of the deterministic AND/OR tableau algorithm for</p>
      </sec>
      <sec id="sec-7-7">
        <title>CoLPs (Feier 2014) to FoLPs. As explained in (Feier 2014), such an extension is far from trivial.</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Bonatti</surname>
            ,
            <given-names>P. A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Murano</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ; and Vardi,
          <string-name>
            <surname>M. Y.</surname>
          </string-name>
          <year>2008</year>
          .
          <article-title>The complexity of enriched -calculi</article-title>
          .
          <source>Logical Methods in Computer Science</source>
          <volume>4</volume>
          (
          <issue>3</issue>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>Cal`ı,</article-title>
          <string-name>
            <given-names>A.</given-names>
            ;
            <surname>Gottlob</surname>
          </string-name>
          , G.; and Lukasiewicz,
          <string-name>
            <surname>T.</surname>
          </string-name>
          <year>2009</year>
          .
          <article-title>Datalog : A unified approach to ontologies and integrity constraints</article-title>
          .
          <source>In ICDT</source>
          , volume
          <volume>9</volume>
          ,
          <fpage>14</fpage>
          -
          <lpage>30</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ; Eiter,
          <string-name>
            <surname>T.</surname>
          </string-name>
          ; and Ortiz,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <year>2007</year>
          .
          <article-title>Answering regular path queries in expressive description logics: An automatatheoretic approach</article-title>
          .
          <source>In Proc. AAAI</source>
          ,
          <fpage>391</fpage>
          -
          <lpage>396</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ; Eiter,
          <string-name>
            <surname>T.</surname>
          </string-name>
          ; and Ortiz,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <year>2009</year>
          .
          <article-title>Regular path queries in expressive description logics with nominals</article-title>
          .
          <source>IJCAI 714-720.</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ; Giacomo, G. D.; and Lenzerini,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <year>2002</year>
          .
          <article-title>2ATAs make DLs easy</article-title>
          .
          <source>In Proc. DL</source>
          ,
          <fpage>107</fpage>
          -
          <lpage>118</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , and Sˇ imkus,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <year>2009</year>
          .
          <article-title>Bidirectional answer set programs with function symbols</article-title>
          .
          <source>In Proc. IJCAI</source>
          ,
          <fpage>765</fpage>
          -
          <lpage>771</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <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>AI</source>
          <volume>172</volume>
          (
          <issue>12</issue>
          -
          <fpage>13</fpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Fages</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <year>1991</year>
          .
          <article-title>A new fix point semantics for generalized logic programs compared with the well-founded and the stable model semantics</article-title>
          .
          <source>New Generation Computing</source>
          <volume>9</volume>
          (
          <issue>4</issue>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Feier</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Heymans</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <year>2009</year>
          .
          <article-title>Hybrid reasoning with Forest Logic Programs</article-title>
          .
          <source>In Proc. ESWC</source>
          , volume
          <volume>5554</volume>
          ,
          <fpage>338</fpage>
          -
          <lpage>352</lpage>
          . Springer.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Feier</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Heymans</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <year>2013</year>
          .
          <article-title>Reasoning with Forest Logic Programs and f-hybrid knowledge bases</article-title>
          .
          <source>TPLP</source>
          <volume>3</volume>
          (
          <issue>13</issue>
          ):
          <fpage>395</fpage>
          -
          <lpage>463</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Feier</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <year>2012</year>
          .
          <article-title>Worst-case optimal reasoning with Forest Logic Programs</article-title>
          .
          <source>In Proc. KR</source>
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Feier</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <year>2014</year>
          .
          <article-title>Reasoning with Forest Logic Programs</article-title>
          .
          <source>PhD thesis</source>
          (http://tinyurl.com/pbtfsll),
          <source>TU Wien.</source>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <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>
          .
          <source>In Proc. of ICLP'88</source>
          ,
          <fpage>1070</fpage>
          -
          <lpage>1080</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Heymans</surname>
            ,
            <given-names>S.; Van</given-names>
          </string-name>
          <string-name>
            <surname>Nieuwenborgh</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Vermeir</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <year>2006</year>
          .
          <article-title>Conceptual Logic Programs</article-title>
          .
          <source>AMAI</source>
          <volume>47</volume>
          (
          <issue>1-2</issue>
          ):
          <fpage>103</fpage>
          -
          <lpage>137</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Heymans</surname>
            ,
            <given-names>S.; Van</given-names>
          </string-name>
          <string-name>
            <surname>Nieuwenborgh</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ; and
          <string-name>
            <surname>Vermeir</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <year>2008</year>
          .
          <article-title>Open Answer Set Programming with guarded programs</article-title>
          .
          <source>Transactions on Computational Logic</source>
          <volume>9</volume>
          (
          <issue>4</issue>
          ):
          <fpage>1</fpage>
          -
          <lpage>53</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <string-name>
            <surname>Heymans</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <year>2006</year>
          .
          <article-title>Decidable Open Answer Set Programming</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <surname>Kro</surname>
          </string-name>
          ¨tzsch, M.;
          <string-name>
            <surname>Rudolph</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ; and Hitzler,
          <string-name>
            <surname>P.</surname>
          </string-name>
          <year>2008</year>
          .
          <article-title>Description logic rules</article-title>
          .
          <source>In Proc. ECAI</source>
          ,
          <fpage>80</fpage>
          -
          <lpage>84</lpage>
          . IOS Press.
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <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.</source>
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <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>Journal of the ACM</source>
          <volume>57</volume>
          (
          <issue>5</issue>
          ):
          <volume>30</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>30</lpage>
          :
          <fpage>62</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Sattler</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ; and Studer,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <year>2005</year>
          .
          <article-title>Query answering for OWL-DL with rules</article-title>
          .
          <source>Journal of Web Semantics</source>
          <volume>3</volume>
          (
          <issue>1</issue>
          ):
          <fpage>41</fpage>
          -
          <lpage>60</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <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 Proc. KR</source>
          ,
          <fpage>68</fpage>
          -
          <lpage>78</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <year>2008</year>
          .
          <article-title>On combining description logic ontologies and nonrecursive datalog rules</article-title>
          .
          <source>In Proc. RR</source>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          <string-name>
            <surname>Schild</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <year>1991</year>
          .
          <article-title>A correspondence theory for terminological logics: Preliminary report</article-title>
          .
          <source>In IJCAI</source>
          ,
          <fpage>466</fpage>
          -
          <lpage>471</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          <string-name>
            <surname>Vardi</surname>
            ,
            <given-names>M. Y.</given-names>
          </string-name>
          <year>1998</year>
          .
          <article-title>Reasoning about the past with two-way automata</article-title>
          .
          <source>In Proc. ICALP</source>
          ,
          <fpage>628</fpage>
          -
          <lpage>641</lpage>
          . Springer.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>