Formal Equivalence Checking - II: Virendra Singh
Formal Equivalence Checking - II: Virendra Singh
Checking - II
Virendra Singh
Associate Professor
Computer Architecture and Dependable Systems Lab
Dept. of Electrical Engineering
Indian Institute of Technology Bombay, Mumbai
[email protected]
Example OBDD
Initial Graph
Reduced Graph
x1
x1
x2
x3
0
x2
x2
x3
x3
1
x3
x3
1
(x1+x2) x3
EE-709@IITB
a1
b1
a2
a2
a3
a2
a3
a3
b2
b1 b1 b1 b1
a3
b2 b2
b3
b3
1
Linear Growth
Jan 18, 2012
a3
Exponential Growth
EE-709@IITB
Best
Worst
Ordering Sensitivity
ALU (Add/Sub)
linear
exponential
High
Symmetric
linear
quadratic
None
Multiplication
exponential
exponential
Low
General Experience
Many tasks have reasonable OBDD
representations
Algorithms remain practical for up to 500,000
node OBDDs
Heuristic ordering methods generally satisfactory
Jan 18, 2012
EE-709@IITB
Good News
Many functions/tasks have reasonable size ROBDDs
Algorithms remain practical up to 500,000 node OBDDs
Heuristic ordering methods generally satisfactory
EE-709@IITB
EE-709@IITB
EE-709@IITB
OP
X
BDD for
f1|x=0
BDD for
f1|x=1
X
BDD for
f2|x=0
EE-709@IITB
BDD for
f2|x=1
OP
BDD for
f1|x=0
BDD for
f1|x=1
BDD for
f2|x=0
BDD for
f2|x=1
X
BDD for
f1|x=0 OP f2|x=0
Jan 18, 2012
BDD for
f1|x=1 OP f2|x=1
EE-709@IITB
10
X1
BDD for
f1|x1=0 OP f2
Jan 18, 2012
BDD for
f1|x1=1 OP f2
EE-709@IITB
11
BDD for
f2|x1=0 OP f2
BDD for
f2|x1=0 OP f2
BDD for
f1|x1=1 OP f2
f2=X2
EE-709@IITB
12
=
OP
f1=X1XOR X2
BDD for
f2|x1=0 OP f2
BDD for
f1|x1=1 OP f2
f2=X2
EE-709@IITB
13
EE-709@IITB
14
G2
G4
G1
X2
G3
X1
0
X2
0
X1
X1
X2
X2
EE-709@IITB
X1
0
X2
X1
X2
1
1 1
X2
15
EE-709@IITB
16
A
B
C
A
C
B
0
1
1
0
1 T3
1
Diff
0
T1
1
1
O2
0
O1
T2
Challenge
Must prove all assignments fail
Co-NP complete problem
Typically explore significant
fraction of inputs
Exponential time complexity
Jan 18, 2012
EE-709@IITB
17
A set of variables, V
(a,b,c)
Conjunction of clauses
(C1,C2,C3)
Each clause: disjunction of literals over V
Does there exist an assignment of Boolean values to the
variables, V which sets at least one literal in each clause
to 1 ?
Example : ( a b c )( a c )( a b c )
C1
Jan 18, 2012
C2
EE-709@IITB
a=b=c=1
C3
18
( a b )( a c )( a b )
C1
C2
C3
CONFLICT!
EE-709@IITB
1 0
1
c
SAT!
C1
C3 C2
19
(a b c)
=
=
c=1
0 0
a ( a c )( b c )( a b c )( c e )( d e )( c d e )
c ( b c )( c e )( d e )( c d e )
e( d e )
Jan 18, 2012
EE-709@IITB
20
useless
clauses (e.g. inactive or
large clauses)
Efficient BCP
Search Restarts
SAT
Solver
To
algorithm
periodically
Efficient garbage
collection
Retain
some/all
recorded clauses
Conflict-driven
learning
Jan 18, 2012
EE-709@IITB
21
x1
Non-chronological backtracking
Conflict-clause recording
x2
xj
SAT
xk-1
xk
EE-709@IITB
22
Variable ordering
Significantly impacts size of search tree
Ordering schemes can be static or
dymamic
Conventional wisdom (pre-chaff):
Satisfy most number of clauses OR
Maximize BCP
e.g. DLIS, MOMs, BOHMs etc.
Jan 18, 2012
EE-709@IITB
23
EE-709@IITB
24
x1 w1
Jan 18, 2012
EE-709@IITB
w2 xk
25
Tool offerings:
Public domain
Commercial
PROVER: Prover Technologies
EE-709@IITB
26
Thank you
EE-709@IITB
27