1 / 31

Efficient SAT Solving for Non-clausal Formulas using DPLL, Graphs, and Watched-cuts

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. output.

mihaly
Download Presentation

Efficient SAT Solving for Non-clausal Formulas using DPLL, Graphs, and Watched-cuts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Agenda • Motivation • Existing SAT solvers • Our approach • Negation Normal Form (NNF) • Graphs to represent NNF • Boolean Constraint Propagation (BCP) • Experimental Results

  3. output       a b b a b a Boolean Satisfiability • 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 Circuit

  4. 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 103-104 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-processingtechniques • To reduce #variables and #clauses in CNF • But pre-processing has large memory requirements

  5. DPLL algorithm Our SAT solving framework Boolean Circuit Fewer variables than CNF and more structure Negation Normal Form hpgraph vpgraph

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

  7.         a b y y a b    y y  b a b a b a b a b a How to obtain NNF from Boolean Circuits out Circuit from converted to NNF by introducing one new variableyto remove sharing out’ out  Boolean Circuit  NNF

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

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

  10. DPLL algorithm Our SAT solving framework Boolean Circuit  Negation Normal Form Peter Andrew’s Horizontal/Vertical Path Forms (1981) hpgraph vpgraph

  11. hpgraph(2) hpgraph(1) hpgraph(2) hpgraph(1) L1 L1 L2 L2 R1 R1 R2 R2 = 12 Take graph union = 12 Add hyperedge from L1 to R2 Inductively creating hpgraph() from NNF formula  m is a literal m Create new node

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

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

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

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

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

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

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

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

  20. Our algorithm generalizes CNF watched literal scheme An hpgraph Special hpgraph (CNF)

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

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

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

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

  25. vpgraph component 1 2 3 p q p R R R r s r 5 4 6 q q L L 7 8 Finding and Maintaining Minimal Cuts hpgraph component 1 2 3 p p q L R 4 5 6 r s r R L q q R L 7 8 minimal cut in hpgraph component = a path in vpgraph component

  26. 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

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

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

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

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

  31. Questions

More Related