Download presentation
Presentation is loading. Please wait.
1
Formal Methods in software development
a.y.2016/2017 Prof. Anna Labella 2/23/2019
2
OBDD [H-R cap.6] Representing boolean functions
A formula can be represented by a boolean function, where its variables are boolean variables, as in circuits. 2/23/2019
3
OBDD [H-R cap.6] 2/23/2019
4
Exercises 2/23/2019
5
Binary decision trees 2/23/2019
6
Exercises 2/23/2019
7
Exercises 2/23/2019
8
BDD Removal of duplicated terminals Removal of redundant tests
(they are nomore trees) 2/23/2019
9
BDD Removal of duplicated non terminals 2/23/2019
10
BDD Eliminate duplicated terminals Eliminate redundant tests
Eliminate duplicated non terminals 2/23/2019
11
BDD: how do we introduce operations? Composing BDD
constants variables ☐ 1 2/23/2019
12
BDD: sums and products We can substitute terminals by non terminals and compose functions e.g. In the conjunction we substitute 1 by the BDD of the other function In the disjunction we substitute 0 by the BDD of the other function In the negation we swap 1 and 0 2/23/2019
13
Exercises Let f be represented by describe 2/23/2019
14
BDD Satisfiability: to reach 1 via a coherent path
Validity: it is not possible to reach 0 via a coherent path 2/23/2019
15
OBDD: ordered binary decision diagrams
Equivalence? 2/23/2019
16
OBDD Normal form: order and then reduce
Theorem. We have a unique result Hence there is a canonical form 2/23/2019
17
OBDD An example: the parity function on 4 variables Repeated variables
2/23/2019 Repeated variables
18
OBDD 2/23/2019 order without repetitions
19
OBDD 2/23/2019
20
OBDD Composition is nomore directly allowed
Absence of redundant variables Test for semanic equivalence with a compatible ordering Test for validity (reducibility to B1) Test for implication (reducibility of f. g to B0) Test for satisfiability (non reducibility to B0) 2/23/2019
21
Exercises 2/23/2019
22
OBDD: the algorithm reduce
It identifies equal nodes going bottom up 2/23/2019
23
OBDD: the algorithm apply
It exploits operations 2/23/2019
24
OBDD: the algorithm apply
Shannon expansion theorem ƒ = x ƒ[0/x] + x ƒ[1/x] In general form ƒ op g = xi ( ƒ[0/xi] op g[0/xi] + xi ( ƒ[1/xi] op g[1/xi]) 2/23/2019
25
OBDD: the algorithm apply
2/23/2019
26
OBDD: the control structure for the algorithm apply
2/23/2019
27
OBDD: the algorithm apply
2/23/2019
28
OBDD: the algorithm restrict
restrictig f to f[0/x] and to f[1/x] restrict(0, x, Bf) works as follows: For each node n labeled 2/23/2019
29
OBDD: restrict exercise
2/23/2019
30
OBDD: the algorithm exists
f = f[0/x] + f[1/x] f = f[0/x] . f[1/x] 2/23/2019
31
OBDD: the algorithm exists exercise
2/23/2019
32
OBDD: the algorithm exists exercise
2/23/2019
33
2/23/2019
34
Complexity 2/23/2019
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.