This preview shows page 1. Sign up to view the full content.
Unformatted text preview: del for any program P in general. We can compute a \local model" M for the component , and then compute another local model for M for the component 64 from the \local program" M . This approach will give us the required knowledge for computing inheritability of p-clauses. The closure Pc of a program P embodies the knowledge required for this purpose. Because of this and since Pc is equivalent to P, we base our xpoint theory on the closed program Pc . We have already established that every ORLog program P has a unique intended model MP which is obtained as the intersection of all proper models of P. Recall that MP is always canonical (see Theorem 3.1 and Theorem 3.2). We will show in this section that it is possible to obtain the intended model MP of a program P (which by Theorem 3.2 is the same as the intended model MP of the closure Pc of P), by means of a bottom-up least xpoint computation, based on the immediate consequence operator TP , de ned below.
c c De nition 3.13 Let Pc be the closure of a de nite ORLog program and let c Pc = h cc cc cc i be its Herbrand instantiation de ned as usual. Let I be an Herbrand structure for Pc . We de ne TP to be the immediate consequence operator that transforms Herbrand structures to Herbrand structures, i.e., TP : P (H) 7! P (H),
c such that
c c TP (I ) = fo m(a1 : : : ak ) 7! a] o==p] j o m(a1 : : : ak ) 7! a] B 2 cc p [email protected] ] 2 I I j= B o= ]g fA j A B 2 cc I j= Bg =p
7! Furthermore, since ORLog captures (multiple) inheritance with overriding, not surprisingly, the operator TP is not monotone in general, as suggested by the following example.
c Example 3.5 Let P2 = h 2 2 2 i be a program such that (1) p :: p: 2 := (2) o :: o: 2 := (4) p m ! a]: 2 := (3) q :: q: Now, consider two interpretations I1 and I2 such that I1 = fp :: p o :: o q :: q o : pg I2 = I1 t fo : qg
While o m ! a] 2 TP (I1) o m ! a] 62 TP (I2). So, in general, TP is not monotone. 2 c c c 65 Thus a fundamental challenge is, how can we build a \ xpoint semantics" using an operator that is not monotone. The following lemma is important in this respect. Lemma 3.1 Suppose I1 v I2 and furthermore, (i) (I1) = (I2) , (ii) (I1) = (I2) , and (iii) both I1 and I2 satisfy all the clauses in (Pc ) (Pc ) . Then TP (I1) v TP (I2).
c Proof: The proof is almost identical to the classical case. The only observation c required are: (1) since I1 and I2 agree on their and -components and since they satisfy the and -components of Pc, (a) the operator r will behave identically with respect to I1 and I2, and (b) all atoms in TP (I1) ; I1 (as also those in TP (I2) ; I2) are p-, pred-, and r-atoms. (2) Whenever I1 j= F o= ], we have I2 j= F o= ] for any =p =p formula F , since I1 v I2. 2
c c the is-a hierarchy and inheritability requirements of Pc and are in agreement in this regard, TP is indeed a monotone operator. This result is signi cant since TP "1=def TP (TP "0) = TP ( ), satis es all the and -clauses in Pc and furthermore 8n > 1 : (TP "n) = (TP "1) and (TP "n ) = (TP "1) . The latter simply follows from the de nition of Pc and of TP . This suggests the iterative applications of TP on TP "1 will indeed produce a monotonically increasing sequence of interpretations suggesting some hope of reaching a xpoint. The monotonicity of TP on the above class of interpretations guarantees the existence of a xpoint. Now we have the following theorems that establish the equivalence of the model theoretic and the xpoint theoretic semantics.
c c c c c c c c c c c c c Remarks: Lemma 3.1 simply says that on the class of interpretations which satisfy Proposition 3.2 Let I1 I2 : : : be an in nite directed sequence of interpretations such that I1 v I2 v : : :. Then if ti=1Ii j= G, then 9k Ik j= G . Proof: We proceed by inducing on the structure of the goal G . Basis: If G is atomic, then ti=1 Ii j= G if and only if G 2 ti=1Ii . Therefore, there exists a k such that G 2 Ik and then Ik j= G. Inductive step: Assume that the claim is true for any ground goal G . Now consider a goal G = G 1 G2. By inductive hypothesis there exists k1 and k2 such that Ik j= G1 and Ik j= G 2. Now by choosing k = max(k1 k2), it follows that Ik j= G1 and Ik j= G 2, and therefore Ik j= G 1 G2. 2
1 1 1 0 1 2 66 I is proper as a structure. Proof: We show implications in both directions. ): Suppose I is a proper model of P. Then by Theorem 3.3, I is a proper model of Pc . Since I , being proper, satis es condition (7) of de nition 3.2, it immediately implies that TP (I ) v I . (: Suppose TP (I ) v I and I is a proper structure. Since (Pc) (I ) and (Pc ) (I ) , I satis es the and -clauses in Pc. That it also satis es the p-, rand pred-clauses follows from the de nition of TP and of satisfaction. Notice that since (Pc ) (I ) and (Pc) (I ) , all the atoms in TP (I ) are p-, r- and predatoms. An inspection of the conditions (1) through (7) in de nition 3.8 of proper structures immediately reveals that TP (I ) is proper as long as I is. 2
c c c c c Theorem 3.4 Let P be a program, Pc be its closure,...
View Full Document