Boolean Satisfiability in Electronic Design Automation

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.
Hypothetical Reasoning in Propositional Satisfiability SAT02, May, 2002 Joao Marques-Silva Technical University of Lisbon, IST/INESC, CEL Lisbon, Portugal.
The Project Problem formulation (one page) Literature review –“Related work" section of final paper, –Go to writing center, –Present paper(s) to class.
Presented by Monissa Mohan 1.  A highly optimized BCP algorithm  Two watched literals  Fast Backtracking  Efficient Decision Heuristic  Focused on.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
“Using Weighted MAX-SAT Engines to Solve MPE” -- by James D. Park Shuo (Olivia) Yang.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Using Problem Structure for Efficient Clause Learning Ashish Sabharwal, Paul Beame, Henry Kautz University of Washington, Seattle April 23, 2003.
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.
Properties of SLUR Formulae Ondřej Čepek, Petr Kučera, Václav Vlček Charles University in Prague SOFSEM 2012 January 23, 2012.
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:
ECE 667 Synthesis & Verification - SAT 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Boolean SAT CNF Representation Slides adopted (with.
Willis Lemasters Grant Conklin. Searching a tree recursively one branch at a time, abandoning any branch which does not satisfy the search constraints.
(a = 0)  (c = 0)  (f = 0)  (  = 0)  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f)  Clause Recording During backtrack search, for each conflict create.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
On-The-Fly Resolve Trace Minimization Ohad Shacham and Karen Yorav IBM Haifa Research Laboratory.
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.
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…
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.
Boolean Satisfiability and SAT Solvers
MBSat Satisfiability Program and Heuristics Brief Overview VLSI Testing B Marc Boulé April 2001 McGill University Electrical and Computer Engineering.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
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.
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.
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.
EA C461 Artificial Intelligence
Inference in Propositional Logic (and Intro to SAT)
Hardware Acceleration of A Boolean Satisfiability Solver
Inference and search for the propositional satisfiability problem
Gábor Kusper University of Linz RISC Austria
EA C461 – Artificial Intelligence Logical Agent
Parallelism in SAT Solvers
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
Logical Inference: Through Proof to Truth
Logic Synthesis CNF Satisfiability.
SAT-Based Area Recovery in Technology Mapping
Introduction to the Boolean Satisfiability Problem
ECE 667 Synthesis and Verification of Digital Circuits
Logics for Data and Knowledge Representation
Decision Procedures An Algorithmic Point of View
A Progressive Approach for Satisfiability Modulo Theories
Resolution Proofs for Combinational Equivalence
Introduction to the Boolean Satisfiability Problem
Methods of Proof Chapter 7, second half.
Canonical Computation without Canonical Data Structure
SAT-based Methods: Logic Synthesis and Technology Mapping
GRASP-an efficient SAT solver
Presentation transcript:

Boolean Satisfiability in Electronic Design Automation João Marques Silva Informatics Department Technical University of Lisbon IST/INESC, CEL Karem A. Sakallah EECS Department University of Michigan SAT tutorial

Context SAT is the quintessential NP-complete problem Theoretically well-studied Practical algorithms for large problem instances started emerging in the last five years Has many applications in EDA and other fields Can potentially have similar impact on EDA as BDDs EDA professionals should have good working knowledge of SAT formulations and algorithms SAT tutorial

Outline Boolean Satisfiability (SAT) Basic Algorithms Representative EDA Applications Taxonomy of Modern SAT Algorithms Advanced Backtrack Search Techniques Experimental Evidence Conclusions SAT tutorial

Boolean Satisfiability Given a suitable representation for a Boolean function f(X): Find an assignment X* such that f(X*) = 1 Or prove that such an assignment does not exist (i.e. f(X) = 0 for all possible assignments) In the “classical” SAT problem, f(X) is represented in product-of-sums (POS) or conjunctive normal form (CNF) Many decision (yes/no) problems can be formulated either directly or indirectly in terms of Boolean Satisfiability SAT tutorial

Conjunctive Normal Form (CNF) Clause j = ( a + c ) ( b + c ) (¬a + ¬b + ¬c ) Positive Literal Negative Literal SAT tutorial

Basics Implication Assignments: {a = 0, b = 1} = ¬a b x ® y = ¬x + y = ¬y ® ¬x (contra positive) Assignments: {a = 0, b = 1} = ¬a b Partial (some variables still unassigned) Complete (all variables assigned) Conflicting (imply ¬j) j = (a + c)(b + c)(¬a + ¬b + ¬c) j ® (a + c) ¬(a + c) ® ¬j ¬a ¬c ® ¬j SAT tutorial

Application of restricted forms has been successful! Consensus General technique for deriving new clauses Example: 1 = (¬a + b + c), 2 = (a + b + d) Consensus: con(1, 2, a) = (b + c + d) Complete procedure for satisfiability [Davis, JACM’60] Impractical for real-world problem instances Application of restricted forms has been successful! E.g., always apply restricted consensus con((¬a + ), (a + ), a) = ()  is a disjunction of literals SAT tutorial

Literal & Clause Classification violated satisfied unresolved j = (a + ¬b)(¬a + b + ¬c )(a + c + d )(¬a + ¬b + ¬c ) a assigned 0 b assigned 1 c and d unassigned SAT tutorial

Outline Boolean Satisfiability (SAT) Basic Algorithms Representative EDA Applications Taxonomy of Modern SAT Algorithms Advanced Backtrack Search Techniques Experimental Evidence Conclusions SAT tutorial

Basic Backtracking Search 1 2 3 4 5 6 7 8 (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) (¬b + ¬c + ¬d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + d) a b b c c c d d d d d SAT tutorial

Unit Clause Rule - Implications An unresolved clause is unit if it has exactly one unassigned literal j = (a + c)(b + c)(¬a + ¬b + ¬c) A unit clause has exactly one option for being satisfied a b ® ¬c i.e. c must be set to 0. SAT tutorial

Basic Search with Implications 1 2 3 4 5 6 7 8 (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) (a + b + c) (a + b + ¬c) (¬a + b + ¬c) (a + c + d) (¬a + c + d) (¬a + c + ¬d) (¬b + ¬c + ¬d) (¬b + ¬c + d) a b b c c d 7 b c c 3 a b d 5 a c d 4 a c 6 8 6 5 d SAT tutorial

j = (a + c )(b + c )(b + ¬d)(¬a + ¬b + d) Pure Literal Rule A variable is pure if its literals are either all positive or all negative Satisfiability of a formula is unaffected by assigning pure variables the values that satisfy all the clauses containing them j = (a + c )(b + c )(b + ¬d)(¬a + ¬b + d) Set c to 1; if j becomes unsatisfiable, then it is also unsatisfiable when c is set to 0. SAT tutorial

Circuit Satisfiability d e g f h? j = h [d=¬(ab)] [e=¬(b+c)] [f=¬d] [g=d+e] [h=fg] SAT tutorial

Gate CNF a b d jd = [d = ¬(a b)] jd = [d = ¬(a b )][¬d = a b] = ¬[¬(a b)¬d + a b d] = (¬a ® d)(¬b ® d)(a b ® ¬d) = ¬[¬a ¬d + ¬b ¬d + a b d] = (a + d)(b + d)(¬a + ¬b + ¬d) = (a + d)(b + d)(¬a + ¬b + ¬d) SAT tutorial

Circuit Satisfiability d e g f h? a b c d e g f h? a b c d e g f h? a b c d e g f h a b c d e g f h? j = h [d=¬(ab)] [e=¬(b+c)] [f=¬d] [g=d+e] [h=fg] = h (a + d)(b + d)(¬a + ¬b + ¬d) (¬b + ¬e)(¬c + ¬e)(b + c + e) (¬d + ¬f)(d + f) (¬d + g)(¬e + g)(d + e + ¬g) (f + ¬h)(g + ¬h)(¬f + ¬g + h) = h (a + d)(b + d)(¬a + ¬b + ¬d) (¬b + ¬e)(¬c + ¬e)(b + c + e) (¬d + ¬f)(d + f) (¬d + g)(¬e + g)(d + e + ¬g) (f + ¬h)(g + ¬h)(¬f + ¬g + h) = h (a + d)(b + d)(¬a + ¬b + ¬d) (¬b + ¬e)(¬c + ¬e)(b + c + e) (¬d + ¬f)(d + f) (¬d + g)(¬e + g)(d + e + ¬g) (f + ¬h)(g + ¬h)(¬f + ¬g + h) = h (a + d)(b + d)(¬a + ¬b + ¬d) (¬b + ¬e)(¬c + ¬e)(b + c + e) (¬d + ¬f)(d + f) (¬d + g)(¬e + g)(d + e + ¬g) (f + ¬h)(g + ¬h)(¬f + ¬g + h) = h (a + d)(b + d)(¬a + ¬b + ¬d) (¬b + ¬e)(¬c + ¬e)(b + c + e) (¬d + ¬f)(d + f) (¬d + g)(¬e + g)(d + e + ¬g) (f + ¬h)(g + ¬h)(¬f + ¬g + h) SAT tutorial

Outline Boolean Satisfiability (SAT) Basic Algorithms Representative EDA Applications Taxonomy of Modern SAT Algorithms Advanced Backtrack Search Techniques Experimental Evidence Conclusions SAT tutorial

ATPG x4 x1 x2 x3 x5 x6 x7 x8 x9 x1 x2 x3 x4 x5 x6 x7 x8 x9 s-a-1 = 0 CG z = 1 ? = 1 CF x4 x1 x3 x5 x6 x7 x8 x9 x4 x1 x2 x3 x5 x6 x7 x8 x9 SAT tutorial

Equivalence Checking CA z = 1 ? CB If z = 1 is unsatisfiable, the two circuits are equivalent ! SAT tutorial

Outline Boolean Satisfiability (SAT) Basic Algorithms Representative EDA Applications Taxonomy of Modern SAT Algorithms Advanced Backtrack Search Techniques Experimental Evidence Conclusions SAT tutorial

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

Resolution (original DP) Iteratively apply resolution (consensus) to eliminate one variable each time i.e., consensus 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 j = (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 ! SAT tutorial

Stallmarck’s Method (SM) in CNF Recursive application of the branch-merge rule to each variable with the goal of identifying common conclusions j = (a + b)(¬a + c) (¬b + d)(¬c + d) j = (a + b)(¬a + c) (¬b + d)(¬c + d) j = (a + b)(¬a + c) (¬b + d)(¬c + d) j = (a + b)(¬a + c) (¬b + d)(¬c + d) Try a = 0: (a = 0)  (b = 1)  (d = 1) C(a = 0) = {a = 0, b = 1, d = 1} Try a = 1: (a = 1)  (c = 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 SAT tutorial

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

SM vs. RL Both complete procedures for SAT Stallmarck’s method: hypothetic reasoning based on variables Recursive learning: hypothetic reasoning based on clauses Both can be integrated into backtrack search algorithms SAT tutorial

Local Search j = (a + b)(¬a + c) (¬b + d)(¬c + d) Repeat M times: Randomly pick complete assignment Repeat K times (and while exist unsatisfied clauses): Flip variable that will satisfy largest number of unsat clauses j = (a + b)(¬a + c) (¬b + d)(¬c + d) Pick random assignment j = (a + b)(¬a + c) (¬b + d)(¬c + d) Flip assignment on d j = (a + b)(¬a + c) (¬b + d)(¬c + d) Instance is satisfied ! SAT tutorial

Comparison Local search is incomplete If instances are known to be SAT, local search can be competitive Resolution is in general impractical Stallmarck’s Method (SM) and Recursive Learning (RL) are in general slow, though robust SM and RL can derive too much unnecessary information For most EDA applications backtrack search (DP) is currently the most promising approach ! Augmented with techniques for inferring new clauses/implicates (i.e. learning) ! SAT tutorial

Outline Boolean Satisfiability (SAT) Basic Algorithms Representative EDA Applications Taxonomy of Modern SAT Algorithms Advanced Backtrack Search Techniques Experimental Evidence Conclusions SAT tutorial

Techniques for Backtrack Search Conflict analysis Clause/implicate recording Non-chronological backtracking Incorporate and extend ideas from: Resolution Recursive learning Stallmarck’s method Formula simplification & Clause inference [Li,AAAI00] Randomization & Restarts [Gomes&Selman,AAAI98] SAT tutorial

Clause Recording  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f) During backtrack search, for each conflict create clause that explains and prevents recurrence of same conflict  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f)  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f)  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f)  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f)  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f) Assume (decisions) c = 0 and f = 0 Assign a = 0 and imply assignments A conflict is reached: (¬d + ¬e + f) is unsat (a = 0)  (c = 0)  (f = 0)  ( = 0) ( = 1)  (a = 1)  (c = 1)  (f = 1) create new clause: (a + c + f) SAT tutorial

Clause Recording  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f) Clauses derived from conflicts can also be viewed as the result of applying selective consensus  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f) (a + c + d) consensus (a + c + ¬e + f) (a + e) (a + c + f) SAT tutorial

Non-Chronological Backtracking During backtrack search, in the presence of conflicts, backtrack to one of the causes of the conflict  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f) (a + c + f)(¬a + g)(¬g + b)(¬h + j)(¬i + k)  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f) (a + c + f)(¬a + g)(¬g + b)(¬h + j)(¬i + k)  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f) (a + c + f)(¬a + g)(¬g + b)(¬h + j)(¬i + k)  = (a + b)(¬b + c + d) (¬b + e)(¬d + ¬e + f) (a + c + f)(¬a + g)(¬g + b)(¬h + j)(¬i + k) Assume (decisions) c = 0, f = 0, h = 0 and i = 0 Assignment a = 0 caused conflict  clause (a + c + f) created (a + c + f) implies a = 1 A conflict is again reached: (¬d + ¬e + f) is unsat (a = 1)  (c = 0)  (f = 0)  ( = 0) ( = 1)  (a = 0)  (c = 1)  (f = 1) SAT tutorial create new clause: (¬a + c + f)

Non-Chronological Backtracking c f Created clauses: (a + c + f) and (¬a + c + f) Apply consensus: new unsat clause (c + f) (c + f)  backtrack to most recent decision: f = 0 i h created clauses/implicates: (a + c + f), (¬a + c + f), and (c + f) a 1 SAT tutorial

Ideas from other Approaches Resolution, Stallmarck’s method and recursive learning can be incorporated into backtrack search (DP) create additional clauses/implicates anticipate and prevent conflicting conditions identify necessary assignments allow for non-chronological backtracking (¬a + b + d) (a + b + c) Resolution within DP: (b + c + d) consensus (b + c + d) Unit clause ! Clause provides explanation for necessary assignment b = 1 SAT tutorial

Stallmarck’s Method within DP  = (a + b + e)(¬a + c + f)(¬b + d) (¬c + d + g) Implications: (a = 1)  (f = 0)  (c = 1) (c = 1)  (g = 0)  (d = 1)  = (a + b + e)(¬a + c + f)(¬b + d) (¬c + d + g)  = (a + b + e)(¬a + c + f)(¬b + d) (¬c + d + g) (e = 0)  (f = 0)  (g = 0)  (d = 1) (a = 0)  (e = 0)  (b = 1)  (d = 1)  = (a + b + e)(¬a + c + f)(¬b + d) (¬c + d + g) (b + e + c + f) consensus (d + e + c + f) (e + f + g + d) Clausal form: (e + f + g + d) Unit clause ! Clause provides explanation for necessary assignment d = 1 SAT tutorial

Recursive Learning within DP  = (a + b + c)(¬a + d + e) (¬b + d + c) (c = 0)  ((e = 0)  (c = 0))  (d = 1) (a = 1)  (e = 0)  (d = 1)  = (a + b + c)(¬a + d + e) (¬b + d + c) (b = 1)  (c = 0)  (d = 1)  = (a + b + c)(¬a + d + e) (¬b + d + c) Implications:  = (a + b + c)(¬a + d + e) (¬b + d + c) (b + c + e + d) consensus (c + e + d) consensus Clausal form: (c + e + d) Unit clause ! Clause provides explanation for necessary assignment d = 1 SAT tutorial

Formula Simplification Eliminate clauses and variables If (x + y) and (x + y) exist, then x and y are equivalent, (x  y) eliminate y, and replace by x remove satisfied clauses Utilize 2CNF sub-formula for identifying equivalent variables (¬a + b)(¬b + c)(¬c + d)(¬d + b)(¬d + a) a, b, c and d are pairwise equivalent Implication graph: a d b c SAT tutorial

Clause Inference Conditions Given (l1 + ¬l2)(l1 + ¬l3)(l2 + l3 + ¬l4) Infer (l1 + ¬l4) (l1 + l3 + ¬ l4) consensus (l1 + ¬ l4) consensus If we can also infer (¬l1 + l4), then we prove (l1  l4), and can replace l4 by l1 ! Type of Inference: 2 Binary / 1 Ternary (2B/1T) Clauses Other types: 1B/1T, 1B/2T, 3B/1T, 2B/1T, 0B/4T SAT tutorial

The Power of Consensus Most search pruning techniques can be explained as particular ways of applying selective consensus Conflict-based clause recording Non-chronological backtracking Extending Stallmarck’s method to backtrack search Extending recursive learning to backtrack search Clause inference conditions General consensus is computationally too expensive ! Most techniques indirectly identify which consensus operations to apply ! To create new clauses/implicates To identify necessary assignments SAT tutorial

Randomization & Restarts Run times of backtrack search SAT solvers characterized by heavy-tail distributions For a fixed problem instance, run times can exhibit large variations with different branching heuristics and/or branching randomization Search strategy: Rapid Randomized Restarts Randomize variable selection heuristic Utilize a small backtrack cutoff value Repeatedly restart the search each time backtrack cutoff reached Use randomization to explore different paths in search tree SAT tutorial

Randomization & Restarts Can make the search strategy complete Increase cutoff value after each restart Can utilize learning Useful for proving unsatisfiability Can utilize portfolios of algorithms and/or algorithm configurations Also useful for proving unsatisfiability SAT tutorial

Outline Boolean Satisfiability (SAT) Basic Algorithms Representative EDA Applications Taxonomy of Modern SAT Algorithms Advanced Backtrack Search Techniques Experimental Evidence Conclusions SAT tutorial

Conclusions Many recent SAT algorithms and (EDA) applications Hard Applications Bounded Model Checking Combinational Equivalence Checking Superscalar processor verification FPGA routing “Easy” Applications Test Pattern Generation: Stuck-at, Delay faults, etc. Redundancy Removal Circuit Delay Computation Other Applications Noise analysis, etc. SAT tutorial

Conclusions Complete vs. Incomplete algorithms Backtrack search (DP) Resolution (original DP) Stallmarck’s method Recursive learning Local search Techniques for backtrack search (infer implicates) conflict-induced clause recording non-chronological backtracking resolution, SM and RL within backtrack search formula simplification & clause inference conditions randomization & restarts SAT tutorial

More Information on SAT in EDA http://algos.inesc.pt/grasp http://algos.inesc.pt/sat http://algos.inesc.pt/~jpms (jpms@inesc.pt) http://andante.eecs.umich.edu/grasp_public http://nexus6.cs.ucla.edu/GSRC/bookshelf/Slots/SAT/GRASP http://eecs.umich.edu/~karem (karem@umich.edu) SAT tutorial