1 / 17

Decision Diagrams

Decision Diagrams. Maciej Ciesielski Electrical & Computer Engineering University of Massachusetts, Amherst, USA ciesiel@ecs.umass.edu. Common Representations. Boolean functions ( f : B  B ) Truth table, Karnaugh map SoP, PoS, ESoP Reed-Muller expansions (PPRM, FPRM, GRM, etc.)

aine
Download Presentation

Decision Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Decision Diagrams Maciej Ciesielski Electrical & Computer Engineering University of Massachusetts, Amherst, USA ciesiel@ecs.umass.edu BDD Tutorial

  2. Common Representations • Boolean functions ( f : B  B ) • Truth table, Karnaugh map • SoP, PoS, ESoP • Reed-Muller expansions (PPRM, FPRM, GRM, etc.) • Decision diagrams (BDD, ZDD, KFDD, *BMD, etc.) • Arithmetic functions ( f : B  Int ) • Binary Moment Diagrams (*BMD, K*BMD, *PHDD) • Algebraic Decision Diagrams (ADD) • Arithmetic functions (f : Int  Int ) • Taylor Expansion Diagrams (TED) BDD Tutorial

  3. Canonical Representations • Each minimal, canonical representation is characterized by • Decomposition type • Shannon, Davio, moment decomposition, Taylor, etc. • Reduction rules • Redundant nodes, isomorphic sub-graphs, etc • Composition method (“Apply” rule) • They can represent • Boolean functions (f : B  B) • Arithmetic functions (f : B  Int ) • Algebraic expressions (f : Int Int ) BDD Tutorial

  4. Decomposition Types • Shannon expansion f = x fx + x’ fx’ • Positive Davio (moment decomposition): replacex’=1-x f = x fx + (1-x) fx’ = fx’ + x fx where fx = fx - fx’ • Negative Davio f = fx + (1-x) fx’ BDD Tutorial

  5. Binary Decision Diagrams (BDD) • 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 verification BDD Tutorial

  6. f a h= c + bc g= bc b b c 0 1 Sannon Expansion  BDD f = ac + bc • fa’ = f(a=0) = bc • fa = f(a=1) = c + bc • gb’ = (bc)|b=0 = 0 • gb = (bc)|b=1 = c • hb’ = (c+bc)|b=0 = c • hb = (c+bc)|b=1 = c BDD Tutorial

  7. f a g g b b BDD Reduction Rules -1 • Eliminate redundant nodes • (with both edges pointing to same node) f = a’ g(b) + a g(b) = g(b) (fa + fa’ = 1) BDD Tutorial

  8. f f1 f2 a a a h g h g b c b c BDD Reduction Rules -2 • 2. Merge duplicate nodes (isomorphic subgraphs) • Nodes must be unique f1 = a’ g(b) + a h(c) = f2 f = f1 = f2 BDD Tutorial

  9. f 1 edge a b c f 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 0 edge a b b c c c c 0 0 0 0 0 1 1 1 BDD Construction • Reduced Ordered BDD f = ac + bc Truth table Decision tree BDD Tutorial

  10. f f a a a b b b b b c c c c c c c 0 0 0 1 1 1 BDD Construction – cont’d f = (a+b)c • 2. Merge duplicate nodes 3. Remove redundant nodes 1. Merge terminal nodes BDD Tutorial

  11. F F’ ¬ F(y) F(x,y) Restrict x=b 0 0 1 0 0 1 1 1 Logic Manipulation using BDDs • Useful operators • Complement ¬ F = F’ • (switch the terminal nodes) • Restrict: F|x=b = F(x=b) where b = const BDD Tutorial

  12. F G G F =   0 0 1 1 0 1 APPLY Operator • Apply: F G, any Boolean operation (AND, OR, XOR, ) • Useful in constructing BDD for arbitrary Boolean logic • Any logic operation can be expressed using Restrict, Apply • Efficient algorithms, work directly on BDD graphs BDD Tutorial

  13. BDD:APPLY Operation • Basic operator for efficient BDD manipulation (structural) • Based on recursive Shannon expansion F OP G = x (FxOP Gx) + x’(Fx’OP Gx’) whereOP = OR, AND, XOR, etc • Works directly on BDD BDD Tutorial

  14. 2 a a 3 2.3 1.3 c c 1.0 0.3 0 0 0 1.1 1 1 1 BDD:APPLY Operation - AND a AND c ac a = = c AND BDD Tutorial

  15. ac bc 4 a 6 b a a b 5 7 b 7+5 0+6 6+5 4+6 0+7 0+5 c c c c 0+0 0 0 0 0 1 1 1 1 BDD:APPLY Operation - OR f = ac+bc OR = = BDD Tutorial

  16. a a b b c c 0 0 1 1 Application to Verification • Equivalence Checking of combinational circuits • Canonicity property of BDDs: • if F and G are equivalent, their BDDs are identical (for the same ordering of variables) F = a’bc + abc +ab’c G = ac +bc  BDD Tutorial

  17. a ab b c 1 0 ab’c Application to SAT H • Functional test generation • SAT, Boolean satisfiability analysis • to test for H = 1 (0), find a path in the BDD to terminal 1 (0) • the path, expressed infunction variables, gives a satisfying solution (test vector) BDD Tutorial

More Related