LOGIC-BASED TRUTH MAINTENANCE SYSTEMS. EECS 344 Winter, 2008

Similar documents
Truth Maintenance Systems. EECS 344 Winter 2008

Extending Pattern Directed Inference Systems. EECS 344 Winter 2008

Diagnosis through constrain propagation and dependency recording. 2 ATMS for dependency recording

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989

Propositional Logic. Part I

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Resolution (14A) Young W. Lim 6/14/14

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

Integrity Constraints (Chapter 7.3) Overview. Bottom-Up. Top-Down. Integrity Constraint. Disjunctive & Negative Knowledge. Proof by Refutation

PROPOSITIONAL LOGIC (2)

Today. Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 5. Constraint Satisfaction Problems (CSP) CSP Definition

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

Towards a Logical Reconstruction of Relational Database Theory

Propositional logic (Ch. 7)

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Constraint Solving. Systems and Internet Infrastructure Security

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

Computer-Aided Program Design

(QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer

Formal Systems and their Applications

A proof-producing CSP solver: A proof supplement

6.001 Notes: Section 8.1

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions

COMP4418 Knowledge Representation and Reasoning

Introduction to Fall 2014 Artificial Intelligence Midterm Solutions

Chapter 10 Part 1: Reduction

CSE 20 DISCRETE MATH. Fall

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules

Boolean Functions (Formulas) and Propositional Logic

Formally-Proven Kosaraju s algorithm

CS103 Spring 2018 Mathematical Vocabulary

CSC 501 Semantics of Programming Languages

LOGIC AND DISCRETE MATHEMATICS

Discrete Mathematics Lecture 4. Harper Langston New York University

8.1 Polynomial-Time Reductions

Recursively Enumerable Languages, Turing Machines, and Decidability

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

CSE 20 DISCRETE MATH. Winter

Circuit versus CNF Reasoning for Equivalence Checking

Lecture 14: Lower Bounds for Tree Resolution

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

SAT solver of Howe & King as a logic program

6.034 Notes: Section 11.1

Integrating Probabilistic Reasoning with Constraint Satisfaction

Constraint Satisfaction Problems

C++ Data Types. 1 Simple C++ Data Types 2. 3 Numeric Types Integers (whole numbers) Decimal Numbers... 5

HW1. Due: September 13, 2018

EECS 219C: Formal Methods Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

CS243 Homework 1. Winter Due: January 23, 2019 at 4:30 pm

NP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

6.001 Notes: Section 4.1

10708 Graphical Models: Homework 2

CSP- and SAT-based Inference Techniques Applied to Gnomine

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

SAT Solvers. Ranjit Jhala, UC San Diego. April 9, 2013

Nano-Lisp The Tutorial Handbook

CSC Discrete Math I, Spring Sets

Deductive Methods, Bounded Model Checking

Propositional Logic. Application of Propositional logic

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

MITOCW watch?v=kz7jjltq9r4

The Resolution Algorithm

Program Verification & Testing; Review of Propositional Logic

Normal Forms for Boolean Expressions

Distributed minimum spanning tree problem

logic with quantifiers (informally)

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable

Homework #6 (Constraint Satisfaction, Non-Deterministic Uncertainty and Adversarial Search) Out: 2/21/11 Due: 2/29/11 (at noon)

CS 512, Spring 2017: Take-Home End-of-Term Examination

CPSC 320 Notes: What's in a Reduction?

Computer Science Technical Report

2SAT Andreas Klappenecker

An Improved Separation of Regular Resolution from Pool Resolution and Clause Learning

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm

Resolution in FOPC. Deepak Kumar November Knowledge Engineering in FOPC

Constraint Satisfaction Problems

6.001 Notes: Section 6.1

The Complexity of Camping

Constraint Satisfaction Problems Part 2

Markov Logic: Representation

Cantor s Diagonal Argument for Different Levels of Infinity

Reductions. Linear Time Reductions. Desiderata. Reduction. Desiderata. Classify problems according to their computational requirements.

CS 4100 // artificial intelligence

The Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT

Constraint Satisfaction Problems. Chapter 6

Example: Map coloring

CSE341 Autumn 2017, Final Examination December 12, 2017

Announcements. CS 188: Artificial Intelligence Fall 2010

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems

Boolean Representations and Combinatorial Equivalence

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set:

4.1 Review - the DPLL procedure

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010

DM841 DISCRETE OPTIMIZATION. Part 2 Heuristics. Satisfiability. Marco Chiarandini

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Constraint Satisfaction Problems

Transcription:

LOGIC-BASED TRUTH MAINTENANCE SYSTEMS EECS 344 Winter, 2008

Overview Limitations of the JTMS LTMS basics Logical Specification of LTMS Boolean Constraint Propagation Interface to inference engine Example: Constraint solving

Logical import of JTMS clauses Definite clauses x 1... x n c No negation Cannot directly say x y Must use encoding tricks to implement more expressive logic

Encoding negation in JTMS For each propositional node P, add extra node for its negation. Install a justification for a contradiction for P and its negation. P not P

Encoding Arbitrary Clauses Suppose we want to encode A B C Could translate into a set of definite clauses A A B B C C B C A A C B A B C

All clauses require expansion Consider (implies P Q) P Q Q P Especially important in backtracking, if information can be derived in different orders A 1... A i 1 A i 1... A n A i

Solution: Use a more powerful TMS Nodes have three possible labels: :TRUE :FALSE :UNKNOWN Justifications are disjunctive clauses: p q r Each term in a clause has a sign, e.g., whether or not it is negated

Other LTMS modifications Assumptions work as before Premises work as before (i.e., they are nodes justified by empty clauses) No contradiction nodes are necessary Contradiction detection is handled by clauses being violated A B A B

Logical Specification of LTMS Given a set of clauses C a set of assumptions A For any proposition P, label it :TRUE if it is derivable :FALSE if its negation is derivable :UNKNOWN otherwise If C & A are unsatisfiable, complain Produce explanations for every labelled node, even when C & A unsatisfiable.

Boolean Constraint Propagation Best algorithm for implementing an LTMS Sound Efficient Incomplete (but see Chapter 13!)

Basic Idea A clause is either Satisfied: Some node s sign matches its label Violated: Every node s sign is opposite that of its label Unit Open: One node is unknown, remainder have signs opposite their labels. Non-Unit Open: Multiple unknown nodes, clause unsatisfied. Observation #1: A unit open clause can be satisfied by labeling it with its sign. Observation #2: A violated clause indicates a contradiction. Observation #3: No other cases allow inference.

Example p q r P false, satisfied. P true, Q true, R false, violated. P true, Q true, R unknown: Unit open. Can derive R as true P unknown, Q true, R false: Unit open. Can derive P as false.

Graphical notation for LTMS P F T R Q F

Clauses dynamically simulate definite clauses P F T R Q F

Clauses are multidirectional P F T R Q F

Clauses provide contradiction detection P F! T R Q F

Limitations of BCP Literal incompleteness x y x y Refutation incompleteness x y x y x y x y No formal characterization of when it loses

Inference Engine Interface Interpretation of labels How to specify clauses Adding data Queries Rules Contradiction Handling

Using more complex labels No longer have (:NOT P) in the database In querying (:NOT P), return opposite of label of P When asserting/assuming (:NOT P), P becomes a premise/assumption with label :FALSE

Automatic translation into clauses External system uses standard propositional logic, with usual set of connectives (plus taxonomy) LTMS code translates into appropriate set of clauses (see normalize in ltms.lisp) Original form used as informant for explanations Only time a statement with connectives is entered into the database is if it is assumed.

Warning: A common bug The set of connectives is :NOT, :AND, :OR, :IMPLIES, :IFF, :TAXONOMY These aren t connectives NOT, AND, OR, IMPLIES, IFF, TAXONOMY =>, ~

Adding Data assert!, assume!, retract!, rassert! as before contradiction takes a list of nodes and creates a clause that is violated, given their current labels. assuming is a macro that provides an environment with temporary assumptions

Queries Assertion-level queries (e.g., fetch, referent) equivalent. Queries about beliefs now reflect new labels (i.e., true?, false?, known?, unknown?) Explanation-exploring procedures similar to before (e.g., why?, assumptions-of, consequences, explore)

Rules Trigger conditions now reflect belief states (e.g., :TRUE, :FALSE, but not :UNKNOWN) Otherwise identical to earlier systems (rule ((:true (human?x) :var?h)) (rassert! (:implies?h (:and (mortal?x) (:not (infallible?x)))) :limited-creatures))

Contradiction Handling Orthogonal issue to type of TMS Before: lambda-bind single contradiction handler. Not good enough!

Example Consider the following choice sets: {A1, A2, A3} {B1, B2, B3} {C1, C2, C3} Suppose each set has its own contradiction handler (Ha, Hb, Hc) Suppose we are exploring {A2, B2, C2} Suppose we find a contradiction whose underlying assumptions is {A2, B2}. We re in trouble -- why should Hc know what to do here?

When does rebinding work? 1. All assumption-manipulating operations are identified, and each provided with an appropriate contradiction handler. 2. Assumption-manipulating operations must proceed depth-first. 3. Relative Closure: Every consequence that holds for the current set of assumptions that might lead to a contradiction must be computed before making more assumptions.

Relative Closure often unrealistic Information can arrive unexpectedly The set of consequences can be infinite Processing can be distributed Often works for toy problems But it should be abandoned very quickly!

Solution: Stack-based contradiction handling Organize assumption-manipulating operations in depth-first fashion Each operation pushes a contradiction handler when it begins, and pops it when it is finished. When a contradiction occurs, check each handler in turn to see if it is relevant. Implements chronological backtracking within subset of relevant choices.

Assume a particular failure Assume that you know how the parts can fail Assume that you know how the parts work Assume parts you know about are the only relevant ones Assume a repairable part is the source of the problem

Example: Simple constraint satisfaction problem Kind of problem often found in logic books in newsstands Formally, set of variables whose values range over a finite domain (mathematical perspective). Formally, a set of attribute statements about a collection of objects (logical perspective).

Example: Remember the Marx Brothers? Groucho, Chico, Harpo, and? One liked to expound, another played the piano, another liked animals Which one was which?

Constraints The pianist, harpist, and talker are distinct brothers. The brother who is fond of money is distinct from the one who is fond of gambling, who is also distinct from the one who is fond of animals. The one who likes to talk doesn't like gambling. The one who likes animals plays the harp.

More constraints Groucho hates animals. Harpo is always silent. Chico plays the piano.

Problem 7(b), page 343 Test problems: Homework SEND DONALD FIFTY BASE + MORE + GERALD +STATES +BALL ---------- -------- ------- ----- MONEY ROBERT AMERICA GAMES Hints: Think hard about representation first! Squeeze as much information out as possible when making each assumption Optional: For background, see http://www.geocities.com/athens/agora/2160/primer.ht ml