Efficient SAT Solving for Non- clausal Formulas using DPLL, Graphs, and Watched-cuts Himanshu Jain Edmund M. Clarke.

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
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Boolean Satisfiability
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Presenting:
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
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.
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.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
Presented by Ed Clarke Slides borrowed from P. Chauhan and C. Bartzis
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Quantified Formulas Acknowledgement: QBF slides borrowed from S. Malik.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
NP-Complete Problems Problems in Computer Science are classified into
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
GRASP SAT solver Presented by Constantinos Bartzis Slides borrowed from Pankaj Chauhan J. Marques-Silva and K. Sakallah.
Formal Verification Group © Copyright IBM Corporation 2008 IBM Haifa Labs SAT-based unbounded model checking using interpolation Based on a paper “Interpolation.
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.
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
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.
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
SAT 2009 Ashish Sabharwal Backdoors in the Context of Learning (short paper) Bistra Dilkina, Carla P. Gomes, Ashish Sabharwal Cornell University SAT-09.
“Predicting Learnt Clauses Quality in Modern SAT Solvers” & “Blocked Clause Elimination” Ateeq Sharfuddin CS 297: Championship Algorithms.
SAT Solver Heuristics. SAT-solver History Started with David-Putnam-Logemann-Loveland (DPLL) (1962) –Able to solve variable problems Satz (Chu Min.
Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
1 Boolean Satisfiability (SAT) Class Presentation By Girish Paladugu.
1 Alan Mishchenko Research Update June-September 2008.
Honors Track: Competitive Programming & Problem Solving 2-Satisfiability José Kuiper.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
Hybrid BDD and All-SAT Method for Model Checking
Inference and search for the propositional satisfiability problem
Gábor Kusper University of Linz RISC Austria
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
A theory-based decision heuristic for DPLL(T)
Introduction to Software Verification
Logic Synthesis CNF Satisfiability.
Intro to Theory of Computation
Intro to Theory of Computation
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
SAT-Based Area Recovery in Technology Mapping
ECE 667 Synthesis and Verification of Digital Circuits
A Progressive Approach for Satisfiability Modulo Theories
SAT-based Methods: Logic Synthesis and Technology Mapping
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Solving Non-clausal Formulas with DPLL search
Faster Extraction of High-Level Minimal Unsatisfiable Cores
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
Presentation transcript:

Efficient SAT Solving for Non- clausal Formulas using DPLL, Graphs, and Watched-cuts Himanshu Jain Edmund M. Clarke

Agenda  Motivation  Existing SAT solvers  Our approach  Negation Normal Form (NNF)  Graphs to represent NNF  Boolean Constraint Propagation (BCP)  Experimental Results 1

2  Applications in verification  Equivalence checking  Model checking  Theorem proving  Test generation  Static analysis  Circuits in practice  Thousands of inputs  Millions of gates  Structure sharing Boolean Satisfiability Boolean Circuit   ab aa bb aa b output  

3 Current SAT solvers  Davis-Putnam-Logemann-Loveland (DPLL) algorithm  Conversion of circuit to Conjunctive Normal Form (CNF)  Number of variables proportional to number of gates  Can be times more than the number of inputs in a circuit  Slowdown due to large number of new variables (and clauses)  Modern CNF solvers use pre-processing techniques  To reduce #variables and #clauses in CNF  But pre-processing has large memory requirements

4 Our SAT solving framework Boolean Circuit hpgraphvpgraph Negation Normal Form Fewer variables than CNF and more structure DPLL algorithm

5 Negation Normal Form (NNF) An NNF formula contains arbitrary nesting of AND (  ) and OR (  ) gates - Negations can appear at leaf level - No sharing of sub formulas      ab aa bb aa b yy  yy  aby 

6 How to obtain NNF from Boolean Circuits    ab aa bb aa b yy  yy  aby     ab aa bb aa b Circuit from converted to NNF by introducing one new variable y to remove sharing Boolean Circuit NNF out out’  

7 Why NNF: Number of variables CNF without pre-processing has 5-10X more variables

8 Why NNF: Number of variables 1705 points 428 points Note no pre-processing for NNF

9 Our SAT solving framework Boolean Circuit hpgraphvpgraph Negation Normal Form Peter Andrew’s Horizontal/Vertical Path Forms (1981) DPLL algorithm

10 Inductively creating hpgraph(  ) from NNF formula   is a literal m m Create new node  =  1   2 hpgraph(  1 ) R1R1 L1L1 hpgraph(  2 ) R2R2 L2L2 Take graph union  =  1   2 hpgraph(  1 ) R1R1 L1L1 hpgraph(  2 ) R2R2 L2L2 Add hyperedge from L 1 to R 2

11 p q r  s rr pp Example Formula F: (((p  q)   r   q)  (  p  (r   s)  q)) qq q hpgraph(F) R R R L L L R denotes a root node and L denotes a leaf node p  q   p p  q  r   s p  q  q  r   p  r  r   s  r  q  q   p  q  r   s  q  q CNF(F) horizontal path

12 Example Formula F: (((p  q)   r   q)  (  p  (r   s)  q)) p q rr qq q pp r  s vpgraph(F) RRR L L R denotes a root node and L denotes a leaf node p   r   q q   r   q  p  r  q  p   s  q DNF(F) vertical path

13 Our SAT solving framework Boolean Circuit hpgraph CNF-like vpgraph DNF-like Negation Normal Form DPLL algorithm Directed Acyclic Graphs (DAGs) Linear in size of original circuit

14 DPLL on hpgraph hpgraph Boolean Constraint Propagation (BCP) engine Decisions Top-level DPLL Algorithm Conflicts, Implied Literals

15 pp rr Meaning of BCP on hpgraph p q r  s qq q Conflict clause:  r   p R L Assignment  1 :={r=1,p=1} horizontal path = clause qq p q r  s rr pp q Unit clause:  q  r   s Implied literal: r R L Assignment  2 :={q=1,s=1} A horizontal path

16 Can we generalize the CNF watched literal scheme? - Watch two literals (nodes) on each clause (path) - But exponential number of clauses (paths)! p q r  s rr pp qq q R R R L L L Hpgraph Horizontal path = clause

17 Two Watched Cut Scheme Hpgraph p q r  s rr pp qq q R R R L L L 1.A node cut disconnects all horizontal paths 2.Watch two node cuts (allows observing two literals on each clause) 3.Minimal cuts (covered later) cut 1 cut 2 watch a node cut p  q  r   s

18 Actual picture…. An hpgraph hpgraph components 1.Two cuts for each hpgraph component 2.Can be updated locally during BCP 3.Non-chronological backtracking is cheap

19 Our algorithm generalizes CNF watched literal scheme An hpgraphSpecial hpgraph (CNF)

20 Acceptable cut p q r  s rr pp qq q R R R L L L cut 1 cut 2 A cut is acceptable if no literal appearing in it is false Cut 2 is: not acceptable for  := {p=1} Cut 1 is: acceptable for  := {p=1} Now let us see the use of cuts during BCP

21 BCP Case 1: Both cuts are acceptable and disjoint Hpgraph component p q r  s rr pp qq q R R R L L L cut 1 cut 2 No need to examine the hpgraph component  := {s=1} Intuitively, there will be no conflicts or implied literals

22 BCP Case 2 (conflict): No acceptable cut Hpgraph component p q r  s rr pp qq q R R R L L L cut 1 cut 2  := {p=1,q=1} An hpgraph has no acceptable cut if and only if current assignment falsifies the formula Conflict clause:  q   p

23 BCP Case 3 (Implications): Acceptable cuts but not disjoint Hpgraph component p q r  s rr pp qq q cut 1 cut 2 For  := {p=1} we can find two acceptable cuts. We cannot find two completely node-disjoint cuts Intuitively nodes common to both cuts contain implied literals In our example  r and  q are implied literals.

24 Finding and Maintaining Minimal Cuts p q r  s rr pp qq q R R R L L L minimal cut in hpgraph component = a path in vpgraph component hpgraph component p q rr qq q pp r  s RR R LL vpgraph component

25 Experimental Results  These techniques implemented in:  NFLSAT (Non-clausal FormuLas SATisfiability checker)  ~2500 Boolean circuits (industrial category)  Bounded model checking, k-induction, SW/HW verification  CNF obtained by adding new variables (one per AND gate in AIG)  Timeout of 600sec per problem  Comparing with state-of-the-art solvers  SAT 2009 competition winners: Precosat, Glucose  SAT-Race 2008 AIG track winners: MiniSAT++, Picoaigersat  Top three winners of SAT 2007 comp: RSAT, MiniSAT, PicoSAT

26 NFLSAT vs. Precosat NFLSAT solves 29 more problems x>y on 2018 points y>x on 306 points Total time: NFLSAT( sec), Precosat ( sec)

27 NFLSAT vs. Glucose NFLSAT solves 58 more problems y>x on 895 points x>y on 1382 points Total time: NFLSAT( sec), Glucose ( sec)

28 NFLSAT vs. MiniSAT++ (AIG) Total time: NFLSAT( sec), MiniSAT++ ( sec) Minisat++ solves 14 more problems

29 Summary Boolean Circuit Negation Normal Form vpgraphhpgraph Clause Database BCP engine Conflicts, Implied Literals Decisions Top-level DPLL Algorithm 1.Other features of modern SAT solvers 2. No pre-processing so far (circuit rewriting applicable) Linear time conversion

30 Questions