140 likes | 295 Views
The Alternating Fixpoint computation of the Well-Founded Model. Presenter: Weiling Li Advisor: Dr. Sunderraman. Overview. Gleder’s Alternating Fixpoint Van Gelder, The Alternating Fixpoint of Logic Programs with Negation. 1989, 1993 [1,2]
E N D
The Alternating Fixpoint computation of the Well-Founded Model Presenter: Weiling Li Advisor: Dr. Sunderraman
Overview • Gleder’s Alternating Fixpoint • Van Gelder,The Alternating Fixpoint of Logic Programs with Negation. 1989, 1993 [1,2] • Improving the alternating Fixpoint: Stefan B., Ulrich Z., Burkhard F., 1997 • Transformation-Based Bottom-Up Computation of the Well-Founded Model [3] • Improving the Alternating Fixpoint: The Transformation Approach [4]
transforms an underestimate of the set of negative conclusions into an (intermediate) overestimate transforms the overestimate into a new underestimate Gleder’s Alternating Fixpoint (Contd..)
Gleder’s Alternating Fixpoint (Contd..) • The immediate consequence transformation: TP(I+)={p|PH contains a rule whose head is p and every literal of whose body is in I+} • PH is Herbrand instantiation. • The stability Transformation: • The eventual consequence mapping is the least fixpoint of ( P’=PH U ῖ ) • Gleder’s stability transformation
Overview • Gleder’s Alternating Fixpoint • Van Gelder,The Alternating Fixpoint of Logic Programs with Negation. 1989, 1993 [1,2] • Improving the alternating Fixpoint: Stefan B., Ulrich Z., Burkhard F., 1997 • Transformation-Based Bottom-Up Computation of the Well-Founded Model [3] • Improving the Alternating Fixpoint: The Transformation Approach [4]
An adaption of Gleder’s Alternating Fixpoint approach • Def 1: Extended Immediate Consequence Operator P: logic program; I and J: sets of ground atoms • Def 2: Alternating Fixpoint Procedure Ki: true facts; Ui: possible facts • K0 := lfp(TP+) • U0 := lfp(TP,K0) • Ki := lfp(TP,Ui-1), i>0 • Ui := lfp(TP,Ki), i>0 Until (Kj, Uj) = (Kj+1, Uj+1)
An adaption of Gleder’s Alternating Fixpoint approach (Example 2) • Logic program OddNum: (1~fixed even number n) • odd(X) <- succ(Y,X)^not odd(Y). • succ(0,1). • … • succ(n-1,n). K0={succ(0,1),…,succ(n-1,n)} U0=K0 U {odd(1),…,odd(n)} K1=K0 U {odd(1)} U1=K0 U {odd(1),odd(3),odd(4),…,odd(n)} K2=K0 U {odd(1),odd(3)} U2=K0 U {odd(1),odd(3),odd(5),odd(6),…,odd(n)} … Kn/2=Un/2=K0 U {odd(1),odd(3),odd(5),…,odd(n-1)}
Elementary Program Transformations • Positive Reduction: P1 ׀->P P2 iff there is a rule A <- ß in P1 and a negative literal not BЄ ß such that B ₡ heads(P1), i.e., there is no rule about B in P1, and P2 = (P1- {A <- ß}) U {A <- (ß – {not B})}. • heads(P) := { A ЄBASE(P) | there is a ß such that (A <- ß ) Є P} • Negative Reduction: P1 ׀->N P2 iff there is a rule A <- ß in P1 and a negative literal not BЄ ß such that B Є facts(P1), i.e., B appears as a fact in P1, and P2 = (P1- {A <- ß}) . • facts(P) := { A ЄBASE(P) | (A <- ø ) Є P}
Elementary Program Transformations (Contd..) • Loop Detection: let P2={(A <- ß) Є P1 | A Є lfp(TP1, ø)}. Then 1. P1 ׀->L P2 (unless P2 =P1) , and 2. P2 is irreducible w.r.t. ׀->L Greatest Unfounded Set: • TP1, ø, ( standard consequence operator TP1), computes the possibly true atoms. Therefore, the GUS : BASE(P) – lfp (TP1, ø). • We delete all rules A<-ß with the A Є GUS • Computation of Well-Founded Semantics: PNSFL
Example 2 Revisited • With K0 = {succ(0, 1 ) , … , succ(n - 1, n)}, we have OddNum0 = K0 U { odd(1) <- succ(0, 1) ^ not odd(0),…, odd(n) <- succ(n - 1, n) ^ not odd(n - 1)}.
Immediate Consequences with Delayed Literals • Delay until their truth value is obvious • unfolding transformation • Conditional Fact: A<- γ is a ground rulecontaining both positive and negativedelayed literals in the body • Immediate Consequences with Delayed Literals S: conditional facts; J: a set of ground atoms
Relation to Alternating Fixpoint until Note:
References • 1. Van Gelder ,The Alternating Fixpoint of Logic Programs with Negation Extended Abstract, 1989http://delivery.acm.org/10.1145/80000/73722/p1-van_gelder.pdf?key1=73722&key2=8497533821&coll=GUIDE&dl=GUIDE&CFID=100161788&CFTOKEN=62347327 • 2. Van Gelder ,The Alternating Fixpoint of Logic Programs with Negation, 1993http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.131.8077&rep=rep1&type=pdf • 3. Stefan B., Ulrich Z., Burkhard F., Transformation-Based Bottom-Up Computation of the Well-Founded Model, 1997 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.8513 • 4. Ulrich Z., Burkhard F., Stefan B., Improving the Alternating Fixpoint: The Transformation Approach, 1997http://www.springerlink.com/content/x66203328hw7853u/