© 2011 Carnegie Mellon University Binary Decision Diagrams Part 1 15-414 Bug Catching: Automated Program Verification and Testing Sagar Chaki September.

Slides:



Advertisements
Similar presentations
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Advertisements

Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
BDDs & Theorem Proving Binary Decision Diagrams Dr. Eng. Amr T. Abdel-Hamid NETW 703 Winter 2012 Network Protocols Lectures are based on slides by: K.
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
© 2011 Carnegie Mellon University SPIN: Part /614 Bug Catching: Automated Program Verification Sagar Chaki April 21, 2014.
© 2011 Carnegie Mellon University SPIN: Part /614 Bug Catching: Automated Program Verification Sagar Chaki April 21, 2014.
© 2010 Carnegie Mellon University B OXES : A Symbolic Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki Software Engineering Institute Carnegie Mellon.
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
© 2012 Carnegie Mellon University UFO: Verification with Interpolants and Abstract Interpretation Arie Gurfinkel and Sagar Chaki Software Engineering Institute.
1 Don´t Care Minimization of *BMDs: Complexity and Algorithms Christoph Scholl Marc Herbstritt Bernd Becker Institute of Computer Science Albert-Ludwigs-University.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt.
Class Presentation on Binary Moment Diagrams by Krishna Chillara Base Paper: “Verification of Arithmetic Circuits using Binary Moment Diagrams” by.
© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September.
© 2011 Carnegie Mellon University SPIN: Part Bug Catching: Automated Program Verification and Testing Sagar Chaki November 2, 2011.
© 2011 Carnegie Mellon University SPIN: Part Bug Catching: Automated Program Verification and Testing Sagar Chaki October 31, 2011.
ECE 667 Synthesis & Verification - Boolean Functions 1 ECE 667 Spring 2013 ECE 667 Spring 2013 Synthesis and Verification of Digital Circuits Boolean Functions.
Binary Decision Diagrams. ROBDDs Slide 2 Example Directed acyclic graph non-terminal node terminal node What function is represented by the graph?
Spring 07, Feb 13 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2007 Binary Decision Diagrams Vishwani D. Agrawal James.
3/25  Monday 3/31 st 11:30AM BYENG 210 Talk by Dana Nau Planning for Interactions among Autonomous Agents.
DATE-2002TED1 Taylor Expansion Diagrams: A Compact Canonical Representation for Symbolic Verification M. Ciesielski, P. Kalla, Z. Zeng B. Rouzeyre Electrical.
ECE Synthesis & Verification - Lecture 18 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Word-level.
Boolean Functions and their Representations
Rolf Drechlser’s slides used
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 16, 2003.
Taylor Expansion Diagrams (TED): Verification EC667: Synthesis and Verification of Digital Systems Spring 2011 Presented by: Sudhan.
ECE Synthesis & Verification - Lecture 10 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Binary.
 2001 CiesielskiBDD Tutorial1 Decision Diagrams Maciej Ciesielski Electrical & Computer Engineering University of Massachusetts, Amherst, USA
ECE 667 Synthesis & Verification - BDD 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Binary Decision Diagrams (BDD)
ENGG3190 Logic Synthesis “Binary Decision Diagrams” BDDs Winter 2014 S. Areibi School of Engineering University of Guelph.
IT University of Copenhagen Lecture 8: Binary Decision Diagrams 1. Classical Boolean expression representations 2. If-then-else Normal Form (INF) 3. Binary.
By Tariq Bashir Ahmad Taylor Expansion Diagrams (TED) Adapted from the paper M. Ciesielski, P. Kalla, Z. Zeng, B. Rouzeyre,”Taylor Expansion Diagrams:
Logic Decomposition ECE1769 Jianwen Zhu (Courtesy Dennis Wu)
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: BDD BDDs applied in equivalence checking.
Athens 2004 Symposium on Innovation of Computer Science Curriculum in Higher Education Athens 2004 Decision Diagrams: Principles of Programming Dragan.
B. Alizadeh Advanced Logic Design (2008) 1 / 55 Decision Diagrams.
Identifying Reversible Functions From an ROBDD Adam MacDonald.
Truth Table-Based Testing Generating test cases when the test model is a truth table Reading: Binder Chapter 6.
Binary Decision Diagrams (BDDs)
Binary decision diagrams for computing the non-dominated set July 13, 2015 Antti Toppila and Ahti Salo 27th European Conference on Operational Research,
November,2000University of Southern California1 Introduction to Binary Decision Diagrams - Shesha Shayee K. Raghunathan.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Lecture 22 More NPC problems
CS 267: Automated Verification Lecture 6: Binary Decision Diagrams Instructor: Tevfik Bultan.
Algorithmic Software Verification V &VI. Binary decision diagrams.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
CS6133 Software Specification and Verification
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Verifying Programs with BDDs Topics Representing Boolean functions with Binary Decision Diagrams Application to program verification class-bdd.ppt
Foundation of Computing Systems
Binary decision diagrams (BDD’s) Compact representation of a logic function ROBDD’s (reduced ordered BDD’s) are a canonical representation: equivalence.
2017/4/26 Rethinking Packet Classification for Global Network View of Software-Defined Networking Author: Takeru Inoue, Toru Mano, Kimihiro Mizutani, Shin-ichi.
BDDs1 Binary Tree Representation The recursive Shannon expansion corresponds to a binary tree Example: Each path from the root to a leaf corresponds to.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462.
IT 60101: Lecture #121 Foundation of Computing Systems Lecture 13 Trees: Part VIII.
ECE 667 Synthesis and Verification of Digital Systems
SS 2017 Software Verification CTL model checking, BDDs
NP-Completeness Proofs
Binary Decision Diagrams
Automatic Verification of Industrial Designs
Formal Methods in software development
Formal Methods in software development
Discrete Controller Synthesis
A logic function f in n inputs x1, x2, ...xn and
Example: Verification
A logic function f in n inputs x1, x2, ...xn and
Verifying Programs with BDDs Sept. 22, 2006
Boolean Algebra for CAD Applications
Presentation transcript:

© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September 12, 2011

2 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University BDDs in a nutshell Typically mean Reduced Ordered Binary Decision Diagrams (ROBDDs) Canonical representation of Boolean formulas Often substantially more compact than a traditional normal form Can be manipulated very efficiently Conjunction, Disjunction, Negation, Existential Quantification R. E. Bryant. Graph-based algorithms for boolean function manipulation. IEEE Transactions on Computers, C-35(8), 1986.

3 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Running Example: Comparator Comparator a1a1 a2a2 b1b1 b2b2 f = 1, a 1 = b 1 Æ a 2 = b 2

4 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Conjunctive Normal Form ( : a 1 Ç b 1 ) Æ ( : b 1 Ç a 1 ) Æ ( : a 2 Ç b 2 ) Æ ( : b 2 Ç a 2 ) a 1 = b 1 Æ a 2 = b 2 a 1 ) b 1 Æ b 1 ) a 1 Æ a 2 ) b 2 Æ b 2 ) a 2 ( : b 1 Ç a 1 ) Æ ( : a 1 Ç b 1 ) Æ ( : a 2 Ç b 2 ) Æ ( : b 2 Ç a 2 ) Not Canonical f

5 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Truth Table (1) a1a1 b1b1 a2a2 b2b2 f Still Not Canonical

6 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Truth Table (2) a1a1 a2a2 b1b1 b2b2 f Canonical if you fix variable order. But always exponential in # of variables. Let’s try to fix this.

7 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Representing a Truth Table using a Graph a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b a2a2 a2a2 b2b2 b2b b2b2 b2b Binary Decision Tree (in this case ordered)

8 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Binary Decision Tree: Formal Definition Balanced binary tree. Length of each path = # of variables Leaf nodes labeled with either 0 or 1 Internal node v labeled with a Boolean variable var(v) Every node on a path labeled with a different variable Internal node v has two children: low(v) and high(v) Each path corresponds to a (partial) truth assignment to variables Assign 0 to var(v) if low(v) is in the path, and 1 if high(v) is in the path Value of a leaf is determined by: Constructing the truth assignment for the path leading to it from the root Looking up the truth table with this truth assignment

9 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Binary Decision Tree a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b a2a2 a2a2 b2b2 b2b b2b2 b2b v low(v) high(v) var(v) = a 1

10 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Binary Decision Tree a1a1 b1b1 a2a2 b2b The truth assignment corresponding to the path to this leaf is: a 1 = ? b 1 = ? a 2 = ? b 2 = ?

11 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Binary Decision Tree a1a1 b1b1 a2a2 b2b The truth assignment corresponding to the path to this leaf is: a 1 = 0 b 1 = 0 a 2 = 1 b 2 = 0 a1a1 b1b1 a2a2 b2b2 f

12 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Binary Decision Tree a1a1 b1b1 a2a2 b2b The truth assignment corresponding to the path to this leaf is: a 1 = 0 b 1 = 0 a 2 = 1 b 2 = 0 a1a1 b1b1 a2a2 b2b2 f

13 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Binary Decision Tree a1a1 b1b1 a2a2 b2b The truth assignment corresponding to the path to this leaf is: a 1 = 0 b 1 = 0 a 2 = 1 b 2 = 0 a1a1 b1b1 a2a2 b2b2 f

14 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Binary Decision Tree (BDT) a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b a2a2 a2a2 b2b2 b2b b2b2 b2b Canonical if you fix variable order (i.e., use ordered BDT) But still exponential in # of variables. Let’s try to fix this.

15 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Reduced Ordered BDD Conceptually, a ROBDD is obtained from an ordered BDT (OBDT) by eliminating redundant sub-diagrams and nodes Start with OBDT and repeatedly apply the following two operations as long as possible: 1.Eliminate duplicate sub-diagrams. Keep a single copy. Redirect edges into the eliminated duplicates into this single copy. 2.Eliminate redundant nodes. Whenever low(v) = high(v), remove v and redirect edges into v to low(v). Why does this terminate? ROBDD is often exponentially smaller than the corresponding OBDT

16 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b a2a2 a2a2 b2b2 b2b b2b2 b2b2 1001

17 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b a2a2 a2a2 b2b2 b2b b2b2 b2b Duplicate sub- diagram

18 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b2 000 a2a2 a2a2 b2b2 b2b b2b2 b2b2 1001

19 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b2 000 a2a2 a2a2 b2b2 b2b b2b2 b2b2 1001

20 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b2 00 a2a2 a2a2 b2b2 b2b b2b2 b2b2 1001

21 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b2 00 a2a2 a2a2 b2b2 b2b b2b2 b2b2 1001

22 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b b2b2 b2b2 0 a2a2 a2a2 b2b2 b2b b2b2 b2b2 1001

23 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b2 1 b2b2 b2b2 0 a2a2 a2a2 b2b2 b2b2 b2b2 b2b2

24 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b2 1 b2b2 b2b2 0 a2a2 a2a2 b2b2 b2b2 b2b2 b2b2 Redundant node

25 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b2 1 b2b2 0 a2a2 a2a2 b2b2 b2b2 b2b2 b2b2

26 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b2 1 b2b2 0 a2a2 a2a2 b2b2 b2b2 b2b2 b2b2

27 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b2 10 a2a2 a2a2 b2b2 b2b2 b2b2 b2b2

28 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 a2a2 b2b2 b2b2 10 a2a2 a2a2 b2b2 b2b2 b2b2 b2b2

29 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 b2b2 b2b2 10 a2a2 a2a2 b2b2 b2b2 b2b2 b2b2 If a 1 = 0 and b 1 = 1 then f = 0 irrespective of the values of a 2 and b 2

30 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 b2b2 b2b2 10 a2a2 b2b2 b2b2

31 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 b2b2 b2b2 10 a2a2 b2b2 b2b2

32 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 b2b2 10 a2a2 b2b2 b2b2

33 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 b2b2 10 a2a2 b2b2 b2b2

34 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 b2b2 10 a2a2 b2b2

35 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 a2a2 b2b2 10 a2a2 b2b2

36 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 b2b2 10 a2a2 b2b2 Let’s move things around a little bit so that the BDD looks nicer.

37 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University OBDT to ROBDD a1a1 b1b1 b1b1 b2b2 10 a2a2 b2b2 Bryant gave a linear-time algorithm (called Reduce) to convert OBDT to ROBDD. In practice, BDD packages don’t use Reduce directly. They apply the two reductions on-the-fly as new BDDs are constructed from existing ones. Why? Bryant gave a linear-time algorithm (called Reduce) to convert OBDT to ROBDD. In practice, BDD packages don’t use Reduce directly. They apply the two reductions on-the-fly as new BDDs are constructed from existing ones. Why?

38 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD (a.k.a. BDD) Summary BDDs are canonical representations of Boolean formulas f 1 = f 2, ?

39 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD (a.k.a. BDD) Summary BDDs are canonical representations of Boolean formulas f 1 = f 2, BDD(f 1 ) and BDD(f 2 ) are isomorphic f is unsatisfiable, ?

40 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD (a.k.a. BDD) Summary BDDs are canonical representations of Boolean formulas f 1 = f 2, BDD(f 1 ) and BDD(f 2 ) are isomorphic f is unsatisfiable, BDD(f) is the leaf node “0” f is valid, ?

41 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD (a.k.a. BDD) Summary BDDs are canonical representations of Boolean formulas f 1 = f 2, BDD(f 1 ) and BDD(f 2 ) are isomorphic f is unsatisfiable, BDD(f) is the leaf node “0” f is valid, BDD(f) is the leaf node “1” BDD packages do these operations in constant time Logical operations can be performed efficiently on BDDs Polynomial in argument size More details in next lecture BDD size depends critically on the variable ordering Some formulas have exponentially large sizes for all ordering Others are polynomial for some ordering and exponential for others

42 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 a2a2 a2a2 b1b1 b1b1 b2b2 b2b b2b2 b2b b1b1 b1b1 b2b2 b2b b2b2 b2b2 0001

43 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 a2a2 a2a2 b1b1 b1b1 b2b2 b2b2 b2b2 b2b2 10 b1b1 b1b1 b2b2 b2b2 b2b2 b2b2

44 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 a2a2 a2a2 b1b1 b1b1 b2b2 b2b2 10 b1b1 b1b1 b2b2 b2b2

45 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 a2a2 a2a2 b1b1 b1b1 b2b2 b2b2 10 b1b1 b1b1 b2b2 b2b2

46 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 a2a2 a2a2 b1b1 b1b1 b2b2 10 b1b1 b1b1 b2b2 b2b2

47 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 a2a2 a2a2 b1b1 b1b1 b2b2 10 b1b1 b1b1 b2b2 b2b2

48 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 a2a2 a2a2 b1b1 b1b1 b2b2 10 b1b1 b1b1 b2b2 Let’s move things around a little bit so that the BDD looks nicer.

49 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 a2a2 a2a2 b1b1 b1b1 b2b2 10 b1b1 b1b1 b2b2 a1a1 b1b1 b1b1 b2b2 10 a2a2 b2b2 11 nodes 8 nodes a 1 < a 2 < b 1 < b 2 a 1 < b 1 < a 2 < b 2

50 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 anan anan b1b1 b1b1 bnbn 10 b1b1 b1b1 bnbn a1a1 b1b1 b1b1 bnbn 10 anan bnbn ? £ 2 n – 1 nodes ? £ n + 2 nodes a 1 < … < a n < b 1 < … < b n a 1 < b 1 < … < a n < b n

51 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University ROBDD and variable ordering a1a1 anan anan b1b1 b1b1 bnbn 10 b1b1 b1b1 bnbn a1a1 b1b1 b1b1 bnbn 10 anan bnbn 3 £ 2 n – 1 nodes 3 £ n + 2 nodes a 1 < … < a n < b 1 < … < b n a 1 < b 1 < … < a n < b n

52 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Next Class BDD recap BDD operations BDD applications Next homework See you then …

53 Binary Decision Diagrams – Part 1 Sagar Chaki, Sep 12, 2011 © 2011 Carnegie Mellon University Questions? Sagar Chaki Senior Member of Technical Staff RTSS Program Telephone: U.S. Mail Software Engineering Institute Customer Relations 4500 Fifth Avenue Pittsburgh, PA USA Web Customer Relations Telephone: SEI Phone: SEI Fax: