Binary Decision Diagrams (BDDs)

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

Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
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.
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
CS357 Lecture: BDD basics David Dill 1. 2 BDDs (Boolean/binary decision diagrams) BDDs are a very successful representation for Boolean functions. A BDD.
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
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.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
1 Don´t Care Minimization of *BMDs: Complexity and Algorithms Christoph Scholl Marc Herbstritt Bernd Becker Institute of Computer Science Albert-Ludwigs-University.
© 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.
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.
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Ofer Strichman, Technion 1 Decision Procedures in First Order Logic Part III – Decision Procedures for Equality Logic and Uninterpreted Functions.
1 Deciding separation formulas with SAT Ofer Strichman Sanjit A. Seshia Randal E. Bryant School of Computer Science, Carnegie Mellon University.
Ofer Strichman, Technion 1 Decision Procedures in First Order Logic Part I - Introduction.
ECE Synthesis & Verification - Lecture 18 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Word-level.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 16, 2003.
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
Technion 1 (Yet another) decision procedure for Equality Logic Ofer Strichman and Orly Meir Technion.
Symbolic Boolean Manipulation with Ordered Binary Decision Diagrams Carnegie Mellon University Randal E. Bryant.
Taylor Expansion Diagrams (TED): Verification EC667: Synthesis and Verification of Digital Systems Spring 2011 Presented by: Sudhan.
Decision Structures Truth TableDecision Tree –Vertex represents decision –Follow green (dashed) line for value 0 –Follow red (solid) line for value 1 –Function.
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.
ECE 667 Synthesis and Verification of Digital Systems
IT University of Copenhagen Lecture 8: Binary Decision Diagrams 1. Classical Boolean expression representations 2. If-then-else Normal Form (INF) 3. Binary.
Fast Spectral Transforms and Logic Synthesis DoRon Motter August 2, 2001.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
Daniel Kroening and Ofer Strichman Decision Procedure
1/25 Pointer Logic Changki PSWLAB Pointer Logic Daniel Kroening and Ofer Strichman Decision Procedure.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: BDD BDDs applied in equivalence checking.
Truth Table-Based Testing Generating test cases when the test model is a truth table Reading: Binder Chapter 6.
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong 07 NOV 08.
Daniel Kroening and Ofer Strichman 1 Decision Proceduresfoe Equality Logic 4 Range Allocation.
CS 267: Automated Verification Lecture 6: Binary Decision Diagrams Instructor: Tevfik Bultan.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
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
BDDs1 Binary Tree Representation The recursive Shannon expansion corresponds to a binary tree Example: Each path from the root to a leaf corresponds to.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
1/20 Arrays Changki PSWLAB Arrays Daniel Kroening and Ofer Strichman Decision Procedure.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 A framework for eager encoding Daniel Kroening ETH, Switzerland Ofer Strichman Technion, Israel (Executive summary) (submitted to: Formal Aspects of.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
IT 60101: Lecture #121 Foundation of Computing Systems Lecture 13 Trees: Part VIII.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Propositional Calculus: Boolean Algebra and Simplification
Binary Decision Diagrams
Formal Methods in software development
Decision Procedures An Algorithmic Point of View
Formal Methods in software development
Binary Decision Diagrams
Verifying Programs with BDDs Sept. 22, 2006
Presentation transcript:

Binary Decision Diagrams (BDDs) Daniel Kroening and Ofer Strichman

Part I Reminders - Deciding Propositional Logic What is Logic Proofs by deduction Proofs by enumeration Decidability, Soundness and Completeness some notes on Propositional Logic Deciding Propositional Logic SAT tools BDDs      

Next: Binary Decision Diagrams SAT looked for a satisfying solution to CNF We will now examine a graph-based data structure called Binary Decision Diagrams. It has several advantages and disadvantages comparing to SAT Developed by Bryant [1986]. Next few slides are from the source …

Alternate Approach (A ∧ C) ∨ (C ∧ B) (A Ç B) Æ (C) A B C 1 A B C 1 Generate complete representation of function Canonicity: functions are equal iff representations are identical (A ∧ C) ∨ (C ∧ B) A B C 1 (A Ç B) Æ (C) A B C 1

Decision Structures Truth Table Decision Tree Vertex represents decision Follow green (dashed) line for value 0 Follow red (solid) line for value 1 Function value determined by leaf value.

Variable Ordering OK Not OK Assign arbitrary total ordering to variables e.g., x1 < x2 < x3 Variables must appear in ascending order along all paths OK Not OK x x 3 1 x 2 x x3 1

Reduction Rule #1 Merge equivalent leaves a a a

Reduction Rule #2 Merge isomorphic nodes y x z y x z y x z

Reduction Rule #3 Eliminate Redundant Tests y x y

Example OBDD Initial Graph Reduced Graph (x1 Ç x2) Æ x3 Canonical representation of Boolean functions For a given variable ordering Two functions are equivalent iff graphs are isomorphic Can be tested in linear time Desirable property: simplest form is canonical.

Satisfiability etc. Constants Unique unsatisfiable function Unique tautology Conclusion: given a BDD it takes constant time to check: Validity Contradiction Satisfiability Is this a free lunch ? …

Effect of Variable Ordering Good Ordering Bad Ordering Linear Growth Exponential Growth

Selecting Good Variable Ordering Intractable Problem Even when problem represented as OBDD i.e., to find optimum improvement to current ordering Application-Based Heuristics Exploit characteristics of application e.g., Ordering for functions of combinational circuit Traverse circuit graph depth-first from outputs to inputs

Building BDDs ‘from below’ Starting from a binary decision tree is too hard for formulas with many variables. Goal: construct the BDD ‘from below’.

Building BDDs ‘from below’ For this we will need a function called APPLY: Given the BDDs for f1 and f2, and a binary connective F 2 {Æ, Ç, !, $...} (any one of the 16 binary connectives), Construct the BDD for f1 F f2,

Building BDDs ‘from below’ Def: a restriction of a function f to x=d, denoted f|x=d where x 2 vars(f), d 2 {0,1}, is equal to f after assigning x=d. Given the BDD of f, deriving the BDD of f|x=0 is simple: f: (x1 Ç x2) Æ x3 f|x2=1 1 x 3 x 3 1

Now, APPLY (1/3) Let v1,v2 denote that root nodes of f1, f2, respectively, with var(v1) = x1 and var(v2)=x2. If v1 and v2 are leafs, f1 F f2 is a leaf node with value val(v1) F val(v2) Ç 1 = 1 Æ 1 =

Now, APPLY (2/3) If x1 = x2 = x, apply Shanon expansion: f1 F f2 = (:x Æ f1|x=0 F f2|x=0 Ç x Æ f1|x=1 F f2|x=1) x BDD for f1|x=1 Æ f2|x=1 f1|x=0 Æ f2|x=0 x x Æ = BDD for f1|x=0 BDD for f1|x=1 BDD for f2|x=0 BDD for f2|x=1

Now, APPLY (3/3) else, suppose x1 < x2 in the variable order. f1 F f2 = (:x1 Æ f1|x=0 F f2 Ç x1 Æ f1|x=1 F f2) x1 x2 x1 Æ = BDD for f1|x1=1 BDD for f1|x=0 Æ f2 BDD for f1|x=1 Æ f2 BDD for f1|x1=0 BDD for f2|x2=0 BDD for f2|x2=1

BDDs from below: example. 1 Ç x 2 1 x 1 BDD for f1|x1=0 Ç f2 f1|x1=1 Ç f2 x2 1 x x 2 x 2 1 2 Ç = 1 f2: :x2 f1: x1 $ x2 BDD for f1|x1=0 Ç f2 = = x 2 1 0 Ç 0 = 0 1 Ç 1 = 1

BDDs from below: example. 1 x x 2 x 2 x 1 BDD for f1|x=0 Ç f2 f1|x=1 Ç f2 2 Ç = 1 1 f2: :x2 f1: x1 $ x2 f1 Ç f2 = x1 Ç (:x1 Æ :x2) x 1 2 = x 1 x 2 = x 2 1

Comparing SAT to BDDs BDD is a canonical data structure that represents the semantic of a function, i.e. all its solutions Some applications (e.g. symbolic model checking) need canonicity to detect when two sets are equivalent. Can require exponential space & time (highly sensitive to variable ordering) SAT searches through CNF for a single solution CNF is not canonical. Poly-space algorithms exists. Time can be exponential.