Title: A reminder: our Goal
1A reminder our Goal
1. Based on BDDs - Verifying implementations that
contain black boxes.
2. Prove that the represented algorithm is more
powerful than straightforward BDD verification
2The characteristic function definition
- consider the following definition from the group
theory - a characteristic function of a set S returns
True (1) if its argument is an element in the set
S, and False otherwise.
- True S ? x
- False otherwise
? S
3The characteristic functiondefinition (cont.)
For a Boolean function f Bn ? Bm,
The characteristic function ? f Bnm ? B
Is defined as
? f(x,y)1 ? f(x)y ?x?Bn, y?Bm
4The characteristic functiondefinition (cont.)
- Meaning The characteristic function ? f returns
True (1) if its argument (in this case we are
talking of a bit vector of size mn) is an
element in the set Sf (in this case the set Sf
contains bit vectors of size nm that satisfy the
function f), and false otherwise.
- True Sf ? x
- False otherwise
? f
5The characteristic functiondefinition - Example
x1
x2
y1 x1 AND x2 y2 ?x2
y2
y1
Sf (0,0,0,1) , (0,1,0,0) , (1,0,0,1) ,
(1,1,1,0)
Question is (0,1,1,1) ? Sf ?
Answer No! -gt ?f 0
6Computing the characteristic function
- Using BDDs, ?f can be computed
- using the following equation
Meaning the characteristic function will be
computed For every output separately using BDD
techniques.
7Computing the characteristic function - Example
x2
x1
y1 x1 AND x2 y2 ?x2
y2
y1
BDD of the characteristic function for output y2
BDD of the characteristic function for output y1
And
8Computing the characteristic function - Example
BDD of the characteristic function for the
circuit
9Back to the algorithm - Characteristic function
expansion
In the case of design containing black boxes we
will consider the outputs of the black boxes as
additional inputs. f Bnl ? Bm (l is the
number of the outputs of the BB)
10Computing the characteristic function of the
surrounding circuit
Example
z1
z2
z3
z4
z5
11the characteristic function of the surrounding
circuit
Now we will expand the previous characteristic
function definition The characteristic function
? f returns True (1) if its argument (in this
case we are talking of a bit vector of size
mn) is an element in the set Sf (in this case
the set Sf contains bit vectors of size nml
that satisfy the function f), and false
otherwise.
? G(x,y,z)1 ? fG(x,z)y
12Computing the characteristic function of the
surrounding circuit Example
x1
x2
y1 x1 AND x2 y2 ?x2
b.b.
z
y2
y1
Sf (0,0,b,b,1) , (0,1,b,b,0) , (1,0,b,b,1) ,
(1,1,b,b,0)
Question is (0,0,0,0) ? Sf ?z?
Answer No! -gt ?f 0
Question is (1,1,1,0) ? Sf ?z?
Answer Yes! -gt ?f 1
13Verification in the Presence of Black Boxes -
Example
Specification requirements y1x1 ? y2x2
143 steps algorithm
- STEP 1 Computing the characteristic function of
the Specification
BDDspec
x1, x2, xn ?y1
f
x1, x2, xn ?y2
x1, x2, xn ?y3
15Computing the characteristic function of the
Specification - Example
163 steps algorithm
- STEP 2 Computing the characteristic function of
the surrounding circuit G
BDDG
x1, x2, xn, z1 zm ?y1
f
x1, x2, xn, z1 zm ?y2
x1, x2, xn, z1 zm ?y3
17Computing the characteristic function of the
surrounding - Example
x2
x1
1
Black Box
z
y1
y2
183 steps algorithm
The Final Step (3)
If BDDs follows ?z ?spec(x,y) ?
?G(x,y,z) Report an Error!!!
Meaning if there is an input assignment x?Bn
for which the original circuit and the faulty
one have at least one different output value,
Independent of the implementation of the black
box we have an error and it will be detected
by the characteristic function.
19The final step - Example
For x1x2y1y21
?z ?spec(x,y) ? ?G(x,y,z)
BDD Spec
BDD Impl