Example: Verification

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

Switching circuits Composed of switching elements called “gates” that implement logical blocks or switching expressions Positive logic convention (active.
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.
Sahar Mosleh PageCalifornia State University San Marcos 1 Introductory Concepts This section of the course introduces the concept of digital circuits and.
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
TOPIC : Reduced Ordered Binary Decision Diagrams UNIT 1: Modeling Digital Circuits Module 1 : Functional Modeling.
1 Combinational Logic Design&Analysis. 2 Introduction We have learned all the prerequisite material: – Truth tables and Boolean expressions describe functions.
التصميم المنطقي Second Course
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.
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.
Marc Riedel Ph.D. Defense, Electrical Engineering, Caltech November 17, 2003 Combinational Circuits with Feedback.
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.
Marc Riedel A Discourse on Cycles Assistant Professor, ECE, Univ. Minnesota (in circuits and in computational biology) “In a good system, even evil men.
ECE 667 Synthesis & Verification - BDD 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Binary Decision Diagrams (BDD)
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
1 CSC 6001 VLSI CAD (Physical Design) January
Propositional Calculus Math Foundations of Computer Science.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: BDD BDDs applied in equivalence checking.
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Binary Decision Diagrams (BDDs)
Logic Circuits Chapter 2. Overview  Many important functions computed with straight-line programs No loops nor branches Conveniently described with circuits.
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.
Binary Decision Diagrams Introduced by Lee (1959). Popularized by Bryant (1986). Graph-based Representation of Boolean Functions compact (functions of.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Verification & Validation By: Amir Masoud Gharehbaghi
Biochemical Reactions: how types of molecules combine. Playing by the Rules + + 2a2a b c.
Functional Modeling.
1 Class Presentation on Binary Moment Diagrams by Krishna Chillara Base Paper: “Verification of Arithmetic Circuits with Binary Moment Diagrams” by Randal.
BDDs1 Binary Tree Representation The recursive Shannon expansion corresponds to a binary tree Example: Each path from the root to a leaf corresponds to.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462.
Analysis of Systems of Chemical Equations with Decision Diagrams A Decision DiagramThe Goddess Durga.
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.
Boolean Algebra & Logic Gates
4.
Combinational Logic Design&Analysis.
The Analysis of Cyclic Circuits with Boolean Satisfiability
Overview Part 1 – Gate Circuits and Boolean Equations
Overview Part 1 – Design Procedure Beginning Hierarchical Design
Reading: Hambley Chapters
Reconfigurable Computing
KU College of Engineering Elec 204: Digital Systems Design
Instructor: Alexander Stoytchev
BASIC & COMBINATIONAL LOGIC CIRCUIT
Chapter 9 Structuring System Requirements: Logic Modeling
SAT-Based Area Recovery in Technology Mapping
Karnaugh Maps Topics covered in this presentation: Karnaugh Maps
Binary Decision Diagrams
KU College of Engineering Elec 204: Digital Systems Design
“Definition” of Combinational
A logic function f in n inputs x1, x2, ...xn and
Overview Part 2 – Circuit Optimization
ECE 352 Digital System Fundamentals
Chapter 9 Structuring System Requirements: Logic Modeling
Introductory Concepts
A logic function f in n inputs x1, x2, ...xn and
Copyright © Cengage Learning. All rights reserved.
Computational Biology
Illustrative Example p p Lookup Table for Digits of h g f e ) ( d c b
Laws & Rules of Boolean Algebra
ECE 352 Digital System Fundamentals
Circuit Simplification and
Presentation transcript:

Example: Verification e.g., input/output specification of multiplier A B e.g., multi-level logic representation

Binary Decision Diagrams Graph-based Representation of Boolean Functions 1 Introduced by Lee (1959). Popularized by Bryant (1986). compact (functions of 50 variables) efficient (linear time manipluation) Widely used; has had a significant impact on the CAD industry.

Binary Decision Diagrams Graph-based Representation of Boolean Functions 1 x 2 3 f 1 BDD is defined as Directed Acyclic Graph 1 1

Analysis of Digital Circuits Large domain, small range. inputs output Digital Circuit Realm of digital design is mature: Combinational Circuit: Circuit does not have any memory, or any internal state. Performs a mapping from boolean inputs, to boolean outputs.

Analysis of Digital Circuits Large domain, small range. inputs output Digital Circuit Realm of digital design is mature: Combinational Circuit: Circuit does not have any memory, or any internal state. Performs a mapping from boolean inputs, to boolean outputs. 2m possibilities 2 possibilities

Analysis of Systems of Chemical Equations Large domain, small range? For m species, each with max. quantity N: inputs output Chemical Equations Initial State Realm of digital design is mature: Combinational Circuit: Circuit does not have any memory, or any internal state. Performs a mapping from boolean inputs, to boolean outputs. ? Yes/No Nm possibilities Yes/No possibilities

Data Structures 2m rows m variables 2 variables 4 rows 3 variables Truth Tables Example 1 x1 x2 x3 f 2m rows m variables 2 variables 4 rows 3 variables 8 rows 64 variables 264 rows

Data Structures x1 x1 x2 x3 f x2 x2 x3 x3 x3 x3 Decision Diagrams Example 1 S x1 x1 x2 x3 f 1 1 1 x2 1 x2 1 1 1 1 1 x3 1 x3 1 x3 1 x3 1 1 1 1 1 1 1 1 1 1 1 1

Data Structures x1 x2 x2 x3 x3 x3 x3 Decision Diagrams S 1 1 S x1 Optimize by merging nodes: 1 x2 1 x2 x3 x3 x3 x3 1 1

Data Structures x1 x2 x2 x3 x3 x3 x3 Decision Diagrams S 1 Optimize by merging nodes: x1 1 x2 1 x2 1 x3 1 x3 x3 x3 1 1 1 1

Data Structures x1 x2 x2 x3 x3 Decision Diagrams S 1 S x1 Optimize by merging nodes: x2 x2 1 x3 x3 1 1

Data Structures x1 x2 x2 x3 Decision Diagrams S 1 Optimize by merging nodes: x1 1 x2 1 x2 1 x3 1 1

Data Structures = x3 x1 x2 x2 x3 x1 x2 x3 x1 Logic Operations S 1 T 1 1 x2 x2 x3 T x1 1 x2 x3 U x1 1 = AND

Decision Diagrams Properties: Canonical: unique up to variable ordering Compact: represent functions of up to 1000 variables Efficient: perform logic operations in linear-time

Ordered Binary Decision Diagrams (a.k.a. Branching Programs) Example: 1 1 Directed Acyclic Graph; variables are inspected in order.

Reducing OBDDs “Terminal” Rule: eliminate duplicate terminals. 1 1

Reducing OBDDs “Elimination” Rule: eliminate a node if its 0 and 1 edges lead to the same node.

Reducing OBDDs “Merging” Rule: merge two nodes that reference the same variable and point to the same successors.

Reduced OBDDs Question: What is the optimal strategy for eliminate and merge operations?

Reduced OBDDs Strategy: eliminate and merge nodes repeatedly, in any order, until no further simplifications are possible. Is the result unique? For a given variable ordering, the Reduced OBDD representation of a function is unique (up to isomorphism).

Uniqueness (proof) By induction on the number of variables. Base Case: 0 nodes. 1 or Induction Hypothesis: Assume that any two ROBDDs for a function with k – 1 variables, k > 0, are isomorphic. Inductive Step: Show that any two ROBDDs for a function with k variables are isomorphic.

Inductive Step Let and be two ROBDDs for a function. Let and be the roots, respectively. implement same function; implement same function. depend on at most k –1 variables. isomorphic, isomorphic.

Inductive Step isomorphic to according to some mapping . 1 s Argue that is obtained from by the mapping Show that this mapping is well-defined and one-to-one.

Inductive Step well-defined: If a vertex u is in both low (v) and high(v) then the graphs rooted at are both isomorphic to the graph rooted at u. Since is reduced, well-defined: If there were distinct vertices in f having ,then f would not be reduced. one-to-one:

Mapping Well-Defined 1 1 Counter Example (Unreduced BDDs) low(v) 1 1 high(v) Counter Example (Unreduced BDDs)

Mapping One-To-One 1 1 Counter Example (Unreduced BDDs)

Logic Operations For any binary operation : * where

Logic Operations Apply recursively, expanding around each of the variables

Logic Operations Compute 1 1

Logic Operations

Logic Operations

Logic Operations

Logic Operations

Logic Operations 1

Logic Operations 1

Logic Operations 1

Logic Operations 1

Logic Operations Simplify 1

Logic Operations Simplify 1 For any operation , computing is .

Variable Ordering

Analysis l1 = 1 l4 = 3 g1 g4 l2 = 1 g3 l5 = 2 g2 g5 level: Functional Analysis: determine what is computed. Timing Analysis: determine how long it takes to compute it. l1 = 1 10 a l4 = 3 g1 g2 g3 g4 g5 11 12 l3 = 2 10 b 10 c l2 = 1 02 Goal of analysis: <click> Characterize the functional behavior, i.e., what values the circuit computes <click> Also, to characterize the temporal behavior, i.e., how long it takes the circuit to comput. <click> Given an acyclic circuit, the standard techniques for timing analysis is to assume a topological ordering. <click> Gates are assigned to levels, according to this ordering: <click>, <click>,<click>. The analysis begins at the gates at the top of the ordering, and proceeds to the bottom. <click>, <click>,<click>. Note that here we are performing so-called exact timing analysis. (Also known as input-dependent timing analysis.) 10 a l5 = 2 10 c 01 10 b 12 level:

Analysis Explicit analysis: Functional Analysis: determine what is computed. Timing Analysis: determine how long it takes to compute it. Explicit analysis: OR AND In a cyclic, there is no such topological ordering, no first gate. Where do we begin? Consider explicit analysis. <click> Beginning with controlling values, we annotate the values that are computed.

Analysis Explicit analysis: 00 01 02 00 00 00 01 02 01 Functional Analysis: determine what is computed. Timing Analysis: determine how long it takes to compute it. Explicit analysis: 00 01 02 00 00 00 AND OR AND 01 02 01

Analysis m inputs Þ Explicit analysis: 00 01 02 00 10 01 02 03 00 00 Functional Analysis: determine what is computed. Timing Analysis: determine how long it takes to compute it. Explicit analysis: 00 01 02 00 10 01 02 03 00 00 00 00 00 10 AND OR AND 01 01 02 02 01 03 m inputs Þ combinations; explict evaluation intractable

Analysis Symbolic analysis: binary, multi-terminal decision diagrams. Functional Analysis: determine what is computed. Timing Analysis: determine how long it takes to compute it. Symbolic analysis: 1 binary, multi-terminal decision diagrams. 00 00 10 BDDs: highly successful data structure. Cannonical. Compact. Can be manipulated efficiently. As I’ll illustrated, I use multi-terminal diagrams for timing. <click> Step through example. Emphasize that it’s just for f1. Use a shared decision diagram to represent all the functions. Large structure with reconvergence. Although not illustrated by this simple example, this representation is generally much more compact than a truth table. <click> See my paper. Timing model and framework fairly standard. My contributions: formulating it for cyclic circuits. In particular, the observation that exact timing analysis can proceed based on controlling values; does not require a topological ordering. <click> For further details, please see a paper that I have on the topic. AND OR AND 01 02 13 ? 01 02 03 (See “Timing Analysis of Cyclic Circuits,” IWLS, ’04)

Analysis of Systems of Chemical Equations Large domain, small range? For m species, each with max. quantity N: inputs output Chemical Equations Initial State Realm of digital design is mature: Combinational Circuit: Circuit does not have any memory, or any internal state. Performs a mapping from boolean inputs, to boolean outputs. ? Yes/No Nm possibilities Yes/No possibilities

Biochemical Reactions Lingua Franca of computational biology. Reaction 1 molecule of type A combines with 2 molecules of type B to produce 2 molecules of type C. The most fundamental concept in this field – in the literature and in practice – is the idea of a reaction. It specifies how something in the system changes: <click> 1 of A combines with 2 of B to produce 2 of C Of course, a wealth of information might be annotated: always a rate constant (likelihood of a reaction occurring or the rate at which it occurs). Also localization with a cell, chemical gradients, temperature. Reaction is annotated with a rate constant and physical constraints (localization, gradients, etc.)

Biochemical Reactions Lingua Franca of computational biology. Reaction Species: Elementary molecules (e.g., hydrogen, phosphorous, ...) The reactants and products in a reaction may be elementary molecules, or they might be more complex, more interesting molecules (proteins, enzymes, RNA....) A reaction then could be a simple step, describing an event that can be understood in terms of basic chemistry. Or it could be a conglomeration of steps. That is, it could encapsulate a wealth of information. Complex molecules (e.g., proteins, enzymes, RNA ...) Reaction: Elementary step (e.g., ) Conglomeration of steps (e.g., transcription of gene product)

Biochemical Reactions Lingua Franca of computational biology. Coupled Set Reactions R1 R2 R3 In an abstract sense, a biological systems can be viewed as a couple set of such reactions. Regardless of the components, the basic problem in computational biology is to characterize the evolution of such a system. Goal: given initial conditions, analyze (predict) the evolution of such a system.

System of Chemical Equations Discrete Quantities of Molecular Species Types of Questions: Can a certain state, S1, be transformed into another state, S2? If so, in how many different ways? S2 Can S1 be transformed into S2 without passing through a third state S3? Can S1 be reached from at least one state in a set of states T? From all the states in a set of states U?

Decision Diagrams A B C 4 7 5 3 S1 S2 S3 States e.g., set of possible initial states

System of Chemical Equations State Evolution R1 occurs or R2 occurs state before state after or R3 occurs

Decision Diagrams reaction 1 occurs C B A 2 ® + R1:

Decision Diagrams reaction 2 occurs R2: A C B 2 ® +

Decision Diagrams reaction 3 occurs R3: B C A 2 ® +

Reachable States After The Next Reaction Decision Diagrams Reachable States After The Next Reaction S1 or S2 or S3

Evolution of Reachable States Decision Diagrams Evolution of Reachable States S1 or S2 S3 T T1 or T2 T3 U ... S Track evolution of a large number of states “in parallel”.

Yes/No Questions Decision Diagram Can ask (and answer) arbitrarily complicated yes/no questions pertaining to reachability: C1: state S is reachable after 100 reactions Decision Diagram C2: state T is reachable from state U or from state V but not from both C3: state X is never reachable Yes if C1 or not(C2) Yes if not C1 and (C2 or C3)