KFDDs or Kronecker Functional Decision Diagrams and their use in

Davio Gates and
Kronecker Decision
Diagrams
Lecture 5
Rolf Drechlser’s slides used
Absolutely Minimum Background on Binary
Decision Diagrams (BDD) and Kronecker
Functional Decision Diagrams
• BDDs are based on recursive Shannon expansion
F = x Fx + x’ Fx’
• Compact data structure for Boolean logic
– can represents sets of objects (states) encoded as Boolean
functions
• Canonical representation
– reduced ordered BDDs (ROBDD) are canonical
– essential for simulation, analysis, synthesis and verification
BDD Construction
• Typically done using APPLY operator
• Reduction rules
– remove duplicate terminals
– merge duplicate nodes
(isomorphic subgraphs)
– remove redundant nodes
a
b
f
f
b
f
b
• Redundant nodes:
– nodes with identical children
a
b
c
0
1
0
1
BDD Construction – your first BDD
• Construction of a Reduced Ordered BDD
a b c
f
0
0
0
0
1
1
1
1
0
0
0
1
0
1
0
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
Truth table
1 edge
0 edge
f
f = ac + bc
a
b
b
c
0
c
0
0
c
1
0
c
1
Decision tree
0
1
BDD Construction – cont’d
f
f
a
a
b
b
c
c
0
f = (a+b)c
c
c
1
1. Remove
duplicate terminals
a
b
b
c
c
0
1
2. Merge
duplicate nodes
b
c
0
1
3. Remove
redundant nodes
Decomposition types
Decomposition types are associated to the variables
in Xn with the help of a decomposition type list
(DTL) d:=(d1,…,dn) where di { S, pD, nD}
KFDD
• Definition
Three different reductions types
Type I :
f
g
xi
xi
Each node in a DD is a candidate for the application
f
g
xi
Three different reductions types (cont’d)
Type S
xi
xj
xj
f
g
f
g
Three different reductions types (cont’d)
Type D
xi
0
This is
used in
functional
diagrams
such as
KFDDs
xj
xj
f
g
f
g
Example for OKFDD
1
x1
F= x1 x2 x4  x1 x2 x3  x1 x3  x1 x2 x4
Example for OKFDD (cont’d)
This diagram below explains the expansions from
previous slide
x1 x2 x4   x1 x2 x4  x2 x3  x3 
X1 S-node
0  x2 x4  x3   x2 x3  x4 
X2 pD-node
0  x3 1
x4   x3 1
X3 nD-node
Example for OKFDD’s with
different DTL’s
You can
save a lot of
nodes by a
good DTL
Complement
Edges
They can be
applied for
S-nodes
They can be
applied for
D-nodes
This is a powerful
idea in more
advanced diagrams
– any operator on
representation
XOR-operation
•D-node
•S-node
Such recursive
operations are a base
of diagram creation
and operation
AND-operation
Such recursive
operations are a base
of diagram creation
and operation
Restriction of Variables for S
nodes is trivial
Xi=0
xi
f
Xi=1
S-node
g
f
Cofactor for Xi=0
g
Cofactor for Xi=1
Restriction of Variables for D nodes
is more complex, requires XORing
Xi=0
pD-node
xi
f
Xi=1
g
f g
f
Please
remember this
Restriction of Variables (cond’t)
Xi=1
nD-node
xi
f
Xi=0
g
f
f g
Optimization of OKFDD-Size
• Exchange of Neighboring Variables
• DTL Sifting
Experimental Results
Experimental Results (cont’d)
DIY PROBLEM
• Use simulated annealing algorithm for choice of a better
variable ordering of the OKFDD
Simple solution
•Solution space
X1 X2 X3 X4
X3 X4 X1 X2
A solution
A solution
•Neighborhood structure
X1 X2 X3 X4
X1 X3 X2 X4
change
End of Lecture 5