April 3rd, 1998TAPD'98. Paris 2-3 April, 1998.1 Tabling Abduction José Alferes and Luís Moniz Pereira Univ. Évora and CENTRIA CENTRIA Univ. Nova Lisboa.

Slides:



Advertisements
Similar presentations
CS4026 Formal Models of Computation Part II The Logic Model Lecture 6 – Arithmetic, fail and the cut.
Advertisements

Logic & Critical Reasoning
Causal-link Planning II José Luis Ambite. 2 CS 541 Causal Link Planning II Planning as Search State SpacePlan Space AlgorithmProgression, Regression POP.
1 Introduction to Prolog References: – – Bratko, I., Prolog Programming.
Automated Reasoning Systems For first order Predicate Logic.
First Order Logic Resolution
WFSX programming Prolog programming style, but with the WFSX semantics Requires: –A new proof procedure (different from SLDNF), complying with WFS, and.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Well-founded Semantics with Disjunction João Alcântara, Carlos Damásio and Luís Moniz Pereira Centro de Inteligência Artificial.
Cs774 (Prasad)L7Negation1 Negation by Failure
CHORD Semantics January, F-Atoms User Defined Constraint – A::B – A[B->C], A[B=>C] – A[B(V)->C], A[B(P:T0)=>T1] Built-in Constraint – 1 : Integer,
Prolog IV Logic, condensed. 2 Propositional logic Propositional logic consists of: The logical values true and false ( T and F ) Propositions: “Sentences,”
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Default and Cooperative Reasoning in Multi-Agent Systems Chiaki Sakama Wakayama University, Japan Programming Multi-Agent Systems based on Logic Dagstuhl.
A Preliminary Study on Reasoning About Causes Pedro Cabalar AI Lab., Dept. of Computer Science University of Corunna, SPAIN.
Luís Moniz Pereira CENTRIA, Departamento de Informática Universidade Nova de Lisboa Pierangelo Dell’Acqua Dept. of Science and Technology.
Inference and Resolution for Problem Solving
José Júlio Alferes Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa, Portugal Pierangelo Dell’Acqua Dept. of.
Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science.
Today’s Topics n Review Logical Implication & Truth Table Tests for Validity n Truth Value Analysis n Short Form Validity Tests n Consistency and validity.
1 Stable vs. Layered Logic Program Semantics Stable vs. Layered Logic Program Semantics Luís Moniz Pereira Alexandre Pinto Centre for Artificial Intelligence.
Knoweldge Representation & Reasoning
Reductio ad Absurdum Argumentation in Normal Logic Programs Luís Moniz Pereira and Alexandre Miguel Pinto CENTRIA – Centro de Inteligência Artificial,
Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa, Portugal Pierangelo Dell’Acqua Dept. of Science and Technology.
Artificial Intelligence
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
LING 388 Language and Computers Lecture 17 10/28/03 Sandiway FONG.
Needs Work Need to add –HW Quizzes Chapter 13 Matrices and Determinants.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
CPS 170: Artificial Intelligence Propositional Logic Instructor: Vincent Conitzer.
Empirical Explorations with The Logical Theory Machine: A Case Study in Heuristics by Allen Newell, J. C. Shaw, & H. A. Simon by Allen Newell, J. C. Shaw,
1 Inference Rules and Proofs (Z); Program Specification and Verification Inference Rules and Proofs (Z); Program Specification and Verification.
1 Chapter 8 Inference and Resolution for Problem Solving.
Modelling Adaptive Controllers with Evolving Logic Programs Pierangelo Dell’Acqua Anna Lombardi Dept. of Science and Technology - ITN Linköping University,
Control Algorithms 1 Chapter 6 Control Algorithms 1 Chapter 6 Pattern Search.
Preference Revision via Declarative Debugging Pierangelo Dell’Acqua Dept. of Science and Technology - ITN Linköping University, Sweden EPIA’05, Covilhã,
BACS 287 Programming Logic 2. BACS 287 Sequence Construct The sequence construct is the default execution mode for the CPU. The instructions are executed.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
The AI War LISP and Prolog Basic Concepts of Logic Programming
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
First-Order Logic and Inductive Logic Programming.
L. M. Pereira, J. J. Alferes, J. A. Leite Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa, Portugal P. Dell’Acqua Dept. of Science.
KR A Principled Framework for Modular Web Rule Bases and its Semantics Anastasia Analyti Institute of Computer Science, FORTH-ICS, Greece Grigoris.
Propositional Logic Predicate Logic
NMR98 - Logic Programming1 Learning with Extended Logic Programs Evelina Lamma (1), Fabrizio Riguzzi (1), Luís Moniz Pereira (2) (1)DEIS, University of.
Warm-Up Draw a number line for both problems and solve. 1.) = 2.) = Use the same paper as yesterday!
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Simplifying Dynamic Programming via Tabling Hai-Feng Guo University of Nebraska at Omaha, USA Gopal Gupta University of Texas at Dallas, USA.
07/10/04 AIPP Lecture 5: List Processing1 List Processing Artificial Intelligence Programming in Prolog Lecturer: Tim Smith Lecture 5 07/10/04.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
LOGICMOO INFERENCE ENGINE: Use only “decidable” fragments of Logic. (No false negatives and no false positives) Expect the systems Knowledge of the world.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Copyright 1999Paul F. Reynolds, Jr. Foundations of Logic Programming.
Inference of Gene Relations from Microarray Data by Abduction Irene Papatheodorou & Marek Sergot Imperial College, London UK.
Cs7120 (Prasad)L26-ProgTech1 Programming Techniques
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
October 19th, 2007L. M. Pereira and A. M. Pinto1 Approved Models for Normal Logic Programs Luís Moniz Pereira and Alexandre Miguel Pinto Centre for Artificial.
Goal-directed Execution of Answer Set Programs
Instructor: Vincent Conitzer
Proposition & Predicates
First-Order Logic and Inductive Logic Programming
Logical Agents Chapter 7.
CPS 570: Artificial Intelligence Logic
This Lecture Substitution model
Artificial Intelligence Propositional Logic
RESOLUTION.
CPS 570: Artificial Intelligence Logic
Presentation transcript:

April 3rd, 1998TAPD'98. Paris 2-3 April, Tabling Abduction José Alferes and Luís Moniz Pereira Univ. Évora and CENTRIA CENTRIA Univ. Nova Lisboa Portugal

April 3rd, 1998TAPD'98. Paris 2-3 April, Abductive procedures One of the main issues in abductive procedures is: –How to collect abduced literals to prove a goal? i.e. –Which consistent set of abducibles, if added as facts, prove the goal

April 3rd, 1998TAPD'98. Paris 2-3 April, In XSB-Prolog When a tabled goal G succeeds its table may contains suspended goals due to loops over negation - The residue of G This residue can be accessed by predicate get_residual/2

April 3rd, 1998TAPD'98. Paris 2-3 April, Naïve approach Table abducible predicates Force calls to them to suspend every time Produce an abductive solution as a residue of the top-goal In general the naïve approach does not work. We generalize the naïve approach to implement an abductive procedure based on tabling in XSB- Prolog

April 3rd, 1998TAPD'98. Paris 2-3 April, Summary Review of XSB residue Naïve approach Dealing with default negation Dealing with loops Further topics

April 3rd, 1998TAPD'98. Paris 2-3 April, Tabling negation –Whenever there are loops over negation, two tabled calls may depend on each other so that neither of which can be completed Literals involved in such loops are delayed If, in the end, some calls are not completely evaluated, they’ll have an associated list of delays - the residue We assume some knowledge of SLG resolut.

April 3rd, 1998TAPD'98. Paris 2-3 April, Delayed literals For tabled literals, answers are rules with delayed literals in the body :- table r/0, s/0, p/1. p(X) :- tnot(r). r :- tnot(s). p(X) :- a(X). a(a). s :- tnot(r). The answers are: p(X) :- tnot(r). r :- tnot(s). p(a). a(a). s :- tnot(r).

April 3rd, 1998TAPD'98. Paris 2-3 April, Combinatorial explosion To avoid combinatorial explosion, delayed literals in the body are not propagated over tabled literals Tabled literals act as place holders for propagating delays :- table r/0, s/0, p/1, q/0. p(X) :- q. r :- tnot(s). q :- tnot(r). s :- tnot(r).

April 3rd, 1998TAPD'98. Paris 2-3 April, Residual program get_residual(Goal,Res) –Returns in Res the body of an answer rule for Goal –It does not produce the residue itself –It only accesses the already built residue

April 3rd, 1998TAPD'98. Paris 2-3 April, Naïve approach Table abductive literals q  p p  a, b p  c Abd = {a,b,c} q :- p. p :- abd(a), abd(b). p :- abd(c). abd(X) :- tnot(abd(X)). :- table abd/1,q/0. abd_sol(q,Ab) :- q,fail; get_residual(q,Ab). Make sure that they are suspended Guarantee that the table is complete before calling get_residual Obtain the abductive solutions via the residue Table the top-goal Translate abducible L into abd(L)

April 3rd, 1998TAPD'98. Paris 2-3 April, Naïve approach example q :- p. p :- abd(a), abd(b). p :- abd(c). abd(X) :- tnot(abd(X)). :- table abd/1,q/0. abd_sol(q,Ab) :- q,fail; get_residual(q,Ab). ?- abd_sol(q,Ab). Ab = [abd(a),abd(b)]; Ab = [abd(c)]; no.

April 3rd, 1998TAPD'98. Paris 2-3 April, Problems If the program has default negation, the failure mechanism makes it impossible to pass arguments (abductions) to the top- goal –Other problems arise: abducing falsity; consistency checking;... If other predicates are tabled, the residue may come in terms of those (and not of the abducibles). –Tabling of others is needed because of loops

April 3rd, 1998TAPD'98. Paris 2-3 April, Negation Example q  a, tnot p. p  a,b. p  c. The desired abd. solution is: {a, not b, not c} With the naïve approach (with not tabled): [abd(p), tnot(p)]. How to pass abductions up through negation? Generate rules for negation and replace negative call by (positive) calls to these rules Rules for negatives form a dual program (c.f. [PAA91])

April 3rd, 1998TAPD'98. Paris 2-3 April, Dual (ground) program Turn all rules for a predicate A into one (by using disjunction in bodies) The rule for not_A is obtained by interchanging, in the rule for A, conjunction and disjunction, plus positive and negative literals a  b, not c a  d, not e a  b, not c ; d, not e not_a  (not_b; c), (not_d; e)

April 3rd, 1998TAPD'98. Paris 2-3 April, Dual example q :- abd(a), not_p. p :- abd(a), abd(b). p :- abd(c). abd(X) :- tnot(abd(X)). :- table abd/1,q/0. abd_sol(q,Ab) :- q,fail; get_residual(q,Ab). ?- abd_sol(q,Ab). Ab = [abd(a),abd(not_a),abd(not_c)]; Ab = [abd(a),abd(not_b), abd(not_c)]; no. not_q :- abd(not_a); p. not_p :- (abd(not_a); abd(not_b)), abd(not_c).

April 3rd, 1998TAPD'98. Paris 2-3 April, Checking consistency To avoid inconsistent solutions, add a call to consistent/1 after get_residual/2 abd_sol(q,Ab) :- q_cons,fail; get_residual(q_cons,Ab), consistent(Ab). q_cons :- q, not_false. To deal with denials include them as rules for false, and conjoin any top-goal with not_false abd_sol(q,Ab) :- q,fail; get_residual(q,Ab), consistent(Ab).

April 3rd, 1998TAPD'98. Paris 2-3 April, Tabling non-abducibles Till now only abducibles and the top-goal are tabled With other tabled predicates, the residue is given in terms of these, not in terms of the abducibles below q :- p. p :- abd(a), abd(b); abd(c). abd(X) :- tnot(abd(X)). :- table abd/1,q/0, p/0. abd_sol(q,Ab) :- q,fail; get_residual(q,Ab). ?- abd_sol(q,Ab). Ab = [p]; no

April 3rd, 1998TAPD'98. Paris 2-3 April, Tabling non-abducibles After a call to a tabled predicate, com- plete its table, and get its residue info (R) abd_sol(q,Ab) :- q(_), fail ; get_residual(q(R),RR), filter(RR,Ab). filter/3 filters out non-abducibles, and checks consistency q :- p, fail ; get_residual(p,R). Pass up the info via an extra argument

April 3rd, 1998TAPD'98. Paris 2-3 April, Example p :- a, q. p :- not t. t :- not s, c. s :- b. q :- not r. r :- not q. p :- a, q; not t. not_p :- not_a, not_q; t. t :- not s, c. q :- not r. not_t :- s; not_c. not_q :- r. s :- b. r :- not q. not_s :- not_b not_r :- q. p :- abd(a), q; not t. not_p :- abd(not_a), not_q; t. t :- not s, abd(c). q :- not r. not_t :- s; abd(not_c). not_q :- r. s :- abd(b). r :- not q. not_s :- abd(not_b). not_r :- q. p(RR) :- (abd(a), (q(_),fail; get_residual(q(R),RR))); not t. not_p(RR) :- abd(not_a), (not_q(_),fail; get_res(R,RR)); t. q(RR) :- not_r(_), fail; get_residual(not_r(R),RR). not_q(RR) :- r(_), fail; get_residual(r(R),RR). r(RR) :- not_q(_), fail; get_residual(not_q(R),RR). not_r(RR) :- q(_), fail; get_residual(q(R),RR). t :- not s, abd(c). not_t :- s; abd(not_c). s :- abd(b). not_s :- abd(not_b). :- table abd/1, p/1, not_p/1, q/1, not_q/1, r/1, not_r/1. abd(X) :- tnot(abd(X)). abd_sol(p,Ab) :- p(_), fail; get_residual(p(R),Ab), filter(R,RR,Ab). abd_sol(not_p,Ab) :- not_p(_), fail; get_residual(not_p(R),Ab), filter(R,RR,Ab). p(RR) :- (abd(a), (q(_),fail; get_residual(q(R),RR))); not t. not_p(RR) :- abd(not_a), (not_q(_),fail; get_res(R,RR)); t. q(RR) :- not_r(_), fail; get_residual(not_r(R),RR). not_q(RR) :- r(_), fail; get_residual(r(R),RR). r(RR) :- not_q(_), fail; get_residual(not_q(R),RR). not_r(RR) :- q(_), fail; get_residual(q(R),RR). t :- not s, abd(c). s :- abd(b). not_t :- s; abd(not_c). not_s :- abd(not_b).

April 3rd, 1998TAPD'98. Paris 2-3 April, Abductive solutions p :- a, q. p :- not t. q:- not r. r :- not q. t :- not s, c. s :- b ?- abd_sol(p,Ab). Ab = [abd(b)]; Ab = [abd(not(c))]; no. ?- abd_sol(not_p,Ab). Ab = [abd(not_a),abd(not_b),abd(c)]; no.

April 3rd, 1998TAPD'98. Paris 2-3 April, One solution at a time The L, fail; get_residual/2 construct com- putes all solutions before showing one In the paper we explain how to avoid this, by adding an extra argument to predicates

April 3rd, 1998TAPD'98. Paris 2-3 April, Conclusions We have fostered a new method to implement abduction The method relies on the XSB tabling mechanism In the paper we briefly sketch: –viewing constraints as abduction and treating them with this method; –dealing with non-ground negative goals via constructive negation as constraints