The Quest for Efficient Boolean Satisfiability Solvers

Slides:



Advertisements
Similar presentations
Exploiting SAT solvers in unbounded model checking
Advertisements

Exploiting SAT solvers in unbounded model checking K. L. McMillan Cadence Berkeley Labs.
Automated Theorem Proving
Heuristic Search techniques
The Quest for Efficient Boolean Satisfiability Solvers Sharad Malik Princeton University.
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:
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
Introduction to MiniSat v1.14 Presented by Yunho Kim Provable Software Lab, KAIST.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
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)
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.
Properties of SLUR Formulae Ondřej Čepek, Petr Kučera, Václav Vlček Charles University in Prague SOFSEM 2012 January 23, 2012.
Reduction of Interpolants for Logic Synthesis John Backes Marc Riedel University of Minnesota Dept.
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:
Willis Lemasters Grant Conklin. Searching a tree recursively one branch at a time, abandoning any branch which does not satisfy the search constraints.
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.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Presented by Ed Clarke Slides borrowed from P. Chauhan and C. Bartzis
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Presenting:
1 Quantified Formulas Acknowledgement: QBF slides borrowed from S. Malik.
Constraint Satisfaction Problems
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
GRASP SAT solver Presented by Constantinos Bartzis Slides borrowed from Pankaj Chauhan J. Marques-Silva and K. Sakallah.
Efficient Reachability Checking using Sequential SAT G. Parthasarathy, M. K. Iyer, K.-T.Cheng, Li. C. Wang Department of ECE University of California –
A Compressed Breadth-First Search for Satisfiability DoRon B. Motter and Igor L. Markov University of Michigan, Ann Arbor.
SAT Algorithms in EDA Applications Mukul R. Prasad Dept. of Electrical Engineering & Computer Sciences University of California-Berkeley EE219B Seminar.
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
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.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 21, 2008 Modern SAT Solvers ({z}Chaff, GRASP,miniSAT)
Boolean Satisfiability and SAT Solvers
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
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.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Boolean Satisfiability in Electronic Design Automation Karem A. Sakallah EECS Department University of Michigan João Marques Silva Informatics Department.
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
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
SAT Solver Heuristics. SAT-solver History Started with David-Putnam-Logemann-Loveland (DPLL) (1962) –Able to solve variable problems Satz (Chu Min.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
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.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
SAT tutorial1 Boolean Satisfiability in Electronic Design Automation Karem A. Sakallah EECS Department University of Michigan João Marques Silva Informatics.
Dynamic Backtracking for SAT Presented by: Phil Oertel April 6, 2004.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
The Quest for Efficient Boolean Satisfiability Solvers Sharad Malik Princeton University.
CS137: Electronic Design Automation
Inference in Propositional Logic (and Intro to SAT)
Inference and search for the propositional satisfiability problem
Bounded Model Checking
Parallelism in SAT Solvers
Boolean Satisfiability in Electronic Design Automation
ECE 667 Synthesis and Verification of Digital Circuits
Artificial Intelligence: Agents and Propositional Logic.
Decision Procedures An Algorithmic Point of View
Methods of Proof Chapter 7, second half.
GRASP-an efficient SAT solver
Presentation transcript:

The Quest for Efficient Boolean Satisfiability Solvers Sharad Malik Princeton University

A Brief History of SAT Solvers Sharad Malik Princeton University

SAT in a Nutshell Given a Boolean formula, find a variable assignment such that the formula evaluates to 1, or prove that no such assignment exists. For n variables, there are 2n possible truth assignments to be checked. First established NP-Complete problem. S. A. Cook, The complexity of theorem proving procedures, Proceedings, Third Annual ACM Symp. on the Theory of Computing,1971, 151-158 F = (a  b)(a’  b’  c) a 1 b b 1 1 c c c c 1 1 1 1

Problem Representation Conjunctive Normal Form F = (a + b)(a’ + b’ + c) Simple representation (more efficient data structures) Logic circuit representation Circuits have structural and direction information Circuit – CNF conversion is straightforward (a + b + d’) (a’ + d) (b’ + d) d  (a + b) (c’ + d’ + e) (d + e’) (c + e’) e  (c  d) a b d e c

Why Bother? Core computational engine for major applications AI EDA Knowledge base deduction Automatic theorem proving EDA Testing and Verification Logic synthesis FPGA routing Path delay analysis And more…

The Timeline 1869: William Stanley Jevons: Logic Machine [Gent & Walsh, SAT2000] Pure Logic and other Minor Works – Available at amazon.com!

The Timeline 1960: Davis Putnam Resolution Based 10 variables

Resolution a + b + g + h’ a + b + c’ + f g + h’ + c + f Resolution of a pair of clauses with exactly ONE incompatible variable a + b + g + h’ a + b + c’ + f g + h’ + c + f a + b + g + h’ + f

Davis Putnam Algorithm M .Davis, H. Putnam, “A computing procedure for quantification theory", J. of ACM, Vol. 7, pp. 201-214, 1960 (335 citations in citeseer) Iteratively select a variable for resolution till no more variables are left. Can discard all original clauses after each iteration. (a + b + c) (b + c’ + f’) (b’ + e) (a + b) (a + b’) (a’ + c) (a’ + c’) (a + c + e) (c’ + e + f) (a) (a’ + c) (a’ + c’) (a + e + f) (c) (c’) ( ) SAT UNSAT Potential memory explosion problem!

The Timeline 1952 Quine Iterated Consensus 10 var 1960 DP 10 var

Davis Logemann Loveland The Timeline 1962 Davis Logemann Loveland Depth First Search  10 var 1960 DP  10 var 1952 Quine  10 var

DLL Algorithm Davis, Logemann and Loveland M. Davis, G. Logemann and D. Loveland, “A Machine Program for Theorem-Proving", Communications of ACM, Vol. 5, No. 7, pp. 394-397, 1962 (231 citations) Basic framework for many modern SAT solvers Also known as DPLL for historical reasons

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) (a’ + b + c’) (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) (a’ + b + c’) (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d)  Decision (a + c + d’) (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) (a’ + b + c’) (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d)  Decision (a + c’ + d’) (b’ + c’ + d) (a’ + b + c’) (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) c (a’ + b + c’)  Decision (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) c (a’ + b + c’) (a’ + b’ + c) (a + c + d) a=0 d=1 Conflict! Implication Graph c=0 d=0 (a + c + d’)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) c (a’ + b + c’) (a’ + b’ + c) (a + c + d) a=0 d=1 Conflict! Implication Graph c=0 d=0 (a + c + d’)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) c  Backtrack (a’ + b + c’) (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) c (a’ + b + c’) 1  Forced Decision (a’ + b’ + c) (a + c’ + d) a=0 d=1 Conflict! c=1 d=0 (a + c’ + d’)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) (a + c’ + d’) (b’ + c’ + d) c  Backtrack (a’ + b + c’) 1 (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) 1  Forced Decision (a + c’ + d’) (b’ + c’ + d) c (a’ + b + c’) 1 (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) 1 (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1  Decision (a’ + b’ + c) (a + c’ + d) a=0 d=1 Conflict! c=0 d=0 (a + c’ + d’)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) 1 (a + c’ + d’) (b’ + c’ + d) c c  Backtrack (a’ + b + c’) 1 (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) 1 (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1 1  Forced Decision (a’ + b’ + c) (a + c’ + d) a=0 d=1 Conflict! c=1 d=0 (a + c’ + d’)

Basic DLL Procedure - DFS  Backtrack (a’ + b + c) (a + c + d) (a + c + d’) b (a + c’ + d) 1 (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1 1 (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) 1  Forced Decision (a + c + d) (a + c + d’) b (a + c’ + d) 1 (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1 1 (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) 1 (a + c + d) (a + c + d’) b b (a + c’ + d) 1  Decision (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1 1 (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) 1 (a + c + d) (a + c + d’) b b (a + c’ + d) 1 (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1 1 (a’ + b’ + c) (a’ + b + c) a=1 c=1 Conflict! b=0 c=0 (a’ + b + c’)

Basic DLL Procedure - DFS (a’ + b + c) 1 (a + c + d) (a + c + d’) b b  Backtrack (a + c’ + d) 1 (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1 1 (a’ + b’ + c)

Basic DLL Procedure - DFS (a’ + b + c) 1 (a + c + d) (a + c + d’) b b (a + c’ + d) 1 1  Forced Decision (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1 1 (a’ + b’ + c) (a’ + b’ + c) a=1 c=1 b=1

Basic DLL Procedure - DFS (a’ + b + c) 1 (a + c + d) (a + c + d’) b b (a + c’ + d) 1 1 (a + c’ + d’) (b’ + c’ + d) c c (a’ + b + c’) 1 1 (a’ + b’ + c) (a’ + b’ + c) (b’ + c’ + d) a=1 c=1 d=1 b=1

Basic DLL Procedure - DFS (a’ + b + c) 1 (a + c + d) (a + c + d’) b b (a + c’ + d) 1 1 (a + c’ + d’) (b’ + c’ + d) c c  SAT (a’ + b + c’) 1 1 (a’ + b’ + c) (a’ + b’ + c) (b’ + c’ + d) a=1 c=1 d=1 b=1

Implications and Boolean Constraint Propagation A variable is forced to be assigned to be True or False based on previous assignments. Unit clause rule (rule for elimination of one literal clauses) An unsatisfied clause is a unit clause if it has exactly one unassigned literal. The unassigned literal is implied because of the unit clause. Boolean Constraint Propagation (BCP) Iteratively apply the unit clause rule until there is no unit clause available. Workhorse of DLL based algorithms. Satisfied Literal Unsatisfied Literal Unassigned Literal (a +b’+ c)(b + c’)(a’ + c’) a = T, b = T, c is unassigned Here’s some basic definitions for SAT solving process: The first one is Decision, making a decision just means select a variable in the CNF and assign a truth value to it, that is, assign it as true or false. Implication based on Unit clause rule. For an unsatisfied clause, if exactly one literal in it is unassigned, it is called a unit clause. Here is an example. Suppose a and b are assigned as true, the first two clauses are satisfied while the last one is unsatisfied. So this clause is not satisfied by any assigned literals and only one literal c’, is not assigned. So it’s a unit clause. To satisfy the CNF formula, we need to satisfy all clauses, so the unit clause must be satisfied, so there’s only one option for the unassigned variable, for here, c must be 0, and we say c is implied by this clause to 0.

Features of DLL Eliminates the exponential memory requirements of DP Exponential time is still a problem Limited practical applicability – largest use seen in automatic theorem proving Very limited size of problems are allowed 32K word memory Problem size limited by total size of clauses (1300 clauses)

Binary Decision Diagrams (BDDs) The Timeline 1986 Binary Decision Diagrams (BDDs) 100 var 1960 DP  10 var 1952 Quine  10 var 1962 DLL  10 var

Using BDDs to Solve SAT R. Bryant. “Graph-based algorithms for Boolean function manipulation”. IEEE Trans. on Computers, C-35, 8:677-691, 1986. (1189 citations) Store the function in a Directed Acyclic Graph (DAG) representation. Compacted form of the function decision tree. Reduction rules guarantee canonicity under fixed variable order. Provides for Boolean function manipulation. Overkill for SAT.

The Timeline 1992 GSAT Local Search 300 Var 1960 DP  10 var 1988 BDDs  100 Var 1952 Quine  10 var 1962 DLL  10 var

Local Search (GSAT, WSAT) B. Selman, H. Levesque, and D. Mitchell. “A new method for solving hard satisfiability problems”. Proc. AAAI, 1992. (354 citations) Hill climbing algorithm for local search Make short local moves Probabilistically accept moves that worsen the cost function to enable exits from local minima Incomplete SAT solvers Geared towards satisfiable instances, cannot prove unsatisfiability Cost Solution Space Global minimum Local Minima

The Timeline 1988 SOCRATES  3k Var 1994 Hannibal  3k Var 1960 DP 10 var 1986 BDD  100 Var 1992 GSAT  300 Var 1952 Quine  10 var 1962 DLL  10 var EDA Drivers (ATPG, Equivalence Checking) start the push for practically useable algorithms! Deemphasize random/synthetic benchmarks.

Stålmarck’s Algorithm The Timeline 1996 Stålmarck’s Algorithm 1000 Var 1960 DP  10 var 1992 GSAT 1000 Var 1988 BDDs  100 Var 1952 Quine  10 var 1962 DLL  10 var

Stålmarck’s Algorithm M. Sheeran and G. Stålmarck “A tutorial on Stålmarck’s proof procedure”, Proc. FMCAD, 1998 (10 citations) Algorithm: Using triplets to represent formula Closer to a circuit representation Branch on variable relationships besides on variables Ability to add new variables on the fly Breadth first search over all possible trees in increasing depth

Stålmarck’s algorithm Try both sides of a branch to find forced decisions (relationships between variables) (a + b) (a’ + c) (a’ + b) (a + d)

Stålmarck’s algorithm Try both sides of a branch to find forced decisions (a + b) (a’ + c) (a’ + b) (a + d) b=1 a=0 d=1 a=0 b=1,d=1

Stålmarck’s algorithm Try both side of a branch to find forced decisions (a + b) (a’ + c) (a’ + b) (a + d) c=1 a=1 b=1 a=0 b=1,d=1 a=1 b=1,c=1

Stålmarck’s algorithm Try both sides of a branch to find forced decisions Repeat for all variables Repeat for all pairs, triples,… till either SAT or UNSAT is proved (a + b) (a’ + c) (a’ + b) (a + d) a=0 b=1,d=1  b=1 a=1 b=1,c=1

The Timeline 1996 GRASP Conflict Driven Learning, Non-chornological Backtracking 1k Var 1960 DP 10 var 1988 SOCRATES  3k Var 1994 Hannibal  3k Var 1986 BDD  100 Var 1992 GSAT  300 Var 1996 Stålmarck  1k Var 1952 Quine  10 var 1962 DLL  10 var

GRASP Marques-Silva and Sakallah [SS96,SS99] J. P. Marques-Silva and K. A. Sakallah, "GRASP -- A New Search Algorithm for Satisfiability,“ Proc. ICCAD 1996. (49 citations) J. P. Marques-Silva and Karem A. Sakallah, “GRASP: A Search Algorithm for Propositional Satisfiability”, IEEE Trans. Computers, C-48, 5:506-521, 1999. (19 citations) Incorporates conflict driven learning and non-chronological backtracking Practical SAT instances can be solved in reasonable time Bayardo and Schrag’s RelSAT also proposed conflict driven learning [BS97] R. J. Bayardo Jr. and R. C. Schrag “Using CSP look-back techniques to solve real world SAT instances.” Proc. AAAI, pp. 203-208, 1997(124 citations)

Conflict Driven Learning and Non-chronological Backtracking x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x1=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x4=1 x1=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1 x4=1 x1=0 x3=1

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0 x4=1 x1=0 x3=1 x8=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0, x12=1 x4=1 x1=0 x3=1 x8=0 x12=1

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0, x12=1 x2 x2=0 x4=1 x1=0 x3=1 x8=0 x12=1 x2=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0, x12=1 x2 x2=0, x11=1 x4=1 x1=0 x3=1 x8=0 x11=1 x12=1 x2=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0, x12=1 x2 x2=0, x11=1 x7 x7=1 x4=1 x1=0 x3=1 x7=1 x8=0 x11=1 x12=1 x2=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0, x12=1 x2 x2=0, x11=1 x7 x7=1, x9= 0, 1 x4=1 x9=1 x1=0 x3=1 x7=1 x9=0 x8=0 x11=1 x12=1 x2=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0, x12=1 x2 x2=0, x11=1 x7 x7=1, x9=1 x4=1 x9=1 x1=0 x3=1 x7=1 x9=0 x8=0 x3=1x7=1x8=0  conflict x11=1 x12=1 x2=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0, x12=1 x2 x2=0, x11=1 x7 x7=1, x9=1 x4=1 x9=1 x1=0 x3=1 x7=1 x9=0 x8=0 x3=1x7=1x8=0  conflict x11=1 x12=1 Add conflict clause: x3’+x7’+x8 x2=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3 x3=1, x8=0, x12=1 x3’+x7’+x8 x2 x2=0, x11=1 x7 x7=1, x9=1 x4=1 x9=1 x1=0 x3=1 x7=1 x9=0 x8=0 x3=1x7=1x8=0  conflict x11=1 x12=1 Add conflict clause: x3’+x7’+x8 x2=0

Conflict Driven Learning and Non-chronological Backtracking x1 x1=0, x4=1 x1 + x4 x1 + x3’ + x8’ x1 + x8 + x12 x2 + x11 x7’ + x3’ + x9 x7’ + x8 + x9’ x7 + x8 + x10’ x7 + x10 + x12’ x3’ + x8 + x7’ x3 x3=1, x8=0, x12=1 x2 x7 x4=1 x1=0 x3=1 x8=0 Backtrack to the decision level of x3=1 x7 = 0 x12=1

Conflict clause: x1’+x3+x5’ What’s the big deal? x2 x1 x4 x3 x5 Conflict clause: x1’+x3+x5’ Significantly prune the search space – learned clause is useful forever! Useful in generating future conflict clauses.

Conflict clause: x1’+x3+x5’ Restart Abandon the current search tree and reconstruct a new one The clauses learned prior to the restart are still there after the restart and can help pruning the search space Adds to robustness in the solver x2 x1 x4 x3 x5 x2 x1 x3 x5 Conflict clause: x1’+x3+x5’

SAT becomes practical! Conflict driven learning greatly increases the capacity of SAT solvers (several thousand variables) for structured problems Realistic applications become feasible Usually thousands and even millions of variables Typical EDA applications that can make use of SAT circuit verification FPGA routing many other applications… Research direction changes towards more efficient implementations

Efficient BCP and decision making The Timeline 2001 Chaff Efficient BCP and decision making ≈10k var 1960 DP 10 var 1988 SOCRATES  3k Var 1994 Hannibal  3k Var 1996 GRASP 1k Var 1986 BDD  100 Var 1992 GSAT  300 Var 1996 Stålmarck  1k Var 1952 Quine  10 var 1962 DLL  10 var

Large Example: Tough Industrial Processor Verification Statistics Bounded Model Checking, 14 cycle behavior Statistics 1 million variables 10 million literals initially 200 million literals including added clauses 30 million literals finally 4 million clauses (initially) 200K clauses added 1.5 million decisions 3 hours run time

Chaff One to two orders of magnitude faster than other solvers… M. Moskewicz, C. Madigan, Y. Zhao, L. Zhang, S. Malik,“Chaff: Engineering an Efficient SAT Solver” Proc. DAC 2001. (18 citations) Widely Used: BlackBox – AI Planning Henry Kautz (UW) NuSMV – Symbolic Verification toolset A. Cimatti, et. al. “NuSMV 2: An Open Source Tool for Symbolic Model Checking” Proc. CAV 2002. GrAnDe – Automatic theorem prover Several industrial licenses

Chaff Philosophy Make the core operations fast profiling driven, most time-consuming parts: Boolean Constraint Propagation (BCP) and Decision Emphasis on coding efficiency and elegance Emphasis on optimizing data cache behavior As always, good search space pruning (i.e. conflict resolution and learning) is important

Motivating Metrics: Decisions, Instructions, Cache Performance and Run Time 1dlx_c_mc_ex_bp_f Num Variables 776 Num Clauses 3725 Num Literals 10045 Z-Chaff SATO GRASP # Decisions 3166 3771 1795 # Instructions 86.6M 630.4M 1415.9M # L1/L2 accesses 24M / 1.7M 188M / 79M 416M / 153M % L1/L2 misses 4.8% / 4.6% 36.8% / 9.7% 32.9% / 50.3% # Seconds 0.22 4.41 11.78

BCP Algorithm (1/8) What “causes” an implication? When can it occur? All literals in a clause but one are assigned to F (v1 + v2 + v3): implied cases: (0 + 0 + v3) or (0 + v2 + 0) or (v1 + 0 + 0) For an N-literal clause, this can only occur after N-1 of the literals have been assigned to F So, (theoretically) we could completely ignore the first N-2 assignments to this clause In reality, we pick two literals in each clause to “watch” and thus can ignore any assignments to the other literals in the clause. Example: (v1 + v2 + v3 + v4 + v5) ( v1=X + v2=X + v3=? {i.e. X or 0 or 1} + v4=? + v5=? )

BCP Algorithm (1.1/8) Big Invariants Each clause has two watched literals. If a clause can become newly implied via any sequence of assignments, then this sequence will include an assignment of one of the watched literals to F. Example again: (v1 + v2 + v3 + v4 + v5) ( v1=X + v2=X + v3=? + v4=? + v5=? ) BCP consists of identifying implied clauses (and the associated implications) while maintaining the “Big Invariants”

BCP Algorithm (2/8) Let’s illustrate this with an example: v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 v1’

BCP Algorithm (2.1/8) Let’s illustrate this with an example: v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 v1’ watched literals One literal clause breaks invariants: handled as a special case (ignored hereafter) Initially, we identify any two literals in each clause as the watched ones Clauses of size one are a special case

BCP Algorithm (3/8) We begin by processing the assignment v1 = F (which is implied by the size one clause) v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F) Pending:

BCP Algorithm (3.1/8) We begin by processing the assignment v1 = F (which is implied by the size one clause) v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F) Pending: To maintain our invariants, we must examine each clause where the assignment being processed has set a watched literal to F.

BCP Algorithm (3.2/8) We begin by processing the assignment v1 = F (which is implied by the size one clause) v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F) Pending: To maintain our invariants, we must examine each clause where the assignment being processed has set a watched literal to F. We need not process clauses where a watched literal has been set to T, because the clause is now satisfied and so can not become implied.

BCP Algorithm (3.3/8) We begin by processing the assignment v1 = F (which is implied by the size one clause) v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F) Pending: To maintain our invariants, we must examine each clause where the assignment being processed has set a watched literal to F. We need not process clauses where a watched literal has been set to T, because the clause is now satisfied and so can not become implied. We certainly need not process any clauses where neither watched literal changes state (in this example, where v1 is not watched).

BCP Algorithm (4/8) Now let’s actually process the second and third clauses: v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F) Pending:

BCP Algorithm (4.1/8) Now let’s actually process the second and third clauses: v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F) Pending: State:(v1=F) Pending: For the second clause, we replace v1 with v3’ as a new watched literal. Since v3’ is not assigned to F, this maintains our invariants.

BCP Algorithm (4.2/8) Now let’s actually process the second and third clauses: v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F) Pending: State:(v1=F) Pending:(v2=F) For the second clause, we replace v1 with v3’ as a new watched literal. Since v3’ is not assigned to F, this maintains our invariants. The third clause is implied. We record the new implication of v2’, and add it to the queue of assignments to process. Since the clause cannot again become newly implied, our invariants are maintained.

BCP Algorithm (5/8) Next, we process v2’. We only examine the first 2 clauses. v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F, v2=F) Pending: State:(v1=F, v2=F) Pending:(v3=F) For the first clause, we replace v2 with v4 as a new watched literal. Since v4 is not assigned to F, this maintains our invariants. The second clause is implied. We record the new implication of v3’, and add it to the queue of assignments to process. Since the clause cannot again become newly implied, our invariants are maintained.

BCP Algorithm (6/8) Next, we process v3’. We only examine the first clause. v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F, v2=F, v3=F) Pending: State:(v1=F, v2=F, v3=F) Pending: For the first clause, we replace v3 with v5 as a new watched literal. Since v5 is not assigned to F, this maintains our invariants. Since there are no pending assignments, and no conflict, BCP terminates and we make a decision. Both v4 and v5 are unassigned. Let’s say we decide to assign v4=T and proceed.

BCP Algorithm (7/8) Next, we process v4. We do nothing at all. v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F, v2=F, v3=F, v4=T) State:(v1=F, v2=F, v3=F, v4=T) Since there are no pending assignments, and no conflict, BCP terminates and we make a decision. Only v5 is unassigned. Let’s say we decide to assign v5=F and proceed.

BCP Algorithm (8/8) Next, we process v5=F. We examine the first clause. v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 v2 + v3 + v1 + v4 + v5 v1 + v2 + v3’ v1 + v2’ v1’+ v4 State:(v1=F, v2=F, v3=F, v4=T, v5=F) State:(v1=F, v2=F, v3=F, v4=T, v5=F) The first clause is implied. However, the implication is v4=T, which is a duplicate (since v4=T already) so we ignore it. Since there are no pending assignments, and no conflict, BCP terminates and we make a decision. No variables are unassigned, so the problem is sat, and we are done.

The Timeline 1996 SATO Head/tail pointers 1k var 1960 DP 10 var 1988 SOCRATES  3k Var 1994 Hannibal  3k Var 1996 GRASP 1k Var 1986 BDD  100 Var 1992 GSAT  300 Var 1996 Stålmarck  1000 Var 2001 Chaff 10k var 1952 Quine  10 var 1962 DLL  10 var

SATO H. Zhang, M. Stickel, “An efficient algorithm for unit-propagation” Proc. of the Fourth International Symposium on Artificial Intelligence and Mathematics, 1996. (7 citations) H. Zhang, “SATO: An Efficient Propositional Prover” Proc. of International Conference on Automated Deduction, 1997. (40 citations) The Invariants Each clause has a head pointer and a tail pointer. All literals in a clause before the head pointer and after the tail pointer have been assigned false. If a clause can become newly implied via any sequence of assignments, then this sequence will include an assignment to one of the literals pointed to by the head/tail pointer.

Chaff vs. SATO: A Comparison of BCP v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 Chaff: v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 SATO:

Chaff vs. SATO: A Comparison of BCP v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 Chaff: v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 SATO:

Chaff vs. SATO: A Comparison of BCP v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 Chaff: v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 SATO:

Chaff vs. SATO: A Comparison of BCP v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 Chaff: v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 SATO:

Chaff vs. SATO: A Comparison of BCP v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 Chaff: Implication v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 SATO:

Chaff vs. SATO: A Comparison of BCP v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 Chaff: v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 SATO:

Chaff vs. SATO: A Comparison of BCP v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 Chaff: Backtrack v1 + v2’ + v4 + v5 + v8’ + v10 + v12 + v15 SATO:

BCP Algorithm Summary During forward progress: Decisions and Implications Only need to examine clauses where watched literal is set to F Can ignore any assignments of literals to T Can ignore any assignments to non-watched literals During backtrack: Unwind Assignment Stack Any sequence of chronological unassignments will maintain our invariants So no action is required at all to unassign variables. Overall Minimize clause access

Decision Heuristics – Conventional Wisdom DLIS is a relatively simple dynamic decision heuristic Simple and intuitive: At each decision simply choose the assignment that satisfies the most unsatisfied clauses. However, considerable work is required to maintain the statistics necessary for this heuristic – for one implementation: Must touch *every* clause that contains a literal that has been set to true. Often restricted to initial (not learned) clauses. Maintain “sat” counters for each clause When counters transition 01, update rankings. Need to reverse the process for unassignment. The total effort required for this and similar decision heuristics is *much more* than for our BCP algorithm. Look ahead algorithms even more compute intensive C. Li, Anbulagan, “Look-ahead versus look-back for satisfiability problems” Proc. of CP, 1997. (7 citations)

Chaff Decision Heuristic - VSIDS Variable State Independent Decaying Sum Rank variables by literal count in the initial clause database Only increment counts as new clauses are added. Periodically, divide all counts by a constant. Quasi-static: Static because it doesn’t depend on var state Not static because it gradually changes as new clauses are added Decay causes bias toward *recent* conflicts. Use heap to find unassigned var with the highest ranking Even single linear pass though variables on each decision would dominate run-time! Seems to work fairly well in terms of # decisions hard to compare with other heuristics because they have too much overhead

Interplay of BCP and Decision This is only an intuitive description … Reality depends heavily on specific instance Take some variable ranking (from the decision engine) Assume several decisions are made Say v2=T, v7=F, v9=T, v1=T (and any implications thereof) Then a conflict is encountered that forces v2=F The next decisions may still be v7=F, v9=T, v1=T ! But the BCP engine has recently processed these assignments … so these variables are unlikely to still be watched. Thus, the BCP engine *inherently does a differential update.* And the Decision heuristic makes differential changes more likely to occur in practice. In a more general sense, the more “active” a variable is, the more likely it is to *not* be watched.

Emphasize clause activity The Timeline 2002 BerkMin Emphasize clause activity 10k var 1960 DP 10 var 1988 SOCRATES  3k Var 1994 Hannibal  3k Var 1996 GRASP 1k Var 1986 BDD  100 Var 1992 GSAT  300 Var 1996 Stålmarck  1000 Var 2001 Chaff 10k var 1952 Quine  10 var 1962 DLL  10 var 1996 SATO 1k Var

Post Chaff Improvements — BerkMin E. Goldberg, and Y. Novikov, “BerkMin: A Fast and Robust Sat-Solver”, Proc. DATE 2002, pp. 142-149. Decision strategy Make decisions on literals that are more recently active Measure a literal’s activity based on its appearance in both conflict clauses and the antecedent clauses of conflict clauses Clause deletion strategy More aggressive than that in Chaff Delete clauses not only based on their length but also on their involvement in resolving conflicts

BerkMin Emphasize active clauses in deciding variables v5=0 v2=0 v1=1 Conflict Clause: V1’+V4’+V5 V1’+V5 +V2’ V1’+V4’ +V2 Implied variables Decision Variables Previous Assignments v5=0 v1=1 v4=1 v2=0 v2=1

Conflict Clause: V1’+V4’+V5 Clauses taken to be active in Chaff: BerkMin Emphasize active clauses in deciding variables Conflict Clause: V1’+V4’+V5 Chaff measures a literal’s activity only by its appearances in conflict clauses Clauses taken to be active in Chaff: V1’+V4’+V5 V1’+V5 +V2’ V1’+V4’ +V2 Implied variables Decision Variables Previous Assignments v5=0 v1=1 v4=1 v2=0 v2=1

BerkMin Emphasize active clauses in deciding variables v5=0 v2=0 v1=1 Conflict Clause: V1’+V4’+V5 BerkMin measures a literal’s activity by its appearances in clauses involved in conflicts Clauses taken to be active in BerkMin: V1’+V5+V2’ V1’+V4’+V2 V1’+V5 +V2’ V1’+V4’ +V2 Implied variables Decision Variables Previous Assignments v5=0 v1=1 v4=1 v2=0 v2=1

Utility of a Learned Clause 1 1 0.8 0.95 0.6 0.9 Cumulative count percentile Cumulative count percentile 0.4 0.85 0.2 0.8 2 4 6 8 10 12 20 40 60 80 100 x 10 4 Utility Metric Utility Metric Utility Metric is the number of times a clause is involved in generating a new useful (conflict generating) clause. Most clauses have zero utility metric. They are not useful for proving unsatisfiability! They shouldn’t be kept in database!

Utility of a Learned Clause The number of decisions between the generation of a clause and its use in generating a new useful conflict clause 1 0.8 0.6 Cumulative Count Percentile 0.4 0.2 2 4 6 8 10 12 4 x 10 Num. of Decisions If a clause is useful, it will usually be used soon.

The Timeline 2002 2CLS+EQ ≈1k var 1960 DP 10 var 1988 SOCRATES 1994 Hannibal  3k Var 1996 GRASP 1k Var 2002 BerkMin 10k var 1986 BDD  100 Var 1992 GSAT  300 Var 1996 Stålmarck  1000 Var 2001 Chaff 10k var 1952 Quine  10 var 1962 DLL  10 var 1996 SATO 1k Var

Post Chaff Improvements — 2CLS+EQ F. Bacchus “Exploring the Computational Tradeoff of more Reasoning and Less Searching”, Proc. 5th Int. Symp. Theory and Applications of Satisfiability Testing, pp. 7-16, 2002. Extensive Reasoning at each node of the search tree Hyper-resolution x1+x2+ ••• +xn, x1+y, x2+y, •••, xn-1+y resolved as xn+y Hyper resolution detects the same set of forced literals as iteratively doing the failed literal tests Equality reduction If formula F contains a’+b and a+b’, then replace every occurrence of a(b) with b(a) and simplify F Demonstrate that deduction techniques other than UP (Unit Propagation) can pay off in terms of run time. Scalability with increasing problem size?

Summary Rich history of emphasis on practical efficiency. Presence of drivers results in maximum progress. Need to account for computation cost in search space pruning. Need to match algorithms with underlying processing system architectures. Specific problem classes can benefit from specialized algorithms Identification of problem classes? Dynamically adapting heuristics? We barely understand the tip of the iceberg here – much room to learn and improve.

Acknowledgements Princeton University SAT group: Chaff authors: Daijue Tang Yinlei Yu Lintao Zhang Chaff authors: Matthew Moskewicz Conor Madigan

Iterated Consensus Iterated consensus generates all prime implicants. W. V. Quine, “The problem of simplifying truth functions”, Amer. Math Monthly Vol. 59, pp. 521-531, 1952. (33 citations) Starting point is Disjunctive Normal Form (DNF) Can be used to check tautology of a DNF formula For a tautological formula, the only prime is 1 Dual problem of satisfiability checking for CNF Consensus is the dual of resolution A SAT Checking Procedure!

Iterated Consensus (a + b) (a + b’) (a’ + c) (a’ + c’) (a + b + c) (b + c’ + f’) (b’ + e)

Iterated Consensus (a + b) (a + b’) (a’ + c) (a’ + c’) (a + b + c) (b + c’ + f’) (b’ + e) a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’b’

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’b’ + a’b’e’f

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’b’ + a’b’e’f

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’b’ + a’b’e’f + a’e’f

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’b’ + a’b’e’f + a’e’f + a’e’

Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’b’ + a’b’e’f + a’e’f + a’e’

No more implicants can be generated, not a tautology Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’b’ + a’b’e’f + a’e’f + a’e’ No more implicants can be generated, not a tautology

No more implicants can be generated, not a tautology Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’ + a’b’ + a’b’e’f + a’e’f + a’e’ No more implicants can be generated, not a tautology

No more implicants can be generated, not a tautology Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’ + a’b’ + a’b’e’f + a’e’f + a’e’ No more implicants can be generated, not a tautology

No more implicants can be generated, not a tautology Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’ + a + a’b’ + a’b’e’f + a’e’f + a’e’ No more implicants can be generated, not a tautology

No more implicants can be generated, not a tautology Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’ + a + a’b’ + a’b’e’f + a’e’f + a’e’ No more implicants can be generated, not a tautology

No more implicants can be generated, not a tautology Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’ + a + 1 + a’b’ + a’b’e’f + a’e’f + a’e’ No more implicants can be generated, not a tautology

No more implicants can be generated, not a tautology Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’ + a + 1 + a’b’ + a’b’e’f + a’e’f + a’e’ No more implicants can be generated, not a tautology

No more implicants can be generated, not a tautology Iterated Consensus a’b’c’ + b’cf + be’ a’b’ + a’b + ac’ + ac + a’b’f + a’c’e’ + cfe’ + a’ + a + 1 + a’b’ + a’b’e’f + a’e’f Tautology + a’e’ No more implicants can be generated, not a tautology

BDD Simplification of Search x1 x2 x3 x3 x4 x4 x4 x5 x5 x5 x5 x5

BDD Simplification of Search x1 x2 x3 x3 x4 x4 x4 Two nodes with isomorphic graphs are merged x5 x5 x5 x5 x5

BDD Simplification of Search x1 x2 Any node with identical children is removed x3 x3 x4 x4 x4 x5 x5

BDD Simplification of Search x1 x2 x3 x3 x4 x5 x5

BDD Simplification of Search x1 x2 x3 x4 x5 x5

EDA Drivers ATPG Stuck at faults b sa1 x d f a e c

EDA Drivers ATPG miters b a c d=1 e f d ^ g=1?

EDA Drivers Combinational Equivalence Checking Circuit A PI PO1 =1? Circuit B PO2

The Timeline 1960 DP <10 var 1988 SOCRATES  10K Var 1986 BDD 1992 GSAT  300 Var 1996 Stålmarck  1000 Var 1952 Quine  10 var 1962 DLL  10 var

SOCRATES M. H. Schulz, E. Auth, “SOCRATES: A highly efficient automatic test pattern generation system”, IEEE Trans. Computers C-37, 7:126-137, 1988 b a c d e f a=1f=1

SOCRATES b a c d e f f=0a=0

Hannibal b d f a e c f=0d=0 or e=0 W. Kunz, “HANNIBAL: An efficient tool for logic verification based on recursive learning”, Proc. ICCAD, 1993 b a c d e f f=0d=0 or e=0

Hannibal b a c d e f Try d=0, Then a=0 and b=0

Hannibal b a c d e f Try e=0, Then a=0 and c=0

In both cases, a=0, so f=0 a=0 Hannibal b a c d e f In both cases, a=0, so f=0 a=0

EDA Drivers Advances in ATPG SOCRATES first incorporated learning If PQ, then Q’P’ Hannibal uses Recursive Learning with certain recursion depth SOCRATES, Hannibal can start to handle practical sized circuits Use circuit (and ATPG specific) information, so cannot immediately generalize this to SAT Many deduction techniques can be used though

Conflict clause: x1’+x3+x5’ Restart x2 x1 x4 x3 x5 x2 x1 x3 x5 Conflict clause: x1’+x3+x5’

Time Profiling of GRASP

Time profiling of Chaff

BerkMin Decision making driven by active variables in conflict generation by: Taking a wider set of clauses responsible for conflicts and measuring a variables’ activity by its appearances in not only conflict clauses but also clauses involved in making the conflicts Order clauses in stack, if the not yet satisfied clause closest to the top of the stack is: Conflict clause, choose the branching variable as one that appears in that clause Original clause, branching variable are chosen as one that has the highest activity score Also select branch to preserve the symmetry of the decision tree

BerkMin Efficient clause deletion strategy Possible motivation: Most conflict clauses will not induce further conflicts in the solution process Consume storage and BCP time Should be deleted aggressively Implementation: Satisfied conflict clauses are retained for only one clause deletion iteration More recently derived and shorter clauses are more likely to be retained Clauses that are involved in more conflicts are more likely to be retained

Local Search (GSAT, WSAT) B. Selman, H. Levesque, and D. Mitchell. “A new method for solving hard satisfiability problems”. Proc. AAAI, 1992. (354 citations) Hill climbing algorithm for local search Make short local moves Probabilistically accept moves that worsen the cost function to enable exits from local minima Cost Solution Space Global minimum Local Minima

Local Search a (a + b) b b (a + b’) (a’ + b) (a’ + b’ + c) c c c c 1 (a + b) b b (a + b’) 1 1 (a’ + b) (a’ + b’ + c) c c c c (b + c) 1 1 1 1

Local Search Cost Function F: a (a + b) b b (a + b’) (a’ + b) 1 (a + b) b b (a + b’) 1 1 (a’ + b) (a’ + b’ + c) c c c c (b + c) 1 1 1 1 Cost Function F: # of satisfied clauses: F(a=F,b=T,c=F) = 4

Local Search Cost Function F: a (a + b) b b (a + b’) (a’ + b) 1 (a + b) b b (a + b’) 1 1 (a’ + b) (a’ + b’ + c) c c c c (b + c) 1 1 1 1 Cost Function F: # of satisfied clauses: F(a=F,b=F,c=F) = 3

Local Search Cost Function F: a (a + b) b b (a + b’) (a’ + b) 1 (a + b) b b (a + b’) 1 1 (a’ + b) (a’ + b’ + c) c c c c (b + c) 1 1 1 1 Cost Function F: # of satisfied clauses: F(a=F,b=F,c=T) = 4

Local Search Cost Function F: a (a + b) b b (a + b’) (a’ + b) 1 (a + b) b b (a + b’) 1 1 (a’ + b) (a’ + b’ + c) c c c c (b + c) 1 1 1 1 Cost Function F: # of satisfied clauses: F(a=F,b=T,c=T) = 4

Local Search Cost Function F: a (a + b) b b (a + b’) (a’ + b) 1 (a + b) b b (a + b’) 1 1 (a’ + b) (a’ + b’ + c) c c c c (b + c) 1 1 1 1 Cost Function F: # of satisfied clauses: F(a=T,b=T,c=T) = 5