jamilthesis

# 2 c c c c c theorem 34 let p be a program pc be its

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: and I be a structure such that (Pc ) (I ) and (Pc) (I ) . Then I is a proper model of P i TP (I ) v I , and c The bottom-up xpoint iteration of TP is de ned as follows: c TP "0 = I TP "n+1 = TP (TP "n) TP "! = tn<! TP "n : c ? c c c c c Note that owing to the monotonicity of TP it has a least xpoint lfp(TP ) and since ORLog is function-free, we trivially have lfp(TP ) = TP "! . One of our main results is the following theorem, proved analogously to the classical case. The only subtlety is handling clause inheritance via context switch. c c c c Theorem 3.5 Let P be a program and Pc be its closure. Then, 1. MP = MP = lfp(TP ), where MP = MP is the least proper model of P, and 2. lfp(TP ) can be computed in a nite number of bottom-up iterations. c c c c Proof: (1). MP = ufI j I is a proper Herbrand model of Pc g c by Theorem 3.1 67 Note that whenever I is a (proper) model of P (and hence of Pc), (Pc ) (Pc ) (I ) . From this, we can see that (I ) and MP = ufM j M is a proper model of Pcg = ufM j TP (M) v M M is proper and (Pc ) c c c c by proposition 3.4 = lfp(TP ) by the monotonicity of TP on the class of Pc satisfying the conditions in Lemma 3.1, and Knaster-Tarski xpoint theorem, proving (1) (I ) , (Pc ) (I ) g, (2). Since ORLog programs are function free, the least xpoint above can be computed in a nite number of steps, just as for Datalog, which proves (2). 2 Observation 3.1 Let P be an i-consistent program and Pc be its closure. Then MP = MP = lfp(TP ) = TP "! is the intended model of P. 2 c c c Theorem 3.5 establishes the equivalence between the declarative semantics based on intended models and the xpoint semantics based on the least xpoint of the operator TP . It remains to establish their equivalence to the proof-theoretic semantics given in Section 3.6. As in the classical case, we accomplish this by relating the stage of a ground atom A { the smallest number of iteration k such that A 2 TP "k { to the height of a proof tree for an atom more general than A. c c and (ii) non p-goals (pred and r-goals). Note inheritance only applies to p-goals. Basis: Suppose the proof tree has height 1. Then there are two possible cases { (i) either G is a p-clause local to some object, a pred-clause or an r-clause, or it is an inherited p-clause in some object from another object where it is local. Case 1: There exists a unit clause A 2 Pc such that mgu(G A) = . Case 2: There exist unit clauses A B 2 Pc such that A is a unit p-clause of the form p m(a1 : : : ak ) 7! a ] and B is a unit i-clause of the form o p @mk ], and G is of 0 0 0 0 0 7! Proof: By induction on the height k of a proof tree. There are two cases, (i) p-goals c Theorem 3.6 (Soundness) Let Pc be a closed program, Pc be the Herbrand inb stantiation of Pc, G be an atomic p-, r- or pred-goal, and G be all the ground instances d of G. If Pc ` G is provable then 9k such that G v TP "k . c 68 the form o m(a1 : : : ak ) 7! a]. Then the inheritance rule must be applied. Hence it must be the case that = mgu(o o ), = mgu(p ] p), % = p = o ] and = = mgu(< o a1 : : : ak a > ] < p a1 : : : ak a > %]). d Pc in c Let = for the rst case and = for the second case. Since G d both the cases, it follows from the de nition of TP that G v TP "2. Inductive step: Assume that the claim is true for any proof of height k ; 1 of a goal of the form Pc ` B . Then we have again two cases. Case (i): There must exist a clause of the form A B 2 Pc such that = mgu(G A), and = and we have a proof of height k for Pc ` G where = and the root node labelled deduction. Case (ii): There must exist a p-clause A B 2 Pc and a unit i-clause C 2 Pc such that A is of the form p m(a1 : : : ak ) 7! a ] and C is of the form o p @mk ], and G is of the form o m(a1 : : : ak ) 7! a]. We can now construct a proof tree of height k for Pc ` G such that the root node is labelled inheritance, and = mgu(o o ), = mgu(p ] p), % = fp = o g and = mgu(< o a1 : : : ak a > = ] < p a1 : : : ak a > %]). Also = and = % . d d d By inductive hypothesis, B v TP "k 1 holds. Since G = A in both d d the cases, it follows from lemma 3.1 that A v TP "k because either (i) B v d TP "k 1 , or (ii) fBd o p @mk ] g v TP "k 1 , o p @mk ] being unit clauses and d c d o p @mk ] o pdmk ] Pc . Hence G v TP "k . @ 2 0 0 0 0 0 c c 0 0 0 0 0 7! 0 0 0 0 0 c ; c c ; 0 0 7! c ; 0 0 7! 0 0 7! 0 0 7! c A 2 Pc such that either (i) = mgu(G A) and = , or (ii) there exist unit clauses A B 2 Pc such that A is a unit p-clause of the form p m(a1 : : : ak ) 7! a ], B is a unit iclause of the form o p @mk ], and G is of the form o m(a1 : : : ak ) 7! a] such that = mgu(o o ), = mgu(p ] p), % = fp = g and = mgu(< o a1 : : : ak a > =o ] < p a1 : : : ak a > %]). Then there is a proof for Pc ` A of height 1 which 0 0 0 0 0 7! 0 0 0 0 0 Proof: Again we proceed by induction on k . Basis: Suppose G 2 TPc "1. Then there must exist a unit clause Theorem 3.7 (Comple...
View Full Document

## This document was uploaded on 01/10/2011.

Ask a homework question - tutors are online