Logic Verification 2 Outline –Ordered Binary Decision Diagrams –Verification using OBDDs –OBDD Data Structures –OBDD Operations –Verification Example Goal.

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

Chapter 9 Graphs.
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.
Intermediate Code Generation
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
2012: J Paul GibsonT&MSP: Mathematical FoundationsMAT7003/L2-GraphsAndTrees.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson,
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.
© 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.
Technology Mapping 2 Outline Goal Reading Tree Pattern Matching
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
COE 561 Digital System Design & Synthesis Logic Synthesis Background
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 16, 2003.
CS 206 Introduction to Computer Science II 03 / 25 / 2009 Instructor: Michael Eckmann.
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)
1 CSC 6001 VLSI CAD (Physical Design) January
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
Trees and Tree Traversals Prof. Sin-Min Lee Department of Computer Science San Jose State University.
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.
Tractable Symmetry Breaking Using Restricted Search Trees Colva M. Roney-Dougal, Ian P. Gent, Tom Kelsey, Steve Linton Presented by: Shant Karakashian.
B. Alizadeh Advanced Logic Design (2008) 1 / 55 Decision Diagrams.
Binary Decision Diagrams (BDDs)
November,2000University of Southern California1 Introduction to Binary Decision Diagrams - Shesha Shayee K. Raghunathan.
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Graph Theory Topics to be covered:
“On an Algorithm of Zemlyachenko for Subtree Isomorphism” Yefim Dinitz, Alon Itai, Michael Rodeh (1998) Presented by: Masha Igra, Merav Bukra.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
Week 11 - Wednesday.  What did we talk about last time?  Graphs  Euler paths and tours.
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.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Mathematical Preliminaries
ICS 252 Introduction to Computer Design Lecture 12 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
Trees 2: Section 4.2 and 4.3 Binary trees. Binary Trees Definition: A binary tree is a rooted tree in which no vertex has more than two children
Discrete Mathematics Chapter 5 Trees.
Chapter Relations and Their Properties
Trees 3 The Binary Search Tree Section 4.3. Binary Search Tree Also known as Totally Ordered Tree Definition: A binary tree B is called a binary search.
1 Trees 2 Binary trees Section Binary Trees Definition: A binary tree is a rooted tree in which no vertex has more than two children –Left and.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462.
Week 11 - Wednesday.  What did we talk about last time?  Graphs  Paths and circuits.
IT 60101: Lecture #121 Foundation of Computing Systems Lecture 13 Trees: Part VIII.
BDD-based Synthesis of Reversible Logic for Large Functions Robert Wille Rolf Drechsler DAC’09 Presenter: Meng-yen Li.
Code: BCA302 Data Structures with C Prof. (Dr.) Monalisa Banerjee By.
How CTL model checking works
P & NP.
Hard Problems Introduction to NP
12. Graphs and Trees 2 Summary
Based on slides by Y. Peng University of Maryland
Graphs Graph transversals.
Binary Decision Diagrams
Formal Methods in software development
Binary Decision Diagrams
Formal Methods in software development
A logic function f in n inputs x1, x2, ...xn and
Binary Decision Diagrams
Example: Verification
A logic function f in n inputs x1, x2, ...xn and
Boolean Algebra for CAD Applications
Presentation transcript:

Logic Verification 2 Outline –Ordered Binary Decision Diagrams –Verification using OBDDs –OBDD Data Structures –OBDD Operations –Verification Example Goal –Understand OBDDs –Understand OBDD data structures –Understand OBDD algorithms Reading –Logic Synthesis and Verification Algorithms, Hachtel and Somenzi, Ch. 6

Ordered Binary Decision Diagrams Graphical representation of boolean functions –rooted, directed graph with vertex set V Nonterminal vertex v –attributes are index, low, high –index(v)  { 1,..., n } –children low(v), high(v)  V –if low(v) is nonterminal, index(v) < index(low(v)) –if high(v) is nonterminal, index(v) < index(high(v)) Terminal vertex v –attribute value(v)  { 0, 1 }

Function Graph Function graph G having root v denotes function f v Recursive Definition –if v is a terminal vertex »if value(v) = 1, then f v = 1 »if value(v) = 0, then f v = 0 –if v is nonterminal with index(v) = i, then »f v = f v (x 1,...,x n ) = x’ i f low(v) + x i f high(v) Arguments x 1,...,x n describe path from root to terminal –for each vertex v, if index(v) = i, then »if x i = 0, go to low child »if x i = 1, go to high child

OBDD Examples 01 xixi i x 1 x 2 + x highlow terminals nonterminal 01 x 1 x 2 + x 3 x 4 + x 5 x

OBDD Properties Acyclic –ordering restriction => path from root to terminal has strictly increasing nonterminal index Reduced –no v s.t. low(v) = high(v) –no v, v’ s.t. subgraphs rooted at v, v’ are isomorphic Unique –only one reduced graph for boolean function f –up to an isomorphism –permits logic verification »if f and f’ are the same, then their OBDDs are isomorphic »comparison circuit is single terminal vertex with value 0 if circuits are the same

Graph Isomorphism – there exists a 1:1 function  mapping vertices from graph G to vertices in G’ s.t. –for all v, if  (v) = v’, then –v and v’ are terminals with value(v) = value(v’) –v and v’ are nonterminal with index(v) = index(v’),  (low(v)) = low(v’), s (high(v)) = high(v’) Easy for OBDDs –start at root, check vertex, children, recurse Equiv?

OBDD Properities cont. Order dependence –changing variable ordering can greatly change graph –equivalent to relabeling variables Graphs sometimes explode –exponential size for multipliers –this is still an NP-complete problem

Reordering Example 01 x 1 x 2 + x 3 x 4 + x 5 x left = low right = high Swap 2 & 4, 3 & 5 x 1 x 4 + x 2 x 5 + x 3 x

OBDD Data Structures Vertex structure type vertex = record low, high: vertex; index: 1..n+1; val: (0,1,X); id: integer;(unique id for vertex, 1..|G|) mark: boolean;(mark visited during traversal) end; Field values FieldTerminalNonterminal lowNULLlow(v) highNULLhigh(v) indexn+1index(v) valvalue(v)X

OBDD Operations OperationResultTime Complexity Reducereduce G O(|G| log(|G|)) Applyf 1 f 2 O(|G 1 | |G 2 |) Restrictf | xi = b O(|G| log(|G|)) Composef | xi = f2 O(|G 1 | 2 |G 2 |) Satisfy-onean element of S f O(n) Satisfy-allS f O(n |S f |) Satisfy-count|S f |O(|G|) S f = { (x 1,...,x n ) | f(x 1,...,x n ) = 1 }

Algorithm Example: Satisfy-one Return true if f is satisfiable, false otherwise Return variable assignment x Start at root vertex v boolean Satisfy-one(v, x) vertex v; integer x[1..n]; { if (v.value = 0) return(false); /* failure */ if (v.value = 1) return(true); /* success */ x[i] = 0; if (Satisfy-one(v.low, x)) return(true); x[i] = 1; return(Satisfy-one(v.high, x)); }

Verification Example C0 C1 C2 C0 C1 C2 c2’ + (c0’ c1’)’ ((((c0’ c1’)’)’ c2)’)’ ((c0’ c1’)’)’)’