On the relationship between annotated logic programs and nonmonotonic formalisms

17
This article was downloaded by: [FU Berlin] On: 05 December 2014, At: 09:27 Publisher: Taylor & Francis Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House, 37-41 Mortimer Street, London W1T 3JH, UK Journal of Experimental & Theoretical Artificial Intelligence Publication details, including instructions for authors and subscription information: http://www.tandfonline.com/loi/teta20 On the relationship between annotated logic programs and nonmonotonic formalisms KRISHNAPRASAD THIRUNARAYAN a a Department of Computer Science and Engineering , Wright State University , Dayton, Ohio, 45435, USA Phone: tel: (513) 873 5134 E-mail: Published online: 27 Apr 2007. To cite this article: KRISHNAPRASAD THIRUNARAYAN (1995) On the relationship between annotated logic programs and nonmonotonic formalisms, Journal of Experimental & Theoretical Artificial Intelligence, 7:4, 391-406, DOI: 10.1080/09528139508953819 To link to this article: http://dx.doi.org/10.1080/09528139508953819 PLEASE SCROLL DOWN FOR ARTICLE Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) contained in the publications on our platform. However, Taylor & Francis, our agents, and our licensors make no representations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of the Content. Any opinions and views expressed in this publication are the opinions and views of the authors, and are not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon and should be independently verified with primary sources of information. Taylor and Francis shall not be liable for any losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoever or howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use of the Content. This article may be used for research, teaching, and private study purposes. Any substantial or systematic reproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in any form to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http:// www.tandfonline.com/page/terms-and-conditions

Transcript of On the relationship between annotated logic programs and nonmonotonic formalisms

Page 1: On the relationship between annotated logic programs and nonmonotonic formalisms

This article was downloaded by: [FU Berlin]On: 05 December 2014, At: 09:27Publisher: Taylor & FrancisInforma Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House,37-41 Mortimer Street, London W1T 3JH, UK

Journal of Experimental & Theoretical ArtificialIntelligencePublication details, including instructions for authors and subscription information:http://www.tandfonline.com/loi/teta20

On the relationship between annotated logic programsand nonmonotonic formalismsKRISHNAPRASAD THIRUNARAYAN aa Department of Computer Science and Engineering , Wright State University , Dayton, Ohio,45435, USA Phone: tel: (513) 873 5134 E-mail:Published online: 27 Apr 2007.

To cite this article: KRISHNAPRASAD THIRUNARAYAN (1995) On the relationship between annotated logic programsand nonmonotonic formalisms, Journal of Experimental & Theoretical Artificial Intelligence, 7:4, 391-406, DOI:10.1080/09528139508953819

To link to this article: http://dx.doi.org/10.1080/09528139508953819

PLEASE SCROLL DOWN FOR ARTICLE

Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) containedin the publications on our platform. However, Taylor & Francis, our agents, and our licensors make norepresentations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of theContent. Any opinions and views expressed in this publication are the opinions and views of the authors, andare not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon andshould be independently verified with primary sources of information. Taylor and Francis shall not be liable forany losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoeveror howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use ofthe Content.

This article may be used for research, teaching, and private study purposes. Any substantial or systematicreproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in anyform to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http://www.tandfonline.com/page/terms-and-conditions

Page 2: On the relationship between annotated logic programs and nonmonotonic formalisms

J. ExPT. THEOR. ARTIF. INTELL, 7(1995)391-406

On the relationship between annotated logic programsand nonmonotonic formalisms

KRISHNAPRASAD THIRUNARAYAN

DepartmentofComputer Science and Engineering, Wright State University,Dayton, Ohio 45435, USAtel: (513) 873 5134email: [email protected]

Abstract. In the past we developed a semantics for a restricted annotated logic languagefor inheritance reasoning. Here we generalize it to annotated Hom logic programs. We firstprovide a formal account of the language, describe its semantics, and provide an interpreterwritten in Prolog for it. We then investigate its relationship to Belnap's 4-valued logic,Gelfond and Lifschitz's semantics for logic programs with negation, Brewka's prioritizeddefault logics and other annotated logics due to Kifer et al.

Keywords: nonmonotonic reasoning; logic programming; stratification; negation

Received 13 June 1994; revision received and accepted 13 February 1995

I. IntroductionPragmatically, the logic programming paradigm can be thought of as a reasonable trade-offbetween expressive power and computational efficiency for knowledge representation andreasoning. The relational database community can view deductive databases as a suitablegeneralization of the relational languages to support recursive queries. The knowledgeengineers can consider Hom clause logic as a restricted nonmonotonic logic that is'tractable' (Ginsberg 1987, Minker 1988).

If a set of first-order logic sentences is inconsistent then every sentence in the languageis a theorem. Given that the detection of inconsistency is computationally hard (actually,impossible in the general case), and that there is no simple way to resolve an inconsistencyeven when it is detected, Belnap pursued the approach of 'weakening' the logic to makeit robust with respect to contradictory information (Belnap 1977). He described afour-valued logic as an alternative to classical predicate calculus to localize the effect ofa contradiction. Subsequently, these ideas were used to provide a semantics to logicprograms (Fitting 1991). Similarly, this logic was used to provide a semantics to a specialclass of inheritance hierarchies in Thomason et al. (1987). The four-valued logic was latergeneralized to multi-valued logics, to make precise the book-keeping operations performedby a nonmonotonic reasoning system that handles both strict and defeasible information(Ginsberg 1988). In all the above cases the underlying language is the traditional first-orderlanguage. But the semantics, instead of being two-valued, is given by mapping literals tovalues (or evidences) that are ordered on the basis of both truth-content and

0952-8 I3X195 $10·00 © 1995 Taylor & Francis Ltd.

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 3: On the relationship between annotated logic programs and nonmonotonic formalisms

392 K. Thirunarayan

information-content. For example, Tweety being a bird contributes positive or supportingevidence to its flying ability, while Tweety being a penguin contributes negative or defeatingevidence to its flying ability. This can be represented by mapping fly(Tweety) to theconstants + bird and - penguin, respectively. Furthermore, knowing that Tweety is apenguin is more informative than knowing that it is a bird. This can be represented by lettingthe constant penguin have higher information-content than the constant bird.

The approaches described by Kifer and Li (1988), Kifer and Lozinskii (1992), Kifer andSubrahmanian (1992), and Thirunarayan and Kifer (1993) extend the underlying first-orderlanguage using annotations. These annotations can be thought of as abbreviatedjustifications or pieces of evidence that can be ordered on two different scales-the truthscale and the information scale. In general, one can represent strict/defeasible evidence andvarious levels of defeasible evidence using this approach. The aforementioned papersillustrate the use of annotated logics in rule-based expert systems with uncertainty, temporalreasoning problems, reasoning with inconsistency, etc. We used such a language torepresent non monotonic multiple inheritance networks (Thirunarayan and Kifer 1993),and developed a semantics for it by amalgamating concepts from logic programming(Apt et al. 1987) and multi valued logics (Ginsberg 1988). The basic motivation for all theseupgrades is to make the language more expressive while simultaneously retaining thecomputational advantages of efficiency and simplicity ofthe underlying logic programmingmachinery.

Section 3 generalizes our work described ilJ'Thirunarayan and Kifer (1993) in variousdifferent directions to obtain an enriched representation language. In particular, therule-body that contained just one literal (which was sufficient for our modest purposes ofrepresenting non monotonic inheritance networks) is extended in the direction of Kifer andSubrahmanian (1992) by permitting rules to be Hom clauses. That is, we permit rule-bodiesto be conjunctions of literals and rules to be recursive. Furthermore, we let function symbolsto appear in object terms, and classical negation in literals. In Section 2, we present a simpleexample of annotated logic programs. We describe their syntax in Section 3.1, and developa model-theoretic semantics in Section 3.2. (Refer to Thirunarayan and Kifer (1993) foran informal account of the motivation for the technical apparatus used.) For concreteness,we also present a meta-interpreter written in Prolog for answering queries with respect toannotated logic programs in Section 3.3. We then investigate, in detail, its relationship toBelnap's 4-valued logic, Gelfond and Lifschitz's (1990\ semantics for logic programs withnegation, Brewka's (1989) prioritized default logics, and other annotated logics due to Kiferet al. in Section 3.4. The goal is to get a better understanding of their similarities, and thesubtle differences among these approaches. Finally, we summarize our conclusions inSection 4.

2. Motivating exampleWe illustrate our approach by specifying the normal and the faulty behaviour of an inverteras an annotated logic program. The value of the output of the inverter is 'opposite' to itsinput if the inverter is normal; they are the same if there is a short-circuit fault.

Let Id be an inverter with input node in(ld) and output node out(ld). Let val(N) standfor the value of the node N. A logical I (resp. 0) on node N is represented by a positive(resp. negative) evidence supporting val(N). So, the normal behaviour of the inverter canbe formalized as: If there exists positive (resp. negative) evidence for val(in(ld), then thereis negative (resp. positive) evidence for val(out(ld), and the short-circuit behaviour as:If there exists positive (resp. negative) evidence for val(in(ld)), then there is positive (resp.negative) evidence for val(out(ld). Furthermore, under short-circuit conditions, the latter

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 4: On the relationship between annotated logic programs and nonmonotonic formalisms

Annotated logic and nonmonotonic formalisms 393

rule should dominate the former one. In order to capture this, we associate with each atoman annotation (which is a signed constant) that summarizes the nature and the strength ofevidence. Thus the normal behaviour is now formalized as: If there exists some positive(resp. negative) evidence for val(in(ld», then there is negative (resp. posiJive) evidence ofstrength norm for val(out(ld», and the short-circuit behaviour as: If there exists somepositive (resp. negative) evidence for valiinildi), then there is positive (resp. negative)evidence of strength short for valiouttldi). Furthermore, the evidential constants areordered as: :t norm < :t short to override conclusions derived under the assumptions ofnormality, in the presence of short-circuit fault. Note that a net positive (resp. negative)evidence stands for logical I (resp. 0).

In the language of annotated logic programs, the inverter can be specified as follows,assuming that + E (resp. - E) stands for the smallest positive (resp. negative) evidence:

val(out(ld»: + norm f- val(in(ld»: - E.

val(out(ld»: - norm f- val(in(ld»: + E.

An inverter with a short circuit can be modelled as:val(out(ld»: + short f- val(in(ld»: + E, fault(ld, short): + E.

val(out(ld): - short f- valtintlds): - E, fault«d, short): + E.

where norm < k short. In other words, the positive evidences such as + norm and+ short (resp. the negative evidences such as - norm and - short) support the truthvalue logical I (resp. logical 0) of out(lD) with different degrees of support.

Assuming + max (resp. - max) stands for the largest positive (resp. negative)evidence, if the input node in(ld) is at logical I (e.g. val(in(ld»: + max holds), we inferthat the output is at logical 0 (e.g. val(out(ld): - norm holds). However, if we later learnthat the inverter has a short (e.g.fault(ld, short): + max holds), then we revise our beliefand infer that the output is at logical I (e.g. valioutildr): + short holds). Thus, even thoughwe have conflicting evidences - norm and + short supporting val(out(ld», the conflictcan be resolved in favour of the conclusion val(out(ld): + short.

We now provide a detailed formalization of these ideas along the lines of Thirunarayanand Kifer (1993).

3. Annotated logic programs

3.1. SyntaxA term is an individual constant or a variable, or an n-ary function symbolfapplied to termstl, ti. ... , tn,that is,fitlo ti. ... ,tn).An atom is a proposition constant or a formula etr., ... ,I,n),where q is an n-ary predicate symbol and tiS are terms, Literals are of the form p: r, wherep is an atom and r is an annotation drawn from the domain of annotations .sri. A rule isan expression of the form p :r f- ql :Ylo ... ,qm: Ym where p and qiS are atoms and rand YiSare annotations. The literal p: t is referred to as the rule-head, while qs :Ylo ... ,qm: Ym isreferred to as the rule-body. Afact is a ground (i.e. variable-free) literal. A clause is eithera fact or a rule. An annotated logic program is a set of clauses.

The annotations are ordered along two different dimensions (Belnap 1977): in one, theyare partially ordered by .;; kon the basis of their information-content; in the other, they arerelated by an equivalence relation =, on the basis of their truth-content. (In fact, we requirethat .;; k: be a semilattice, that is, a partial order equipped with a least-upper-boundoperation.) We define:

• (r<kY) if and only if (r';;ky),,(r * kY); and• (r';;,kY) if and only if (r';;ky),,(r=,y).

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 5: On the relationship between annotated logic programs and nonmonotonic formalisms

394 K. Thirunarayan

Furthermore, for our purposes, we assume that > t has only the following three equivalenceclasses: re-, re*, and (tr, corresponding to the defeating, ambiguous, and supportingevidences, respectively. We also assert the existence of the smallest element, denoted e,and the largest element, denoted co, in each of the three classes.

We impose certain acyclicity restrictions on the annotated logic programs for reasons thatwill become clear in the next section. This acyclicity requirement is a generalization of thelocal stratification condition for ordinary logic programs (Przymusinski 1988).We formalize this requirement by defining a relation ~ on the ground atoms as follows:We say that q ~ rp holds if there is a ground instance p: a +- q, :)' ,q: fl, ,q.n:)'n ofa rule in the program P, or there is a ground instance p: a +- q, :)' ,r: r, ,q.n:)'n of arule in P and q ~ pro We demand that, for annotated logic programs of interest, the relation~ p be acyclic. In the sequel, we refer to annotated logic programs that satisfy this conditionas stratified annotated logic programs, and abbreviate them as SALPs.

3.2. Model-theoretic semanticsLet P be an annotated logic program. The domain qgof interpretations of P is a collectionof all individual constants mentioned in P, and the ground (variable-free) terms that canbe formed from them using function symbols; it is often called the universe of P. A base,fJBp, of P is a collection of all ground atoms p that use only terms of qg and the predicatesymbols mentioned in P.

An interpretation J of P is a partial mapping from the base, fJBp, of P to the set ofannotations sQ. Given two interpretations J and f, fCkJ (resp., fCtkJ) if and onlyif for every atom p E fJBp, such that f(P) is defined, J(p) is also defined and f(P) '" kJ(P)(resp., f(P) '" tkJ(P)). An interpretation J is minimal in a set of interpretations 51' if andonly if there is no fE51' such that fC kJ and f *- J; J is maximal if and only if thereis no fE51' such that JCkf and f *- J.

A ground literal (fact) p :r is satisfied in J, denoted JF ip : r, ifand only if J(p) is definedand r '" kJ(P); it is strongly satisfied in J, denoted JF tiJl: r, if also r '" tkJ(P).

A conjunction of ground literals q, :)'.. q2:)'2, ... ,qn:)'n (denoted as BODY) is satisfiedin J if and only if (Vi: I '" i '" n: ~JF ~i: )'i); it is strongly satisfied if and only if(Vi: I '" i '" n: ~Ft~i:)';).

A ground rule HEAD +- BODY is satisfied in J if and only if BODY is strongly satisfiedimplies HEAD is satisfied. That is, a ground rule p:t+-q, :)'" ... ,qn:)'n is satisfied in Jifand only if (Vi : I '" i '" n: ~JF I~i: )'i) implies JF iJl: r. Note that this is consistent withthinking of facts as if they were rules with the empty body, which is always strongly satisfiedin all interpretations. A non-ground rule HEAD +- BODY is satisfied in J if and only if allits ground instances are satisfied in J.

An annotated logic program P is satisfied in J, if all its clauses are satisfied in J.An interpretation J is a model of a set of clauses P if and only if P is satisfied under J.A model J of P is supported by P if for every atom p such that J(p) is defined, wehave

J(p) = lubd tiP: r +- BODY is a ground instance of a clause in P and JF tk: BODY}

We assume that J is undefined on any atom that does not appear in the head of a groundinstance of a rule in P. Informally, J is supported by P if the evidences that it assigns toatoms are not stronger than what is warranted by P. (Recall also that a fact can be thoughtof as a rule with the empty body.)

In general, there are annotated logic programs that admit zero or more supported models.

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 6: On the relationship between annotated logic programs and nonmonotonic formalisms

Annotated logic and nonmonotonic formalisms 395

This is in contrast with the definite clauses which admit a unique minimal supported model.The reason for the first discrepancy is the fact that general annotated logic programs canbe recursive and the addition of new facts can cause the truth values of the conclusions tochange nonmonotonically. For instance, consider the following program:

p:-If-q:+1.q: + I f-p: + I.p: + I.

The minimal model of this program is: (p:*l, q: + I}, given that lubl-I, + 1)=*1.This model is not supported because q: + I is unsupported. The latter condition arisesbecause p: + I is not strongly satisfied in the model. On the other hand, the reason for theexistence of multiple supported models can be traced to mutual recursion. For instance,the program

p:rxf-q:p.q: f3 f- P : rx.

has two supported models: 0 and {p: rx, q: Pl. We can filter out the second model containingcyclic 'ungrounded' support by insisting on the minimality condition. However this is notsufficient because stratified programs can have several minimal supported models in thepresence of recursion. For example, ·the following program:

r: + I.r: -2f-p:-1.p: +2f-p: +2.p: - I.

admits two minimal supported models: {{p: - I, r: - 2}, {p: + 2, r: + I} }.However, when we restrict our attention to SALP, we can prove the following results

by adapting techniques in Apt et al. (1987) as described in Thirunarayan and Kifer (1993).

Lemma 3.1. Every annotated logic program containing only facts has a unique supportedmodel, if :;;; k is a semi/attice.

Theorem 3.1. Every stratified annotated logic program has a unique supported model,if :;;; k is a semi/attice.

Theorem 3.2. The supported model of an annotated logic program is always minimal.

Proof. The supported model Af is minimal because any interpretation(Jc kAf 1\ J *At) holds cannot be a model.

Another characteristic property of the SALPs is their stability.

J such thato

Theorem 3.3. Let P be a stratified annotated logic program and r be a clause. Let .If I

and .(fz be the unique supported models of P and P U (r) respectively. Then, .(fIF tk: r ifand only if '(f, = .(f2•

This important property does not hold for a number of popular nonmonotonic theoriesbased on first-order logic language such as the theories of McCarthy (1986) and Reiter(1980), because the language does not explicitly distinguish between strict and defeasibleconclusions. In particular, a defeasible conclusion in the circumscriptive theory of

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 7: On the relationship between annotated logic programs and nonmonotonic formalisms

396 K. Thirunarayan

McCarthy (1986) and the default logic of Reiter (1980) is incorrectly accorded the statusof a strict fact when it is added to the original theory.

3.3. A meta-interpreter in PrologIn this section we present a meta-interpreter written in Prolog to answer queries with respectto annotated logic programs.

The Prolog encoding of the inverter example is essentially the same as the one describedin Section 2 except that the constant € has been replaced by an anonymous variable.We have also added two new facts to illustrate the handling of ambiguity.

:- op(l150, xfx, [<-)).val(out(ld)): + norm < - val(in(ld)): - _.val(out(ld)): - norm <- val(in(ld)): + _.val(out(ld)): + short < - val(in(ld)): + _' fault (ld,short): + _.val(out(ld)): - short < - val(in(ld)): - _' fault (ld,short): + _.val(in(inv I)): + max < - true.val(in(invO)): + max < - true.fault(invO,short): + max < - true.val(node I): + vdd < - true.val(nodel): - gnd <- true.

The ordering and the equivalence of the strength of evidences on the information contentscale (that is, the relations < k and = k) can be represented in Prolog using the operators': <li' (defined in terms of ': < ') and ': = =' (defined in terms of ': = '), respectively, asfollows:

:- op(800, xfx, [: <, :<li, : =, :==)).norm : < short.short: < max.vdd : = gnd.

The operator ': <li' is the transitive closure of ': <li', and the operator ': =' is theequivalence relation covering ': = '.

M I : <li M2 : - M I : < M I : < M2.M1 : <li M2 : - M I : < M3, M3 : <li M2.Ml :==M2 : - MI ==M2Ml :==M2 :-MI :=M2.Ml :==M2:-M2:=MI.Ml :==M2 : - MI : = M3, M3 :==M2.

To incorporate numbers, add:

M I : <li M2 : - number(M I), number(M2), M I < M2.

The meta-interpreter processes queries of the form '?(Atom: Evid) , . It first computes thecumulative evidence supporting Atom. If the variable Evid in the query is bound, then itchecks to see whether the cumulative evidence strongly satisfies the value of Evid;otherwise, it returns the computed cumulative evidence in Evid.

:- op(800, fy, I?)).?( true ).?( (Gl,G2)) :-?( Gl ), ?( G2).

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 8: On the relationship between annotated logic programs and nonmonotonic formalisms

Annotated logic and nonmonotonic formalisms

?( Atom:Evid ) :- findall( E, «Atom:E < -Body),?(Body», EL),lube EL, Cum_Evid),(var(Evid)- > Evid = Cum_Evid;

sign_mag(Evid,S,M),sign_mag(Cum_Evid,S,CM),(var(M)- > M = CM;

(M :<1(CM; M :== CM»).

397

The evidences are combined by computing their least upper bound with respect to < k.

by examining their sign and magnitude. If the magnitude of an evidence is clearly higherthan that of the other, then the former dominates. If the two evidences have the samemagnitude, but different signs, then there is a conflict/ambiguity/inconsistency.

:- op(500, fy, [*]).

lube [Ej, E).lube [El,E2IELj, E) :- combine(El,E2,ET), lub( [ETIELJ, E).

signjnagf + M, +, M).sign jnagf - M, -, M).sign_mag(*M, *, M).

combine(E I,E2,E) :- sign_mag(El,S I,M I), sign_(E2,S2,M2),(Ml :<1(M2->E=E2;

(M2 :<1(Ml->E=El;(Ml :==M2->

(SI = 52-> E = EI;sign_mag(E,*,MI) »».

The following query-response pairs illustrate the working of the meta-interpreter.

I ? - ?(val(out(inv I»: V).V = -normI ? - ?(val(out(invO»: V).

V = + shortI ? - ?(val(node I): V).V = *vddI ? - ?(val(out(invO»: + M).M = shortI ? - ?(val(out(invO»: *M).noI ? - ?(val(out(invO»: - norm).noI ? - ?(val(out(invO»: norm).yes

3.4. Relationship to nonmonotonic formalismsWe now explore equivalence results between annotated logics and other nonmonotonicformalisms.

3.4.1. Belnap'sfour-valued logic. We first map the truth values in the four-valued logic

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 9: On the relationship between annotated logic programs and nonmonotonic formalisms

398 K. Thirunarayan

T

­<tFigure I. Semilattice and Belnap's bilattice.

into equivalent annotations and then study the relationship between the logical connectivesused in the two formalisms.

We restrict our attention to the semi lattice shown in Figure I. The values - w, + w, and*w in the semi lattice correspond to the values f, t and T, respectively, in Belnap's bilattice.The undefinedness in our approach is captured by .L in the bilattice. Consequently, we canassociate a unique .interpretation e(fJa) with every four-valued (Belnap) interpretation fJaas follows:

fJa(p) =tiff e(fJa)(p) = + wfJa(p) = f iff e(fJa)(p) = - wfJa(p) = Tiff e(fJa)(p) =*wf!d(p) = .L iff e(fJa)(p) is undefined

However, the meaning of the connectivities ',' and '~' in the rule

p:r:t.~q, :YI, ... ,q:{J, ... ,qn:Yn

is very different from the meaning associated with the conjunction'&' and the implication'=)', respectively of Belnap's logic shown in Figure 2.

Recall that the notion of (strong) satisfaction of an annotated literal in an interpretationis two-valued. Thus, the connective ',' used in the annotated logic, is the classical(two-valued) 'and', while the connective '&', used in Belnap's logic, is a conservativeextension of 'and' to all four values of the bilattice. Similarly, the annotated logic rule withthe connective '~ , resembles a classical logic inference rule, while' =) " which representsentailment in Belnap's logic, resembles a classical logic implication. In particular,p: + w~q: - w is not equivalent to q: + w~p: - w, while p=)q is equivalent to-,q=)-,p.

We now explore equivalence results for the two theories.

f T

.l L f .1. f

f f f f f

t .1. f t T

T f f T T

.l valid invalid valid valid

f valid valid valid valid

t invalid invalid valid invalid

T valid invalid valid valid

Figure 2. Truth tables for Belnap's logic.

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 10: On the relationship between annotated logic programs and nonmonotonic formalisms

Annotated logic and nonmonotonic formalisms 399

Definition 3.1. An w-program (resp. w-literal) is a SALP (resp. an annotated literal)whose annotations are restricted to ( - w, + w).

An w-program can be translated into Belnap's logic as follows:

f(p: +w)==pf(p: - w) ==-,pFtp : rx (-ql :1'1, ... , q.: 1'.) == Ftq, :1'1)& ... &f(q.: 1'.)~ f(p: «)

The following result is an immediate consequence of the definitions of f, e, minimalitywith respect to information lattice (Belnap 1977), and Theorem 3.1. 0

Theorem 3.4. Let P be an co-program that contains only facts. Then, a Belnapinterpretation f!4 is the minimum model of f(P) if and only if the interpretation e(f!4) isthe supported model of P.

Theorem 3.5. Let P be an co-program that is negation-free (that is, it does not containany negative evidence annotation). Then, a Belnap interpretation f!4 is the minimum modelof f(P) if and only if the interpretation e(f!4) is the supported model of P.

Proof. The result follows by a simple induction on ~ -relation once we observe that (1)P is not recursive, and (2) In the absence of negation in f(P), no new negative literals areentailed by contraposition of rules. 0

However, when programs contain both negation (that is, negative annotation) andentailment, the equivalence results no longer hold. For instance, consider the annotatedprogram P = {p: - w (- q: + w, p: + w, q: + w). The unique supported model "I, of P,according to our semantics, maps p to *w and q to + w. The translation of P into Belnap'slogic, f(P), is (q~--.p,p,q). The minimum model f!4 of J'(P), according to Belnap's logic,maps both p and q to T. Thus, the supported model "I, and the image under e of Belnap'sminimum model f!4, agree on p, but differ on q.

3.4.2. Logic programs with classical negation. We now investigate relationship to thesemantics of logic programs that support both classical negation (denoted -,) andnegation-by-failure (denoted not) as developed by Gelfond and Lifschitz (1990). (The twonegations differ in that the meaning associated with the program {p(-not q} is the set [p},while that of (p(--,q) is the set I}.)

The two theories differ as follows: In our theory there is no counterpart for thenot-operator. Secondly, even though recursion is permitted in the language, a groundinstance of a SALP is recursion-free. This is in contrast with the semantics of Gelfond andLifschitz (1990) which permits the ground instances to be recursive. On the other hand, ourtheory enables a satisfactory representation of a certain class of common-sense facts,because annotations can be used to make explicit meta-information (such as specificity)required to resolve conflicts among contradictory conclusions.

To better understand the relationship between the two theories, we study the class ofw-programs. These programs can be naturally viewed as logic programs with classicalnegation according to the following translation:

f(p: +w)==pf(p: -w)==--.pFtp:« (- q, :1'10 ... , q.: 1'.) sa f(p: «) (- f(p: 1'1), ... , f(q.: 1'.)

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 11: On the relationship between annotated logic programs and nonmonotonic formalisms

400 K. Thirunarayan

Recall that the annotations { - w, + w, *w} are the maximal elements with respect to:;;; Ik-ordering.

Definition 3.2. Let P be an w-program. An interpretation J ofP is w-consistent if it doesnot satisfy any literal of the form p: *w. 0

Definition 3.3. An w-program P is said to be consistent if the supported model iscu-consistent, 0

We wish to show here that the two theories 'agree on' the class of consistent w-programs.To move towards this goal, we review the notion of answer sets (Gel fond and Lifshitz 1990).A word about the usage of the term 'literal'. We reserve 'literal' to stand for a literal inordinary logic programs, and use 'co-literal' to refer to an annotated literal in w-programs.

Definition 3.4. Let Q be a logic program that does not contain not, and Lit be the setofall ground literals ofQ. Then, the answer set cxQ ofQ is the smallest subset of Lit suchthat

( I) for any ground instance 10'c-II, ... , l-« ofa rule in Q, if {II, ... , I;"} E cxQ, then 10 E cxQ.(2) if cxQ contains a pair complementary literals, then cxQ is Lit. 0

Lemma 3.2. Let Q be a consistent logic proiram that does not contain not. Then, theanswer set cxQ is consistent and unique.

Proof. Follows from Proposition 2 in Gelfond and Lifshitz (1990) and the fact that definiteclauses have unique answer sets. 0

In order to relate answer sets to interpretations, we make the following definition.

Definition 3.5. Let S be a consistent set of ground literals. Then, the mapping <1>(S) isdefined as: <1>(S)(P) = + w iff pES and <1>(S)(P) = - w iff -.p E S.

Lemma 3.3. The mapping <1>(S) above is an to-consistent interpretation.

Proof. As S is consistent, <1>(S) is a partial function. o

Lemma 3.4. Let p: cx be an to-literal, and S be a consistent set ofground literals. Then,

(I) <1>(S) F,k p: cx iff T(p: cx) E S.(2) <1>(S) F,k p: cx iff <1>(S) Fk p: cx.

Proof. (I) Follows from the definitions of T, <1>, and the fact that S is consistent.(2) (=> ) Trivial. (<=) Since S is consistent, there does not exist an atom p such that

pES 1\ --.p E S. Given that the annotations { - w, + w) are the maximal elements withrespect to :;;; k-ordering, the result follows. 0

Lemma 3.5. Let P be an w-program. A consistent subset S is closed under a groundinstance Ftp : cx) 'c- Ftq, : YI), ... , Ftq«: Yn) ofa rule in T(P) if and only if the interpretation<1>(S) of P satisfies the ground instance p: cx 'c- ql :YI, ... .q.: Yn of the corresponding rulein P.

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 12: On the relationship between annotated logic programs and nonmonotonic formalisms

Annotated logic and nonmonotonic formalisms

Proof. Follows from the definitions of F, <P and Lemma 3.4.

401

o

Theorem 3.6. Let P be a consistent co-program, Atp be the supported model ofP, andIXp be the answer set associated with F(P}, Then, Atp = IXp.

Proof. From Definition 3.4. it is clear that, for a consistent logic program, the answer setis the smallest set of ground literals closed under ground instances of the program clauses.Similarly, the supported model is the minimum interpretation that satisfies all the groundinstances of the w-program clauses from Theorem 3.2. So the result follows the Lemma3.5.

However the two semantics differ in their interpretation of co-programs that are notconsistent. For instance, the program P = [p: + w, p: - co, q: + w I has a unique supportedmodel Atp = {p: *w, q: + w} according to our semantics, while Gelfond and Lifschitz(1990) associates with the translation J'(P) = {p, __p, q} the answer set IXp = {p, __p, q, -.q}.In other words, the effect of inconsistent information about p is 'localized' in our approach,whereas it has 'global' repercussions in the approach of Gelfond and Lifschitz (1990).

3.4.3. Relationship to default logics. We investigate relationship to Brewka'sprioritized default logic (POL), a generalization of Reiter's default logic (Brewka 1989).

A PDL-spec is an n + I-tuple T = (D" Dz, ... "Dn , W), where W is a set of classicalfirst-order logic formulas, and each D, is a set of (Reiter's) defaults (Brewka 1989).Furthermore, for i >J, the defaults in D, have priority over the defaults in D, in the eventof a 'conflict'. This can be formally expressed by generalizing Reiter's notion of extensionas follows (Brewka 1989): C is a PDL-extension of T iff there exists a sequence of setsof formulas E" ... .E; such that

En is an extension of (Dn,W),

En -, is an extension of (D; _ " En),En- z is an extension of (Dn-z, En-,),

E, is an extension of (D" E2 ) and C = E,.

We identify special subsets of SALPs and POL-specs that can be regarded as equivalent.Toward this goal we make the following definitions.

Definition 3.6. A (Reiter) default rule P: MNC (where the consequent C, the pre-requisiteP and the assumption A are first-order formulas), is called a normal default if A sa C; itis called a Hom default if C is a (FOL) literal. 0

Definition 3.7. A PDL-spec T = (D" Dz, '" ,Dn, W) is called a restricted POL-spec if

I. (consistency) W is a consistent set of (FOL) literals,2. (normal and Hom defaults) The default rules in each D, are both normal and Hom.3. (stratification) The ground instances ofliterals in the pre-requisite P ofa default rule

P: MC/C in D, appear as consequents of defaults only in U Z=i+ ,D,.

Now we identify special subsets ofSALPs that can be shown to be equivalent to restrictedPOL-specs. Consider the set of annotations ({ - , + ,*) x {1,2, ... ,w}) with the followingsemi lattice ordering defined on it: (Here, the annotation (+, 2) is denoted as + 2.The former is referred to as the sign and the latter as the magnitude of the annotation.)

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 13: On the relationship between annotated logic programs and nonmonotonic formalisms

402 K. Thirunarayan

Figure 3. Linear semilattice.

For annotations iX, fJ:

iX < kfJ iff [mag(iX) < mag(fJ)] v[(mag(iX) = mag(fJ)) 1\ (sign(iX) E ( - , + })1\ (sign(fJ) = *)]

iX <'k iff (mag(iX) < (mag(fJ)) 1\ (sign(iX) = sign(fJ))

This semilattice is depicted in Figure 3, and is referred to as the linear semilattice.

Definition 3.8. A SALP is called linear if the annotations belong to the linear semilattice,

One can show that there is a natural correspondence between restricted POL-specs thatadmit unique POL-extensions and linear SALPs that are consistent. More interestingly, itis possible to define the notion of a 'skeptical' extension by taking the intersection of allextensions strata by strata, and prove a stronger equivalence result between restrictedPOL-specs and linear SALPs.

f7 is a skeptical PDL-extension of a restricted POL-spec T iff there exists a sequenceof sets of literals Fi, ... ,F" such that

F" is the intersection of all extensions of (D", W),F" _ I is the intersection of all extensions of (D" _"F,,),

F, is the intersection of all extensions of (D I , F2) , and f7 = Fl.

In what follows, an extension of a restricted POL-spec is represented as a set of (FOL)literals.

We now present a translation of restricted POL-specs to SALPs.

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 14: On the relationship between annotated logic programs and nonmonotonic formalisms

Annotated logic and nonmonotonic formalisms 403

Definition 3.9. Let T =(D" D2, ••• ,Dn, W) be a restricted PDL-spec. The translation 'Pof T into an annotated logic program, denoted 'P(T), is as follows:

For every positive fact in W: 'P(P) =p: + co.For every negative fact in W: 'P(-,p) =p : - co.

For every default rule in D,:'P(q" ,qu, -,r" -,r,:Mp/p)=p: +if-qt: + I, ,qu: + 1, r,: -1, ,r.v : - 1.'P(q" ,qu, -,r" ,-,r,:M/-,p) = p: - if-ql: + I, ,qu: + I, r!: - I, , r.v : - 1.

o

Lemma 3.6. Let T = (D!, D" ... .D«. W) be a restricted PDL-spec. Then, the translation'P(T) is a linear SALP.

Proof. The result follows trivially once we note that the set of ground instances of thedefaults in T is stratified.

We now relate a supported model to a POL-extension. We will explicitly distinguish anFOL interpretation from an AL (annotated logic) interpretation.

Definition 3.10. Let J be an Als-interpretation. Then, the set ofground FOL-literals I(J)associated with J is defined as:

Jp IkfJ: + I iff p E )'V)Jp IkfJ: - I iff -,p E 1(.1) o

Lemma 3.7. Let J be an Al-interpretation. Then, the set of ground FOL-literals 1(,1)is consistent.

Proof. Observe that {p: *n} ~ 1k[J: + I and {p: *n} ~ Ik p: - I, for any n;;' I. So, theliterals in J with 'inconsistent' annotations do not contribute to J(J). 0

Lemma 3.8. Let P be a restricted PDL-spec containing only literals, and 'P(P) be thecorresponding linear SALP. Then, the set of FOL-literals J(J) is the skeptical extensionof P if and only if the Al-lnterpretation J is the supported model of 'P(P).

Proof. As P is consistent and contains FOL-literaJs alone, it has a unique extension. Sothe claim follows trivially from the definitions of 'P and I. 0

Theorem 3.7. Let P be a restricted POL-spec, and 'P(P) be the corresponding linearSi\LP./fthe AL-interpretation J is the supported model of 'P(P), then the set ofFOL-literals1(..1) is the skeptical extension of P.

Proof. Given that J is the supported model of 'P(P), 3n: Jp IkfJ: + n iff p E 1(J), andsimilarly, 3n :Jp IkfJ: - n iff -,p E 1(J). To show that 1(,1) is the skeptical extension ofP, we show that there exists a derivation of p (resp. -,p) in the restricted POL-spec P foreach p (resp. -,p) in 1(J).

This can be proved by induction on the number of groups of defaults with differentpriorities (which is also the length of the derivation of p (resp. -,p» in POL-spec P.For the basis case, we have Lemma 3.8. For the induction step, we assume the result holdsfor the restricted POL-spec (D, + " ... .Di; W)and show that it also holds for (D" ... .Di; W).Given the translation 'P, it can be easily verified that if ,1p 1k[J: + i (resp. Jp 1k[J: - i) then

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 15: On the relationship between annotated logic programs and nonmonotonic formalisms

404 K. Thirunarayan

p (resp. -.p) is derivable in (D;, ... .D«; W) using a default in D;. If JF lk{J: *i then neitherp nor -.p belong to 1"(.1'). 0

The converse, however, is not true as illustrated below: Consider the POL-spec{(p:Mrlr}(q:Mplp,q:M-.pl-,p), {q}} and the corresponding translation {r: + I f-p:+ I, p : +2f-q: + I, p: -2f-q: + I, q: +w}. (q) is the skeptical extension of thePOL-spec, and {p: *2, q : + w} is the supported model of the SALP. Furthermore, 1"({p: *2,q: + w}) = {q}. However, {p: * I, q: + w} is not a supported model, even though 1"({p: * I,q: +w})={q}.

Theorem 3.8. Let P be a restricted PDL-spec, and 'P(P) be the corresponding linearSALP. If 'P(P) is consistent, then AL-interpretation .1' is a supported model of 'P(P) if andonly if 1"(J.) is a unique PDL-extension of P.

Proof. Observe that 'P(P) being consistent implies that there does not exist an atom p forwhich ofF "p: *n holds. Now the result follows by induction on the length of the derivationas given in Theorem 3.7.

Remarks. The above results are rermruscent of the following correspondence: ThePOL-extensions associated with a restricted POL-specs is in same relationship to thesupported model of the corresponding linear SALP, as preferential semantics of negationas failure in logic programs is to well-founded semantics of Oung (1991), which, in turnis the same as the relationship between a credulous theory of inheritance to the'corresponding' skeptical theory (Horty et al. 1991).

3.4.4. Relationship 10 other annotated logics. We now sketch the basic differencesbetween the semantics of annotated logics given in the works of Kifer and Li (1988), Kiferand Lozinskii (1992), and Kifer and Subrahmanian (1992), from the one presented here.

In Kifer and Li (1988), the annotations are complex certainty terms (containing functionsymbols and variables) whose values are in the range [0, I]. The annotations all representsupporting evidence. The rules with the same head-predicate are assumed to be independent.The combining-function, which pools together evidence from different rules, is predicatespecific. In contrast, our approach uses constant annotations from a set with upper-semilat­tice structure. An annotation can represent either supporting or contradicting evidence. Thecombining function is the least-upper bound operation. Furthermore, in the presence ofexceptions, the different rules with identical head-predicates are effectively mutuallyexclusive. This is because, the evidence contributed by a rule to a conclusion may overridethe evidence contributed by another less specific rule, in case of conflict. The formersemantics captures reasoning with uncertainty, while the latter semantics capturesdefeasible reasoning.

The semantics of annotated logics given in Kifer and Lozinskii (1992) and Kifer andSubrahmanian (1992) differs from our approach in the interpretation of the f- -operator.In particular, f- -operator differs from both epistemic implication and ontologicalimplication of Kifer and Lozinskii (1992) as illustrated below. Assume that the truth valuest and f correspond to + wand - co, respectively.

• Consider the program: [p: t f- q :t, q: t}. Our approach associates with it the supportedmodel: {p:t, q:t]. The f--operator differs from the epistemic implication becausethe latter does not allow us to draw the conclusion p :t, to guard against the possibilitythat the premise may turn out to be inconsistent.

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 16: On the relationship between annotated logic programs and nonmonotonic formalisms

Annotated logic and nonmonotonic formalisms 405

• Consider the program: {p: t f-- q: t, q: T }. Our approach associates with it thesupported model: {q: T }. The f-- -operator differs from the ontological implicationbecause the latter allows us to draw the conclusion p: t, in spite of the fact that thereis inconsistent information about q.

More formally, one can define the 'standard' f/p-operator that maps interpretations tointerpretations, and study its properties (Apt et al. 1987).

Definition 3.11. Let P be an annotated logic program and f be an interpretation of P.Then,

f/p(f)(P) = luhtl riP: r f-- BODY is a ground instanceof a clause in P and fF rk BODY} o

According to Lemma I of Kifer and Li (1988) (assuming that certainty functions andcombining functions are monotonic) and Theorem 1 of Kifer and Subrahmanian (1992),

Theorem 3.9. f/p is monotonic, that is, f k: / => f/p(f) k: f/p(,1).

On the contrary, the f/p-operator according to our semantics is nonmonotonic(Thirunarayan and Kifer 1993). In particular,

f ,,;; d =#f/p(f)";; kf/pU).

f ,,;; rk/ =#f/p(f) ,,;; rkf/p(,1).

However it satisfies the following weaker property:

f ,,;; rd => f/p(f) ,,;; kf/p(,1).

4. ConclusionsIn this paper we extended the annotated language of Thirunarayan and Kifer (1993) invarious directions to obtain an enriched representation language. In particular we permittedrule-bodies to be conjunction of literals, and the rules to be recursive. (However, the literalsin our language do not contain variables as annotations.) We identified a class of annotatedlogic programs called the stratified programs which can be given a unique supportedminimal model as their meaning. We also described a Prolog interpreter for the language.We then proved certain equivalence results with respect to Belnap's 4-valued logic, Gelfondand Lifschitz's semantics for logic programs with negation, Brewka's prioritized defaultlogics and Kifer et al.'s annotated logics, and presented simple examples to illustratesituations where the equivalence results break down.

AcknowledgementsThis work was supported in part by NSF grant IRI-9009587.

ReferencesApt, K. R., Blair, H. A. and Walker, A. (1987) Towards a theory of declarative knowledge. In J. Minker

(ed.) Foundations ofDeductive Databases and Logic Programming (Morgan Kaufman) pp. 89-148.Belnap, N. (1977) How acomputershould think. In G. Ryle (ed.) Contemporary AspectsofPhilosophy (Oriel

Press) pp.3D-56.Belnap. N. (1977) A useful four-valued logic. In J. Dunn and G. Epstein (eds) Modern Uses ofMulti-valued

Logic (D. Reidel) pp.8-37.Brewka, G. (1989) Preferred subtheories: an extended logical framework for default reasoning.

In Proceedings of the Eleventh International Joint Conference 011 Artificial Intelligence.pp.1043-1048.

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014

Page 17: On the relationship between annotated logic programs and nonmonotonic formalisms

406 K. Thirunarayan

Dung, P. M. (1991) Negation as hypotheses: an abductive foundation for logic programming. In Proceedingsof the Eighth International Conference on Logic Programming, pp.3-17.

Fitting, M. (1991) Bilattices and the semantics of logic programming. Journal of Logic Programming,11,91-116.

Gelfond, M. and Lifschitz, V. (1990) Logic programs with classical negation. In Proceedings ofthe SeventhInternational Conference on Logic Programming, pp.579-597.

Ginsberg, M. L. (ed.) (1987) Readings in Nonmonotonic Reasoning (Morgan-Kaufmann).Ginsberg, M. L. (1988) Multi-valued logics: a uniform approach to reasoning in artificial intelligence,

Computational Intelligence, 4, 265-316. ,Horty, J. (1993) Some direct theories of nonmonotonic inheritance. in D. Gabbay, C. Hogger and

J. A. Robinson (eds) Handbook ofLogic in Artificial Intelligence and Logic Programming (OxfordUniversity Press).

Kifer, M. and Li, A. (1988) On the semantics of rule based expert systems with uncertainties. In Proceedingsof the Second International Conference on Database Theory (Springer Verlag). 326,102-117.

Kifer, N. and Lozinskii, E, L. (1992) A logic for reasoning with inconsistency, Journal of AutomatedReasoning, 9, 179-215.

Kifer, M. and Subrahmanian, V. S. (1992) Theory of generalized annotated logic programming and itsapplications. Journal of Logic Programming, 12,335-368.

McCarthy, J. (1986) Applications of circumscription to formalizing common-sense knowledge. ArtificialIntelligence. 28, 89-116.

Minker, J. (ed.) (1988) Foundations ofDeductive Databases and Logic Programming (Morgan Kaufmann).Przymusinski, T. C. (1988) On the declarative semantics of deductive databases and logic programs.

In J. Minker (ed.) Foundations of Deductive Databases and Logic Programming (MorganKaufmann) pp. 193-216.

Reiter, R. (1980) A logic for default reasoning. Artificial Intelligence, 13,81-132.Thimnarayan, K. and Kifer M. (1993) A theory of nonmonotonic inheritance based on annotated logic.

Artificial Intelligence. 60, 23-50.Thomason, R. H., Horty, J. and Touretzky, D. (1987) A calculus for inheritance in monotonic semantic nets.

In Z. Ras and M. Zemankova (eds), Proceedings for the Second International Symposium onMethodologies for Intelligent Systems (Amsterdam: North Holland) pp. 280-287.

Dow

nloa

ded

by [

FU B

erlin

] at

09:

27 0

5 D

ecem

ber

2014