Two results for proiritized logic programming

03/05/2002
by   Yan Zhang, et al.
0

Prioritized default reasoning has illustrated its rich expressiveness and flexibility in knowledge representation and reasoning. However, many important aspects of prioritized default reasoning have yet to be thoroughly explored. In this paper, we investigate two properties of prioritized logic programs in the context of answer set semantics. Specifically, we reveal a close relationship between mutual defeasibility and uniqueness of the answer set for a prioritized logic program. We then explore how the splitting technique for extended logic programs can be extended to prioritized logic programs. We prove splitting theorems that can be used to simplify the evaluation of a prioritized logic program under certain conditions.

READ FULL TEXT VIEW PDF

Authors

page 1

page 2

page 3

page 4

03/08/2000

A Compiler for Ordered Logic Programs

This paper describes a system, called PLP, for compiling ordered logic p...
11/07/2011

Embedding Description Logic Programs into Default Logic

Description logic programs (dl-programs) under the answer set semantics ...
03/08/2000

DLV - A System for Declarative Problem Solving

DLV is an efficient logic programming and non-monotonic reasoning (LPNMR...
05/08/2014

Joint Tabling of Logic Program Abductions and Updates

Abductive logic programs offer a formalism to declaratively represent an...
08/30/2011

Confidentiality-Preserving Data Publishing for Credulous Users by Extended Abduction

Publishing private data on external servers incurs the problem of how to...
01/23/2021

Calculating a backtracking algorithm: an exercise in monadic program derivation

Equational reasoning is among the most important tools that functional p...
09/26/2018

Towards an Algebraic Theory of Analogical Reasoning in Logic Programming

Analogy-making is an essential part of human intelligence and creativity...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Prioritized default reasoning has illustrated its rich expressiveness and flexibility in knowledge representation, reasoning about action and rule updates [Brewka, 1996, Grosof, 1997, Zhang & Foo, 1997]. Recently, different approaches and formulations for prioritized default reasoning based on logic programming and default theories have been proposed [Brewka & Eiter, 1999, Delgrande et al., 2000, Grosof, 1997, Wang et al., 2000]. However, most of these proposals mainly focus on the semantic development, while other important properties are usually not thoroughly explored.

In this paper, we investigate two specific properties of prioritized logic programs in the context of answer set semantics. First, we reveal a close relationship between mutual defeasibility and uniqueness of the answer set for a prioritized logic program. Mutual defeasibility can be viewed as a way of characterizing rules in a logic program, where two rules in the program are mutually defeasible if triggering one rule may cause a defeat of the other, and vice versa. It is quite easy to observe that a logic program does not contain a pair of mutually defeasible rules if this program is locally stratified. However, the converse does not hold. We then provide a sufficient condition to ensure the uniqueness of the answer set for a prioritized logic program. We show that our characteristic condition is weaker than the traditional local stratification for general logic programs [Apt & Bol, 1994].

Second, we investigate the splitting technique for prioritized logic programs. It is well known that Lifschitz and Turner’s Splitting Set Theorem [Lifschitz & Turner, 1994] for extended logic programs may significantly simplify the computation of answer sets of an extended logic program. The basic idea of splitting technique is that under certain conditions, an extended logic program can be split into several “smaller components” such that the computation of the answer set of the original program is reduced to the computation of the answer set of these smaller components. We show that this splitting technique is also suitable for computing answer sets of prioritized logic programs. Furthermore, our splitting theorems for prioritized logic programs also provide a generalization of Lifschitz and Turner’s result.

The paper is organized as follows. Section 2 develops the syntax and semantics of prioritized logic programs. In our formulation, a prioritized logic program is defined to be an extended logic program associating with a strict partial ordering on rules in the program. An answer set semantics for prioritized logic programs is then defined. Several basic properties of prioritized logic programs are also studied in this section. By introducing the concept of mutual defeasibility, section 3 proves a sufficient condition to characterize the unique answer set for a prioritized logic program. Section 4 then extends the splitting technique for extended logic programs to prioritized logic programs. Finally, section 5 concludes the paper with some remarks.

2 Prioritized Logic Programs

To specify prioritized logic programs (PLPs), we first introduce the extended logic program and its answer set semantics developed by Gelfond and Lifschitz [Gelfond & Lifschitz, 1991]. A language of extended logic programs is determined by its object constants, function constants and predicate constants. Terms are built as in the corresponding first order language; atoms have the form , where () is a term and is a predicate constant of arity ; a literal is either an atom or a negative atom . A rule is an expression of the form:

(1)

where each () is a literal. is called the head of the rule, while , , is called the body of the rule. Obviously, the body of a rule could be empty. We also allow the head of a rule to be empty. In this case, the rule with an empty head is called constraint. A term, atom, literal, or rule is ground if no variable occurs in it. An extended logic program is a collection of rules. is ground if each rule in is ground.

Let be a ground rule of the form (1), we use to denote the set of literals in the body of without negation as failure , and the set of literals in the body of with negation as failure . We specify to be . We also use to denote the head of : . Then we use to denote . By extending these notations, we use , , , , and to denote the unions of corresponding components of all rules in the ground program , e.g. . If is a non-ground program, then notions , , , , and are defined based on the ground instantiation (see below definition) of .

To evaluate an extended logic program, Gelfond and Lifschitz proposed an answer set semantics for extended logic programs. Let be a ground extended logic program not containing not and Lit the set of all ground literals in the language of . An answer set of is the smallest subset of Lit such that (i) for any rule from , if , then ; and (ii) if contains a pair of complementary literals, then . Now let be a ground arbitrary extended logic program. For any subset of , let be the logic program obtained from by deleting (i) each rule that has a formula not in its body with , and (ii) all formulas of the form not in the bodies of the remaining rules111We also call the Gelfond-Lifschitz transformation of in terms of .. We define that is an answer set of iff is an answer set of .

For a non-ground extended logic program , we usually view a rule in containing variables to be the set of all ground instances of this rule formed from the set of ground literals in the language. The collection of all these ground rules forms the ground instantiation of . Then a set of ground literals is an answer set of if and only if it is an answer set of . It is easy to see that an extended logic program may have one, more than one, or no answer set at all.

A prioritized logic program (PLP) is a triple , where is an extended logic program, is a naming function mapping each rule in to a name, and is a strict partial ordering on names. The partial ordering in plays an essential role in the evaluation of . We also use to denote the set of -relations of . Intuitively represents a preference of applying rules during the evaluation of the program. In particular, if holds in , rule would be preferred to apply over rule during the evaluation of (i.e. rule is more preferred than rule ). Consider the following classical example represented in our formalism:

:
    , not ,
    , not ,
    ,
    ,
    .

Obviously, rules and conflict with each other as their heads are complementary literals, and applying will defeat and vice versa. However, as , we would expect that rule is preferred to apply first and then defeat rule so that the desired solution can be derived.

Definition 1

Let be a ground extended logic program and a ground rule of the form (1) ( does not necessarily belong to ). Rule is defeated by iff has an answer set and for any answer set of , there exists some , where .

Now our idea of evaluating a PLP is as follows. Let . If there are two rules and in and , will be ignored in the evaluation of , only if keeping in and deleting from will result in a defeat of . By eliminating all such potential rules from , is eventually reduced to an extended logic program in which the partial ordering has been removed. Our evaluation for is then based on this reduced extended logic program.

Similarly to the case of extended logic programs, the evaluation of a PLP will be based on its ground form. We say that a PLP is the ground instantiation of if (1) is the ground instantiation of ; and (2) if and only if there exist rules and in such that and are ground instances of and respectively and . Under this definition, however, we require a restriction on a PLP since not every PLP’s ground instantiation presents a consistent information with respect to the original PLP. Consider a PLP as follows:

,
    ,
    .

If the only constant in the language is , then the set of ground instances of and includes rules like:

,
    ,
    ,
    ,

It is easy to see that can be viewed as an instance for both and . Therefore, the ordering among rules is no longer a partial ordering because of . Obviously, we need to exclude this kind of programs in our context. On the other hand, we also want to avoid a situation like in the ground prioritized logic program because this indicates that there is no most preferred rule in the program.

Given a PLP . We say that is well formed if there is no rule that is an instance of two different rules and in and . Then it is not difficult to observe that the following fact holds.

Fact: If a PLP is well formed, then in its ground instantiation , is a partial ordering and every non-empty subset of has a least element with respect to .

Due to the above fact, in the rest of this paper, we will only consider well formed PLP programs in our discussions, and consequently, the evaluation for an arbitrary PLP will be based on its ground instantiation . Therefore, in our context a ground prioritized (or extended) logic program may contain infinite number of rules. In this case, we will assume that this ground program is the ground instantiation of some program that only contains finite number of rules. In the rest of the paper, whenever there is no confusion, we will only consider ground prioritized (extended) logic programs without explicit declaration.

Definition 2

[Zhang & Foo, 1997] Let be a prioritized logic program. is a reduct of with respect to if and only if there exists a sequence of sets () such that:

  1. ;

  2. (a) there exists such that
          for every (), and
          are defeated by , and (b) there
          are no rules such that ,
          for some () and
          are defeated by ;

  3. .

In Definition 2, is an extended logic program obtained from by eliminating some rules from . In particular, if , , , and defeats , then rules will be eliminated from if no less preferred rule can be eliminated (i.e. conditions (a) and (b)). This procedure is continued until a fixed point is reached. It should be noted that condition (b) in the above definition is necessary because without it some unintuitive results may be derived. For instance, consider again, if we add additional preference in , then using a modified version of Definition 2 without condition (b),

,
      ,
     

is a reduct of , from which we will conclude that Tweety can fly.

Definition 3

[Zhang & Foo, 1997] Let be a PLP and the set of all ground literals in the language of . For any subset of , is an answer set of iff is an answer set for some reduct of .

Using Definitions 2 and 3, it is easy to conclude that has a unique reduct as follows:

, not ,
            ,
            ,

from which we obtain the following answer set of :

, , .

Now we consider another program :

,
    not ,
    ,
    not ,
    .

According to Definition 2, it is easy to see that has two reducts:

,   ,   not , and
    ,   not ,   .

From Definition 3, it follows that has two answer sets: and .

To see whether our PLP semantics gives intuitive results in prioritized default reasoning, we further consider a program - a variation of program , as follows.

,
    not ,
    not ,
    .

It is easy to see that has one answer set . People may think that this result is not quite intuitive because rule is defeated in the evaluation although there is no preference between and . To explain why is a reasonable answer set of , we should review the concept of defeatness in our formulation (Definition 1). In a PLP, when we specify one rule is less preferred than the other, for instance, ( is less preferred than ), it does not mean that should be defeated by iff conflict occurs between them. Instead, it just means that has a lower priority than to be taken into account in the evaluation of the whole program while other rules should be retained in the evaluation process if no preference is specified between and them. This intuition is captured by the notion of defeatness in Definition 1 and Definition 2.

Back to the above example, although there is no direct conflict between and and no preference is specified between and (where conflict exists between them), indeed has a lower priority than to be applied in the evaluation of , which causes to be defeated.

Now we illustrate several basic properties of prioritized logic programs. As we mentioned earlier, when we evaluate a PLP, a rule including variables is viewed as the set of its all ground instances. Therefore, we are actually dealing with ground prioritized logic programs that may consist of infinite collection of rules. We first introduce some useful notations. Let be an extended logic program. We use to denote the class of all answer sets of . Suppose is a PLP. From Definition 2, we can see that a reduct of is generated from a sequence of extended logic programs: , . We use () to denote this sequence and call it a reduct chain of .

Let be a PLP and () its reduct chain. Suppose has an answer set. Then for any and where , .

Let () be a reduct chain of . Suppose is an answer set of for some . To prove the result, it is sufficient to show that is also an answer set of . According to Definition 2, is obtained by eliminating some rules from where all these eliminated rules are defeated by . So we can express:

.

Since are defeated by , we can write rules to the following forms:

, not ,
    , not ,
    ,

where . Now consider Gelfond-Lifschitz transformation of in terms of . It is clear that during the transformation, each rule in including , , in its body will be deleted. From here it follows that adding any rule with , in its body will not play any role in the evaluation of the answer set of the program. So we add rules into , This makes . Then we have . So is also an answer set of .

Proposition 1 shows an important property of the reduct chain of : each is consistent with but becomes more specific than in the sense that all answer sets of are answer sets of but some answer sets of are filtered out if they conflict with the preference partial ordering .

Example 1

Consider a PLP :

not ,
    not ,
    not , not ,
    not ,
    .

From Definition 2, we can see that has a reduct chain ():

:
      not ,
      not ,
      not , not ,
      not ,
    :
      not ,
      not , not ,
      not ,
    :
      not ,
      not , not .

It is easy to verify that has three answer sets , and , has two answer sets and , and has a unique answer set which is also the answer set of : .

The following theorem shows the answer set relationship between a PLP and its corresponding extended logic programs.

Let be a PLP and a subset of . Then the following are equivalent:

  1. is an answer set of .

  2. is an answer set of each for some reduct chain () of .

(1 2) Let be a reduct of obtained from a reduct chain () of . By applying Theorem 3 in section 3, it is easy to show that any reduct chain of is finite. Therefore, there exists some such that () is the reduct chain. This follows that (). So from Proposition 1, an answer set of is also an answer set of ().

(2 1) Given a reduct chain () of . From the above, since () is finite, we can assume that () is the reduct chain. As if , it follows that . So the fact that is an answer set of implies that is also an answer set of .

If a PLP has an answer set , then is also an answer set of .

From Theorem 1, it shows that if has an answer set , then is also an answer set of each for ’s a reduct chain (), where . So is also an answer set of .

The following theorem presents a sufficient and necessary condition for the answer set existence of a PLP.

Let be a PLP. has an answer set if and only if has an answer set.

According to Corollary 1, we only need to prove that if has an answer set, then also has an answer set. Suppose has an answer set and () is a reduct chain of . From the construction of (Definition 2), it is easy to see that every () must have an answer set. On the other hand, as we have mentioned in the proof of Theorem 1, ’s reduct chain is actually finite: (). That follows . Since has an answer set, it concludes has an answer set as well.

Suppose a PLP has a unique reduct. If has a consistent answer set, then ’s every answer set is also consistent.

The fact that has a consistent answer set implies that ’s reduct (note is an extended logic program) has a consistent answer set. Then from the result showed in section 2 of [Lifschitz & Turner, 1994] (i.e. if an extended logic program has a consistent answer set, then its every answer set is also consistent), it follows that ’s every answer set is also consistent.

3 Mutual Defeasibility and Unique Answer Set

In this section, we try to provide a sufficient condition to characterize the uniqueness of the answer set for a prioritized logic program. The following definition extends the concept of local stratification for general logic programs [Apt & Bol, 1994, Choelwinski, 1994, Das, 1992] to extended logic programs.

Definition 4

Let be an extended logic program and be the set of all ground literals of .

  1. A local stratification for is a function stratum from to the countable ordinals.

  2. Given a local stratification , we extend it to ground literals with negation as failure by setting , where is a ground literal.

  3. A rule , not , not in is locally stratified with respect to if

    , where , and
    , where .

  4. is called locally stratified with respect to if all of its rules are locally stratified. is called locally stratified if it is locally stratified with respect to some local stratification.

It is easy to see that the corresponding extended logic program of (see section 2) is not locally stratified. In general, we have the following sufficient condition to ensure the uniqueness of the answer set for an extended logic program.

Let be an extended logic program. If is locally stratified, then has a unique answer set222Recall that if has an inconsistent answer set, we will denote it as . This proposition is a direct generalization of the result for general logic programs as described in [Gelfond & Lifschitz, 1988]..

Now we define the concept of mutual defeasibility which plays a key role in investigating a sufficient condition for the unique answer set of a PLP.

Definition 5

Let be an extended logic program and and be two rules in . We define a set of literals with respect to as follows:

;
    where and are those
                                rules such that ;
    .

We say that is defeasible through in if and only if . and are called mutually defeasible in if is defeasible through and is defeasible through in .

Intuitively, if is defeasible through in , then there exists a sequence of rules such that occurs in , occurs in for all , and for some , occurs in . Under this condition, it is clear that by triggering rule in , it is possible to defeat rule if rules are triggered as well. As a special case that , is defeasible through iff . The following proposition simply describes the relationship between local stratification and mutual defeasibility.

Let be an extended logic program. If is locally stratified, then there does not exist mutually defeasible pair of rules in .

The above result is easy to prove from the corresponding result for general logic programs showed in [Gelfond & Lifschitz, 1988] based on Gelfond and Lifschitz’s translation from an extended logic program to a general logic program [Gelfond & Lifschitz, 1991]. It is observed that for a PLP , if is locally stratified, then will have a unique answer set. In other words, ’s local stratification implies that has a unique answer set. However, this condition seems too strong because many prioritized logic programs will still have unique answer sets although their corresponding extended logic programs are not locally stratified. For instance, program presented in section 2 has a unique answer set but its corresponding extended logic program is not locally stratified. But one fact is clear: the uniqueness of reduct for a PLP is necessary to guarantee this PLP to have a unique answer set.

The above observation suggests that we should first investigate the condition under which a prioritized logic program has a unique reduct. Then by applying Proposition 3 to the unique reduct of the PLP, we obtain the unique answer set condition for this PLP.

Definition 6

Let be a PLP. A -partition of in is a finite collection , where and and are disjoint for any , such that

  1. implies that there exist some and () such that and ;

  2. for each rule (), there exists some rule () such that .

Example 2

Consider a PLP :

not , not ,
    not ,
    not , not ,
    not ,
    .

It is easy to verify that a -partition of in is , where

:
      not , not ,
      not , not ,
    :
      not ,
    :
      not .

In fact, this program has a unique answer set .

Every prioritized logic program has a -partition.

For a given PLP , we construct a series of subsets of as follows:
    ;
    , .
We prove that is a -partition of . First, it is easy to see that and are disjoint. Now we show that this partition satisfies conditions 1 and 2 described in Definition 6. Let . If there does not exist any rule such that , then . Otherwise, there exists some () such that and for all rules satisfying . Let . Since , it follows that . From the construction of , we also conclude . Since , it follows . That is, . Condition 2 directly follows from the construction of the partition described above.

Now we show that must be a finite set. First, if is finite, it is clear must be a finite set. If contains infinite rules, then according to our assumption presented in section 2, must be the ground instantiation of some program, say . Then we can use the same way to define a -partition for . Since is finite, the partition of must be also finite: . As is well formed, it implies that for each , is the ground instantiation of . So is finite.

(Unique Answer Set Theorem) Let be a PLP and be a -partition of in . has a unique reduct if there does not exist two rules and in and () respectively such that and are mutually defeasible in . has a unique answer set if has a unique locally stratified reduct.

According to Proposition 3, it is sufficient to only prove the first part of this theorem: has a unique reduct if there does not exist two rules and in and () respectively such that and are mutually defeasible in .

We assume that has two different reducts, say and . This follows that there exist at least two different rules and such that (1) and , where ; (2) , , and ; and (3) , , and . According to Definition 2, and are generated from two reduct chains and respectively.

Without loss of generality, we may assume that for all , , and

,
    ,

where we set and the only difference between and is due to rules and . Let and have the following forms:

, not ,
    , not .

Comparing and , it is clear that the only difference between these two programs is about rules and . Since defeats and defeats , it follows that and , where and are answer sets of and respectively. Then there must exist some rule in of the form:

,

and some rule in of the form:

.

Furthermore, since does not defeat rule and does not defeat rule (otherwise ), it is observed that rule triggers rule in that defeats , and rule triggers rule in that defeats . This follows that and are mutually defeasible in .

Note that according to Proposition 4, the condition for to have a unique answer set stated in Theorem 4 is weaker than the local stratification requirement for to have a unique answer set as showed by Proposition 3.

Example 3

Consider PLP as follows:

not , not , not ,
    not , not ,
    not , not ,
    not ,
    .

Clearly, a -partition of is as follows:

:
      not , not not ,
      not ,
    :
      not ,
    :
      not .

Although is not locally stratified, from Theorem 4, should have a unique reduct since and are not mutually defeasible. This also concludes that has a unique answer set .

4 Splitting Prioritized Logic Programs

It has been observed that deciding whether a prioritized logic program has an answer set is NP-complete [Zhang, 2001]. That means, in practice it is unlikely to implement a polynomial algorithm to compute the answer set of a prioritized logic program. Hence, finding suitable strategy to simplify such computation is an important issue. Similarly to the case of extended logic programs [Lifschitz & Turner, 1994], we will show that under proper conditions, a PLP can be split into several smaller components such that the evaluation of ’s answer sets can be based on the evaluation of the answer sets of . To describe our idea, we first consider the case of splitting a PLP into two parts.

Example 4

Consider the following PLP :

,
    ,
    ,
    ,
    ,
    ,
    .

Clearly, this PLP has a unique reduct , which gives a unique answer set .

We observe that actually can be split into two segments and such that . Now we try to reduce the computation of ’s answer sets to the computation of two smaller PLPs’ answer sets. Firstly, we define a PLP by setting and . The role of rule is to introduce a -relation to replace the original -relation in that is missed from by eliminating from . The unique answer set of is . Since , it is easy to see that in each of ’s answer sets, any literals derived by using rules in will not trigger or defeat any rules in . This implies that every literal in ’s answer set (except First) will also occur in an answer set of the original . Therefore, we can define another PLP