GRASP SAT solver Presented by Constantinos Bartzis Slides borrowed from Pankaj Chauhan J. Marques-Silva and K. Sakallah.

Slides:



Advertisements
Similar presentations
Automated abstraction refinement II Heuristic aspects Ken McMillan Cadence Berkeley Labs.
Advertisements

Exploiting SAT solvers in unbounded model checking
Automated Theorem Proving
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
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.
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Presenting:
Introduction to MiniSat v1.14 Presented by Yunho Kim Provable Software Lab, KAIST.
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
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
IBM Labs in Haifa © 2005 IBM Corporation Adaptive Application of SAT Solving Techniques Ohad Shacham and Karen Yorav Presented by Sharon Barner.
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.
SAT-based Bounded Model Checking
Nikolaj Bjørner Microsoft Research Lecture 3. DayTopicsLab 1Overview of SMT and applications. SAT solving, Z3 Encoding combinatorial problems with Z3.
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:
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.
1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University.
State-of-the-art in SAT solvers
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
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.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Boolean Satisfiability and SAT Solvers
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
MBSat Satisfiability Program and Heuristics Brief Overview VLSI Testing B Marc Boulé April 2001 McGill University Electrical and Computer Engineering.
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.
Motivation & Goal SAT and Constraint Processing (CP) are fundamental areas of Computer Science that address the same computational questions. Compare SAT.
1 Agenda Modeling problems in Propositional Logic SAT basics Decision heuristics Non-chronological Backtracking Learning with Conflict Clauses SAT and.
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.
First-Order Logic and Inductive Logic Programming.
Boolean Satisfiability Present and Future
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.
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.
© R.A. Rutenbar 2009 Slide 1 Carnegie Mellon (Lec 06) Boolean Satisfiability: SAT Solvers (Pt 1) What you know  Representation and manipulation via BDDs,
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Inference in Propositional Logic (and Intro to SAT)
Hybrid BDD and All-SAT Method for Model Checking
Inference and search for the propositional satisfiability problem
Bounded Model Checking
First-Order Logic and Inductive Logic Programming
Logic Synthesis CNF Satisfiability.
Heuristics for Efficient SAT Solving
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
Introduction to the Boolean Satisfiability Problem
GRASP-an efficient SAT solver
Presentation transcript:

GRASP SAT solver Presented by Constantinos Bartzis Slides borrowed from Pankaj Chauhan J. Marques-Silva and K. Sakallah

What is SAT? Given a propositional formula in CNF, find an assignment to boolean variables that makes the formula true E.g.  1 = (x 2  x 3 )  2 = (  x 1   x 4 )  3 = (  x 2  x 4 ) A = {x 1 =0, x 2 =1, x 3 =0, x 4 =1}  1 = (x 2  x 3 )  2 = (  x 1   x 4 )  3 = (  x 2  x 4 ) A = {x 1 =0, x 2 =1, x 3 =0, x 4 =1} SATisfying assignment!

Why is SAT important? Fundamental problem from theoretical point of view Numerous applications CAD, VLSI Optimization Model Checking and other kinds of formal verification AI, planning, automated deduction

Terminology CNF formula  x 1,…, x n : n variables  1,…,  m : m clauses Assignment A Set of (x,v(x)) pairs |A| < n  partial assignment {(x 1,0), (x 2,1), (x 4,1)} |A| = n  complete assignment {(x 1,0), (x 2,1), (x 3,0), (x 4,1)}  | A = 0  unsatisfying assignment {(x 1,1), (x 4,1)}  | A = 1  satisfying assignment {(x 1,0), (x 2,1), (x 4,1)}  | A = X  unresolved {(x 1,0), (x 2,0), (x 4,1)}  1 = (x 2  x 3 )  2 = (  x 1   x 4 )  3 = (  x 2  x 4 ) A = {x 1 =0, x 2 =1, x 3 =0, x 4 =1}  1 = (x 2  x 3 )  2 = (  x 1   x 4 )  3 = (  x 2  x 4 ) A = {x 1 =0, x 2 =1, x 3 =0, x 4 =1}

Terminology An assignment partitions the clause database into three classes Satisfied Unsatisfied Unresolved Free literals: unassigned literals of a clause Unit clause: unresolved with only one free literal

Basic Backtracking Search Organize the search in the form of a decision tree Each node is an assignment, called decision assignment Depth of the node in the decision tree  decision level  (x)  x is assigned to v at decision level d

Basic Backtracking Search Iteration: 1. Make new decision assignments to explore new regions of search space 2. Infer implied assignments by a deduction process. May lead to unsatisfied clauses, conflict. The assignment is called conflicting assignment. 3. If there is a conflict backtrack

DPLL in action  1 = (  x 1  x 2  x 3  x 4 )  2 = (  x 1  x 3  x 4 )  3 = (x 1  x 2  x 3 )  4 = (  x 3  x 4 )  5 = (  x 4  x 1   x 3 )  6 = (  x 2  x 4 )  7 = (  x 2   x 4 )  1 = (  x 1  x 2  x 3  x 4 )  2 = (  x 1  x 3  x 4 )  3 = (x 1  x 2  x 3 )  4 = (  x 3  x 4 )  5 = (  x 4  x 1   x 3 )  6 = (  x 2  x 4 )  7 = (  x 2   x 4 ) x1x1 x2x2 U  x 3 = x 1 =  / / / x 2 =  x 4 = conflict U / / /

DPLL in action  1 = (  x 1  x 2  x 3  x 4 )  2 = (  x 1  x 3  x 4 )  3 = (x 1  x 2  x 3 )  4 = (  x 3  x 4 )  5 = (  x 4  x 1   x 3 )  6 = (  x 2  x 4 )  7 = (  x 2   x 4 )  1 = (  x 1  x 2  x 3  x 4 )  2 = (  x 1  x 3  x 4 )  3 = (x 1  x 2  x 3 )  4 = (  x 3  x 4 )  5 = (  x 4  x 1   x 3 )  6 = (  x 2  x 4 )  7 = (  x 2   x 4 ) x1x1 x2x2  x 3 = x 1 =  / / / x 2 =  x 4 = conflict U / / x 2 =  x 4 = conflict

DPLL in action  1 = (  x 1  x 2  x 3  x 4 )  2 = (  x 1  x 3  x 4 )  3 = (x 1  x 2  x 3 )  4 = (  x 3  x 4 )  5 = (  x 4  x 1   x 3 )  6 = (  x 2  x 4 )  7 = (  x 2   x 4 )  1 = (  x 1  x 2  x 3  x 4 )  2 = (  x 1  x 3  x 4 )  3 = (x 1  x 2  x 3 )  4 = (  x 3  x 4 )  5 = (  x 4  x 1   x 3 )  6 = (  x 2  x 4 )  7 = (  x 2   x 4 ) x1x1 x2x2  x 3 = x 1 = / / x 2 =  x 4 = conflict / x 2 =  x 4 = conflict x2x2 x 1 = x 2 = x4x4 x 4 = {(x 1,1), (x 2,0), (x 4,1)}

DPLL Algorithm Deduction Decision Backtrack

GRASP GRASP stands for Generalized seaRch Algorithm for the Satisfiability Problem (Silva, Sakallah, ’96) Features: Implication graphs for BCP and conflict analysis Learning of new clauses Non-chronological backtracking

GRASP search template

GRASP Decision Heuristics Procedure decide() Which variable to split on What value to assign Default heuristic in GRASP: Choose the variable and assignment that directly satisfies the largest number of clauses Other possibilities exist

GRASP Deduction Boolean Constraint Propagation using implication graphs E.g. for the clause  = (x   y), if y=1, then we must have x=1 For a variable x occuring in a clause, assignment 0 to all other literals is called antecedent assignment A(x) E.g. for  = (x  y   z), A(x) = {(y,0), (z,1)}, A(y) = {(x,0),(z,1)}, A(z) = {(x,0), (y,0)} Variables directly responsible for forcing the value of x Antecedent assignment of a decision variable is empty

Implication Graphs Nodes are variable assignments x=v(x) (decision or implied) Predecessors of x are antecedent assignments A(x) No predecessors for decision assignments! Special conflict vertices  have A(  ) = assignments to variables in the unsatisfied clause Decision level for an implied assignment is  (x) = max{  (y)|(y,v(y))  A(x)}

Example Implication Graph  1 = (  x 1  x 2 )  2 = (  x 1  x 3  x 9 )  3 = (  x 2   x 3  x 4 )  4 = (  x 4  x 5  x 10 )  5 = (  x 4  x 6  x 11 )  6 = (  x 5   x 6 )  7 = (x 1  x 7   x 12 )  8 = (x 1  x 8 )  9 = (  x 7   x 8   x 13 )  1 = (  x 1  x 2 )  2 = (  x 1  x 3  x 9 )  3 = (  x 2   x 3  x 4 )  4 = (  x 4  x 5  x 10 )  5 = (  x 4  x 6  x 11 )  6 = (  x 5   x 6 )  7 = (x 1  x 7   x 12 )  8 = (x 1  x 8 )  9 = (  x 7   x 8   x 13 ) Current truth assignment: {x 9 10 x 11 x 12 x 13 Current decision assignment: {x 1 66 66  conflict x 9 x 1 x 10 x 11 x 5 44 44 55 55 x 6 22 22 x 3 11 x 2 33 33 x 4

GRASP Deduction Process

GRASP Conflict Analysis After a conflict arises, analyze the implication graph at current decision level Add new clauses that would prevent the occurrence of the same conflict in the future  Learning Determine decision level to backtrack to, might not be the immediate one  Non-chronological backtracking

Learning Determine the assignment that caused conflict  Backward traversal of the IG, find the roots of the IG in the transitive fanin of  This assignment is necessary condition for  Negation of this assignment is called conflict induced clause  C (  ) Adding  C (  ) to the clause database will prevent the occurrence of  again

Learning 66 66  conflict x 9 x 1 x 10 x 11 x 5 44 44 55 55 x 6 22 22 x 3 11 x 2 33 33 x 4  C (  ) = (  x 1  x 9  x 10  x 11 )

For any node of an IG x, partition A(x) into  (x) = {(y,v(y))  A(x)|  (y)<  (x)}  (x) = {(y,v(y))  A(x)|  (y)=  (x)} Conflicting assignment A C (  ) = causesof(  ), where Learning (x,v(x)) if A(x) =   (x)  [  causesof(y) ] o/w (y,v(y))   (x) causesof( x ) =

Learning Learning of new clauses increases clause database size Increase may be exponential Heuristically delete clauses based on a user provided parameter If size of learned clause > parameter, don’t include it

Backtracking Failure driven assertions (FDA): If  C (  ) involves current decision variable, a different assignment for the current variable is immediately tried. In our IG, after erasing the assignment at level 6,  C (  ) becomes a unit clause  x 1 This immediately implies x 1 =0

Example Implication Graph  1 = (  x 1  x 2 )  2 = (  x 1  x 3  x 9 )  3 = (  x 2   x 3  x 4 )  4 = (  x 4  x 5  x 10 )  5 = (  x 4  x 6  x 11 )  6 = (  x 5   x 6 )  7 = (x 1  x 7   x 12 )  8 = (x 1  x 8 )  9 = (  x 7   x 8   x 13 )  C (  )=(  x 1  x 9  x 10  x 11 )  1 = (  x 1  x 2 )  2 = (  x 1  x 3  x 9 )  3 = (  x 2   x 3  x 4 )  4 = (  x 4  x 5  x 10 )  5 = (  x 4  x 6  x 11 )  6 = (  x 5   x 6 )  7 = (x 1  x 7   x 12 )  8 = (x 1  x 8 )  9 = (  x 7   x 8   x 13 )  C (  )=(  x 1  x 9  x 10  x 11 ) Current truth assignment: {x 9 10 x 11 x 12 x 13 Current decision assignment: {x 1 66 66  conflict x 9 x 1 x 10 x 11 x 5 44 44 55 55 x 6 22 22 x 3 11 x 2 33 33 x 4

Example Implication Graph  1 = (  x 1  x 2 )  2 = (  x 1  x 3  x 9 )  3 = (  x 2   x 3  x 4 )  4 = (  x 4  x 5  x 10 )  5 = (  x 4  x 6  x 11 )  6 = (  x 5  x 6 )  7 = (x 1  x 7   x 12 )  8 = (x 1  x 8 )  9 = (  x 7   x 8   x 13 )  C (  ) = (  x 1  x 9  x 10  x 11 )  1 = (  x 1  x 2 )  2 = (  x 1  x 3  x 9 )  3 = (  x 2   x 3  x 4 )  4 = (  x 4  x 5  x 10 )  5 = (  x 4  x 6  x 11 )  6 = (  x 5  x 6 )  7 = (x 1  x 7   x 12 )  8 = (x 1  x 8 )  9 = (  x 7   x 8   x 13 )  C (  ) = (  x 1  x 9  x 10  x 11 ) Current truth assignment: {x 9 10 x 11 x 12 x 13 Current decision assignment: {x 1 x 11 x 10 x 9 C()C() C()C() C()C() x 1

Non-chronological backtracking 99 99 ’’ x 12 x 7 x 8 x 1 x 11 x 10 x 9 77 77 88 C()C() C()C() C()C() x 13 99 A C (  ’) = {x 9 x 10 = x 11 = x 12 x 13  C (  ) = (x 9  x 10  x 11   x 12   x 13 ) Decision level 4 5 x1 x1 6 '' 3

Backtrack level is given by  = d-1 chronological backtrack  < d-1 non-chronological backtrack Backtracking  = max{  (x)|(x,v(x))  A C (  ’)}

Procedure Diagnose()

What’s next? Reduce overhead for constraint propagation Better decision heuristics Better learning, problem specific Better engineering Chaff