Presentation is loading. Please wait.

Presentation is loading. Please wait.

The design of j-DREW: a deductive reasoning engine for the web Bruce Spencer National Research Council Canada and University of New Brunswick Fredericton,

Similar presentations


Presentation on theme: "The design of j-DREW: a deductive reasoning engine for the web Bruce Spencer National Research Council Canada and University of New Brunswick Fredericton,"— 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 20-Sep-0220-Sep-022 NRC – A National Institution NRC Institute / Innovation Centre IRAP Office Virtual Innovation Centres

3 20-Sep-0220-Sep-023 National Research Council Research Institutes and Facilities across Canada 17 research institutes 4 innovation centres 3,500 employees; 1,000 guest workers National science facilities

4 20-Sep-0220-Sep-024 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 substitutions unbinding on backtracking Specialized Prolog implementation courses focus on vars –Warren and Meier: Computing with Logic (1988) Can we hide the hard parts?

5 20-Sep-0220-Sep-025 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, …

6 20-Sep-0220-Sep-026 Propositional Prover 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(); Java Iterator chronologicalBacktrack while(choicePoints.nonEmpty()) Goal g = choicePoints.pop(); g.removeAttachedClause(); if(g.hasMoreClauses()) return; halt('failure') Create bindings Remove bindings

7 20-Sep-0220-Sep-027 Tree with initial goal p(Z) p(X) :- q(X), r(X). q(g(X)). q(k). r(g(h)) p(Y1) :- q(Y1), r(Y1) ?:-p(Z) a aChoicePoints b Z/Y1 q(g(Y2)r(g(h) b c c Y1/f(Y2) Y2/h q(g(Y2) q(k)Y1/k b’

8 20-Sep-0220-Sep-028 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

9 20-Sep-0220-Sep-029 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 } deployed } planned

10 20-Sep-0220-Sep-0210 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

11 20-Sep-0220-Sep-0211

12 20-Sep-0220-Sep-0212 SmokedSalmon is the intersection of Smoked and Salmon Smoked Salmon

13 20-Sep-0220-Sep-0213 Gravalax is the intersection of Cured and Salmon, but not Smoked SmokedSalmon is the intersection of Smoked and Salmon Smoked Salmon Gravalax

14 20-Sep-0220-Sep-0214 Lox is Smoked, Cured Salmon Gravalax is the intersection of Cured and Salmon, but not Smoked SmokedSalmon is the intersection of Smoked and Salmon Smoked Salmon Gravalax Lox

15 20-Sep-0220-Sep-0215 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 Smoked Salmon Lox Gravalax The Semantic Web vision is to make information on the web “understood” by computers, for searching, categorizing, …

16 20-Sep-0220-Sep-0216 Smoked Salmon Lox Gravalax

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

18 20-Sep-0220-Sep-0218 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). A search for Salmon and Smoked will return pages with smoked salmon, should also return pages with Lox, but not Gravalax. mentions(p1 gravalax). mentions(p2, lox). retrieve(p1) fails retrieve(p2) succeeds

19 20-Sep-0220-Sep-0219 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

20 20-Sep-0220-Sep-0220 Theorem Prover’s Search Procedure 3 Definite Clause Lists: –new facts (priority queue) –old facts –rules 2 Discrimination trees: –used facts –rules, indexed on first goal loop select new fact for each matching rule resolve process new result add to used facts 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

21 20-Sep-0220-Sep-0221 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

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


Download ppt "The design of j-DREW: a deductive reasoning engine for the web Bruce Spencer National Research Council Canada and University of New Brunswick Fredericton,"

Similar presentations


Ads by Google