1 / 12

jDREW

jDREW. BU. Todays Topics. Resolution top down and bottom up j-DREW BU procedure Subsumption change to procedure Infinite Loops RuleML input Prolog output. Resolution. Clausal Logic: Syntax

gary
Download Presentation

jDREW

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. jDREW BU

  2. Todays Topics • Resolution • top down and bottom up • j-DREW BU procedure • Subsumption • change to procedure • Infinite Loops • RuleML input • Prolog output

  3. Resolution • Clausal Logic: Syntax • an atom in logic is (syntactically) a relation symbol followed by its arguments, each of which is a term • a term is either a variable, a constant or a function symbol followed by its arguments (which are also terms) • brother(‘Harry’, future_king(‘England’)) • passes(‘Fang’, cs6999) • each clause is a disjunction of positive or negative atoms • attends(Student, Course) \/ ~passes(Student, Course) • Rule Notation: a \/ b \/ ~c \/ ~d becomes a \/ b  c /\ d • a literal is a positive or negative atom • Definite clauses have • one positive literal and any number of negative literals

  4. Resolution • Given two clauses, to form the resolvent: • find two literals, one from each clause, that • can be made to match (with assignments to the variables) • differ in sign • construct the disjunction of all literals except these two • apply the substitution • Resolve • b(X) \/ ~c(X, 3) against c(2, Y) \/ ~d(Y, Z) • gives b(2) \/ ~d(3, Z) • In rule notation • b(X)  c(X, 3) against c(2, Y)  d(Y, Z) • gives b(2)  d(3, Z)

  5. Bottom Up Reasoning • Single literal definite clauses are called facts • passes(‘Fang’, cs6999) • Resolving a fact against a condition in a rule is called forward reasoning • attends(Student, Course)  passes(Student, Course) • Resolvent: attends(‘Fang’, cs6999) • Usually a derivation tree is viewed with given facts at the bottom and derived facts at the top • so forward reasoning also called bottom up reasoning • Prolog does top-down, backward reasoning • starting from a negative clause, called a query

  6. Theorem Prover’s Search Procedure • Priority queue • new facts • Discrimination trees: • used facts • rules, indexed onfirst goal main loop select new fact for each matching rule resolve process new result add to old facts process new result(C) if C is rule for each old fact matching first goal resolve process new result add C to rules else add C to new facts

  7. Preventing Infinite Loops • To prevent infinite loops in the search procedure, • use subsumption (next slides) and either • 1a) use ground facts and rules only, or • 1b) use no function symbols Sometimes it helps if the positive literal has no new variables (that do not already occur in the body)

  8. Subsumption • A clause C subsumes a clause D if there is a substitution  such that C D • C is more general than D • Given C you do not need D • We use subsumption between facts (atoms) • Atoms C subsumes atom D if there exists  such that C= D • Subsumption is checked by • first grounding all variables in D to new constants • then trying to unify C with grounded D

  9. Forward subsumption • New result is checked against old results to see if it is more general • We can prevent some infinte loops by checking subsumption of new fact against old facts • Should this be done when the new fact is derived or when it is selected? • experience shows that subsumption on selection is better • What about subsumption of rules?

  10. Theorem Prover’s Search Procedure main loop select new fact if it is not forward subsumed for each matching rule resolve process new result add to old facts • Priority queue • new facts • Discrimination trees: • used facts • rules, indexed onfirst goal process new result(C) if C is rule for each old fact matching first goal resolve process new result add C to rules else add C to new facts

  11. <imp> <_head> <atom> <_opr><rel>discount</rel></_opr> <var>customer</var> <var>product</var> <ind>5.0 percent</ind> </atom> </_head> <_body> <and> <atom> <_opr><rel>premium</rel></_opr> <var>customer</var> </atom> <atom> <_opr><rel>regular</rel></_opr> <var>product</var> </atom> </and> </_body> </imp> RuleML • Input to j-DREW BU may also be RuleML • RuleML queries are ignored currently discount(customer,product1,'5.0 percent') :- premium(customer),regular(product).

  12. Related Literature • Set of support prover for definite clauses • Facts are supports • Theorem: Completeness preserved when definite clause resolutions are only between first negative literal and fact. • Proof: completeness of lock resolution (Boyer’s PhD) • Use standard search procedure to reduce redundant checking • Unlike OPS/Rete, returns proofs and uses first order syntax for atoms

More Related