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

Slides:



Advertisements
Similar presentations
Artificial Intelligence 8. The Resolution Method
Advertisements

Some Prolog Prolog is a logic programming language
Resolution Proof System for First Order Logic
First-Order Logic.
SLD-resolution Introduction Most general unifiers SLD-resolution
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 10– Club and Circuit Examples.
Standard Logical Equivalences
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
1 Introduction to Prolog References: – – Bratko, I., Prolog Programming.
Automated Reasoning Systems For first order Predicate Logic.
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Logic.
Resolution in Propositional and First-Order Logic.
1 Logical reasoning systems Theorem provers and logic programming languages Production systems Frame systems and semantic networks Description logic systems.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution.
Inference and Resolution for Problem Solving
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering A Hole in Goal Trees Notes for: D.W. Loveland and M. Stickel. “A Hole in Goal.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Chapter 3 Propositional Logic
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
The design of j-DREW: a deductive reasoning engine for the web Bruce Spencer National Research Council Canada and University of New Brunswick Fredericton,
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Jim Little UBC CS 322 – CSP October 22, 2014.
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) Oct, 26, 2010.
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
UIUC CS 497: Section EA Lecture #3 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
1 Chapter 8 Inference and Resolution for Problem Solving.
Logical Agents Logic Propositional Logic Summary
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Logic Programming CSC 358/ Outline Pattern matching Unification Logic programming.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 17 Wednesday, 01 October.
Resolution Strategies One common strategy for applying resolution is called level saturation. Here you try to resolve every pair of clauses from the original.
The AI War LISP and Prolog Basic Concepts of Logic Programming
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 23 Friday, 17 October.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 24, 2012.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 18 of 41 Friday, 01 October.
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
The Law of Resolution Formal Aspects of Computer Science - Week 7 The Law of Resolution Lee McCluskey, room 2/07
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
CSE (c) S. Tanimoto, 2008 Predicate Calculus II 1 Predicate Calculus 2 Outline: Unification: definitions, algorithm Formal interpretations and satisfiability.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
J-DREW and BRWS Bruce Spencer May 16, Train people to build the Rule-based web serices Courses on systems employing rule engines and Internet applications.
CS412/413 Introduction to Compilers Radu Rugina Lecture 13 : Static Semantics 18 Feb 02.
Backward chaining Assume the same representation of rules as in forward chaining, i.e. If is true, is true, … is true Then is true. Rule interpretation.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 9 Lecture 13 First-Order Logic Chapter 9.
Logic Programming Lecture 2: Unification and proof search.
EA C461 Artificial Intelligence
First-Order Logic and Inductive Logic Programming
Prolog syntax + Unification
Logic: Top-down proof procedure and Datalog
CS2136: Paradigms of Computation
Presentation transcript:

0

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

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

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)

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

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

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)

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

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?

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

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).

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