28
arXiv:cs/0105036v2 [cs.LO] 28 Jun 2001 Under consideration for publication in Theory and Practice of Logic Programming 1 Disjunctive Logic Programs with Inheritance FRANCESCO BUCCAFURRI DIMET – Universit` a di Reggio Calabria 89100, Reggio Calabria, Italia (e-mail: [email protected]) WOLFGANG FABER Institut f¨ ur Informationssysteme, Technische Universit¨ at Wien, 1040 Vienna, Austria (e-mail: [email protected]) NICOLA LEONE Dipartimento di Matematica, Universit` a degli Studi della Calabria, 87030 Rende (CS), Italia (e-mail: [email protected]) Abstract The paper proposes a new knowledge representation language, called DLP < , which extends disjunc- tive logic programming (with strong negation) by inheritance. The addition of inheritance enhances the knowledge modeling features of the language providing a natural representation of default rea- soning with exceptions. A declarative model-theoretic semantics of DLP < is provided, which is shown to generalize the An- swer Set Semantics of disjunctive logic programs. The knowledge modeling features of the language are illustrated by encoding classical nonmono- tonic problems in DLP < . The complexity of DLP < is analyzed, proving that inheritance does not cause any computational overhead, as reasoning in DLP < has exactly the same complexity as reasoning in disjunctive logic programming. This is confirmed by the existence of an efficient translation from DLP < to plain dis- junctive logic programming. Using this translation, an advanced KR system supporting the DLP < language has been implemented on top of the DLV system and has subsequently been integrated into DLV. 1 Introduction Disjunctive logic programs are logic programs where disjunction is allowed in the heads of the rules and negation as failure (NAF) may occur in the bodies of the rules. Such programs are now widely recognized as a valuable tool for knowledge representation and common- sense reasoning (Baral and Gelfond 1994, Lobo, Minker and Rajasekar 1992, Gelfond and Lifschitz 1991). One of the attractions of disjunctive logic programming is its ability to nat- urally model incomplete knowledge (Baral and Gelfond 1994, Lobo et al. 1992). The need to differentiate between atoms which are false because of the failure to prove them true (NAF, or CWA negation) and atoms the falsity of which is explicitly provable led to extend disjunctive logic programs by strong negation (Gelfond and Lifschitz 1991). Strong nega- tion, permitted also in the heads of rules, further enhances the knowledge modeling fea- tures of the language, and its usefulness is widely acknowledged in the literature (Alferes

arXiv:cs/0105036v2 [cs.LO] 28 Jun 2001 file2 F. Buccafurri, W. Faber and N. Leone and Pereira 1992, Baral and Gelfond 1994, Kowalski and Sadri 1990, Alferes, Pereira and Przymusinski

Embed Size (px)

Citation preview

arX

iv:c

s/01

0503

6v2

[cs.

LO]

28 J

un 2

001

Under consideration for publication in Theory and Practiceof Logic Programming 1

Disjunctive Logic Programs with Inheritance

FRANCESCO BUCCAFURRIDIMET – Universita di Reggio Calabria 89100, Reggio Calabria, Italia

(e-mail:[email protected])

WOLFGANG FABERInstitut fur Informationssysteme, Technische Universitat Wien, 1040 Vienna, Austria

(e-mail:[email protected])

NICOLA LEONEDipartimento di Matematica, Universita degli Studi dellaCalabria, 87030 Rende (CS), Italia

(e-mail:[email protected])

Abstract

The paper proposes a new knowledge representation language, calledDLP<, which extends disjunc-tive logic programming (with strong negation) by inheritance. The addition of inheritance enhancesthe knowledge modeling features of the language providing anatural representation of default rea-soning with exceptions.A declarative model-theoretic semantics ofDLP< is provided, which is shown to generalize the An-swer Set Semantics of disjunctive logic programs.The knowledge modeling features of the language are illustrated by encoding classical nonmono-tonic problems inDLP<.The complexity ofDLP< is analyzed, proving that inheritance does not cause any computationaloverhead, as reasoning inDLP< has exactly the same complexity as reasoning in disjunctivelogicprogramming. This is confirmed by the existence of an efficient translation fromDLP< to plain dis-junctive logic programming. Using this translation, an advanced KR system supporting theDLP<

language has been implemented on top of theDLV system and has subsequently been integrated intoDLV .

1 Introduction

Disjunctive logic programs are logic programs where disjunction is allowed in the heads ofthe rules and negation as failure (NAF) may occur in the bodies of the rules. Such programsare now widely recognized as a valuable tool for knowledge representation and common-sense reasoning (Baral and Gelfond 1994, Lobo, Minker and Rajasekar 1992, Gelfond andLifschitz 1991). One of the attractions of disjunctive logic programming is its ability to nat-urally model incomplete knowledge (Baral and Gelfond 1994,Lobo et al. 1992). The needto differentiate between atoms which are false because of the failure to prove them true(NAF, or CWA negation) and atoms the falsity of which is explicitly provable led to extenddisjunctive logic programs by strong negation (Gelfond andLifschitz 1991). Strong nega-tion, permitted also in the heads of rules, further enhancesthe knowledge modeling fea-tures of the language, and its usefulness is widely acknowledged in the literature (Alferes

2 F. Buccafurri, W. Faber and N. Leone

and Pereira 1992, Baral and Gelfond 1994, Kowalski and Sadri1990, Alferes, Pereira andPrzymusinski 1996, Sakama and Inoue 1996, Alferes, Pereiraand Przymusinski 1998b).However, it does not allow to represent default reasoning with exceptions in a direct andnatural way. Indeed, to render a default ruler defeasible, r must at least be equipped withan extra negative literal, which “blocks” inferences fromr for abnormal instances (Gel-fond and Son 1997). For instance, to encode the famous nonmonotonic reasoning (NMR)example stating that birdsnormally fly while penguins do not fly, one should write1 therule

fly(X)← bird(X), not ¬fly(X).

along with the fact

¬fly(penguin).

This paper proposes an extension of disjunctive logic programming by inheritance,calledDLP<. The addition of inheritance enhances the knowledge modeling features ofthe language. Possible conflicts are solved in favor of the rules which are “more specific”according to the inheritance hierarchy. This way, a direct and natural representation ofdefault reasoning with exceptions is achieved (e.g., defeasible rules do not need to beequipped with extra literals as above – see section 4).

The main contributions of the paper are the following:

• We formally define theDLP< language, providing a declarative model theoreticsemantics ofDLP<, which is shown to generalize the Answer Set Semantics of(Gelfond and Lifschitz 1991).• We illustrate the knowledge modeling features of the language by encoding classical

nonmonotonic problems inDLP<. Interestingly,DLP< also supplies a very naturalrepresentation of frame axioms.• We analyze the computational complexity of reasoning overDLP< programs. Im-

portantly, while inheritance enhances the knowledge modeling ability of disjunctivelogic programming, it does not cause any computational overhead, as reasoning inDLP< has exactly the same complexity as reasoning in disjunctivelogic program-ming.• We compareDLP< to related work proposed in the literature. In particular, we stress

the differences betweenDLP< and Disjunctive Ordered Logic (DOL) (Buccafurri,Leone and Rullo 1998, Buccafurri, Leone and Rullo 1999); we point out the re-lation to the Answer Set Semantics of (Gelfond and Lifschitz1991); we compareDLP< with prioritized disjunctive logic programs (Sakama and Inoue 1996); weanalyze its relationships to inheritance networks (Touretzky 1986) and we discussthe possible application ofDLP< to give a formal semantics to updates of logic pro-grams. (Alferes, Leite, Pereira, Przymusinska and Przymusinski 1998a, Marek andTruszczynski 1994, Leone, Palopoli and Romeo 1995).• We implement aDLP< system. To this end, we first design an efficient translation

from DLP< to plain disjunctive logic programming. Then, using this translation,we implement aDLP< evaluator on top of theDLV system (Eiter, Leone, Mateis,

1 not and¬ denote the weak negation symbol and the strong negation symbol, respectively.

Disjunctive Logic Programs with Inheritance 3

Pfeifer and Scarcello 1998). It is part ofDLV and can be freely retrieved from (Faber1999).

The sequel of the paper is organized as follows. The next two sections provide a for-mal definition ofDLP<; in particular, its syntax is given in Section 2 and its semanticsis defined in Section 3. Section 4 shows the use ofDLP< for knowledge representationand reasoning, providing a number of sampleDLP< encodings. Section 5 analyzes thecomputational complexity of the main reasoning tasks arising in the framework ofDLP<.Section 6 discusses related work. The main issues underlying the implementation of ourDLP< system are tackled in Section 7, and our conclusions are drawn in Section 8.

2 Syntax ofDLP<

This section provides a formal description of syntactic constructs of the language.Let the following disjoint sets be given: a setV of variables, a setΠ of predicates, a set

Λ of constants, and a finite partially ordered set of symbols(O, <), whereO is a set ofstrings, calledobject identifiers, and< is a strict partial order (i.e., the relation< is: (1)irreflexive –c 6< c ∀c ∈ O, and (2) transitive –a < b ∧ b < c⇒ a < c ∀a, b, c ∈ O).

A term is either a constant inΛ or a variable inV .2

An atom is a construct of the forma(t1, ..., tn), wherea is apredicate of arity n in Π

andt1, ..., tn are terms.A literal is either apositive literal p or anegative literal ¬ p, wherep is an atom (¬

is thestrong negation symbol). Two literals arecomplementary if they are of the formp and¬p, for some atomp.

Given a literalL, ¬.L denotes its complementary literal. Accordingly, given a set A ofliterals,¬.A denotes the set{¬.L | L ∈ A}.

A rule r is an expression of the forma1 ∨ · · · ∨ an ← b1, · · · , bk, not bk+1, · · · , not bm

⊗n ≥ 1, m ≥ 0

wherea1, · · · , an, b1, · · · , bm are literals,not is thenegation as failuresymbol and⊗

iseither (1) the symbol ’.’ or (2) the symbol ’!’. In case (1)r is adefeasible rule, in case (2)it is astrict rule.

The disjunctiona1∨· · ·∨an is theheadof r, while the conjunctionb1, . . . , bk, not bk+1,

. . . , not bm is thebodyof r. b1, ..., bk is called thepositive partof the body ofr andnot bk+1, ..., not bm is called theNAF (negation as failure) partof the body ofr. Weoften denote the sets of literals appearing in the head, in the positive, and in the NAF partof the body of a ruler byHead(r), Body+(r), andBody−(r), respectively.

If the body of a ruler is empty, thenr is calledfact. The symbol ’←’ is usually omittedfrom facts.

An objecto is a pair〈oid(o),Σ(o)〉, whereoid(o) is an object identifier inO andΣ(o)is a (possibly empty) set of rules.

A knowledge baseonO is a set of objects, one for each element ofO.Given a knowledge baseK and an object identifiero ∈ O, theDLP< program foro (onK) is the set of objectsP = {(o′,Σ(o′)) ∈ K | o = o′ or o < o′}.

2 Note that function symbols are not considered in this paper.

4 F. Buccafurri, W. Faber and N. Leone

The relation< induces a partial order onP in the obvious way, that is, givenoi =

(oid(oi),Σ(oi)) andoj = (oid(oj),Σ(oj)), oi < oj iff oid(oi) < oid(oj) (read ”oi ismore specific thanoj”).

A term, an atom, a literal, a rule, or program isgroundif no variable appears in it.Informally, a knowledge base can be viewed as a set ofobjectsembedding the definition

of their properties specified through disjunctive logic rules, organized in an IS-A (inheri-tance) hierarchy (induced by the relation<). A programP for an objecto on a knowledgebaseK consists of the portion ofK ”seen” fromo looking up in the IS-A hierarchy. Thanksto the inheritance mechanism,P incorporates the knowledge explicitly defined foro plusthe knowledge inherited from the higher objects.

If a knowledge base admits abottomelement (i.e., an object less than all the otherobjects, by the relation<), we usually refer to the knowledge base as “program”, sinceit is equal to the program for the bottom element.

Moreover, we represent thetransitive reductionof the relation< on the objects.3 Anobjecto is denoted asoid(o) : o1, . . . , on Σ(o)4 , where(oid(o), o1), . . ., (oid(o), on) areexactly those pairs of the transitive reduction of<, in which the first object identifier isoid(o). o is referred to assub-objectof o1, . . . , on.

Example 1Consider the following programP :

o1 { a ∨ ¬b← c, not d. e← b! }

o2 : o1 { b. ¬a ∨ c. c← b. }

P consists of two objectso1 ando2. o2 is a sub-object ofo1. According to the conventionillustrated above, the knowledge base on whichP is defined coincides withP , and theobject for whichP is defined iso2 (the bottom object).

3 Semantics ofDLP<

In this section we assume that a knowledge baseK is given and an objecto has beenfixed. LetP be theDLP< program foro onK. TheUniverseUP of P is the set of allconstants appearing in the rules. TheBaseBP of P is the set of all possible ground literalsconstructible from the predicates appearing in the rules ofP and the constants occurringin UP . Note that, unlike in traditional logic programming the Base of aDLP< programcontains both positive and negative literals. Given a ruler occurring inP , aground instanceof r is a rule obtained fromr by replacing every variableX in r by σ(r), whereσ is amapping from the variables occurring inr to the constants inUP . We denote byground(P)the (finite) multiset of all instances of the rules occurringin P . The reason whyground(P)is a multiset is that a rule may appear in several different objects ofP , and we requirethe respective ground instances be distinct. Hence, we can define a functionobj of fromground instances of rules inground(P) onto the setO of the object identifiers, associatingwith a ground instancer of r the (unique) object ofr.

3 (a, b) is in the transitive reduction of< iff a < b and there is noc such thata < c andc < b.4 The setΣ(o) is denoted without commas as separators.

Disjunctive Logic Programs with Inheritance 5

A subset of ground literals inBP is said to beconsistentif it does not contain a pair ofcomplementary literals. AninterpretationI is a consistent subset ofBP . Given an inter-pretationI ⊆ BP , a ground literal (either positive or negative)L is true w.r.t. I if L ∈ I

holds.L is falsew.r.t. I otherwise.Given a ruler ∈ ground(P), the head ofr is true in I if at least one literal of the head

is true w.r.tI. The body ofr is true in I if: (1) every literal inBody+(r) is true w.r.t.I,and (2) every literal inBody−(r) is false w.r.t.I. A ruler is satisfiedin I if either the headof r is true inI or the body ofr is not true inI.

Next we introduce the concept of amodelfor a DLP<-program. Different from tradi-tional logic programming, the notion of satisfiability of rules is not sufficient for this goal,as it does not take into account the presence of explicit contradictions. Hence, we firstpresent some preliminary definitions.

Given two ground rulesr1 andr2 we say thatr1 threatensr2 ona literalL if (1) ¬.L ∈Head(r1) andL ∈ Head(r2), (2) obj of(r1) < obj of(r2) and (3)r2 is defeasible,

Definition 1Given an interpretationI and two ground rulesr1 andr2 such thatr1 threatensr2 onL

we say thatr1 overridesr2 onL in I if: (1) ¬.L ∈ I, and (2) the body ofr2 is true inI.A (defeasible) ruler ∈ ground(P) is overridden inI if for eachL ∈ Head(r) there

existsr1 ∈ ground(P) such thatr1 overridesr onL in I.

Intuitively, the notion of overriding allows us to solve conflicts arising between ruleswith complementary heads. For instance, suppose that botha and¬a are derivable inIfrom rulesr andr′, respectively. Ifr is more specific thanr′ in the inheritance hierarchyandr′ is not strict, thenr′ is overridden, meaning thata should be preferred to¬a becauseit is derivable from a more trustable rule.

Observe that, by definition of overriding, strict rules cannot be overridden, since theyare never threatened.

Example 2Consider the programP of Example 1. LetI = {¬a, b, c, e} be an interpretation. Rule¬a ∨ c← . in the objecto2 overrides rulea ∨ ¬b← c, not d. in o1 on the literala in I.Moreover, ruleb← . in o2 overrides rulea ∨ ¬b← c, not d. in o1 on the literal¬b in I.Thus, the rulea ∨ ¬b← c, not d. in o1 is overridden inI.

Example 3Consider the following programP :

o1 { ¬a! ¬b. }

o2 : o1 { a← not b. b← not a. }

Consider now the interpretationsM1 = {a,¬b} andM2 = {b,¬a}. While the rule¬b. isoverridden inM2, the rule¬a! cannot be overridden since it is a strict rule. Due to over-riding, strict rules and defeasible rules are quite different from the semantic point of view.In our example, the overriding mechanism allows us to invalidate the defeasible rule¬b.in favor of the more trustable oneb← not a. (w.r.t. the interpretationM2). In words, thedefeasible rule is invalidated inM2 because of a more specific contradictory rule and no in-consistency is generated. In other words, it is possible to find an interpretation containing

6 F. Buccafurri, W. Faber and N. Leone

the literalb (i.e., stating an exception for the rule¬b.) such that all the rules ofP are eithersatisfied or overridden (i.e., invalidated) in it. Such an interpretation is justM2. This cannothappen for the strict rule¬a!. Indeed, no interpretation containing the literala (i.e., statingan exception for the strict rule) can be found which satisfiesall non-overridden rules ofP .

In the example above we have implicitly used the notion ofmodelfor a programP thatwe next formally provide. A model for a program is an interpretation satisfying all its nonoverridden rules.

Definition 2

LetI be an interpretation forP . I is amodel forP if every rule inground(P) is satisfiedor overridden inI. I is aminimal model forP if no (proper) subset ofI is a model forP .

Note that strict rules must be satisfied in every model, sincethey cannot be overridden.

Example 4It is easy to see thatM1 = {a,¬b} is not a model for the programP of Example 3 since therule¬a! is neither overridden nor satisfied. On the contrary,M2 = {b,¬a} is a model forP , since¬b. is overridden by the ruleb← not a. The latter rule is satisfied sinceb ∈ M2.The rule¬a! is satisfied as¬a ∈ M2 and the rulea← not b. is satisfied since both bodyand head are false w.r.t.M2.

Next we define the transformationGI based on which our semantics is defined. Thistransformation applied to a programP w.r.t. an interpretationI output a set of rulesGI(P)

with no negation by failure in the body. Intuitively, such rules are those remaining fromground(P) by (1) eliminating the rules overridden in the interpretationI, (2) deleting ruleswhose NAF part is not ”true” inI (i.e., some literal negated by negation as failure occursin I) and (3) deleting the NAF part of all the remainder rules. Since the transformationencodes the overriding mechanism, the distinction betweenstrict rules and defeasible rulesin GI(P) is meaningless (indeed, there is no difference between strict and defeasible rulesexcept for the overriding mechanism where the upper rule is required to be defeasible). Forthis reason the syntax of rules inGI(P) can be simplified by dropping the symbol. fromdefeasible rules and the symbol! from strict rules.

Definition 3Given an interpretationI for P , thereduction ofP w.r.t. I, denoted byGI(P), is the set ofrules obtained fromground(P) by (1) removing every rule overridden inI, (2) removingevery ruler such thatBody−(r) ∩ I 6= ∅, (3) removing the NAF part from the bodies ofthe remaining rules.

Example 5Consider the programP of Example 1. LetI be the interpretation{¬a, b, c, e}. As shownin Example 2, rulea ∨ ¬b← c, not d. is overridden inI. Thus,GI(P) is the set of rules{¬a ∨ c. e← b. b. c← b. }. Consider now the interpretationM = {a, b, c, e}. Itis easy to see thatGM (P) = {a ∨ ¬b← c. ¬a ∨ c. e← b. b. c← b.}.

Disjunctive Logic Programs with Inheritance 7

We observe that the reduction of a program is simply a set of ground rules. Given a setSof ground rules, we denote bypos(S) the positive disjunctive program (called thepositiveversion ofS), obtained fromS by considering each negative literal¬p(X) as a positiveone with predicate symbol¬p.

Definition 4LetM be a model forP . We say thatM is a (DLP<-)answer setfor P if M is a minimalmodel of the positive versionpos(GM (P)) ofGM (P).

Note that interpretations must be consistent by definition,so consideringpos(GM (P))

instead ofGM (P) does not lose information in this respect.Note that the notion of minimal model of Definition 2 cannot beused in Definition 4, as

GM is a set of rules and not aDLP< program.

Example 6Consider the programP of Example 1:

It is easy to see that the interpretationI of Example 5 is not an answer set forP . Indeed,althoughI is a model forpos(GI(P)) it is not minimal, since the interpretation{b, c, e} isa model forpos(GI(P)), too. Note that the interpretationI′ = {b, c, e} is not an answerset forP . Indeed,GI′(P) = { a ∨ ¬b← c. ¬a ∨ c. e← b. b. c← b. } andI′

is not a model forpos(GI′(P)), since the rulea ∨ ¬b← c. is not satisfied inI′.On the other hand, the interpretationM of Example 5 is an answer set forP , sinceM is

a minimal model forpos(GM (P)). Moreover, it can be easily realized thatM is the onlyanswer set forP .

Finally, the programP of Example 3 admits one consistent answer setM2 = {b,¬a}.Note that if we replace the strict rule¬a! by a defeasible rule¬a., P admits two answersets, namelyM1 = {a,¬b} andM2 = {b,¬a}. Asserting¬a by a strict rule, prunes theanswer setM1 stating the exception (truth of the literala) to this rule.

It is worthwhile noting that if a ruler is not satisfied in a modelM, thenall literals in thehead ofr must be overridden inM.

LetP1 be the program

o3 { a ∨ b. ← b. }

o2 : o3 { ¬a. }

andP2

o1 { a. ← b. }

o2 : o1 { ¬a. }

Then,{¬a} is not a model for programP1, because the head literalb in the head ofa ∨ b. is not overridden inM. If we dropb from rulea ∨ b., then{¬a} is a model of theresulting programP2.

Observe also that two programs having the same answer sets, as o1 ando3 (both havethe single answer set{¬a}), may get different answer sets even if we add the same objectto both of them. Indeed, programP1 has no answer set, while programP2 has the answerset{¬a}.

This is not surprising, as a similar phenomenon also arises in normal logic programming

8 F. Buccafurri, W. Faber and N. Leone

whereP1 = {a.} andP2 = {a← notb.} have the same answer set{a}, while P1 ∪ {b.}

andP2 ∪ {b.} have different answer sets ({a, b} and{b}, respectively).Finally we show that each answer set of a programP is also a minimal model ofP :

Proposition 1If M is an answer set forP , thenM is a minimal model ofP .

ProofBy contradiction supposeM ′ is a model forP such thatM ′ ⊂M .

First we show thatM ′ is a model forpos(GM (P)) too, i.e., every rule inpos(GM (P))

is satisfied inM ′. Recall thatpos(GM (P)) is the positive version of the program obtainedby applying the transformationGM to the programground(P). Consider a generic rulerof ground(P). SinceM ′ is a model forP either (i)r is overridden inM ′ or (ii) is satisfiedin M ′.

In case (i), sinceM ′ ⊂ M , from Definition 1 immediately follows thatr is overriddenin M too. Thus,r does not occur inGM (P) since the transformationGM removes all rulesoverridden inM .

In case (ii) (i.e.,r is satisfied inM ′), if r is such thatB(r) ∩M 6= ∅, then the rule isremoved byGM . Otherwise,r is transformed byGM into a ruler′ obtained fromr bydropping the NAF part from the body. Sincer is satisfied inM ′, alsor′ is satisfied inM ′.As a consequence, all the rules ofpos(GM (P)) are satisfied inM ′, that isM ′ ⊂ M is amodel forpos(GM (P)). Thus, by Definition 4,M is not an answer set forP since it is nota minimal model ofpos(GM (P)). The proof is hence concluded.

4 Knowledge Representation withDLP<

In this section, we present a number of examples which illustrate how knowledge can berepresented usingDLP<. To start, we show theDLP< encoding of a classical example ofnonmonotonic reasoning.

Example 7Consider the following programP with O(P) consisting of three objectsbird, penguinandtweety, such thatpenguin is a sub-object ofbird andtweety is a sub-object ofpenguin:

bird { flies. }

penguin : bird { ¬flies! }

tweety : penguin { }

Unlike in traditional logic programming, our language supports two types of negation, thatis strong negationandnegation as failure. Strong negation is useful to express negativepieces of information under the complete information assumption. Hence, a negative fact(by strong negation) is true only if it is explicitly derivedfrom the rules of the program.As a consequence, the head of rules may contain also such negative literals and rules canbe conflicting on some literals. According to the inheritance principles, the ordering rela-tionship between objects can help us to assign different levels of reliability to the rules,

Disjunctive Logic Programs with Inheritance 9

allowing us to solve possible conflicts. For instance, in ourexample, the contradicting con-clusiontweety both flies and does not flyseems to be entailed from the program (astweety

is apenguin andpenguins arebirds, bothflies and¬flies can be derived from therules of the program). However, this is not the case. Indeed,the ”lower” rule¬flies.specified in the objectpenguin is considered as a sort of refinement to the first generalrule, and thus the meaning of the program is rather clear:tweety does not fly, as tweety is apenguin. That is,¬flies. is preferred to the default ruleflies. as the hierarchy explicitlystates the specificity of the former. Intuitively, there is no doubt thatM = {¬flies} is theonly reasonable conclusion.

The next example, from the field of database authorizations,combines the use of both weakand strong negation.

Example 8Consider the following knowledge base representing a set ofsecurity specification about asimplepart-ofhierarchy of objects.

o1

{

authorize(bob)← not authorize(ann). (1)

authorize(ann)∨ authorize(tom)← not ¬authorize(alice). (2)

authorize(amy)! (3)

}

o2 : o1

{

¬authorize(alice)! (4)

}

o3 : o1

{

¬authorize(bob)! (5)

}

Objecto2 is part-of the objecto1 as well aso3 is part-ofo1. Access authorizations toobjects are specified by rules with head predicateauthorize and subjects to which autho-rizations are granted appear as arguments. Strong negationis utilized to encode negativeauthorizations that represent explicit denials. Negationas failure is used to specify the ab-sence of authorization (either positive or negative). Inheritance implements the automaticpropagation of authorizations from an object to all its sub-objects. The overriding mech-anism allows us to represent exceptions: for instance, if anobject o inherits a positiveauthorization but a denial for the same subject is specified in o, then the negative autho-rization prevails on the positive one. Possible loss of control due to overriding mechanismcan be avoided by using strict rules: strict authorizationscannot be overridden.

Consider the programPo2 = {(o1, {(1), (2), (3)}), (o2, {(4)})} for the objecto2 on theabove knowledge base. This program defines the access control for the objecto2. Thanks

10 F. Buccafurri, W. Faber and N. Leone

to the inheritance mechanism, authorizations specified forthe objecto1, to whicho2 be-longs, are propagated also too2. It consists of rules (1), (2) and (3) (inherited fromo1)and (4). Rule (1) states thatbob is authorized to access objecto2 provided that no autho-rization for ann to accesso2 exists. Rule (2) authorizes eitherann or tom to accesso2provided that no denial foralice to accesso2 is derived. The strict rule (3) grants toamythe authorization to access objecto1. Such authorization can be considered ”strong”, sinceno exceptions can be stated to it without producing inconsistency. As a consequence, allthe answer sets of the program contain the authorization foramy. Finally, rule (4) definesa denial foralice to access objecto2. Due to the absence of the authorization forann,the authorization tobob of accessing the objecto2 is derived (by rule (1)). Further, theexplicit denial to access the objecto2 for alice (rule (4)) allows to derive neither autho-rization forann nor for tom (by rule (2)). Hence, the only answer set of this program is{authorize(bob),¬authorize(alice), authorize(amy)}.

Consider now the programPo3 = {(o1, {(1), (2)}), (o3, {(5)})} for the objecto3.Rule (5) defines a denial forbob to access objecto3. The authorization forbob (de-fined by rule (1)) is no longer derived. Indeed, even if rule (1) allows to derive such anauthorization due to the absence of authorizations forann, it is overridden by the ex-plicit denial (rule (5)) defined in the objecto3 (i.e., at a more specific level). The bodyof rule (2) inherited fromo1 is true for this program since no denial for alice can be de-rived, and it entails a mutual exclusive access to objecto3 for ann andtom (note thatno other head containsauthorize(ann) or authorize(bob)). The programPo3 admitstwo answer sets, namely{authorize(ann), ¬authorize(bob), authorize(amy)} and{authorize(tom), ¬authorize(bob), authorize(amy)} representing two alternativeauthorization sets to grant the access to the objecto3.

Solving the Frame Problem

The frame problem has first been addressed by McCarthy and Hayes (McCarthy and Hayes1969), and in the meantime a lot of research has been conducted to overcome it (see e.g.(Shanahan 1997) for a survey).

In short, the frame problem arises in planning, when actionsand fluents are specified:An action affects some of the fluents, but all unrelated fluents should remain as they are.In most formulations using classical logic, one must specify for every pair of actions andunrelated fluents that the fluent remains unchanged. Clearlythis is an undesirable overhead,since withn actions andm fluents,n×m clauses would be needed.

Instead, it would be nice to be able to specify for each fluent that it “normally remainsvalid” and that only actions which explicitly entail the contrary can change them.

Indeed, this goal can be achieved in a very elegant way usingDLP<: One object containsthe rules which specifyinertia (the fact that fluents normally do not change). Anotherobject inherits from it and specifies the actions and the effects of actions — in this waya very natural, straightforward and effective representation is achieved, which avoids theframe problem.

Example 9As an example we show how the famous Yale Shooting Problem, which is due to Hanksand McDermott (Hanks and McDermott 1987), can be represented and solved withDLP<:

Disjunctive Logic Programs with Inheritance 11

The scenario involves an individual (or in a less violent version a turkey), who can beshot with a gun. There are two fluents,alive andloaded, which intuitively mean that theindividual is alive and that the gun is loaded, respectively. There are three actions,load,wait andshoot. Loading has the effect that the gun is loaded afterwards, shooting withthe loaded gun has the effect that the individual is no longeralive afterwards (and also thatthe gun is unloaded, but this not really important), and waiting has no effects.

The problem involvestemporal projection: It is known that initially the individual isalive, and that first the gun is loaded, and after waiting, thegun is shot with. The questionis: Which fluents hold after these actions and between them?

In our encoding, theinertia object contains the defaults for the fluents, thedomain ob-ject additionally specifies the effects of actions, while theyale object encodes the probleminstance.

For the time framework we use theDLV bounded integer built-ins: The upper boundn

of positive integers is specified by either adding the fact#maxint = n. to the programor by passing the option−N = n on the commandline (this overrides any#maxint = n.

statement). It is then possible to use the built-in constant#maxint, which evaluates to thespecified upper bound, and several built-in predicates, of which in this paper we just use#succ(N, N1) , which holds ifN1 is the successor ofN andN1 ≤ #maxint. For additionalDLV built-in predicates, consult theDLV homepage (Faber and Pfeifer since 1996).

inertia

{

alive(T1)← alive(T),#succ(T, T1). (6)

¬alive(T1)← ¬alive(T),#succ(T, T1). (7)

loaded(T1)← loaded(T),#succ(T, T1). (8)

¬loaded(T1)← ¬loaded(T),#succ(T, T1). (9)

}

domain : inertia

{ (10)

loaded(T1)← load(T),#succ(T, T1)! (11)

¬loaded(T1)← shoot(T), loaded(T),#succ(T, T1)! (12)

¬alive(T1)← shoot(T), loaded(T),#succ(T, T1)! (13)

}

yale : domain

{ (14)

load(0)! wait(1)! shoot(2)! alive(0)! (15)

}

The only answer set for this program (and#maxint = 3) contains, besides the facts oftheyale object,loaded(1), loaded(2), alive(0),alive(1), alive(2)and¬loaded(3),

12 F. Buccafurri, W. Faber and N. Leone

¬alive(3). That is, the individual is alive until the shoot action is taken, and no longeralive afterwards, and the gun is loaded between loading and shooting.

We want to point out that this formalism is equally suited forsolving problems whichinvolve finding a plan (i.e. a sequence of actions) rather than doing temporal projection(determining the effects of a given plan) as in the Yale Shooting Problem: You have to adda ruleaction(T)∨ ¬action(T)← #succ(T, T1). for every action, and you have to spec-ify the goal state by a query, e.g.¬alive(3),¬loaded(3)?A query is aDLV language fea-ture which (for this example) is equivalent to the rulesh← ¬alive(3),¬loaded(3). andi← not h, not i., meaning that only answer sets containing¬alive(3) and¬loaded(3)should be considered.

Below you find a classical plan-finding example: The blocksworld domain and the Suss-man anomaly as a concrete problem.

Example 10In (Erdem 1999), several planning problems, including the blocksworld problems, are en-coded using disjunctive datalog.

In general, planning problems can be effectively specified using action languages (e.g.(Gelfond and Lifschitz 1993, Dung 1993, Giunchiglia and Lifschitz 1998, Lifschitz 1999)).Then, a translation from these languages to another language (in our caseDLP<) is ap-plied.

We omit the step of describing an action language and the associated translation, anddirectly show the encoding of an example planning domain in disjunctive datalog. Thisencoding is rather different from the one presented in (Erdem 1999).

The objects in the blocksworld are onetable and an arbitrary number of labeled cubicblocks. Together, they are referred to aslocations.

The state of the blocksworld at a particular time can be fullyspecified by the fluenton(B, L, T), which specifies that blockB resides on locationL at timeT.

So, first we state in the objectbw inertia that the fluenton is inertial.

bw inertia

{

on(B, L, T1)← on(B, L, T),#succ(T, T1). (16)

}

We continue to define the blocksworld domain in the objectbw domain, which inheritsfrom the inertia object:

bw domain : bw inertia

{

move(B, L, T)∨ ¬move(B, L, T)← block(B), loc(L),#succ(T, T1)! (17)

on(B, L, T1)← move(B, L, T),#succ(T, T1)! (18)

¬on(B, L, T1)← move(B, L1, T), on(B, L, T),#succ(T, T1)! (19)

← move(B, L, T), on(B1, B, T). (20)

← move(B, B1, T), on(B2, B1, T), block(B1). (21)

Disjunctive Logic Programs with Inheritance 13

initial:

bca

cba

goal:

Figure 1. The Sussman Anomaly

← move(B, B, T). (22)

← move(B, L, T), move(B1, L1, T), B<> B1. (23)

← move(B, L, T), move(B1, L1, T), L<> L1. (24)

loc(table)! (25)

loc(B)← block(B)! (26)

}

There is one action, which is moving a block from one locationto another location. Amove is started at one point in time, and it is completed before the next time. Rule (17)expresses that at any timeT, the action of moving a blockB to locationL may be initiated(move(B, L, T)) or not (¬move(B, L, T)).

Rules (18) and (19) specify the effects of the move action: The moved block is at thetarget location at the next time, and no longer on the source location.

(20) – (24) are constraints, and their semantics is that in any answer set the conjunctionof their literals must not be true.5 Their respective meanings are: (20): A moved block mustbe clear. (21): The target of a move must be clear if it is a block (the table may hold anarbitrary number of blocks). (22) A block may not be on itself. (23) and (24): No two moveactions may be performed at the same time.

The timesteps are again represented byDLV ’s integer built-in predicates and constants.What is left is the concrete problem instance, in our case theso-called Sussman Anomaly

(see Figure 1):

sussman : bw domain

{

block(a)! block(b)! block(c)! (27)

on(b, table, 0)! on(c, a, 0)! on(a, table, 0)! (28)

}

on(c, b,#maxint), on(b, a,#maxint), on(a, table,#maxint)? (29)

Since different problem instances may involve different numbers of blocks, the blocksare defined as facts (27) together with the problem instance.6

We give the initial situation by facts (28), while the goal situation is specified by query

5 We use constraints for clarity, but they can be eliminated byrewriting← B. to p← B, not p., wherep is anew symbol which does not appear anywhere else in the program.

6 Note that usually the instance will be separated from the domain definition.

14 F. Buccafurri, W. Faber and N. Leone

(29). This query enforces that only those answer sets are computed, in which the conjunc-tion of the query literals is true.

5 Computational Complexity

As for the classical nonmonotonic formalisms (Marek and Truszczynski 1991, Marek andTruszczynski 1990, Reiter 1980), two important decision problems, corresponding to twodifferent reasoning tasks, arise inDLP<:(Brave Reasoning)Given aDLP< programP and a ground literalL, decide whether thereexists an answer setM for P such thatL is true w.r.t.M .(Cautious Reasoning)Given aDLP< programP and a ground literalL, decide whetherLis true in all answer sets forP .

We next prove that the complexity of reasoning inDLP< is exactly the same as in tra-ditional disjunctive logic programming. That is, inheritance comes for free, as the additionof inheritance does not cause any computational overhead. We consider the propositionalcase, i.e., we consider groundDLP< programs.

Lemma 1Given a groundDLP< programP and an interpretationM for P , deciding whetherM isan answer set forP is in coNP.

ProofWe check inNP thatM is not an answer set ofP as follows. Guess a subsetI of M , andverify that: (1)M is not a model forpos(GM (P)), or (2) I is a model forpos(GM (P))

andI ⊂M . The construction ofpos(GM (P)) (see Definition 3) is feasible in polynomialtime, and the tasks (1) and (2) are clearly tractable. Thus, deciding whetherM is not ananswer set forP is in NP, and, consequently, deciding whetherM is an answer set forPis in coNP.

Theorem 1Brave Reasoning onDLP< programs isΣP

2 -complete.

ProofGiven a groundDLP< programP and a ground literalL, we verify thatL is a braveconsequence ofP as follows. Guess a setM ⊆ BP of ground literals, check that (1)M isan answer set forP , and (2)L is true w.r.t.M . Task (2) is clearly polynomial; while (1) isin coNP, by virtue of Lemma 1. The problem therefore lies inΣP

2 .ΣP

2 -hardness follows from Theorem 3 and the results in (Eiter and Gottlob 1995, Eiter,Gottlob and Mannila 1997b).

Theorem 2Cautious Reasoning onDLP< programs isΠP

2 -complete.

ProofGiven a groundDLP< programP and a ground literalL, we verify thatL is not a cautiousconsequence ofP as follows. Guess a setM ⊆ BP of ground literals, check that (1)M isan answer set forP , and (2)L is not true w.r.t.M . Task (2) is clearly polynomial; while

Disjunctive Logic Programs with Inheritance 15

(1) is in coNP, by virtue of Lemma 1. Therefore, the complement of cautiousreasoning isin ΣP

2 , and cautious reasoning is inΠP2 .

ΠP2 -hardness follows from Theorem 3 and the results in (Eiter and Gottlob 1995, Eiter

et al. 1997b).

6 Related Work

6.1 Answer Set Semantics

Answer Set Semantics, proposed by Gelfond and Lifschitz in (Gelfond and Lifschitz 1991),is the most widely acknowledged semantics for disjunctive logic programs with strongnegation. For this reason, while defining the semantics of our language, we took care ofensuring full agreement with Answer Set Semantics (on inheritance-free programs).

Theorem 3LetP be aDLP< program consisting of a single objecto = 〈oid(o),Σ(o)〉.7 Then,M isan answer set ofP if and only if it is a consistent answer set ofΣ(o) (as defined in (Gelfondand Lifschitz 1991)).

ProofFirst we show thatGM (P) is equal toΣ(o)M (as defined in (Gelfond and Lifschitz 1991)):

Deletion rule (1) of Definition 3 never applies, since for every literal L and any tworulesr1, r2 ∈ ground(P), obj of(r1) 6< obj of(r2) holds, thus violating condition (1) inDefinition 1 and therefore no rule can be overridden. It is evident that the deletion rules (2)and (3) of Definition 3 are equal to deletion rules (i) and (ii)of the definition ofΠS in §7in (Gelfond and Lifschitz 1991), respectively. The first ones delete rules, where some NAFliteral is contained inM , while the second ones delete all NAF literals of the remainingrules.

Next, we show that the criteria for a consistent setM of literals being an answer set of apositive (i.e. NAF free) program (as in (Gelfond and Lifschitz 1991)) is equal to the notionof satisfaction:

Since the set is consistent, condition (ii) in§7 of (Gelfond and Lifschitz 1991) does notapply. Condition (i) says:Lk+1, . . . , Lm ∈ M (the body is true) implies that the head istrue. This is logically equivalent to “The body is not true orthe head is true”, which is thedefinition of rule satisfaction.

In total we have that the minimal models ofpos(GM (P)) are equal to the consistentanswer sets ofΣ(o)M , since answer sets are minimal by definition.

Additionally, we require in Definition 4 thatM is also a model ofP , while in (Gel-fond and Lifschitz 1991) there is no such requirement. However, all minimal models ofpos(GM (P)) are also models ofP : All rules in GM (P) are satisfied, and only the dele-tion rules (2) and (3) of Definition 3 have been applied (as shown above). So, for any ruler, which has been deleted by (2), some literal inBody−(r) is in M , so r’s body is nottrue, and thusr is satisfied inM . If a ruler, which has been transformed by (3), is satisfied

7 On inheritance-free programs, there is no difference between strict and defeasible rules. Therefore, withoutloss of generality we assume that rules are of only one type here. This allows us to drop the symbol (’.’ or ’!’)at the end of the rules of single object programs.

16 F. Buccafurri, W. Faber and N. Leone

without Body−(r), then eitherHead(r) is true orBody+(r) is not true, so adding anyNAF part to it does not change its satisfaction status.

Theorem 3 shows that the set of rules contained in a single object of aDLP< programhas precisely the same answer sets (according to the definition in (Gelfond and Lifschitz1991)) as the single object program (according to Definition4).

For aDLP< programP consisting of more than one object, the answer sets (as de-fined in (Gelfond and Lifschitz 1991)) of the collection of all rules inP in general do notcoincide with the answer sets ofP .

For instance the program

o { p. }

o1 : o { ¬p. }

has the answer set{¬p}, while the disjunctive logic program{p. ¬p.} does not have aconsistent answer set.

Nevertheless, in Section 7.1 we will show that eachDLP< programP can be translatedinto a disjunctive logic programP ′, the semantics of which is equivalent to the semanticsof P . However, this translation requires the addition of a number of extra predicates.

6.2 Disjunctive Ordered Logic

Disjunctive Ordered Logic (DOL) is an extension of Disjunctive Logic Programming withstrong negation and inheritance (without default negation) proposed in (Buccafurri et al.1998, Buccafurri et al. 1999). TheDLP< language incorporates some ideas taken fromDOL. However, the two languages are very different in several respects. Most importantly,unlike withDLP<, even if a program belongs to the common fragment ofDOL and of thelanguage of (Gelfond and Lifschitz 1991) (i.e., it containsneither inheritance nor defaultnegation),DOL semantics is completely different from Answer Set Semantics, because ofa different way of handling contradictions.8 In short, we observe the following differencesbetweenDOL andDLP<:

• DOL does not include default negationnot, whileDLP< does.• DOL andDLP< have different semantics on the common fragment. Consider apro-

gramP consisting of a single objecto = 〈oid(o),Σ(o)〉, whereΣ(o) = {p. ¬p.}.Then, according toDOL, the semantics ofP is given by two models, namely,{p}and{¬p}. On the contrary,P has no answer set according toDLP< semantics.• DLP< generalizes (consistent) Answer Set Semantics to disjunctive logic programs

with inheritance, whileDOL does not.

6.3 Prioritized Logic Programs

DLP< can be also seen as an attempt to handle priorities in disjunctive logic programs (thelower the object in the inheritance hierarchy, the higher the priority of its rules).

There are several works on preference handling in logic programming (Delgrande, Schaub

8 Actually, this was a main motivation for the authors to look for a different language.

Disjunctive Logic Programs with Inheritance 17

and Tompits 2000, Brewka and Eiter 1998, Gelfond and Son 1997, Nute 1994, Kowalskiand Sadri 1990, Pradhan and Minker 1996, Sakama and Inoue 1996). However, we areaware of only one previous work on priorities indisjunctive programs, namely, the paperby Sakama and Inoue (Sakama and Inoue 1996). This interesting work can be seen as anextension of Answer Set Semantics to deal with priorities. Comparing the two approachesunder the perspective of priority handling, we observe the following:

• On priority-free programs, the two languages yield essentially the same semantics,as they generalize Answer Set Semantics and Consistent Answer Set Semantics,respectively.• In (Sakama and Inoue 1996), priorities are defined amongliterals, while priorities

concern programrules in DLP<.• The different kind of priorities (on rules vs. literals) andthe way how they are dealt

with in the two approaches imply different complexity in therespective reasoningtasks. Indeed, from the simulation of abductive reasoning in the language of (Sakamaand Inoue 1996), and the complexity results on abduction reported in (Eiter, Gottloband Leone 1997a), it follows that brave reasoning isΣP

3 -complete for the language of(Sakama and Inoue 1996). On the contrary, brave reasoning is“only” ΣP

2 -completein DLP<9.

(Delgrande et al. 2000) deals with nondisjunctive programs, but the authors note thattheir semantics-defining transformation “is also applicable to disjunctive logic programs”.In this formalism, the preference relation is defined by regular atoms (with a set of con-stants representing the rules), allowing the definition of dynamic preferences. However,the semantics of the preferences is based on the order of ruleapplication (or defeating) andthus seems to be quite different from our approach.

A comparative analysis of the various approaches to the treatment of preferences in (∨-free) logic programming has been carried out in (Brewka and Eiter 1998).

6.4 Inheritance Networks

From a different perspective, the objects of aDLP< program can also be seen as the nodesof an inheritance network.

We next show thatDLP< satisfies the basic semantic principles which are required forinheritance networks in (Touretzky 1986).

(Touretzky 1986) constitutes a fundamental attempt to present a formal mathematicaltheory of multiple inheritance with exceptions. The starting point of this work is the con-sideration that an intuitively acceptable semantics for inheritance must satisfy two basicrequirements:

1. Being able to reason with redundant statements, and2. not making unjustified choices in ambiguous situations.

Touretzky illustrates this intuition by means of two basic examples.The former requirement is presented by means of theRoyal Elephantexample, in which

9 We refer to the complexity in the propositional case here.

18 F. Buccafurri, W. Faber and N. Leone

we have the following knowledge: “Elephants are gray.”, “Royal elephants are elephants.”,“Royal elephants are not gray.”, “Clyde is a royal elephant.”, “Clyde is an elephant.”

The last statement is clearly redundant; however, since it is consistent with the othersthere is no reason to rule it out. Touretzky shows that an intuitive semantics should be ableto recognize that Clyde is not gray, while many systems fail in this task.

Touretzky’s second principle is shown by theNixon diamondexample, in which thefollowing is known: “Republicans are not pacifists.”, “Quakers are pacifists.”, “Nixon isboth a Republican and a quaker.”

According to our approach, he claims that a good semantics should draw no conclusionabout the question whether Nixon is apacifist.

The proposed solution for the problems above is based on a topological relation, calledinferential distance ordering, stating that an individualA is ”nearer” toB than toC iff A

has an inference paththroughB to C. If A is ”nearer” toB than toC, then as far asA isconcerned, information coming fromB must be preferred w.r.t. information coming fromC. Therefore, since Clyde is ”nearer” to being a royal elephant than to being an elephant,he states that Clyde is not gray. On the contrary no conclusion is taken on Nixon, as thereis not any relationship between quaker and republican.

The semantics ofDLP< fully agrees with the intuition underlying theinferential dis-tance ordering.

Example 11Let us represent the Royal Elephant example in our framework:

elephant {gray.}

royal elephant : elephant {¬gray.}

clyde : elephant, royal elephant { }

The only answer set of the aboveDLP< program is{¬gray}.The Nixon Diamond example can be expressed in our language asfollows:

republican {¬pacifist.}

quaker {pacifist.}

nixon : republican, quaker { }

ThisDLP< program has no answer set, and therefore no conclusion is drawn.

6.5 Updates in Logic Programs

The definition of the semantics of updates in logic programs is another topic whereDLP<

could potentially be applied. Roughly, a simple formulation of the problem is the follow-ing: Given a (∨-free) logic programP and a sequenceU1, · · · , Un of successive updates(insertion/deletion of ground atoms), determine what is oris not true in the end. Expressingthe insertion (deletion) of an atomA by the ruleA← (¬A←), we can represent this prob-lem by aDLP< knowledge base{〈t0, P 〉, 〈t1, {U1}〉, · · · , 〈tn, {Un}〉} (ti intuitively rep-resents the instant of time when the updateUi has been executed), wheretn < · · · < t0.10

The answer sets of the program fortk can be taken as the semantics of the execution of

10 In this context,< should be interpreted as “more recent”.

Disjunctive Logic Programs with Inheritance 19

U1, · · · , Uk onP . For instance, given the logic programP = {a← b, not c} and the up-datesU1 = {b.}, U2 = {c.}, U3 = {¬b.}, we build theDLP< programt0 { a← b, c, not d. }

t1 : t0 { b. }

t2 : t1 { c. }

t3 : t2 { ¬b. }.

The answer set{a, b, c} of the program fort2 gives the semantics of the execution ofU1 andU2 onP; while the answer set{c} of the program fort3 expresses the semantics ofthe execution ofU1, U2 andU3 onP in the given order.

The semantics of updates obtained in this way is very similarto the approach adoptedfor the ULL language in (Leone et al. 1995). Further investigations are needed on this topicto see whetherDLP< can represent update problems in more general settings likethosetreated in (Marek and Truszczynski 1994) and in (Alferes etal. 1998a). A comparativeanalysis of various approaches to updating logic programs is being carried out in (Eiter,Fink, Sabbatini and Tompits 2000). Preliminaries results of this work show that, undersuitable syntactic conditions,DLP< supports a nice “iterative” property for updates, whichis missed in other formalisms.

7 Implementation Issues

7.1 From DLP< to Plain DLP

In this section we show how aDLP< program can be translated into an equivalent plaindisjunctive logic program (with strong negation, but without inheritance). The translationallows us to exploit existing disjunctive logic programming (DLP) systems for the imple-mentation ofDLP<.Notation.

1. LetP be the inputDLP< program.2. We denote a literal byφ(X), whereX is the tuple of the literal’s arguments, and

φ represents anadorned predicate, that is either a predicate symbolp or a stronglynegated predicated symbol¬p. Two adorned predicates arecomplementaryif oneis the negation of the other (e.g.,q and¬q are complementary).¬.φ denotes thecomplementary adorned predicate of the adorned predicateφ.

3. An adorned predicateφ is conflictingif both φ(X) and¬.φ(Y ) occur in the headsof rules inP .

4. Given an objecto in P , and a head literalφ(X) of a defeasible rule inΣ(o), wesay thatφ is threatened in oif a literal¬.φ(Y ) occurs in the head of a rule inΣ(o′)whereo′ < o. A defeasible ruler in Σ(o) is threatened in oif all its head literals arethreatened ino.

The rewriting algorithm translatingDLP< programs in plain disjunctive logic programswith constraints11 is shown in Figure 2.

An informal description of how the algorithm proceeds is thefollowing:

11 Again we use constraints for clarity, see footnote 5 on page 13

20 F. Buccafurri, W. Faber and N. Leone

ALGORITHMINPUT : aDLP<-programPOUTPUT: a plain disjunctive logic program with constraintsDLP (P)

1: DLP (P)⇐ {prec′(o, o1)← | o < o1}2: for each objecto ∈ O(P) do3: for each threatened adorned predicateφ in o do4: Add the following rule toDLP (P):5: ovr′(φ, o,X1, · · · , Xn)← ¬.φ

′(X,X1, · · · , Xn), prec′(X, o)

6: wheren is the arity ofφ andX,X1, · · · , Xn are distinct variables.7: end for8: for each ruler in Σ(o), sayφ1(X1) ∨ · · · ∨ φn(Xn)← BODY , do9: if r is threatenedthen

10: Add the following two rules toDLP (P):11: φ′

1(o, X1) ∨ · · · ∨ φ′

n(o, Xn)← BODY, not ovr′(r, o, X1, ..., Xn)12: ovr′(r, o, X1, ..., Xn)← ovr′(φ1, o, X1), ..., ovr

′(φn, o, Xn)13: else14: Add the following rule toDLP (P):15: φ′

1(o, X1) ∨ · · · ∨ φ′

n(o, Xn)← BODY

16: end if17: end for18: end for19: for each adorned predicateφ appearing inP do20: Add the following rule toDLP (P):21: φ(X1, · · · , Xn)← φ′(X0, X1, · · · , Xn)22: wheren is the arity ofφ andX0, · · · , Xn are distinct variables.23: end for24: for each conflicting adorned predicateφ appearing inP do25: Add the following constraint toDLP (P):26: ← φ(X1, · · · , Xn),¬.φ(X1, · · · , Xn)27: wheren is the arity ofφ andX1, · · · , Xn are distinct variables.28: end for

Figure 2. A Rewriting Algorithm

• DLP (P) is initialized to a set of facts with head predicateprec′ representing thepartial ordering among objects (statement 1).

• Then, for each objecto in O(P):

— For each threatened literalφ(X) appearing ino, rules defining when the literalis overridden are added (statements 3–7).

— For each ruler belonging too:

1. If r is threatened, then the rule is rewritten, such that the headliterals includeinformation about the object in which they have been derived, and the bodyincludes a literal which satisfies the rule if it is overridden. In addition, a ruleis added which encodes when the rule is overridden (statements 9–12).

2. Otherwise (i.e., ifr is not threatened) just the rule head is rewritten as de-scribed above, since these rules cannot be overridden (statements 13–15).

• For all adorned predicates in the program, we add a rule whichstates that an atomwith this predicate holds, no matter in which object it has been derived (statements

Disjunctive Logic Programs with Inheritance 21

19–23). The information in which object an atom has been derived is only neededfor determination of overriding.• Finally, statements 24–28 add a constraint for each adornedpredicate, which pre-

vents the generation of inconsistent sets of literals.

DLP (P) is referred to as theDLP versionof the programP .12

We now give an example to show how the translation works:

Example 12The datalog versionDLP (P) of the programP of Example 1 is:(1) rules expliciting partial order among objects :

prec′(o2, o1).

(2) rules for threatened adorned predicates in o1 :

ovr′(a, o1)← ¬a′(X), prec′(X, o1).

ovr′(¬b, o1)← b′(X), prec′(X, o1).

(3) rewriting of rules in o1 :

a′(o1) ∨ ¬b′(o1)← c, not d, not ovr′(r1, o1).

ovr′(r1, o1)← ovr′(a, o1), ovr′(¬b, o1).

e′(o1)← b.

(4) rewriting of rules in o2 :

¬a′(o2) ∨ c′(o2).

b′(o2).

c′(o2)← b.

(5) projection rules :

a← a′(X). ¬a← ¬a′(X).

b← b′(X). ¬b← ¬b′(X).

c← c′(X). d← d′(X).

e← e′(X).

(6) constraints :

← a,¬a.

← b,¬b.

Given a modelM for DLP (P), π(M) is the set of literals obtained fromM by elimi-nating all the literals with a “primed” predicate symbol, i.e. a predicate symbol in the set{prec′, ovr′} ∪ {φ′ | ∃ an adorned literal φ(X) appearing in P}. π(M) is the set ofliterals without all atoms which were introduced by the translation algorithm.

The DLP version of aDLP<-programP can be used in place ofP in order to evaluateanswer sets ofP . The result supporting the above statement is the following:

Theorem 4Let P be aDLP<-program. Then, for each answer setM for P there exists a consistentanswer setM ′ for DLP (P) such thatπ(M ′) = M . Moreover, for each consistent answersetM ′ for DLP (P) there exists an answer setM for P such thatπ(M ′) = M .

12 DLP (P) is a function-free disjunctive logic program. Allowing functions could make the algorithm notationmore compact, but would not give any computational benefit.

22 F. Buccafurri, W. Faber and N. Leone

ProofFirst we show that given an answer setM for P there exists a consistent answer setM ′

for DLP (P) such thatπ(M ′) = M . We proceed by constructing the modelM ′. LetK1 = {prec′(o, o1) | o < o1}. Let K2 be the set of ground literalsovr′(r, o, X) suchthat there exists a (defeasible) ruler ∈ ground(P) with obj of(r) = o such thatr isoverridden inM andX is the tuple of arguments appearing in the head ofr. Let K3 bethe set of ground literalsovr′(L, o) such that there exist two rulesr, r′ ∈ ground(P) suchthatL ∈ Head(r), r is defeasible andr′ overridesr in L. Let denote byK the collectionof sets of ground literals such that each elementK ∈ K satisfies the following properties:

1. for each literalφ(X) ∈M there is a literalφ′(o, X) in K, for some object identifiero,

2. for eachr ∈ GM (P) such that the body ofr is true inM , for at least one literalφ(X) of the head ofr a corresponding literalφ′(obj of(r), X) occurs inK,

3. K ⊆ {φ′(o, X) | φ(X) is an adorned predicate appearing inP ∧ o ∈ O},4. K is a consistent set of literals.

First observe that the familyK is not empty (i.e., there is at least a set of consistent sets ofliterals satisfying items (1), (2) and (3) above). This immediately follows from the fact thatM is an answer set of the programP .

Let MK = K1 ∪ K2 ∪ K3 ∪ K ∪ M , for a genericK ∈ K. It is easy to show thatGMK

(DLP (P)) is independent on whichK ∈ K is chosen. Indeed, no literals fromKappear in the NAF part of the rules inground(DLP (P)).

Now we examine which rules the programpos(GMK(DLP (P))) contains (for any set

K ∈ K).Both the rules with head predicateprec′ andovr′ and the rules of the formφ(X) ←

φ′(X, X) (added by statement 21 of Figure 2) appear unchanged inpos(GMK(DLP (P))).

Indeed, these rules do not contain a NAF part (recall that theGL transformation can modifyonly rules in which a NAF part occurs). Each constraint ofDLP (P) (added by statement26 of the algorithm), that is a rule of the formb ← φ(X),¬.φ(X), not b (whereb is aliteral not occurring inMK) is translated into the ruleb← φ(X),¬.φ(X).

The other rules inpos(GMK(DLP (P))) originate from rules ofground(DLP (P))

obtained by rewriting rules ofground(P) (see statements 11 and 15 of the algorithm).Thus, consider a ruler of ground(P).If r is defeasible and overridden inM then the corresponding rule inground(DLP (P))

(generated by statement 11 of the algorithm) contains a NAF part not satisfied inMK , byconstruction ofK2 andK3. Hence, such a rule appears neither inpos(GM (P)) nor inpos(GMK

(DLP (P))).The other case we have to consider is that the ruler is either a strict rule or a defeasible

rule not overridden inM .First suppose thatr is a strict rule or is a defeasible rule not threatened inM (recall that a

rule not threatened inM is certainly not overridden inM ). In this case, the correspondingrule, sayr′ in ground(DLP (P)) (generated by statement 15 of the algorithm) has thesame body ofr and the head modified by renaming predicates (fromφ toφ′) and by addingthe objecto (from which the ruler comes) as first argument in each head literal. Sincethe body ofr′ does not contain literals fromK1,K2,K3 andK, and furtherM ⊆ MK

Disjunctive Logic Programs with Inheritance 23

(for eachK ∈ K), r′ is eliminated by the GL transformation w.r.t.MK if and only if r iseliminated by the GL transformation w.r.t.M . Moreover, in caser′ is not eliminated by theGL transformation w.r.tMK , since the body ofr′ does not contain literals fromK1,K2,K3

andK, the GL transformation w.r.t.MK modifies the body ofr′ in the same way the GLtransformation w.r.t.M modifies the body ofr. Thus, each ruler in pos(GM (P)) has acorresponding rule inpos(GMK

(DLP (P))) with the same body and a rewritten head.Now suppose thatr is a threatened defeasible rule that is not overridden inM . In this

case, the corresponding rule, sayr′ in ground(DLP (P)) (generated by statement 11 ofthe algorithm) has the head modified by renaming predicates (fromφ to φ′) and by addingthe objecto as first argument in each head literal and a body obtained by adding to the bodyof r a literal of the formnot ovr′(r, o, X), whereo is the object from whichr comes, andX represents the tuple of terms appearing in the head literalsof r. Since the ruler is notoverridden inM , the literalovr′(r, o, X) cannot belong toK2 and hence cannot belongto MK . Thus, the GL transformation w.r.tMK eliminates the NAF part of the ruler′. Asa consequence, also in this case, each rule inpos(GM (P)) has a corresponding rule inpos(GMK

(DLP (P))) withNow we prove that, for anyK ∈ K, MK is a model forpos(GMK

(DLP (P))). In-deed, rules with head predicateprec′ are clearly satisfied. Further, rules with head predi-cateovr′ are satisfied by construction of setK2, K3 andK. Moreover, rules of the formφ(X) ← φ′(X, X) are satisfied sinceM ⊆ MK and by construction ofK. Rules ofpos(GMK

(DLP (P))) of the formb ← φ(X), not φ(X), originated by the translation ofthe constraints, are satisfied sinceMK is a consistent set of literals.

Consider now the remaining rules (those corresponding to rules ofpos(GM (P))). Let rbe a rule ofpos(GMK

(DLP (P))) andr′ the rule ofpos(GM (P)) corresponding tor. Asshown earlier, the two rules have the same body. Thus, if the body of r is true w.r.t.MK ,the body ofr′ is true w.r.t.M , since no literal ofMK \M can appear in the body of therule r′ (and hence of the ruler). As a consequence, by property (2) of the collectionK towhich the setK belongs, the head of the ruler is true inMK .

Thus,MK is a model forpos(GMK(DLP (P))).

Now we prove the following claim:Claim 1. Let M be a model forpos(GMK

(DLP (P))). Then,π(M) is a model forpos(GM (P)).

ProofBy contradiction suppose thatπ(M) is not a model forpos(GM (P)). Thus, there exists arule r ∈ pos(GM (P)) with body true inπ(M ) and head false inπ(M). Since, as shownearlier, the ruler has a corresponding ruler′ in pos(GMK

(DLP (P))) with the samebody of r and the head obtained by replacing each literalφ(X) of the head ofr by thecorresponding literalφ′(o, X), whereo is the object from whichr comes. Sinceπ(M) isa model forpos(GMK

(DLP (P))), at least one of the ”φ′ literal” of the head ofr′ mustbe true inπ(M). Then, due to the presence of the rules of the formφ(X)← φ′(X, X) inpos(GMK

(DLP (P))), π(M) must contain also the ”φ corresponding literal” belongingto the head ofr (contradiction)

Moreover we prove that each model forpos(GMK(DLP (P)))

(1) containsM , and

24 F. Buccafurri, W. Faber and N. Leone

(2) belongs toK.

To prove item (1), suppose by contradictionM is a model forpos(GMK(DLP (P))) such

thatM ∩ M 6= M . Thus,π(M ) ⊂ M . On the other hand, by Claim 1,π(M) is a modelfor pos(GM (P)). But sinceM is an answer set forP and then a minimal model forpos(GM (P)), a contradiction arises.

Now we have to prove the item (2) above. First observe that theproperties 3. and 4.of the familyK are trivially verified by the models ofpos(GMK

(DLP (P))). Thus, bycontradiction suppose there exists a modelM of pos(GMK

(DLP (P))) such that it doesnot satisfy one of the properties 1. or 2. characterizing thefamily K.

First suppose that property 1. is not satisfied byM , that is, there is a literalφ(X) in M

such that no corresponding literalφ′(o, X) occurs inM , for some object identifiero. LetM ′ be the set obtained byM by eliminating all such literalsφ(X). It is easy to see thatM ′

is still a model forpos(GMK(DLP (P))). Indeed, rules of the formφ(X) ← φ′(X, X)

are satisfied since literalsφ(X) dropped fromM do not have corresponding ”φ′ literals”by hypothesis. Further, no other rule inpos(GMK

(DLP (P))) contains a literal fromMin the head. On the other hand, by Claim 1,π(M ′) is a model forpos(GM (P)). But thisis a contradiction, sinceπ(M ′) ⊂M andM is an answer set forP .

Suppose now that property 2. is not satisfied byM , that is, there is a ruler ∈ pos(GM (P))

such that the body ofr is true in M and no ”φ′ literals” corresponding to literals ofthe head occur inM . Since,M ⊆ M (see item (1) above), the corresponding rule ofpos(GMK

(DLP (P))) is not satisfied. But this implies thatM can not be a model forpos(GMK

(DLP (P))) (contradiction).A consequence of the fact that every model ofpos(GMK

(DLP (P))) containsM is thatevery model ofpos(GMK

(DLP (P))) must contain the setsK1, K2 andK3. because ofthe rules added by statements 1,5 and 12 of the algorithm.

Thus, the modelM ′ = MK′ for K ′ ∈ K such that no setK ∈ K exists such thatK ⊂ K ′ is a minimal model forpos(GMK

(DLP (P)), that is, a consistent answer set forDLP (P). Hence, the first part of the proof is concluded, sinceπ(M ′) = M .

Now, we prove that given a consistent answer setM ′ for DLP (P), M = π(M ′) is ananswer set forP .

First we prove that a literalφ(X) belongs toM if and only if there exits a literalφ′(o, X)

in M ′, for some object identifiero.Indeed,φ(X) ∈ M implies thatφ(X) ∈ M ′. But sinceM ′ is a minimal model for

pos(GM ′(DLP (P)), there must exits a rule inpos(GM ′ (DLP (P)) with head contain-ing the literalφ(X) and body true w.r.t.M ′ (otherwise the literalφ(X) could be droppedfrom M ′ without invalidate any rule ofpos(GM ′(DLP (P)) and thusM ′ would not beminimal). Conversely, ifφ′(o, X) ∈ M ′, for some object identifiero, the literalφ(X) be-longs toM ′, sinceM ′ is a model forpos(GM ′ (DLP (P)) and the ruleφ(X)← φ′(o, X)

belongs topos(GM ′ (DLP (P)). Thus,φ(X) ∈M .Moreover, we prove that every rule ofpos(GM ′ (DLP (P)) has a corresponding rule in

pos(GM (P)) with same body and a head obtained by replacing theφ′ literals with theφ corresponding ones and by eliminating the object argument from these literals. Indeed,from the above result, the GL transformation deletes a ruler from ground(DLP (P)) ifeither the corresponding rule belonging toground(P) is overridden inM (due the the

Disjunctive Logic Programs with Inheritance 25

Filteringenhanceddlv parser core

dlv OutputRewriterInput

Figure 3. Flow diagram of the system.

literal not ovr′(r, o, X) occurring in the body ofr) or some negated (by negationnot)literal is false inM ′. But this literal is false inM ′ if and only if it is false inM . On theother hand, in case the rule is not deleted by the GL transformation, its body is rewritten inthe same way of the corresponding rule appearing inpos(GM (P)).

As a consequence,M is a model forpos(GM (P)). Indeed, if the body of a ruler ofpos(GM (P)) is true w.r.t.M , the corresponding ruler′ of pos(GM ′ (DLP (P)) has thebody true w.r.t.M ′. Hence, at least one of the head literals ofr′ must be true inM ′. Letφ′(o, X) such a literal. As shown earlier, this implies thatφ(X) belongs toM . But φ(X)

appears in the head ofr and hencer is satisfied inM .Now we prove thatM is minimal. By contradiction, suppose thatM ⊂ M is a model

for pos(GM (P)). Consider the literals belonging to the setM \ M . Because of the cor-respondence between the rules ofpos(GM (P)) and the rules ofpos(GM ′ (DLP (P)), theset of literals obtained fromM ′ by eliminating all the literalsφ(X) belonging to the setM \ M as well as the correspondingφ′ literals is still a model forpos(GM ′ (DLP (P)).But this is a contradiction, sinceM ′ is a consistent answer set forDLP (P).

SinceM is a model forpos(GM (P)) and is minimal,M = π(M ′) is an answer set forthe programP . Hence the proof is concluded.

Example 13Consider the programP of Example 1. It is easy to see thatDLP (P) (see Example12) admits one consistent answer setM = {prec′(o2, o1), a

′(o1), e′(o1), b

′(o2), c′(o2),

ovr′(¬b, o1), a, e, b, c}. Thus,π(M) = {a, b, c, e}. On the other hand,π(M) is the onlyanswer set forP , as shown in Example 6.

7.2 System Architecture

We have used theDLV system (Eiter et al. 1998) to implement a system forDLP<. Theconcept is that of a front-end to plain DLP, which has been used before for implementingvarious ways of reasoning modes and languages on top of theDLV system. The front-end implements the translation described in Section 7. A schematic visualization of itsarchitecture is shown in Figure 3.

First of all, we have extended theDLV parser to incorporate theDLP< syntax. In thisway, all the advanced features ofDLV (e.g. bounded integer arithmetics, comparison built-ins, etc.) are also available withDLP<. TheRewritermodule implements the translationdepicted in Figure 2. Once the rewritten versionπ(P) of P is generated, its answer setsare then computed using theDLV core. Before the output is shown to the user,π is appliedto each answer set in order to strip the internal predicates from the output.

On the webpage (Faber 1999) the system is described in detail. It has been fully incor-porated into theDLV system. To use it, just supply an input file using the syntax describedin Section 2 —DLV automatically invokes theDLP< frontend in this case.

26 F. Buccafurri, W. Faber and N. Leone

Note that it is currently required to specify the objects in the order of the inheritancehierarchy: Specifying that some object inherits from another object which has not beendefined before will result in an error. Since cyclic dependencies are not allowed in ourlanguage, this requirement is not a restriction.

8 Conclusion

We have presented a new language, namedDLP<, resulting from the extension of (function-free) disjunctive logic programming with inheritance.DLP< comes with a declarativemodel-theoretic semantics, where possible conflicts are solved in favor of more specificrules (according to the inheritance hierarchy).DLP< is a consistent generalization of theAnswer Set Semantics of disjunctive logic programs, it respects some fundamental inher-itance principles, and it seems to be suitable also to give a semantics to updates in logicprograms.

While inheritance enhances the knowledge representation modeling features of disjunc-tive logic programming, the addition of inheritance does not increase its computationalcomplexity. Thus, inheritance “comes for free”: the user can take profit of its knowledgemodeling ability, without paying any extra cost in terms of computational load. It wastherefore possible to implement aDLP< system on top of the disjunctive logic program-ming systemDLV . The system is freely available on the web (Faber 1999) and ready-to-usefor experimenting with the use of inheritance in KR applications.

Acknowledgements

The idea of representing inertia in planning problems in a higher object is due to AxelPolleres. The introduction of the notion of strict rules wassuggested by Michael Gelfond.This work was partially supported by FWF (Austrian Science Funds) under the projectsP11580-MAT and Z29-INF.

References

Alferes, J. J. and Pereira, L. M. (1992). On Logic Program Semantics with Two Kinds of Nega-tion, Proceedings of the Joint International Conference and Symposium on Logic Programming(JICSLP’92), MIT Press, pp. 574–588.

Alferes, J. J., Leite, J. A., Pereira, L. M., Przymusinska, H. and Przymusinski, T. C. (1998a). Dy-namic Logic Programming,Proceedings of the Sixth International Conference on Principles ofKnowledge Representation and Reasoning (KR’98), Morgan Kaufmann, pp. 98–111.

Alferes, J. J., Pereira, L. M. and Przymusinski, T. C. (1996). Strong and Explicit Negation in Non-Monotonic Reasoning and Logic Programming,European Workshop on Logics in Artificial Intel-ligence (JELIA’96), Springer, pp. 143–163.

Alferes, J. J., Pereira, L. M. and Przymusinski, T. C. (1998b). ‘Classical’ Negation in NonmonotonicReasoning and Logic Programming,Journal of Automated Reasoning20(1/2): 107–142.

Baral, C. and Gelfond, M. (1994). Logic Programming and Knowledge Representation,Journal ofLogic Programming19/20: 73–148.

Brewka, G. and Eiter, T. (1998). Preferred Answer Sets for Extended Logic Programs,in A. Cohn,L. Schubert and S. Shapiro (eds),Proceedings Sixth International Conference on PrinciplesofKnowledge Representation and Reasoning (KR’98), Morgan Kaufmann, pp. 86–97.

Disjunctive Logic Programs with Inheritance 27

Buccafurri, F., Leone, N. and Rullo, P. (1998). DisjunctiveOrdered Logic: Semantics and Expres-siveness,in A. G. Cohn, L. Schubert and S. C. Shapiro (eds),Proceedings Sixth InternationalConference on Principles of Knowledge Representation and Reasoning (KR’98), Morgan Kauf-mann Publishers, pp. 418–429.

Buccafurri, F., Leone, N. and Rullo, P. (1999). Semantics and Expressiveness of Disjunctive OrderedLogic, Annals of Mathematics and Artificial Intelligence25(3-4): 311–337.

Delgrande, J., Schaub, T. and Tompits, H. (2000). Logic programs with compiled preferences,in W. Horn (ed.), Proceedings of the 14th European Conference on Artificial Intelligence(ECAI’2000), IOS Press, pp. 392–398.

Dung, P. M. (1993). Representing Actions in Logic Programming and Its Applications in DatabaseUpdates,Proceedings of the Tenth International Conference on LogicProgramming, pp. 222–238.

Eiter, T. and Gottlob, G. (1995). On the Computational Cost of Disjunctive Logic Programming:Propositional Case,Annals of Mathematics and Artificial Intelligence15(3/4): 289–323.

Eiter, T., Fink, M., Sabbatini, G. and Tompits, H. (2000). Considerations on Updates of Logic Pro-grams,in M. Ojeda-Aciego, I. P. de Guzman, G. Brewka and L. Moniz Pereira (eds),ProceedingsEuropean Workshop on Logics in Artificial Intelligence – Journees Europeennes sur la Logiqueen Intelligence Artificielle (JELIA 2000), Malaga, Spain, September 29–October 2, 2000, number1919 inLNCS, Springer, pp. 2–20.

Eiter, T., Gottlob, G. and Leone, N. (1997a). Abduction fromLogic Programs: Semantics and Com-plexity, Theoretical Computer Science189(1–2): 129–177.

Eiter, T., Gottlob, G. and Mannila, H. (1997b). DisjunctiveDatalog,ACM Transactions on DatabaseSystems22(3): 364–418.

Eiter, T., Leone, N., Mateis, C., Pfeifer, G. and Scarcello,F. (1998). The KR Systemdlv: ProgressReport, Comparisons and Benchmarks.,in A. G. Cohn, L. Schubert and S. C. Shapiro (eds),Pro-ceedings Sixth International Conference on Principles of Knowledge Representation and Reason-ing (KR’98), Morgan Kaufmann Publishers, pp. 406–417.

Erdem, E. (1999). Applications of Logic Programming to Planning: Computational Experiments,Unpublished draft.http://www.cs.utexas.edu/users/esra/papers.html.

Faber, W. (1999).dlvi homepage.<URL:http://www.dbai.tuwien.ac.at/proj/dlv/inheritance/>.

Faber, W. and Pfeifer, G. (since 1996).dlv homepage.http://www.dbai.tuwien.ac.at/proj/dlv/.

Gelfond, M. and Lifschitz, V. (1991). Classical Negation inLogic Programs and DisjunctiveDatabases,New Generation Computing9: 365–385.

Gelfond, M. and Lifschitz, V. (1993). Representing Action and Change by Logic Programs,Journalof Logic Programming17: 301–321.

Gelfond, M. and Son, T. C. (1997). Reasoning with Prioritized Defaults,Proceedings of the Workshopof Logic Programming and Knowledge Representation (LPKR ’97), Springer, pp. 164–223.

Giunchiglia, E. and Lifschitz, V. (1998). An Action Language Based on Causal Explanation: Prelim-inary Report,Proceedings of the Fifteenth National Conference on Artificial Intelligence (AAAI’98), pp. 623–630.

Hanks, S. and McDermott, D. (1987). Nonmonotonic logic and temporal projection,Artificial Intelli-gence33(3): 379–412.

Kowalski, R. A. and Sadri, F. (1990). Logic Programs with Exceptions,Proceedings of the SeventhInternational Conference on Logic Programming (ICLP’90), MIT Press, pp. 598–616.

Leone, N., Palopoli, L. and Romeo, M. (1995). A Language for Updating Logic Programs and itsImplementation,Journal of Logic Programming23(1): 1–61.

Lifschitz, V. (1999). Action Languages, Answer Sets and Planning, in K. Apt, V. W. Marek,

28 F. Buccafurri, W. Faber and N. Leone

M. Truszczynski and D. S. Warren (eds),The Logic Programming Paradigm – A 25-Year Per-spective, Springer Verlag, pp. 357–373.

Lobo, J., Minker, J. and Rajasekar, A. (1992).Foundations of Disjunctive Logic Programming, TheMIT Press, Cambridge, Massachusetts.

Marek, V. and Truszczynski, M. (1994). Revision Specifications by Means of Programs,EuropeanWorkshop on Logics in Artificial Intelligence (JELIA’94), Springer, pp. 122–136.

Marek, W. and Truszczynski, M. (1990). Modal Logic for Default Reasoning,Annals of Mathematicsand Artificial Intelligence1(1-4): 275–302.

Marek, W. and Truszczynski, M. (1991). Autoepistemic Logic, Journal of the ACM38(3): 588–619.

McCarthy, J. (1990).Formalization of common sense, papers by John McCarthy edited by V. Lifschitz,Ablex.

McCarthy, J. and Hayes, P. J. (1969). Some philosophical problems from the standpoint of artificialintelligence,in B. Meltzer and D. Michie (eds),Machine Intelligence 4, Edinburgh UniversityPress, pp. 463–502. reprinted in (McCarthy 1990).

Nute, D. (1994). Defeasible logic,in D. M. Gabbay, C. Hogger and J. Robinson (eds),Handbook ofLogic in Artificial Intelligence and Logic Programming, Vol. 3, Oxford University Press, pp. 353–395.

Pradhan, S. and Minker, J. (1996). Using Priorities to Combine Knowledge Bases,InternationalJournal of Cooperative Information Systems5(2&3): 333–364.

Reiter, R. (1980). A Logic for Default Reasoning,Artificial Intelligence13(1–2): 81–132.

Sakama, C. and Inoue, K. (1996). Representing Priorities inLogic Programs,Proceedings of the 1996Joint International Conference and Syposium on Logic Programming (JICSLP’96), MIT Press,pp. 82–96.

Shanahan, M. (1997).Solving the Frame Problem: A Mathematical Investigation ofthe CommonSense Law of Inertia, MIT Press.

Touretzky, D. S. (1986).The Mathematics of Inheritance Systems, Pitman, London.