The Well-Founded Model – A Quick Introduction Peter Baumgartner The Well-Founded Model – Peter Baumgartner – p.1
Various Logic Program Semantics Assign “meaning” to a program / knowledge base: perfect model, stable models, well-founded model Normal (logic) programs: negation in rule body allowed. win ( X ) ← move ( X , Y ) , not win ( Y ) (1) move ( c , d ) ← (2) move ( a , b ) ← (3) move ( b , a ) ← (4) True Undefined False The well-founded model: win ( c ) win ( a ) win ( d ) win ( b ) Two stable models: True False True False (i) (ii) win ( c ) win ( d ) win ( c ) win ( d ) win ( a ) win ( b ) win ( b ) win ( a ) The Well-Founded Model – Peter Baumgartner – p.2
More About Well-Founded Models See [VanGelder/Ross/Schlipf 89, Przymusinski 91] Generally accepted for “reasonable” sceptical reasoning “well-behaved”: always exists, stratification not required unique model goal-oriented procedure exists quadratic complexity undef is assigned to atoms which negatively depend on themselves, and for which no independent “well-founded” derivation exists XSB-Prolog system (Warren et. al., top-down system) SModels (Niemel¨ a et. al., bottom-up system, also for stable model semantics) The Well-Founded Model – Peter Baumgartner – p.3
“Building in” Information into Programs Program P q ← r ← not s p ← not q , s p ← not p True Undefined False Partial interpretation J p , r q s Quotient program P q ← r ← true J p ← false , s p ← undef I is a partial model of P J iff for all Head ← Body in P J : - If I ( Body ) = true then I ( Head ) = true - If I ( Head ) = false then I ( Body ) = false True Undefined False Least partial model LPM ( P J ) q , r p s - I minimizes true atoms, and - I maximizes false atoms The Well-Founded Model – Peter Baumgartner – p.4
Well-Founded Models as Fixpoint Iteration false ⊆ -increasing undef ⊆ -increasing true Step 0 Step 1 Step n Maintain two sets to represent I i : The “ true ” atoms The “ true or undef ” atoms Set I 0 = “all undef ” and do I i + 1 = LPM ( P I i ) until fixpoint, where seqeuence ( J 0 = “all false ”) , J 1 , . . . , J n − 1 , ( J n = J n + 1 = LPM ( P I i )) obtained with operator associated to ( Head ← Body ) ∈ P I i : (i) If J k ( Body ) = true then J k + 1 ( Head ) = true (ii) If J k + 1 ( Head ) = false then J k ( Body ) = false iff If J k ( Body ) � = false then J k + 1 ( Head ) � = false � �� � � �� � J k ( Body ) ∈{ true , undef } J k + 1 ( Head ) ∈{ true , undef } The Well-Founded Model – Peter Baumgartner – p.5
Computing Well-Founded Models, Step 0 � → Step 1 P a ← c ← not b , a b ← not c e ← not d f ← e f ← not a false d a , b , c , d , undef b , c , e , f e , f a true Step 0 Step 1 The Well-Founded Model – Peter Baumgartner – p.6
Computing Well-Founded Models, Step 0 � → Step 1 (i) build P / a , b , c , d , e , f P a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← undef f ← e f ← e f ← not a f ← undef false d a , b , c , d , undef b , c , e , f e , f a true Step 0 Step 1 The Well-Founded Model – Peter Baumgartner – p.6
Computing Well-Founded Models, Step 0 � → Step 1 (i) build P / a , b , c , d , e , f P a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← undef f ← e f ← e f ← not a f ← undef (ii) derive new true atoms a false d a , b , c , d , undef b , c , e , f e , f a true Step 0 Step 1 The Well-Founded Model – Peter Baumgartner – p.6
Computing Well-Founded Models, Step 0 � → Step 1 (i) build P / a , b , c , d , e , f P a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← undef f ← e f ← e f ← not a f ← undef (ii) derive new true atoms a (iii) derive new true or undef atoms b , c , e , f a false d a , b , c , d , undef b , c , e , f e , f a true Step 0 Step 1 The Well-Founded Model – Peter Baumgartner – p.6
Computing Well-Founded Models, Step 0 � → Step 1 (i) build P / a , b , c , d , e , f P a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← undef f ← e f ← e f ← not a f ← undef (ii) derive new true atoms a (iii) derive new true or undef atoms b , c , e , f a (iv) conclude new false atoms d false d a , b , c , d , undef b , c , e , f e , f a true Step 0 Step 1 The Well-Founded Model – Peter Baumgartner – p.6
Computing Well-Founded Models, Step 1 � → Step 2 P a ← c ← not b , a b ← not c e ← not d f ← e f ← not a false d d b , c undef b , c , e , f a , e , f a true Step 1 Step 2 The Well-Founded Model – Peter Baumgartner – p.7
Computing Well-Founded Models, Step 1 � → Step 2 (i) build P / a b , c , e , f P d a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← true f ← e f ← e f ← not a f ← false false d d b , c undef b , c , e , f a , e , f a true Step 1 Step 2 The Well-Founded Model – Peter Baumgartner – p.7
Computing Well-Founded Models, Step 1 � → Step 2 (i) build P / a b , c , e , f P d a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← true f ← e f ← e f ← not a f ← false (ii) derive new true atoms a , e , f false d d b , c undef b , c , e , f a , e , f a true Step 1 Step 2 The Well-Founded Model – Peter Baumgartner – p.7
Computing Well-Founded Models, Step 1 � → Step 2 (i) build P / a b , c , e , f P d a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← true f ← e f ← e f ← not a f ← false (ii) derive new true atoms a , e , f (iii) derive new true or undef atoms a , e , f b , c false d d b , c undef b , c , e , f a , e , f a true Step 1 Step 2 The Well-Founded Model – Peter Baumgartner – p.7
Computing Well-Founded Models, Step 1 � → Step 2 (i) build P / a b , c , e , f P d a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← true f ← e f ← e f ← not a f ← false (ii) derive new true atoms a , e , f (iii) derive new true or undef atoms a , e , f b , c (iv) conclude new false atoms d false d d b , c undef b , c , e , f a , e , f a true Step 1 Step 2 The Well-Founded Model – Peter Baumgartner – p.7
Computing Well-Founded Models, Step 1 � → Step 2 (i) build P / a b , c , e , f P d a ← a ← c ← not b , a c ← undef , a b ← not c b ← undef e ← not d e ← true f ← e f ← e f ← not a f ← false (ii) derive new true atoms a , e , f (iii) derive new true or undef atoms a , e , f b , c (iv) conclude new false atoms d Fixpoint reached - stop false d d b , c undef b , c , e , f a , e , f a true Step 1 Step 2 The Well-Founded Model – Peter Baumgartner – p.7
Recommend
More recommend