Boolean Satisfiability Solvers Wonhong Nam

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
The Project Problem formulation (one page) Literature review –“Related work" section of final paper, –Go to writing center, –Present paper(s) to class.
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:
Introduction to MiniSat v1.14 Presented by Yunho Kim Provable Software Lab, KAIST.
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.
© 2002 Fadi A. Aloul, University of Michigan PBS: A Pseudo-Boolean Solver and Optimizer Fadi A. Aloul, Arathi Ramani, Igor L. Markov, Karem A. Sakallah.
SAT-based Bounded Model Checking
Authors: Lucas Bordeaux, Youssef Hamadi & Lintao Zhang
Hrinking hrinking A signment tack tack. Agenda Introduction Algorithm Description Heuristics Experimental Results Conclusions.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: February 4, 2009 Modern SAT Solvers ({z}Chaff, GRASP,miniSAT)
Searching for Autarkies to Trim Unsatisfiable Clause Sets Mark H. Liffiton and Karem A. Sakallah University of Michigan {liffiton,
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:
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
Efficient SAT Solving for Non- clausal Formulas using DPLL, Graphs, and Watched-cuts Himanshu Jain Edmund M. Clarke.
State-of-the-art in SAT solvers
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 –
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.
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)
1 Message Passing and Local Heuristics as Decimation Strategies for Satisfiability Lukas Kroc, Ashish Sabharwal, Bart Selman (presented by Sebastian Brand)
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
Boolean Satisfiability and SAT Solvers
Decision Procedures - An algorithmic point of view
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
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.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 18: April 1, 2015 Modern SAT Solvers ({z}Chaff, GRASP, miniSAT)
Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems by Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz Presented by Yunho.
Parallelizing MiniSat I-Ting Angelina Lee Justin Zhang May 05, Final Project Presentation.
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
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
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.
Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson.
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.
A Decision-Making Procedure for Resolution-Based SAT-solvers Eugene Goldberg Cadence Research Labs (USA) SAT-2008, Guangzhou, P.R. China.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
SAT for Software Model Checking Introduction to SAT-problem for newbie
CS137: Electronic Design Automation
Hardware Acceleration of A Boolean Satisfiability Solver
Inference and search for the propositional satisfiability problem
Bounded Model Checking
Backtracking search: look-back
Logic Synthesis CNF Satisfiability.
ESE535: Electronic Design Automation
Heuristics for Efficient SAT Solving
ECE 667 Synthesis and Verification of Digital Circuits
Decision Procedures An Algorithmic Point of View
GRASP-an efficient SAT solver
Presentation transcript:

Boolean Satisfiability Solvers Wonhong Nam

CIS6402 Satisfiability Boolean formula: f(v 1, v 2, v 3, … ) Find an assignment to variables such that f(t 1, t 2, t 3, … ) = T Or show that there is no such an assignment: f(v 1, v 2, v 3, … ) = F NP-complete problem Applications EDA(Electronic Design Automation) AI Bound Model Checking Tools GRASP, SATO, Chaff and so on.

CIS6403 Outline Introduction The Basic DPLL Framework Branching Heuristics Deduction Algorithm Conflict Analysis and Learning Performance Comparison Conclusion

CIS6404 Introduction Formula specified in CNF. f(v 1, v 2, v 3 ) = (v 1 + v 2 + ¬ v 3 ) & (v 1 + ¬ v 2 ) & ( ¬ v 1 ) Advantages In order to satisfy a formula, all of the clauses must be satisfied. In order to satisfy each clause, at least one of the literals must be satisfied. This example is satisfiable with v 1 = F, v 2 = F, v 3 = F Deduce (v 1 + v 2 + ¬ v 3 ), v 1 = F, v 2 = F  v 3 = F Conflict (v 1 + v 2 + ¬ v 3 ) & (V 3 ), v 1 = F, v 2 = F  conflict

CIS6405 The Basic DPLL Framework (1/2) DPLL(formula, assignment) { necessary = deduction(formula, assignment); new_asgnmnt = union(necessary, assignment); if(is_satisfied(formula, new_asgnmnt)) return SATISFIABLE; else if(is_conflicting(formula, new_asgnmnt)) return CONFLICT; var = choose_free_variable(formula, new_asgnmnt); asgn1 = union(new_asgnmnt, assign(var, 1)); if(DPLL(formula, asgn1)==SATISFIABLE) return SATISFIABLE; else { asgn2 = union(new_asgnmnt, assign(var, 0)); return DPLL(formula, asgn2); }

CIS6406 The Basic DPLL Framework (2/2) status = preprocess(); if(status!=UNKNOWN) return status; while(1){ decide_next_branch(); while(1){ status = deduce(); if(status == CONFLICT){ blevel = analyze_conflict(); if(blevel == 0) return UNSATISFIABLE; else backtrack(blevel); } else if (status == SATISFIABLE){ return SATISFIABLE; } else break; }

CIS6407 Branching Heuristics A lack of clear statistical evidence Some common strategies RAND The maximization of some complex functions of the current variable state and the clause. (BOHM and MOMs heuristics) DLIS(Dynamic Largest Individual Sum) heuristic to select the literal that appears most frequently in unresolved clauses. How to evaluate strategies. No clear answer. Chaff: VSIDS(Variable State Independent Decaying Sum)

CIS6408 VSIDS Observation The conflict clauses primarily make the search process to be difficult problems. Strategy Each variable in each polarity has a counter, initialized to 0. When a conflict clause is occurred, the counter associated with each literal in the clause is incremented. The variable and polarity with the highest counter is chosen at each decision. It has low overhead since the statistics are only updated when there is a new conflict clause.

CIS6409 The Basic DPLL Framework status = preprocess(); if(status!=UNKNOWN) return status; while(1){ decide_next_branch(); while(1){ status = deduce(); if(status == CONFLICT){ blevel = analyze_conflict(); if(blevel == 0) return UNSATISFIABLE; else backtrack(blevel); } else if (status == SATISFIABLE){ return SATISFIABLE; } else break; }

CIS64010 Deduction Algorithm(BCP) Most of SAT solver spent about 80% of running time in deduce(). Unit clause ( v 1 + v 2 + ¬ v 3 ), v 1 =F, v 2 =F  v 3 = F When can it occur? All-but-one literals in a clause are assigned to 0 BCP(Boolean Constraint Propagation) How implement? Keeping counters for each clause. GRASP, rel_sat, satz etc. GRASP - Each clause keeps two counters. For the number of value 1 literals in the clause. For the number of value 0 literals in the clause. if(# of literals - # of 0 literals == 1) unit clause.

CIS64011 BCP (1/3) SATO – head/tail pointers. Each clause has two pointers. The head points to the first free literal of the clause. The tail points to the last free literal of the clause. Advantage over counter method Only when the literals pointed by the head or the tail are assigned to 0, the pointer moves. When the variable is assigned value 1, the clauses that contain the positive literal will not be visited at all and vice- versa.

CIS64012 BCP (2/3) Chaff – watched literals. Observation – Undoing during backtracking has some computation that can be reduced. Two watched literal pointers. There is no imposed order on the two pointers within a clause. Each of the pointers can move in either direction. Advantage The same advantage as the head/tail mechanism compared with the counting scheme. Undoing takes less time because the watched literal pointers do not need to move.

CIS64013 BCP (3/3)

CIS64014 The Basic DPLL Framework status = preprocess(); if(status!=UNKNOWN) return status; while(1){ decide_next_branch(); while(1){ status = deduce(); if(status == CONFLICT){ blevel = analyze_conflict(); if(blevel == 0) return UNSATISFIABLE; else backtrack(blevel); } else if (status == SATISFIABLE){ return SATISFIABLE; } else break; }

CIS64015 Conflict Analysis and Learning (1/3) When a conflicting clause occurs, The solver needs to backtrack and undo the decisions. Chronological backtracking The solver keeps a flag indicating whether it has been tried in both phases or not. When a conflicting clause occurs, The solver looks for the decision variable with the latest decision level that has not been flipped, marks it flipped, undoes all the assignments between that decision level and current decision level, and then tries the other phase for the decision variable. v 1 = T, v 2 = F, v 3 = T, v 3 = F.

CIS64016 Conflict Analysis and Learning (2/3) Non-chronological backtracking Backtrack to an earlier decision level than the last unflipped decision. Conflict-directed learning The information about the current conflict may be added to the original formula. GRASP, rel_sat, SATO and Chaff Resolution To generate a clause from two clauses like the process of consensus in the logic optimization domain. ( x + y ) & ( ¬ y + z) ≡ ( x + y ) & ( ¬ y + z) & ( x + z ) Resolvent ( x + y ) & ( ¬ y + z)  ( x + z ) Redundant Adding the resolvent does not change the satisfiability of the original formula.

CIS64017 Conflict Analysis and Learning (3/3) Learning The conflict analysis will add some clauses to the original formula. The redundant resolvent avoids making the same mistake in the future search. F = (a+b) & ( ¬ a+ ¬ b+ ¬ c) & ( ¬ b+c) & … Pick “ a=true ”, no deduction. Pick “ b=true ”. Conflict occurs between ( ¬ a+ ¬ b+ ¬ c) and ( ¬ b+c). Resolvent: ( ¬ a+ ¬ b)

CIS64018 Performance Comparison

CIS64019 Conclusion Techniques employed in modern Boolean Satisfiability solvers. DPLL search algorithm Branching Heuristics Deduction Algorithm Conflict Analysis and Learning Currently, zChaff is best SAT solver in both industrial and handmade benchmarks.