Presentation is loading. Please wait.

Presentation is loading. Please wait.

Example: Verification

Similar presentations


Presentation on theme: "Example: Verification"— Presentation transcript:

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

2 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.

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

4 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.

5 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

6 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

7 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

8 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

9 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

10 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

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

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

13 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

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

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

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

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

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

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

20 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).

21 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.

22 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.

23 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.

24 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:

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

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

27 Logic Operations For any binary operation : * where

28 Logic Operations Apply recursively, expanding around each of the variables

29 Logic Operations Compute 1 1

30 Logic Operations

31 Logic Operations

32 Logic Operations

33 Logic Operations

34 Logic Operations 1

35 Logic Operations 1

36 Logic Operations 1

37 Logic Operations 1

38 Logic Operations Simplify 1

39 Logic Operations Simplify 1 For any operation , computing is

40 Variable Ordering

41 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:

42 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.

43 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

44 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

45 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)

46 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

47 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.)

48 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)

49 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.

50 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?

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

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

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

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

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

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

57 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”.

58 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)


Download ppt "Example: Verification"

Similar presentations


Ads by Google