IT University of Copenhagen Lecture 7: BDD Construction and Manipulation 1. BDD construction 2. Boolean operations on BDDs 3. BDD-Based configuration.

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

Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
BDD Based Configuration Henrik Hulgaard, CTO. Configit: Interactive Configuration Tools Configit is an ITU spin-off company Currently employs 18 people,
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
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.
Interactive Configuration
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
1 Integrating CSP Decomposition Techniques and BDDs for Compiling Configuration Problems Sathiamoorthy Subbarayan IT University of Copenhagen.
Comp 122, Spring 2004 Binary Search Trees. btrees - 2 Comp 122, Spring 2004 Binary Trees  Recursive definition 1.An empty tree is a binary tree 2.A node.
Qualitätssicherung von Software (SWQS) Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin und Fraunhofer FOKUS : Modellprüfung II - BDDs.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt.
© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September.
© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September.
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.
DATE-2002TED1 Taylor Expansion Diagrams: A Compact Canonical Representation for Symbolic Verification M. Ciesielski, P. Kalla, Z. Zeng B. Rouzeyre Electrical.
Constraint Satisfaction Problems
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
A New Approach to Structural Analysis and Transformation of Networks Alan Mishchenko November 29, 1999.
Rolf Drechlser’s slides used
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 16, 2003.
A Compressed Breadth-First Search for Satisfiability DoRon B. Motter and Igor L. Markov University of Michigan, Ann Arbor.
Taylor Expansion Diagrams (TED): Verification EC667: Synthesis and Verification of Digital Systems Spring 2011 Presented by: Sudhan.
Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop.
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:
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: BDD BDDs applied in equivalence checking.
B. Alizadeh Advanced Logic Design (2008) 1 / 55 Decision Diagrams.
Satisfiability Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
Identifying Reversible Functions From an ROBDD Adam MacDonald.
Binary Decision Diagrams (BDDs)
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Daniel Kroening and Ofer Strichman 1 Decision Proceduresfoe Equality Logic 4 Range Allocation.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
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.
Notes on Sequence Binary Decision Diagrams: Relationship to Acyclic Automata and Complexities of Binary Set Operations Shuhei Denzumi1, Ryo Yoshinaka2,
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
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
BDDs1 Binary Tree Representation The recursive Shannon expansion corresponds to a binary tree Example: Each path from the root to a leaf corresponds to.
Boolean Expression Evaluation CS 270: Math Foundations of CS Jeremy Johnson.
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.
Lecture 11: Proof by Reflection
Planning as model checking, (OBDDs)
Binary Tree Applications
ECE 667 Synthesis and Verification of Digital Systems
Propositional Calculus: Boolean Algebra and Simplification
SS 2017 Software Verification CTL model checking, BDDs
Binary Decision Diagrams
Formal Methods in software development
Formal Methods in software development
A logic function f in n inputs x1, x2, ...xn and
A logic function f in n inputs x1, x2, ...xn and
Instructor: Aaron Roth
Real-Time Systems, COSC , Lecture 18
Presentation transcript:

IT University of Copenhagen Lecture 7: BDD Construction and Manipulation 1. BDD construction 2. Boolean operations on BDDs 3. BDD-Based configuration

IT University of Copenhagen Today’s Program [12:00-13:15] – Unique table – Build(t) – Apply(op,u 1,u 2 ) – BDD-Based configuration (SJHAHM04) [13:20-14:00] Henrik Hulgaard, Configit A/S – A configuration technology company  2011 Rune Møller Jensen 2

IT University of Copenhagen BDD Construction 3  2011 Rune Møller Jensen

IT University of Copenhagen Last week: 1.Make a Decision Tree of formula 2.Keep reducing it until no further reductions are possible This week: Reduce the decision tree to a BDD while building it BDD construction 4  2011 Rune Møller Jensen

IT University of Copenhagen Represent BDD by a table of unique nodes (UT) Build BDDs recursively, i.e. to add a new node u: 1.Compute high(u) and low(u) and store them in UT 2.Maintain BDD reductions when adding u to UT: a)Only extend UT with u if high(u)  low(u) (non-redundancy test) b)Only extend UT with u if u  UT (uniqueness) Reduce decision tree to BDD during construction 5  2011 Rune Møller Jensen

IT University of Copenhagen Unique Table Representation Node Attributes Represent Unique Table by two tables T and H T : u  (i,l,h) H: (i,l,h)  u 6  2011 Rune Møller Jensen H is the inverse of T: T(u) = (i,l,h)  H(i,l,h) = u u unique node identifier {0,1,2,3,…} i = var(u) variable index {1,2,…,n,n+1} l = low(u) node identifier of low h = high(u) node identifier of high u low(u)high(u) var(u)

IT University of Copenhagen Primitive Operations on T and H 7  2011 Rune Møller Jensen

IT University of Copenhagen Unique Table Interface: MakeNode (M K ) 8  2011 Rune Møller Jensen

IT University of Copenhagen Idea: Construct the BDD recursively using the Shannon Expansion t = x  t[1/x], t[0/x] Terminal cases Build(0) = 0 Build(1) = 1 Recursive case Build(t(x i,x i+1,…,x n )) = Mk( ) BuildBuild 9  2011 Rune Møller Jensen Build(t(0,x i+1,…,x n )) Build(t(1,x i+1,…,x n )) xixi

IT University of Copenhagen BuildBuild 10  2011 Rune Møller Jensen

IT University of Copenhagen BDD Manipulation 11  2011 Rune Møller Jensen

IT University of Copenhagen Multi-Rooted BDD  2011 Rune Møller Jensen x1x1 x2x2 x3x Unique Table contains many BDDs x1  x3x1  x3 x1  x2x1  x2 x2x2

IT University of Copenhagen ApplyApply Apply(op,u 1,u 2 ): computes the BDD of u 1 op u 2 where op : any of the 16 Boolean operators u 1, u 2 : root nodes of BDDs Relies on the Shannon expansion properties: (x  t 1,t 0 ) op (x  t’ 1,t’ 0 )  x  (t 1 op t’ 1 ),(t 0 op t’ 0 ) (x  t 1,t 0 ) op t  x  (t 1 op t),(t 0 op t) 13  2011 Rune Møller Jensen

IT University of Copenhagen Terminal case: u  {0,1} u’  {0,1} App(u  u’) = u  u’ Recursive case: u = x v  u 1, u 0 u’ = x w  u’ 1, u’ 0 App(u  u’) = Mk(x v, App(u 0  u’ 0 ), App(u 1  u’ 1 ) )if v = w Mk(x v, App(u 0  u’), App(u 1  u’) ) if v < w Mk(x w, App(u  u’ 0 ), App(u  u’ 1 ) ) if w < v Apply with op =  14  2011 Rune Møller Jensen

IT University of Copenhagen 15  2011 Rune Møller Jensen

IT University of Copenhagen Construct BDDs from expression tree 16  2011 Rune Møller Jensen   x1x1 x2x2 x3x3 u 5  u 4 u 2  u 3 x1x1 x2x2 x3x3 u2u2 u3u3 u4u4 u5u5 u6u6

IT University of Copenhagen Properties of Apply Improvements? – Early termination. E.g., no reason to keep recursing if the left side in a conjunction is 0 Complexity : O(|u 1 ||u 2 |), due to dynamic programming So a BDD of any formula can be computed in poly time? 17  2011 Rune Møller Jensen

IT University of Copenhagen BDDsBDDs Compact Equality check easy Easy to evaluate the truth-value of an assignment Boolean operations efficient SAT check efficient Tautology check efficient Easy to implement 18  2011 Rune Møller Jensen

IT University of Copenhagen BDD-Based Configuration 19  2011 Rune Møller Jensen

IT University of Copenhagen A configuration problem C is a triple (Y,D,F) – Y is a set of variables y 1, y 2, …,y n – D is the Cartesian product of their finite domains D = D 1  D 2  …  D n – F = {f 1,f 2,…,f m } is a set of propositional formulas over atomic propositions y i = v, where v  D i, specifying the conditions that the variable assignments must satisfy. Each formula is inductively defined by f  y i = v | f  g | f  g |  f Configuration Problems 20  2011 Rune Møller Jensen

IT University of Copenhagen y 1  {black, white, red, blue}: Color y 2  {small, medium, large}: Size y 3  {“Men in black” - MIB, “Save the whales” -STW}: Print f 1  (y 3 = MIB)  (y 1 = black) f 2  (y 3 = STW)  (y 2  small) y 1 y 2 y 3 blacksmallMIB whitemediumSTW redlarge blue T-Shirt Example 1 21  2011 Rune Møller Jensen 1 : Due to Erik van der Meer, now at Microsoft

IT University of Copenhagen y 1  {black, white, red, blue}: Color y 2  {small, medium, large}: Size y 3  {“Men in black” - MIB, “Save the whales” -STW}: Print f 1  (y 3 = MIB)  (y 1 = black) f 2  (y 3 = STW)  (y 2  small) y 1 y 2 y 3 blacksmallMIB whitemediumSTW redlarge blue T-Shirt Example 1 22  2011 Rune Møller Jensen 1 : Due to Erik van der Meer, now at Microsoft

IT University of Copenhagen y 1  {black, white, red, blue}: Color y 2  {small, medium, large}: Size y 3  {“Men in black” - MIB, “Save the whales” -STW}: Print f 1  (y 3 = MIB)  (y 1 = black) f 2  (y 3 = STW)  (y 2  small) y 1 y 2 y 3 blacksmallMIB whitemediumSTW redlarge blue T-Shirt Example 1 23  2011 Rune Møller Jensen 1 : Due to Erik van der Meer, now at Microsoft

IT University of Copenhagen y 1  {black, white, red, blue}: Color y 2  {small, medium, large}: Size y 3  {“Men in black” - MIB, “Save the whales” -STW}: Print f 1  (y 3 = MIB)  (y 1 = black) f 2  (y 3 = STW)  (y 2  small) y 1 y 2 y 3 blacksmallMIB whitemediumSTW redlarge blue T-Shirt Example 1 24  2011 Rune Møller Jensen 1 : Due to Erik van der Meer, now at Microsoft

IT University of Copenhagen y 1  {black, white, red, blue}: Color y 2  {small, medium, large}: Size y 3  {“Men in black” - MIB, “Save the whales” -STW}: Print f 1  (y 3 = MIB)  (y 1 = black) f 2  (y 3 = STW)  (y 2  small) y 1 y 2 y 3 blacksmallMIB whitemediumSTW redlarge blue T-Shirt Example 1 25  2011 Rune Møller Jensen 1 : Due to Erik van der Meer, now at Microsoft

IT University of Copenhagen IPC(C) 1.R  C OMPILE (C) 2. while |R| > 1 do 3. choose (y i = v)  V ALID A SSIGNMENTS (R) 4. R  R  (y i = v) Interactive Product Configurator 26  2011 Rune Møller Jensen

IT University of Copenhagen Idea 1.Use a BDD to represent R 2.Use a polynomial-time BDD algorithm to compute V ALID A SSIGNMENTS (R) BDD-based configuration 27  2011 Rune Møller Jensen

IT University of Copenhagen 1.Define domains in binary 00 : black, 01 : white, 10 : red, 11 : blue 00 : small, 01 : medium, 10 : large 0 : MIB, 1 : STW 2.Build a BDD of the rules Represent R by a BDD 28

IT University of Copenhagen Trace paths for each variable layer in the BDD Compute V ALID A SSIGNMENTS (R) 29

IT University of Copenhagen Henrik Hulgaard configit 30  2011 Rune Møller Jensen