Join i1 t i2 hi1 i2 i1 i2 i1 i2 i meet i1 u i2 hi1

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: \ I2 I1 \ I2 i I =h i and I = hH H H i denote respectively the bottom and top elements of this lattice. I may be veri ed to be a proper model (see De nition 3.9) of any i-consistent program. However, it is not necessarily an i-consistent model itself (see De nition 3.11) and hence not canonical. Clearly, our interest is only in canonical models of programs. First we show that the model intersection property holds for proper models. ? > > 57 as well. We prove this proposition in two steps. M1 u M2 is a Model: If cl is a unit clause, then it must be the case that cl 2 (M1 u M2) since Mi j= cl =) cl 2 Mi , for i = 1 2. Hence the claim follows immediately. If cl is a clause of the form A G , then the implications Mi j= G =) Mi j= A, for i = 1 2 hold true by hypothesis. We then proceed by induction on the structure of G . Basis: If G is atomic, then Mi j= G =) G 2 Mi, for i = 1 2, and the proof is identical as for the unit clause case. Inductive Step: Assume that the claim holds true for any goal G . Consider now that G = G1 G 2, and assume that Mi j= G holds for i = 1 2. Then by de nition Mi j= G1 and Mi j= G 2, i = 1 2. This implies that G 1 2 Mi and G 2 2 Mi, i = 1 2. Then by inductive hypothesis (M1 u M2 ) j= G 1 and (M1 u M2 ) j= G2 =) (M1 u M2 ) j= G 1 G 2. Properness of M1 u M2: Observe that a canonical model is always proper but the converse is not always true. Hence a proper model M corresponding to a program P is not required to be consistent. By de nition 3.8, properness of M only ensures (i) the partial ordering of the is-a hierarchy, (ii) locality of p-clauses, (iii) withdrawals implied by P, (iv) minimality of M , (v) exact inheritability of p-clauses implied by the program and nally (vi) inheritance of p-clauses captured by the inheritability assertions in (iv). Note that for any program P, and for any two proper models M1 and M2 of P, M1 = M2 holds true by condition (5) of de nition 3.8. From the minimality of M , the property of inheritability function r, and the condition (6) of proper structures, it follows that every proper model of P, M to be precise, satis es a minimum set of i-atoms depending on the M component of the model that is common to every proper model of P. Now since M1 and M2 are two proper models by hypothesis, then M1 = M2 . Let us assume that M1 u M2 is not proper. Then there are three possible cases: either (i) M1 \ M2 , (ii) M1 \ M2 , or (iii) M1 \ M2 is not locally proper. Case (i): Assume (M1 u M2) = M1 \ M2 is not locally proper. Note that from condition (5) of de nition 3.8, M1 \ M2 = M1 = M2 . It can now be veri ed 0 0 Theorem 3.1 (Model Intersection Property) Let M1 and M2 be two proper models of a program P. Then M1 u M2 is also a proper model of P. Proof: We show that for any ground clause cl, if M1 j= cl and M2 j= cl, then M1 u M2 j= cl, and that if M1 u M2 is not proper then either M1 or M2 is not proper 58 that (M1 u M2) satis es each of the conditions (1) through (5) of de nition 3.8, and hence is locally proper. Case (ii): Assume that (M1 u M2) = M1 \ M2 is not locally proper. Then it must be the case that for some objects o and p, and a method denotation mk , either (i) r(M1 mk o) = p, and o p@mk ] 2 M1 but o p@mk ] 62 M1 \ M2 , or (ii) r(M2 mk o) = p, and o p@mk ] 2 M2 but o p@mk ] 62 M1 \ M2 . But this is not possible since M1 = M2 , and for objects o and p, and method denotation mk , r(M1 mk o) = r(M2 mk o) = p, and o p@mk ] must be in both M1 and M2 , hence in M1 \ M2 making M1 \ M2 a proper model. A contradiction. Case (iii): Suppose (M1 u M2) = M1 \ M2 is not locally proper, i.e., it violates condition (7) of de nition 3.8. So, let M1 \ M2 satisfy a ground p-clause cl = o m(t1 : : : tk) 7! t] G and suppose that p o@mk ] 2 M1 \ M2 but M1 \ M2 6j= cl o==p]. This implies that Mi j= cl, and p o@mk ] 2 Mi , i = 1 2. By the properness of Mi, we also have Mi j= cl o= ], i = 1 2, which implies =p M1 \ M2 j= cl o==p], contradicting the above. 2 7! 7! 7! 7! 7! 7! 7! 7! 7! 7! 7! 7! 7! We have already seen that every program has at least one proper model, namely I . In view of Theorem 3.1, we can conclude that every program P has also a least proper model de ned as MP = ufM j M is a proper model of Pg. But what can we say about canonical models of P, since we would like to declare the intended meaning of a program as its least canonical model? The answer is given in Theorem 3.2. Theorem 3.2 Let P be an i-consistent program and M be its least proper model. Then M is i-consistent. Furthermore, M is the least canonical model of P. Proof: Let P be an i-consistent program, and M be its least proper model. First, recall that every canonical model, by de nition, is proper. This implies, for every ground atom A 2 M , A is in every proper model of P, and hence in every canonical model of P. Let N be any canonical model. The above argument shows that M N. This implies that M is canonical, since no superset of an i-inconsistent model can be i-consistent. Since M is included in every canonical model, it follows that M is...
View Full Document

Ask a homework question - tutors are online