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

About This Presentation
Title:

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

Description:

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

Number of Views:118
Avg rating:3.0/5.0
Slides: 32
Provided by: csCmuEduh7
Learn more at: http://www.cs.cmu.edu
Category:

less

Transcript and Presenter's Notes

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


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
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-processing techniques
  • To reduce variables and clauses in CNF
  • But pre-processing has large memory requirements

5
Our SAT solving framework
Boolean Circuit
Fewer variables than CNF and more structure
Negation Normal Form
hpgraph
vpgraph
6
Negation Normal Form (NNF)
?
?
?
?
?
?
?
?y
a
b
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
How to obtain NNF from Boolean Circuits
out
Circuit from converted to NNF by introducing one
new variable y to 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
Our SAT solving framework
Boolean Circuit
?
Negation Normal Form
Peter Andrews Horizontal/Vertical Path Forms
(1981)
hpgraph
vpgraph
11
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
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
Meaning of BCP on hpgraph
Assignment ?1 r1,p1
?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
  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)

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
A cut is acceptable if no literal appearing in it
is false
?p
p q
L
R
  • Cut 2 is
  • not acceptable for
  • p1
  • Cut 1 is
  • acceptable for
  • p1

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
? s1
?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
? p1,q1
?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 ? p1 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 ?r and ?q are
implied literals.
25
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
NFLSAT solves 29 more problems
ygtx on 306 points
xgty on 2018 points
Total time NFLSAT( 136000 sec), Precosat (193400
sec)
28
NFLSAT vs. Glucose
NFLSAT solves 58 more problems
ygtx on 895 points
xgty 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
Write a Comment
User Comments (0)
About PowerShow.com