1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.

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
Boolean Satisfiability
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.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
“Using Weighted MAX-SAT Engines to Solve MPE” -- by James D. Park Shuo (Olivia) Yang.
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.
Generating Hard Satisfiability Problems1 Bart Selman, David Mitchell, Hector J. Levesque Presented by Xiaoxin Yin.
Abstract Answer Set Solver. Todolist Print the rules of Fig 1.
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:
SAT-based Bounded Model Checking
Authors: Lucas Bordeaux, Youssef Hamadi & Lintao Zhang
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.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: February 4, 2009 Modern SAT Solvers ({z}Chaff, GRASP,miniSAT)
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:
Ofer Strichman, Technion 1 Decision Procedures in First Order Logic Part I - Introduction.
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
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.
1 A theory-based decision heuristic for DPLL(T) Dan Goldwasser Ofer Strichman Shai Fine Haifa university TechnionIBM-HRL.
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)
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Binary Decision Diagrams (BDDs)
Boolean Satisfiability and SAT Solvers
Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong 07 NOV 08.
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.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 18: April 1, 2015 Modern SAT Solvers ({z}Chaff, GRASP, miniSAT)
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
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.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
1 Boolean Satisfiability (SAT) Class Presentation By Girish Paladugu.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Dynamic Backtracking for SAT Presented by: Phil Oertel April 6, 2004.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
CS137: Electronic Design Automation
Inference in Propositional Logic (and Intro to SAT)
Clause Learning in a SAT-Solver
Bounded Model Checking
Gábor Kusper University of Linz RISC Austria
(xy)(yz)(xz)(zy)
SAT’07 Conference, Lisbon;
A theory-based decision heuristic for DPLL(T)
Introduction to Software Verification
ESE535: Electronic Design Automation
Heuristics for Efficient SAT Solving
ECE 667 Synthesis and Verification of Digital Circuits
Decision Procedures An Algorithmic Point of View
Decision heuristics based on an Abstraction/Refinement model
GRASP-an efficient SAT solver
Presentation transcript:

1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman

2/30 SAT Solver Changki PSWLAB Contents  Introduction  The DPLL framework  BCP and Implication Graph  Conflict Clauses and Resolution  Decision Heuristics  References

3/30 SAT made some progress…

4/30 SAT Solver Changki PSWLAB Contents  Introduction  The DPLL framework  BCP and Implication Graph  Conflict Clauses and Resolution  Decision Heuristics  References

5/30 SAT Solver Changki PSWLAB Two main categories of SAT solver  Davis-Putnam-Loveland-Logemann (DPLL) framework  The solver can be thought of as traversing and backtracking on a binary tree.  Internal nodes represent partial assignments.  Leave nodes represent full assignments.  Stochastic search  The solver guesses a full assignment, and then, if the formula is evaluated to FALSE under this assignment, starts to flip values of variables according to some heuristics.  DPLL solvers are considered better in most cases according to the annual competition.

6/30 SAT Solver Changki PSWLAB Status of a clause  A clause can be  Satisfied: at least one literal is satisfied  Unsatisfied: all literals are assigned but non are satisfied  Unit: all but one literals are assigned but none are satisfied  Unresolved: all other cases  Example: C = ( x 1 ∨ x 2 ∨ x 3 ) x1x1 x2x2 x3x3 C 10Satisfied 000Unsatisfied 00Unit 0Unresolved

7/30 SAT Solver Changki PSWLAB A Basic SAT algorithm While (true) { if (Decide() == FALSE) return (SAT); while (BCP() == “conflict”) { backtrack-level = Analyze_Conflict(); if (backtrack-level < 0) return (UNSAT); else BackTrack(backtrack-level); } Choose the next variable and value. Return False if all variables are assigned Apply repeatedly the unit clause rule. Return False if reached a conflict Backtrack until no conflict. Return False if impossible

8/30 SAT Solver Changki PSWLAB  Given  in CNF: (x ∨ y ∨ z) ∧ ( ¬ x ∨ y) ∧ ( ¬ y ∨ z) ∧ ( ¬ x ∨ ¬ y ∨ ¬ z) Decide() BCP() Analyze_Conflict() A Basic SAT algorithm (y) ∧ ( ¬ y ∨ z ) ∧ ( ¬ y ∨ ¬ z ) (y ∨ z) ∧ ( ¬ y ∨ z ) (z) ∧ ( ¬ z ) ( ) (y) ∧ ( ¬ y) ( )  x = 1x = 0 y = 1y = 0z = 1z = 0 z = 1z = 0 y = 1y = 0  X XX XX

9/30 SAT Solver Changki PSWLAB Contents  Introduction  The DPLL framework  BCP and Implication Graph  Conflict Clauses and Resolution  Decision Heuristics  References

10/30 SAT Solver Changki PSWLAB Boolean Constraints Propagation (BCP)  BCP is repeated application of the unit clause rule until either a conflict is encountered or there are no more implications.  Each assignment is associated with the decision level at which it occurred.  notation : x ∈ {0,1} is assigned to v at decision level d  The process of BCP is best illustrated with an implication graph.

11/30 SAT Solver Changki PSWLAB Implication graph  Def: An implication graph is a labeled directed acyclic graph G(V, E), where:  V represents the literals of the current partial assignment. Each node is labeled with the literal that it represents and the decision level at which it entered the partial assignment.  E with E = { (v i, v j ) | v i, v j ∈ V, ¬ v i ∈ Antecedent(v j ) } denotes the set of directed edges where each edge (v i, v j ) is labeled with Antecedent(v j ).  Def: For a given unit clause C with an unassigned literal l, we say that l is implied by C and that C is the antecedent clause of l, denoted by Antecedent(l).

12/30 55 55 x 6 Implication graphs and conflict clause  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 22 22 x 3 11 x 2 33 33 x 4 We learn the conflict clause  10 = ( ¬ x 1 ∨ x 9 ∨ x 11 ∨ x 10 )

13/30 Implication graph, flipped assignment x 1 x 11 x 10 x 9 x 7 x 12 77 77 x 8 88  10 99 99 ’’ x 13 99 Due to the conflict clause  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 )  10 : (  x 1  x 9  x 11  x 10 )  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 )  10 : (  x 1  x 9  x 11  x 10 ) Another conflict clause:  11 = (  x 13 ∨  x 12 ∨ x 11 ∨ x 10 ∨ x 9 ) conflict

14/30 SAT Solver Changki PSWLAB Non-chronological backtracking Non- chronological backtracking x ’’ Decision level Which assignments caused the conflicts ? x 9 = x 10 = x 11 = x 12 = x 13 = Backtrack to DL = 3 3 These assignments Are sufficient for Causing a conflict.

15/30 SAT Solver Changki PSWLAB Non-chronological backtracking  So the rule is: backtrack to the largest decision level in the conflict clause. x 1 = 0 x 2 = 0 x 3 = 1 x 4 = 0 x 5 = 0 x 7 = 1 x 9 = 0 x 6 = 0... x 5 = 1 x 9 = 1 x 3 = 0

16/30 SAT Solver Changki PSWLAB Contents  Introduction  The DPLL framework  BCP and Implication Graph  Conflict Clauses and Resolution  Decision Heuristics  References

17/30 SAT Solver Changki PSWLAB Conflict clauses  Def: A clause is asserting if the clause contains all value 0 literals; and among them only one is assigned at current decision level.  After backtracking, this clause will become a unit clause and force the literal to assume another value, thus bringing the search to a new space.  Modern solvers only consider Asserting Clauses.

18/30 SAT Solver Changki PSWLAB Unique Implication Points (UIP’s)  Definition: A Unique Implication Point (UIP) is an internal node in the implication graph that all paths from the decision to the conflict node go through it.  The First-UIP is the closest UIP to the conflict. 55 55 66 66  conflict 44 44 22 22 11 33 33 UIP

Conflict clauses and Resolution  The Binary-resolution :  Example:

20/30 SAT Solver Changki PSWLAB Conflict clauses and resolution This function is to return TRUE if and only if cl contains the negation of the first UIP as its single literal at the current decision level

21/30 SAT Solver Changki PSWLAB Conflict clauses and resolution Resolution order : x 4, x 5, x 6, x 7 Since the c 5 contains the negation of the first UIP as its single literal at the current decision level, the stop criterion is met. c 5 is asserting clause. First UIP

22/30 SAT Solver Changki PSWLAB Resolution graph 11 22 33 44 55 66  10 77 88 99  11 77 77 88  10 99 99  ’ conflict 55 55 66 66  conflict 44 44 22 22 11 33 33 99 Resolution Graph

23/30 SAT Solver Changki PSWLAB Contents  Introduction  The DPLL framework  BCP and Implication Graph  Conflict Clauses and Resolution  Decision Heuristics  References

24/30 SAT Solver Changki PSWLAB  Compute for every clause  and every variable l (in each phase):  J ( l ) :=  Choose a variable l that maximizes J ( l ).  This gives an exponentially higher weight to literals in shorter clauses. Decision heuristics - JW Jeroslow-Wang method

25/30 SAT Solver Changki PSWLAB  Choose the assignment that satisfies the largest number of currently unsatisfied clauses  C x p – # unresolved clauses in which x appears  Let x be the literal with C xp  Let y be the literal with C yp  If C xp > C yp choose x, Otherwise choose y  Requires l (#literals) queries for each decision. DLIS (Dynamic Largest Individual Sum) Decision heuristics - DLIS

26/30 SAT Solver Changki PSWLAB Decision heuristics – VSIDS (Implemented in Chaff) VSIDS (Variable State Independent Decaying Sum) 1.Each variable in each polarity has a counter initialized to When a clause is added, the counters are updated. 3. The unassigned variable with the highest counter is chosen. 4. Periodically, all the counters are divided by a constant.

27/30 SAT Solver Changki PSWLAB Decision heuristics – VSIDS (cont’d)  Chaff holds a list of unassigned variables sorted by the counter value.  Updates are needed only when adding conflict clauses.  Thus decision is made in constant time.

28/30 SAT Solver Changki PSWLAB Decision Heuristics - Berkmin  Keep conflict clauses in a stack  Choose the first unresolved clause in the stack  If there is no such clause, use VSIDS  Choose from this clause a variable + value according to some scoring (e.g. VSIDS)  This gives absolute priority to conflicts.

29/30 SAT Solver Changki PSWLAB Contents  Introduction  The DPLL framework  BCP and Implication Graph  Conflict Clauses and Resolution  Decision Heuristics  References

30/30 SAT Solver Changki PSWLAB References  Decision Procedures – Daniel Kroening and Ofer Strichman  The Quest for Efficient Boolean Satisfiability Solvers – Lintao Zhang and Sharad Malik  Efficient Conflict Driven Learning in a Boolean Satisfiability Solver – Lintao Zhang, Conor F. Madigan, Matthew H. Moskewicz and Sharad Malik