2008 - Combining Answer Set Programming With Description Logics For The Semantic Web
2008 - Combining Answer Set Programming With Description Logics For The Semantic Web
Artificial Intelligence
www.elsevier.com/locate/artint
a r t i c l e i n f o a b s t r a c t
Article history: We propose a combination of logic programming under the answer set semantics with the
Received 19 January 2007 description logics SHIF (D) and SHOIN (D), which underly the Web ontology languages
Received in revised form 12 April 2008 OWL Lite and OWL DL, respectively. To this end, we introduce description logic programs (or
Accepted 14 April 2008
dl-programs), which consist of a description logic knowledge base L and a finite set P of
Available online 25 April 2008
description logic rules (or dl-rules). Such rules are similar to usual rules in nonmonotonic
Keywords: logic programs, but they may also contain queries to L, possibly under default negation, in
Answer set programming their bodies. They allow for building rules on top of ontologies but also, to a limited extent,
Description logics building ontologies on top of rules. We define a suite of semantics for various classes of
Rules dl-programs, which conservatively extend the standard semantics of the respective classes
Ontologies and coincide with it in absence of a description logic knowledge base. More concretely,
Semantic Web we generalize positive, stratified, and arbitrary normal logic programs to dl-programs, and
Computational complexity
define a Herbrand model semantics for them. We show that they have similar properties as
Closed-world reasoning
ordinary logic programs, and also provide fixpoint characterizations in terms of (iterated)
Default logic
consequence operators. For arbitrary dl-programs, we define answer sets by generalizing
Gelfond and Lifschitz’s notion of a transform, leading to a strong and a weak answer set
semantics, which are based on reductions to the semantics of positive dl-programs and
ordinary positive logic programs, respectively. We also show how the weak answer sets
can be computed utilizing answer sets of ordinary normal logic programs. Furthermore, we
show how some advanced reasoning tasks for the Semantic Web, including different forms
of closed-world reasoning and default reasoning, as well as DL-safe rules, can be realized
on top of dl-programs. Finally, we give a precise picture of the computational complexity
of dl-programs, and we describe efficient algorithms and a prototype implementation of
dl-programs which is available on the Web.
© 2008 Elsevier B.V. All rights reserved.
1. Introduction
The World Wide Web is impressively successful. Both the information that is stored on the Web and the number of its
human users have been growing exponentially in recent years. For many people, the Web has started to play a fundamental
role as a means of providing and searching for information. However, searching the Web in its current form is not always
✩
This paper is a significantly extended and revised version of a paper that appeared in: Principles of Knowledge Representation and Reasoning:
Proceedings of the Ninth International Conference (KR 2004), AAAI Press, 2004, pp. 141–151.
*Corresponding author.
E-mail addresses: [email protected] (T. Eiter), [email protected] (G. Ianni), [email protected] (T. Lukasiewicz), [email protected]
(R. Schindlauer), [email protected] (H. Tompits).
0004-3702/$ – see front matter © 2008 Elsevier B.V. All rights reserved.
doi:10.1016/j.artint.2008.04.002
1496 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
a joyful experience, since today’s search engines often return a huge number of answers, many of which are completely
irrelevant, while some relevant answers are not returned. One of the main reasons for this problem is that the current Web
is designed for human consumption, but not for automated processing through machines, since the HTML standard only
allows for describing the layout of Web pages, but not their semantic content.
The Semantic Web [9,10,36] is an extension of the current Web by standards and technologies that help machines to
understand the information on the Web so that they can support richer discovery, data integration, navigation, and au-
tomation of tasks. The Semantic Web will not only allow for more exact answers when we search for information, but also
provide knowledge necessary for integrating and comparing information from different sources, and allow for various forms
of automated services. Roughly speaking, the main idea behind the Semantic Web is to add a machine-readable meaning to
Web pages, to use ontologies for a precise definition of shared terms in Web resources, to make use of KR technology for
automated reasoning from Web resources, and to apply cooperative agent technology for processing the information of the
Web. The development of the Semantic Web proceeds in layers of Web technologies and standards, where every layer is
lying on top of lower layers. The highest layer that has currently reached a sufficient maturity is the Ontology layer in the
form of the OWL Web Ontology Language [58,101].
The language OWL provides three increasingly expressive sublanguages, namely OWL Lite, OWL DL, and OWL Full, where
OWL DL basically corresponds to the Web ontology language DAML + OIL [52,53], which was developed by merging
DAML [48] and OIL [35]. The languages OWL Lite and OWL DL are essentially very expressive description logics (DLs)
with an RDF syntax [58]. One can therefore exploit a large body of existing previous work on description logic research, to
define, for example, the formal semantics of the languages, to understand their formal properties (in particular, the decid-
ability and the complexity of key inference problems), and for automated reasoning support. In fact, as shown by Horrocks
and Patel-Schneider [54], ontology entailment in OWL Lite and OWL DL reduces to knowledge base (un)satisfiability in the
expressive DLs SHIF (D) and SHOIN (D), respectively.
The next step in the development of the Semantic Web is the realization of the Rules, Logic, and Proof layers, which
are developed on top of the Ontology layer, and which should offer sophisticated representation and reasoning capabilities.
A first effort in this direction was RuleML (Rule Markup Language) [11], fostering an XML-based markup language for rules
and rule-based systems, while the OWL Rules Language [55] is a first proposal for extending OWL by Horn clause rules.
A key requirement of the layered architecture of the Semantic Web is to integrate the Rules and the Ontology layer. In
particular, it is crucial to allow for building rules on top of ontologies, that is, for rule-based systems that use vocabulary
specified in ontology knowledge bases. Another type of combination is to build ontologies on top of rules, which means
that ontological definitions are supplemented by rules or imported from rules.
Towards the integration of rules and ontologies in the Semantic Web, we propose in this paper a combination of
logic programming under the answer set semantics [39] with description logics, focusing here on the DLs SHIF (D) and
SHOIN (D), which underly the Web ontology languages OWL Lite and OWL DL, respectively, as pointed out above. Our
combination of dl-programs allows for building rules on top of ontologies, and also, to some extent, building ontologies on
top of rules. Answer set semantics is the predominating semantics for nonmonotonic logic programs, and gave rise to the
answer set programming (ASP) paradigm [7] in which the solutions for a problem are encoded in terms of the answer sets of
a nonmonotonic logic program. Then, using an answer set solver, models (i.e., answer sets) of this program are generated,
from which the solutions of the problem are read off. ASP has been successfully deployed to a variety of areas including
diagnosis, configuration, planning, information integration, text mining, or security management, to name a few (cf. [105]
for a comprehensive report about recent ASP applications).
The main innovations and contributions of this paper can be summarized as follows:
• We introduce description logic programs (or dl-programs for short), which consist of a knowledge base L in a description
logic and a finite set P of description logic rules (or dl-rules for short). Such rules are similar to usual rules in logic
programs with negation as failure, but they may also contain queries to L, possibly default negated, in their bodies. As
an important feature, such queries also allow for specifying an input from P , and thus for a flow of information from P
to L, besides the flow of information from L to P , given by any query to L. For example, concepts and roles in L may be
enhanced by facts generated from dl-rules, possibly involving heuristic knowledge and other concepts and roles from L.
• Fostering an encapsulation view, the queries to L are treated in a way such that logic programming and DL inference
are technically separated. Inspired by [25], merely interfacing details need to be known, while the components behind
are black boxes. This approach, which provides a loose integration of rules and ontologies, is different from previous
ones, which can be roughly divided into (i) hybrid approaches, which use DLs to specify structural constraints in the
bodies of logic program rules, and (ii) approaches that reduce DL inference to logic programming. The basic idea behind
(i) is to combine the semantic and computational strengths of the two different systems, while the main rationale of
(ii) is to use powerful logic programming technology for inference in DLs. Both approaches differ significantly from our
approach; this is discussed in detail in Section 9.
• We define a suite of semantics for various classes of dl-programs, which conservatively extend the standard semantics
of the respective classes, and which coincide with it in absence of a DL knowledge base. More concretely, we generalize
the classes of positive, stratified, and arbitrary normal logic programs to dl-programs, and define a Herbrand model
semantics for them. We show that satisfiable positive dl-programs have a least Herbrand model, and that satisfiable
stratified dl-programs can be associated with a unique minimal Herbrand model, which is characterized through a finite
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1497
number of iterative least Herbrand models. For arbitrary dl-programs, we define answer sets in the spirit of Gelfond
and Lifschitz [39], for which we generalize their notion of a transform. We define the strong answer set semantics, which
is based on a reduction to the least model semantics of positive dl-programs. We show that for positive and stratified
dl-programs KB, the strong answer set semantics of KB coincides with the (unique) minimal Herbrand model semantics
of KB. We also define the weak answer set semantics for general dl-programs, which is based on a reduction to the least
model semantics of ordinary positive programs. Every strong answer set is also a weak answer set, but not vice versa.
Both types of answer set semantics of general dl-programs properly generalize the answer set semantics of ordinary
normal programs. In particular, the nondeterminism inherent in answer sets is retained, and the ASP problem solving
paradigm thus extended to an integration of rules and ontologies.
• We give fixpoint characterizations for the unique minimal models of satisfiable positive and stratified dl-programs, and
show how to compute them by fixpoint iteration and a sequence of finite fixpoint iterations, respectively. We also
provide a general guess-and-check algorithm for computing the set of all weak answer sets of a general dl-program
(which includes the set of all strong answer sets) by computing the set of all answer sets of an ordinary normal
logic program. We also describe advanced algorithms which make use of these techniques, but also exploit structural
properties like splitting sets and caching techniques for querying the DL knowledge base. They have been implemented
in a working prototype implementation for dl-programs under the answer set semantics, which is available on the Web.
To the best of our knowledge, it is currently the most advanced system for an integration of nonmonotonic rules and
ontologies.
• We show that dl-programs under the answer set semantics can be fruitfully used to support advanced reasoning tasks
for the Semantic Web. More concretely, we show that different forms of closed-world reasoning [40,41,88] and default
reasoning [86,89] on top of DL knowledge bases can be elegantly realized using dl-programs. Furthermore, we show
that dl-programs can be used to simulate DL-safe rules on DL knowledge bases [80].
• We give a precise picture of the complexity of deciding strong and weak answer set existence for a given dl-program, as
well as of brave and cautious reasoning under both the weak and strong answer set semantics. We consider the general
case as well as the restrictions where the given dl-program is positive or stratified. We consider the description logics
SHIF (D) and SHOIN (D), but most of our results can be easily transferred to other description logics of the same
complexity (EXP resp. NEXP). In detail, for KB = ( L , P ) with L in SHIF (D), answer set existence is EXP-complete if KB
is positive or stratified, and NEXP-complete if KB is arbitrary. If L is in SHOIN (D), it is NEXP-complete if KB is positive,
and PNEXP -complete if KB is stratified or general. In nearly all cases, the complexity of cautious (resp., brave) reasoning
from dl-programs coincides with the complexity of answer set non-existence (resp., existence) for dl-programs.
Our interfacing approach of dl-programs has several attractive features. First of all, it enables the usage of legacy software
and solvers for answer set programs and DLs, respectively, to craft an engine for dl-programs. Furthermore, an engine for
dl-programs will benefit from improvements to solvers for the components used. Another aspect is that the interfacing
approach is amenable to distributed evaluation, and to privacy aspects for both the DL knowledge base L and the logic
program P , since the internal structure of the one part need not be revealed to the other part for evaluation. This is
particularly useful for realizing a service-oriented architecture of programs, in which access to an ontology is provided
through a service.
The rest of this paper is organized as follows. Section 2 recalls normal logic programs under the answer set semantics,
and Section 3 discusses the description logics SHOIN (D) and SHIF (D). In Section 4, we first introduce the syntax of
dl-programs, and then define Herbrand models of dl-programs, unique minimal Herbrand models of positive and stratified
dl-programs, and finally the strong and the weak answer set semantics for general dl-programs. Section 5 shows how
the unique minimal Herbrand models of positive and stratified dl-programs can be computed through fixpoint iterations.
It also gives a general guess-and-check algorithm for computing the set of all weak answer sets of general dl-programs.
Section 6 shows how advanced reasoning tasks for the Semantic Web can be realized on top of dl-programs. In Section 7,
we provide a precise picture of the complexity of deciding strong and weak answer set existence for a dl-program, and
of brave and cautious reasoning from dl-programs under the weak and the strong answer set semantics. In Section 8, we
describe advanced algorithms and a prototype implementation for dl-programs, and, in Section 9, we provide a detailed
discussion on related work in the literature. Section 10 summarizes the main results and gives an outlook on further and
future research. Detailed proofs of all results are relegated to Appendices A to F.
In this section, we recall normal programs (over classical literals) under the answer set semantics [39], which extends
the stable model semantics [38] with classical (or, more appropriately, strong) negation. We first describe the syntax and
then the semantics of normal logic programs. We finally describe some programming schemes.
2.1. Syntax
Let = (P , C ) be a first-order vocabulary with nonempty finite sets C and P of constant resp. predicate symbols, but
no function symbols. Let X be a set of variables. A term is either a variable from X or a constant symbol from . An
1498 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
atom is an expression of the form p (t 1 , . . . , tn ), where p is a predicate symbol of arity n 0 from , and t 1 , . . . , tn are
terms. A classical literal (or simply literal) l is an atom p or a negated atom ¬ p. Its complementary literal is ¬ p (resp., p).
A negation-as-failure literal (or simply NAF-literal) is a literal l or a default-negated literal notl. A normal rule (or simply rule) r
is an expression of the form
a ← b1 , . . . , bk , not bk+1 , . . . , not bm , m k 0, (1)
where a is a classical literal, and b1 , . . . , bm are classical literals or equality (resp., inequality) atoms of the form t 1 = t 2 (resp.,
t 1 = t 2 ), where t 1 and t 2 are terms. The literal a is the head of the rule r, and the conjunction b1 , . . . , bk , not bk+1 , . . . , not bm
is the body of r, where b1 , . . . , bk (resp., not bk+1 , . . . , not bm ) is the positive (resp., negative) body of r. We use H (r ) to
denote its head literal a, and B (r ) to denote the set of all its body literals B + (r ) ∪ B − (r ), where B + (r ) = {b1 , . . . , bk } and
B − (r ) = {bk+1 , . . . , bm }. If the body of the rule r is empty (that is, if k = m = 0), then r is a fact, and we often omit “←” in
such a case. A normal program (or simply program) P is a finite set of rules. A positive program P is a finite set of “not”-free
rules.
2.2. Semantics
The answer set semantics of normal programs is defined in terms of consistent sets of classical literals, which represent
three-valued interpretations. Positive programs are associated with their least satisfying consistent set of classical literals,
if one exists, while the semantics of normal programs is defined by a reduction to the least model semantics of positive
programs via the Gelfond–Lifschitz transformation.
More formally, the Herbrand universe of a program P , denoted HU P , is the set of all constant symbols appearing in P . If
there is no such constant symbol, then HU P = {c }, where c is an arbitrary constant symbol from . As usual, terms, atoms,
literals, rules, programs, etc. are ground iff they do not contain any variables. The Herbrand base of a program P , denoted
HB P , is the set of all ground (classical) literals that can be constructed from the predicate symbols appearing in P and the
constant symbols in HU P . A ground instance of a rule r ∈ P is obtained from r by replacing every variable that occurs in r by
a constant symbol from HU P , using a substitution θ for the variables in r, and removing all the valid equality and inequality
atoms t 1 θ = t 2 θ and t 1 θ = t 2 θ , respectively. A ground instance of r is consistent iff it contains no equality or inequality
atoms. We denote by ground( P ) the set of all consistent ground instances of rules in P .
A set X ⊆ HB P of literals is consistent iff { p , ¬ p } X for every atom p ∈ HB P . An interpretation I relative to a program P
is a consistent subset of HB P . Intuitively, any such I represents a three-valued interpretation of all ground atoms as follows:
an atom a has the truth value true, false, and unknown iff a ∈ I , ¬a ∈ I , and {a, ¬a} ∩ I = ∅, respectively. A model of a
positive program P is an interpretation I ⊆ HB P such that B (r ) ⊆ I implies H (r ) ∈ I , for every r ∈ ground( P ). An answer set
of a positive program P is the least model of P with respect to set inclusion.
The transform, or Gelfond–Lifschitz transform, of a program P relative to an interpretation I ⊆ HB P , denoted P I , is the
ground positive program that is obtained from ground( P ) by (i) deleting every rule r such that B − (r )∩ I = ∅, and (ii) deleting
the negative body from every remaining rule. An answer set of a (normal) program P is an interpretation I ⊆ HB P such that
I is an answer set of P I . The set of all answer sets of a program P is denoted by ans( P ).
The main reasoning tasks for programs under the answer set semantics are the following:
The following two examples describe common programming schemes for normal programs under the answer set seman-
tics, which will be used in the sequel. Variants of the schema illustrated by the first example are adopted for enforcing
multiple answers to a given normal program, so that a variety of types of nondeterministic choice can be modeled.
Example 2.1 (Guess module). Consider the normal logic program P , consisting of the following rules, where g is an atom:
g ← not ¬ g ; ¬ g ← not g . (2)
Then, the answer sets of P are given by M 1 = { g } and M 2 = {¬ g }.
The next example shows another common schema, which allows to enforce the inconsistency of an answer set depending
on some given condition.
Example 2.2 (Constraint). Let the normal program P be obtained from a given normal program by adding the following rule,
where f is a fresh atom:
f ← c , not f . (3)
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1499
Then, no answer set of P contains c. Indeed, in every such answer set M, f ← not f would have to hold; this, however, is
not possible under answer set semantics, since absence of f in M would enforce presence of f in M and vice versa.
In this section, we recall the syntax and the semantics of the expressive description logics SHIF (D) and SHOIN (D),
which provide the logical underpinning of the Web ontology languages OWL Lite and OWL DL, respectively (see [54,58] for
further details and background). Intuitively, description logics model a domain of interest in terms of concepts and roles,
which represent classes of individuals and binary relations on classes of individuals, respectively. A description logic knowl-
edge base encodes in particular subset relationships between classes of individuals, subset relationships between binary
relations on classes of individuals, the membership of individuals to classes, and the membership of pairs of individuals to
binary relations on classes. Other important ingredients of SHIF (D) (resp., SHOIN (D)) are datatypes (resp., datatypes
and individuals) in concept expressions.
3.1. Syntax
We now recall the syntax of SHIF (D) and SHOIN (D). We first describe the syntax of the latter, which has the
following datatypes and elementary ingredients. We assume a set E of elementary datatypes and a set V of data values.
A datatype theory D = (D , ·D ) consists of a datatype (or concrete) domain D and a mapping ·D that assigns to every
elementary datatype a subset of D and to every data value an element of D . Let = (A ∪ R A ∪ R D , I ∪ V) be a vocabulary,
where A, R A , R D , and I are pairwise disjoint (denumerable) sets of atomic concepts, abstract roles, datatype (or concrete) roles,
and individuals, respectively. We denote by R− A the set of inverses R
− of all R ∈ R .
A
Roles and concepts are defined as follows. A role is an element of R A ∪ R− A ∪ R D . Concepts are inductively defined as
follows. Every atomic concept C ∈ A is a concept. If o 1 , o2 , . . . are individuals from I, then {o1 , o2 , . . .} is a concept (called
oneOf ). If C and D are concepts, then also (C D ), (C D ), and ¬C are concepts (called conjunction, disjunction, and negation,
respectively). If C is a concept, R is an abstract role from R A ∪ R− A , and n is a nonnegative integer, then ∃ R .C , ∀ R .C , nR,
and nR are concepts (called exists, value, atleast, and atmost restriction, respectively). If D is a datatype, U is a datatype
role from R D , and n is a nonnegative integer, then ∃U . D, ∀U . D, nU , and nU are concepts (called datatype exists, value,
atleast, and atmost restriction, respectively). We use and ⊥ to abbreviate the concepts C ¬C and C ¬C , respectively,
and we eliminate parentheses as usual.
We next define axioms and knowledge bases as follows. An axiom is an expression of one of the following forms:
We also use F ≡ G to abbreviate the two concept or role inclusion axioms F G and G F . A description logic (DL) knowledge
base L is a finite set of axioms.
For an abstract role R ∈ R A , we define Inv( R ) = R − and Inv( R − ) = R. Let the transitive and reflexive closure of on
abstract roles relative to L, denoted , be defined as follows: For two abstract roles R and S in L, S R relative to L holds
iff either (a) S = R, (b) S R ∈ L, (c) Inv( S ) Inv( R ) ∈ L, or (d) some abstract role Q exists such that S Q and Q R
relative to L. An abstract role R is simple relative to L iff, for each abstract role S such that S R relative to L, it holds
that (i) Trans( S ) ∈
/ L and (ii) Trans(Inv( S )) ∈
/ L. For decidability, number restrictions in L are restricted to simple abstract
roles [59].
Observe that in SHOIN (D), concept and role membership axioms can also be expressed through concept inclusion
axioms. The knowledge that the individual a is an instance of the concept C can be expressed by the concept inclusion
axiom {a} C , while the knowledge that the pair (a, b) (resp., (a, v )) is an instance of the role R (resp., U ) can be expressed
by {a} ∃ R .{b} (resp., {a} ∃U .{ v }).
The syntax of SHIF (D) is the one of SHOIN (D), but without the oneOf constructor and with the atleast and atmost
constructors limited to 0 and 1.
The following example introduces a DL knowledge base L S for a reviewer selection scenario, which is also used in some
subsequent examples.
Example 3.1 (Reviewer selection). Suppose we want to assign reviewers to papers, based on certain information about papers
and available persons, which is encoded in the DL knowledge base L S . More concretely, L S classifies papers into research
areas. A research area belongs to the concept Area. A paper is classified depending on keyword information. The abstract
roles keyword and inArea associate with each paper its relevant keywords and the areas that it is classified into, respectively.
1500 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
A paper is in an area if it is associated with a keyword of that area. The abstract role expert relates persons to their areas of
expertise. For simplicity, a person is an expert in an area if he or she wrote a paper in that area. The concept Referee contains
all referees. The abstract role contains associates each area with a group of keywords, while hasMember relates clusters of
keywords having some overlap (e.g., one could put in the same cluster C 1 the words “Semantic Web” and “Ontologies”). The
following are some axioms from L S :
3.2. Semantics
We now define the semantics of SHIF (D) and SHOIN (D) in terms of general first-order interpretations, as usual,
and we also recall some important reasoning problems in description logics.
An interpretation I = (I , ·I ) with respect to a datatype theory D = (D , ·D ) consists of a nonempty (abstract) domain
disjoint from D , and a mapping ·I that assigns to each atomic concept C ∈ A a subset of I , to each individual o ∈ I
I
an element of I , to each abstract role R ∈ R A a subset of I ×I , and to each datatype role U ∈ R D a subset of I × D .
The mapping ·I is extended to all concepts and roles as usual (where #S denotes the cardinality of a set S):
• ( R − )I = {(a, b) | (b, a) ∈ R I };
• {o1 , . . . , on }I = {oI I
1 , . . . , on } ;
• (C D ) = C ∩ D , (C D )I = C I ∪ D I , and (¬C )I = I \C I ;
I I I
• (∃ R .C )I = {x ∈ I | ∃ y: (x, y ) ∈ R I ∧ y ∈ C I };
• (∀ R .C )I = {x ∈ I | ∀ y: (x, y ) ∈ R I → y ∈ C I };
• ( nR )I = {x ∈ I | #({ y | (x, y ) ∈ R I }) n};
• ( nR )I = {x ∈ I | #({ y | (x, y ) ∈ R I }) n};
• (∃U . D )I = {x ∈ I | ∃ y: (x, y ) ∈ U I ∧ y ∈ D D };
• (∀U . D )I = {x ∈ I | ∀ y: (x, y ) ∈ U I → y ∈ D D };
• ( nU )I = {x ∈ I | #({ y | (x, y ) ∈ U I }) n};
• ( nU )I = {x ∈ I | #({ y | (x, y ) ∈ U I }) n}.
The satisfaction of a description logic axiom F in the interpretation I = (I , ·I ) with respect to D = (D , ·D ), denoted
I | F , is defined as follows: (1) I | C D iff C I ⊆ D I ; (2) I | R S iff R I ⊆ S I ; (3) I | Trans( R ) iff R I is transitive;
(4) I | C (a) iff aI ∈ C I ; (5) I | R (a, b) iff (aI , bI ) ∈ R I (resp., I | U (a, v ) iff (aI , v D ) ∈ U I ); and (6) I | a = b iff
aI = bI (resp., I | a = b iff aI = bI ). The interpretation I satisfies the axiom F , or I is a model of F , iff I | F . The
interpretation I satisfies a DL knowledge base L, or I is a model of L, denoted I | L, iff I | F for all F ∈ L. We say that
L is satisfiable (resp., unsatisfiable) iff L has a (resp., no) model. An axiom F is a logical consequence of L, denoted L | F , iff
every model of L satisfies F . A negated axiom ¬ F is a logical consequence of L, denoted L | ¬ F , iff every model of L does
not satisfy F .
Some important reasoning problems related to DL knowledge base L are the following: (1) decide whether a given L is
satisfiable; (2) given L and a concept C , decide whether L | C ⊥; (3) given L and two concepts C and D, decide whether
L | C D; (4) given L, an individual a ∈ I, and a concept C , decide whether L | C (a); (5) given L, two individuals a, b ∈ I
(resp., an individual a ∈ I and a data value v), and an abstract role R ∈ R A (resp., a datatype role U ∈ R D ), decide whether
L | R (a, b) (resp., L | U (a, v )), and (6) given L and two individuals a, b ∈ I, decide whether L | a = b or whether L | a = b.
Here, (1) is a special case of (2), since L is satisfiable iff L | ⊥. Furthermore, (2) and (3) can be reduced to each
other, since L | C ¬ D ⊥ iff L | C D. Finally, in SHOIN (D), since concept and role membership axioms can also be
expressed through concept inclusion axioms (see above), (4) and (5) are special cases of (3).
Example 3.2 (Reviewer selection, ctd.). It is not difficult to verify that the set L of all axioms given in Example 3.1 is satisfiable,
and thus that the class of all papers and the class of all publications both may have some instances. Furthermore, L logically
implies the axiom inArea(pub1 , Agents), which follows from the axioms (5) to (6) in Example 3.1.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1501
In this section, we introduce description logic programs (or simply dl-programs), which are a novel combination of normal
programs under the answer set semantics and DL knowledge bases under their standard first-order semantics. We first
define the syntax of dl-programs and then their semantics. We finally discuss some further semantic properties of dl-
programs.
4.1. Syntax
Informally, a dl-program consists of a DL knowledge base L and a generalized normal program P . The latter is a finite set
of generalized rules, which may contain queries to L in their body. In such a query, it is asked whether a certain description
logic axiom or its negation logically follows from L.
The DL knowledge base L is defined over a vocabulary = (A ∪ R A ∪ R D , I ∪ V), as in Section 3.1, while the generalized
normal program P is defined over a vocabulary = (P , C ), as in Section 2.1. We assume that A ∪ R A ∪ R D is disjoint from
P , while I P ⊆ C ⊆ I ∪ V, where I P is the set of all constant symbols appearing in P . Note that C does not necessarily contain
all the named individuals explicitly appearing in L; it may be arbitrarily chosen, although a primary setting (which is the
default behavior of our system prototype) is choosing C such that I L ⊆ C , where I L is the set of all individuals appearing
in L.1
We now define the notions of dl-queries and dl-atoms, which are used in rule bodies to express queries to the DL
knowledge base L. A dl-query Q (t) is either (a) a concept inclusion axiom F or its negation ¬ F ; (b) of the forms C (t )
or ¬C (t ), where C is a concept, and t is a term; (c) of the forms R (t 1 , t 2 ) or ¬ R (t 1 , t 2 ), where R is a role, and t 1 and t 2 are
terms; or (d) of the forms = (t 1 , t 2 ) and = (t 1 , t 2 ), where t 1 and t 2 are terms. Note here that t is the empty argument list
in (a), t = t in (b), and t = (t 1 , t 2 ) in (c) and (d), and terms are defined in the same way as in Section 2.1. A dl-atom has
the form
where each S i is either a concept, a role, or a special symbol θ ∈ {=, =}; opi ∈ {, ∪, − ∩}
− ; p is a unary predicate symbol,
i
if S i is a concept, and a binary predicate symbol otherwise; and Q (t) is a dl-query. We call p 1 , . . . , pm its input predicate
symbols. Intuitively, opi = (resp., opi = ∪
− ) increases S (resp., ¬ S ) by the extension of p , while op = ∩
i i i i
− constrains S to
i
p i . A dl-rule r has the form (1), where any literal b1 , . . . , bm ∈ B (r ) may be a dl-atom. A dl-program KB = (L, P ) consists of
a description logic knowledge base L and a finite set of dl-rules P .
4.2. Semantics
Prior to defining the semantics of dl-programs, we first give an intuitive outline via an example. We then introduce Her-
brand models of dl-programs and, in analogy to the development for ordinary logic programs, gradually introduce genuine
semantics for increasingly more expressive fragments of dl-programs: we begin with a canonical least model semantics
for positive dl-programs, and then define a canonical iterative least model semantics for stratified dl-programs. Finally, we
define for arbitrary dl-programs two alternative notions of answer sets, namely, strong and weak answer sets. Note that (con-
sistent) positive and stratified dl-programs both have unique single answer sets, while non-stratified dl-programs may have
multiple answer sets.
Example 4.1 (Reviewer selection, ctd.). Let KB S = ( L S , P S ) be the dl-program consisting of the DL knowledge base L S from
Example 3.1 and the set P S , given by the following dl-rules:
1
This allows for information hiding, as only selected individuals occurring in L might be shown to the user.
1502 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
a( P ) ← assign( X , P ); (13)
The formal semantics, defined subsequently, associates KB S with a collection of answer sets, like for the case of ordinary
logic programs. The purpose of P S is to specify how these answer sets should look like.
Facts (5) to (7) specify two papers, p 1 and p 2 , to be assigned to reviewers along with their keywords. Rule (8) allows for
retrieving keyword information from L S . More concretely, the predicate kw is augmented via dl-atoms by those keywords
in L S that share the same area. Intuitively, the ground dl-atom DL[hasMember](s, k) is true for all pairs (s, k) such that
L S | hasMember (s, k). Rule (9) contains a richer kind of dl-atom, where we first enrich the role keywords in L S by the
extension of the predicate kw in P S via the operator . We then query the role in Area over the modified version L S of L S
(i.e., we retrieve from L S the areas that each paper is classified into). Here, the new information coming from kw might
trigger new information available in L S .
In Rule (10), we define reviewer candidates for a given paper. More specifically, a reviewer x is a candidate to review
the paper p, if x is known in L S as a Referee and as an expert in the reference area a of p. Rules (11) and (12) encode a
nondeterministic choice. As we will see, our semantics gives a special meaning to rules that appear in recursive rules and
involve negation. Intuitively, for any possible candidate pair cand(x, p ), we guess nondeterministically whether assign(x, p )
is true or not, meaning that p must be assigned to x for reviewing or not. Thus, there are answers where assign(x, p ) is
true, and there are other answers where it is false. Finally, Rules (13) and (14) check if each paper is assigned; if not, then
an error is flagged: answers where error( p ) is true for a given p can be filtered out.
Note that Rules (8) to (10) transfer knowledge from L S to P S . In Rule (9), knowledge is also transferred from P S to L S .
Hence, information flows in both directions between the DL knowledge base L S and the generalized program P S .
The intuitive meaning of the operator ∪ − is to add information from P S as negative assertions. For instance, keywords ∪− kw
means that L S is enlarged with assertions ¬keywords(k) for any true kw (k). To illustrate the use of ∩ − , imagine to define a
unary predicate poss_Referees in the dl-program, and to add Referee ∩ − poss_Referees in the first dl-atom of (10). The effect of
this modification would be to add to L S negative assertions ¬Referee(r ) for all the r such that poss_Referees does not hold,
thus constraining possible referees to the domain of poss_Referees.
• if l ∈ HB P , then I | L l iff l ∈ I ;
• if l is
m a ground dl-atom DL[λ; Q ](c), where λ = S 1 op1 p 1 , . . . , S m opm pm , then I | L l iff L ( I ; λ) | Q (c), where L ( I ; λ) =
L ∪ i =1 A i ( I ) and, for 1 i m,
{ S i (e) | p i (e) ∈ I }, if opi = ;
A i ( I ) = {¬ S i (e) | p i (e) ∈ I }, if opi = ∪;
−
We say that I is a model of a ground dl-rule r iff I | L l for all l ∈ B + (r ) and I | L l for all l ∈ B − (r ) implies I | L H (r ). We
say I is a model of a dl-program KB = ( L , P ), or I satisfies KB, denoted I | KB, iff I | L r for all r ∈ ground( P ). We say KB is
satisfiable (resp., unsatisfiable) iff it has some (resp., no) model.
Observe that the above satisfaction of dl-atoms a in interpretations I also involves negated concept inclusion axioms
¬(C D ), negated concept membership axioms ¬C (a), and negated role membership axioms ¬ R (a, b) and ¬U (a, v ). For
this reason, we slightly extend the standard syntax and semantics of SHIF (D) and SHOIN (D) by also allowing such
negated axioms.2 The notions of satisfaction, satisfiability, and entailment are naturally extended to handle such axioms. In
particular, an interpretation I satisfies ¬(C D ) (resp., ¬C (a), ¬ R (a, b), ¬U (a, v )) iff C I D I (resp., aI ∈ / C I , (aI , bI ) ∈
/
I I
R , (a , v ) ∈
D I
/ U ).
Entailment (for dl-atoms) in the slight extensions of SHIF (D) and SHOIN (D) can be reduced to entailment in
SHIF (D) and SHOIN (D), respectively, as follows. Notice first that the entailment of a concept inclusion, concept mem-
bership, role membership, or equality axiom F (resp., its negation ¬ F ) from a DL knowledge base L is equivalent to the
2
Actually, OWL 2 follows a similar pattern, allowing for negative property membership assertions [102].
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1503
unsatisfiability of L ∪ {¬ F } (resp., L ∪ { F }). Here, the negated concept inclusion axiom ¬(C D ) is equivalent to the concept
membership axiom (C ¬ D )(a) (where a is a fresh individual), and the negated concept membership axiom ¬(C (a)) is
equivalent to the concept membership axiom (¬C )(a). Then, every negated abstract role membership axiom in a DL knowl-
edge base L can be removed by using that L ∪ {¬ R (a, b)} is unsatisfiable iff L ∪ { A (a), B (b), ∃ R . B ¬ A } is unsatisfiable
(where A and B are two fresh atomic concepts and L is any DL knowledge base) [72]. Negated datatype role membership
axioms can be removed in a similar way.
(ii) every ground dl-atom that occurs in ground( P ) is monotonic relative to KB.
For ordinary positive programs P , the intersection of two models of P is also a model of P . The following lemma shows
a similar result for positive dl-programs.
Lemma 4.2. Let KB = ( L , P ) be a positive dl-program. If the interpretations I 1 , I 2 ⊆ HB P are models of KB, then I 1 ∩ I 2 is also a model
of KB.
Corollary 4.3. Let KB = ( L , P ) be a positive dl-program. If KB is satisfiable, then there exists a unique model I ⊆ HB P of KB such that
I ⊆ J for all models J ⊆ HB P of KB, i.e., a unique least model of KB.
In the spirit of Logic Programming, this special model is adopted as the semantics of KB.
Definition 4.4. For every satisfiable positive dl-program KB = ( L , P ), we denote by M KB its unique least model.
Example 4.5. Let KB result from the dl-program KB S of Example 4.1 by removing Rules (11)–(14). Clearly, KB is “not”-free.
Moreover, since the dl-atoms do not contain ∩ − , they are all monotonic. Thus, KB is positive. As well, its unique least model
simple syntactic criterion that implies monotonicity of a dl-atom (cf. also Example 4.5).
For any dl-program KB = ( L , P ), we denote by DL P the set of all ground dl-atoms that occur in ground( P ). We assume
that KB has an associated set DL+ P ⊆ DL P of ground dl-atoms which are known to be monotonic, and we denote by DL P =
?
+
DL P \ DL P the set of all other ground dl-atoms. An input literal of some dl-atom a ∈ DL P is a ground literal with an input
predicate of a and constant symbols in .
The notion of a stratification for dl-programs defines an ordered partition of the set of all ground atoms and ground
dl-atoms as follows.
(i) for each r ∈ ground( P ), μ( H (r )) μ(l ) for each l ∈ B + (r ), and μ( H (r ))>μ(l ) for each l ∈ B − (r ), and
(ii) μ(a) μ(l) for each input literal l of each a ∈ DL+ P , and μ(a) > μ(l) for each input literal l of each a ∈ DL P .
?
We call k 0 the length of μ. For every i ∈ {0, . . . , k}, we then define the dl-program KBi as ( L , P i ) = ( L , {r ∈ ground( P ) |
μ( H (r )) = i }), and HB P i (resp., HBP i ) as the set of all l ∈ HB P such that μ(l) = i (resp., μ(l) i).
1504 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
We say that a dl-program KB = ( L , P ) is stratified, iff it has a stratification μ of some length k 0. Its canonical model is
determined as follows.
Definition 4.7. Let KB = ( L , P ) be a dl-program with a stratification of length k 0. We define its iterative least models
M i ⊆ HB P with i ∈ {0, . . . , k} by:
We call KB consistent, if every M i with i ∈ {0, . . . , k} exists, and inconsistent otherwise. If KB is consistent, then M KB
denotes the canonical model M k .
Note that M KB is well-defined, as it does not dependent on a particular μ (as also witnessed by Corollary 4.15). The
following result shows that M KB is in fact a minimal model of KB.
Theorem 4.8. Let KB = (L, P ) be a stratified dl-program. Then, M KB is a minimal model of KB.
Example 4.9. Let KB be the dl-program resulting from the dl-program KB S of Example 4.1 by removing Rules (11) and (12).
This program has a stratification of length 2, with the associated set DL+
P comprising all dl-atoms occurring in P . The least
model of P contains all review candidates of the given papers, together with error flags for them, because no paper is
assigned so far.
(i) every dl-rule r such that either I | L a for some a ∈ B + (r ) ∩ DL?P , or I | L l for some l ∈ B − (r ); and
(ii) from each remaining dl-rule r all literals in B − (r ) ∪ ( B + (r ) ∩ DL?P ).
Notice that ( L , s P LI ) has only monotonic dl-atoms and no NAF-literals anymore. Thus, ( L , s P LI ) is a positive dl-program,
and by Corollary 4.3, has a least model, if it is satisfiable. We thus define the strong answer set semantics of general
dl-programs by reduction to the least model semantics of positive dl-programs as follows.
Definition 4.11. Let KB = (L, P ) be a dl-program. A strong answer set of KB is an interpretation I ⊆ HB P such that I is the
least model of ( L , s P LI ). We denote by ans s (KB) the set of all strong answer sets of KB. If a ground literal l is in every (resp.,
some) strong answer set of KB, then we say that l is a cautious (resp., brave) consequence of KB (under the strong answer set
semantics), in symbols KB | s,c l (resp., KB | s,b l).
The following result shows that the strong answer set semantics of a dl-program KB = ( L , P ) without dl-atoms coincides
with the ordinary answer set semantics of P .
Theorem 4.12. Let KB = (L, P ) be a dl-program without dl-atoms. Then, I ⊆ HB P is a strong answer set of KB iff it is an answer set of
the ordinary program P .
The next result shows that, as desired, strong answer sets of a dl-program KB are also models of KB, and moreover
minimal models of KB if all dl-atoms are monotonic (and known as such).
Theorem 4.13. Let KB = (L, P ) be a dl-program, and let M be a strong answer set of KB. Then, (a) M is a model of KB, and (b) M is a
minimal model of KB if DL P = DL+
P.
The following result shows that a positive (resp., stratified) dl-program KB is satisfiable (resp., consistent) iff it has a
strong answer set. In this case, it has at most one strong answer set, which coincides with its canonical minimal model M KB .
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1505
Theorem 4.14. Let KB = (L, P ) be a positive (resp., stratified) dl-program. If KB is satisfiable (resp., consistent), then M KB is the only
strong answer set of KB. If KB is unsatisfiable (resp., inconsistent), then KB has no strong answer set.
Since the strong answer sets of a stratified dl-program KB are independent of the stratification μ of KB, we thus obtain
that the notion of consistency of KB and the canonical minimal model M KB are both independent of μ.
Corollary 4.15. Let KB be a stratified dl-program. Then, the notion of consistency of KB and the model M KB do not depend on the
stratification of KB.
Example 4.16. Consider now the full dl-program of Example 4.1. This program is not stratified, in view of Rules (11) and (12),
which take care of the selection between the different candidates for being reviewers. Each strong answer set containing no
error flags corresponds to an acceptable review assignment scenario.
Definition 4.17. Let KB = ( L , P ) be a dl-program. The weak dl-transform of P relative to L and to an interpretation I ⊆ HB P ,
denoted w P LI , is the ordinary positive program obtained from ground( P ) by deleting
(i) all dl-rules r such that either I | L a for some dl-atom a ∈ B + (r ), or I | L l for some l ∈ B − (r ); and
(ii) from every remaining dl-rule r all the dl-atoms in B + (r ) and all the literals in B − (r ).
Observe that w P LI is an ordinary ground positive program, which does not contain any dl-atoms anymore, and which
also does not contain any NAF-literals anymore. We thus define the weak answer set semantics of general dl-programs by
reduction to the least model semantics of ordinary positive programs as follows.
Definition 4.18. Let KB = (L, P ) be a dl-program. A weak answer set of KB is an interpretation I ⊆ HB P such that I is the least
model of the ordinary positive program w P LI . We denote by ans w (KB) the set of all weak answer sets of KB. If a ground
literal l is in every (resp., some) weak answer set of KB, then we say that l is a cautious (resp., brave) consequence of KB
(under the weak answer set semantics), in symbols KB | s,c l (resp., KB | s,b l).
The following result shows that the weak answer set semantics of a dl-program KB = ( L , P ) without dl-atoms coincides
with the ordinary answer set semantics of P .
Theorem 4.19. Let KB = (L, P ) be a dl-program without dl-atoms. Then, I ⊆ HB P is a weak answer set of KB iff it is an answer set of
the ordinary normal program P .
The next result shows that every weak answer set of a dl-program KB is also a model of KB. In contrast to strong answer
sets, a weak answer set of KB is not necessarily a minimal model, even if KB has only monotonic dl-atoms.
Theorem 4.20. Let KB = ( L , P ) be a dl-program. Then, every weak answer set of KB is also a model of KB.
The following definition introduces the gl∗ -reduct, which transforms a given dl-program relative to an interpretation into
an ordinary normal program.
Definition 4.21. Let KB = (L, P ) be a dl-program and I ⊆ HB P . Then, the gl∗ -reduct of P relative to L and I , denoted P LI , is
obtained from ground( P ) by (i) deleting every dl-rule r where either I | L a for some dl-atom a ∈ B + (r ), or I | L a for some
dl-atom a ∈ B − (r ), and (ii) deleting from every remaining dl-rule r every dl-atom in B + (r ) ∪ B − (r ).
The following theorem shows that the weak answer set semantics of dl-programs can be reduced to the answer set
semantics of ordinary normal programs.
Theorem 4.22. Let KB = (L, P ) be a dl-program and I ⊆ HB P . Then, I is a weak answer set of KB iff I is an answer set of the gl∗ -reduct
P LI .
The next theorem shows that the set of all strong answer sets of a dl-program KB is contained in the set of all weak
answer sets of KB. Intuitively, the additional information about the monotonicity of dl-atoms that we use for specifying
1506 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
strong answer sets allows for focusing on a smaller set of models. Hence, the set of all weak answer sets of KB can be seen
as an approximation of the set of all strong answer sets of KB. Note that the converse of the following theorem generally
does not hold. That is, there exist dl-programs KB that have a weak answer set that is not a strong answer set.
Theorem 4.23. Every strong answer set of a dl-program KB = (L, P ) is also a weak answer set of KB.
Example 4.24. Consider P = { p (a) ← DL[c p ; c ](a)} and L = ∅. The unique strong answer set of ( L , P ) is M 1 = ∅, while the
weak answer sets of ( L , P ) are M 1 and M 2 = { p (a)}.
It is important to observe that the weak answer set semantics does not enjoy the property of minimality of answer sets
as the strong answer set semantics does (in case all dl-atoms are known to be monotonic, cf. Theorem 4.13). Thus, in the
above example, M 2 , although not minimal, is a weak answer set. M 2 might be considered a counterintuitive answer, since
evidence of the truth of p (a) is inferred by means of a “self-supporting” loop. This problem is solved by means of the strong
answer set semantics. Nonetheless, when no knowledge about monotonicity of dl-atoms is available, the weak answer set
semantics remains a reasonable choice.
The above problem is strictly related to the issue of establishing an intuitive semantics for logic programs with aggre-
gates. A further discussion of this issue, focused on logic programs with aggregates, and proposing a new notion of reduct
for answer set programs, is given by Faber, Leone, and Pfeifer [34].
We now discuss some further semantic aspects of dl-programs under the answer set semantics. We first describe in
which way they are a conservative extension of their constituents. We then discuss how one can deal with equality in
dl-programs. We finally concentrate on the aspect of correctly focusing dl-queries.
4.3.1. Conservativeness
We now show that dl-programs under the answer set semantics are a conservative extension of both DL knowledge
bases under their first-order semantics and ordinary normal programs under the answer set semantics.
The following proposition shows that dl-queries allow for correctly querying DL knowledge bases under their first-order
semantics. This result follows immediately from the semantics of dl-atoms.
Proposition 4.25. Let KB = ( L , P ) be a dl-program with P = {q(t) ← DL[ Q ](t)}, where Q is a dl-query and q is a predicate symbol
of matching arity. Furthermore, let c be a ground instance of t. Then, KB | κ ,μ q(c) iff L | Q (c), for all κ ∈ { w , s} and μ ∈ {c , b}.
The next proposition shows that both the strong and the weak answer set semantics of a dl-program KB = ( L , P ) without
dl-atoms coincide with the ordinary answer set semantics of P —it summarizes Theorems 4.12 and 4.19.
Theorem 4.26. Let KB = ( L , P ) be a dl-program without dl-atoms and let l be a ground literal. Then, ans( P ) = ans w (KB) = ans s (KB).
Moreover, KB | κ ,μ l iff P | μ l, for all κ ∈ { w , s} and μ ∈ {b, c }.
match the two different equality semantics. For instance, we apply this method in Section 6.3 to emulate equality reasoning
in an environment that mimics DL-safe rules [80].
Description logics allow for dealing with the existence of individuals whose identity is unknown. This is typical when
existential role assertions are used, such as an axiom (∃ R .)(a) in L. Every interpretation I of L contains then some
individual y ∈ I such that (aI , y ) ∈ R I . However, the identity of y may be unknown, y may not belong to any specific
concept in C , or y may even belong to different concepts in different interpretations. Thus, in the above case, the naive dl-
atom DL[ R ](a, T ) generally does not have any ground instance entailed by L, nor should it. However, the correctly focused dl-
atom DL[∃ R .](a) turns out to be naturally entailed by L.
Similarly, given L = {man woman ≡ person, person(lee)} and P consisting of the two naive dl-rules p ( X ) ← DL[man]( X )
and p ( X ) ← DL[woman]( X ), we cannot conclude p (lee) from KB = ( L , P ), since neither man(lee) nor woman(lee) is a con-
sequence of L. However, if we replace the two dl-rules in KB = ( L , P ) by the dl-rule p ( X ) ← DL[man woman]( X ), which
contains a correctly focused dl-atom, then we can also naturally conclude p (lee) from KB = ( L , P ).
5. Computation
In this section, we give a fixpoint characterization for the strong answer set of satisfiable positive (resp., consistent
stratified) dl-programs KB, and we show how to compute it by a finite fixpoint iteration (resp., by a sequence of finite
fixpoint iterations along a stratification of KB). We also provide a general guess-and-check algorithm for computing the set
of all weak answer sets of general dl-programs KB (which, by Theorem 4.23, includes the set of all strong answer sets of
KB).
The answer set of an ordinary positive resp. stratified normal program P has a well-known fixpoint characterization in
terms of an immediate consequence operator T P , which gracefully generalizes to positive resp. stratified dl-programs. This
can be exploited for a bottom-up computation of the strong answer set of such dl-programs.
The following lemma shows that for a positive dl-program KB, the operator T KB is monotonic, that is, I ⊆ I ⊆ HB P implies
T KB ( I ) ⊆ T KB ( I ). This result is immediate from the fact that for positive dl-programs KB = ( L , P ), every dl-atom that occurs
in ground( P ) is monotonic relative to KB.
The next result gives a characterization of the pre-fixpoints of T KB . If KB is satisfiable, then every pre-fixpoint of T KB
is either a model of KB, or equal to HB P . If KB is unsatisfiable, then HB P is the only pre-fixpoint of T KB . We recall here
that I ⊆ HB P is a pre-fixpoint of T KB iff T KB ( I ) ⊆ I .
Proposition 5.2. Let KB = ( L , P ) be a positive dl-program. Then, I ⊆ HB P is a pre-fixpoint of T KB iff I is either (a) a model of KB or (b)
equal to HB P .
Since every monotonic operator has a least fixpoint, which coincides with its least pre-fixpoint, we immediately obtain
the following corollary: The least fixpoint of T KB , denoted lfp( T KB ), is given by the least model of KB, if KB is satisfiable, and
by HB P , if KB is unsatisfiable.
Corollary 5.3. Let KB = ( L , P ) be a positive dl-program. Then, (a) lfp( T KB ) = M KB , if KB is satisfiable, and (b) lfp( T KB ) = HB P , if KB is
unsatisfiable.
The next result shows that the least fixpoint of T KB can be computed by a finite fixpoint iteration (which is based on the
assumption that P and the number of constant symbols in are finite). Note that for every I ⊆ HB P , we define T KB i
(I ) = I ,
i −1
if i = 0, and T KB
i
( I ) = T KB ( T KB ( I )), if i > 0.
n
Theorem 5.4. Let KB be a positive dl-program. Then, lfp( T KB ) = i =1
i
T KB (∅) = T KB
n
(∅) for some n 0.
Example 5.5. Suppose that P in KB = ( L , P ) consists of the rules r1 : b ← DL[ S p ; C ](a) and r2 : p (a) ← , and L is the axiom
S C . Then, KB is positive, and lfp( T KB ) = { p (a), b}, where T KB
0
(∅) = ∅, T KB
1
(∅) = { p (a)}, and T KB
2
(∅) = { p (a), b}.
1508 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
Theorem 5.6. Suppose KB = ( L , P ) has a stratification μ of length k 0. Define the literal sets M i ⊆ HB P , i ∈ {−1, 0, . . . , k}, as
follows: M −1 = ∅, and
n +1
Mi = T KBi ( M i −1 ) =
where ni 0 such that
n n
T KBi ( M i −1 ),
i i
T KBi
i
( M i −1 ), i 0.
Example 5.7. Assume that in program P of Example 5.5 also r3 : q(x) ← not ¬b, not DL[ S ](x) is included. Then, the mapping
μ that assigns 1 to q(a), 0 to DL[ S ](a), and 0 to all other ground atoms and ground dl-atoms in HB P ∪ DL P stratifies KB,
and M 0 = lfp( T KB0 ) = { p (a), b} and M 1 = { p (a), b, q(a)} = M KB .
Computing the set of all weak answer sets of a given (general) dl-program KB = ( L , P ) can be reduced to computing the
set of all answer sets of a normal logic program. This is done by a guess-and-check algorithm as follows:
da (c) ← not ¬da (c) and ¬da (c) ← not da (c) (15)
for each dl-atom a(c) ∈ DL P . Intuitively, they “guess” the truth values of the dl-atoms of P . We denote the resulting
3
Theorem 5.8. Let KB = ( L , P ) be a dl-program, and let I ⊆ HB P . Then, I is a weak answer set of KB iff I can be completed to an answer
set I ⊆ HB P guess of P guess such that da (c) ∈ I iff I | L a(c), for all a(c) ∈ DL P .
Although this basic algorithm is in general not very efficient and leaves room for improvements, it shows that the weak
answer set semantics can be realized on top of existing answer set solvers like DLV [23] or Smodels [81].
By Theorem 4.23, the computation of strong answer sets can be obtained by adapting the above algorithm: given a
candidate weak answer set I , we generate the positive dl-program ( L , s P LI ), compute the least model M of ( L , s P LI ) by
fixpoint iteration as described above, and verify that M coincides with I .
Example 5.9. The following program P (naively) emulates the closed-world assumption (see Section 6.1) on the concept
man in the description logic base L = {man person, person(lee)}:
pman( X ) ← DL[man ∪
− nman; man]( X ).
3
The guessing rules in (15) can be equivalently replaced by a disjunctive rule da (c) ∨ ¬da (c) ← . Such disjunctive rules can be efficiently processed by
the DLV system [65].
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1509
pman( X ) ← d1 ( X );
The algorithms presented in this section were implemented in our system prototype, which is described in more detail
in Section 8. Further details on algorithms and optimization techniques in our system prototype can be found in [95].
6. Reasoning applications
In this section, we show the usefulness of dl-programs for three concrete scenarios, where in particular the nonmono-
tonic behavior of the rules part is exploited in order to implement very well-known forms of nonmonotonic reasoning on
top of a DL knowledge base , or as in one case to emulate another well-known extension of description logics with rules.
More concretely, we show that classical forms of closed-world reasoning, like Reiter’s closed-world assumption (CWA) [88]
and the extended closed-world assumption (ECWA) [40,41], and of default reasoning, including Poole’s [86] and Reiter-style
default logic [89], can be implemented on top of a DL knowledge base . Indeed, dl-programs are particularly well-suited for
emulating Reiter’s default logic, since they offer the possibility to talk about consistency and provability within the language,
which is a basic ingredient of this logic. Furthermore, we show that DL-safe rules [80] can be emulated in a faithful way
using dl-programs.
In the rest of the section, for any DL knowledge base L, we denote by T L its corresponding first-order theory, which we
also identify with L if no confusion arises.
Reiter’s well-known closed-world assumption (CWA) [88]4 is acknowledged as an important reasoning principle for in-
ferring negative information from a first-order theory T: For a ground atom p (c), conclude ¬ p (c) if T | p (c). Any such
atom p (c) is also called free for negation. The CWA of T , denoted CWA( T ), is then the extension of T with all literals ¬ p (c)
where p (c) is free for negation.
Using dl-programs, the CWA may be intuitively expressed on top of an external DL knowledge base , which can be
queried through suitable dl-atoms.
The ground atoms of man that are free for negation in L (i.e., in T L ) are determined by the following rule, where man is a
fresh predicate uniquely associated with man:
where λ contains for each concept C (resp., role R) the expression C ∪ − c̄ (resp., R ∪
− r̄). The ground instances Q (c) of Q (t)
such that CWA( L ) | Q (c) are then given by the atoms q(c) in the single answer set of KB. In the above example, the query
man( X ) has no answer, while ¬man( X ) has the answer X = lee.
DL knowledge bases lack this notion of inference, adhering to the open-world assumption. The open-world assumption can
indeed be considered reasonable in a variety of contexts, such as the Semantic Web scenario. There, a single knowledge base
is generally considered as part of a distributed pool of information, rather than an isolated traditional database containing
complete information. Thus, new information may easily contradict information inferred by CWA and lead to inconsistency.
4
Throughout this section, we refer to [14,74] for references to closed-world reasoning and circumscription.
1510 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
Nonetheless, it is acknowledged that many Semantic Web application scenarios require some form of closed-world rea-
soning [2,46,85]. Furthermore, the use of description logics for more expressive data models than the plain relational model,
which has been proposed, e.g., in [8,16] and advocated for enterprise application integration and data integration [64], also
increases the interest in dealing with the CWA in this context.
However, the CWA has well-known problems with inconsistency, stemming from disjunctive knowledge as noted, e.g., in
[74]. Several refinements of the CWA have been proposed to avoid such inconsistency, by restricting the predicates that can
safely be negated, and/or by considering more general formulas than literals to be free for negation (see, e.g., [14,74] for an
overview).
One of the most advanced refinements is the extended closed-world assumption (ECWA) [40,41], which is intimately related
to circumscription [67]. As in [40,41], in the rest of this section, we adopt the following restrictions on the theory T , which
are common in a database context:
• the domain-closure assumption (DCA): ∀x(x = c 1 ∨ x = c 2 ∨ · · · ∨ x = cn ), which states that there are no individuals other
than the individuals c 1 , . . . , cn that are explicitly named in the theory T , and
• the unique-names assumption (UNA): c i = c j , for all i = j, which states that distinct names also refer to distinct objects
in the domain.
Note that, while DCA and UNA are not necessarily true for L, the semantics given to a dl-program KB = ( L , P ) (no matter
whether L fulfills DCA and UNA or not) implicitly fulfills these assumptions. However, DCA and UNA can also be expressed
in a description logics having the oneOf construct and the possibility to express disequality axioms, such as SHOIN (D).
The ECWA introduces a partitioning P , Q, Z of the predicates in T into three disjoint lists (viewed as sets) P , Q, and
Z (Q is often omitted, since it is clear from P and Z ). Informally, the predicates in P should be minimized, and ¬ p (c)
concluded if p (c) cannot be proved, while the predicates in Q are not subject to such inference, and the predicates in Z
can take arbitrary extensions in order to minimize those in P .
Semantically, the ECWA is characterized in terms of minimal models defined as follows. Given two interpretations M and
N for T , we write M P ,Z N if M and N only differ in how they interpret predicate symbols in P and Z , and for each
p ∈ P the extension in M is a subset of the extension in N. We call M a P , Z -minimal model of T , iff M is a model of T
and there is no model N of T such that N P ,Z M and M P ,Z N. We say that T | ECWA φ , if the formula φ is true in all
P , Z -minimal models of T .
Informally, a model M of T is P , Z -minimal, if it makes a smallest set of ground atoms over P true, while the
interpretation of Q is fixed and the atoms over Z may take arbitrary value. In particular, if P contains all predicates, then
the set of P , ∅-minimal models of T corresponds to the minimal Herbrand models of T .
Since we can view a DL knowledge base L as its corresponding first-order theory T L with unary and binary predicates for
concepts and roles, respectively, we can readily apply the ECWA to it. We next describe an encoding of the P , Z -minimal
models for an arbitrary L.
Definition 6.2. Let L be a DL knowledge base , and let P , Q, Z be a partitioning of all concepts and roles occurring in it.
P ,Z = ( L , P ) is built by constructing P as follows:
The dl-program KBecwa
) ← not p + ( X
p( X ), (18)
+ ) ← DL[λ; p ]( X
p (X ), (19)
where λ contains for each p in P ∪ Q the expression p ∪
− p, and for each p in Q the expression p p+ .
(2) For each concept or role p in Q ∪ Z , add the rules
) ← not p + ( X
p( X ), (20)
+ ) ← not p ( X
p (X ). (21)
(3) P contains the rule
fail ← DL[λ ; ⊥](b), not fail, (22)
where λ is λ from above plus the expressions z z+ and z − z for each z in Z , b is an arbitrary constant symbol, and
∪
fail is a fresh atom.
In this program, Rules (18) and (19) determine the extensions of the predicates from P in a P , Z -minimal model.
Here, the assumptions on P and Q are fed into L in (19), but not those on Z , since they are not relevant. Rules (20) and
(21) simply guess the extension of the concepts and roles in Q and Z . The compatibility of the interpretation of all ground
atoms is then checked with Rule (22); note that, by the minimality of the part on P , no positive assumptions about P have
to be fed into L (i.e., p p + is not needed in λ ).
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1511
Theorem 6.3. Let L be a DL knowledge base , and let P , Q, Z be a partitioning of its concepts and roles. Then:
P ,Z , there exists a P , Z -minimal model M of L such that for each ground atom p (c),
(1) For each strong answer set M of KBecwa
+
M | p (c) iff p (c) ∈ M.
(2) For each P , Z -minimal model M of L, there exists a strong answer set M of KBecwa
P ,Z such that for each ground atom p (c),
M | p (c) iff p + (c) ∈ M.
all predicates ( P = man, woman, person), then we get the minimal models M 1 = {person(lee), man(lee)} and M 2 =
{person(lee), woman(lee)}. We can elegantly single out these minimal models by the strong answer sets of the following
dl-program KB = ( L , P ):
where λ = woman ∪ − woman, man ∪ − person. Intuitively, p+ ( X ) for predicate p means that p( X ) is provably true in
− man, person ∪
a minimal model to be constructed, and cannot be switched to false to generate a smaller model. The first three rules state
that, by default, a ground atom p(c) is not provably true, and thus p (c) false in the minimal model, which is represented
by man(c) in the strong answer set. The next three rules query, for each p(c), whether p (c) is provably true on L under
all assumptions about non-provability of atoms. If in all cases the answer complies with the assumption, then we have a
minimal model of L and a strong answer set of P . Otherwise, the assumptions encoded in the interpretation cannot be
reproduced using the rules, and we have not an answer set.
In our example, the program has two strong answer sets:
M 1 = person+ (lee), woman+ (lee), man(lee) ,
M 2 = person+ (lee), man+ (lee), woman(lee) ,
An immediate consequence of Theorem 6.3 is that we can reduce query answering from a DL knowledge base L under
ECWA to cautious reasoning from KBecwa
P ,Z . For a given dl-query Q (t), where Q is a (possibly negated) role or concept p
from P ∪ Q ∪ Z , let dl Q (t) = p + (t), if Q is unnegated, and let dl Q (t) = p (t) otherwise.
Corollary 6.5. Let L be a DL knowledge base , let P , Q, Z be a partitioning of all concepts and roles occurring in it, and let Q (t) be a
query as above. Then, for every ground instance Q (c), L | EC W A Q (c) iff KBecwa
P ,Z | s,c dl Q (c), i.e., iff dl Q (c) is a cautious consequence
of KBecwa
P ,Z under the strong answer set semantics.
We finally remark that without the domain-closure assumption, the dl-program KBecwa P ,Z does not single out the P , Z -
minimal models of L in general. The reason is that KBecwa
P ,Z selects models where the set of ground facts over P which are
true is minimal. But, in general, models with different domains might be compared; unnamed individuals can arbitrarily
help to minimize this set of facts, thus invalidating the traditional notion of model minimality.
In essence, description logics can be viewed as a fragment of classical first-order logic in disguise, and thus share many
of its properties. Among them is the property of monotonicity, according to which all conclusions remain valid if the stock
of knowledge increases. In particular, DL knowledge bases only support monotonic inheritance from a more general to a
more specific concept. This makes expressing “default” inheritance, according to which inheritance is carried out unless it
is overridden, impossible in a direct way. However, overriding a “default” value is often a natural method for defining a
subclass.
1512 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
Example 6.6. Consider the following simple wine ontology L, which contains some knowledge about red and white wine,
Lambrusco, as well as about Veuve Cliquot and Lambrusco di Modena.
L = redWine ¬whiteWine,
lambrusco sparklingWine redWine,
sparklingWine(veuveCliquot), lambrusco(lambrusco_di_Modena) ,
We know that sparkling wine is usually white; however, we cannot add the axiom sparklingWine whiteWine to L without
destroying L’s consistency, since lambrusco is an exception. From L alone, we cannot conclude that Veuve Cliquot is white.
What is missing is the possibility to express in L that sparkling wines are white by default. This calls for an integration
of description logics with default reasoning, which is a nontrivial task in general and easily leads to undecidability [6], or,
more specifically, to resort to a method of nonmonotonic inheritance reasoning [60].
Our dl-programs are a convenient framework to realize different notions of defaults on L, and thus can also be exploited
for implementing default reasoning on top of an existing description logic reasoner. In the above example, we may express
that sparkling wines are white by default through the following two rules:
As we show in what follows, Poole’s approach to default reasoning [86] and Reiter’s classical default logic [89] can be
realized on description logics (under restrictions) using dl-programs.
Definition 6.7. Given a satisfiable set F of closed formulas and a set H of possible hypotheses, a scenario is a satisfiable set
F ∪ D, where D consists of ground instances g such that g ∈ H and F pc ( g ) . An extension of F is the set Cn(F ∪ S ) of
consequences of some maximal (with respect to ⊆) scenario F ∪ S.
As usual, denotes the classical derivability relation and Cn(F ) = {φ | F φ and φ is closed}, for every set F of closed
formulas.
In what follows, we assume that pc ( g ) = 1 ( X 1) ∧ · · · ∧ k( X
k ) is a conjunction of literals i ( X
i ) and that g is a literal
0 ( X 0 ), where the predicate of each i is a concept or a role p i , and X i is a tuple of variables and constants of the
arity of p i . Intuitively, g maximizes (resp., minimizes) the extension of p i when i is positive (resp., negative), whenever
pc ( g ) is true in a DL knowledge base L while maintaining consistency. In Example 6.6, the possible hypothesis would be
g = whiteWine( X ) with pc ( g ) = sparklingWine( X ), which has an instance g resulting for X = veuveCliquot. We encode such
defaults in a dl-program as follows.
Definition 6.8. Let L be a satisfiable DL knowledge base , and let H = { g i | 1 i n} be a set of possible hypotheses, where
i ,1 ) ∧ · · · ∧ i ,k ( X
pc ( g i ) = i ,1 ( X i ,k ) is a conjunction of literals and g i = i ,0 ( X
i ,0 ) is a literal with predicate p i . Then, KBpl is
i i
the dl-program ( L , P ), where P contains for each i = 1, . . . , n, the rules:
i ,0 ) ← DL[ i ,1 ]( X
gi ( X i ,1 ), . . . , DL[ i ,k ]( X
i ,k ), not ¬ g i ( X
i ,0 ), (23)
i i
i ,0 ) ← DL[λ; ¬
¬ gi ( X
i ,0 ]( X i ,0 ), (24)
where g i is a predicate in the logic program for p i , and λ = p 1 op 1 g 1 , . . . , pn opn gn , where op i = if the literal i0 is
positive and op i = ∪
− otherwise (and double negation in ¬
i ,0 is canceled).
The answer set semantics effects that the update λ of L is maximal and, moreover, preserves consistency. If it would
cause inconsistency, then ¬ g i (ci ,0 ) would be derived for every instance ( g i ) of g i where X i ,0 = ci ,0 , and hence no rule of
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1513
form (23) could be applied; thus, the update would be empty, and L would have to be inconsistent itself. Note that the
encoding of the default in Example 6.6 is of this form.
Formally, we have the following correspondence result.
Theorem 6.9. Let L and H = { g i | 1 i n} be as in Definition 6.8. For every interpretation M, let scen( M ) = L ∪ { i ,0 (ci ,0 ) | g i (c) ∈
M }. Then:
(1) For every strong answer set M of KBpl , scen( M ) is a maximal scenario.
(2) For every maximal scenario L ∪ S, there exists a strong answer set M of KBpl such that L ∪ S = scen( M ).
In our Example 6.6, we have a single strong answer set of KBpl , which is M = { g (veuveCliquot), ¬ g (lambrusco_di_Modena)};
the corresponding maximal scenario is L ∪ {whiteWine(veuveCliquot)}.
By adding to the dl-program in Definition 6.8 the rules
) ← DL[λ; p ]( X
p+ ( X ), ) ← DL[λ; ¬ p ]( X
¬ p+ ( X ), (25)
where p is a concept or a role, we can export positive resp. negative ground literals on p from the extension of a maximal
scenario to the corresponding answer set. In the scenario of Example 6.6, the rule
would export the red wines, and in particular redWine+ (lambrusco_di_Modena) would be contained in the single answer set.
We can also exploit this for expressing brave and cautious query answering from the extensions of L. Given a dl-query
Q (t), where Q is a (possibly negated) concept or role p, in presence of the respective rule (25), for each instance Q (c),
it holds that the literal (¬) p (c) belongs to some (resp., every) extension of L iff (¬) p + (c) belongs to some (resp., every)
strong answer set of KB.
It is also possible to encode more general defaults than literals into dl-programs, using a different technique. If g =
μ1 ( X 1 ) ∧ · · · ∧ μn ( X n ) is a conjunction of literals μi ( X i ) with predicates p i , we can emulate for each instance g of g
the test whether L ∪ S ∪ {μ1 (c1 ) ∧ · · · ∧ μn (cn )} is satisfiable for a scenario L ∪ S (represented by an update λ), by an
extended update λ g using a dl-literal not DL[λ g ; ⊥](b) (see Appendix D). For open defaults, this may require many rules
(in general, exponentially many in the number of variables) and thus will not be very efficient. Using a similar technique,
also disjunctive preconditions can be expressed, and more generally preconditions in conjunctive normal form. However,
encoding disjunction in the possible hypothesis itself for a correspondence similar as in Theorem 6.9 seems infeasible (note
that dl-programs lack the possibility to add disjunctions to L).
While the precondition pc ( g ) allows us to selectively apply a default g (like in case of the white-wine default), Defini-
tion 6.7 does not capture “chaining” of defaults, where one default has to be applied to enable the application of another
one. In this way, expected conclusions might be missed.
Example 6.10. Suppose that in the wine scenario, we further know that white wine is usually served cold, expressed by the
default h = servedCold( X ) with pc (h) = whiteWine( X ). From the program KBpl in Theorem 6.9, however, we cannot conclude
that Veuve Cliquot is served cold, since h(veuveCliquot) is not in the single strong answer set of KBpl . The reason is that the
precondition of h for the instance X = veuveCliquot, whiteWine(veuveCliquot), is not a consequence of L, but is only obtained
after the application of the default g instantiated to veuveCliquot.
In order to propagate conclusions from defaults to preconditions of defaults, we have to add these conclusions to the DL
i , j ) in rule (23) the update
knowledge base L when testing the preconditions. To this end, we add in each dl-atom DL[ i , j ]( X
λ. Following this approach, we can in fact realize a semantics of defaults as in Reiter’s Default Logic [89], which we show
next.
(1) W ⊆ ( S );
(2) Cn( ( S )) = ( S );
α :β1 ,...,βn
(3) if γ ∈ D, α ∈ ( S ), and ¬β1 , . . . , ¬βn ∈
/ S then γ ∈ ( S ) .
1514 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
Then, a set of formulas E is an extension of iff E = ( E ). Extensions of open default theories (i.e., default theories which
are not closed) are defined via ground instances of defaults. In case the defaults do not contain quantifiers, the grounding
is defined analogously to logic program rules; otherwise, a suitable skolemization step is required (see [74,89] for details).5
One can express the extensions of a default theory = L , D , where L is a DL knowledge base, and D consists of
certain quantifier-free defaults, by the strong answer sets of a corresponding dl-program. We show this here for defaults of
form (26) where α is a conjunction of literals and all βi ’s and γ are literals (possible generalizations are discussed at the
end of this subsection).
Roughly speaking, we encode to a dl-program that implements a guess-and-check strategy, by which a sufficiently
large part of an extension E, including all conclusions γ of applied defaults δ , is guessed using predicates in_γ and out_γ
and described by an update λ of L, in which we have p in_γ , where p is the predicate of γ , if the literal γ is positive and
p∪ − in_γ otherwise. The candidate E is then checked using a predicate g for γ to characterize ( E ), which is described
Definition 6.11. Let L be a DL knowledge base, and let D = {δ1 , . . . , δn } be a set of quantifier-free defaults of the form
αi :βi,1 ( Z i,1 ),...,βi,ni ( Z i,ni )
δi =
γi (Y i )
where αi = αi,1 ( X i,1 ) ∧ · · · ∧ αi,ki ( X i,ki ) is a conjunction of literals αi, j ( X i, j ), all βi, j ( Z i, j ) are
literals, and γi (Y i ) is a literal with predicate p i . Then, KBdf is the dl-program ( L , P ), where P contains for each i = 1, . . . , n,
the following rules:
(1) rules that guess whether δi ’s conclusion γi (Y i ) belongs to the extension E:
(2) a rule which checks the compliance of the guess for E with L:
where λ
= p 1 op1 in_γ1 , . . . , pn opn in_γn , and op j = if the literal γ j (Y j ) is positive and op j = ∪
− otherwise, 1 j n;
g i (Y i ) ← DL[λ; αi ,1 ]( X
i ,1 ), . . . , DL[λ; αi ,k ]( X
i
i ,k ),
i
The following result establishes the correspondence between default extensions and strong answer sets of the program
KBdf .6
Theorem 6.12. Let = L , D be a default theory, where L is a DL knowledge base and D = {δ1 , . . . , δ} is a set of defaults as in
Definition 6.11. Then:
(1) For each extension E of , there exists a (unique) strong answer set M of KBdf such that
E = Cn L ( M ; λ ) = Cn( L ( M ; λ)) .
is an extension of .
5
Notice that the world knowledge L is not skolemized in this paper, so open defaults are actually grounded only with respect to the constants occurring
in L. This version of defaults is equivalent to the one considered by Baader and Hollunder [6].
6
This encoding can be simplified and optimized. We use this version as it features a natural guess-and-check approach, in which the guessing part
(expressed by λ ) and the checking part (expressed by λ) are clearly separated.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1515
Furthermore, for each ground instance γi (c) of γi (Y i ), g i (ci ) is in a strong answer set M of KBdf iff γi (ci ) is in the corresponding
extension.
Example 6.13. In the extended wine scenario, we have the two defaults
sparklingWine( X ) : whiteWine( X )
δ1 = and
whiteWine( X )
whiteWine( X ) : servedCold( X )
δ2 = .
servedCold( X )
The program KBdf (which we omit here for space reasons) has a single answer set M, which contains the atoms
g 1 (veuveCliquot) and g 2 (veuveCliquot), but neither the atom g 1 (lambrusco_di_Modena) nor the atom g 2 (lambrusco_di_Modena).
By adding rules (25) for concepts resp. roles p to KBdf , we can again export positive resp. negative ground literals on
p from the extension to the corresponding answer set, and we can utilize this for brave and cautious reasoning from the
extensions of , via brave and cautious reasoning from KBdf . If in our example, we add the rules for p = servedCold, then
we have in the single answer set M the literal servedCold+ (veuveCliquot), but neither servedCold+ (lambrusco_di_Modena) nor
¬servedCold+ (lambrusco_di_Modena). Thus, we conclude (under both brave and cautious reasoning) that Veuve Cliquot is
served cold, but we conclude nothing about whether Lambrusco di Modena is served cold or not.
We note that the rules (29) can be eliminated from KBdf , at the price of introducing more dl-literals, by replacing in (31)
in_γi (Y i ) with DL[λ ; γi ](Y i ) and in (32) out_γi (Y i ) with not DL[λ; γi ](Y i ).
It is well-known that extended logic programs correspond to Reiter’s default logic, which can be viewed as a fragment
of the latter; this was already shown by Gelfond and Lifschitz in their seminal paper [39], by identifying a rule of form
b ∧···∧bm :¬βm+1 ,...,¬βn
a ← b1 , . . . , bm , not bm+1 , . . . , not bn with the default 1 a
. However, this correspondence does not have any
background theory W , i.e., default theories are of the form (∅, D ). The encoding of default rules on top of a DL knowledge
base L from above is more general, since it allows one also to handle a nonempty background theory W (= L). Note
also that it is different in spirit from the encoding in [39], and intuitively has to be so, since we must take inferences in
the background knowledge W , also in interaction with the defaults, into account while we are bound to the evaluation
mechanism of dl-programs.
We remark that the encoding KBdf can be generalized, using techniques discussed in Section 6.2.1 and Appendix D, to
quantifier-free defaults (26) where α is in conjunctive normal form, all βi are in disjunctive normal form, and γ = γ1 ∧ · · · ∧
γk is a conjunction of literals γi (note that any such default can be efficiently rewritten to k defaults α :β1γ,...,βn , . . . , α :β1γ,...,βn ).
1 k
In particular, it can be generalized to all disjunction-free defaults. However, disjunction in the conclusion γ of (26) again
causes problems (as we cannot add disjunctive formulas to L via dl-atoms), and prevents a similar correspondence as in
Theorem 6.12.
After carin [66] and AL-log [21], DL-safe rules [79,80] are a further coupling of rules and ontologies while keeping a
full first-order semantics together with decidability. To ensure this, only a limited form of rules is allowed.
Intuitively, a DL-safe program is a DL knowledge base L coupled with a set of Horn rules P . Concepts and roles from L
may freely appear in P (also in rule heads). Nonetheless, any variable must appear in the body of a rule within an atom
whose predicate name does not appear in L.
Definition 6.14. Suppose L is a DL knowledge base in SHOIN (D), where A, R A , and R D are the atomic concepts, abstract
roles, and datatype roles, respectively. Let P be a set of predicate symbols such that A ∪ R A ∪ R D ⊆ P. A (disjunctive) DL-safe
rule is a (disjunctive) rule r of the form
h1 (Y 1 ) ∨ · · · ∨ hm (Y m ) ← b1 ( X
1 ), . . . , bn ( X
n ), (33)
each variable in r occurs in some atom b j ( X j ) where b j ∈ P \ (A ∪ R A ∪ R D ). A combined knowledge base is any pair ( L , P ),
where L is a DL knowledge base and P is a finite set of (disjunctive) DL-safe rules.
Example 6.15. Consider the simple person knowledge base L from Section 6.1, and suppose there is also a role parent
and an atomic concept allDaughters, and that L contains axioms effecting allDaughters ≡ ∃parent. ∀parent.woman, i.e.,
allDaughters are those parents whose children are all girls. Let P contain the rule
7
Atomic concepts from A are unary predicates, while roles from R A ∪ R D are binary predicates.
1516 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
plus facts of the form knows(n, n ), where n and n are person names. Intuitively, the rule singles out those persons who
know a parent whose children are all girls, and know at least one of these children. Then, ( L , P ) is a combined knowledge
base.
Definition 6.16. An arbitrary first-order interpretation I is a model of (or satisfies) a combined knowledge base ( L , P ),
denoted I | ( L , P ), if I | L and I | P .
Definition 6.17. Given a combined knowledge base ( L , P ), let KBdls be the dl-program ( L , P dls ), where P dls includes the
following rules:
) ← not p − ( X
p+ ( X ), (35)
− ) ← not p + ( X
p (X ), (36)
where p + and p − are new predicates;8
(2) for each rule r : h1 (Y 1 ) ∨ · · · ∨ hm (Y m ) ← b1 ( X
1 ), . . . , bn ( X
n ) in P , the rule
fail ← not h+ + + +
1 ( Y 1 ), . . . , not hm ( Y m ), b 1 ( X 1 ), . . . , bn ( X n ), not fail; (37)
(3) and the rule
fail ← DL[λ; ⊥](b), not fail, (38)
where b is an arbitrary constant symbol and λ = p 1 p +
1 , p 1 ∪
− p −
1 , . . . , p n p +, p ∪
n n − p − where p , . . . , p are all
n 1 n
predicates in P that occur in L.
Intuitively, rules (35) and (36) guess the extension of each predicate in P . Rule (37) checks satisfaction of the rule r, and
rule (38) implements a consistency check and discards guesses that are not compliant with L.
The following lemma shows that the grounding of P over the constant symbols in the language, which we denote by
P ↓,9 is sufficient to capture the models of a combined knowledge base ( L , P ) with respect to ground atoms.
Lemma 6.18. Let ( L , P ) be a combined knowledge base. Then, for every model I of ( L , P ↓), there is a model J of ( L , P ) which differs
from I only by the interpretation of predicates p ∈ P \ (A ∪ R A ∪ R D ) such that for all ground atoms α , J | α iff I | α .
Indeed, this holds since we can simply remove all tuples e from the extensions of all predicates p ∈ P \ (A ∪ R A ∪ R D )
in I which contain some unnamed individual, i.e., there is some element in e such that I maps no constant to it; then, J
clearly satisfies L, and by DL-safety, all formulas in P will be satisfied. Based on this lemma, we can establish the following
property of the encoding KBdls .
Theorem 6.19. Let ( L , P ) be a combined knowledge base, and let ga( P ) be the set of ground atoms with a predicate name occurring
in P . Then,
(1) for every strong answer set M of KBdls , there exists some first-order model I of ( L , P ) such that for every p (c) ∈ ga( P ), I | p (c)
iff p + (c), and
(2) for every first-order model I of ( L , P ), the set
M = p + (c) | p (c) ∈ ga( P ), I | p (c) ∪ p − (c) | p (c) ∈ ga( P ), I | p (c)
Answering a query Q (t), where Q is a (possibly negated) predicate name from P and t a list of variables and constants
(resp., values), from a combined knowledge base ( L , P ), i.e., determining all tuples c of constant symbols (resp., values) such
that ( L , P ) | Q (c), can then be performed as follows. Add to KBdls the rule
q(t) ← χ ( Q ; t), (39)
8
For simplicity, we do not distinguish between individuals (constants) and datatype values, whose sort can be expressed by respective typing predicates.
9
We assume here sorted (finite) sets of constant symbols resp. values. An extension to infinite sets would not be a problem in principle, if infinite
answer sets would be considered.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1517
where q is a fresh predicate and χ ( Q ; t) = DL[λ; Q ](t), if the predicate of Q is from A ∪ R A ∪ R D but does not occur in
P ; otherwise, χ ( Q ; t) = p + (t), if Q is unnegated, and χ ( Q ; t) = p − (t), if Q is negated. Denote by KBdls
Q (t) he resulting
dl-program. From Theorem 6.19, the following result is then easily obtained.
Corollary 6.20. Given a combined knowledge base ( L , P ) and a query Q (t) as above, c is an answer to Q (t) iff q(c) is a cautious
consequence of KBdls dls
Q (t) , i.e., belongs to all strong answer sets of KB Q (t) .
Note that as for query answering, the rule (38) can be dropped from KBdls
Q (t) .
Treatment of equality. The full version of [79] explicitly considers the possibility of having a binary equality predicate “≈”
available [80]. Viewing ≈ as a congruence, i.e., as an equivalence relation that is compliant with the other relations in each
model (as done e.g. also in [76]), we can emulate it as follows. Suppose that “≈+ ” and “≈− ” are fresh binary predicate
names in P .
X ≈+ X ←,
X ≈+ Y ← Y ≈+ X ,
X ≈+ Y ← X ≈+ Y , Y ≈+ Z ,
X ≈+ Y ← not X ≈− Y ,
X ≈− Y ← not X ≈+ Y .
These rules will effect that ≈+ is, in any answer set, an equivalence relation.10
• For each predicate p in P, we add to KBdls a congruence constraint
relation = in L).
Then, in the strong answer sets M of the modified KBdls , the predicate ≈+ coincides with the relation ≈ in the corre-
sponding first-order models I of the description logic part on all ground atoms.
7. Complexity
In this section, we address the complexity of dl-programs. We first recall the complexity classes that we encounter. We
then formally state the considered reasoning problems for dl-programs and summarize relevant previous complexity results.
We finally provide our complexity results for dl-programs.
We assume that the reader has some elementary background in complexity theory, and is familiar with the concepts of
Turing machines and oracle calls, polynomial-time transformations among problems, and the hardness and completeness of
a problem for a complexity class, as can be found, e.g., in [62,63,84]. We now briefly recall the complexity classes that we
encounter in our complexity results below.
The class EXP (resp., NEXP) contains all decision problems that can be solved in exponential time on a deterministic
(resp., nondeterministic) Turing machine. The class co-NEXP is the complementary class of NEXP, which has yes- and no-
instances interchanged, while the class D exp = { L × L | L ∈ NEXP, L ∈ co-NEXP} is the “conjunction” of NEXP and co-NEXP.
The class PNEXP contains all problems that are decidable in polynomial time on a deterministic Turing machine with the
help of a NEXP oracle. It coincides with the class NPNEXP [47] of all problems that are decidable in polynomial time on
a nondeterministic Turing machine with the help of an oracle for NEXP. The above complexity classes and their inclusion
relationships (which are all currently believed to be strict) are shown in Fig. 1.
10
To reduce guesses for ≈+ in advance to those compatible with ≈ in L, further rules X ≈+ Y ← DL[=]( X , Y ) and X ≈− Y ← DL[=]( X , Y ) might be
added to import all ground literals of ≈ that are provable from L directly (assuming “≈” is equality = in L).
1518 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
Answer Set Existence: Given vocabulary and a dl-program KB = ( L , P ), decide whether KB has a strong (resp., weak)
answer set.
Cautious Reasoning: Given vocabulary , a dl-program KB = ( L , P ), and a literal l ∈ HB P , decide whether l is in every
strong (resp., weak) answer set of KB.
Brave Reasoning: Given vocabulary , a dl-program KB = ( L , P ), and a literal l ∈ HB P , decide whether l is in some strong
(resp., weak) answer set of KB.
We next summarize some relevant previous complexity results. We recall that deciding whether a given (non-ground)
normal logic program has an answer set is complete for NEXP [17]. Furthermore, deciding whether a DL knowledge base
L in SHIF (D) (resp., SHOIN (D)) is satisfiable is complete for EXP [54,98] (resp., NEXP, for both unary and binary
number encoding; see [54,87] and the NEXP-hardness proof for ALCQI in [98], which implies the NEXP-hardness of SHO -
IN (D)). As an easy consequence, evaluating a given ground dl-atom a of the form (1) in a given dl-program KB = ( L , P )
and an interpretation I p of its input predicates p = p 1 , . . . , pm (that is, deciding whether I | L a for each I which coincides
on p with I p ) is complete for EXP (resp., co-NEXP) for L from SHIF (D) (resp., SHOIN (D)).
We first consider the problem of deciding whether a given dl-program KB = ( L , P ) has a strong or weak answer set.
Table 1 compactly summarizes our complexity results for this problem for L from SHIF (D) and SHOIN (D). In detail,
for L in SHIF (D), this problem is EXP-complete for positive and stratified KB, and NEXP-complete for general KB. For
L in SHOIN (D), the problem is NEXP-complete for positive KB, and PNEXP -complete for stratified and general KB. Thus,
the complexity of dl-programs is not or only mildly higher than the one of its components, with the exception of general
dl-programs with L from SHIF (D), where it moves from EXP to NEXP.
As for practical concerns, the complexity can be drastically lower if both components have lower complexity. For example,
if evaluating dl-atoms is feasible with an NP oracle in polynomial time and the number of variables in each rule in P is
p
bounded by a constant (e.g., if P is fixed), then deciding strong and weak answer set existence is feasible within NPNP = 2 ,
and thus within the bounds of many classical formalisms for nonmonotonic reasoning in the propositional case [24,43];
we leave a detailed study of the complexity of fragments of dl-programs for further work. Furthermore, we stress that
the results account for the worst case complexity. Even if in this case, evaluating a single ground dl-atom takes double
exponential time by currently used methods, knowledge bases encountered in practice may not show this behavior and
efficient DL-engines can usually evaluate dl-atoms much faster on them; this is at least our experience [29].
The following theorem shows that deciding the existence of strong or weak answer sets of dl-programs KB = ( L , P ) with
L in SHIF (D) is complete for EXP in the positive and the stratified case, and complete for NEXP in the general case.
Theorem 7.1. Given vocabulary and a dl-program KB = ( L , P ) with L belonging to SHIF (D), deciding whether KB has a strong or
weak answer set is EXP-complete when KB is positive or stratified, and NEXP-complete when KB is a general dl-program.
The next theorem shows that deciding the existence of strong or weak answer sets of dl-programs KB = ( L , P ) with L in
SHOIN (D) is complete for NEXP in the positive case, and complete for PNEXP in the stratified and the general case.
Theorem 7.2. Given vocabulary and a dl-program KB = ( L , P ) with L belonging to SHOIN (D), deciding whether KB has a strong
or weak answer set is NEXP-complete when KB is positive, and PNEXP -complete when KB is a stratified or general dl-program.
A more detailed discussion of these and the other complexity results in this section is given in Appendix E.
We next consider the problems of cautious and brave reasoning from dl-programs, that is, of deciding whether a classical
literal l ∈ HB P belongs to every resp. some strong or weak answer set of a given dl-program KB = ( L , P ). Tables 2 and 3, re-
spectively, compactly summarize our complexity results for these problems for L from SHIF (D) and SHOIN (D). Roughly
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1519
Table 1
Complexity of deciding strong or weak answer set existence for dl-programs
dl-program KB = ( L , P ) L in SHIF (D) L in SHOIN (D)
KB positive EXP-complete NEXP-complete
KB stratified EXP-complete PNEXP -complete
KB general NEXP-complete PNEXP -complete
Table 2
Complexity of cautious reasoning from the strong or weak answer sets of a dl-program
KB = ( L , P ) L in SHIF (D) L in SHOIN (D)
KB positive EXP-complete co-NEXP-complete
KB stratified EXP-complete PNEXP -complete
KB general co-NEXP-complete PNEXP -complete
Table 3
Complexity of brave reasoning from the strong / weak answer sets of a dl-program
KB = ( L , P ) L in SHIF (D) L in SHOIN (D)
KB positive EXP-complete D exp -complete/PNEXP -complete
KB stratified EXP-complete PNEXP -complete
KB general NEXP-complete PNEXP -complete
speaking, except for brave reasoning from positive dl-programs KB = ( L , P ) with L from SHOIN (D), the complexity of cau-
tious (resp., brave) reasoning from dl-programs coincides with the complexity of answer set non-existence (resp., existence)
for dl-programs (see Table 1).
The following theorem shows that deciding whether a classical literal l ∈ HB P belongs to every (resp., some) strong
or weak answer set of a given dl-program KB = ( L , P ) with L in SHIF (D) is complete for EXP in the positive and the
stratified case, and complete for co-NEXP (resp., NEXP) in the general case.
Theorem 7.3. Given vocabulary , a dl-program KB = ( L , P ) with L belonging to SHIF (D), and a classical literal l ∈ HB P , deciding
whether l is in every (resp., some) strong or weak answer set of KB is complete for EXP when KB is positive or stratified, and complete
for co-NEXP (resp., NEXP) when KB is a general dl-program.
The next theorem shows that deciding whether a classical literal l ∈ HB P belongs to every (resp., some) strong / weak
answer set of a given dl-program KB = ( L , P ) with L in SHOIN (D) is complete for co-NEXP (resp., D exp /PNEXP ) in the
positive case, and complete for PNEXP in the stratified and the general case. Note that brave reasoning from the weak
answer sets of a positive dl-program KB = ( L , P ) with L in SHOIN (D) is co-NEXP-complete when P is “¬”-free.
Theorem 7.4. Given vocabulary , a dl-program KB = ( L , P ) with L belonging to SHOIN (D), and a classical literal l ∈ HB P , deciding
whether l is in every (resp., some) strong or weak answer set of KB is complete for co-NEXP (resp., D exp /PNEXP ) when KB is positive,
and complete for PNEXP when KB is a stratified or general dl-program.
8. Implementation
As stressed in the introduction, dl-programs treat DL knowledge bases and logic programs as separated modules. As
a beneficial side effect of this approach, only interfacing details between the two worlds have to be known as far as an
efficient implementation is concerned. This allows us to design a reasoning framework on top of existing reasoners for
ASP resp. DLs. Our idea behind the implementation principle was thus to design a reasoning framework on top of existing
reasoners for answer set programs resp. description logics instead of creating everything from scratch. Existing engines
for both worlds have been professionally developed and are supposedly highly efficient: this, of course, does not imply
that a naive coupling of state-of-the-art reasoners would perform better than a system especially tailored at evaluating
dl-programs. Indeed, specific, non-naive, optimization techniques are needed for implementing this kind of coupling. This
approach is also preferable, if one considers the significant manpower needed for building and releasing a system of such a
complexity from scratch.
In this section, we present the architecture of our system prototype and some basic results and techniques that we used
for performance improvement. A more detailed description including the algorithms can be found in [95].
The architecture of our system prototype NLP-DL, which has been described in [28,29], is depicted in Fig. 2. The system
comprises different modules, each of which is coded in the PHP scripting language; the overhead compared to a language
1520 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
like C++ is insignificant, given that most of the computing power is devoted to the execution of the two external reasoners.
Moreover, the choice of this language enabled us to make the prototype easily accessible by a Web-interface, thus serving its
main purposes as a testing and demonstration tool. The Web-interface11 allows the user to enter a dl-program KB in form of
an OWL-ontology L and a program P . It can then be used either to compute model(s) or perform reasoning, both according
to the selected semantics, which can be chosen between the strong answer set semantics and the well-founded semantics.
The query operation mode requires the specification of one or more query atoms as input from the user; here, another
choice between brave and cautious reasoning is available. Furthermore, the result can be filtered by specific predicate
names.
The shadowed boxes represent the external reasoning engines: DLV [65] was used as answer set solver and RACER [45]
as DL reasoner, which is embedded in a caching module.
Our prototypical implementation is capable of evaluating a dl-program in three different modes: (1) under the answer
set semantics, (2) under the well-founded semantics (WFS) [33], and (3) under the answer set semantics with preliminary
computation of the WFS.
The preprocessing module evaluates all dl-atoms with no input (producing the set M DL ), applies the splitting method
(Section 8.2) (separating P into an unstratified subprogram P u , and a stratified program P s ). The single answer set M s
of P s is computed and returned together with P u and M DL . The ASP module implements the evaluation of P u (which
can have multiple answers { M 1 . . . M n }), using DLV. This result is streamed to a post-processing module, which carries
out the verification of each incoming answer set according to the strong answer set semantics, returning the final result
{ M k1 . . . M kn }.
The WFS module is used for computing the well-founded model M wfs of the dl-program.
The well-founded semantics is an alternative nonmonotonic semantics for logic programs [100]. In particular, it retains
uniqueness of the answer to a program (called the well-founded model), which might be a desirable property. Also, the
well-founded model approximates the intersection of all the answer sets. In [33], we extended the canonical well-founded
semantics of logic programs to dl-programs, retaining many of its attractive properties. In particular, atoms which are true
(resp., false) in the well-founded model, are true (resp., false) in the intersection of all the strong answer sets, provided the
dl-program at hand is consistent. Thus, preliminary computation of the well-founded semantics can be exploited to reduce
the size of the dl-program on which the answer set semantics has to be computed [29].
Several optimization techniques of interest were adopted, which are described in detail next.
In Section 4, we presented a method for evaluating a general dl-program. It is evident that in practice the guessing part
of this algorithm generates many answer set candidates. However, when looking at the corresponding dependency graph,
11
The prototype is accessible at http://www.kr.tuwien.ac.at/research/nlpdl.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1521
programs are often structured in two hierarchic layers. A first, stratified layer at the bottom performs some preprocessing
on the input data; under strong answer semantics there will be a single answer set. A second, unstratified layer usually is
aimed at encoding some nondeterministic choice and verification. As for computing strong answer sets, it is thus desirable
to constrain the usage of the general guess-and-check method to the upper layer of the program and evaluate the lower
layer using a more efficient fixpoint computation. This requires that we can split the program and evaluate each part
separately; this is in fact feasible, relying on the notion of a splitting set for programs under the answer set semantics [69].
For simplicity, our approach is to split the program only in two parts, having a fast routine for finding the strong answer
set of the lower layer, while the remaining subprogram will be solved by the guess-and-check method.
Lifschitz and Turner [69] have shown that the computation of the answer sets of a logic program can be simplified by
dividing the program P into two parts. Informally, first identify the unstratified subprograms of P , i.e., rules of P that contain
negated cycles. Then, remove these rules from P as well as all rules that depend on P , leaving a stratified subprogram on
the “bottom” of the dependency graph of P . The model of this part can now be solved by a fixpoint iteration, i.e., resulting
in a unique least model. Subsequently, this model is added as extensional knowledge to the remaining, unstratified part of
P , which is eventually solved by means of a guess-and-check procedure.
Formally, a splitting set was defined in [69] as a set U of literals such that, for every rule r ∈ P , if H (r ) ∩ U = ∅ then
lit(r ) ⊆ U , where lit(r ) denotes H (r ) ∪ B + (r ) ∪ B − (r ). Since in dl-programs, not only the dependency between rule body and
rule head, but also between dl-atoms and their input predicates needs to be taken into account, we need to modify the
definition of a splitting set. To this end, we first formalize the notion of dependency, which takes the occurrence of dl-atoms
into account.
Definition 8.1. Let KB = ( L , P ) be a dl-program and a and b literals occurring in some rule of P . Then, a depends positively
on b, denoted a → p b, if one of the following conditions holds:
We say that a depends negatively on b, denoted a →n b, if one of the following conditions holds:
r1 : p ( X ) ← q( X ), r ( X );
r2 : q(Y ) ← s(Y );
r3 : p ( X ) ← DL[Student s; Person]( X );
r4 : s( X ) ← enrolled( X );
r6 : part( X ) ← DL[ P ∩
− known; P ]( X ).
Definition 8.3. A splitting set for a dl-program KB = ( L , P ) is any set U of literals such that, for any a ∈ U , if a → b, then b ∈ U .
The set of rules r ∈ P such that H (r ) ∈ U is called the bottom of P relative to the splitting set U and is denoted by b U ( P ).
To describe a method how to use this splitting for the computation of answer sets, we first need to define the notion
of a solution to KB with respect to U, which corresponds directly to the respective notion of Lifschitz and Turner [69]. We
consider a set U of literals, a set X of ground literals, and a dl-program KB = ( L , P ). Let ground(U ) denote the set of all
grounded literals in U . For each rule r ∈ ground( P ) such that B + (r ) ∩ ground(U ) ⊆ X and B − (r ) ∩ ground(U ) is disjoint from
1522 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
X , create a new rule r , with H (r ) = H (r ), B + (r ) = B + (r ) \ ground(U ) and B − (r ) = B − (r ) \ ground(U ). The ground program
consisting of all such rules r is denoted by e U ( P , X ).
Definition 8.4. Let U be a splitting set for a program KB = ( L , P ). We call a pair X , Y of sets of ground literals a solution
to KB with respect to U , if
Theorem 8.5. Let U be a splitting set for a dl-program KB = ( L , P ). Then, A is a strong answer set of KB iff A = X ∪ Y for some solution
X , Y to KB with respect to U .
Our aim is to find the largest subprogram of P which does not involve cycles through default negation or nonmonotonic
dl-atoms.
Theorem 8.6. Given KB = ( L , P ), let V be the least set of literals such that (i) a, b ∈ V whenever a → +
n b and b → a holds in P , and
(ii) if a → b and b ∈ V , then a ∈ V . Then, the set S = lit( P ) \ V is a splitting set for P , where lit( P ) = r ∈ P H (r ) ∪ B (r ). Furthermore,
b S ( P ) has a single strong answer set (if it is consistent).
In fact, if b S ( P ) contains only monotonic dl-atoms, then b S ( P ) is stratified. Moreover, any nonmonotonic dl-atom
DL[λ; Q ](t) in b S ( P ) can be replaced with a monotonic dl-atom DL[λ ; Q ](t) where each S i ∩ − p in λ is replaced with
i
Si ∪
− p , where p is a fresh predicate, and the rule p ( X
i i i
) ← not p i (
X ) is added. The resulting program is stratified and has
the same strong answer sets as b S ( P ) with respect to the original set of predicates.
Thus, in essence b S ( P ) is stratified. We therefore call a splitting set S as in Theorem 8.6 a stratification splitting set for a
dl-program KB. The following property is an immediate consequence of Theorem 8.6.
Corollary 8.7. Each dl-program has exactly one stratification splitting set.
Example 8.8. Consider the reviewer selection program from Example 4.1. The stratification splitting set of this program
comprises all literals except those with the predicates assign, a, and error. Thus, it has the following stratified subprogram:
paper( p 1 );
kw( p 1 , Semantic_Web);
paper( p 2 );
kw( p 2 , Bioinformatics);
kw( p 2 , Answer_Set_Programming);
This program is positive, and thus can only have a single strong answer set. The unstratified part of the program are the
remaining rules:
It follows directly from Theorem 8.5 that the strong answer sets of a dl-program KB = ( L , P ) can be obtained by com-
puting the unique strong answer set M of b U ( P ) (where U is the stratification splitting set) and then computing the strong
answer sets of e U ( P \ b U ( P ), M ), where M is M augmented with the dl-atoms from ground(U ) which are true with respect
to M. To this end, our implementation uses a fixpoint algorithm (which takes as input a stratified dl-program KB) based on
results given by Theorem 5.6 and [29], in order to compute M. Then, e U ( P \ b U ( P ), M ) is evaluated taking advantage of an
algorithm guess (which takes as input a generic knowledge base KB), which is based on Theorem 5.8.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1523
It is reasonable to expect that this method of splitting the dl-program is more efficient than the pure guess-and-check
approach, since the “preliminary” computation of any stratified subprogram will in general narrow the search space of
the guessing. A subsequent, more fine grained splitting into strongly and weakly connected components of the program
will further optimize the computation. Efforts towards such a more sophisticated processing of the program’s dependency
information were eventually put into dlvhex, the reasoner for hex-programs [32].
We finally remark that an analog splitting result as in Theorem 8.5 also holds for weak answer sets (the proof is similar),
and similarly Theorem 8.6 except that b S ( P ) may have multiple weak answer sets; to ensure a single weak answer set, a
finer grained stratification splitting set would be needed which addresses positive recursion through dl-atoms.
Since the calls to the DL-reasoner are a bottleneck in the coupling of an ASP solver with a DL-engine, special methods
need to be devised in order to save on the number of calls to the DL-engine. To this end, we use several complementary
techniques.
8.3.2. DL-caching
Whatever semantics is considered, a number of calls will be made to the DL-engine. Therefore, it is very important to
avoid an unnecessary flow of data between the two engines, and to save time when a redundant DL-query has to be made.
In order to achieve these objectives, it is important to introduce special caching data structures tailored for fast access to
previous query calls. Such a caching system needs to deal with the case of Boolean as well as non-Boolean DL-calls.
For any dl-atom DL[λ; Q ](t), where λ = S 1 op1 p 1 , . . . , S n opn pn , and interpretation I , let us denote by I λ the projection of
I on p 1 , . . . , pn .
Boolean DL-calls. In this case, an external call must be issued in order to verify whether a given ground dl-atom b fulfills
I | L b, where I is the current interpretation and L is the DL knowledge base hosted by the DL-engine. In this setting, the
caching system exploits properties of monotonic dl-atoms a = DL[λ; Q ](c).
Given two interpretations I 1 and I 2 such that I 1 ⊆ I 2 , monotonicity of a implies that (i) if I 1 | L a then I 2 | L a, and (ii)
if I 2 | L a then I 1 | L a. This property allows to set up a caching machinery where only the outcome for ground dl-atoms
with minimal/maximal input is stored.
Roughly speaking, for each monotonic ground dl-atom a, we store a set cache(a) of pairs I λ , v , where v ∈
{true, undefined}. If I λ , true ∈ cache(a), then we can conclude that J | L a for each J such that I λ ⊆ J λ . Dually, if
I λ , undefined ∈ cache(a), we can conclude that J | L a for each J such that I λ ⊇ J λ .
We sketch the maintenance strategy for cache(a) in the following. The rationale is to cache minimal (resp., maximal)
input sets I λ for which a is evaluated to true (resp., undefined) in past external calls.
Suppose a ground dl-atom a = DL[λ; Q ](c), an interpretation I , and a cache set cache(a) are given. With a small abuse
of notation, let I (a) be a function whose value is true iff I | L a and undefined otherwise. In order to check whether I | L a,
cache(a) is consulted and updated as follows:
(1) Check whether cache(a) contains some J , v such that J ⊆ I λ and v = true, or J ⊇ I λ and v = undefined. If such a J
exists, conclude that I (a) = v.
12
E.g., if the rule a( X ) ← c ( X ), DL[λ; C ]( X ) must be evaluated and the domain of c is already known and presumably smaller than the set of X s.t.
DL[λ; C ]( X ) holds.
1524 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
Fig. 3. Integrating Ontologies and Rules by defining “safe interaction” (left) vs. “safe interfaces” (right).
(2) If no such J exists, then decide I | L a through the external DL-engine. If I | L a, then add I λ , true to cache(a), and
remove from it each pair J , true such that I λ ⊂ J . Otherwise (i.e., if I | L a), add I λ , undefined to cache(a) and remove
from it each pair J , undefined such that I λ ⊃ J .
Some other implementational issues are worth mentioning. First of all, since the subsumption test between sets of atoms
is a critical task, some optimization is made in order to improve cache look-up. For instance, an element count is stored for
each atom set, in order to prove early that I J whenever | I | > | J |. More intelligent strategies could be envisaged in this
respect. Furthermore, a standard least recently used (LRU) algorithm has been introduced in order to keep a fixed cache size.
Non-Boolean DL-calls. In most cases, a single non-ground query for retrieving all instances of a concept or role might be
employed. Caching of such queries is also possible, but cache look-up cannot take advantage of monotonicity as in the
Boolean case. For each non-ground dl-atom a = DL[λ; Q ](c), a set cache(a) of pairs I λ , a↓( I λ ) is maintained, where a↓( I )
is the set of all ground instances a of a such that I | L a . Whenever for some interpretation I , a↓( I ) is needed, then
cache(a) is looked up for some pair J , a↓( J ) such that I λ = J .
9. Related work
In essence, related work on combining rules and ontologies can be grouped into the following three lines of research:
interaction of rules and ontologies with strict semantic separation (loose coupling); interaction of rules and ontologies with
strict semantic integration (tight coupling); and reductions from DLs to ASP and/or other formalisms.
For excellent surveys that classify the numerous proposals for combining rules and ontologies, we refer the interested
reader to [5,83], and for discussions of general issues that come up when combining rules and ontologies to [18,27,93].
In this setting, a (usually nonmonotonic) language plays its role in the Rules Layer, while OWL/RDF flavors are kept sepa-
rate in the Ontology Layer. The two layers only communicate via a “safe interface,” but do not impose syntactic restrictions
on either the rules or the ontology part (see Fig. 3).
From the Rules Layer point of view, ontologies are dealt with as an external source of information whose semantics
is treated separately. Nonmonotonic reasoning and rules are allowed in a decidable setting, as well as arbitrary mixing of
closed and open world reasoning. This approach typically involves special predicates in rule bodies which allow queries
to a DL knowledge base , and the exchange of factual knowledge. Examples for this type of interaction are dl-programs
themselves and various generalizations and extensions [30,31,70,71,73,103,106]. More concretely, HEX-programs [30,31] ex-
tend the framework of dl-programs so that multiple sources of external knowledge, with possibly different semantics, might
be brought into play. Probabilistic dl-programs [70,73] extend dl-programs by probabilistic uncertainty, and similarly fuzzy
dl-programs [71] by fuzzy vagueness. An extension of dl-programs to handle priorities is conceived in [106]. In [103], dl-
programs are extended with a framework conceived for aligning ontologies.
Further work inspired by dl-programs is [4], which combines defeasible reasoning with description logics. Like in other
work mentioned above, the considered description logic serves in [4] only as an input for the default reasoning mechanism
running on top of it. Moreover, similar in spirit is also the approach of calling external description logic reasoners in the
TRIPLE [96] rules engine.
This category groups formalisms that introduce rules by adapting existing semantics for rule languages directly in the
Ontology Layer. The DLP [44] fragment marks one end of this spectrum while the undecidable SWRL [56,57] approach marks
the other end. Nonetheless, in between, several proposals have been put forth recently to extend expressiveness while still
retaining decidability; remarkably, several of these attempts build on the stable model resp. answer set semantics. Common
to these approaches are syntactic restrictions of the combined language in a way that guarantees “safe interaction” of the
rules and the ontology parts of the language (see Fig. 3).
Grosof et al. [44] show how inference in a subset of the description logic SHOIQ can be reduced to inference in a
subset of Horn programs (in which no function symbols, negations, and disjunctions are permitted), and vice versa how
inference in such Horn programs can be reduced to inference in SHOIQ. This work evolved to the Web Rule Language
(WRL) proposal [3].
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1525
The works by Donini et al. [21], Levy and Rousset [66], and Rosati [90,91] are representatives of hybrid approaches
in which DL knowledge bases are input sources. In detail, Donini et al. [21] introduced a combination of plain datalog
(without negation and disjunction) with the description logic ALC called AL-log . An integrated knowledge base consists
of a structural component in ALC and a relational component in datalog, where the integration of both components lies
in using concepts from the structural component as “constraints” in rule bodies of the relational component. The rules
must satisfy the condition that all variables in constraints atoms in a rule must also appear in ordinary atoms in the
body of the same rule; this is known as DL-safety. Donini et al. also present a technique for answering conjunctive queries
(existentially quantified conjunctions of atoms) with such constraints, where SLD-resolution as an inference method for
datalog is integrated with a method for inference in ALC .
Levy and Rousset [66] presented a combination of Horn rules with the description logic ALCN R, called carin, where in
contrast to [21] also roles are allowed as constraints in rule bodies. They showed that reasoning in it is undecidable already
in plain settings, and singled out two decidable syntactic fragments for the rule part: non-recursive rules and recursive but
role-safe rules, which requires that at least one variable appearing in a role atom also appears in some atom in the body
with a datalog predicate which does not occur in the consequent of rules. Motik et al. [80] adopted DL-safety like Donini et
al., but permitted both concepts and roles as constraints freely in the heads and bodies of rules. They established decidability
of the combination with the more expressive description logics SHIQ(D) and SHOIN (cf. Section 6.3), thus getting to a
decidable extension of OWL with rules.13 Horrocks et al.’s SWRL [56,57], instead, which extends OWL by rules that violate
the DL-safety restriction, is undecidable. Another approach [49] in the direction of Motik et al. shows decidability for query
answering in ALCHOQ( , ) with DL-safe rules by an embedding in extended conceptual logic programming, which is a
decidable extension of the answer set semantics by open domains.
Rosati’s r-hybrid knowledge bases [90,91] combined disjunctive datalog (with classical and default negation) with ALC
based on a generalized answer set semantics. Like Levy and Rousset [66], he allowed besides concepts also roles as con-
straints in rule bodies, and, similar to Donini et al. [21], DL-safety was requested. Besides satisfiability, also answering ground
atomic queries was discussed, based on a combination of ordinary ASP with inference in ALC . However, since in rule heads
no ontology predicate are allowed, no direct flow of information from the rules to the ontology part was facilitated.
Rosati’s recent DL + logformalism [93,94], which builds on his previous work [90,91], is the one closest in spirit to our
dl-programs. In this approach, predicates are split into DL predicates and into logic program (datalog) predicates. Rules allow
arbitrary disjunction of DL and datalog atoms in the head, and conjunction in the body; furthermore, atoms with a datalog
predicate can occur under negation as failure. The rules must be datalog safe, i.e., each variable occurring in a rule must
occur in an unnegated atom in the body of that rule; this is because DL + loguses a countably infinite set of constant
symbols (which coincides with the set of individuals) and makes the standard names assumption. The interaction between
DL- and datalog predicates must be weakly safe, i.e., each variable that occurs in a DL-atom in the head must occur in a
positive datalog atom in the body of the same rule. Note that differently from usual DL-safety [80], variables may occur
only in atoms with DL predicates.
Rosati introduces a new notion of model of a combined rule and ontology knowledge base. A model is defined using a
two-step reduct in which, in the first step, the ontology predicates are eliminated under the open-world assumption (OWA)
and, in the second step, the negated logic programming predicates are removed under the closed-world assumption (CWA).
As shown by Rosati, the resulting formalism is decidable provided that containment of conjunctive queries in unions of
conjunctive queries over the underlying ontology is decidable. The main differences between DL + log and dl-programs are
the following.
• DL + log is a tight coupling of rules and ontologies, on the basis of single models, while dl-programs provide a loose
coupling of rules and ontologies, on the basis of inference. This manifests also in different behavior for reasoning by
cases. In particular, the flow of disjunctive information to and from the DL knowledge base is smoother in DL + log.
For instance, given L = {man woman ≡ person, person(lee )} and P consisting of two DL + log rules p ( X ) ← man( X )
and p ( X ) ← woman( X ), the atom p (lee) is correctly concluded from KB = ( L , P ). As discussed in Section 4.3.3, the same
behavior can however be obtained by the dl-rule p ( X ) ← DL[man woman]( X ).
• The loose coupling, as realized in dl-programs, aims at facilitating interoperability of legacy reasoning systems and soft-
ware, such as DLV and RACER, which have individual underlying assumptions about the domain, treatment of equality,
possible identity of individuals etc; bridging the different worlds is up to the user. On the other hand, in DL + log a
uniform domain, uniform treatment of equality etc. assumed such that explicit bridging between the two worlds is not
necessary.
• The concept of dl-atom makes extensions of dl-programs to integrate ontologies, even in different formats, straightfor-
ward; there is no corresponding counterpart in DL + log, instead. Indeed, the approach of dl-atoms is more flexible
for mixing different reasoning modalities, such as consistency checking and logical consequence. In the realm of hex-
programs [30], almost arbitrary combinations can be conceived.
13
It is argued in [80] that this easily extends to SHOIN (D). In fact, decidability of the DL-safe rule extension holds for any DL that allows having
finitely many ground literals in knowledge bases [92].
1526 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
The most recent work of Motik and Rosati [75,77] aims at combining rules and ontologies in the framework of hybrid
MKNF knowledge bases, which are based on the first-order variant of Lifschitz’s logic MKNF [68]. Rules are of the form
where all h i and b j are function-free first-order atoms, and Kφ informally means that φ is known to hold under the values
of the not-atoms. To obtain decidability, DL-safety is adopted. As discussed in [77], adding such rules to an open-world DL
knowledge base is a faithful extension of both logic programming and DL (in the sense that in absence of one component,
the conclusions are the original ones), and allows to put on “closed world glasses”. Furthermore, [77] reports that an
extension permitting both modal and non-modal atoms in rules allows to generalize both SWRL and DL + log. However,
[75] reports that our dl-programs cannot be captured using MKNF rules.
Other recent works which aim at combining rules and ontologies through uniform first-order nonmonotonic formalisms
are [19,20,72]. Finally, nonmonotonic extensions of DLs (but not with rules) have been proposed in [12,22].
Some representatives of approaches reducing description logics to logic programming are the works by Van Belleghem
et al. [99], Alsaç and Baral [1,7], Swift [97], Hustadt et al. [61], and Heymans and Vermeir [50,51]. In more detail, Van
Belleghem et al. [99] analyze the close relationship between description logics and open logic programs, and present a
mapping of DL knowledge bases in ALCN to open logic programs. They also show how other description logics correspond
to sublanguages of open logic programs, and they explore the computational correspondences between a typical algorithm
for description logic inference and the resolution procedure for open logic programs. The works by Alsaç and Baral [1,7] and
Swift [97] reduce inference in the description logic ALCQI to query answering from normal logic programs (with default
negation, but without disjunctions and classical negations) under the answer set semantics.
The remarkable work of Hustadt et al. [61] considers SHIQ ontologies. They reduce consistency checking and query an-
swering to the evaluation of a positive disjunctive datalog program. Such a program is generated after an ordinary translation
of the ontology to first-order logic, followed by clever application of superposition techniques and subsequent elimination of
function symbols from the resulting set of clauses. The method has been practicably adopted in the KAON2 system, whose
promising experimental results are accounted in [78].
Finally, Heymans and Vermeir [50,51] present an extension of disjunctive logic programming under the answer set
semantics by inverses and an infinite universe. In particular, they prove that this extension is still decidable under the
assumption that the rules form a tree structure, and they show how inference in the description logic SHIF extended by
transitive closures of roles can be simulated in it.
10. Conclusion
Towards the integration of rules and ontologies in the Semantic Web, we have presented a combination of logic pro-
gramming under the answer set semantics and the description logics (DLs) SHIF (D) and SHOIN (D) behind the W3C
standard ontology languages OWL Lite and OWL DL, respectively. We have introduced dl-programs, which consist of a DL
knowledge base L and a set of dl-rules P , which may also contain queries to L in their bodies and which permit the use of
nonmonotonic negation. Such programs naturally generalize both the DL and the logic programming component. Differently
from other proposals, dl-programs provide a loose integration of these components, which safely interact through well-
defined interfaces. This facilitates a lean bridging of the quite diverse worlds of DLs and (nonmonotonic) logic programs,
and moreover provides a clean semantical basis for a coupling of reasoning engines available from the logic programming
and the DL communities.
In the spirit of logic programming, we have defined Herbrand models for dl-programs, and we have generalized many
well-known concepts in logic programming to dl-programs, including least models, stratifications, and answer sets. We
then have derived generalizations of major results for these concepts to dl-programs, including that satisfiable positive dl-
programs have a unique least Herbrand model and that satisfiable stratified dl-programs can be associated with a unique
minimal Herbrand model that is characterized through iterative least Herbrand models. As for answer sets, we have pre-
sented the notion of a strong answer set, which is based on a reduction to the least model semantics of positive dl-programs,
and the notion of a weak answer set, which is based on a reduction to the least model semantics of ordinary positive logic
programs.
On the computational side, we gave fixpoint characterizations for the semantics of positive and stratified dl-programs,
and we have shown how to compute it by finite fixpoint iterations. We have also shown how the weak answer set semantics
can be reduced to the answer set semantics of ordinary normal logic programs. Furthermore, we have briefly described a
prototype implementation of dl-programs, which has been built on top of the systems DLV [65] and RACER [45], and for
which a number of optimization techniques have been developed. To our knowledge, this prototype is currently the most
advanced implementation of a decidable combination of nonmonotonic rules and ontologies. Furthermore, we have given
a precise picture of the complexity of deciding strong and weak answer set existence for a dl-program, and of brave and
cautious reasoning from a dl-program under the weak and the strong answer set semantics.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1527
Finally, we have shown how some advanced reasoning tasks like closed-world reasoning and different forms of default
reasoning on ontologies can be easily realized via dl-programs. These applications fruitfully exploit nonmonotonic negation
and the inherent minimality property of answer sets. They demonstrate that dl-programs are a flexible framework for
accommodating different reasoning tasks on top of existing DL knowledge bases and reasoning engines, and provide a
declarative “glue” for combining different inferences. Here, in particular the possibility to talk both about provability and
consistency of the (possible augmented) knowledge base is a valuable feature of dl-programs. We have also shown that
DL-safe rules on ontologies [80] can be emulated on top of dl-programs. We expect that the flexibility and expressiveness of
dl-programs can be beneficial for a variety of applications in the context of the Semantic Web and other fields where DLs are
more and more used—the work of Wang et al. on merging ontologies [103] is one example. Also other tasks like planning,
diagnosis, configuration, or information integration, where ontological knowledge should be combined with knowledge in
form of rules, are possible application areas.
The concept of dl-programs which we introduced here can be extended in several directions. First of all, the coupling
approach is not bound to the description logics SHIF (D) or SHOIN (D), but can in principle be deployed to any DL
(under necessary constraints concerning the flow of information from the logic program to the DL knowledge base). An-
other extension concerns modifications of the DL knowledge base before querying. In this paper, we have considered three
operators which add temporarily further axioms to the knowledge base. However, it is perfectly reasonable that the update
also performs removal of axioms, and that more sophisticated update operators following methods from conditional and
counterfactual reasoning are applied.
A further and no less important extension is a richer language of dl-queries to the DL knowledge base . Natural can-
didates for this enrichment are conjunctive queries (CQs) and unions of conjunctive queries (UCQs), which are standard
in the database field. Since DLs have been proposed as an expressive data model [8,16], the interest in CQs and UCQs on
DL knowledge bases is increasing [15,42,82], and (restricted forms of) such queries are supported by popular DL reasoning
engines like RACER, Pellet, or KAON2. Our dl-programs can be easily extended to accommodate CQs and UCQs, as done in
[26]; the nice feature is that, in our framework, such a combination remains decidable, as long as query answering to the
DL knowledge base (after a virtual update of the facts part) is decidable.
Finally, another direction of extension concerns the language elements on the logic programming side. Here, an extension
with disjunction in rule heads is smoothly possible [27]. This is similar for the use of default negation in rule heads, and
for optimization constructs like weak constraints [65]. Other extensions concern different semantics of the rules; in [33],
a well-founded semantics for dl-programs has been defined, and in [104], a semantics based on defeasible logic. Other
extensions concern the consideration of probabilities [70,73], and fuzziness [71], and of rule priorities [106].
On the computational side, while the current prototype implementation incorporates several optimizations, there is a
lot of room for improvements. Further optimization techniques for evaluating dl-programs need to be developed. As for
deployment in a distributed environment, these algorithms have to be built on top of heterogeneous reasoners. One chal-
lenging aspect here is that such algorithms will interleave the execution of a logic programming and a DL engine. Good
overall performance will very much depend on the computational characteristics of the components, which may change
over time as versions improve and evolve, as well as of other factors like response and data transfer time for an underlying
communication medium like the Internet. Furthermore, such algorithms should exploit structural properties of dl-programs,
like splitting sets and stratifiability, to a larger extent, and aim at reducing the interfacing between the logic program and
the DL engine. Here, pushing work from the logic program to the DL engine might be beneficial [26]. Besides optimization,
another desirable issue would be to interface different logic programming engines and DL reasoners (currently, the DLV
system and RACER are interfaced). In this way, the strengths of different reasoners may be exploited as much as possible
and a powerful tool made available for developing reasoning applications in a highly declarative manner.
Acknowledgements
We are grateful to Ian Horrocks, Ulrike Sattler, and Lane A. Hemaspaandra for providing valuable information on
complexity-related issues during the preparation of this paper. We also thank the reviewers of this paper and its KR 2004
preliminary version, whose constructive comments helped to improve our work, and to Minh Tran Dao for help in proof
reading.
This work was partially supported by the Austrian Science Fund projects P17212-N04 and Z29-N04, by the German
Research Foundation under the Heisenberg Programme, the Marie Curie Individual Fellowship HPMF-CT-2001-001286 of
the EU program “Human Potential” (disclaimer: the authors are solely responsible for information communicated and the
European Commission is not responsible for any views or results expressed), the EU Project REWERSE (IST-2003-506779)
and the Italian National Project Interlink II04CG8AGG.
Proof of Lemma 4.2. Suppose that I 1 , I 2 ⊆ HB P are models of KB, that is, I i | L r for every r ∈ ground( P ) and i ∈ {1, 2}. We
show that I = I 1 ∩ I 2 is also a model of KB, that is, I | L r for every r ∈ ground( P ). Consider any r ∈ ground( P ), and assume
that I | L l for all l ∈ B + (r ) = B (r ). That is, I | L l for all classical literals l ∈ B (r ) and I | L a for all dl-atoms a ∈ B (r ). Hence,
I i | L l for all classical literals l ∈ B (r ), for every i ∈ {1, 2}. Furthermore, since every dl-atom in ground( P ) is monotonic
1528 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
relative to KB, it holds that I i | L a for all dl-atoms a ∈ B (r ), for every i ∈ {1, 2}. Since I 1 and I 2 are models of KB, it follows
that I i | L H (r ), for every i ∈ {1, 2}, and thus I | L H (r ). This shows that I | L r. Hence, I is a model of KB. 2
Proof of Theorem 4.8. Let μ: HB P ∪ DL P → {0, 1, . . . , k} be a stratification of KB = ( L , P ) relative to DL+ P . Recall that M 0 is
the least model (and thus, in particular, a model) of KB0 = ( L 0 , P 0 ) and, for every i ∈ {1, . . . , k}, it holds that M i is the least
model (and thus, in particular, a model) of KBi = ( L i , P i ) having the property that M i ∩ HBP i−1 = M i −1 ∩ HBP i−1 . It thus
follows that M k = M KB is a model of KB. We next show that M k is also a minimal model of KB. Towards a contradiction,
suppose that there exists a model J ⊆ HB P of KB such that J ⊂ M k . Hence, there exists some i ∈ {0, 1, . . . , k} such that
J ∩ HBP = M k ∩ HBP . Let j be a minimal such i. Then, J is a model of KB j . Furthermore, if j > 0, then J ∩ HBP =
i i j −1
M k ∩ HBP j−1 . But this contradicts M j being the least model of KB j such that M j ∩ HBP j−1 = M j −1 ∩ HBP j−1 . This shows that
M k is a minimal model of KB. 2
Proof of Theorem 4.12. Let I ⊆ HB P . If KB is free of dl-atoms, then s P LI = P I . Thus, I is the least model of ( L , s P LI ) iff I is
the least model of P I . Hence, I is a strong answer set of KB iff I is an answer set of P . 2
Proof of Theorem 4.13. (a) Let I be a strong answer set of KB. To show that I is also a model of KB, we have to show that
I | L r for all r ∈ ground( P ). Consider any r ∈ ground( P ). Suppose that I | L l for all l ∈ B + (r ) and I | L l for all l ∈ B − (r ).
Then, the dl-rule r that is obtained from r by removing all the literals in B − (r ) ∪ ( B + (r ) ∩ DL?P ) is contained in s P LI . Since
I is the least model of ( L , s P LI ) and thus, in particular, a model of ( L , s P LI ), it follows that I is a model of r . Since I | L l for
all l ∈ B + (r ) and I | L l for all l ∈ B − (r ) = ∅, it follows that I | L H (r ). This shows that I | L r. Hence, I is a model of KB.
(b) By (a), every strong answer set I of KB is a model of KB. Assume that every dl-atom in DL P is monotonic relative
to KB. We now show that then I is also a minimal model of KB. Towards a contradiction, suppose the contrary. That is,
J
suppose that there is a model J of KB with J ⊂ I . Since J is a model of KB, it follows that J is also a model of ( L , s P L ).
J
Since every dl-atom in DL P is monotonic relative to KB, it then follows that s P LI ⊆ s P L . Thus, J is also a model of ( L , s P LI ).
But this contradicts I being the least model of ( L , s P LI ). This shows that I is a minimal model of KB. 2
Proof of Theorem 4.14. Let KB = ( L , P ) be positive. If KB is satisfiable, then M KB is defined. A strong answer set of KB
is an interpretation I ⊆ HB P such that I is the least model of ( L , s P LI ). Since KB is positive, it follows that s P LI coincides
with ground( P ). Hence, I ⊆ HB P is a strong answer set of KB iff I = M KB . If KB is unsatisfiable, then KB has no model. Thus,
by Theorem 4.13, KB has no strong answer set.
Now assume that KB is stratified. Let μ be a stratification of KB of length k 0. Suppose that I ⊆ HB P is a strong answer
set of KB. That is, I is the least model of ( L , s P LI ). Hence,
Hence, KB is consistent, and I = M KB . Since the above line of argumentation also holds in the converse direction, it follows
that I ⊆ HB P is a strong answer set of KB iff KB is consistent and I = M KB . 2
Proof of Theorem 4.19. Let I ⊆ HB P . If KB is free of dl-atoms, then w P LI = P I . Thus, I is the least model of w P LI iff I is the
least model of P I . Hence, I is a weak answer set of KB iff I is an answer set of P . 2
Proof of Theorem 4.20. Let I ⊆ HB P be a weak answer set of KB. To show that I is also a model of KB, we have to show
that I | L r for all r ∈ ground( P ). Consider any r ∈ ground( P ). Suppose that I | L l for all l ∈ B + (r ) and I | L l for all l ∈ B − (r ).
Then, the dl-rule r that is obtained from r by removing all dl-atoms in B + (r ) and all literals in B − (r ) is in w P LI . Since I is
the least model of w P LI and thus, in particular, a model of w P LI , it follows that I | L r . Since I | L l for all l ∈ B + (r ) and
I | L l for all l ∈ B − (r ) = ∅, it follows I | L H (r ). But H (r ) = H (r ), so I | L r. Hence, I is a model of KB. 2
Proof of Theorem 4.23. Let I ⊆ HB P be a strong answer set of KB. That is, I is the least model of ( L , s P LI ). Hence, I is also
a model of w P LI . We show that I is in fact the least model of w P LI . Towards a contradiction, assume the contrary. That
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1529
is, assume there exists a model J ⊂ I of w P LI . Hence, J is also a model of ( L , s P LI ). But this contradicts that I is the least
model of ( L , s P LI ). This shows that I is the least model of w P LI . That is, I is a weak answer set of KB. 2
Proof of Lemma 5.1. Let I ⊆ I ⊆ HB P . Consider any r ∈ ground( P ). Then, for every classical literal l ∈ B (r ), it holds that
I | L l implies I | L l. Furthermore, since a is monotonic relative to KB, for every dl-atom a ∈ B (r ), it holds that I | L a
implies I | L a. This shows that T KB ( I ) ⊆ T KB ( I ). 2
Proof of Proposition 5.2. (⇒) Assume that T KB ( I ) ⊆ I ⊆ HB P . Suppose first that I is consistent. Then, for every r ∈
ground( P ), it holds that I | L l for all l ∈ B (r ) implies that I | L H (r ), and thus I | L r. Hence, I is a model of KB. Sup-
pose next that I is not consistent. Then, T KB ( I ) = HB P , and thus I = HB P .
(⇐) Suppose first that I is a model of KB. That is, I | L r for all r ∈ ground( P ). Equivalently, I | L l for all l ∈ B (r ) implies
that I | L H (r ), for all r ∈ ground( P ). Hence, T KB ( I ) ⊆ I . Suppose next that I = HB P . Then, T KB ( I ) = HB P = I . 2
i
Proof of Theorem 5.4. Since T KB is monotonic and HB P is finite, it follows that T KB (∅) for i 0 is an increasing sequence
n+1
of sets contained in lfp( T KB ), and T KB n
(∅) = T KB (∅) for some n 0. Since T KB
n
(∅) is a fixpoint of T KB that is contained in
lfp( T KB ), it follows that T KB (∅) = lfp( T KB ). 2
n
n +1
Proof of Theorem 5.6. Observe first that M 0 = T KB0 0 (∅), where n0 0 such that
T KB0 0 (∅) = T KB0 0 (∅). Since
n n j
i
T KB 0
(∅) = T KB0 (∅)
for all j 0, it follows by Corollary 5.3 and Theorem 5.4 that (a) M 0 is the least model of KB0 if KB0 is satisfiable, and
(b) M 0 = HB P if KB0 is unsatisfiable. Observe then that for i 1, it holds that M i =
n
T KBi ( M i −1 ), where ni 0 such that
i
n +1
T KBi ( M i −1 ) =
T KBi ( M i −1 ). Let KBi = ( L i , P i ), and let KBi = ( L i , P i ), where P i is the strong dl-transform of P i relative to L i
n
i i
and M i −1 . Then,
j j
T ( M i −1 ) = T (∅) ∪ M i −1 for all j 0. Hence, by Corollary 5.3 and Theorem 5.4, (a) M i = M KB ∪ M i −1 if
KBi KBi i
KBi is satisfiable, and (b) M i = HB P if KBi is unsatisfiable. Equivalently, (a) M i is the least model of KBi with M i ∩ HBP =
i −1
M i −1 ∩ HBP i−1 if such a model exists, and (b) M i = HB P if no such model exists. In summary, M k = HB P iff M i = HB P for
all i ∈ {0, . . . , k} iff KB is consistent. Furthermore, in this case, M k = M KB . 2
Proof of Theorem 5.8. Let P be defined in the same way as P guess , except that every pair of rules of the form (15) is
replaced by the following two rules:
Proof of Theorem 6.3. By DCA and UNA, without loss of generality, we can restrict to Herbrand interpretations of L.
(1) Let M be a strong answer set of KBecwa
P ,Z . Consider the Herbrand interpretation M of L such that for each ground
atom p (c ), M | p (c ) iff p + (c ) ∈ M. We show that M is a P , Z -minimal model M of L. Consider Rule (22). Since M
does not satisfy its body, L ( M ; λ ) must be satisfiable. Let N be any Herbrand model of L ( M ; λ ). Since for each ground
atom p (c ), M contains either p (c ) or p + (c ), by construction of L ( M ; λ ) it holds for each p from Q ∪ Z that N | ¬ p (c )
iff p (c ) ∈ M and that N | p (c ) iff p + (c ) ∈ M. Furthermore, for any p (c ), p (c ) ∈ M implies N | ¬ p (c ). So, N must be a
model of L such that N P ,Z M . Assuming that M P ,Z N, we derive a contradiction. Indeed, under this assumption
there exists some ground fact p (c ), where p is from P , such that N | ¬ p (c ) but M | p (c ); equivalently, p + (c ) ∈ M. This
means that Rule (19) has been applied to derive p + (c ); that is, L ( M ; λ) | p (c ). However, since L ( M ; λ) ⊆ L ( M ; λ ), N is a
model of L ( M ; λ). Since N | ¬ p (c ), it follows that L ( M ; λ) | p (c ). This is a contradiction. Thus, M P ,Z N holds. Since
N P ,Z M and M and N coincide on all predicates from Z , it follows that M = N. Since N was an arbitrary Herbrand
model of L ( M ; λ ), it follows that M is a P , Z -minimal model of L.
(2) Let M be a P , Z -minimal Herbrand model of L, and define
M = p + (c ) | M | p (c ) ∪ p (c ) | M | ¬ p (c ) .
1530 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
We show that M is a strong answer set of KBecwa P ,Z . By construction of M and the fact that M is a model of L ( M ; λ ),
the rule stemming from (22) is trivially satisfied by M. Next, for each ground atom p (c ) such that p is from Q ∪ Z , by
construction s P LM contains the fact p + (c ) (emerging from Rule (21)) iff p + (s) ∈ M. Furthermore, for each ground atom p (c ),
s P LM contains the fact p (c ) (emerging from Rule (18) or (20)) iff p (s) ∈ M.
Consequently, M is the least model of s P LM (and thus, a strong answer set of KB) if and only if for each ground atom p (c )
where p is from P , we have p + (c ) ∈ M iff M | DL[λ; p ](c ). By definition of λ and M, M is a model of L ( M ; λ). Since M is a
P , Z -minimal Herbrand model of L and L ⊆ L ( M ; λ), M is also a P , Z -minimal Herbrand model of L ( M ; λ). This means
that M | p (c ) iff L ( M ; λ) | p (c ). By definition of M and M | DL[λ; p ](c ), it follows that p + (c ) ∈ M iff M | DL[λ; p ](c ).
Hence, M is a strong answer set of KBecwa P ,Z . 2
Proof of Theorem 6.9. 1) Let M be a strong answer set of KBpl , and consider scen( M ) = L ∪ { i ,0 (ci ,0 ) | g i (ci ,0 ) ∈ M }. First we
show that scen( M ) is a scenario. By the rules of form (23), g i (ci ,0 ) can be in scen( M ) only if there is some instance ( g i ) of
g i ∈ H such that X i .0 = ci ,0 and L | pc ( g i ) . Furthermore, scen( M ) is satisfiable. Indeed, if this were not the case, then the
rules of form (24) would include in M all literals ¬ g i (ci ,0 ) where X i ,0 = ci ,0 , for all 1 i n. Hence, no rule instance of
(23) is applicable, and thus M contains no positive literals g i (ci ,0 ). Hence, L ( M ; λ) = L, which implies that L is unsatisfiable.
This is a contradiction. It remains to show that scen( M ) is maximal.
Towards a contradiction, suppose that S ⊃ scen( M ) is a maximal scenario. Then, S contains some ground literal
i ,0 (ci ,0 ) ∈
/ scen( M ), and since S is satisfiable, we have that scen( M ) | ¬ i ,0 (ci ,0 ); that is, L ( M ; λ) | ¬ i ,0 (ci ,0 ). Hence,
¬ g i (ci ,0 ) is not in M, since it is not derivable by the rules of form (24). This means that the strong transform s P LM con-
tains a rule g i (ci ,0 ) ← DL[ i ,1 ](ci ,1 ), . . . , DL[ i ,ki ](ci ,ki ) such that M | L i , j (ci , j ), for all 1 j ki . Hence, g i (ci ,0 ) ∈ M, which
means i ,0 (ci ,0 ) ∈ scen( M ). This is a contradiction, which proves maximality of scen( M ).
2) For the maximal scenario L ∪ S, define
M = g i (ci ,0 ) | i ,0 (ci ,0 ) ∈ S ∪ ¬ g i (ci ,0 ) | L ∪ S | ¬ i ,0 (ci ,0 ) ,
where g i (ci ,0 ) ranges over all instances of g i ( X i ,0 ), 1 i n. We show that M is a strong answer set of KBpl .
First, we show that M is a model of the strong transform s P LM . By definition of M, L ( M ; λ) = L ∪ S and clearly all rule
instances of (24), which belong to s P LM , are satisfied. Furthermore, each rule in s P LM stemming from a rule of form (23) is
satisfied: if M | L DL[ i , j ](ci , j ), for all 1 j ki , and L ∪ S | ¬ i ,0 (ci ,0 ), then, by maximality of L ∪ S, i ,0 (ci ,0 ) ∈ S, and thus
g i (ci ,0 ) ∈ M by construction. Finally, M is the least model of s P LM : any model N ⊆ M contains g i (ci ,0 ) iff g i (ci ,0 ) ∈ M; since
thus L ( N ; λ) = L ( M ; λ), N also contains ¬ g i (ci ,0 ) iff ¬ g i (ci ,0 ) ∈ M. This proves that M is a strong answer set of KBpl . 2
Proof of Theorem 6.19. 1) Let M be a strong answer set of KBdls . Then M | L DL[λ; ⊥](b) must hold, which means that
L ( M ; λ) is satisfiable, i.e., has some first-order model I . For each ground atom p (c) ∈ ga( P ), M contains exactly one of
p + (c) and p − (c). Therefore, we have p (c) ∈ L ( M ; λ) iff p + (c) ∈ M and ¬ p (c) ∈ L ( M ; λ) iff p + (c) ∈
/ M. Since M satisfies all
instances of the rules of form (37), it follows that I satisfies P ↓. Hence, I | ( L , P ↓). Thus by Lemma 6.18, it follows that
a model J of ( L , P ) exists such that I | p (c) iff p + (c) ∈ M, for every p (c) ∈ ga( P ).
M
2) Let M for I be as described. We first show that M is a model of the strong transform P = s P dls L . Clearly M satisfies
each rule in P which stems from (35) or (36). Next, since I satisfies each ground instance of every rule r in P . M satisfies
each rule in P which stems from (37). Finally, since L is satisfiable, from the definition of M also L ( M ; λ) is satisfiable.
Hence, also the rule fail ← DL[λ; ⊥](b) in P is satisfied by M. This shows that M is a model of P . Moreover, M is the least
model of P , since p + (c) is in M iff p + (c) ← is in P and similarly p − (c) is in M iff p − (c) ← is in P , and fail ∈
/ M. Thus,
M is a strong answer set of KBdls . 2
In order to encode instantiated possible hypotheses g = μ1 (c1 ) ∧ · · · ∧ μn (cn ) in Poole’s Default Logic, where each μi (ci )
is a ground literal with predicates p i , we can emulate the test whether L ∪ S ∪ {μ1 (c1 ) ∧ · · · ∧ μn (cn )} is satisfiable for
a scenario L ∪ S that is represented by an update L ( M ; λ), by an extended update λ g using a dl-literal not DL[λ g ; ⊥](b),
where b is an arbitrary constant, as follows.
the predicate qμ(ci ) is true in each strong answer set M for (and only for) ci , the update L ( M ; λ g ) amounts to L ∪ S ∪
{μ1 (c1 ), . . . , μn (cn )}.
• We can then reformulate the “blocking” rule (24), using a fact g (c), where c = c1 , . . . , cn , for each instance g of g, to
¬ g (c) ← DL[λ g ; ⊥](b)
and replace the ‘enabling” rule (24) with n rules
g i (ci ) ← DL[ 1 ](c1 ), . . . , DL[ k ](ck ), not ¬ g i (ci ),
for 1 i n, where pc ( g ) = 1 (c
1 ) ∧ · · · ∧ k (ck ); here the g i are predicates for the literals μi , which are used to build
the update λ as if μi is a single μ
literal 0 (i.e., if r i is i ’s predicate, then λ contains r i g i if μi is positive, otherwise
ri ∪
− g ).
i
Note that for encoding all possible instances g of g, the variables in pc ( g ) that do not occur in g itself need not be
instantiated, which reduces the number of rules.
Exploiting that, for any sentence α , L ∪ S | α iff L ∪ S ∪ {¬α } is unsatisfiable, we can similarly encode for any instance
g the test L ∪ S | pc ( g ) where pc ( g ) = α1 ∨ · · · ∨ αk is a disjunction of ground literals αi by a dl-atom DL[λ pc ( g ) ; ⊥](b),
and use it in the “blocking rule” (24); by using multiple such atoms, we can encode any precondition pc ( g ) that is in
conjunctive normal form.
In the proof of Theorem 7.1, we make use of the following result, which is an immediate consequence of Theorem 4.22.
Lemma E.1. Let KB = ( L , P ) be a stratified dl-program. Then, KB has a weak answer set M iff there exists an input I (of polynomial
size) of all (polynomially many) ground dl-atoms in ground( P ) such that (i) I complies with M, and (ii) M is the canonical model of
the ordinary stratified program P , which is obtained from ground( P ) by evaluating all dl-atoms on I and removing them.
Proof of Theorem 7.1. We prove the upper complexity bounds for stratified and general dl-programs, and the lower bounds
for positive and general dl-programs.
In the stratified case, by Theorem 4.14, KB has a strong answer set iff KB is consistent. By Theorem 5.6, the latter is
equivalent to M k = HB P , where M k is defined by (a sequence of) fixpoint iterations and can be computed in exponential
time. Hence, deciding whether KB has a strong answer set is in EXP. As for deciding whether KB has a weak answer set, by
Lemma E.1, we explore (one by one) the exponentially many possible inputs I of all dl-atoms in ground( P ). For each such
input, computing P , that is, evaluating the dl-atoms and removing them from ground( P ), is feasible in exponential time.
We then try to compute the canonical model M of P by (a sequence of) fixpoint iterations, and we check compliance with
1532 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
the inputs I of the dl-atoms, which can both be done in exponential time. In summary, deciding whether KB has a weak
answer set is also in EXP.
In the general case, we can guess an (exponential size) interpretation I ⊆ HB P and compute the transform s P LI (resp.,
w P LI ). Since evaluating all dl-atoms in ground( P ) and removing (i) all default-negated literals and dl-atoms, and (ii) all not
necessarily monotonic (resp., all) other dl-atoms from ground( P ) is feasible in exponential time, computing the transform
s P LI (resp., w P LI ) is also feasible in exponential time. Since we are then left with a positive ground KB , we try to com-
pute M KB by a fixpoint iteration, and check compliance with the guessed I , which can both be done in exponential time.
In summary, deciding whether KB has a strong (resp., weak) answer set can be done in nondeterministic exponential time.
Hardness for EXP of deciding answer set existence in the positive case holds by a reduction from the EXP-complete
problem of deciding whether a DL knowledge base L in SHIF (D) is satisfiable, since the latter is equivalent to the positive
dl-program KB = ( L , {¬ p ←, p ← DL[; ⊥]()}), where p is a fresh propositional symbol, having a strong answer set,
which is by Theorems 4.14, 4.20, and 4.23 in turn equivalent to KB having a weak answer set.
Hardness for NEXP of deciding answer set existence in the general case follows immediately from Theorems 4.12 and
4.19, and the fact that deciding whether an ordinary normal program has an answer set is NEXP-complete [17]. 2
For the proofs of Theorems 7.2 and 7.4, we recall the concept of a domino system, which is defined as follows. A domino
system D = ( D , H , V ) consists of a finite nonempty set D of tiles and two relations H , V ⊆ D × D expressing horizontal and
vertical compatibility constraints between the tiles. For positive integers s and t, and a word w = w 0 . . . w n−1 over D of
length n s, we say that D tiles the torus U (s, t ) = {0, 1, . . . , s−1} × {0, 1, . . . , t −1} with initial condition w iff there exists
a mapping τ : U (s, t )→ D such that for all (x, y ) ∈ U (s, t ): (i) if τ (x, y ) = d and τ ((x + 1) mod s, y ) = d , then (d, d ) ∈ H ,
(ii) if τ (x, y ) = d and τ (x, ( y + 1) mod t ) = d , then (d, d ) ∈ V , and (iii) τ (i , 0) = w i for all i ∈ {0, . . . , n}. Condition (i) is the
horizontal constraint, condition (ii) is the vertical constraint, and condition (iii) is the initial condition.
In the proofs of Theorems 7.2 and 7.4, we also use the following reduction of the tilability of domino systems to the satis-
fiability of knowledge bases in SHOIN (D) from [98] (Lemma 5.18 and Corollary 5.22) and the subsequent characterization
of strong (resp., weak) answer set existence for positive dl-programs.
Lemma E.2. For a domino system D = ( D , H , V ) with initial conditions w = w 0 . . . w n−1 , there exist DL knowledge bases L n , L D ,
L w , concepts C i ,0 , i ∈ {0, 1, . . . , n − 1}, and C d , d ∈ D, in SHOIN (D) such that:
Lemma E.3. Let KB = ( L , P ) be a positive dl-program. Then, KB has a strong (resp., weak) answer set iff there exists an interpretation I
and a subset S ⊆ {a ∈ DL P | I | L a} such that the ordinary positive program P I , S , which is obtained from ground( P ) by deleting each
rule that contains a dl-atom a ∈ S and all remaining dl-atoms, has a model J included in I .
Proof. (⇒) Suppose that KB has a strong (resp., weak) answer set I . Then, J = I is a model of P I , S included in I , where
S ⊆ {a ∈ DL P | I | L a}.
(⇐) Suppose that there are I and S as described in the statement of the lemma, such that P I , S has a model J included
in I . Clearly, J satisfies all rules in ground( P ) \ P J , S . Since KB is positive, all dl-atoms in KB are monotonic, and thus
P J , S ⊆ P I , S . Hence, J satisfies KB, and so KB is satisfiable. By Theorem 4.14, KB has a strong answer set. By Theorem 4.23,
KB has also a weak answer set. 2
In the proof of Theorem 7.2, we also make use of the following result, which follows from a reduction from simple Turing
machines to domino systems by Börger et al. [13] (Theorem 6.1.2), and the subsequent immediate result.
Lemma E.4. Let M be a nondeterministic Turing machine with time- (and thus space-) bound 2n , deciding a NEXP-complete language
L( M ) over the alphabet = {0, 1, }. Then, there exists a domino system D = ( D , H , V ) and a linear-time reduction trans that
takes any input b ∈ ∗ to a word w ∈ D ∗ with |b| = n = | w | such that M accepts b iff D tiles the torus U (2n+1 , 2n+1 ) with initial
condition w.
Lemma E.5. Given a vocabulary and a dl-program KB = ( L , P ), the number of ground dl-atoms a in ground( P ) is polynomial, and
every such ground dl-atom a has in general exponentially many different concrete inputs I p (that is, interpretations I p of its input
predicates p = p 1 , . . . , pm ), but each of these concrete inputs I p has a polynomial size. Furthermore, if KB is positive, then during the
computation of the canonical model of KB by fixpoint iteration, the input of any ground dl-atom a in ground( P ) can increase only
polynomially many times, and it thus needs to be evaluated only polynomially often.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1533
Proof of Theorem 7.2. We prove the upper complexity bounds for positive and general dl-programs, and the lower bounds
for positive and stratified dl-programs.
The NEXP-membership in the positive case follows immediately from Lemma E.3, since a suitable I and S, as described
in Lemma E.3, along with proofs I | L a for all a ∈ S, can be guessed and verified in exponential time.
As for the general case, by Lemma E.5, we first guess inputs I p for all ground dl-atoms in ground( P ) and evaluate
them with a NEXP oracle in polynomial time. For the (monotonic) ones remaining in s P LI , we then also guess a chain
∅ = I 0p ⊂ I 1p ⊂ · · · ⊂ I kp = I p (along which their inputs will be increased in the fixpoint computation below for s P LI ) and
evaluate the dl-atoms in it in polynomial time with a NEXP oracle. We finally ask a NEXP oracle if an interpretation I exists
which is the answer set of s P LI (resp., w P LI ) compliant with the above inputs (and thus the valuations) of the dl-atoms
and such that their inputs increase in the fixpoint computation as in the above chain. This yields the NPNEXP = PNEXP upper
bound.
Hardness for NEXP of deciding (strong or weak) answer set existence in the positive case holds by a reduction from the
NEXP-complete problem of deciding whether a DL knowledge base L in SHOIN (D) is satisfiable, using the same line of
argumentation as in the proof of Theorem 7.1.
Hardness for PNEXP of deciding answer set existence in the stratified case is proved by a generic reduction from Turing
machines M, exploiting the NEXP-hardness proof for ALCQIO by Tobies [98]. Informally, the main idea behind the proof
is to use a dl-atom to decide the result of the j-th oracle call made by a polynomial-time bounded M with access to a
NEXP oracle, where the results of the previous oracle calls are known and input to the dl-atom. By a proper sequence of
dl-atom evaluations, the result of M’s computation on input v can then be obtained.
More concretely, let M be a polynomial-time bounded deterministic Turing machine with access to a NEXP oracle, and
let v be an input for M. Since every oracle call can simulate M’s computation on v before that call, once the results of all
the previous oracle calls are known, we can assume that the input of every oracle call is given by v and the results of all
the previous oracle calls. Since M’s computation after all oracle calls can be simulated within an additional oracle call, we
can assume that the result of the last oracle call is the result of M’s computation on v. Finally, since any input to an oracle
call can be enlarged by “dummy” bits, we can assume that the inputs to all oracle calls have the same length n = 2·(k + l),
where k is the size of v, and l = p (k) is the number of all oracle calls: We assume that the input to the m+1-th oracle call
(with m ∈ {0, . . . , l−1}) has the form
where v k , v k−1 , . . . , v 1 are the symbols of v in reverse order, which are all marked as valid by a subsequent “1”,
c 0 , c 1 , . . . , cm−1 are the results of the previous m oracle calls, which are all marked as valid by a subsequent “1”, and
cm , . . . , cl−1 are “dummy” bits, which are all marked as invalid by a subsequent “0”.
By Lemma E.4, for the NEXP oracle M , there exists a domino system D = ( D , H , V ) and a linear-time reduction trans that
takes any input b ∈ ∗ to a word w = w 0 . . . w n−1 ∈ D ∗ with |b| = n such that M accepts b iff D tiles U (2n+1 , 2n+1 ) with
initial condition w. By Lemma E.2, there exist DL knowledge bases L n , L D , and L w , and concepts C i ,0 , i ∈ {0, 1, . . . , n − 1},
and C d , d ∈ D, in SHOIN (D) such that (i) L n ∪ L D ∪ L w is satisfiable iff D tiles U (2n+1 , 2n+1 ) with initial condition
w, (ii) L n , L D , and L w = {C i ,0 C w i | i ∈ {0, 1, . . . , n − 1}} can be constructed in polynomial time in n from n, D , and w,
respectively, and (iii) in every model of L n ∪ L D , each C i ,0 contains exactly one object representing (i , 0) ∈ U (2n+1 , 2n+1 ),
and each C d contains all objects associated with d.
Let the stratified dl-program KB = ( L , P ) now be defined as follows:
L = L n ∪ L D ∪ C i ,0 S i ,d C d | i ∈ {0, 1, . . . , n − 1}, d ∈ D ∪ C i ,0 (o i ) | i ∈ {0, 1, . . . , n − 1} ,
l
P = ¬bl2l−2 (0) ← ∪ P j,
j =0
j j j j
where P j = P v ∪ P q ∪ P w ←b ∪ P s← w for every j ∈ {0, . . . , l}. Informally, every set of dl-rules P j generates the input of the
j +1-th oracle call, which includes the results of the first j oracle calls. Here P l prepares, for simplicity, the input of a
“dummy” (non-happening) l+1-th oracle call which contains the result of the l-th (i.e., the last) oracle call. More concretely,
j j
the bitstring a−2k · · · a2l−1 is the input of the j +1-th oracle call iff b−2k (a−2k ), . . . , b2l−1 (a2l−1 ) are in the canonical model
j j j j
of KB. The components P v , P q , P w ←b , and P s← w of P j , with j ∈ {0, . . . , l}, are defined as follows:
j
(1) P 0v writes v into the input of the first oracle call, and every P v copies v into the input of the j +1-th oracle call, for
j ∈ {1, . . . , l}:
P 0v = b0−2i ( v i ) ←| i ∈ {1, . . . , k} ∪ b0−2i +1 (1) ←| i ∈ {1, . . . , k} ,
j j j −1
P v = b−i (x) ← b−i (x) | i ∈ {1, . . . , 2k} .
1534 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
j
(2) P q0 initializes the rest of the input of the first oracle call with “dummy” bits, and every P q with j ∈ {1, . . . , l} writes the
result of the j-th oracle call into the input of the j +1-th oracle call and carries over all the other result and dummy
bits from the input of the j-th oracle call:
P q0 = b0i (0) ←| i ∈ {0, . . . , 2l−1} ,
j j j −1
P q = b i (x) ← b i (x) | i ∈ {0, . . . , 2l−1}, i ∈
/ {2 j −2, 2 j −1} ∪
j j −1 j j j
b2 j −2 (0) ← DL[∀i , d: S i ,d si ,d ; ⊥](); b2 j −2 (1) ← not b2 j −2 (0); b2 j −1 (1) ← .
j
(3) Every P w ←b with j ∈ {0, . . . , l} realizes the above-mentioned linear-time reduction trans, which transforms any input b j
of the Turing machine M into an initial condition w j of the same length of M’s domino system D .
j
(4) Every P s← w with j ∈ {0, . . . , l} transforms the initial condition w j of D into an input s j to the j +1-th dl-atom via the
j
predicates si ,d :
j j j
P s← w = si ,d (o i ) ← w i (d) | i ∈ {0, 1, . . . , n − 1}, d ∈ D .
Observe then that M accepts v iff the last oracle call returns “yes”. The latter is equivalent to bl2l−2 (1) being derived
from KB and thus bl2l−2 (0) being not derived from KB, which is in turn equivalent to KB having a strong (resp., weak)
answer set. In summary, M accepts v iff KB has a strong (resp., weak) answer set. 2
In the proofs of Theorems 7.3 and 7.4, we use the following two immediate results, which show that cautious (resp.,
brave) reasoning from dl-programs under the strong or weak answer set semantics can be reduced to deciding the non-
existence (resp., existence) of strong or weak answer sets, and vice versa.
Lemma E.6. Let KB = ( L , P ) be a dl-program, and let l ∈ HB P . Let KB = ( L, P ∪ { p ← l, ¬ p ← l}) (resp., KB = ( L , P ∪ { p ←
not l, ¬ p ← not l})), where p is a fresh propositional symbol. Then, l belongs to every (resp., some) strong or weak answer set of KB iff
KB has no (resp., a) strong or weak answer set.
Lemma E.7. Let KB = ( L , P ) be a dl-program. Then, KB has no (resp., some) strong or weak answer set iff the classical literal p belongs to
every (resp., some) strong or weak answer set of KB = ( L , P ∪ {¬ p ←}) (resp., KB = ( L , P ∪ { p ←})), where p is a fresh propositional
symbol.
Proof of Theorem 7.3. We prove the upper complexity bounds for stratified and general dl-programs, and the lower bounds
for positive and general dl-programs.
As for the upper complexity bounds, by Lemma E.6, deciding whether l belongs to every (resp., some) strong or weak
answer set of KB = ( L , P ) can be reduced to (strong or weak) answer set non-existence (resp., existence) by adding to P
two rules, which do not change KB’s property of being stratified or general. By Theorem 7.1, answer set existence is in EXP
in the stratified case and in NEXP in the general case. Thus, deciding whether l belongs to every (resp., some) strong or
weak answer set of KB is in EXP when KB is stratified, and in co-NEXP (resp., NEXP) when KB is a general dl-program.
As for the lower complexity bounds, by Lemma E.7, answer set non-existence (resp., existence) for KB = ( L , P ) can be
reduced to cautious (resp., brave) reasoning by adding a single rule to P , which does not change KB’s property of being
positive or general. By Theorem 7.1, answer set existence is hard for EXP in the positive case and hard for NEXP in the
general case. Thus, deciding whether l belongs to every (resp., some) strong or weak answer set of KB is hard for EXP when
KB is positive and hard for co-NEXP (resp., NEXP) when KB is a general dl-program. 2
Proof of Theorem 7.4. We prove the upper complexity bounds for positive and general dl-programs, and the lower bounds
for positive and stratified dl-programs.
We first prove the upper complexity bounds for all above cases except for brave reasoning from positive dl-programs. By
Lemma E.6, deciding whether l belongs to every (resp., some) strong or weak answer set of KB = ( L , P ) can be reduced to
the complement of answer set existence (resp., answer set existence itself) by adding to P two rules. In all cases except for
brave reasoning from positive dl-programs, adding the two rules does not change KB’s property of being positive or general.
By Theorem 7.2, answer set existence is in NEXP in the positive case and in PNEXP in the general case. Thus, deciding
whether l belongs to every strong or weak answer set of KB is in co-NEXP when KB is positive, and in PNEXP when KB is a
general dl-program. Furthermore, deciding whether l belongs to some strong or weak answer set of KB is in PNEXP when KB
is a general dl-program.
Membership in PNEXP of brave reasoning under the weak answer set semantics in the positive case follows, by Lemma E.6,
from the membership in PNEXP of deciding weak answer set existence in the stratified case.
As for the membership in D exp of brave reasoning under the strong answer set semantics in the positive case, observe
first that a classical literal l ∈ HB P belongs to some strong answer set of the positive dl-program KB iff (i) KB has some
strong answer set, and (ii) KB has no strong answer set I with l ∈
/ I . By Lemma E.3, the latter is equivalent to: (i) there are
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1535
I and S as described in Lemma E.3, and (ii) there are no such I and S with l ∈ / I . As argued in the proof of Theorem 7.2,
(i) and (ii) are in NEXP and co-NEXP, respectively. This shows that brave reasoning in the positive case under the strong
answer set semantics is in D exp .
As for the lower complexity bounds for all above cases except for brave reasoning from positive dl-programs, by
Lemma E.7, answer set non-existence (resp., existence) for KB = ( L , P ) can be reduced to cautious (resp., brave) reason-
ing by adding a single rule to P , which does not change KB’s property of being positive or stratified. By Theorem 7.2,
answer set existence is NEXP-hard in the positive case and PNEXP -hard in the stratified case. Hence, deciding whether l be-
longs to every strong or weak answer set of KB is co-NEXP-hard when KB is positive and PNEXP -hard when KB is stratified.
Moreover, deciding whether l is in some strong or weak answer set of KB is PNEXP -hard when KB is stratified.
Hardness for D exp of brave reasoning under the strong answer set semantics in the positive case holds by a reduction
from a D exp -hard problem involving domino systems. More concretely, by a slight adaptation of the proof of Corollary 5.14
in [98], it can be shown that there exists a domino system D = ( D , H , V ) such that the following problem is hard for D exp :
() Given two initial conditions v = v 0 . . . v n−1 and w = w 0 . . . w n−1 over D of length n, decide whether (1) D tiles the
torus U (2n+1 , 2n+1 ) with initial condition v, and (2) D does not tile the torus U (2n+1 , 2n+1 ) with initial condition w.
We reduce () to brave reasoning under the strong answer set semantics in the positive case. By Lemma E.2, for domino
systems D = ( D , H , V ) and initial conditions v = v 0 . . . v n−1 and w = w 0 . . . w n−1 , there exist DL knowledge bases L n , L D ,
L v , and L w , and concepts C i ,0 , i ∈ {0, 1, . . . , n − 1}, and C d , d ∈ D, in SHOIN (D) such that (i) L n ∪ L D ∪ L v is satisfiable
iff D tiles U (2n+1 , 2n+1 ) with initial condition v, (ii) L n ∪ L D ∪ L w is unsatisfiable iff D does not tile U (2n+1 , 2n+1 ) with
initial condition w, (iii) L n , L D , L v = {C i ,0 C v i | i ∈ {0, 1, . . . , n − 1}}, and L w = {C i ,0 C w i | i ∈ {0, 1, . . . , n − 1}} can be
constructed in polynomial time in n from n, D , v, and w, respectively, and (iv) in every model of L n ∪ L D , each C i ,0 contains
exactly one object representing (i , 0) ∈ U (2n+1 , 2n+1 ), and each C d contains all objects associated with d.
Let the dl-program KB = ( L , P ) be defined as follows:
L = L n ∪ L D ∪ C i ,0 S i ,d C d | i ∈ {0, 1, . . . , n − 1}, d ∈ D ∪ C i ,0 (o i ) | i ∈ {0, 1, . . . , n − 1} ,
P = ¬ p ←, p ← DL[∀i , d: S i ,d si ,d ; ⊥]() ∪
si ,d (o i ) ←| i ∈ {0, 1, . . . , n − 1}, d ∈ D , v i = d ∪
q ← DL[∀i , d: S i ,d si ,d ; ⊥]() ∪
si ,d (o i ) ←| i ∈ {0, 1, . . . , n − 1}, d ∈ D , w i = d .
Observe that the dl-program KB is positive. Furthermore, KB has a strong answer set iff (1) L n ∪ L D ∪ L v is satisfiable, and
the strong answer set of KB contains q iff (2) L n ∪ L D ∪ L w is unsatisfiable. That is, q belongs to some strong answer set
of KB iff (1) D tiles the torus U (2n+1 , 2n+1 ) with initial condition v, and (2) D does not tile the torus U (2n+1 , 2n+1 ) with
initial condition w.
Hardness for PNEXP of brave reasoning under the weak answer set semantics in the positive case is proved by a generic
reduction from Turing machines. The proof is similar to the proof of PNEXP -hardness of deciding strong (resp., weak) answer
set existence in the stratified case (in the proof of Theorem 7.2). The main difference that must be taken into account in
the construction is that rather than deciding whether a stratified dl-program has a strong (resp., weak) answer set, we now
decide whether a literal holds in some weak answer set of a positive dl-program. Intuitively, we use a set of weak answer
sets for guessing the outcomes of all oracle calls, and a literal q in one of these weak answers to identify the correct guess.
More concretely, let M be a polynomial-time bounded deterministic Turing machine with access to a NEXP oracle, and
let v be an input for M. Let the positive dl-program KB = ( L , P ) be defined as the stratified dl-program KB = ( L , P ) in the
proof of Theorem 7.2, except that we now add the rule
j j j j
and that every P q , j ∈ {1, . . . , l}, is now defined as P q,id ∪ P q,guess ∪ P q,call , where:
j
(1) Every P q,id , j ∈ {1, . . . , l}, copies all the persisting results and dummy bits from the input of the j-th oracle call into
the input of the j +1-th oracle call:
j j j −1
P q,id = b i (x) ← b i (x) | i ∈ {0, . . . , 2l−1}, i ∈
/ {2 j −2, 2 j −1} .
j
(2) Every P q, guess , j ∈ {1, . . . , l}, allows for guessing the outcome of the j-th oracle call, that is, exactly one fact among
j j
b2 j −2 (0) and b2 j −2 (1). The guess is verified through the predicate guess_ok j , which should evaluate to true:
1536 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
j j j
P q,guess = b2 j −2 (1) ← DL[ B j b2 j −2 ; B j ](1);
j j
b2 j −2 (0) ← DL[ B j b2 j −2 ; B j ](0);
j j j j
¬b2 j−2 (1) ← b2 j−2 (0); guess_ok j ← b2 j −2 (0); guess_ok j ← b2 j−2 (1) .
j
(3) Every P q,call , j ∈ {1, . . . , l}, allows for choosing among the two possible outcomes of the j-th oracle call exactly the
j
one that matches the result of the actual outcome. That is, call_ok j is true iff either (a) b2 j −2 (0) holds and the actual
j
outcome is “no” or (b) b2 j −2 (1) holds and the actual outcome is “yes”:
j j j −1
P q,call = ¬b2 j −2 (1) ← DL[∀i , d: S i ,d si ,d ; ⊥]();
j j −1
call_ok j ← b2 j −2 (0), DL[∀i , d: S i ,d si ,d ; ⊥]();
j j
call_ok j ← b2 j −2 (1); b2 j −1 (1) ← .
j
Thus, M accepts v iff (i) the last oracle call returns “yes” and (ii) the b2 j −2 (x)’s with j ∈ {1, . . . , l} are a correct guess that
matches the actual outcomes of the oracle calls. The latter is equivalent to the existence of a weak answer set of KB that
contains all guess_ok j and call_ok j with j ∈ {1, . . . , l}, or, equivalently, that contains q. In summary, M accepts v iff q holds
in some weak answer set of KB. 2
Proof of Theorem 8.5. We can reformulate this theorem as follows: Let U be a splitting set for a dl-program KB = ( L , P ).
A set A of literals is a strong answer set of KB if and only if A is a strong answer set of P \ b U ( P ) ∪ M, where M is a strong
answer set of b U ( P ).
(⇒) Let A be a strong answer set for KB. Let P = sb U ( P ) LA and let S be the least model of P . Note that S must exist.
Furthermore, since P ⊆ s P LA , it follows that S ⊆ A. On the other hand, since U is a splitting set for P , we must have that
P = sb U ( P ) LS . Indeed, consider the set of literals A = {a ∈ B − (r ) ∩ A from some ground instance r of a rule in b U ( P ) such
that a ∈ A }. Every literal in A must occur in the head of a ground instance of some rule r from P ; by the definition of
dependencies and of a splitting set, each such r must belong to b U ( P ). Therefore, a ∈ S must hold. Consequently, S is the
least model of sb U ( P ) LS , which means that S is a strong answer set of b U ( P ).
Furthermore, A is a strong answer set of R = P \ b U ( P ) ∪ S. Indeed, let M be the least model of sR LA . Since both M and
A contain S and are models of sR LA , M ⊆ A must hold. On the other hand, if M ⊂ A, then M would be a model of s P LA ,
since M satisfies s( P \ b U ( P )) LA and each rule in sb U ( P ) LA . Indeed, each literal a ∈ M \ S must occur in some rule head of
s( P \ b U ( P )) LA , but by dependencies and splitting cannot occur in the body of any rule in sb U ( P ) LA . However, this would
contradict that A is a strong answer set of KB. This shows that A is a strong answer set of P \ b U ( P ) ∪ M, where M is a
strong answer set of b U ( P ).
(⇐) Let A be a strong answer set of R = P \ b U ( P ) ∪ M were M is a strong answer set for b U ( P ). Note that A ⊇ M, since
all literals in M appear in R as facts. The strong transform s P LA is given by s P LA = s( P \ b U ( P )) LA ∪ sb U ( P ) LA . Each rule in the
left part of the union belongs to sR LA . Furthermore, the right part sb U ( P ) LA must coincide with sb U ( P ) M L , since each literal
in a ∈ A \ M must occur in the head of a rule in s P LA , but by dependencies and the splitting set condition cannot occur in
the body of any ground instance of any rule from b U ( P ). Furthermore, since M | L sb U ( P ) M L , it follows that A | L sb U ( P ) L .
M
Consequently, A is a model of s P L . Moreover, A must coincide with the least model N of s P L . If N ∩ M ⊂ M would hold,
A A
then N ∩ M would be a model of sb U ( P ) M L (= sb U ( P ) L ), which contradicts that M is a strong answer set of b U ( P ). On the
A
other hand, if N ∩ M = M (= A ∩ M) but N ⊂ A, then N would be a model of sR LA smaller than A, which contradicts that A
is a strong answer set of R. It follows N = A. This shows that A is a strong answer set of KB. 2
Proof of Theorem 8.6. Let V and S be as described. Assume that S is not a splitting set. Then there exists some a ∈ S and
some b ∈ V such that a → b. By condition (ii), a ∈ V holds. Since S ∩ V = ∅, this is a contradiction.
To show that b S ( P ) has a single strong answer set (if consistent), it is not hard to see that in absence of (possibly)
nonmonotonic dl-atoms, ( L , b S ( P )) has some stratification (otherwise), literals a, b ∈ S must exist such that a →n b and
b →+ a, which is impossible. In presence of (possibly) nonmonotonic dl-atoms, the program P can be replaced by the
program P described in the discussion after the theorem. As easily seen, P must also be stratifiable. 2
References
[1] G. Alsaç, C. Baral, Reasoning in description logics using declarative logic programming, Technical report, Department of Computer Science and Engi-
neering, Arizona State University, 2001.
[2] A. Analyti, G. Antoniou, C.V. Damásio, G. Wagner, Stable model theory for extended RDF ontologies, in: Proceedings ISWC-2005, in: LNCS, vol. 3729,
Springer, 2005, pp. 21–36.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1537
[3] J. Angele, H. Boley, J. de Bruijn, D. Fensel, P. Hitzler, M. Kifer, R. Krummenacher, H. Lausen, A. Polleres, R. Studer, Web Rule Language (WRL), Sept.
2005, W3C Member Submission. Available at http://www.w3.org/Submission/WRL/.
[4] G. Antoniou, Non-monotonic rule systems on top of ontology layers, in: Proceedings ISWC-2002, in: LNCS, vol. 2342, Springer, 2002, pp. 394–398.
[5] G. Antoniou, C.V. Damásio, B. Grosof, I. Horrocks, M. Kifer, J. Maluszynski, P.F. Patel-Schneider, Combining rules and ontologies: A survey, Technical
Report IST506779/Linköping/I3-D3/D/PU/a1, Linköping University, February 2005.
[6] F. Baader, B. Hollunder, Embedding defaults into terminological knowledge representation formalisms, J. Autom. Reasoning 14 (1) (1995) 149–180.
[7] C. Baral, Knowledge Representation, Reasoning, and Declarative Problem Solving, Cambridge University Press, Cambridge, UK, 2002.
[8] D. Berardi, D. Calvanese, G. De Giacomo, Reasoning on UML class diagrams, Artificial Intelligence 168 (1–2) (2005) 70–118.
[9] T. Berners-Lee, Weaving the Web, Harper, San Francisco, CA, 1999.
[10] T. Berners-Lee, J. Hendler, O. Lassila, The Semantic Web, Scientific American 284 (5) (2001) 34–43.
[11] H. Boley, S. Tabet, G. Wagner, Design rationale of RuleML: A markup language for semantic web rules, in: I.F. Cruz, S. Decker, J. Euzenat, D.L. McGuin-
ness (Eds.), Proceedings First Semantic Web Working Symposium (SWWS-2001), Stanford University, 2001, pp. 381–401.
[12] P.A. Bonatti, C. Lutz, F. Wolter, Description logics with circumscription, in: Proceedings KR-2006, AAAI Press, 2006, pp. 400–410.
[13] E. Börger, E. Grädel, Y. Gurevich, The Classical Decision Problem, Springer, 2001.
[14] M. Cadoli, M. Lenzerini, The complexity of propositional closed world reasoning and circumscription, J. Comput. Syst. Sci. 48 (2) (1994) 255–310.
[15] D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, R. Rosati, Data complexity of query answering in description logics, in: Proceedings KR-2006,
AAAI Press, 2006, pp. 260–270.
[16] D. Calvanese, M. Lenzerini, D. Nardi, Description logics for conceptual data modeling, in: J. Chomicki, R. van der Meyden, G. Saake (Eds.), Logics for
Emerging Applications of Databases, Springer, 2003, pp. 229–263 (Chapter 8).
[17] E. Dantsin, T. Eiter, G. Gottlob, A. Voronkov, Complexity and expressive power of logic programming, ACM Comput. Surv. 33 (3) (2001) 374–425.
[18] J. de Bruijn, T. Eiter, A. Polleres, H. Tompits, On representational issues about combinations of classical theories with nonmonotonic rules, in: Pro-
ceedings KSEM-2006, in: LNCS/LNAI, vol. 4092, Springer, 2006, pp. 1–22.
[19] J. de Bruijn, T. Eiter, A. Polleres, H. Tompits, Embedding non-ground logic programs into autoepistemic logic for knowledge base combination, in:
Proceedings IJCAI-2007, AAAI Press/IJCAI, 2007, pp. 304–309.
[20] J. de Bruijn, D. Pearce, A. Polleres, A. Valverde, A logic for hybrid rules, in: Proceedings RuleML-2006, IEEE Computer Society, 2006. Available at http://
2006.ruleml.org/online-proceedings/rule-integ.pdf.
[21] F.M. Donini, M. Lenzerini, D. Nardi, A. Schaerf, A L-log: Integrating datalog and description logics, J. Intell. Inf. Syst. 10 (3) (1998) 227–252.
[22] F.M. Donini, D. Nardi, R. Rosati, Description logics of minimal knowledge and negation as failure, ACM Trans. Comput. Log. 3 (2) (2002) 177–225.
[23] T. Eiter, W. Faber, N. Leone, G. Pfeifer, Declarative problem-solving using the DLV system, in: J. Minker (Ed.), Logic-Based Artificial Intelligence, Kluwer
Academic Publishers, 2000, pp. 79–103.
[24] T. Eiter, G. Gottlob, On the computational cost of disjunctive logic programming: Propositional case, Ann. Math. Artif. Intell. 15 (3/4) (1995) 289–323.
[25] T. Eiter, G. Gottlob, H. Veith, Modular logic programming and generalized quantifiers, in: Proceedings LPNMR-1997, in: LNCS/LNAI, vol. 1265, Springer,
1997, pp. 290–309.
[26] T. Eiter, G. Ianni, T. Krennwallner, R. Schindlauer, Exploiting conjunctive queries in description logic programs, in: D. Calvanese, et al. (Eds.), Proceed-
ings of the 20th International Workshop on Description Logics (DL-2007), CEUR Workshop Proceedings, vol. 250, CEUR-WS. org, 2007, pp. 259–266.
[27] T. Eiter, G. Ianni, A. Polleres, R. Schindlauer, H. Tompits, Reasoning with rules and ontologies, in: P. Barahona, F. Bry, E. Franconi, N. Henze, U. Sattler
(Eds.), Reasoning Web, Second International Summer School 2006, Tutorial Lectures, in: LNCS, vol. 4126, Springer, 2006, pp. 93–127.
[28] T. Eiter, G. Ianni, R. Schindlauer, H. Tompits, NLP-DL: A KR system for coupling nonmonotonic logic programs with description logics, in: 4th Interna-
tional Semantic Web Conference (ISWC-2005), 2005. System poster.
[29] T. Eiter, G. Ianni, R. Schindlauer, H. Tompits, Non-monotonic description logic programs: Implementation and experiments, in: Proceedings LPAR-2004,
in: LNCS, vol. 3452, Springer, 2005, pp. 511–517.
[30] T. Eiter, G. Ianni, R. Schindlauer, H. Tompits, A uniform integration of higher-order reasoning and external evaluations in answer-set programming, in:
Proceedings IJCAI-2005, Professional Book Center, 2005, pp. 90–96.
[31] T. Eiter, G. Ianni, R. Schindlauer, H. Tompits, Effective integration of declarative rules with external evaluations for Semantic Web reasoning, in:
Proceedings ESWC-2006, in: LNCS, vol. 4011, Springer, 2006, pp. 273–287.
[32] T. Eiter, G. Ianni, R. Schindlauer, H. Tompits, Towards efficient evaluation of HEX programs, in: Proceedings NMR-2006, 2006, pp. 40–46.
[33] T. Eiter, T. Lukasiewicz, R. Schindlauer, H. Tompits, Well-founded semantics for description logic programs in the Semantic Web, in: Proceedings
RuleML-2004, in: LNCS, vol. 3323, Springer, 2004, pp. 81–97.
[34] W. Faber, N. Leone, G. Pfeifer, Recursive aggregates in disjunctive logic programs: Semantics and complexity, in: Proceedings JELIA-2004, in:
LNCS/LNAI, vol. 3229, Springer, 2004, pp. 200–212.
[35] D. Fensel, F. van Harmelen, I. Horrocks, D.L. McGuinness, P.F. Patel-Schneider, OIL: An ontology infrastructure for the Semantic Web, IEEE Intelligent
Syst. 16 (2) (2001) 38–45.
[36] D. Fensel, W. Wahlster, H. Lieberman, J. Hendler (Eds.), Spinning the Semantic Web: Bringing the World Wide Web to Its Full Potential, MIT Press,
2002.
[37] M. Fitting, First-Order Logic and Automated Theorem Proving, second ed., Springer, Secaucus, NJ, USA, 1996.
[38] M. Gelfond, V. Lifschitz, The stable model semantics for logic programming, in: Proceedings ICLP/SLP-1988, MIT Press, 1988, pp. 1070–1080.
[39] M. Gelfond, V. Lifschitz, Classical negation in logic programs and disjunctive databases, New Gen. Comput. 9 (1991) 365–385.
[40] M. Gelfond, H. Przymusinska, T.C. Przymusinski, The extended closed world assumption and its relationship to parallel circumscription, in: Proceedings
PODS-1986, ACM Press, 1986, pp. 133–139.
[41] M. Gelfond, H. Przymusinska, T.C. Przymusinski, On the relationship between circumscription and negation as failure, Artificial Intelligence 38 (1989)
75–94.
[42] B. Glimm, I. Horrocks, C. Lutz, U. Sattler, Conjunctive query answering for the description logic SHIQ, in: Proceedings IJCAI-2007, AAAI Press/IJCAI,
2007, pp. 399–404.
[43] G. Gottlob, Complexity results for nonmonotonic logics, J. Logic Comput. 2 (3) (1992) 397–425.
[44] B.N. Grosof, I. Horrocks, R. Volz, S. Decker, Description logic programs: Combining logic programs with description logics, in: Proceedings WWW-2003,
ACM Press, 2003, pp. 48–57.
[45] V. Haarslev, R. Möller, RACER system description, in: Proceedings IJCAR-2001, in: LNCS/LNAI, vol. 2083, Springer, 2001, pp. 701–705.
[46] J. Heflin, H. Munoz-Avila, LCW-based agent planning for the Semantic Web, in: Ontologies and the Semantic Web. Papers from the 2002 AAAI
Workshop WS-02-11, AAAI Press, 1998, pp. 63–70.
[47] L.A. Hemachandra, The strong exponential hierarchy collapses, J. Comput. Syst. Sci. 39 (3) (1989) 299–322.
[48] J. Hendler, D.L. McGuinness, The DARPA agent markup language, IEEE Intelligent Syst. 15 (6) (2000) 67–73.
[49] S. Heymans, D.V. Nieuwenborgh, D. Vermeir, Non-monotonic ontological and rule-based reasoning with extended conceptual logic programs, in:
Proceedings ESWC-2005, in: LNCS, vol. 3532, Springer, 2005, pp. 392–407.
[50] S. Heymans, D. Vermeir, Integrating ontology languages and answer set programming, in: Proceedings DEXA Workshops 2003, IEEE Computer Society,
2003, pp. 584–588.
1538 T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539
[51] S. Heymans, D. Vermeir, Integrating semantic web reasoning and answer set programming, in: M. de Vos, A. Provetti, (Eds.), Proceedings ASP-2003—
Answer Set Programming: Advances in Theory and Implementation, CEUR Workshop Proceedings, vol. 78, CEUR-WS. org, 2003, pp. 194–208.
[52] I. Horrocks, DAML + OIL: A description logic for the Semantic Web, IEEE Bull. Technical Committee Data Engrg. 25 (1) (2002) 4–9.
[53] I. Horrocks, DAML + OIL: A reason-able Web ontology language, in: Proceedings EDBT-2002, in: LNCS, vol. 2287, Springer, 2002, pp. 2–13.
[54] I. Horrocks, P.F. Patel-Schneider, Reducing OWL entailment to description logic satisfiability, in: Proceedings ISWC-2003, in: LNCS, vol. 2870, Springer,
2003, pp. 17–29.
[55] I. Horrocks, P.F. Patel-Schneider, A proposal for an OWL rules language, in: Proceedings WWW-2004, ACM Press, 2004, pp. 723–731.
[56] I. Horrocks, P.F. Patel-Schneider, S. Bechhofer, D. Tsarkov, OWL rules: A proposal and prototype implementation, J. Web Sem. 3 (1) (2005) 23–40.
[57] I. Horrocks, P.F. Patel-Schneider, H. Boley, S. Tabet, B. Grosof, M. Dean, SWRL: A Semantic Web rule language combining OWL and RuleML, May 2004,
W3C Member Submission. Available at http://www.w3.org/Submission/SWRL/.
[58] I. Horrocks, P.F. Patel-Schneider, F. van Harmelen, From SHIQ and RDF to OWL: The making of a Web ontology language, J. Web Sem. 1 (1) (2003)
7–26.
[59] I. Horrocks, U. Sattler, S. Tobies, Practical reasoning for expressive description logics, in: Proceedings LPAR-1999, in: LNCS/LNAI, vol. 1705, Springer,
1999, pp. 161–180.
[60] J.F. Horty, Some direct theories of nonmonotonic inheritance, in: D.M. Gabbay, C.J. Hogger, J.A. Robinson (Eds.), Handbook of Logic in Artificial
Intelligence and Logic Programming, vol. III: Non-monotonic Reasoning and Uncertain Reasoning, Clarendon Press, Oxford, 1994, pp. 111–187.
[61] U. Hustadt, B. Motik, U. Sattler, Reducing SHIQ-description logic to disjunctive datalog programs, in: Proceedings KR-2004, AAAI Press, 2004, pp. 152–
162.
[62] B. Jenner, J. Toran, Computing functions with parallel queries to NP, Theor. Comput. Sci. 141 (1995) 175–193.
[63] D.S. Johnson, A catalog of complexity classes, in: J. vanLeeuwen (Ed.), Handbook of Theoretical Computer Science, vol. A, MIT Press, Cambridge, MA,
1990, pp. 67–161 (Chapter 2).
[64] M. Lenzerini, Data integration: A theoretical perspective, in: Proceedings PODS-2002, ACM Press, 2002, pp. 233–246.
[65] N. Leone, G. Pfeifer, W. Faber, T. Eiter, G. Gottlob, S. Perri, F. Scarcello, The DLV system for knowledge representation and reasoning, ACM Trans.
Comput. Log. 7 (3) (2006) 499–562.
[66] A.Y. Levy, M.-C. Rousset, Combining Horn rules and description logics in CARIN, Artificial Intelligence 104 (1–2) (1998) 165–209.
[67] V. Lifschitz, Computing circumscription, in: Proceedings IJCAI-1985, Morgan Kaufmann, 1985, pp. 121–127.
[68] V. Lifschitz, Non-monotonic databases and epistemic queries, in: Proceedings IJCAI-91, Morgan Kaufmann, 1991, pp. 381–386.
[69] V. Lifschitz, H. Turner, Splitting a logic program, in: Proceedings ICLP-1994, MIT Press, 1994, pp. 23–38.
[70] T. Lukasiewicz, Probabilistic description logic programs, in: Proceedings ECSQARU-2005, in: LNCS/LNAI, vol. 3571, Springer, 2005, pp. 737–749. Ex-
tended version in Int. J. Approx. Reasoning 45 (2) (2007) 288–307.
[71] T. Lukasiewicz, Fuzzy description logic programs under the answer set semantics for the Semantic Web, in: Proceedings RuleML-2006, IEEE Computer
Society, 2006, pp. 89–96. Extended version in Fundamenta Informaticae 82 (3) (2008) 289–310.
[72] T. Lukasiewicz, A novel combination of answer set programming with description logics for the Semantic Web, in: Proceedings ESWC-2007, in: LNCS,
vol. 4519, Springer, 2007, pp. 384–398.
[73] T. Lukasiewicz, Tractable probabilistic description logic programs, in: Proceedings SUM-2007, in: LNCS, vol. 4772, Springer, 2007, pp. 143–156.
[74] W. Łukaszewicz, Non-Monotonic Reasoning: Formalizations of Commonsense Reasoning, Ellis Horwood, 1990.
[75] B. Motik, I. Horrocks, R. Rosati, U. Sattler, Can OWL and logic programming live together happily ever after? in: Proceedings ISWC-2006, in: LNCS,
vol. 4273, Springer, 2006, pp. 501–514.
[76] B. Motik, R. Rosati, A faithful integration of description logics with logic programming, in: Proceedings IJCAI-2007, AAAI Press/IJCAI, 2007, pp. 477–
482.
[77] B. Motik, R. Rosati, A faithful integration of description logics with logic programming, in: Proceedings IJCAI-2007, pp. 477–482.
[78] B. Motik, U. Sattler, A comparison of reasoning techniques for querying large description logic ABoxes, in: Proceedings LPAR-2006, in: LNCS/LNAI,
Springer, 2006.
[79] B. Motik, U. Sattler, R. Studer, Query answering for OWL-DL with rules, in: Proceedings ISWC-2004, in: LNCS, vol. 3298, Springer, 2004, pp. 549–563.
[80] B. Motik, U. Sattler, R. Studer, Query answering for OWL-DL with rules, J. Web Sem. 3 (1) (2005) 41–60.
[81] I. Niemelä, P. Simons, T. Syrjänen, Smodels: A system for answer set programming, in: Proceedings NMR-2000, 2000.
[82] M. Ortiz de la Fuente, D. Calvanese, T. Eiter, E. Franconi, Characterizing data complexity for conjunctive query answering in expressive description
logics, in: Proceedings AAAI-2006, AAAI Press, 2006.
[83] J.Z. Pan, E. Franconi, S. Tessaris, G. Stamou, V. Tzouvaras, L. Serafini, I. Horrocks, B. Glimm, Specification of coordination of rule and ontology languages.
Project Deliverable D2.5.1, KnowledgeWeb NoE, June 2004.
[84] C.H. Papadimitriou, Computational Complexity, Addison-Wesley, 1994.
[85] A. Polleres, C. Feier, A. Harth, Rules with contextually scoped negation, in: Proceedings ESWC-2006, in: LNCS, vol. 4011, Springer, 2006, pp. 332–347.
[86] D. Poole, A logical framework for default reasoning, Artificial Intelligence 36 (1) (1988) 27–47.
[87] I. Pratt-Hartmann, Complexity of the two-variable fragment with counting quantifiers, J. Logic Language Inform. 14 (3) (2005) 369–395.
[88] R. Reiter, On closed world data bases, in: H. Gallaire, J. Minker (Eds.), Logic and Data Bases, Plenum Press, New York, 1978, pp. 55–76.
[89] R. Reiter, A logic for default reasoning, Artificial Intelligence 13 (1980) 81–132.
[90] R. Rosati, Towards expressive KR systems integrating datalog and description logics: Preliminary report, in: Proceedings DL-1999, 1999, pp. 160–164.
[91] R. Rosati, On the decidability and complexity of integrating ontologies and rules, J. Web Sem. 3 (1) (2005) 61–73.
[92] R. Rosati, Semantic and computational advantages of the safe integration of ontologies and rules, in: Proceedings PPSWR-2005, in: LNCS, vol. 3703,
Springer, 2005, pp. 50–64.
[93] R. Rosati, Integrating ontologies and rules: Semantic and computational issues, in: P. Barahona, F. Bry, E. Franconi, N. Henze, U. Sattler (Eds.), Reasoning
Web, in: LNCS, vol. 4126, Springer, 2006, pp. 128–151.
[94] R. Rosati, DL + log: Tight integration of description logics and disjunctive datalog, in: Proceedings KR-2006, AAAI Press, 2006, pp. 68–78.
[95] R. Schindlauer, Answer-set programming for the Semantic Web, PhD thesis, Vienna University of Technology, Austria, 2006. Available at
http://www.kr.tuwien.ac.at/staff/roman/papers/thesis.pdf.
[96] M. Sintek, S. Decker, TRIPLE—A query, inference, and transformation language for the Semantic Web, in: Proceedings ISWC-2002, in: LNCS, vol. 2342,
Springer, 2002, pp. 364–378.
[97] T. Swift, Deduction in ontologies via ASP, in: Proceedings LPNMR-2004, in: LNCS/LNAI, vol. 2923, Springer, 2004, pp. 275–288.
[98] S. Tobies, Complexity results and practical algorithms for logics in knowledge representation, PhD thesis, RWTH Aachen, Germany, 2001.
[99] K. Van Belleghem, M. Denecker, D. De Schreye, A strong correspondence between description logics and open logic programming, in: Proceedings
ICLP-1997, MIT Press, 1997, pp. 346–360.
[100] A. van Gelder, K.A. Ross, J.S. Schlipf, The well-founded semantics for general logic programs, Journal of the ACM 38 (3) (1991) 620–650.
[101] W3C, OWL Web ontology language overview, 2004. Available at http://www.w3.org/TR/2004/REC-owl-features-20040210/.
[102] W3C, OWL 1.1 Web ontology language overview, 2006. Available at http://www.w3.org/Submission/owl11-overview/.
T. Eiter et al. / Artificial Intelligence 172 (2008) 1495–1539 1539
[103] K. Wang, G. Antoniou, R.W. Topor, A. Sattar, Merging and aligning ontologies in dl-programs, in: Proceedings RuleML-2005, in: LNCS, vol. 3791,
Springer, 2005, pp. 160–171.
[104] K. Wang, D. Billington, J. Blee, G. Antoniou, Combining description logic and defeasible logic for the Semantic Web, in: Proceedings RuleML-2004, in:
LNCS, vol. 3323, Springer, 2004, pp. 170–181.
[105] S. Woltran, Answer set programming: Model applications and proofs-of-concept, Technical Report WP5, Working Group on Answer Set Programming
(WASP, IST-FET-2001-37004), July 2005. Available at http://www.kr.tuwien.ac.at/projects/WASP/report.html.
[106] F. Yang, X. Chen, Z. Wang, p-dl-programs: Combining dl-programs with preference for Semantic Web. Unpublished manuscript, Aug. 2006.