CS 267: Automated Verification. Lecture 6: Binary Decision Diagrams. Instructor: Tevfik Bultan

Size: px
Start display at page:

Download "CS 267: Automated Verification. Lecture 6: Binary Decision Diagrams. Instructor: Tevfik Bultan"

Transcription

1 CS 267: Automated Verification Lecture 6: Binar Decision Diagrams Instructor: evfik Bultan

2 Binar Decision Diagrams (BDDs) [Brant 86] Reduced Ordered Binar Decision Diagrams (BDDs) An efficient data structure for representing Boolean functions (or truth sets of Boolean formulas) and manipulating them here are BDD packages available: (for eample CUDD from Colorado Universit) BDDs are a canonical representation for Boolean functions given two Boolean logic formulas and G, if and G are equivalent (i.e. if their truth sets are the same), then their BDD representations will be the same

3 BDDs for Smbolic Model Checking BDD data structure can be used to implement the smbolic model checking algorithm we discussed earlier BDDs support all the operations we need for smbolic model checking take conjunction of two BDDs take disjunction of two BDDs test equivalence of two BDDs test subsumption between two BDDs negate a BDD test if a BDD satisfiable test if a BDD is a tautolog eistential variable elimination

4 Binar Decision rees Given a variable order, in each level of the tree, branch on the value of the variable in that level. Eamples for boolean formulas on two variables Variable order:, alse

5 Reduced and Ordered Binar Decision Diagrams We are interested in Reduced and Ordered Binar Decision Diagrams Reduced: Merge all identical sub-trees in the binar decision tree (converts it to a directed-acclic graph) Remove redundant tests (if the false and true branches for a node go to the same place, remove that node) Ordered We pick a fi order for the Boolean variables: 0 < 1 < 2 < he nodes in the BDD are listed based on this ordering

6 BDDs Repeatedl appl the following transformations to a binar decision tree: 1. Remove duplicate terminals 2. Remove duplicate non-terminals 3. Remove redundant tests hese transformations transform the tree to a directed acclic graph

7 Binar Decision rees vs. BDDs alse

8 Good News About BDDs Given BDDs for two boolean logic formulas and G he BDDs for G and G are of size G (and can be computed in that time) he BDD for is of size (and can be computed in that time)? G can be checked in linear time Satisfiabilit of can be checked in constant time No, this does not mean that ou can solve SA in constant time

9 Bad News About BDDs he size of a BDD can be eponential in the number of boolean variables he sizes of the BDDs are ver sensitive to the variable ordering. Bad variable ordering can cause eponential increase in the size of the BDD here are functions which have BDDs that are eponential for an variable ordering (for eample binar multiplication) Pre condition (EX) computation requires a sequence of eistential variable eliminations A sequence of eistential variable eliminations can cause an eponential blow-up in the size of the BDD

10 BDDs are Sensitive to Variable Ordering Identit relation for two variables: ( ) (' ) Variable order:,,, ' Variable order:,,, ' or n variables, 3n+2 nodes or n variables, 3 2 n 1 nodes

11 BDDs from Another Perspective An Boolean formula f on variables 1, 2,, n can be written as (called Shannon epansion): f = i f [rue/ i ] i f [alse/ i ] (this is an if-then-else) BDDs use this idea his node corresponds to the formula alse, which comes from the Shannon epansion: alse [alse/] his node corresponds to the formula, which comes from the Shannon epansion: [rue/]

12 How to Implement BDDs? irst, let s pick a data structure for a BDD node: tpe verte = record low, high: verte; inde: 1.. n+1; val: {0, 1, X}; id: integer; end; High is the true branch, Low is the false branch Inde from the variable ordering, each inde value corresponds to one variable n is the number of Boolean variables 0 corresponds to false, 1 corresponds to true, X corresponds to no value his field will be used to generate a unique id for each unique function

13 How to Implement a BDD? A BDD is a rooted directed graph with verte set V containing two tpes of vertices nonterminal vertices: inde {1, 2,.., n} low(v) and high(v) are in V val(v) is X terminal vertices: inde(v) = n+1 val(v) is 0 or 1 low(v) and high(v) are null

14 BDD Reduce algorithm Start from the terminal nodes and go towards to root 1. Remove duplicate terminals: If two terminal vertices have the same value, remove one of them redirect all the incoming arcs to the other one 2. Remove duplicate non-terminals: If two nonterminal vertives, v and u have the same inde and v.low=u.low and v.high=u.high then eliminate one of them and redirect all incoming arcs to the other one 3. Remove redundant tests: If a nonterminal verte v has v.low=v.high then remove v and redirect all incoming arcs to low(v)

15 Reduce Algorithm function Reduce(v: verte): verte; var subgraph: arra[1.. G ] of verte; var vlist: arra[1.. n+1] of list of verte; begin Put each verte u reachable from v on list vlist[u.inde] netid := 0; for i := n+1 downto 1 do begin Q := empt set; for each u in vlist[i] do if u.inde = n+1 then add <ke,u> to Q where ke=(u.value) {terminal} else if u.low.id=u.high.id then u.id := u.low.id; {redundant verte} else add <ke,u> to Q where ke =(u.low.id,u.high.id);

16 Reduce Algorithm Continued Sort elements of Q b kes; oldke := (-1,-1); {unmatchable ke} for each <ke,u> in Q removed in order do if ke = oldke then u.id := netid; {matches eisting verte} else begin {unique verte} netid :=netid+1; u.id:=netid; subgraph[netid]:=u; u.low := subgraph[u.low.id]; u.high := subgraph[u.high.id]; oldke := ke; end; end; {end of the outmost for loop} return(subgraph[v.id]); end;

17 Reduce Algorithm Reduce algorithm can be done in linear time here is a linear time leicographic sorting method based on bucket sorting for sorting the vertices according to their kes Assuming a linear time sorting routine, processing at each level requires time proportional to the number of vertices at that level, and each level is processed once, resulting in linear time compleit

18 Appl Algorithm We can use the Shannon epansion to recursivel compute an binar Boolean operation Given BDDs for f and g and binar operation op f op g = i (f [/ i ] op g [/ i ]) i (f [/ i ] op g [/ i ]) So the idea is to start at the root of f and g and recursivel call true and false branches Ke idea: Use memoization!

19 Appl Algorithm var : arra[1.. G1, 1.. G2 ] of verte; {init. to null} function Appl(v1, v2: verte; <op> operator): verte; begin u := [v1.id, v2.id]; if u!= null then return(u); {alread computed} u := new verte; [v1.id, v2.id] := u; u.value := v1.value <op> v2.value; if u.value!= X then u.inde := n+1; u.low :=null; u.high :=null; {terminal} else begin {nonterminal} u.inde := Min(v1.inde, v2.inde); if v1.inde = u.inde then vlow1 := v1.low; vhigh1 := v1.high; else vlow1 := v1; vhigh1 := v1; if v2.inde = u.inde then vlow2 := v2.low; vhigh2 :=v2.high; else vlow2 := v2; vhigh2 := v2; u.low := Appl(vlow1, vlow2); u.high := Appl(vhigh1, vhigh2); end; return(u); end;

20 Appl Algorithm Given two input BDDs f and g the size of the resulting BDD for f <op> g is f g and it can be computed in that time he important point is to use memoization so that for an pair of vertices (one from each input BDD) the computation is done eactl once Since there are at most f g pairs the compleit is f g We do constant amount of work for each pair of nodes

Graph-Based Algorithms for Boolean Function Manipulation 12. Abstract

Graph-Based Algorithms for Boolean Function Manipulation 12. Abstract Graph-Based Algorithms for Boolean Function Manipulation 2 Randal E. Bryant 3 Abstract In this paper we present a new data structure for representing Boolean functions and an associated set of manipulation

More information

Behavior models and verification Lecture 6

Behavior models and verification Lecture 6 Behavior models and verification Lecture 6 http://d3s.mff.cuni.cz Jan Kofroň, František Plášil Model checking For a Kripke structure M = (S, I, R, L) over AP and a (state based) temporal logic formula

More information

NOTICE WARNING CONCERNING COPYRIGHT RESTRICTIONS: The copyright law of the United States (title 17, U.S. Code) governs the making of photocopies or

NOTICE WARNING CONCERNING COPYRIGHT RESTRICTIONS: The copyright law of the United States (title 17, U.S. Code) governs the making of photocopies or NOTICE WARNING CONCERNING COPYRIGHT RESTRICTIONS: The copyright law of the United States (title 17, U.S. Code) governs the making of photocopies or other reproductions of copyrighted material. Any copying

More information

Model Checking I Binary Decision Diagrams

Model Checking I Binary Decision Diagrams /42 Model Checking I Binary Decision Diagrams Edmund M. Clarke, Jr. School of Computer Science Carnegie Mellon University Pittsburgh, PA 523 2/42 Binary Decision Diagrams Ordered binary decision diagrams

More information

Boolean Representations and Combinatorial Equivalence

Boolean Representations and Combinatorial Equivalence Chapter 2 Boolean Representations and Combinatorial Equivalence This chapter introduces different representations of Boolean functions. It then discusses the applications of these representations for proving

More information

Binary Decision Diagrams

Binary Decision Diagrams 5-44 Bug Catching: Automated Program Verification and Testing based on slides by SagarChaki 2 Carnegie Mellon University BDDs in a nutshell Typically mean Reduced Ordered (ROBDDs) Canonical representation

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 5: Binary Decision Diagrams. Historical Context. Binary Decision Trees

Motivation. CS389L: Automated Logical Reasoning. Lecture 5: Binary Decision Diagrams. Historical Context. Binary Decision Trees Motivation CS389L: Automated Logical Reasoning Lecture 5: Binary Decision Diagrams Işıl Dillig Previous lectures: How to determine satisfiability of propositional formulas Sometimes need to efficiently

More information

Binary Decision Diagrams (BDD)

Binary Decision Diagrams (BDD) Binary Decision Diagrams (BDD) Contents Motivation for Decision diagrams Binary Decision Diagrams ROBDD Effect of Variable Ordering on BDD size BDD operations Encoding state machines Reachability Analysis

More information

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan Remember Symbolic Model Checking Represent sets of states and the transition relation as Boolean logic formulas

More information

Binary Decision Diagrams

Binary Decision Diagrams Logic and roof Hilary 2016 James Worrell Binary Decision Diagrams A propositional formula is determined up to logical equivalence by its truth table. If the formula has n variables then its truth table

More information

Symbolic Model Checking

Symbolic Model Checking Bug Catching 5-398 Symbolic Model Checking Hao Zheng Dept. of Computer Science & Eng. Univ. of South Florida Overview CTL model checking operates on sets. Calculates the fix points over finite state sets.

More information

Project 1 Part II: Metaproduct Primes

Project 1 Part II: Metaproduct Primes Project Part II: Metaproduct Primes What ou know Basic BDD data structure and JAVA implementation A little bit about these things called metaproducts What ou don t know All the tricks with metaproducts

More information

Formal Verification. Lecture 7: Introduction to Binary Decision Diagrams (BDDs)

Formal Verification. Lecture 7: Introduction to Binary Decision Diagrams (BDDs) Formal Verification Lecture 7: Introduction to Binary Decision Diagrams (BDDs) Jacques Fleuriot jdf@inf.ac.uk Diagrams from Huth & Ryan, 2nd Ed. Recap Previously: CTL and LTL Model Checking algorithms

More information

24 Nov Boolean Operations. Boolean Algebra. Boolean Functions and Expressions. Boolean Functions and Expressions

24 Nov Boolean Operations. Boolean Algebra. Boolean Functions and Expressions. Boolean Functions and Expressions 24 Nov 25 Boolean Algebra Boolean algebra provides the operations and the rules for working with the set {, }. These are the rules that underlie electronic circuits, and the methods we will discuss are

More information

EECS 219C: Formal Methods Binary Decision Diagrams (BDDs) Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Formal Methods Binary Decision Diagrams (BDDs) Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Formal Methods Binary Decision Diagrams (BDDs) Sanjit A. Seshia EECS, UC Berkeley Boolean Function Representations Syntactic: e.g.: CNF, DNF (SOP), Circuit Semantic: e.g.: Truth table, Binary

More information

Binary recursion. Unate functions. If a cover C(f) is unate in xj, x, then f is unate in xj. x

Binary recursion. Unate functions. If a cover C(f) is unate in xj, x, then f is unate in xj. x Binary recursion Unate unctions! Theorem I a cover C() is unate in,, then is unate in.! Theorem I is unate in,, then every prime implicant o is unate in. Why are unate unctions so special?! Special Boolean

More information

2009 Haskell January Test Binary Decision Diagrams

2009 Haskell January Test Binary Decision Diagrams 009 Haskell January est Binary Decision Diagrams his test comprises four parts and the maximum mark is 5. Parts I, II and III are worth of the 5 marks available. he 009 Haskell Programming Prize will be

More information

CS 403 Compiler Construction Lecture 8 Syntax Tree and Intermediate Code Generation [Based on Chapter 6 of Aho2] This Lecture

CS 403 Compiler Construction Lecture 8 Syntax Tree and Intermediate Code Generation [Based on Chapter 6 of Aho2] This Lecture CS 403 Compiler Construction Lecture 8 Snta Tree and Intermediate Code Generation [Based on Chapter 6 of Aho2] 1 This Lecture 2 1 Remember: Phases of a Compiler This lecture: Intermediate Code This lecture:

More information

Lecture Notes on AVL Trees

Lecture Notes on AVL Trees Lecture Notes on AVL Trees 15-122: Principles of Imperative Computation Frank Pfenning Lecture 19 March 28, 2013 1 Introduction Binar search trees are an ecellent data structure to implement associative

More information

Boolean Functions (10.1) Representing Boolean Functions (10.2) Logic Gates (10.3)

Boolean Functions (10.1) Representing Boolean Functions (10.2) Logic Gates (10.3) Chapter (Part ): Boolean Algebra Boolean Functions (.) Representing Boolean Functions (.2) Logic Gates (.3) It has started from the book titled The laws of thought written b George Boole in 854 Claude

More information

Purely Functional Data structures (3) Purely Functional Data structures (4) Numerical Representations (1)

Purely Functional Data structures (3) Purely Functional Data structures (4) Numerical Representations (1) MGS 2011: FUN Lecture 2 Purel Functional Data Structures Henrik Nilsson Universit of Nottingham, UK Purel Functional Data structures (3) Linked list: After insert, if persistent: 1 2 3 1 7 Numerical Representations

More information

Unit 4: Formal Verification

Unit 4: Formal Verification Course contents Unit 4: Formal Verification Logic synthesis basics Binary-decision diagram (BDD) Verification Logic optimization Technology mapping Readings Chapter 11 Unit 4 1 Logic Synthesis & Verification

More information

Lecture 16 Notes AVL Trees

Lecture 16 Notes AVL Trees Lecture 16 Notes AVL Trees 15-122: Principles of Imperative Computation (Fall 2015) Frank Pfenning 1 Introduction Binar search trees are an ecellent data structure to implement associative arras, maps,

More information

Lecture 10: Combinational Circuits

Lecture 10: Combinational Circuits Computer Architecture Lecture : Combinational Circuits Previous two lectures.! TOY machine. Net two lectures.! Digital circuits. George Boole (85 864) Claude Shannon (96 2) Culminating lecture.! Putting

More information

B + -trees. Kerttu Pollari-Malmi

B + -trees. Kerttu Pollari-Malmi B + -trees Kerttu Pollari-Malmi This tet is based partl on the course tet book b Cormen and partl on the old lecture slides written b Matti Luukkainen and Matti Nkänen. 1 Introduction At first, read the

More information

Unit 2: Function Transformation Chapter 1

Unit 2: Function Transformation Chapter 1 Basic Transformations Reflections Inverses Unit 2: Function Transformation Chapter 1 Section 1.1: Horizontal and Vertical Transformations A of a function alters the and an combination of the of the graph.

More information

Overview. Overview. Example: Full Adder Diagnosis. Example: Full Adder Diagnosis. Valued CSP. Diagnosis using Bounded Search and Symbolic Inference

Overview. Overview. Example: Full Adder Diagnosis. Example: Full Adder Diagnosis. Valued CSP. Diagnosis using Bounded Search and Symbolic Inference Overview Diagnosis using Bounded Search and Smbolic Inference Martin Sachenbacher and Brian C. Williams MIT CSAIL Soft Constraints Framework Characteriing Structure in Soft Constraints Eploiting Structure

More information

AVL Trees. Reading: 9.2

AVL Trees. Reading: 9.2 AVL Trees Reading: 9.2 Balance Factor of a Node The difference in height of its two subtrees (h R -h L ) Balanced Node if -1 BF 1 Unbalanced Node if BF 1 h L h R Balance Factor of a Binar Tree Corresponds

More information

Data Structures for Symbolic Multi-Valued Model-Checking

Data Structures for Symbolic Multi-Valued Model-Checking Data Structures for Symbolic Multi-Valued Model-Checking Marsha Chechik, Arie Gurfinkel, Benet Devereux, Albert Lai and Steve Easterbrook Department of Computer Science, University of oronto, oronto, ON

More information

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner GLOBAL EDITION Interactive Computer Graphics A Top-Down Approach with WebGL SEVENTH EDITION Edward Angel Dave Shreiner This page is intentionall left blank. 4.10 Concatenation of Transformations 219 in

More information

CS 101 Computer Programming and utilization. Dr Deepak B Phatak Subrao Nilekani Chair Professor Department of CSE, Kanwal Rekhi Building IIT Bombay

CS 101 Computer Programming and utilization. Dr Deepak B Phatak Subrao Nilekani Chair Professor Department of CSE, Kanwal Rekhi Building IIT Bombay CS 101 Computer Programming and utilization Dr Deepak B Phatak Subrao Nilekani Chair Professor Department of CSE, Kanwal Rekhi Building Bombay Lecture 4, Conditional execution of instructions Friday, August

More information

L4: Binary Decision Diagrams. Reading material

L4: Binary Decision Diagrams. Reading material L4: Binary Decision Diagrams de Micheli pp. 75-85 Reading material R. Bryant, Graph-ased algorithms for Boolean function manipulation, IEEE Transactions on computers, C-35, No 8, August 1986; can e downloaded

More information

Taylor Expansion Diagrams: A Canonical Representation for Verification of Data Flow Designs

Taylor Expansion Diagrams: A Canonical Representation for Verification of Data Flow Designs Talor Epansion Diagrams: anonical Representation for Verification of Data Flow Designs Maciej iesielski, Priank Kalla, Serkan skar Department of Electrical and omputer Engineering Universit of Massachusetts,

More information

Graph-Based Algorithms for Boolean Function Manipulation

Graph-Based Algorithms for Boolean Function Manipulation Graph-Based Algorithms for Boolean Function Manipulation Introduction Boolean algebra forms a corner stone of Computer system & Digital design. So, we need efficient algorithms to represent & manipulate

More information

Compiler construction

Compiler construction This lecture Compiler construction Lecture 5: Project etensions Magnus Mreen Spring 2018 Chalmers Universit o Technolog Gothenburg Universit Some project etensions: Arras Pointers and structures Object-oriented

More information

Week 10. Topic 1 Polynomial Functions

Week 10. Topic 1 Polynomial Functions Week 10 Topic 1 Polnomial Functions 1 Week 10 Topic 1 Polnomial Functions Reading Polnomial functions result from adding power functions 1 together. Their graphs can be ver complicated, so the come up

More information

6: Combinational Circuits

6: Combinational Circuits Computer Architecture 6: Combinational Circuits Previous two lectures. von Neumann machine. This lectures. Boolean circuits. Later in the course. Putting it all together and building a TOY machine. George

More information

Action Language Verifier, Extended

Action Language Verifier, Extended Action Language Verifier, Extended Tuba Yavuz-Kahveci 1, Constantinos Bartzis 2, and Tevfik Bultan 3 1 University of Florida 2 Carnegie Mellon University 3 UC, Santa Barbara 1 Introduction Action Language

More information

Constraint satisfaction search

Constraint satisfaction search CS 70 Foundations of AI Lecture 6 Constraint satisfaction search Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square Search problem A search problem: Search space (or state space): a set of objects among

More information

Symbolic Manipulation of Boolean Functions Using a Graphical Representation. Abstract

Symbolic Manipulation of Boolean Functions Using a Graphical Representation. Abstract Symbolic Manipulation of Boolean Functions Using a Graphical Representation Randal E. Bryant 1 Dept. of Computer Science Carnegie-Mellon University Abstract In this paper we describe a data structure for

More information

Chapter 8: Data Abstractions

Chapter 8: Data Abstractions Chapter 8: Data Abstractions Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Presentation files modified by Farn Wang Copyright 28 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

More information

CSC 263 Lecture 4. September 13, 2006

CSC 263 Lecture 4. September 13, 2006 S 263 Lecture 4 September 13, 2006 7 ugmenting Red-lack Trees 7.1 Introduction Suppose that ou are asked to implement an DT that is the same as a dictionar but has one additional operation: operation:

More information

Using the same procedure that was used in Project 5, enter matrix A and its label into an Excel spreadsheet:

Using the same procedure that was used in Project 5, enter matrix A and its label into an Excel spreadsheet: Math 6: Ecel Lab 6 Summer Inverse Matrices, Determinates and Applications: (Stud sections, 6, 7 and in the matri book in order to full understand the topic.) This Lab will illustrate how Ecel can help

More information

Outline and Reading. Quick-Sort. Partition. Quick-Sort. Quick-Sort Tree. Execution Example

Outline and Reading. Quick-Sort. Partition. Quick-Sort. Quick-Sort Tree. Execution Example Outline and Reading Quick-Sort 7 4 9 6 2 fi 2 4 6 7 9 4 2 fi 2 4 7 9 fi 7 9 2 fi 2 Quick-sort ( 0.3) Algorithm Partition step Quick-sort tree Eecution eample Analysis of quick-sort In-place quick-sort

More information

It s Not Complex Just Its Solutions Are Complex!

It s Not Complex Just Its Solutions Are Complex! It s Not Comple Just Its Solutions Are Comple! Solving Quadratics with Comple Solutions 15.5 Learning Goals In this lesson, ou will: Calculate comple roots of quadratic equations and comple zeros of quadratic

More information

Optional: Building a processor from scratch

Optional: Building a processor from scratch Optional: Building a processor from scratch In this assignment we are going build a computer processor from the ground up, starting with transistors, and ending with a small but powerful processor. The

More information

ECE 5775 (Fall 17) High-Level Digital Design Automation. Binary Decision Diagrams Static Timing Analysis

ECE 5775 (Fall 17) High-Level Digital Design Automation. Binary Decision Diagrams Static Timing Analysis ECE 5775 (Fall 17) High-Level Digital Design Automation Binary Decision Diagrams Static Timing Analysis Announcements Start early on Lab 1 (CORDIC design) Fixed-point design should not have usage of DSP48s

More information

Chapters 11 and 13, Graph Data Mining

Chapters 11 and 13, Graph Data Mining CSI 4352, Introduction to Data Mining Chapters 11 and 13, Graph Data Mining Young-Rae Cho Associate Professor Department of Computer Science Balor Universit Graph Representation Graph An ordered pair GV,E

More information

Exponential Functions. Christopher Thomas

Exponential Functions. Christopher Thomas Mathematics Learning Centre Eponential Functions Christopher Thomas c 1998 Universit of Sdne Mathematics Learning Centre, Universit of Sdne 1 1 Eponential Functions 1.1 The functions =2 and =2 From our

More information

1-1. Functions. Lesson 1-1. What You ll Learn. Active Vocabulary. Scan Lesson 1-1. Write two things that you already know about functions.

1-1. Functions. Lesson 1-1. What You ll Learn. Active Vocabulary. Scan Lesson 1-1. Write two things that you already know about functions. 1-1 Functions What You ll Learn Scan Lesson 1- Write two things that ou alread know about functions. Lesson 1-1 Active Vocabular New Vocabular Write the definition net to each term. domain dependent variable

More information

Chapter 6: Multilevel Combinational Circuits. Name: Lương Văn Minh No. :

Chapter 6: Multilevel Combinational Circuits. Name: Lương Văn Minh No. : Chapter 6: Multilevel Combinational Circuits Name: Lương Văn Minh No. : 09070452 Overview 6.1 Boolean Networks 6.2 Special Classes of Circuits 6.3 Binary Decision Diagrams 2 Overview 6.1 Boolean Networks

More information

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus: Boolean Algebra and Simplification CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Topics Motivation: Simplifying Conditional Expressions

More information

CS 314H Honors Data Structures Fall 2017 Programming Assignment #6 Treaps Due November 12/15/17, 2017

CS 314H Honors Data Structures Fall 2017 Programming Assignment #6 Treaps Due November 12/15/17, 2017 CS H Honors Data Structures Fall 207 Programming Assignment # Treaps Due November 2//7, 207 In this assignment ou will work individuall to implement a map (associative lookup) using a data structure called

More information

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics 400 lecture note #4 [Ch 6] Set Theory 1. Basic Concepts and Definitions 1) Basics Element: ; A is a set consisting of elements x which is in a/another set S such that P(x) is true. Empty set: notated {

More information

Lecture Notes on Binary Decision Diagrams

Lecture Notes on Binary Decision Diagrams Lecture Notes on Binary Decision Diagrams 15-122: Principles of Imperative Computation William Lovas Notes by Frank Pfenning Lecture 25 April 21, 2011 1 Introduction In this lecture we revisit the important

More information

Chapter 9 Deductive Arguments II Truth-Functional Logic. Tutorial: Truth Tables

Chapter 9 Deductive Arguments II Truth-Functional Logic. Tutorial: Truth Tables Chapter 9 Deductive Arguments II ruth-unctional Logic utorial: ruth ables ruth ables he aim of this tutorial is to help you learn to construct truth tables and use them to test the validity of arguments.

More information

INFORMATION CODING AND NEURAL COMPUTING

INFORMATION CODING AND NEURAL COMPUTING INFORATION CODING AND NEURAL COPUTING J. Pedro Neto 1, Hava T. Siegelmann 2, and J. Féli Costa 1 jpn@di.fc.ul.pt, iehava@ie.technion.ac.il, and fgc@di.fc.ul.pt 1 Faculdade de Ciências da Universidade de

More information

Introduction to Shape and Pointer Analysis

Introduction to Shape and Pointer Analysis Introduction to Shape and Pointer Analsis CS 502 Lecture 11 10/30/08 Some slides adapted from Nielson, Nielson, Hankin Principles of Program Analsis Analsis of the Heap Thus far, we have focussed on control

More information

Algebra 1. 7 th Standard Complete Graphs. Categories Quadratic (p. 3-9) Exponential (p ) Absolute Value (p ) Linear (p.

Algebra 1. 7 th Standard Complete Graphs. Categories Quadratic (p. 3-9) Exponential (p ) Absolute Value (p ) Linear (p. Algebra 1 7 th Standard Complete Graphs Categories Quadratic (p. -9) Eponential (p. 10-1) Absolute Value (p. 14-17) Linear (p. 18-9) Summative Assessment Date: Wednesda, November 8 th Page 1 Standard:

More information

Verification of Arithmetic Circuits with Binary Moment Diagrams

Verification of Arithmetic Circuits with Binary Moment Diagrams Verification of Arithmetic Circuits with Binar Moment Diagrams Randal E. Brant, Yirng-An Chen Carnegie Mellon Universit Pittsburgh, PA 5 Abstract Binar Moment Diagrams (BMDs) provide a canonical representations

More information

A Firewall Application Using Binary Decision Diagram

A Firewall Application Using Binary Decision Diagram 2017 2nd International Conference on Computer, Network Security and Communication Engineering (CNSCE 2017) ISBN: 978-1-60595-439-4 A Firewall Application Using Binary Decision Diagram Jun-feng ZHAO 1,

More information

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Isil Dillig, Thomas Dillig, Alex Aiken Stanford University Scalability and Formula Size Many program analysis

More information

Bias-Variance Decomposition Error Estimators

Bias-Variance Decomposition Error Estimators Bias-Variance Decomposition Error Estimators Cross-Validation Bias-Variance tradeoff Intuition Model too simple does not fit the data well a biased solution. Model too comple small changes to the data,

More information

Bias-Variance Decomposition Error Estimators Cross-Validation

Bias-Variance Decomposition Error Estimators Cross-Validation Bias-Variance Decomposition Error Estimators Cross-Validation Bias-Variance tradeoff Intuition Model too simple does not fit the data well a biased solution. Model too comple small changes to the data,

More information

1B1b Implementing Data Structures Lists, Hash Tables and Trees

1B1b Implementing Data Structures Lists, Hash Tables and Trees 1B1b Implementing Data Structures Lists, Hash Tables and Trees Agenda Classes and abstract data types. Containers. Iteration. Lists Hash Tables Trees Note here we only deal with the implementation of data

More information

Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking

Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking Instructor: Tevfik Bultan Buchi Automata Language

More information

ENGIN 112. Intro to Electrical and Computer Engineering

ENGIN 112. Intro to Electrical and Computer Engineering ENIN 2 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra ENIN2 L6: More Boolean Algebra September 5, 23 A B Overview Epressing Boolean functions Relationships between algebraic

More information

Lecture1: Symbolic Model Checking with BDDs. Edmund M. Clarke, Jr. Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213

Lecture1: Symbolic Model Checking with BDDs. Edmund M. Clarke, Jr. Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213 Lecture: Symbolic Model Checking with BDDs Edmund M Clarke, Jr Computer Science Department Carnegie Mellon University Pittsburgh, PA 523 Temporal Logic Model Checking Specification Language: A propositional

More information

. p.1/23. Today. 1. Questions and discussion from lecture. 2. Type-checking Functions Arrays Records (maybe)

. p.1/23. Today. 1. Questions and discussion from lecture. 2. Type-checking Functions Arrays Records (maybe) . p.1/23 Today 1. Questions and discussion from lecture. 2. Type-checking Functions Arrays Records (maybe) . p.2/23 Type-checking functions Aspects: Overview of checks 6, 7 Declaration header Declaration

More information

Outline. First Quiz Results. Exercise Five Goals. Question Three. Questions One and Two. Exercise five if statements February 28, 2006

Outline. First Quiz Results. Exercise Five Goals. Question Three. Questions One and Two. Exercise five if statements February 28, 2006 Eercise five if statements February 8, 6 Laboratory V Program Control Using if Statements Larry Caretto Computer Science 6 Computing in Engineering and Science February 8, 6 Outline Review first quiz Summarize

More information

Appears in LICS'97 2 Denition 2 A verte v in a BED denotes a Boolean function f v dened recursively as: If v is a terminal verte then f v = value(v).

Appears in LICS'97 2 Denition 2 A verte v in a BED denotes a Boolean function f v dened recursively as: If v is a terminal verte then f v = value(v). Boolean Epression Diagrams (Appears in LICS'97) Henrik Reif Andersen and Henrik Hulgaard Department of Information Technology Building 344 Technical University of Denmark DK-2800 Lyngby Denmark e-mail:

More information

CS 314H Algorithms and Data Structures Fall 2012 Programming Assignment #6 Treaps Due November 11/14/16, 2012

CS 314H Algorithms and Data Structures Fall 2012 Programming Assignment #6 Treaps Due November 11/14/16, 2012 CS H Algorithms and Data Structures Fall 202 Programming Assignment # Treaps Due November //, 202 In this assignment ou will work in pairs to implement a map (associative lookup) using a data structure

More information

NO WARRANTY. Use of any trademarks in this presentation is not intended in any way to infringe on the rights of the trademark holder.

NO WARRANTY. Use of any trademarks in this presentation is not intended in any way to infringe on the rights of the trademark holder. NO WARRANTY THIS MATERIAL OF CARNEGIE MELLON UNIVERSITY AND ITS SOFTWARE ENGINEERING INSTITUTE IS FURNISHED ON AN AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED

More information

Binary Decision Diagrams (BDDs) Pingqiang Zhou ShanghaiTech University

Binary Decision Diagrams (BDDs) Pingqiang Zhou ShanghaiTech University Binary Decision Diagrams (BDDs) Pingqiang Zhou ShanghaiTech University Computational Boolean Algera Representations Applying unate recursive paradigm (URP) in solving tautology is a great warm up example.

More information

Lecture 9. Monday, January 31 CS 205 Programming for the Sciences - Lecture 9 1

Lecture 9. Monday, January 31 CS 205 Programming for the Sciences - Lecture 9 1 Lecture 9 Reminder: Programming Assignment 3 is due Wednesday by 4:30pm. Exam 1 is on Friday. Exactly like Prog. Assign. 2; no collaboration or help from the instructor. Log into Windows/ACENET. Start

More information

Building up a language SICP Variations on a Scheme. Meval. The Core Evaluator. Eval. Apply. 2. syntax procedures. 1.

Building up a language SICP Variations on a Scheme. Meval. The Core Evaluator. Eval. Apply. 2. syntax procedures. 1. 6.001 SICP Variations on a Scheme Scheme Evaluator A Grand Tour Techniques for language design: Interpretation: eval/appl Semantics vs. snta Sntactic transformations Building up a language... 3. 1. eval/appl

More information

Winter Compiler Construction T9 IR part 2 + Runtime organization. Announcements. Today. Know thy group s code

Winter Compiler Construction T9 IR part 2 + Runtime organization. Announcements. Today. Know thy group s code Winter 26-27 Compiler Construction T9 IR part 2 + Runtime organization Mool Sagiv and Roman Manevich School of Computer Science Tel-Aviv Universit Announcements What is epected in PA3 documentation (5

More information

Chapter 10 Part 1: Reduction

Chapter 10 Part 1: Reduction //06 Polynomial-Time Reduction Suppose we could solve Y in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Chapter 0 Part : Reduction Reduction. Problem X

More information

CHAD Language Reference Manual

CHAD Language Reference Manual CHAD Language Reference Manual INTRODUCTION The CHAD programming language is a limited purpose programming language designed to allow teachers and students to quickly code algorithms involving arrays,

More information

2.3. Horizontal and Vertical Translations of Functions. Investigate

2.3. Horizontal and Vertical Translations of Functions. Investigate .3 Horizontal and Vertical Translations of Functions When a video game developer is designing a game, she might have several objects displaed on the computer screen that move from one place to another

More information

Implementation of a Sudoku Solver Using Reduction to SAT

Implementation of a Sudoku Solver Using Reduction to SAT Implementation of a Sudoku Solver Using Reduction to SAT For this project you will develop a Sudoku solver that receives an input puzzle and computes a solution, if one exists. Your solver will: read an

More information

syntax tree - * * * - * * * * * 2 1 * * 2 * (2 * 1) - (1 + 0)

syntax tree - * * * - * * * * * 2 1 * * 2 * (2 * 1) - (1 + 0) 0//7 xpression rees rom last time: we can draw a syntax tree for the Java expression ( 0). 0 ASS, GRAMMARS, PARSING, R RAVRSALS Lecture 3 CS0 all 07 Preorder, Postorder, and Inorder Preorder, Postorder,

More information

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, THE UNIVERSITY OF NEW MEXICO ECE-238L: Computer Logic Design Fall 2013.

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, THE UNIVERSITY OF NEW MEXICO ECE-238L: Computer Logic Design Fall 2013. ECE-8L: Computer Logic Design Fall Notes - Chapter BINARY NUMBER CONVERSIONS DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-b-digit representation of a positive integer number (powers

More information

LECTURE 2 An Introduction to Boolean Algebra

LECTURE 2 An Introduction to Boolean Algebra IST 210: Boot Camp Ritendra Datta LECTURE 2 An Introduction to Boolean Algebra 2.1. Outline of Lecture Fundamentals Negation, Conjunction, and Disjunction Laws of Boolean Algebra Constructing Truth Tables

More information

CA4003 Compiler Construction Assignment Language Definition

CA4003 Compiler Construction Assignment Language Definition CA4003 Compiler Construction Assignment Language Definition David Sinclair 2017-2018 1 Overview The language is not case sensitive. A nonterminal, X, is represented by enclosing it in angle brackets, e.g.

More information

8.1 Polynomial-Time Reductions

8.1 Polynomial-Time Reductions 8.1 Polynomial-Time Reductions Classify Problems According to Computational Requirements Q. Which problems will we be able to solve in practice? A working definition. Those with polynomial-time algorithms.

More information

April 2, From The Edge: Calculating Financial MEAN in R:BASE!

April 2, From The Edge: Calculating Financial MEAN in R:BASE! April 2, 2000 From the Edge: Calculating Financial MEAN in R:BASE! Section: Functions Chapter: Running R:BASE Your Way! Platform: R:BASE 2000 (ver 6.5) for Windows Build: 1.839xRT03 and Higher... Wall

More information

2SAT Andreas Klappenecker

2SAT Andreas Klappenecker 2SAT Andreas Klappenecker The Problem Can we make the following boolean formula true? ( x y) ( y z) (z y)! Terminology A boolean variable is a variable that can be assigned the values true (T) or false

More information

Search Trees. Chapter 11

Search Trees. Chapter 11 Search Trees Chapter 6 4 8 9 Outline Binar Search Trees AVL Trees Spla Trees Outline Binar Search Trees AVL Trees Spla Trees Binar Search Trees A binar search tree is a proper binar tree storing ke-value

More information

CS357 Lecture: BDD basics. David Dill

CS357 Lecture: BDD basics. David Dill CS357 Lecture: BDD basics David Dill BDDs (Boolean/binary decision diagrams) BDDs are a very successful representation for Boolean functions. A BDD represents a Boolean function on variables x, x 2,...

More information

Copyright 2009, Artur Czumaj 1

Copyright 2009, Artur Czumaj 1 CS 244 Algorithm Design Instructor: Artur Czumaj Lecture 2 Sorting You already know sorting algorithms Now you will see more We will want to understand generic techniques used for sorting! Lectures: Monday

More information

Int. J. Advanced Networking and Applications 1430 Volume:03 Issue:06 Pages: (2012) ISSN :

Int. J. Advanced Networking and Applications 1430 Volume:03 Issue:06 Pages: (2012) ISSN : 1430 Binary Decision Diagrams and Its Variable Ordering for Disjoint Network Manoj Singhal Associate professor, Department of Information Technology, Accurate Institute of Management & Technology, Greater

More information

1/28/2013. Synthesis. The Y-diagram Revisited. Structural Behavioral. More abstract designs Physical. CAD for VLSI 2

1/28/2013. Synthesis. The Y-diagram Revisited. Structural Behavioral. More abstract designs Physical. CAD for VLSI 2 Synthesis The Y-diagram Revisited Structural Behavioral More abstract designs Physical CAD for VLSI 2 1 Structural Synthesis Behavioral Physical CAD for VLSI 3 Structural Processor Memory Bus Behavioral

More information

Write a code fragment that prints yes if xc is in the interval and no if it is not.

Write a code fragment that prints yes if xc is in the interval and no if it is not. CS2 Lecture 4 28/9/9 Previous Lecture: Branching Logical operators oday s Lecture: Logical operators and values More branching nesting he idea of repetition Announcements: Section this week in the computer

More information

Learning Objectives for Section Graphs and Lines. Cartesian coordinate system. Graphs

Learning Objectives for Section Graphs and Lines. Cartesian coordinate system. Graphs Learning Objectives for Section 3.1-2 Graphs and Lines After this lecture and the assigned homework, ou should be able to calculate the slope of a line. identif and work with the Cartesian coordinate sstem.

More information

Binary Trees. Binary Search Trees

Binary Trees. Binary Search Trees Binar Trees A binar tree is a rooted tree where ever node has at most two children. When a node has onl one child, we still distinguish whether this is the left child or the right child of the parent.

More information

BDDC v2 A basic bdd-based logical calculator

BDDC v2 A basic bdd-based logical calculator BDDC v2 A basic bdd-based logical calculator Pascal RAYMOND November 24, 2008, (rev. September 28, 2015) BDDC is a tool for manipulating logical formula. It is based on a Binary Decision Diagram library,

More information

NUMERICAL DIFFERENTIATION

NUMERICAL DIFFERENTIATION EP08 Computational Metods in Psics Notes on Lecture Numerical Dierentiation 1 NUMERICAL DIFFERENTIATION For a unction irst and second derivatives are given as ollows: Metod First Derivative Truncation

More information

Solving 3-SAT. Radboud University Nijmegen. Bachelor Thesis. Supervisors: Henk Barendregt Alexandra Silva. Author: Peter Maandag s

Solving 3-SAT. Radboud University Nijmegen. Bachelor Thesis. Supervisors: Henk Barendregt Alexandra Silva. Author: Peter Maandag s Solving 3-SAT Radboud University Nijmegen Bachelor Thesis Author: Peter Maandag s3047121 Supervisors: Henk Barendregt Alexandra Silva July 2, 2012 Contents 1 Introduction 2 1.1 Problem context............................

More information

Lecture Notes on Dynamic Programming

Lecture Notes on Dynamic Programming Lecture Notes on Dynamic Programming 15-122: Principles of Imperative Computation Frank Pfenning Lecture 23 November 16, 2010 1 Introduction In this lecture we introduce dynamic programming, which is a

More information