1 / 21

The design of j-DREW: a deductive reasoning engine for the web

The design of j-DREW: a deductive reasoning engine for the web. Bruce Spencer National Research Council Canada and University of New Brunswick Fredericton, Canada. NRC – A National Institution. Virtual Innovation Centres. NRC Institute / Innovation Centre IRAP Office. Motivation.

lenora
Download Presentation

The design of j-DREW: a deductive reasoning engine for the web

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. The design of j-DREW: a deductive reasoning engine for the web Bruce Spencer National Research Council Canada and University of New Brunswick Fredericton, Canada

  2. NRC – A National Institution Virtual Innovation Centres NRC Institute / Innovation Centre IRAP Office

  3. Motivation • Started as a bet: Can I teach deduction and advanced internet systems in one course? • Students understand recursive search • basic propositional top-down prover • Teaching a course at UNB on building Internet applications that employ deduction(in conjunction with Harold Boley, formerly DFKI) • Semantic web ontologies have rules • XML is declarative, so deduction is a basic operation • Students have trouble building systems (variables) • unification, composition of substitutionsunbinding on backtracking • Specialized Prolog implementation courses focus on vars • Warren and Meier: Computing with Logic (1988) • Can we hide the hard parts?

  4. Requirements on deduction system used in the course (and on web?) • First order logic with function symbols • Easily configured • Forward or backward search or backward and iterative deepening • Search strategy to be modified by student • Embeddable • Supports calls to and from rest of system • Easy to add new primitives (iterators) • Written in 100% Java • Access to libraries for networking, cryptography, XML parsers, RDF, XSLT, …

  5. Remove bindings Java Iterator Create bindings Propositional Prover chronologicalBacktrack while(choicePoints.nonEmpty()) Goal g = choicePoints.pop(); g.removeAttachedClause(); if(g.hasMoreClauses()) return; halt('failure') initially proofTree has an open Goal loop if(proofTree.hasNoOpenGoal()) halt('success'); else Goal g = proofTree.selectOpenGoal(); g.createMatchingClauseList(); if(g.hasMoreMatchingClauses()) DefiniteClause c = g.nextClause(); g.attachClause(c); choicePoints.push(g); else chronologicalBacktrack();

  6. c b b’ c Y2/h q(g(Y2) q(g(Y2) r(g(h) q(k) Y1/k Y1/f(Y2) Tree with initial goal p(Z) p(X) :- q(X), r(X). q(g(X)). q(k). r(g(h)) ?:-p(Z) a ChoicePoints p(Y1) :- q(Y1), r(Y1) b a Z/Y1

  7. Hiding the hard parts: Top-Down • A Goal creates its list of matching clauses and maintains pointer to current selection • Java iterator • Attaching a clause head to a Goal • imposes variable bindings across tree • Removing the clause • relaxes variable bindings • The tree provides access to all open Goals

  8. } deployed } planned Deployed and Planned Prototypes • Basic Prolog Engine • Negation as failure • RuleML input • Iterative deepening search • Search complete, unlike Prolog • Dynamic additions to clause set • allowed between depth limits (synchronous) • Possible student exercises • delay selecting deferred goals • Negation of ground goals • Backtracking to deeper choicepoint • Bottomup

  9. Deduction Example: Semantic Web • Semantics = meaning • Ontology • hierarchy of terms (subset) • logic conditions on their usage • Terms in a web page can be linked to their meanings in some ontology • Search with greater accuracy

  10. Smoked Salmon • SmokedSalmon is the intersection of Smoked and Salmon

  11. Smoked Salmon • Gravalax is the intersection of Cured and Salmon, but not Smoked Gravalax • SmokedSalmon is the intersection of Smoked and Salmon

  12. Smoked Salmon Lox Gravalax • Lox is Smoked, Cured Salmon • SmokedSalmon is the intersection of Smoked and Salmon • Gravalax is the intersection of Cured and Salmon, but not Smoked

  13. Gravalax Smoked Salmon • A search for keywords Salmon and Cured should return pages that mention Gravalax, even if they don’t mention Salmon and Cured • A search for Salmon and Smoked will return pages with smoked salmon, should also return pages with Lox, but not Gravalax Lox The Semantic Web vision is to make information on the web “understood” by computers, for searching, categorizing, …

  14. Gravalax Smoked Salmon Lox

  15. One possible encoding A search for keywords Salmon and Cured should return pages that mention Gravalax, even if they don’t mention Salmon and Cured. Search criteria: retrieve(P) :- mentions(P, cured), mentions(P, salmon). Ontology: mentions(P, cured) :- mentions(P, gravalax). mentions(P, salmon) :- mentions(P, gravalax). mentions(p1 gravalax). retrieve(p1) succeeds

  16. A search for Salmon and Smoked will return pages with smoked salmon, should also return pages with Lox, but not Gravalax. retrieve(P) :- mentions(P, smoked), mentions(P, salmon). mentions(P, cured) :- mentions(P, lox). mentions(P, salmon) :- mentions(P, lox). mentions(P, smoked) :- mentions(P, lox). mentions(P, cured) :- mentions(P, gravalax). mentions(P, salmon) :- mentions(P, gravalax). mentions(p1 gravalax). mentions(p2, lox). retrieve(p1) fails retrieve(p2) succeeds

  17. Bottom-Up / Forward Chaining • 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 (next) • Unlike OPS/Rete, returns proofs and uses first order syntax for atoms

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

  19. Summary • Teaching building deduction systems not hard • use of abstractions to hide variable handling • Semantic Web needs deduction • access to proof data structure (trust) • j-DREW deployed systems can use • forward / backward / other searches • small footprint, 100% Java • Take home messages: • not clear what form Semantic Web systems will take, so flexibility is key • implementers should provide API’s

  20. References • CS6999 Semantic Web Techniques http://www.cs.unb.ca/~bspencer/CS6999 • RuleML http://www.dfki.de/ruleml • j-DREW open source? • Not yet

More Related