Unit-11: Binary Decision Diagrams (BDDs) B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015 1 / 24
Module 1: Introduction to BDDs 2 / 24
Model-checking Transition Systems + Properties + NuSMV State-space Büchi LTL CTL Automata Automata explosion properties properties Unit: 4 Unit: 5,6 Unit: 7,8 Unit: 9 Unit: 10 3 / 24
In this unit: An efficient data structure for representing transition systems ◮ Module 1: Introduction to the data structure: Binary Decision Diagrams (BDDs) ◮ Module 2: Operations on BDDs ◮ Module 3: Using BDDs in the model-checking process 4 / 24
In this unit: An efficient data structure for representing transition systems ◮ Module 1: Introduction to the data structure: Binary Decision Diagrams (BDDs) ◮ Module 2: Operations on BDDs ◮ Module 3: Using BDDs in the model-checking process Reference: Logic in Computer Science, 2 nd edition, by Huth and Ryan , Section 6.1 - 6.3 4 / 24
Boolean functions 5 / 24
x , y : Boolean variables 6 / 24
x , y : Boolean variables f ( x , y ) = x + y Boolean function 6 / 24
x , y : Boolean variables f ( x , y ) = x + y Boolean function 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 6 / 24
x , y : Boolean variables f ( x , y ) = x + y Boolean function 0 + 0 = 0 Logical OR 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 6 / 24
x , y : Boolean variables f ( x , y ) = x + y Boolean function 0 + 0 = 0 Logical OR 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 y x f ( x , y ) 0 0 0 0 1 1 Truth table 1 0 1 1 1 1 6 / 24
x , y : Boolean variables 7 / 24
x , y : Boolean variables f ( x , y ) = x · y Boolean function 7 / 24
x , y : Boolean variables f ( x , y ) = x · y Boolean function 0 · 0 = 0 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 7 / 24
x , y : Boolean variables f ( x , y ) = x · y Boolean function 0 · 0 = 0 Logical AND 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 7 / 24
x , y : Boolean variables f ( x , y ) = x · y Boolean function 0 · 0 = 0 Logical AND 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 y x f ( x , y ) 0 0 0 0 1 0 Truth table 1 0 0 1 1 1 7 / 24
x : Boolean variable 8 / 24
x : Boolean variable f ( x ) = x Boolean function 8 / 24
x : Boolean variable f ( x ) = x Boolean function 0 = 1 1 = 0 8 / 24
x : Boolean variable f ( x ) = x Boolean function 0 = 1 Logical NOT 1 = 0 8 / 24
x : Boolean variable f ( x ) = x Boolean function 0 = 1 Logical NOT 1 = 0 x f ( x ) 0 1 Truth table 1 0 8 / 24
x 1 , x 2 ,..., x n : Boolean variables f : { x 1 , x 2 ,..., x n } �→ { 0,1 } Boolean function · Boolean operations + 9 / 24
x 1 , x 2 ,..., x n : Boolean variables f : { x 1 , x 2 ,..., x n } �→ { 0,1 } Boolean function · Boolean operations + Examples: f 1 ( x , y ) = x + y , f 2 ( x , y , z ) = x · y + y · z , f 3 ( x , y , z ) = x + y · z 9 / 24
Representing boolean functions 10 / 24
f ( x , y , z ) = x · y + y · z y x z f 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 Truth table 11 / 24
f ( x , y , z ) = x · y + y · z y x z f x 0 0 0 0 0 0 1 1 y y 0 1 0 0 0 1 1 0 z z z z 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 Truth table 11 / 24
f ( x , y , z ) = x · y + y · z y x z f x 0 0 0 0 0 0 1 1 y y 0 1 0 0 0 1 1 0 z z z z 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 Binary Decision Tree Truth table 11 / 24
Operations on truth tables 12 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y x z f 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 1 13 / 24
g ( x , y , z ) = f ( x , y , z ) = x · y + y · z y y g x z f x z 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 1 0 13 / 24
y x z f f ( x , y , z ) = x · y + y · z 0 0 0 0 0 0 1 1 g ( x , y , z ) = x · y 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 y g x z 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 14 / 24
y x z f f ( x , y , z ) = x · y + y · z 0 0 0 0 0 0 1 1 g ( x , y , z ) = x · y 0 1 0 0 0 1 1 0 h ( x , y , z ) = f ( x , y , z ) + g ( x , y , z ) 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 y g x z 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 14 / 24
y x z f f ( x , y , z ) = x · y + y · z 0 0 0 0 0 0 1 1 g ( x , y , z ) = x · y 0 1 0 0 0 1 1 0 h ( x , y , z ) = f ( x , y , z ) + g ( x , y , z ) 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 y x z 0 0 0 0 0 1 0 1 0 y g x z 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 14 / 24
y x z f f ( x , y , z ) = x · y + y · z 0 0 0 0 0 0 1 1 g ( x , y , z ) = x · y 0 1 0 0 0 1 1 0 h ( x , y , z ) = f ( x , y , z ) + g ( x , y , z ) 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 y x z h 0 0 0 0 0 1 0 1 0 y g x z 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 14 / 24
y x z f f ( x , y , z ) = x · y + y · z 0 0 0 0 0 0 1 1 g ( x , y , z ) = x · y 0 1 0 0 0 1 1 0 h ( x , y , z ) = f ( x , y , z ) + g ( x , y , z ) 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 y x z h 0 0 0 1 0 0 1 0 1 0 y g x z 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 14 / 24
y x z f f ( x , y , z ) = x · y + y · z 0 0 0 0 0 0 1 1 g ( x , y , z ) = x · y 0 1 0 0 0 1 1 0 h ( x , y , z ) = f ( x , y , z ) + g ( x , y , z ) 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 y x z h 0 0 0 1 0 0 1 1 0 1 0 y g x z 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 14 / 24
y x z f f ( x , y , z ) = x · y + y · z 0 0 0 0 0 0 1 1 g ( x , y , z ) = x · y 0 1 0 0 0 1 1 0 h ( x , y , z ) = f ( x , y , z ) + g ( x , y , z ) 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 y x z h 0 0 0 1 0 0 1 1 0 1 0 0 y g x z 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 14 / 24
y x z f f ( x , y , z ) = x · y + y · z 0 0 0 0 0 0 1 1 g ( x , y , z ) = x · y 0 1 0 0 0 1 1 0 h ( x , y , z ) = f ( x , y , z ) + g ( x , y , z ) 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 y x z h 0 0 0 1 0 0 1 1 0 1 0 0 y g x z 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 14 / 24
Recommend
More recommend