Accelerating Pattern Searches with Hardware. Kevin Angstadt CS 6354: Graduate Architecture 7. April 2016

Size: px
Start display at page:

Download "Accelerating Pattern Searches with Hardware. Kevin Angstadt CS 6354: Graduate Architecture 7. April 2016"

Transcription

1 Accelerating Pattern Searches with Hardware Kevin Angstadt CS 6354: raduate Architecture 7. April 2016

2 Who am I? Work with Wes Weimer and Kevin Skadron PL + Architecture Programming models for non-traditional computation Software resiliency in autonomous vehicles Interdisciplinary research is fun! 2

3 We re producing lots of data! 3

4 What is the common theme? Locate the most Pattern Search Problems probable location for a DNA fragment Find in products the that are human genome most commonly Sniff CP/IP packets to purchased together detect possible outside Identify consumer attacks sentiment based off of Search for Higgs events social media posts based off on paths of subatomic particles 4

5 Parallel searches Key = Active Searches arget Pattern ACA C A C C A A C Incoming Data CCA 5

6 How do we define these patterns? 6

7 What is a Finite Automaton? A finite automaton consists of An input alphabet, A set of states, Q A starting state, q 0 A set of accepting states, F Q A transition function, transition( input, q i ) = q j 7

8 Finite Automaton Example Start 1 0 Check: 1110 Check:

9 Optimization: Non-determinism Can be in multiple states at one time Can start in more than one state ransition function returns a set of states (ε-transitions: we ll ignore these, but you ll see them in literature) Why? More compact design! Exponentially more compact than a (D)FA 9

10 What does this find? Start Start Dd o n u t u g h 10

11 Let s process a DFA/NFA Why is a CPU bad at doing this? Storage Complexity and per Symbol Processing Complexity of an n-state NFA and Equivalent DFA Processing Bandwidth NFA Processing Complexity O(n 2 ) Storage Cost O(n) Memory Bandwidth DFA O(1) O( n ) 11

12 Architectural Underpinnings 12

13 What we need Compact design of a NFA Ability to update all transitions in a single time step We can achieve this by throwing away the conventional von Neumann architecture 13

14 Micron s Automata Processor 14 Figure courtesy of Micron

15 Exploiting DRAM Row Address (Memory Location) Row Access results in one word being retrieved from memory 15

16 Using Bit-Parallelism with NFAs Bit-parallel closure: given a set of states, what is the set of reachable states? Symbol closure: given an input symbol, what states accept this symbol? ransition function: intersection (bitwise AND) of these two closures 16

17 Bit-Parallel Execution Input Stream: 1011 Start Start Start q q 1 q q 2 q 4 Bit-parallel closure({start}): {q 0, q 1, q 2 } Symbol closure(1): {q 0, q 2, q 4 } Bit & Symbol: {q 0, q 2 } 17

18 Bit-Parallel Execution Input Stream: 1011 Start Start Start q q 1 q q 2 q 4 Bit-parallel closure({q 0, q 2 }): {q 0, q 1, q 2, q 4 } Symbol closure(0): {q 0, q 1, q 3 } Bit & Symbol: {q 0, q 1 } 18

19 Bit-Parallel Execution Input Stream: 1011 Start Start Start q q 1 q q 2 q 4 Bit-parallel closure({q 0, q 2 }): {q 0, q 1, q 2, q 3 } Symbol closure(1): {q 0, q 2, q 4 } Bit & Symbol: {q 0, q 2, q 4 } 19

20 Bit-Parallel Execution Input Stream: 1011 Start Start Start q q 1 q q 2 q 4 Bit-parallel closure({q 0, q 2 }): {q 0, q 1, q 2, q 4 } Symbol closure(1): {q 0, q 2, q 4 } Bit & Symbol: {q 0, q 4 } REPOR! 20

21 Architectural Design Memory Array (Symbol Closure) 256 Rows (i.e.256 Input Characters) 49,152 Columns (i.e.49,152 States) Routing Matrix (Bit-Parallel Closure) SaturatingCounters Boolean ates 21

22 he AP at a High Level Row Address (Input Symbol) Automata Processor Routing Matrix Row Access results in 49,152 match & route operations 22

23 Executing NFA in DRAM Columns in DRAM store SE labels (Each SE is a single column) Reconfigurable routing matrix connects the SEs Input: Drivesa Row Columns with 1 : SEs thataccept input symbol & Active = States Active States for Next Clock Cycle 23

24 Why Hierarchical Routing? Half-Core Half-Core Column Column Column Column Block Block Block Block Block Block Block Block Row Row Row Row Row Row Row Row Row Row Row Row Row Row Row Row o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o 24

25 roup of wo Contain two State Machine Elements (SME) Hardware embodiment of SE Memory Cells Detection Cell Common output Loopback and Chaining 25

26 3-to-1 Mux Detection Cell Configurable Switching Elements From Input Decoder 26

27 Row Contain 8 os 1 Special Element (Boolean or Counter) Match Element (Connected to two os) Row Routing Lines SMEs exhibit parity (can only connect to half of input routing lines) 27

28 SPECIAL/OUPU EXERNAL/INPU INERNAL/OUPU 28

29 29

30 RAPID Programming of Pattern-Recognition Processors Kevin Angstadt Westley Weimer Kevin Skadron Department of Computer Science University of Virginia {angstadt, weimer, 7. April 2016

31 Programming Workflow Front End Language Synthesis, Placement, and Routing Compiled Binary Source: 31

32 Current Programming Models Automata Network Markup Language Directly specify homogeneous NFA design High-level programming language bindings for generation Support for a list of regular expressions Support for PCRE modifiers Compiled directly to binary 32

33 Programming Challenges ANML development akin to assembly programming Requires knowledge of automata theory and hardware properties edious and error-prone development process Regular expressions challenging to implement Often exhaustive enumerations Similarly error-prone 33

34 Programming Challenges Implement single instance of a problem Each instance of a problem requires a brand new design Need for meta-programs to generate final design Current programming models place unnecessary burden on developer 34

35 A researcher should spend his or her time designing an algorithm to find the important data, not building a machine that will obey said algorithm. 35

36 Parallel Searches: oals Fast processing Specialized Hardware Concise, maintainable representation Efficient compilation High throughput Low compilation time RAPID Programming Language 36

37 RAPID Programming Pattern-Based Data Analysis Automata Processor Current Programming Models RAPID Language Overview AP Code eneration and Optimizations Evaluation 37

38 RAPID at a lance Provides concise, maintainable, and efficient representations for pattern-identification algorithms Conventional, C-style language with domain-specific parallel control structures Excels in applications where patterns are best represented as a combination of text and computation Compilation strategy balances synthesis time with device utilization 38

39 Program Structure Macro Basic unit of computation Sequential control flow Boolean expressions as statements for terminating threads of computation Network High-level pattern matching Parallel control flow Parameters to set run-time values macro foo ( ) { } macro bar ( ) { } macro baz ( ) { } macro qux ( ) { } network ( ) { } 39

40 Program Structure Network Macros 40

41 Program Structure macro foo ( ) { } Macro Macro Macro macro bar ( ) { } macro baz ( ) { } M M M Macro M M M Macro M M M Macro macro qux ( ) { } Macro Macro Macro Network network ( ) { } 41

42 Data in RAPID Input data stream as special function Stream of characters input() Calls to input() are synchronized across all active macros All active macros receive the same input character 42

43 Counting and Reporting Counter: Abstract representation of saturating up counters Count and Reset operations Can compare against threshold RAPID programs can report riggers creation of report event Captures offset of input stream and current macro 43

44 Parallel Control Structures Concise specification of multiple, simultaneous comparisons against a single data stream Support MISD computational model Static and dynamic thread spawning for massive parallelism support Explicit support for sliding window Pattern 44

45 Parallel Control Structures Sequential Structure if else foreach while Parallel Structure either orelse some whenever 45

46 Either/Orelse Statements either { hamming_distance(s,d); //hamming distance y == input(); //next input is y report; //report candidate }orelse{ while( y!= input()); //consume until y } Perform parallel exploration of input data Static number of parallel operations 46

47 Some Statements } network (String[] comparisons) { some(string s : comparisons) hamming_distance(s,5); } Parallel exploration may depend on candidate patterns Iterates over items, dynamically spawn computation 47

48 Whenever Statements whenever( ALL_INPU == input() ) { foreach(char c : "rapid") c==input(); report; } Body triggered whenever guard becomes true ALL_INPU: any symbol in the input stream 48

49 Example RAPID Program Association Rule Mining Identify items from a database that frequently occur together 49

50 Example RAPID Program If all symbols in item set match, increment counter Spawn parallel computation for each item set Sliding window search calls frequent on every input rigger report if threshold reached macro frequent (String set, Counter cnt) { foreach(char c : set) { while(input()!= c); } cnt.count(); } network (String[] set) { some(string s : set) { Counter cnt; whenever(sar_of_inpu == input()) frequent(s,cnt); if (cnt > 128) report; } } 50

51 RAPID Programming Pattern-Based Data Analysis Automata Processor Current Programming Models RAPID Language Overview AP Code eneration and Optimizations Evaluation 51

52 System Overview RAPID Program Annotations Input RAPID Compiler ANML apcompile Driver Code Output AP Binary 52

53 Code eneration RAPID Program macro foo ( ) { } macro bar ( ) { } macro baz ( ) { } macro qux ( ) { } network ( ) { } Recursive transformation of RAPID program Input Stream àses Counters à 1 or more physical counter(s) Similar to RegEx ànfa transformation 53

54 Parallel searches Key = Active Searches arget Pattern ACA C A Maximize number of parallel active searches Incoming Data CCA 54

55 Optimizing Compilation RAPID programs are often repetitive Extract repeated design, and compile once Load dynamically at runtime and set exact values (tessellation) Block 55

56 Auto-uning Optimization Block Block Block 56

57 RAPID Programming Pattern-Based Data Analysis Automata Processor Current Programming Models RAPID Language Overview AP Code eneration and Optimizations Evaluation 57

58 Reminder: oals Fast processing Concise, maintainable representation Efficient compilation High throughput Low compilation time 58

59 Description of Benchmarks Benchmark Description eneration Method ARM AssociationRule Mining Meta Program Brill Brill Part of Speech agging Meta Program Exact Exact DNA Alignment ANML appy DNA Alignmentwith aps ANML MOOMAA Planted Motif Search ANML 59

60 RAPID Lines of Code ARM Brill Exact appy MOOMAA Lines of Code Handcrafted RAPID 60

61 RAPID is Maintainable Percent of Code Changed 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% ask: Convert Hamming distance comparison of length 5 to length 12 0% Handcrafted RAPID 61

62 Parallel searches Key = Active Searches C A Incoming Data arget Pattern Maximize number of parallel active searches ACA Reduce SE usage! CCA 62

63 enerated SEs ARM Brill Exact appy MOOMAA Number of SEs Handcrafted RAPID 63

64 Compilation ime ARM* Brill Exact* appy* MOOMAA* Handcrafted RAPID ime (seconds) * RAPID essellation 64

65 Conclusions RAPID is a high-level language for patternsearch algorithms hree domain-specific parallel control structures, and suitable data representations Accelerate using the Automata Processor RAPID programs are concise, maintainable, and efficient 65

RAPID Programming of Pattern-Recognition Processors

RAPID Programming of Pattern-Recognition Processors RAPID Programming of Pattern-Recognition Processors Kevin Angstadt Westley Weimer Kevin Skadron Department of Computer Science University of Virginia {angstadt, weimer, skadron}@cs.virginia.edu 6. April

More information

PL in the Broader Research Community

PL in the Broader Research Community PL in the Broader Research Community EECS 590: Advanced Programming Languages 27. November 2017 Kevin Angstadt angstadt@umich.edu 1 Who am I? Fourth-year PhD student (I did my first three years at UVA)

More information

RAPID Programming of Pattern-Recognition Processors

RAPID Programming of Pattern-Recognition Processors RAPID Programming of Pattern-Recognition Processors Kevin Angstadt Department of Computer Science University of Virginia Charlottesville, VA 22904-4740 angstadt@cs.virginia.edu Abstract We present RAPID,

More information

AN OVERVIEW OF MICRON S

AN OVERVIEW OF MICRON S AN OVERVIEW OF MICRON S 1 Ke Wang, 1 Kevin Angstadt, 1 Chunkun Bo, 1 Nathan Brunelle, 1 Elaheh Sadredini, 2 Tommy Tracy II, 1 Jack Wadden, 2 Mircea Stan, 1 Kevin Skadron Center for Automata Computing 1

More information

Automata Computing. Mircea R. Stan UVA-ECE Center for Automata Processing (CAP) Co-Director Kevin Skadron, UVA-CS, CAP Director

Automata Computing. Mircea R. Stan UVA-ECE Center for Automata Processing (CAP) Co-Director Kevin Skadron, UVA-CS, CAP Director Automata Computing Mircea R. Stan (mircea@virginia.edu), UVA-ECE Center for Automata Processing (CAP) Co-Director Kevin Skadron, UVA-CS, CAP Director 2013 Micron Technology, Inc. All rights reserved. Products

More information

VASim: An Open Virtual Automata Simulator for Automata Processing Research

VASim: An Open Virtual Automata Simulator for Automata Processing Research University of Virginia Technical Report #CS2016-03 VASim: An Open Virtual Automata Simulator for Automata Processing Research J. Wadden 1, K. Skadron 1 We present VASim, an open, extensible virtual automata

More information

STRING KERNEL TESTING ACCELERATION USING MICRON S AUTOMATA PROCESSOR

STRING KERNEL TESTING ACCELERATION USING MICRON S AUTOMATA PROCESSOR STRING KERNEL TESTING ACCELERATION USING MICRON S AUTOMATA PROCESSOR Chunkun Bo 1,2, Ke Wang 1,2, Yanjun (Jane) Qi 1, Kevin Skadron 1,2 1 Department of Computer Science 2 Center for Automata Processing

More information

Appears in IJPP, first published online Jan The authoritative version appears at: DOI: /s y

Appears in IJPP, first published online Jan The authoritative version appears at: DOI: /s y Noname manuscript No. (will be inserted by the editor) Appears in IJPP, first published online Jan. 2017 The authoritative version appears at: DOI:10.1007/s10766-017-0489-y Hierarchical Pattern Mining

More information

Improving Programming Support for Hardware Accelerators Through Automata Processing Abstractions

Improving Programming Support for Hardware Accelerators Through Automata Processing Abstractions Improving Programming Support for Hardware Accelerators Through Automata Processing Abstractions PhD Dissertation Proposal Kevin Angstadt angstadt@umich.edu 8. December 28 By 22, it s estimated that for

More information

Cellular Automata on the Micron Automata Processor

Cellular Automata on the Micron Automata Processor Cellular Automata on the Micron Automata Processor Ke Wang Department of Computer Science University of Virginia Charlottesville, VA kewang@virginia.edu Kevin Skadron Department of Computer Science University

More information

Regular Languages. MACM 300 Formal Languages and Automata. Formal Languages: Recap. Regular Languages

Regular Languages. MACM 300 Formal Languages and Automata. Formal Languages: Recap. Regular Languages Regular Languages MACM 3 Formal Languages and Automata Anoop Sarkar http://www.cs.sfu.ca/~anoop The set of regular languages: each element is a regular language Each regular language is an example of a

More information

CSE450. Translation of Programming Languages. Lecture 20: Automata and Regular Expressions

CSE450. Translation of Programming Languages. Lecture 20: Automata and Regular Expressions CSE45 Translation of Programming Languages Lecture 2: Automata and Regular Expressions Finite Automata Regular Expression = Specification Finite Automata = Implementation A finite automaton consists of:

More information

Lexical Analysis. COMP 524, Spring 2014 Bryan Ward

Lexical Analysis. COMP 524, Spring 2014 Bryan Ward Lexical Analysis COMP 524, Spring 2014 Bryan Ward Based in part on slides and notes by J. Erickson, S. Krishnan, B. Brandenburg, S. Olivier, A. Block and others The Big Picture Character Stream Scanner

More information

ALGORITHMIC TECHNIQUES FOR THE MICRON AUTOMATA PROCESSOR

ALGORITHMIC TECHNIQUES FOR THE MICRON AUTOMATA PROCESSOR ALGORITHMIC TECHNIQUES FOR THE MICRON AUTOMATA PROCESSOR A Thesis Presented to The Academic Faculty by Indranil Roy In Partial Fulfillment of the Requirements for the Degree Doctor of Philosophy in the

More information

Behaviour Diagrams UML

Behaviour Diagrams UML Behaviour Diagrams UML Behaviour Diagrams Structure Diagrams are used to describe the static composition of components (i.e., constraints on what intstances may exist at run-time). Interaction Diagrams

More information

ANMLZoo: A Benchmark Suite for Exploring Bottlenecks in Automata Processing Engines and Architectures

ANMLZoo: A Benchmark Suite for Exploring Bottlenecks in Automata Processing Engines and Architectures ANMLZoo: A Benchmark Suite for Exploring Bottlenecks in Automata Processing Engines and Architectures Jack Wadden, Vinh Dang, Nathan Brunelle, Tommy Tracy II, Deyuan Guo, Elaheh Sadredini, Ke Wang, Chunkun

More information

Lexical Analysis. Implementation: Finite Automata

Lexical Analysis. Implementation: Finite Automata Lexical Analysis Implementation: Finite Automata Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs)

More information

Formal Languages and Compilers Lecture IV: Regular Languages and Finite. Finite Automata

Formal Languages and Compilers Lecture IV: Regular Languages and Finite. Finite Automata Formal Languages and Compilers Lecture IV: Regular Languages and Finite Automata Free University of Bozen-Bolzano Faculty of Computer Science POS Building, Room: 2.03 artale@inf.unibz.it http://www.inf.unibz.it/

More information

CMSC 350: COMPILER DESIGN

CMSC 350: COMPILER DESIGN Lecture 11 CMSC 350: COMPILER DESIGN see HW3 LLVMLITE SPECIFICATION Eisenberg CMSC 350: Compilers 2 Discussion: Defining a Language Premise: programming languages are purely formal objects We (as language

More information

Nondeterministic Finite Automata (NFA): Nondeterministic Finite Automata (NFA) states of an automaton of this kind may or may not have a transition for each symbol in the alphabet, or can even have multiple

More information

6 NFA and Regular Expressions

6 NFA and Regular Expressions Formal Language and Automata Theory: CS21004 6 NFA and Regular Expressions 6.1 Nondeterministic Finite Automata A nondeterministic finite automata (NFA) is a 5-tuple where 1. is a finite set of states

More information

Entity Resolution Acceleration using Micron s Automata Processor

Entity Resolution Acceleration using Micron s Automata Processor Entity Resolution Acceleration using Micron s Automata Processor Chunkun Bo 1, Ke Wang 1, Jeffrey J. Fox 2, and Kevin Skadron 1 1 Department of Computer Science 2 Department of Materials Science and Engineering

More information

Lexical Analysis - 2

Lexical Analysis - 2 Lexical Analysis - 2 More regular expressions Finite Automata NFAs and DFAs Scanners JLex - a scanner generator 1 Regular Expressions in JLex Symbol - Meaning. Matches a single character (not newline)

More information

Entity Resolution Acceleration using the Automata Processor

Entity Resolution Acceleration using the Automata Processor Entity Resolution Acceleration using the Automata Processor Chunkun Bo 1, Ke Wang 1, Jeffrey J. Fox 2, Kevin Skadron 1 1 Department of Computer Science, 2 Department of Material Science University of Virginia

More information

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions Last lecture CMSC330 Finite Automata Languages Sets of strings Operations on languages Regular expressions Constants Operators Precedence 1 2 Finite automata States Transitions Examples Types This lecture

More information

Lexical Analysis. Note by Baris Aktemur: Our slides are adapted from Cooper and Torczon s slides that they prepared for COMP 412 at Rice.

Lexical Analysis. Note by Baris Aktemur: Our slides are adapted from Cooper and Torczon s slides that they prepared for COMP 412 at Rice. Lexical Analysis Note by Baris Aktemur: Our slides are adapted from Cooper and Torczon s slides that they prepared for COMP 412 at Rice. Copyright 2010, Keith D. Cooper & Linda Torczon, all rights reserved.

More information

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions) By the end of this course, students should CIS 1.5 Course Objectives a. Understand the concept of a program (i.e., a computer following a series of instructions) b. Understand the concept of a variable

More information

Finite automata. We have looked at using Lex to build a scanner on the basis of regular expressions.

Finite automata. We have looked at using Lex to build a scanner on the basis of regular expressions. Finite automata We have looked at using Lex to build a scanner on the basis of regular expressions. Now we begin to consider the results from automata theory that make Lex possible. Recall: An alphabet

More information

Automation Framework for Large-Scale Regular Expression Matching on FPGA. Thilan Ganegedara, Yi-Hua E. Yang, Viktor K. Prasanna

Automation Framework for Large-Scale Regular Expression Matching on FPGA. Thilan Ganegedara, Yi-Hua E. Yang, Viktor K. Prasanna Automation Framework for Large-Scale Regular Expression Matching on FPGA Thilan Ganegedara, Yi-Hua E. Yang, Viktor K. Prasanna Ming-Hsieh Department of Electrical Engineering University of Southern California

More information

Implementation of Lexical Analysis. Lecture 4

Implementation of Lexical Analysis. Lecture 4 Implementation of Lexical Analysis Lecture 4 1 Tips on Building Large Systems KISS (Keep It Simple, Stupid!) Don t optimize prematurely Design systems that can be tested It is easier to modify a working

More information

CS 432 Fall Mike Lam, Professor. Finite Automata Conversions and Lexing

CS 432 Fall Mike Lam, Professor. Finite Automata Conversions and Lexing CS 432 Fall 2017 Mike Lam, Professor Finite Automata Conversions and Lexing Finite Automata Key result: all of the following have the same expressive power (i.e., they all describe regular languages):

More information

About the Authors... iii Introduction... xvii. Chapter 1: System Software... 1

About the Authors... iii Introduction... xvii. Chapter 1: System Software... 1 Table of Contents About the Authors... iii Introduction... xvii Chapter 1: System Software... 1 1.1 Concept of System Software... 2 Types of Software Programs... 2 Software Programs and the Computing Machine...

More information

Announcements! P1 part 1 due next Tuesday P1 part 2 due next Friday

Announcements! P1 part 1 due next Tuesday P1 part 2 due next Friday Announcements! P1 part 1 due next Tuesday P1 part 2 due next Friday 1 Finite-state machines CS 536 Last time! A compiler is a recognizer of language S (Source) a translator from S to T (Target) a program

More information

Lexical Analysis. Lexical analysis is the first phase of compilation: The file is converted from ASCII to tokens. It must be fast!

Lexical Analysis. Lexical analysis is the first phase of compilation: The file is converted from ASCII to tokens. It must be fast! Lexical Analysis Lexical analysis is the first phase of compilation: The file is converted from ASCII to tokens. It must be fast! Compiler Passes Analysis of input program (front-end) character stream

More information

Advantages and challenges of programming the Micron Automata Processor

Advantages and challenges of programming the Micron Automata Processor Graduate Theses and Dissertations Graduate College 2013 Advantages and challenges of programming the Micron Automata Processor Christopher Sabotta Iowa State University Follow this and additional works

More information

Runtime. The optimized program is ready to run What sorts of facilities are available at runtime

Runtime. The optimized program is ready to run What sorts of facilities are available at runtime Runtime The optimized program is ready to run What sorts of facilities are available at runtime Compiler Passes Analysis of input program (front-end) character stream Lexical Analysis token stream Syntactic

More information

In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured

In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured System Performance Analysis Introduction Performance Means many things to many people Important in any design Critical in real time systems 1 ns can mean the difference between system Doing job expected

More information

lec3:nondeterministic finite state automata

lec3:nondeterministic finite state automata lec3:nondeterministic finite state automata 1 1.introduction Nondeterminism is a useful concept that has great impact on the theory of computation. When the machine is in a given state and reads the next

More information

CS 310: State Transition Diagrams

CS 310: State Transition Diagrams CS 30: State Transition Diagrams Stefan D. Bruda Winter 207 STATE TRANSITION DIAGRAMS Finite directed graph Edges (transitions) labeled with symbols from an alphabet Nodes (states) labeled only for convenience

More information

Slide credit: Slides adapted from David Kirk/NVIDIA and Wen-mei W. Hwu, DRAM Bandwidth

Slide credit: Slides adapted from David Kirk/NVIDIA and Wen-mei W. Hwu, DRAM Bandwidth Slide credit: Slides adapted from David Kirk/NVIDIA and Wen-mei W. Hwu, 2007-2016 DRAM Bandwidth MEMORY ACCESS PERFORMANCE Objective To learn that memory bandwidth is a first-order performance factor in

More information

Binary Decision Diagrams and Symbolic Model Checking

Binary Decision Diagrams and Symbolic Model Checking Binary Decision Diagrams and Symbolic Model Checking Randy Bryant Ed Clarke Ken McMillan Allen Emerson CMU CMU Cadence U Texas http://www.cs.cmu.edu/~bryant Binary Decision Diagrams Restricted Form of

More information

Computer and Information Sciences College / Computer Science Department CS 207 D. Computer Architecture

Computer and Information Sciences College / Computer Science Department CS 207 D. Computer Architecture Computer and Information Sciences College / Computer Science Department CS 207 D Computer Architecture The Computer Revolution Progress in computer technology Underpinned by Moore s Law Makes novel applications

More information

CS Lecture 2. The Front End. Lecture 2 Lexical Analysis

CS Lecture 2. The Front End. Lecture 2 Lexical Analysis CS 1622 Lecture 2 Lexical Analysis CS 1622 Lecture 2 1 Lecture 2 Review of last lecture and finish up overview The first compiler phase: lexical analysis Reading: Chapter 2 in text (by 1/18) CS 1622 Lecture

More information

Universal Serial Bus Host Interface on an FPGA

Universal Serial Bus Host Interface on an FPGA Universal Serial Bus Host Interface on an FPGA Application Note For many years, designers have yearned for a general-purpose, high-performance serial communication protocol. The RS-232 and its derivatives

More information

Implementation of Lexical Analysis

Implementation of Lexical Analysis Implementation of Lexical Analysis Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs) Implementation

More information

VHDL for Synthesis. Course Description. Course Duration. Goals

VHDL for Synthesis. Course Description. Course Duration. Goals VHDL for Synthesis Course Description This course provides all necessary theoretical and practical know how to write an efficient synthesizable HDL code through VHDL standard language. The course goes

More information

Compiler Construction

Compiler Construction Compiler Construction Thomas Noll Software Modeling and Verification Group RWTH Aachen University https://moves.rwth-aachen.de/teaching/ss-16/cc/ Conceptual Structure of a Compiler Source code x1 := y2

More information

Improving Signature Matching using Binary Decision Diagrams

Improving Signature Matching using Binary Decision Diagrams Improving Signature Matching using Binary Decision Diagrams Liu Yang, Rezwana Karim, Vinod Ganapathy Rutgers University Randy Smith Sandia National Labs Signature matching in IDS Find instances of network

More information

THE reduction of finite state machines (FSM s) is a wellknown

THE reduction of finite state machines (FSM s) is a wellknown IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 18, NO. 11, NOVEMBER 1999 1619 A New Algorithm for Exact Reduction of Incompletely Specified Finite State Machines Jorge

More information

Lexical Analysis. Lecture 2-4

Lexical Analysis. Lecture 2-4 Lexical Analysis Lecture 2-4 Notes by G. Necula, with additions by P. Hilfinger Prof. Hilfinger CS 164 Lecture 2 1 Administrivia Moving to 60 Evans on Wednesday HW1 available Pyth manual available on line.

More information

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou COMP-421 Compiler Design Presented by Dr Ioanna Dionysiou Administrative! [ALSU03] Chapter 3 - Lexical Analysis Sections 3.1-3.4, 3.6-3.7! Reading for next time [ALSU03] Chapter 3 Copyright (c) 2010 Ioanna

More information

Question Bank. 10CS63:Compiler Design

Question Bank. 10CS63:Compiler Design Question Bank 10CS63:Compiler Design 1.Determine whether the following regular expressions define the same language? (ab)* and a*b* 2.List the properties of an operator grammar 3. Is macro processing a

More information

CPE300: Digital System Architecture and Design

CPE300: Digital System Architecture and Design CPE300: Digital System Architecture and Design Fall 2011 MW 17:30-18:45 CBC C316 Cache 11232011 http://www.egr.unlv.edu/~b1morris/cpe300/ 2 Outline Review Memory Components/Boards Two-Level Memory Hierarchy

More information

Verilog for High Performance

Verilog for High Performance Verilog for High Performance Course Description This course provides all necessary theoretical and practical know-how to write synthesizable HDL code through Verilog standard language. The course goes

More information

PAPER Accelerating Weeder: A DNA Motif Search Tool using the Micron Automata Processor and FPGA

PAPER Accelerating Weeder: A DNA Motif Search Tool using the Micron Automata Processor and FPGA IEICE TRANS. INF. & SYST., VOL.Exx??, NO.xx XXXX 200x 1 PAPER Accelerating Weeder: A DNA Motif Search Tool using the Micron Automata Processor and FPGA Qiong WANG a), Member, Mohamed EL-HADEDY b), Kevin

More information

Method for security monitoring and special filtering traffic mode in info communication systems

Method for security monitoring and special filtering traffic mode in info communication systems Method for security monitoring and special filtering traffic mode in info communication systems Sherzod Rajaboyevich Gulomov Provide Information Security department Tashkent University of Information Technologies

More information

Compiler Design. 2. Regular Expressions & Finite State Automata (FSA) Kanat Bolazar January 21, 2010

Compiler Design. 2. Regular Expressions & Finite State Automata (FSA) Kanat Bolazar January 21, 2010 Compiler Design. Regular Expressions & Finite State Automata (FSA) Kanat Bolazar January 1, 010 Contents In these slides we will see 1.Introduction, Concepts and Notations.Regular Expressions, Regular

More information

AS/A Level Computing Syllabus 2011

AS/A Level Computing Syllabus 2011 AS/A Level Computing Syllabus 2011 Section 3 - System Software Mechanisms - - Machine Architecture - - Database Theory - - Programming Paradigms - Chapter 3.3 Computer Architectures & Fetch-Execute Cycle

More information

Automating Construction of Lexers

Automating Construction of Lexers Automating Construction of Lexers Regular Expression to Programs Not all regular expressions are simple. How can we write a lexer for (a*b aaa)? Tokenizing aaaab Vs aaaaaa Regular Expression Finite state

More information

The Tiny CPU Generator (TCG)

The Tiny CPU Generator (TCG) The Tiny CPU Generator (TCG) Yosi Ben-Asher Computer Science Dept. Haifa University, Haifa, Israel yosi@cs.haifa.ac.il The instructions set The machine: The machine is specified by several pipelines where

More information

Dr. D.M. Akbar Hussain

Dr. D.M. Akbar Hussain 1 2 Compiler Construction F6S Lecture - 2 1 3 4 Compiler Construction F6S Lecture - 2 2 5 #include.. #include main() { char in; in = getch ( ); if ( isalpha (in) ) in = getch ( ); else error (); while

More information

Resource-efficient regular expression matching architecture for text analytics

Resource-efficient regular expression matching architecture for text analytics Resource-efficient regular expression matching architecture for text analytics Kubilay Atasu IBM Research - Zurich Presented at ASAP 2014 SystemT: an algebraic approach to declarative information extraction

More information

CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5

CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5 CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5 CS 536 Spring 2015 1 Multi Character Lookahead We may allow finite automata to look beyond the next input character.

More information

Comparing and Contrasting different Approaches of Code Generator(Enum,Map-Like,If-else,Graph)

Comparing and Contrasting different Approaches of Code Generator(Enum,Map-Like,If-else,Graph) Comparing and Contrasting different Approaches of Generator(Enum,Map-Like,If-else,Graph) Vivek Tripathi 1 Sandeep kumar Gonnade 2 Mtech Scholar 1 Asst.Professor 2 Department of Computer Science & Engineering,

More information

Energy Efficient Computing Systems (EECS) Magnus Jahre Coordinator, EECS

Energy Efficient Computing Systems (EECS) Magnus Jahre Coordinator, EECS Energy Efficient Computing Systems (EECS) Magnus Jahre Coordinator, EECS Who am I? Education Master of Technology, NTNU, 2007 PhD, NTNU, 2010. Title: «Managing Shared Resources in Chip Multiprocessor Memory

More information

CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures

CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures Dan Grossman Fall 2014 Hi! I m not Hal J I love this stuff and have taught

More information

Chapter 5 Registers & Counters

Chapter 5 Registers & Counters University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Kewal K. Saluja and Yu Hen Hu Spring 2002 Chapter 5 Registers & Counters Originals by: Charles R. Kime Modified for course

More information

All you need is fun. Cons T Åhs Keeper of The Code

All you need is fun. Cons T Åhs Keeper of The Code All you need is fun Cons T Åhs Keeper of The Code cons@klarna.com Cons T Åhs Keeper of The Code at klarna Architecture - The Big Picture Development - getting ideas to work Code Quality - care about the

More information

David Griol Barres Computer Science Department Carlos III University of Madrid Leganés (Spain)

David Griol Barres Computer Science Department Carlos III University of Madrid Leganés (Spain) David Griol Barres dgriol@inf.uc3m.es Computer Science Department Carlos III University of Madrid Leganés (Spain) OUTLINE Introduction: Definitions The role of the Lexical Analyzer Scanner Implementation

More information

Lexical Analysis. Chapter 2

Lexical Analysis. Chapter 2 Lexical Analysis Chapter 2 1 Outline Informal sketch of lexical analysis Identifies tokens in input string Issues in lexical analysis Lookahead Ambiguities Specifying lexers Regular expressions Examples

More information

Lexical Analysis. Finite Automata

Lexical Analysis. Finite Automata #1 Lexical Analysis Finite Automata Cool Demo? (Part 1 of 2) #2 Cunning Plan Informal Sketch of Lexical Analysis LA identifies tokens from input string lexer : (char list) (token list) Issues in Lexical

More information

CSE450. Translation of Programming Languages. Automata, Simple Language Design Principles

CSE450. Translation of Programming Languages. Automata, Simple Language Design Principles CSE45 Translation of Programming Languages Automata, Simple Language Design Principles Finite Automata State Graphs A state: The start state: An accepting state: A transition: a A Simple Example A finite

More information

Regular Expression Constrained Sequence Alignment

Regular Expression Constrained Sequence Alignment Regular Expression Constrained Sequence Alignment By Abdullah N. Arslan Department of Computer science University of Vermont Presented by Tomer Heber & Raz Nissim otivation When comparing two proteins,

More information

Compiler phases. Non-tokens

Compiler phases. Non-tokens Compiler phases Compiler Construction Scanning Lexical Analysis source code scanner tokens regular expressions lexical analysis Lennart Andersson parser context free grammar Revision 2011 01 21 parse tree

More information

Read this before starting!

Read this before starting! Points missed: Student's Name: Total score: /100 points East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 1 for Fall Semester, 2006 Section

More information

Sequential Pattern Mining with the Micron Automata Processor

Sequential Pattern Mining with the Micron Automata Processor Sequential Pattern Mining with the Micron Automata Processor Ke Wang, Elaheh Sadredini, Kevin Skadron Department of Computer Science University of Virginia Charlottesville, VA, 2294 USA {kewang, elaheh,

More information

Verifying Liveness Properties of ML Programs

Verifying Liveness Properties of ML Programs Verifying Liveness Properties of ML Programs M M Lester R P Neatherway C-H L Ong S J Ramsay Department of Computer Science, University of Oxford ACM SIGPLAN Workshop on ML, 2011 09 18 Gokigeny all! Motivation

More information

set active-probe (PfR)

set active-probe (PfR) set active-probe (PfR) set active-probe (PfR) To configure a Performance Routing (PfR) active probe with a forced target assignment within a PfR map, use the set active-probe command in PfR map configuration

More information

Compiler Construction

Compiler Construction Compiler Construction Lecture 2: Lexical Analysis I (Introduction) Thomas Noll Lehrstuhl für Informatik 2 (Software Modeling and Verification) noll@cs.rwth-aachen.de http://moves.rwth-aachen.de/teaching/ss-14/cc14/

More information

Chapter 12. File Management

Chapter 12. File Management Operating System Chapter 12. File Management Lynn Choi School of Electrical Engineering Files In most applications, files are key elements For most systems except some real-time systems, files are used

More information

Indexing and Searching

Indexing and Searching Indexing and Searching Introduction How to retrieval information? A simple alternative is to search the whole text sequentially Another option is to build data structures over the text (called indices)

More information

Lexical Error Recovery

Lexical Error Recovery Lexical Error Recovery A character sequence that can t be scanned into any valid token is a lexical error. Lexical errors are uncommon, but they still must be handled by a scanner. We won t stop compilation

More information

Languages and Compilers

Languages and Compilers Principles of Software Engineering and Operational Systems Languages and Compilers SDAGE: Level I 2012-13 3. Formal Languages, Grammars and Automata Dr Valery Adzhiev vadzhiev@bournemouth.ac.uk Office:

More information

Figure 2.1: Role of Lexical Analyzer

Figure 2.1: Role of Lexical Analyzer Chapter 2 Lexical Analysis Lexical analysis or scanning is the process which reads the stream of characters making up the source program from left-to-right and groups them into tokens. The lexical analyzer

More information

CS415 Compilers. Lexical Analysis

CS415 Compilers. Lexical Analysis CS415 Compilers Lexical Analysis These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University Lecture 7 1 Announcements First project and second homework

More information

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and Computer Language Theory Chapter 4: Decidability 1 Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

More information

Implementation of Lexical Analysis

Implementation of Lexical Analysis Implementation of Lexical Analysis Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs) Implementation

More information

Total No. of Questions : 18] [Total No. of Pages : 02. M.Sc. DEGREE EXAMINATION, DEC First Year COMPUTER SCIENCE.

Total No. of Questions : 18] [Total No. of Pages : 02. M.Sc. DEGREE EXAMINATION, DEC First Year COMPUTER SCIENCE. (DMCS01) Total No. of Questions : 18] [Total No. of Pages : 02 M.Sc. DEGREE EXAMINATION, DEC. 2016 First Year COMPUTER SCIENCE Data Structures Time : 3 Hours Maximum Marks : 70 Section - A (3 x 15 = 45)

More information

Computer Architecture

Computer Architecture Computer Architecture Slide Sets WS 2013/2014 Prof. Dr. Uwe Brinkschulte M.Sc. Benjamin Betting Part 10 Thread and Task Level Parallelism Computer Architecture Part 10 page 1 of 36 Prof. Dr. Uwe Brinkschulte,

More information

CSC258: Computer Organization. Memory Systems

CSC258: Computer Organization. Memory Systems CSC258: Computer Organization Memory Systems 1 Summer Independent Studies I m looking for a few students who will be working on campus this summer. In addition to the paid positions posted earlier, I have

More information

EC500. Design of Secure and Reliable Hardware. Lecture 1 & 2

EC500. Design of Secure and Reliable Hardware. Lecture 1 & 2 EC500 Design of Secure and Reliable Hardware Lecture 1 & 2 Mark Karpovsky January 17 th, 2013 1 Security Errors injected by the attacker (active attacks) Reliability Errors injected by random sources e.g.

More information

Review: Computer Organization

Review: Computer Organization Review: Computer Organization Cache Chansu Yu Caches: The Basic Idea A smaller set of storage locations storing a subset of information from a larger set. Typically, SRAM for DRAM main memory: Processor

More information

CS Computer Architecture Spring Week 10: Chapter

CS Computer Architecture Spring Week 10: Chapter CS 35101 Computer Architecture Spring 2008 Week 10: Chapter 5.1-5.3 Materials adapated from Mary Jane Irwin (www.cse.psu.edu/~mji) and Kevin Schaffer [adapted from D. Patterson slides] CS 35101 Ch 5.1

More information

Chapter 6 (Lect 3) Counters Continued. Unused States Ring counter. Implementing with Registers Implementing with Counter and Decoder

Chapter 6 (Lect 3) Counters Continued. Unused States Ring counter. Implementing with Registers Implementing with Counter and Decoder Chapter 6 (Lect 3) Counters Continued Unused States Ring counter Implementing with Registers Implementing with Counter and Decoder Sequential Logic and Unused States Not all states need to be used Can

More information

Basics of Performance Engineering

Basics of Performance Engineering ERLANGEN REGIONAL COMPUTING CENTER Basics of Performance Engineering J. Treibig HiPerCH 3, 23./24.03.2015 Why hardware should not be exposed Such an approach is not portable Hardware issues frequently

More information

Overview. Column or Page Access (t CAC ) Access Times. Cycle Time. Random Access (t RAC ) Random Access Cycle Time (t RC )

Overview. Column or Page Access (t CAC ) Access Times. Cycle Time. Random Access (t RAC ) Random Access Cycle Time (t RC ) Overview DRAM manufacturers use a number of different performance specifications to describe the speed and competitiveness of their products. Although useful for comparing the offerings of the various

More information

Final Course Review. Reading: Chapters 1-9

Final Course Review. Reading: Chapters 1-9 Final Course Review Reading: Chapters 1-9 1 Objectives Introduce concepts in automata theory and theory of computation Identify different formal language classes and their relationships Design grammars

More information

Program verification. Generalities about software Verification Model Checking. September 20, 2016

Program verification. Generalities about software Verification Model Checking. September 20, 2016 Program verification Generalities about software Verification Model Checking Laure Gonnord David Monniaux September 20, 2016 1 / 43 The teaching staff Laure Gonnord, associate professor, LIP laboratory,

More information

CT32 COMPUTER NETWORKS DEC 2015

CT32 COMPUTER NETWORKS DEC 2015 Q.2 a. Using the principle of mathematical induction, prove that (10 (2n-1) +1) is divisible by 11 for all n N (8) Let P(n): (10 (2n-1) +1) is divisible by 11 For n = 1, the given expression becomes (10

More information

Lexical Analysis. Lecture 3-4

Lexical Analysis. Lecture 3-4 Lexical Analysis Lecture 3-4 Notes by G. Necula, with additions by P. Hilfinger Prof. Hilfinger CS 164 Lecture 3-4 1 Administrivia I suggest you start looking at Python (see link on class home page). Please

More information