Download presentation
Presentation is loading. Please wait.
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 1
3
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 aa bb aa b output
4
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 10 3 -10 4 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
5
4 Our SAT solving framework Boolean Circuit hpgraphvpgraph Negation Normal Form Fewer variables than CNF and more structure DPLL algorithm
6
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 aa bb aa b yy yy aby
7
6 How to obtain NNF from Boolean Circuits ab aa bb aa b yy yy aby ab aa bb aa b Circuit from converted to NNF by introducing one new variable y to remove sharing Boolean Circuit NNF out out’
8
7 Why NNF: Number of variables CNF without pre-processing has 5-10X more variables
9
8 Why NNF: Number of variables 1705 points 428 points Note no pre-processing for NNF
10
9 Our SAT solving framework Boolean Circuit hpgraphvpgraph Negation Normal Form Peter Andrew’s Horizontal/Vertical Path Forms (1981) DPLL algorithm
11
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
12
11 p q r s rr pp Example Formula F: (((p q) r q) ( p (r s) q)) qq 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
13
12 Example Formula F: (((p q) r q) ( p (r s) q)) p q rr qq q pp 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
14
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
15
14 DPLL on hpgraph hpgraph Boolean Constraint Propagation (BCP) engine Decisions Top-level DPLL Algorithm Conflicts, Implied Literals
16
15 pp rr Meaning of BCP on hpgraph p q r s qq q Conflict clause: r p R L Assignment 1 :={r=1,p=1} horizontal path = clause qq p q r s rr pp q Unit clause: q r s Implied literal: r R L Assignment 2 :={q=1,s=1} A horizontal path
17
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 rr pp qq q R R R L L L Hpgraph Horizontal path = clause
18
17 Two Watched Cut Scheme Hpgraph p q r s rr pp qq 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
19
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
20
19 Our algorithm generalizes CNF watched literal scheme An hpgraphSpecial hpgraph (CNF)
21
20 Acceptable cut p q r s rr pp qq 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
22
21 BCP Case 1: Both cuts are acceptable and disjoint Hpgraph component p q r s rr pp qq 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
23
22 BCP Case 2 (conflict): No acceptable cut Hpgraph component p q r s rr pp qq 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
24
23 BCP Case 3 (Implications): Acceptable cuts but not disjoint Hpgraph component p q r s rr pp qq 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.
25
24 Finding and Maintaining Minimal Cuts p q r s rr pp qq q R R R L L L minimal cut in hpgraph component = a path in vpgraph component 123 4 56 78 hpgraph component p q rr qq q pp r s RR R LL 123 4 5 6 78 vpgraph component
26
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
27
26 NFLSAT vs. Precosat NFLSAT solves 29 more problems x>y on 2018 points y>x on 306 points Total time: NFLSAT( 136000 sec), Precosat (193400 sec)
28
27 NFLSAT vs. Glucose NFLSAT solves 58 more problems y>x on 895 points x>y on 1382 points Total time: NFLSAT( 136000 sec), Glucose (185000 sec)
29
28 NFLSAT vs. MiniSAT++ (AIG) Total time: NFLSAT( 105785 sec), MiniSAT++ (103257 sec) Minisat++ solves 14 more problems
30
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
31
30 Questions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.