Automated Theorem Proving

Slides:



Advertisements
Similar presentations
Resolution Proof System for First Order Logic
Advertisements

The Model Evolution Calculus with Built-in Theories Peter Baumgartner MPI Informatik, Saarbrücken
Boolean Satisfiability
Propositional Satisfiability (SAT) Toby Walsh Cork Constraint Computation Centre University College Cork Ireland 4c.ucc.ie/~tw/sat/
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
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 
Models and Propositional Logic In propositional logic, a model in general simply fixes the truth value – true or false – for every proposition symbol.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
Effective Propositional Reasoning CSE 473 – Autumn 2003.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Willis Lemasters Grant Conklin. Searching a tree recursively one branch at a time, abandoning any branch which does not satisfy the search constraints.
Presented by Ed Clarke Slides borrowed from P. Chauhan and C. Bartzis
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
Efficient SAT Solving for Non- clausal Formulas using DPLL, Graphs, and Watched-cuts Himanshu Jain Edmund M. Clarke.
GRASP SAT solver Presented by Constantinos Bartzis Slides borrowed from Pankaj Chauhan J. Marques-Silva and K. Sakallah.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
ECI 2007: Specification and Verification of Object- Oriented Programs Lecture 4.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
ENGG3190 Logic Synthesis “Boolean Satisfiability” Winter 2014 S. Areibi School of Engineering University of Guelph.
GRASP: A Search Algorithm for Propositional Satisfiability EE878C Homework #2 2002/11/1 KAIST, EECS ICS Lab Lee, Dongsoo.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Boolean Satisfiability and SAT Solvers
CMU, Oct 4 DPLL-based Checkers for Satisfiability Modulo Theories Cesare Tinelli Department of Computer Science The University of Iowa Joint work with.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Decision methods for arithmetic Third summer school on formal methods Leonardo de Moura Microsoft Research.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Finding Models for Blocked 3-SAT Problems in Linear Time by Systematical Refinement of a Sub- Model Gábor Kusper Eszterházy Károly.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
Inference in Propositional Logic (and Intro to SAT) CSE 473.
1 Boolean Satisfiability (SAT) Class Presentation By Girish Paladugu.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
NP-Completeness A problem is NP-complete if: It is in NP
Inference in Propositional Logic (and Intro to SAT)
Inference and search for the propositional satisfiability problem
Gábor Kusper University of Linz RISC Austria
(xy)(yz)(xz)(zy)
Logical Inference: Through Proof to Truth
Lecture 2 Propositional Logic
Directional Resolution: The Davis-Putnam Procedure, Revisited
Logical Agents Chapter 7 Selected and slightly modified slides from
Logical Agents Reading: Russell’s Chapter 7
Elementary Metamathematics
ECE 667 Synthesis and Verification of Digital Circuits
Logics for Data and Knowledge Representation
DLL Algorithm.
Artificial Intelligence: Agents and Propositional Logic.
Decision Procedures An Algorithmic Point of View
Methods of Proof Chapter 7, second half.
Propositional Logic: Methods of Proof (Part II)
GRASP-an efficient SAT solver
Presentation transcript:

Automated Theorem Proving Lecture 2 Propositional Satisfiability

Decision procedures Boolean programs Arithmetic programs Propositional satisfiability Arithmetic programs Propositional satisfiability modulo theory of linear arithmetic Memory programs Propositional satisfiability modulo theory of linear arithmetic + arrays

Case I: Boolean programs Boolean-valued variables and boolean operations  Formula := b |  |    b  SymBoolConst

SAT First NP-complete problem (Cook 1972) Davis-Putnam algorithm (1960) resolution-based may use exponential memory Davis-Logemann-Loveland algorithm (1962) search-based basis for all successful modern solvers Conflict-driven learning and non-chronological backtracking (1996) resolution strikes back! Amazing progress GRASP, SATO, Chaff, ZChaff, BerkMin, …

Conjunctive Normal Form  CNF Formula ::= c1  c2  … cm c  Clause ::= l1  l2  … ln l  Literal ::= b | b b  SymBoolConst Unit clause ( l ) a clause containing a single literal Empty clause ( ) a clause containing no literal equivalent to false

Conversion into CNF In general, converting  into an equivalent CNF formula may result in an exponential blow-up We are only interested in satisfiability of  Convert into an equi-satisfiable CNF formula EQCNF()  is satisfiable iff EQCNF() is satisfiable size of EQCNF() is polynomial in size of 

Conversion into CNF Convert formula  into normal form NF() NF() is polynomial in  Convert  = NF() into equisatisfiable CNF formula EQCNF() EQCNF() is polynomial in 

Normal Form Normal form: NF()   Negated normal form: NNF()   NF(b) = b NNF(b) = b NF() = NNF() NNF() = NF() NF(1  2) = NF(1)  NF(1) NNF(1  2) = NNF(1)  NNF(2)

Equi-satisfiable CNF Let  be a formula in normal form. For each subformula  of : - create a fresh symbol v in SymBoolConst Identify vb with b and vb with b Cl(b) = Cl(b) = true Cl() = Cl()  Cl()  (v  v  v)  (v  v)  (v  v) Cl() = Cl()  Cl()  (v  v  v)  (v  v)  (v  v) EQCNF() = v  Cl()

Resolution (c1  b) (c2  b) (c1  c2) c1, c2 independent of b clauses (c1  b) (c2  b) (c1  c2) resolvent resolvent(b, c1  b, c2  b) = c1  c2 = b. (c1  b)  (c2  b)

  (c1  b)  (c2  b)  (c1  c2) Theorem   (c1  b)  (c2  b) iff   (c1  b)  (c2  b)  (c1  c2) Adding the resolvent to the set of clauses does not affect the satisfiability of the clause set.

Unit resolution One of the clauses being resolved is a unit clause ( b ) (c2  b) ( c2 ) ( b ) (c2  b) ( c2 ) Derivation of the empty clause (denoted by ) ( b ) ( b ) 

Davis-Putnam algorithm (I) Given clause set C: Rule 1: If a clause (c  l  l)  C, replace it with (c  l) Rule 2: If a clause (c  b  b)  C, remove it from C Rule 3a: If b does not occur in any clause in C, remove every clause containing b from C Rule 3b: If b does not occur in any clause in C, remove every clause containing b from C

Davis-Putnam algorithm (II) Saturate C w.r.t Rules 1, 2, 3a, and 3b while (C is nonempty) { Pick a variable b appearing in some clause in C C’ = { resolvent(b,c1,c2) | c1,c2  C } Saturate C’ w.r.t. Rules 1, 2, 3a, and 3b if (  C’) return unsatisfiable C = C’ } return satisfiable

Satisfiable example (a  b  c) (b  c  f) (b  c) Rule 3a (c  c  f) Resolve on b Rule 2 Clause set is empty

Unsatisfiable example (a  b) (a  b) (a  c) (a  c) Pick b ( a ) (a  c) (a  c) Pick a ( c ) ( c ) Pick c 

Correctness Saturate C w.r.t Rules 1, 2, 3a, and 3b while (C is nonempty) { Pick a variable b appearing in some clause in C C’ = { resolvent(b,c1,c2) | c1,c2  C } Saturate C’ w.r.t. Rules 1, 2, 3a, and 3b if (  C’) return unsatisfiable C = C’ } return satisfiable Two observations: - Each of the rules 1, 2, 3a, and 3b preserve satisfiability - C’ = b. C

Memory explosion Saturate C w.r.t Rules 1, 2, 3a, and 3b while (C is nonempty) { Pick a variable b appearing in some clause in C C’ = { resolvent(b,c1,c2) | c1,c2  C } Saturate C’ w.r.t. Rules 1, 2, 3a, and 3b if (  C’) return unsatisfiable C = C’ } return satisfiable Let n be the number of clauses in the input clause set Number of clauses after i-th iteration of loop: O(n^(2^i))

Davis-Logemann-Loveland algorithm Slides 42-72 of sat_course1.pdf Download from: http://research.microsoft.com/users/lintaoz/SATSolving/satsolving.htm

Davis-Logemann-Loveland algorithm Eliminates exponential memory requirement Might still need exponential time

Conflict-driven learning and non-chronological backtracking Slides 2-20 of sat_course2.pdf Download from: http://research.microsoft.com/users/lintaoz/SATSolving/satsolving.htm