Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "0 1 Todays Topics Resolution – top down and bottom up j-DREW BU procedure Subsumption – change to procedure Infinite Loops RuleML input – Prolog output."— Presentation transcript:

1 0

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

3 2 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 3 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 4 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 5 Theorem Prover’s Search Procedure Priority queue – new facts Discrimination trees: – used facts – rules, indexed on first 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 6 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 7 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 8 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 9 Theorem Prover’s Search Procedure Priority queue – new facts Discrimination trees: – used facts – rules, indexed on first goal main loop select new fact if it is not forward subsumed 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

11 10 RuleML Input to j-DREW BU may also be RuleML RuleML queries are ignored currently discount customer product 5.0 percent premium customer regular product discount(customer,product1,'5.0 percent') :- premium(customer),regular(product).

12 11 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


Download ppt "0 1 Todays Topics Resolution – top down and bottom up j-DREW BU procedure Subsumption – change to procedure Infinite Loops RuleML input – Prolog output."

Similar presentations


Ads by Google