A Schema for Generating Update Semantics

In this paper, we present a general schema for de ning new update semantics. This schema takes as input any basic logic programming semantics, such as the stable semantics, the p-stable semantics or the MMr semantics, and gives as output a new update semantics. The schema proposed is based on a concept called minimal generalized S models, where S is any of the logic programming semantics. Each update semantics is associated to an update operator. We also present some properties of these update operators.


I. Introduction
Updating, by definition means that there is new information that must be added to the older, and some information could be changed.Intelligent agents use this, in order to bring new knowledge to their knowledge base.But there is a main problem that updates can present, and it is inconsistency.So, it is important to use an approach to avoid inconsistencies in the knowledge base.For instance, it could be that in an initial moment we can infer a from a knowledge base (KB), and later the KB is updated with the new information −a (where − denotes negation).It is easy to see, that if we only take the union of the initial KB and −a, we will have an inconsistency.Then it is useful to apply an update approach that avoids the inconsistency and now allows to infer −a since the newer knowledge has priority over the older.Currently there are several approaches in non-monotonic reasoning dealing with updates, such as [10,16,5].
As part of the contribution of this paper, we propose an schema for generating update semantics.This schema takes as input any basic logic programming semantics, such as the stable semantics [11], the p-stable semantics [17] or the M M r semantics [13], and gives as output a new update semantics.
It is natural to consider the stable semantics since many approaches to updating have been based on it, see for example [10,16,5].
On the other hand, the p-stable semantics is another option to study updating.It has the advantage of providing models that coincide with classical models in many cases.We can make this clear with the following example.Let P 1 = {a ← ¬b, a ← b} and P 2 = {b ← a}.From a classical logic point of view and considering that ¬ denotes classical negation, we would expect that {a, b} corresponds to the result of updating P 1 with P 2 .However, when we apply the approach in [10] based on stable semantics to update P 1 with P 2 there is no model; whereas our schema proposed with the p-stable semantics gives an update semantics that returns {a, b} as an update model for the example.
Besides, in [14] it is shown that the p-stable semantics of normal programs can express any problem that can be expressed in terms of the stable semantics of disjunctive programs.
We also consider the M M r semantics for several reasons.First, any normal program always has M M r models.Second, it agrees with the Revised Stable models semantics defined by Pereira and Pinto for all the examples they present in their work [18], suggesting that both semantics may coincide for normal logic programs.The coincidence is important since the Revised Stable model semantics has the property of being a relevant semantics.One of the main implications of relevance is that it allows us to define topdown algorithms for answering queries from a knowledge base, this means that relevance allows us to split the original program into subprograms such that finding a model to answer a query can be reduced to finding the models of subprograms [18,6,7].Third the M M r has been used in the context of argumentation semantics, since it can identify the attack-dependencies that exist in an argumentation framework [13,3].
Currently there exists a software implementation of the p-stable semantics and the M M r semantics at http://aplicacionesia.cs.buap.mx/∼arkerz/(Windows version) and at http://sites.google.com/site/computingpstablesemantics/downloads (Linux version).
The schema proposed is based on a concept called minimal generalized S models, where S is any of the mentioned logic programming semantics.The definition of minimal generalized S models is inspired by a concept called minimal generalized answer sets of abductive programs [12].The semantics of minimal generalized answer sets is based on the stable semantics.The minimal generalized answer sets have been used to restore consistency [12,2], to obtain the preferred plans of planning problems [21], to get the preferred extensions of an argument framework [21], and to define update operators [20].Hence, we consider that minimal generalized S models can also have similar applications and be an alternative to those applications that use minimal generalized answer sets.
Each update semantics is associated to an update operator.Here we also present some properties of these update operators.These properties correspond to the properties of the update operator defined and analized by Eiter et al. [9] and J. J. Alferes et al. in [1], except for one of them called independent parts property.This last property refers to the general principle that asserts that completely independent parts of a program should not interfere with each other.
In section we summarize some basic concepts and definitions used to understand this paper.In section we review the minimal generalized S models.In section we present our schema for defining new update semantics and some formal properties.Finally, in section we present some conclusions.

II. Background
In this section, we define the syntax of the logic programs that we will use in this paper.In terms of logic programming semantics, we present the definition of the stable model semantics, the p-stable model semantics, and the M M r semantics.

A. Logic programs
We use the language of propositional logic in the usual way.We consider propositional symbols: p, q, . . .; propositional connectives: ∧, ∨, →, ¬, −; and auxiliary symbols: '(',')','.'.Well formed propositional formulas are defined as usual.We consider two types of negation: strong or classical negation (written as −) and negation-as-failure (written as ¬).Intuitively, ¬a is true whenever there is no reason to believe a, whereas −a requires a proof of the negated atom.An atom is a propositional symbol.A literal is either an atom a or the strong negation of an atom −a.
A normal clause is a clause of the form a ← b 1 ∧ . . .∧ b n ∧ ¬b n+1 ∧ . . .∧ ¬b n+m where a and each of the b i are atoms for 1 ≤ i ≤ n + m.In a slight abuse of notation we will denote such a clause by the formula a ← B + ∪ ¬B − where the set {b 1 , . . ., b n } will be denoted by B + , and the set {b n+1 , . . ., b n+m } will be denoted by B − .Given a normal clause a ← B + ∪ ¬B − , denoted by r, we say that a = H(r) is the head and B + (r) ∪ ¬B − (r) is the body of the clause.
A clause with an empty body is called a fact; and a clause with an empty head is called a constraint.Facts and constraints are also denoted as a ← and ← B + ∪ ¬B − respectively.We define a normal logic program P , as a finite set of normal clauses.The signature of a normal logic program P , denoted as L P , is the set of atoms that occur in P .Given a set of atoms M and a signature L, we define ¬ M = {¬a | a ∈ L \ M }.Since we shall restrict our discussion to propositional programs, we take for granted that programs with predicate symbols are only an abbreviation of the ground program.From now on, by program we will mean a normal logic program when ambiguity does not arise.
In our programs we will manage the strong negation − as follows: each atom −a is replaced by a new atom symbol a ′ which does not appear in the language of the program and we add the constraint ← a ∧ a ′ to the program.

B. Logic programming semantics
Here, we present the definitions of three logic programming semantics.Note that we only consider 2-valued logic programming semantics.
Definition 1.A logic programming semantics S is a mapping from the class of all programs into the power set of the set of (2-valued) models.
We sometimes refer to logic programming semantics as semantics, when no ambiguity arises.The semantics that we consider in this paper are: the M M r semantics [13] that is based on the the minimal model semantics (denoted by M M ), the stable model semantics [11] (denoted by stable), and the p-stable model semantics [17] (denoted by p-stable).We will review these semantics in the next subsections.From now on, we assume that the reader is familiar with the notion of an interpretation and validity [19].
When considering any particular semantics of a normal program with constraints P ∪R (R is the set of constraints), we will understand the models given by that semantics of the program P that make the clauses of R valid in the sense of classical logic.

Stable semantics
The stable semantics was defined in terms of the so called Gelfond-Lifschitz reduction [11] and it is usually studied in the context of syntax dependent transformations on programs.The following definition of a stable model for normal programs was presented in [11].

p-stable semantics
Before defining the p-stable semantics (introduced in [17]), we define some basic concepts.Logical inference in classic logic is denoted by ⊢.Given a set of proposition symbols S and a theory (a set of well-formed formulas) Γ, Γ ⊢ S if and only if ∀s ∈ S, Γ ⊢ s.When we treat a program as a theory, each negative literal ¬a is regarded as the standard negation operator in classical logic.Given a normal program P, if M ⊆ L P , we write P M when: P ⊢ M and M is a classical 2-valued model of P .
The p-stable semantics is defined in terms of a single reduction which is defined as follows: Definition 4. [17] Let P be a program and M be a set of literals.We define Next we present the definition of the p-stable semantics for normal programs.Definition 6. [17] Let P be a program and M be a set of atoms.We say that M is a p-stable model of P if RED(P, M ) M .We use p-stable to denote the semantics operator of p-stable models.
Example 7. Let us consider again P 1 and M 1 of Example 5. Let us verify whether M 1 is a p-stable model of P 1 .First, we can see that M 1 is a model of P 1 , i.e., for each clause C of P 1 , M 1 evaluates C to true.We also can verify that RED(P 1 , M 1 ) ⊢ M 1 .Then we can conclude that The following examples illustrate how to obtain the pstable models.The first example shows a program with a single p-stable model, which is also a classical model.The second example shows a program which has no stable models and whose p-stable and classical models are the same.It is worth mentioning that there exists also a characterization of the p-stable semantics in terms of the paraconsistent logic G ′ 3 , interested readers can see [14,15,17].

The M M r semantics
A program P induces a notion of dependency between atoms from L P [13].We say that a depends immediately on b, if and only if, b appears in the body of a clause in P , such that a appears in its head.The two place relation depends on is the transitive closure of depends immediately on [13].The set of dependencies of an atom x, denoted by dependencies-of (x), corresponds to the set {a | x depends on a}.
We take < P to denote the strict partial order defined as follows: x < P y, if and only if, y depends-on x and x does not depend-on y.By considering the relation < P , each atom of L P is assigned an order as follows: An atom x is of order 0, if x is minimal in < P .An atom x is of order n + 1, if n is the maximal order of the atoms on which x depends.
We say that a program P is of order n, if n is the maximum order of its atoms.We can also break a program P of order n into the disjointed union of programs P i with 0 ≤ i ≤ n, such that P i is the set of clauses for which the head is of order i (w.r.t.P ).The empty program has order 0. We say that P 0 , . . ., P n are the components of P .
Example 12.By considering the program P in Example 11, we can see that: d is of order 2, a is of order 1, b is of order 1, e is of order 0, and c is of order 0. This means that P is a program of order 2. The following table illustrates how the program P can be broken into the disjointed union of the following relevant modules or components Next we present a reduction that will be used to define the M M r semantics.
Let P be a program and A = ⟨T ; F ⟩ be a pair of disjoint sets of atoms.The reduction R(P, A) is obtained by 2 steps [13]: 1. Let R ′ (P, A) be the program obtained in the following steps: (a) We replace every atom x that occurs in the bodies of P by 1 if x ∈ T , and we replace every atom x that occurs in the bodies of P by 0 if x ∈ F ; (b) we replace every occurrence of ¬1 by 0 and ¬ 0 by 1; (c) every clause with a 0 in its body is removed; (d) finally we remove every occurrence of 1 in the body of the clauses.
2. Given the set of transformations CS = {RED + , RED − , Success, F ailure, Loop}, in [8] it is shown that a normal program P can be reduced to another normal program norm CS (P ) after applying those transformations a finite number of times.The program norm CS (P ) is unique and is called the normal form of program P with respect to the system CS.We will denote R(P, A) = norm CS (R ′ (P, A)).The definitions of the transformations in CS are: Now, in order to define the M M r semantics, we first define the M M r c semantics in terms of the Minimal Model semantics, denoted by M M .

Definition 14. Given
Definition 15. [13] We define the associated M M r c semantics recursively as follows: Given a program P of order 0, M M r c (P ) = M M (P ).For a program P of order n > 0 we define where It is important to eliminate tautologies from the programs, since they can introduce non-desirable models.For example, if P is the program {a ← ¬b, b ← a, b}, then the minimal models for this program are {a} and {b}; however, after deleting the second rule, which is a tautology, it is clear that the second set, namely {b} is not an intended minimal model.Given a normal program P , we define T aut(P Definition 16. [13] Let P be a normal program.We define M M r (P ) = M M r c (P \ T aut(P )).The following example illustrates our two previous definitions.

Example 17. Let us consider the program
We are going to compute the M M r c (E).According to Definition 15, since E is of order 1, then we need to obtain the following: for each M ∈ M M (E 0 ): There are two cases to consider.
Let us consider M to be {a}.
Let us consider M to be {b}.
Since E is a program with no tautologies then M M r (E) = M M r c (E).

Some properties of logic programming semantics
Not all normal programs have p-stable models or stable models [17,11], although they always have M M r models [13], that is why it is convenient to have the next definition.

Definition 18.
Let S be any of the three semantics.Let P be a program.We say that P is S consistent if P has at least one S model.We say that P is S inconsistent if P does not have S models.Now, we present two notions of equivalence for programs.Definition 19.[4] Let S be any of the three semantics.Two programs P 1 and P 2 are equivalent, denoted by P 1 ≡ S P 2 , if P 1 and P 2 have the same S models.Two programs P 1 and P 2 are strongly equivalent, denoted by P 1 ≡ SE(S) P 2 , if (P 1 ∪ P ) ≡ S (P 2 ∪ P ) for every program P .We will drop the subindex S that follows the equivalent symbol whenever no ambiguity arises.
The following lemma1 indicates that given a program P and an atom x that does not occur in P , we can define a new program P ′ such that P and P ′ are equivalent and L P ′ = L P ∪ {x}.The two programs must have the same clauses except for one of them.One of the clauses in P ′ corresponds to one of the clauses in P after adding ¬x to its body.This way, P and P ′ have the same S models since x does not appear as the head of any clause in P ′ .Lemma 20.Let S be any of the three semantics.Let P be a program and x be an atom, x ̸ ∈ L P .Let r be any clause a ← B + ∪ ¬B − in P .Then M is a S model of P iff M is a S model of (P \ {r}) ∪ {a ← B + ∪ ¬(B − ∪ {x})}.

III. Minimal generalized S models
The definition of our schema for generate update semantics is based on a concept called Minimal Generalized S models, denoted as MG S models, where S is any of the three semantics given in the Section , namely stable, p − stable, or M M r semantics.
The intuition behind the MG S models is simple.Given a semantics S, a program P and a set of atoms A, the MG S models of P are the S models of P ∪ ∆ that are obtained by adding the minimal subset ∆ ⊆ A to P for which P ∪ ∆ has S models. 2 For instance, let us consider the program P = {−a, a ← ¬b}, A = {b, c}, and the p-stable semantics, hence {b, −a} is one of its MG p-stable models where the minimal subset of A added to P is {b}.We also can see that that P does not have p-stable models.
Next, we present the definition of abductive logic programs and their semantics in terms of the minimal explicit generalized S models.Then, we define the MG S models based on the minimal explicit generalized S models.These definitions are similar to the definitions of syntax and semantics of abductive logic programs as presented in the context of the stable semantics in [2] −a}.There are three EG p-stable models of ⟨P, A⟩ which are: ⟨{−a, x 1 }, {x 1 }⟩, ⟨{−a, b, x 2 }, {x 2 }⟩, and ⟨{−a, x 1 , x 2 }, {x 1 , x 2 }⟩.We can see that for ∆ = ∅ there is no EG p-stable models.Therefore, the MEG p-stable models are ⟨{−a, x 1 }, {x 1 }⟩ and ⟨{−a, b, x 2 }, {x 2 }⟩, and the MG p-stable models are {−a, x 1 } and {−a, b, x 2 }.
The following lemma presents some results about MEG S models that will be useful in a later section to show the properties of our update operator.The proof of this lemma is straightforward.
Lemma 24.Let T = ⟨P, A⟩ be an abductive logic program such that P is S consistent.Then, • M is a S model of P iff M is a MG S-model of T and

IV. Updates semantics and formal properties
In this section, we define the general schema for generate update semantics based on the concept of MG S models, and we study some of its properties.We use ⊙ S to represent the update operator with respect to a semantics S. In order to obtain the ⊙ S -update models of a pair of logic programs (P 1 , P 2 ), called update pair, we define an update logic program, denoted as P. The update logic program is obtained

Example 5 .
Let us consider the program P 1 = {a ← ¬b ∧ ¬c, a ← b, b ← a} and the set of atoms M 1 = {a, b}.We can see that RED(P, M ) is: {a ← ¬b, a ← b, b ← a}.

Example 8 .Example 9 .
Let P = {q ← ¬q}.Let us take M = {q} then RED(P, M ) = {q ← ¬q}.It is clear that M models P in classical logic and RED(P, M ) |= M since (¬q → q) → q is a theorem in classical logic with the negation ¬, now interpreted as classical negation.Therefore M is a p-stable model of P .Let P = {a ← ¬b, a ← b, b ← a}.We can verify that M = {a, b} models the clauses of P in classical logic.We find that RED(P, M ) = P .Now, from the first and third clause, it follows that (¬b → b) where the negation ¬ is now interpreted as classical negation.Since (¬b → b) → b is a theorem in classical logic, it follows that RED(P, M ) |= M .Therefore, M is a p-stable model of P .

Definition 2 .
Let P be any program.For any set M ⊆ L P , let P M be the definite program obtained from P by deleting each rule that has a literal ¬l in its body with l ∈ M , and then all literals ¬l in the bodies of the remaining clauses.Clearly P M does not contain ¬, then M is a stable model of P if and only if M is a minimal model of P M .Let M = {b} and P be the following program: {b ← ¬a, c ← ¬b, b ←, c ← a}.Notice that P M has three models: {b}, {b, c} and {a, b, c}.Since the minimal model among these models is {b}, we can say that M is a stable model of P .

.
Definition 21.Let S be a semantics.An abductive logic program is a pair ⟨P, A⟩ where P is a program and A is a set of atoms, called abducibles.⟨M, ∆⟩ is an explicit generalized S model, denoted as EG S model, of the abductive logic program ⟨P, A⟩ iff ∆ ⊆ A and M is an S model of P ∪ ∆.We give an ordering among EG S models in order to get the minimal of them.Definition 22.Let S be a semantics.Let T = ⟨P, A⟩ be an abductive logic program.Let ⟨M 1 , ∆ 1 ⟩ and ⟨M 2 , ∆ 2 ⟩ be two EG S models of T , we define ⟨M 1 , ∆ 1 ⟩ < ⟨M 2 , ∆ 2 ⟩ if ∆ 1 ⊂ ∆ 2 ; this order is called inclusion order.⟨M, ∆⟩ is a Minimal EG S model, denoted as MEG S model, of T iff ⟨M, ∆⟩ is an EG S model of T and it is minimal w.r.t.inclusion order.For practical purposes, given a MEG S model, ⟨M, ∆⟩, we are only interested in its first entry, namely M , and we call it a Minimal Generalized S model, denoted as MG S model, of an abductive logic program.Example 23.Let S be the p-stable semantics.Let ⟨P, A⟩ be the abductive logic program where the set of abductive atoms is A = {x 1 , x 2 } and P = {b ← ¬x 1 , a ← b ∧ ¬x 2 ,