Show the set of ground atomic formulae derivable from this KB. The atoms derivable from the KB, in order are:r(a). r(e). p(c). q(b). s(a,b). s(d,b). s(e,d). p(X) <- q(X) & r(X). q(X) <- s(X,Y) & q(Y).
r(a). r(e). p(c). q(b). s(a,b). s(d,b). s(e,d). q(a). p(a). q(d). q(e). p(e).
You need to:
Here is a simple extension:
Here is a trace of this program (along with "elect.cil"):% ohp_lit(OHP) is true if the projector OHP's lamp is lit. ohp_lit(OHP) <- projector(OHP) & turned_on(OHP) & ok(OHP) & plugged_into(OHP,Outlet) & live(Outlet). % could_see_transparency(OHP) is true if you could see a transparency % that is on projector OHP. could_see_transparency(OHP) <- projector(OHP) & ohp_lit(OHP) & mirror_in_place(OHP) & focussed(OHP). % can_see(Tran) is true if you can see tansparency Trans can_see(Tran) <- on(Tran,OHP) & could_see_transparency(OHP). % projector(OHP) is true if OHP is an overhead projector % ohp1, ohp2 and ohp3 are overhead projectors projector(ohp1). projector(ohp2). projector(ohp3). % turned_on(OHP) is true if projector OHP is turned on. turned_on(ohp1). turned_on(ohp2). % ok(OHP) is true of projector OHP isn't broken ok(ohp1). ok(ohp2). % plugged_into(OHP,Outlet) is true if projector OHP is plugged into % electrical outlet Outlet plugged_into(ohp1,p1). plugged_into(ohp2,p2). % mirror_in_place(OHP) is true if ptojector OHP's mirrir is where it % should be. mirror_in_place(ohp1). mirror_in_place(ohp2). % focussed(OHP) is true if projector OHP is focussed focussed(ohp1). % on(Tran,OHP) is true if transparency Tran is on projector OHP. on(lect2_3,ohp1). on(lect2_4,ohp2).
CILOG Version 0.11. Copyright 1997, David Poole. CILOG comes with absolutely no warranty. All inputs end with a period. Type ``help.'' for help. cilog: load 'elect.cil'. CILOG theory elect.cil loaded. cilog: load 'ohp.cil'. CILOG theory ohp.cil loaded. cilog: ask ohp_lit(OHP). Answer: ohp_lit(ohp1). [ok,more,how,help]: more. Answer: ohp_lit(ohp2). [ok,more,how,help]: more. No more answers. cilog: ask could_see_transparency(OHP). Answer: could_see_transparency(ohp1). [ok,more,how,help]: more. No more answers. cilog: ask can_see(Tran). Answer: can_see(lect2_3). [ok,more,how,help]: more. No more answers. cilog: