Hypothetical Reasoning in Propositional Satisfiability SAT02, May, 2002 Joao Marques-Silva Technical University of Lisbon, IST/INESC, CEL Lisbon, Portugal.

Slides:



Advertisements
Similar presentations
Exploiting SAT solvers in unbounded model checking
Advertisements

Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Modified.
Presented by Monissa Mohan 1.  A highly optimized BCP algorithm  Two watched literals  Fast Backtracking  Efficient Decision Heuristic  Focused on.
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Presenting:
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 
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
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.
Towards More Efficient SAT-Based Model Checking Joao Marques-Silva Electronics & Computer Science University of Southampton LAA C&V Workshop, Isaac Newton.
Properties of SLUR Formulae Ondřej Čepek, Petr Kučera, Václav Vlček Charles University in Prague SOFSEM 2012 January 23, 2012.
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Boolean Satisfiability Solvers Wonhong Nam
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
Presented by Ed Clarke Slides borrowed from P. Chauhan and C. Bartzis
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
Methods of Proof Chapter 7, second half.
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.
1 Backdoors To Typical Case Complexity Ryan Williams Carnegie Mellon University Joint work with: Carla Gomes and Bart Selman Cornell University.
A Compressed Breadth-First Search for Satisfiability DoRon B. Motter and Igor L. Markov University of Michigan, Ann Arbor.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
SAT Algorithms in EDA Applications Mukul R. Prasad Dept. of Electrical Engineering & Computer Sciences University of California-Berkeley EE219B Seminar.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
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.
1 Message Passing and Local Heuristics as Decimation Strategies for Satisfiability Lukas Kroc, Ashish Sabharwal, Bart Selman (presented by Sebastian Brand)
Satisfiability Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Boolean Satisfiability and SAT Solvers
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
1 Agenda Modeling problems in Propositional Logic SAT basics Decision heuristics Non-chronological Backtracking Learning with Conflict Clauses SAT and.
Logical Agents Logic Propositional Logic Summary
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
Boolean Satisfiability in Electronic Design Automation Karem A. Sakallah EECS Department University of Michigan João Marques Silva Informatics Department.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Boolean Satisfiability Present and Future
Boolean Satisfiability in Electronic Design Automation Karem A. Sakallah EECS Department University of Michigan João Marques-Silva Informatics Department.
SAT 2009 Ashish Sabharwal Backdoors in the Context of Learning (short paper) Bistra Dilkina, Carla P. Gomes, Ashish Sabharwal Cornell University SAT-09.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
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.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
1 Boolean Satisfiability (SAT) Class Presentation By Girish Paladugu.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
A Decision-Making Procedure for Resolution-Based SAT-solvers Eugene Goldberg Cadence Research Labs (USA) SAT-2008, Guangzhou, P.R. China.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
SAT tutorial1 Boolean Satisfiability in Electronic Design Automation Karem A. Sakallah EECS Department University of Michigan João Marques Silva Informatics.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Inference in Propositional Logic (and Intro to SAT)
Inference and search for the propositional satisfiability problem
Gábor Kusper University of Linz RISC Austria
EA C461 – Artificial Intelligence Logical Agent
The Propositional Calculus
Boolean Satisfiability in Electronic Design Automation
Propositional Calculus: Boolean Algebra and Simplification
SAT-Based Area Recovery in Technology Mapping
ECE 667 Synthesis and Verification of Digital Circuits
Logics for Data and Knowledge Representation
Decision Procedures An Algorithmic Point of View
Resolution Proofs for Combinational Equivalence
Methods of Proof Chapter 7, second half.
GRASP-an efficient SAT solver
Presentation transcript:

Hypothetical Reasoning in Propositional Satisfiability SAT02, May, 2002 Joao Marques-Silva Technical University of Lisbon, IST/INESC, CEL Lisbon, Portugal

Hypothetical Reasoning Preliminary ongoing research work –Not yet published Main ideas available as a (preliminary) technical report: –I. Lynce and J. Marques-Silva, Hypothetical Reasoning in Propositional Satisfiability, Technical Report 1/2002, INESC-ID, March 2001I. Lynce and J. Marques-Silva, Hypothetical Reasoning in Propositional Satisfiability, Technical Report 1/2002, INESC-ID, March 2001 – –Some of the concepts still evolving Feedback welcome ! Joint work with Ines Lynce

Motivation SAT solvers have been the subject of significant improvements in recent years The utilization of SAT is increasing in industry –More challenging problem instances Improvements to current key techniques unlikely(?) –Better (non-chronological) backtracking? –Better data structures? –Newer (more competitive) strategies? How to improve SAT solvers? –Devise new paradigms… –Integrate already used techniques

Outline Notation & Definitions Evolution of SAT Solvers –Overview established approaches Next challenges in SAT Other promising approaches Our proposed approach Hypothetical reasoning (HR) –The overall approach –Applying reasoning conditions Relation with other existing techniques Preliminary experimental results

Notation & Definitions CNF Formula, clauses, literals: –A CNF formula ( ) is a conjunction of clauses –A clause ( ) is a disjunction of literals –A literal (l) is a propositional variable or its complement Assignments: – x, 0 denotes the assignment of value 0 to variable x –Can also use x = 0 to denote an assignment = (a + c)(b + c)(d + c)(¬a + ¬b + ¬c) = (a c) (b c) (d c) (¬a ¬b ¬c)

Notation & Definitions (Contd) Unit-clause rule: –If clause is unit (has a single free literal l), then the free literal l must be satisfied for the clause to be satisfied –Iterated application of the unit-clause rule is referred to as unit propagation (UP) or boolean constraint propagation (BCP) –BCP( x, v x ): denotes the set of implied variable assignments obtained by applying BCP as the result of the triggering assignment x, v x If BCP( x, v x ) unsatisfies one or more clauses, then we say that BCP( x, v x )

A Taxonomy of SAT Algorithms Backtrack search (DPLL) Resolution (original DP) Stalmarcks method (SM) Recursive learning (RL) BDDs... Local search (hill climbing) Continuous formulations Genetic algorithms Simulated annealing... Tabu search SAT Algorithms Complete Incomplete Can prove unsatisfiabilityCannot prove unsatisfiability

The Most Effective SAT Solvers Backtrack search Boolean constraint propagation Reasonable branching heuristic Clause recording –Non-chronological backtracking Search strategies –Restarts –Random backtracking Efficient data structures –E.g. head/tail lists; watched literals; literal sifting Examples: BerkMin; Chaff; SATO; rel_sat; GRASP

Other Effective SAT Solvers Backtrack search Unit propagation Chronological backtracking Fine-tuned branching heuristics Probing & reasoning techniques –Lookahead (variable probing) –Equivalency reasoning Search strategies –Restarts Efficient data structures –E.g. head/tail lists Examples: –EQSATZ Built on top of SATZ Uses equivalency reasoninig –RAND-SATZ Built on top of SATZ Branching randomization Search restarts –SATZ No search restarts No equivalency reasoning Forms of look-ahead probing

Other Dedicated SAT Solvers Local search for dedicated classes of instances –Incomplete class of algorithms –Useful if instances known to be satisfiable Solvers with domain-specific information –Incremental SAT –SAT on Boolean networks –…

Challenging Problem Instances SAT is being applied in industrial settings –Electronic design automation –Formal verification of hardware/software systems –… SAT solvers are expected to handle problem instances: –that have hundred thousand / few million variables –that have tens of million clauses –that may be unsatisfiable SAT solvers must be capable of proving unsatisfiability –completeness is a key issue !

Challenges to SAT Solvers Dramatic improvements to backtrack search SAT solvers unlikely –Can utilize equivalency reasoning Hard to interact with clause recording and non- chronological backtracking –Can apply lookahead techniques Hard to interact with clause recording and non- chronological backtracking –Can devise new search strategies Search restarts, random backtracking, … ?

Other Approaches Resolution –Unlikely to be a practical proof procedure Variable probing (branch-merge rule) Clause probing (recursive learning) –Not (yet) extensively evaluated Additional mechanisms for identifying necessary assignments and inferring new clauses –Integrated solution still lacking

Resolution (original DP) Iteratively apply resolution (consensus) to eliminate one variable each time –i.e., resolution between all pairs of clauses containing x and ¬x –formula satisfiability is preserved Stop applying resolution when, –Either empty clause is derived instance is unsatisfiable –Or only clauses satisfied or with pure literals are obtained instance is satisfiable = (a + c)(b + c)(d + c)(¬a + ¬b + ¬c) Eliminate variable c 1 = (a + ¬a + ¬b)(b + ¬a + ¬b )(d + ¬a + ¬b ) = (d + ¬a + ¬b ) Instance is SAT !

Stalmarcks Method (SM) in CNF Recursive application of the branch-merge rule to each variable with the goal of identifying common conclusions Try a = 0: (a = 0) (b = 1) (d = 1) Try a = 1: (a = 1) (c = 1) (d = 1) C(a = 0) = {a = 0, b = 1, d = 1} C(a = 1) = {a = 1, c = 1, d = 1} C(a = 0) C(a = 1) = {d = 1} Any assignment to variable a implies d = 1. Hence, d = 1 is a necessary assignment ! Recursion can be of arbitrary depth = (a + b)(¬a + c) (¬b + d)(¬c + d)

An Alternative Explanation for SM = (a + b)(¬a + c) (¬b + d)(¬c + d) (b + c) resolution (c + d) resolution Comment: SM provides a mechanism for identifying suitable resolution operations (d)(d) resolution Sequence of resolution operations for finding necessary assignments

Recursion can be of arbitrary depth Recursive Learning (RL) in CNF Recursive evaluation of clause satisfiability requirements for identifying common assignments Try a = 1: = (a + b)(¬a + d) (¬b + d) (a = 1) (d = 1) Try b = 1: (b = 1) (d = 1) C(a = 1) = {a = 1, d = 1} C(b = 1) = {b = 1, d = 1} C(a = 1) C(b = 1) = {d = 1} Every way of satisfying (a + b) implies d = 1. Hence, d = 1 is a necessary assignment ! = (a + b)(¬a + d) (¬b + d)

An Alternative Explanation for RL = (a + b)(¬a + d) (¬b + d) (b + d) resolution (d)(d) Sequence of resolution operations for finding necessary assignments Comment: RL provides yet another mechanism for identifying suitable resolution operations

SM vs. RL Both complete procedures for SAT Stalmarcks method (in CNF): –hypothetical reasoning based on variables –use variable assignment conditions to probe assignments variable probing Recursive learning (in CNF): –hypothetical reasoning based on clauses –use clause satisfiability conditions to probe assignments clause probing Both can be viewed as the process of identifying selective resolution operations Both can be integrated into backtrack search algorithms

The Objectives of HR Integrate variable probing and clause probing –Complete proof procedure for SAT Devise conditions for a priori identification of new clauses –That entail most of existing clause inference procedures Evolve from identification of necessary assignments to generalized clause reasoning Applications: –Complete proof procedure for SAT –Preprocessing engine to existing SAT solvers With polynomial effort –Replace unit propagation with HR with backtrack search solvers With polynomial effort –Cooperate with backtrack search solvers In parallel solutions for SAT

The Organization of HR Recursive procedure that: –Extends variable probing To incorporate clause probing Ensures completeness –Establishes general clause inference conditions That cover (most) existing clause inference conditions –Readily implements a number of additional techniques 2-var equivalence; hyper resolution (with binary clauses); equivalency reasoning; binary clause inference conditions; … Can be integrated into backtrack search

How to Implement HR ? Independent probing, given conditions on variables and on clauses, may not be practical –O(L 2 + L N) = O(L 2 ) at each step L: number of literals N: number of variables Construct assignment & trigger tables, for implementing variable and clause probing –O(L N) at each step In practice, worst-case complexity is extremely unlikely –OBS: unrestricted clause inference conditions are computationally hard to implement

Assignment Table Captures the result of applying BCP to each variable assignment Create a (2N x 2N) matrix: –Each row is associated with an assignment x, v x –1-valued entries denote assignments y, v y implied by BCP due to trigger assignment x, v x, i.e. BCP( x, v x ) OBS: In practice can use a sparse matrix representation !

Assignment Table (Example) b, 0 implies (with BCP) the assignments b, 0, c, 0 and d, 0

Trigger Table Captures which variable assignments directly imply (w/ BCP) each variable assignment Create a (2N x 2N) matrix: –Each row is associated with an assignment x, v x –1-valued entries denote assignments y, v y that imply, with BCP, the assignment x, v x OBS: The trigger table is the transpose of the assignment table ! –Required to create trigger table if using a sparse matrix representation of the assignment table

Trigger Table (Example) b, 1 is implied (due to BCP) by the assignments a, 0, a, 1 and b, 1

Utilizations of Assignment Tables Necessary assignments from variable assignment conditions variable probing For both assignments to a, a, 0 and a, 1, we obtain b, 1. b, 1 is a necessary assignment

Utilizations of Assignment Tables Necessary assignments from clause satisfiability conditions clause probing –Assuming existence of clause ( b d) Every assignment that satisfies ( b d), also implies c, 0. c, 0 is a necessary assignment

Utilizations of Assignment Tables Clause inference from variable assignment conditions One of these assignments must hold (because of a) create clause ( b c)

Utilizations of Assignment Tables Clause inference from clause satisfiability conditions Assume clause = (a b c) exists. Each assignment that satisfies implies either c, 0 or d, 0 create clause ( c d)

Utilizations of Trigger Tables Clause inference from variable assignment conditions The assignments a, 0 and b, 1 imply the assignments c, 0 and c, 1 ; are disallowed create clause (a b)

Utilizations of Trigger Tables Clause inference from clause unsatisfiability conditions Assume clause = (c d) exists. The assignments a, 0 or b, 0 unsatisfy. create clause (a b)

Reasoning Conditions Summary Necessary assignments: –From variable assignment conditions(variable probing) –From clause satisfiability conditions(clause probing) Inferred clauses: –Satisfiability conditions Variable assignments Clause satisfiability –Unsatisfiability conditions Variable assignments Clause satisfiability

Inference of Clauses HR reasoning conditions can only infer binary clauses ? –No. Can infer arbitrary clauses ! –Clause satisfiability conditions: For each clause = (t 1 t 2 t m ) of formula, all clauses of the form (s 1 s 2 s m ), such that s 1, s 2,,s m BCP( t 1, 1 ) … BCP( t m, 1 ), are implicates of –Clearly subsumption can potentially be applied –Clause unsatisfiability conditions: For each set of assignments A = { t 1, 0, t 2, 0,, t m, 0 }, such that BCP( t 1, 0 ) BCP( t 2, 0 ) BCP( t m, 0 ), then clause = (t 1 t 2 t m ) is an implicate of

Reasoning Conditions Complexity O(L N) for constructing assignment & trigger tables and implementing variable and clause probing Why ? –BCP for filling each row is O(L) –For the 2N rows, construction of table is O(L N) –Each set intersection can trivially be accomplished in O(N) ! –All intersections can be done in O((N + L) N) = O(L N) Corresponding to variable and clause probing –Total time complexity is O(L N) –OBS: In practice worst-case complexity extremely unlikely –OBS: unrestricted clause inference conditions are computationally hard to implement; must use restrictions

The HR Algorithm Basic HR algorithm (with depth d, target variables V) –return if depth d 0 –For each variable v in set of target variables V For each assignment to variable v –L1: Apply unit propagation (BCP) Apply (tabular) reasoning conditions Recur HR with depth (d-1) Re-apply (tabular) reasoning conditions –[Optional] Loop from L1 if more assignments O(L N) Can loop O(N) times Polynomial time if depth is constant !

Relation with Other Techniques Assignment & Trigger tables naturally capture: –Variable probing (branch-merge rule) Lookahead techniques –Clause probing (recursive learning) –New clause inference conditions Assignment & Trigger tables allow capturing: –Failed-literal rule –Two-variable equivalence –Closure of binary clause implication graph –Literal dropping –Equivalency-reasoning / Inference of binary clauses –Hyper resolution (with binary clause inference) –… ?

Relation with Other Techniques Failed literal rule: –If an assignment x, 0 yields an unsatisfied clause, then x, 1 is a necessary assignment –In the construction of the assignment table, If BCP( x, 0 ), then x, 1 is a necessary assignment

Relation with Other Techniques 2-variable equivalence: –First form: If both ( x y) and ( y x) exist in formula, then x y –Second form: Utilize binary clause implication graph Identify strongly connected components (SCCs) –If x, 0 and y, 0 in the same SCC, then x y –If, from construction of the assignment table, y, 0 BCP( x, 0 ) and y, 1 BCP( x, 1 ), then x y Captures all SCCs in binary clause implication graph Can identify additional 2-variable equivalences !

Relation with Other Techniques Closure of binary clause implication graph: –If l 1, 1 l 2, 1 and l 2, 1 l 3, 1, then l 1, 1 l 3, 1 and infer clause ( l 1 l 3 ) –From construction of the assignment table, if l 2, 1 BCP( l 1, 1 ), then create clause ( l 1 l 2 ) Captures the identification of the transitive closure of the implication graph Can identify additional implications (and clauses) !

Relation with Other Techniques Literal dropping [Dubois & Dequen, IJCAI01]: –Given a clause = (l 1 l 2 l k ), if exists a proper subset of literals {s 1, s 2, …, s j } of, such that BCP( s 1, 0 s 2, 0 s j, 0 ), then create a new clause (s 1 s 2 s j ), that subsumes –Using the assignment table, if exists a set of assignments A = { t 1, 0, t 2, 0,, t m, 0 }, such that BCP( t 1, 0 ) BCP( t 2, 0 ) BCP( t m, 0 ), then create the clause: = (t 1 t 2 t m ) –Two techniques similar, but not comparable Literal dropping less general (starts from existing clauses), but more accurate (considers BCP of set of assignments)

Relation with Other Techniques Equivalency reasoning [Li, AAAI00]: –Shown to be covered with: Unit propagation; 2-variable equivalence; conditions for inferring binary clauses Binary clause inference conditions [MS, CP00]: –Inference from pattern 2B/1T: Given ( l 1 x) ( l 2 x) (l 1 l 2 y), infer (x y) From the assignment table: –If x, 0 y, 1, then infer the clause (x y)

Relation with Other Techniques Binary clause inference conditions [MS, CP00]: –Inference from pattern 0B/4T: Given (l 1 l 2 x) ( l 1 l 2 x) ( l 1 l 2 y) (l 1 l 2 y), infer clause (x y) –From the assignment table: Assume l 1 = 0 (depth 1) –Can infer (x y)(depth 2) From (l 2 x) ( l 2 y), Assume l 1 = 1 (depth 1) –Can infer (x y)(depth 2) From ( l 2 x) (l 2 y), infer (x y) –But HR with depth 2 required !

Relation with Other Techniques Hyper resolution (w/ binary clauses) [Bacchus, SAT02]: –Allows inference of binary clause –Given ( l 1 x) ( l 2 x) ( l k x) (l 1 l 2 l k y), infer (x y) –From the assignment table: If x, 0 y, 1, then infer the clause (x y)

Preliminary Results Implemented reasoning conditions on top of JQuest –Assigment tables –Trigger tables –Necessary assignments Probing due to variables and clauses (binary and ternary) –Clause inference conditions Simplified version: only binary clauses can be inferred Results for reasoning conditions on example problem instances –#Vars: number of variables; #Cls: number of clauses –#NA: necessary of assignments; #IBC: inferred binary clauses

Experimental Results

Implementing/Completing HR Implement (efficient) recursive wrapper –Incrementally define set of variables in recursive step Reduce significantly the number of row updates in assignment and trigger tables Instead of BCP-based reasoning conditions, evolve to clause-based reasoning conditions How to use HR? –Standalone complete proof procedure ? –Integrated within backtrack search SAT solver ? Hard to interact with clause recording and non- chronological backtracking –Used as a preprocessing engine to backtrack search SAT solvers ?

Conclusions Proposed the Hypothetical Reasoning algorithm –Integrates variable probing (branch-merge rule) and clause probing (recursive learning) –Implements a number of additional techniques That allow inferring new clauses That entail most existing clause inference conditions That entail a significant number of simplification techniques Preliminary results for practical problem instances: –By applying reasoning conditions, a significant number of necessary assignments can be identified and a significant number of new clauses can be inferred