! Smaller, simpler, subcomponent of program! Provides abstraction. n hide low-level details, give high-level structure
|
|
- Bennett Richardson
- 5 years ago
- Views:
Transcription
1 Function Chpte 1 Functions Oiginl slides fom Gegoy Byd, Noth Colin Stte Univesity Modified slides by Chis Wilcox, Colodo Stte Univesity! Smlle, simple, subcomponent of pogm! Povides bstction n hide lo-level detils, give high-level stuctue n esie to undestnd ovell pogm flo n enbles sepble, independent development! C functions n zeo o multiple guments pssed in n single esult etuned (optionl) n etun vlue is lys pticul type! In othe lnguges, clled pocedues, suboutines, 2 Exmple of High-Level Stuctue min() SetupBod(); /* plce pieces on bod */ DetemineSides(); /* choose blck/hite */ /* Ply gme */ Stuctue of pogm do is evident, even ithout WhitesTun(); knoing implementtion BlcksTun(); hile (NoOutcomeYet()); Functions in C! Decltion (lso clled pototype) Fctoil( n); type of etun vlue nme of function types of ll guments! Function cll -- used in expession = x + Fctoil(f + g); 1 evlute guments 2, execute function 3 use etun vlue in expession 3 1
2 Function Definition! Stte type, nme, types of guments n must mtch function decltion n give nme to ech gument (doesn't hve to mtch decltion) Fctoil( n) i; esult = 1; fo (i = 1; i <= n; i++) esult *= i; etun esult; gives contol bck to clling function nd etuns vlue Why Decltion?! Since function definition lso includes etun nd gument types, hy is decltion needed?! Use might be seen befoe definition Compile needs to kno etun nd g types nd numbe of guments! Definition might be in diffeent file, itten by diffeent pogmme n include "hede" file ith function decltions only n compile septely, link togethe to mke executble 6 Exmple double VlueInDolls(double mount, double te); min() function decltion (pototype) function cll (invoction) dolls = VlueInDolls(fncs, DOLLARS_PER_FRANC); pf("%f fncs euls %f dolls\n", fncs, dolls); function definition (code) double VlueInDolls(double mount, double te) etun mount * te; Implementing Functions: Ovevie! Activtion ecod (stck fme) n infomtion bout ech function, including guments nd locl vibles n stoed on un-time stck Clling function push ne ctivtion ecod copy vlues o guments cll function get esult fom stck Clled function execute code put esult in ctivtion ecod pop ctivtion ecod fom stck etun 7 8 2
3 Run-Time Stck! Recll tht locl vibles e stoed on the un-time stck in n ctivtion ecod! Stck Poe () is poe to the next fee loction in the stck, nd is used to push nd pop vlues on nd off the stck! Fme poe () is poe to the beginning of egion of the ctivtion ecod tht stoes locl vibles fo the cuent function! When ne function is clled, its ctivtion ecod is pushed on the stck; hen it etuns, its ctivtion ecod is popped off of the stck Run-Time Stck Memoy Memoy Memoy Wtt min min min Befoe cll Duing cll Afte cll 9 Activtion Recod! NoNme(, b), x, y; etun y; Nme Type Offset Scope b x y NoNme NoNme NoNme NoNme NoNme bookkeeping y x dynmic link etun ddess etun vlue b locls gs Activtion Recod Bookkeeping! Retun vlue n spce fo vlue etuned by function n llocted even if function does not etun vlue! Retun ddess n sve poe to next instuction in clling function n convenient loction to stoe R7 in cse nothe function (JSR) is clled! Dynmic link n n clle s fme poe used to pop this ctivtion ecod fom stck
4 Exmple Function Cll! Volt(, ) k; m; etun k; Wtt( ) ; = Volt(,); etun ; 13 Clling the Function! = Volt(, );! ; push second g AND R0, R0, #0 ADD R0, R0, # ADD,, #-1 STR R0,, #0 ; push fist gument LDR R0,, #0 ADD,, #-1 STR R0,, #0 ; cll suboutine JSR Volt ne Note: Clle needs to kno numbe nd type of guments, doesn't kno bout locl vibles 1 Stting the Cllee Function Ending the Cllee Function! ; leve spce fo etun vlue ADD,, #-1 ne ne ; push etun ddess ADD,, #-1 STR R7,, #0 ; push clle s fme pt ADD,, #-1 STR,, #0 ; set ne fme poe ADD,, #-1 ; llocte spce fo locls ADD,, #-2 xfcfb x30 m k 1! etun k;! ; copy k o etun vlue LDR R0,, #0 STR R0,, #3 ; pop locl vibles ADD,, #1 ne ; pop dynmic link (o ) LDR,, #0 ADD,, #1 ; pop etun dd (o R7) LDR R7,, #0 ADD,, #1 ; etun contol to clle RET ne -3 xfcfb x30 m k 16
5 Resuming the Clle Function! = Volt(,);! JSR Volt ; lod etun vlue ; fom top of stck LDR R0,, #0 ; pefom ssignment STR R0,, #0 ; pop etun vlue ADD,, #1 ; pop guments ADD,, #2 ne Summy of LC-3 Function Cll Implementtion 1 Clle pushes guments (lst to fist) 2 Clle invokes suboutine (JSR) 3 Cllee lloctes etun vlue, pushes R7 nd Cllee lloctes spce fo locl vibles Cllee executes function code 6 Cllee stoes esult o etun vlue slot 7 Cllee pops locl vs, pops, pops R7 8 Cllee etuns (JMP R7) 9 Clle lods etun vlue nd pops guments Clle esumes computtion 17 18
Chapter 14 Functions
Chapter 14 Functions Function Smaller, simpler, subcomponent of program Provides abstraction hide low-level details give high-level structure to program, easier to understand overall program flow enables
More informationChapter 14 Functions. Function. Example of High-Level Structure. Functions in C
Chapter 4 Functions Based on slides McGraw-Hill Additional material 4/5 Lewis/Martin Function Smaller, simpler, subcomponent of program Provides abstraction Hide low-level details Give high-level structure
More informationScope, Functions, and Storage Management
Scope, Functions, nd Storge Mngement Block-structured lnguges nd stck storge In-le Blocks (previous set of overheds) ctivtion records storge for locl, glol vriles First-order functions (previous set of
More informationCPSC 213. Polymorphism. Introduction to Computer Systems. Readings for Next Two Lectures. Back to Procedure Calls
Redings for Next Two Lectures Text CPSC 213 Switch Sttements, Understnding Pointers - 2nd ed: 3.6.7, 3.10-1st ed: 3.6.6, 3.11 Introduction to Computer Systems Unit 1f Dynmic Control Flow Polymorphism nd
More informationSample Midterm Solutions COMS W4115 Programming Languages and Translators Monday, October 12, 2009
Deprtment of Computer cience Columbi University mple Midterm olutions COM W4115 Progrmming Lnguges nd Trnsltors Mondy, October 12, 2009 Closed book, no ids. ch question is worth 20 points. Question 5(c)
More informationCOSC 6385 Computer Architecture. - Pipelining
COSC 6385 Compute Achitectue - Pipelining Sping 2012 Some of the slides ae based on a lectue by David Culle, Pipelining Pipelining is an implementation technique wheeby multiple instuctions ae ovelapped
More informationOutline. Tiling, formally. Expression tile as rule. Statement tiles as rules. Function calls. CS 412 Introduction to Compilers
CS 412 Introduction to Compilers Andrew Myers Cornell University Lectur8 Finishing genertion 9 Mr 01 Outline Tiling s syntx-directed trnsltion Implementing function clls Implementing functions Optimizing
More informationVirtual Machine (Part I)
Hrvrd University CS Fll 2, Shimon Schocken Virtul Mchine (Prt I) Elements of Computing Systems Virtul Mchine I (Ch. 7) Motivtion clss clss Min Min sttic sttic x; x; function function void void min() min()
More informationCode Generation with BEG
CSc 553 Pinciples of Compiltion X11 : 11 Cocktil nd BEG Code Genetion with BEG Deptment of Compute Science Univesity of Aizon collbeg@gmil.com Copyight c 2011 Chistin Collbeg BEG nd Cocktil I BEG nd Cocktil
More informationMemory Management Functions
Meory Mngeent Functions Chpter 9 Meory Mngeent Process of binding vlues to eory loctions Vlues y be sttic or dynic Vlues re ssigned t different plces Sttic eory Run-tie stck Hep 1 Meory Mngeent Sttic Meory
More informationFunctions in C. Memory Allocation in C. C to LC3 Code generation. Next.. Complete and submit C to LC3 code generation. How to handle function calls?
Memory Allocation in C Functions in C Global data pointer: R4 Global and static variables Specify positive offsets Frame pointer: Points to current code block Negative offset Stack Pointer: Top of stack
More informationFall 2017 Midterm Exam 1 October 19, You may not use any books, notes, or electronic devices during this exam.
15-112 Fll 2017 Midterm Exm 1 October 19, 2017 Nme: Andrew ID: Recittion Section: You my not use ny books, notes, or electronic devices during this exm. You my not sk questions bout the exm except for
More informationCode Generation with BEG
CSc 553 Pinciples of Compiltion X11 : 11 Cocktil nd BEG Chistin Collbeg Deptment of Compute Science Univesity of Aizon collbeg@gmil.com Copyight c 2011 Chistin Collbeg Febuy 24, 2011 1 Code Genetion with
More informationCS321 Languages and Compiler Design I. Winter 2012 Lecture 5
CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,
More informationFig.25: the Role of LEX
The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing
More informationLecture Topics ECE 341. Lecture # 12. Control Signals. Control Signals for Datapath. Basic Processing Unit. Pipelining
EE 341 Lectue # 12 Instucto: Zeshan hishti zeshan@ece.pdx.edu Novembe 10, 2014 Potland State Univesity asic Pocessing Unit ontol Signals Hadwied ontol Datapath contol signals Dealing with memoy delay Pipelining
More informationΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών
ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop
More informationMid-term exam. Scores. Fall term 2012 KAIST EE209 Programming Structures for EE. Thursday Oct 25, Student's name: Student ID:
Fll term 2012 KAIST EE209 Progrmming Structures for EE Mid-term exm Thursdy Oct 25, 2012 Student's nme: Student ID: The exm is closed book nd notes. Red the questions crefully nd focus your nswers on wht
More informationStack. A list whose end points are pointed by top and bottom
4. Stck Stck A list whose end points re pointed by top nd bottom Insertion nd deletion tke plce t the top (cf: Wht is the difference between Stck nd Arry?) Bottom is constnt, but top grows nd shrinks!
More informationA Resource for Free-standing Mathematics Units
A Resouce fo Fee-stnding Mthemtics Units A od tunnel is designed to hve coss section tht consists of m ectngle sumounted by semi-cicle s shown in the sketch. The height of the side of the tunnel is to
More informationGeometric transformations
Geometric trnsformtions Computer Grphics Some slides re bsed on Shy Shlom slides from TAU mn n n m m T A,,,,,, 2 1 2 22 12 1 21 11 Rows become columns nd columns become rows nm n n m m A,,,,,, 1 1 2 22
More informationQuiz2 45mins. Personal Number: Problem 1. (20pts) Here is an Table of Perl Regular Ex
Long Quiz2 45mins Nme: Personl Numer: Prolem. (20pts) Here is n Tle of Perl Regulr Ex Chrcter Description. single chrcter \s whitespce chrcter (spce, t, newline) \S non-whitespce chrcter \d digit (0-9)
More informationA residual stress analysis program using a Matlab GUI on an autofrettaged compound cylinder
Jounl of Mechnicl Science nd Technology 23 (2009) 293~2920 Jounl of Mechnicl Science nd Technology www.spingelink.com/content/738-494x DOI 0.007/s2206-009-0820-7 A esidul stess nlysis pogm using Mtlb GUI
More informationCS 241. Fall 2017 Midterm Review Solutions. October 24, Bits and Bytes 1. 3 MIPS Assembler 6. 4 Regular Languages 7.
CS 241 Fll 2017 Midterm Review Solutions Octoer 24, 2017 Contents 1 Bits nd Bytes 1 2 MIPS Assemly Lnguge Progrmming 2 3 MIPS Assemler 6 4 Regulr Lnguges 7 5 Scnning 9 1 Bits nd Bytes 1. Give two s complement
More informationMachine Level Programming: Arrays, Structures and More
Mchne Level Pogmmng: ys, Stuctues nd Moe Compute Systems Ognzton (Spng 2016) CSCI-U 201, Secton 2 1D ys Instucto: Jonn Klukowsk Sldes dpted fom Rndl E. Bynt nd Dvd R. O Hllon (CMU) Mohmed Zhn (NYU) 2 y
More informationDr. D.M. Akbar Hussain
Dr. D.M. Akr Hussin Lexicl Anlysis. Bsic Ide: Red the source code nd generte tokens, it is similr wht humns will do to red in; just tking on the input nd reking it down in pieces. Ech token is sequence
More informationComputer Science 141 Computing Hardware
Compute Science 141 Computing Hadwae Fall 2006 Havad Univesity Instucto: Pof. David Books dbooks@eecs.havad.edu [MIPS Pipeline Slides adapted fom Dave Patteson s UCB CS152 slides and May Jane Iwin s CSE331/431
More information(x + y) x2 + xy + y 2 (3) x2 + y 2 3 2
A Nice Sequence of Inequlities Co Minh Qung In this ppe, we would like to intoduce to the edes some pplictions of nice sequence of inequlities fo solving inequlities. Theoem. Fo ny x > 0 nd y > 0, we get
More informationdc - Linux Command Dc may be invoked with the following command-line options: -V --version Print out the version of dc
- CentOS 5.2 - Linux Uses Guide - Linux Command SYNOPSIS [-V] [--vesion] [-h] [--help] [-e sciptexpession] [--expession=sciptexpession] [-f sciptfile] [--file=sciptfile] [file...] DESCRIPTION is a evese-polish
More informationOrion: A Framework for GPU Occupancy Tuning
Oion: A Fmewok fo GPU Occupncy Tuning Ai Hyes Rutges Univesity ihyes@cs.utges.edu Lingd Li Rutges Univesity lingd.li@cs.utges.edu Shuiwen Song Pcific Nothwest Ntionl Lb Shuiwen.Song@pnnl.gov Dniel Chvi
More informationΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών. Lecture 3b Lexical Analysis Elias Athanasopoulos
ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy RecogniNon of Tokens if expressions nd relnonl opertors if è if then è then else è else relop è
More informationOutline CS 412/413. Function calls. Stack layout. Tiling a call. Two translations
CS 412/413 Introduction to Compilers nd Trnsltors Cornell University Andrew Myers Outline Implementing function clls Implementing functions Optimizing wy the pointer Dynmiclly-llocted structures strings
More informationProblem Solving in C. Stepwise Refinement. ...but can stop refining at a higher level of abstraction. Same basic constructs. as covered in Chapter 6
Problem Solving in C Stepwise Refinement as covered in Chapter 6...but can stop refining at a higher level of abstraction. Same basic constructs Sequential -- C statements Conditional -- if-else, switch
More informationVirtual Machine I: Stack Arithmetic
Virtul Mchine I: Stck Arithmetic Building Modern Computer From First Principles www.nnd2tetris.org Elements of Computing Systems, Nisn & Schocken, MIT Press, www.nnd2tetris.org, Chpter 7: Virtul Mchine
More informationCOEN-4730 Computer Architecture Lecture 2 Review of Instruction Sets and Pipelines
1 COEN-4730 Compute Achitectue Lectue 2 Review of nstuction Sets and Pipelines Cistinel Ababei Dept. of Electical and Compute Engineeing Maquette Univesity Cedits: Slides adapted fom pesentations of Sudeep
More informationData Flow on a Queue Machine. Bruno R. Preiss. Copyright (c) 1987 by Bruno R. Preiss, P.Eng. All rights reserved.
Dt Flow on Queue Mchine Bruno R. Preiss 2 Outline Genesis of dt-flow rchitectures Sttic vs. dynmic dt-flow rchitectures Pseudo-sttic dt-flow execution model Some dt-flow mchines Simple queue mchine Prioritized
More informationInternational Journal of Scientific & Engineering Research, Volume 5, Issue 6, June ISSN Ahmed A. Muhseen
ntentionl Jounl of cientific & Engineeing Resech, Volume 5, ssue 6, June-4 767 N 9-558 tbility nlysis of n Epidemic Model with Limited Tetment hmed. Muhseen bstct: Thee e mny fctos effect on the sped of
More informationSeries LJ1. Uniaxial Electric Actuator
CAT.E 90- Unixil Electric Actutor Controller Teching Box Unixil Electric Actutor Series LJ Series LJ Series LC Series LC for horizontl mounting nd brke for verticl mounting hve been dded to the high rigidity
More informationDYNAMIC STORAGE ALLOCATION. Hanan Samet
ds0 DYNAMIC STORAGE ALLOCATION Hanan Samet Compute Science Depatment and Cente fo Automation Reseach and Institute fo Advanced Compute Studies Univesity of Mayland College Pak, Mayland 07 e-mail: hjs@umiacs.umd.edu
More informationSolving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence
Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl component
More informationCylinders and quadratic surfaces (Sect. 12.6)
Clindes nd qudtic sufces (Sect..6) Clindes. Qudtic sufces: Sphees, Ellipsoids, Cones, Hpeboloids, Pboloids, Sddles, + + =. + b + c =. + b c = 0. + b c + b c = 0. b c = 0. =, b + c =. Clindes Given cuve
More information10/12/17. Motivating Example. Lexical and Syntax Analysis (2) Recursive-Descent Parsing. Recursive-Descent Parsing. Recursive-Descent Parsing
Motivting Exmple Lexicl nd yntx Anlysis (2) In Text: Chpter 4 Consider the grmmr -> cad A -> b Input string: w = cd How to build prse tree top-down? 2 Initilly crete tree contining single node (the strt
More informationPARALLEL AND DISTRIBUTED COMPUTING
PARALLEL AND DISTRIBUTED COMPUTING 2009/2010 1 st Semester Teste Jnury 9, 2010 Durtion: 2h00 - No extr mteril llowed. This includes notes, scrtch pper, clcultor, etc. - Give your nswers in the ville spce
More informationLU-0527ASC. ALUMINUM 5 ROW x 27'-0" - UNIVERSAL SERIES MODEL CS.1 OPTIONS: -RB = RUBBER BUMPERS -MS = MUD SILLS 6" RISE / 12" SEAT 5 ROW BLEACHER
LUMINUM 5 OW x 7'-0" - UNIVESL SEIES MODEL OPTIONS: -B = UBBE BUMPES -MS = MUD SILLS /3/06 CS. OPTIONL -MS (MUD SILL) OPTIONL -B (UBBE BUMPE) COVE SHEET 6" ISE / " SET GT GNDSTNDS 80 Sydney oad Phone:
More informationpdfapilot Server 2 Manual
pdfpilot Server 2 Mnul 2011 by clls softwre gmbh Schönhuser Allee 6/7 D 10119 Berlin Germny info@cllssoftwre.com www.cllssoftwre.com Mnul clls pdfpilot Server 2 Pge 2 clls pdfpilot Server 2 Mnul Lst modified:
More informationLecture Overview. Knowledge-based systems in Bioinformatics, 1MB602. Procedural abstraction. The sum procedure. Integration as a procedure
Lecture Overview Knowledge-bsed systems in Bioinformtics, MB6 Scheme lecture Procedurl bstrction Higher order procedures Procedures s rguments Procedures s returned vlues Locl vribles Dt bstrction Compound
More informationDigital Design. Chapter 1: Introduction. Digital Design. Copyright 2006 Frank Vahid
Chpter : Introduction Copyright 6 Why Study?. Look under the hood of computers Solid understnding --> confidence, insight, even better progrmmer when wre of hrdwre resource issues Electronic devices becoming
More informationFrom Dependencies to Evaluation Strategies
From Dependencies to Evlution Strtegies Possile strtegies: 1 let the user define the evlution order 2 utomtic strtegy sed on the dependencies: use locl dependencies to determine which ttriutes to compute
More informationFall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications.
15-112 Fll 2018 Midterm 1 October 11, 2018 Nme: Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or
More informationSITE DEVELOPMENT PLANS FOR: POPEYE'S 3870 S. FERDON BLVD CRESTVIEW, FL PREPARED FOR: VERDAD REAL ESTATE SITE
DEVELOPMENT PLNS FO: POPEYE'S UTILITY CONTCTS PEPED FO: SHEET NUMBE Sheet List Table SHEET TITLE DIECTIONS TO : LOCTION MP NOT TO SCLE LEGL DESCIPTION: NOTH FLOOD ZONE MP NOT TO SCLE GENEL STTEMENT: FLOOD
More informationSpring 2018 Midterm Exam 1 March 1, You may not use any books, notes, or electronic devices during this exam.
15-112 Spring 2018 Midterm Exm 1 Mrch 1, 2018 Nme: Andrew ID: Recittion Section: You my not use ny books, notes, or electronic devices during this exm. You my not sk questions bout the exm except for lnguge
More informationbinary trees, expression trees
COMP 250 Lecture 21 binry trees, expression trees Oct. 27, 2017 1 Binry tree: ech node hs t most two children. 2 Mximum number of nodes in binry tree? Height h (e.g. 3) 3 Mximum number of nodes in binry
More informationIntroduction to Computer Science, Shimon Schocken, IDC Herzliya. Lecture Writing Classes
Introduction to Computer Science, Shimon Schocken, IDC Herzliy Lecture 5.1-5.2 Writing Clsses Writing Clsses, Shimon Schocken IDC Herzliy, www.ro2cs.com slide 1 Clsses Two viewpos on es: Client view: how
More informationCS201 Discussion 10 DRAWTREE + TRIES
CS201 Discussion 10 DRAWTREE + TRIES DrwTree First instinct: recursion As very generic structure, we could tckle this problem s follows: drw(): Find the root drw(root) drw(root): Write the line for the
More informationSolving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016
Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence Winter 2016 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl
More information520 Principles of Programming Languages. Memory Management. Memory Management... 35: Garbage Collection
Dynmic Memory Mngement 50 Principles of Progrmming Lnguges 35: Grbge Collection Christin Collberg collberg@cs.rizon.edu Deprtment of Computer Science University of Arizon The run-time system linked in
More informationPointers and Arrays. More Pointer Examples. Pointers CS 217
Pointers nd Arrs CS 21 1 2 Pointers More Pointer Emples Wht is pointer A vrile whose vlue is the ddress of nother vrile p is pointer to vrile v Opertions &: ddress of (reference) *: indirection (dereference)
More informationProgramming (was due Friday) Last day to submit for late credit was yesterday. Today 6-7pm in AA204 All you need is a writing utensil and an ID
Announcement Aignment Pogmming ( ue Fi Lt to umit fo lte ceit ete Aignment Theo ue net Wene Pogmming Mitem To 6-7m in AA04 All ou nee i iting utenil n n ID (no ook/note/clculto etc. You cnnot leve the
More informationCS 430 Spring Mike Lam, Professor. Parsing
CS 430 Spring 2015 Mike Lm, Professor Prsing Syntx Anlysis We cn now formlly descrie lnguge's syntx Using regulr expressions nd BNF grmmrs How does tht help us? Syntx Anlysis We cn now formlly descrie
More informationThe Processor: Improving Performance Data Hazards
The Pocesso: Impoving Pefomance Data Hazads Monday 12 Octobe 15 Many slides adapted fom: and Design, Patteson & Hennessy 5th Edition, 2014, MK and fom Pof. May Jane Iwin, PSU Summay Pevious Class Pipeline
More informationLING/C SC/PSYC 438/538. Lecture 21 Sandiway Fong
LING/C SC/PSYC 438/538 Lecture 21 Sndiwy Fong Tody's Topics Homework 8 Review Optionl Homework 9 (mke up on Homework 7) Homework 8 Review Question1: write Prolog regulr grmmr for the following lnguge:
More informationSection 3.1: Sequences and Series
Section.: Sequences d Series Sequences Let s strt out with the definition of sequence: sequence: ordered list of numbers, often with definite pttern Recll tht in set, order doesn t mtter so this is one
More informationLab 1 - Counter. Create a project. Add files to the project. Compile design files. Run simulation. Debug results
1 L 1 - Counter A project is collection mechnism for n HDL design under specifiction or test. Projects in ModelSim ese interction nd re useful for orgnizing files nd specifying simultion settings. The
More informationMatrices and Systems of Equations
Mtrices Mtrices nd Sstems of Equtions A mtri is rectngulr rr of rel numbers. CHAT Pre-Clculus Section 8. m m m............ n n n mn We will use the double subscript nottion for ech element of the mtri.
More informationToday s Lecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Recursive Example. Review: The C / C++ code. Recursive Example (Continued)
Tod s Lecture Bsics of Logic Design: Boolen Alger, Logic Gtes Alvin R. Leeck CPS 4 Lecture 8 Homework #2 Due Ferur 3 Outline Review (sseml recursion) Building the uilding locks Logic Design Truth tles,
More informationStack Manipulation. Other Issues. How about larger constants? Frame Pointer. PowerPC. Alternative Architectures
Other Issues Stck Mnipultion support for procedures (Refer to section 3.6), stcks, frmes, recursion mnipulting strings nd pointers linkers, loders, memory lyout Interrupts, exceptions, system clls nd conventions
More informationDynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012
Dynmic Progrmming Andres Klppenecker [prtilly bsed on slides by Prof. Welch] 1 Dynmic Progrmming Optiml substructure An optiml solution to the problem contins within it optiml solutions to subproblems.
More informationDYNAMIC STORAGE ALLOCATION. Hanan Samet
ds0 DYNAMIC STORAGE ALLOCATION Hanan Samet Compute Science Depatment and Cente fo Automation Reseach and Institute fo Advanced Compute Studies Univesity of Mayland College Pak, Mayland 074 e-mail: hjs@umiacs.umd.edu
More informationbox Boxes and Arrows 3 true 7.59 'X' An object is drawn as a box that contains its data members, for example:
Boxes nd Arrows There re two kinds of vriles in Jv: those tht store primitive vlues nd those tht store references. Primitive vlues re vlues of type long, int, short, chr, yte, oolen, doule, nd flot. References
More information10.5 Graphing Quadratic Functions
0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions
More information(1'-6") OUTLINE OF REQUIRED CLEAR SERVICE AREA NOTE: USED WITH 13485G OPERATOR UNIT OR DUAL SIDED OPERATOR UNIT SEE PAGE 2 AND 3 OF 8
CLL CLL VCUUM I TUBE 2GX CUSTOME, OPETO, CONTOL ND BLOWE DETILS L02 CLL -800-999-600 949 486G CUSTOME DETILS SEE PGE 2 OF 8 FO LISTINGS ND PPOVLS 68 27 ('- 08 ) BOLLDS ECOMMENDED- SIZE ND LOCTION S EQUIED
More informationUser Visible Registers. CPU Structure and Function Ch 11. General CPU Organization (4) Control and Status Registers (5) Register Organisation (4)
PU Stuctue and Function h Geneal Oganisation Registes Instuction ycle Pipelining anch Pediction Inteupts Use Visible Registes Vaies fom one achitectue to anothe Geneal pupose egiste (GPR) ata, addess,
More informationTopic 2: Lexing and Flexing
Topic 2: Lexing nd Flexing COS 320 Compiling Techniques Princeton University Spring 2016 Lennrt Beringer 1 2 The Compiler Lexicl Anlysis Gol: rek strem of ASCII chrcters (source/input) into sequence of
More informationOPERATION MANUAL. DIGIFORCE 9307 PROFINET Integration into TIA Portal
OPERATION MANUAL DIGIFORCE 9307 PROFINET Integrtion into TIA Portl Mnufcturer: 2018 burster präzisionsmesstechnik gmbh & co kg burster präzisionsmesstechnik gmbh & co kg Alle Rechte vorbehlten Tlstrße
More informationLecture 8 Introduction to Pipelines Adapated from slides by David Patterson
Lectue 8 Intoduction to Pipelines Adapated fom slides by David Patteson http://www-inst.eecs.bekeley.edu/~cs61c/ * 1 Review (1/3) Datapath is the hadwae that pefoms opeations necessay to execute pogams.
More informationFunctor (1A) Young Won Lim 8/2/17
Copyright (c) 2016-2017 Young W. Lim. Permission is grnted to copy, distribute nd/or modify this document under the terms of the GNU Free Documenttion License, Version 1.2 or ny lter version published
More informationThe Fundamental Theorem of Calculus
MATH 6 The Fundmentl Theorem of Clculus The Fundmentl Theorem of Clculus (FTC) gives method of finding the signed re etween the grph of f nd the x-xis on the intervl [, ]. The theorem is: FTC: If f is
More informationCSE 401 Midterm Exam 11/5/10 Sample Solution
Question 1. egulr expressions (20 points) In the Ad Progrmming lnguge n integer constnt contins one or more digits, but it my lso contin embedded underscores. Any underscores must be preceded nd followed
More informationFunctor (1A) Young Won Lim 10/5/17
Copyright (c) 2016-2017 Young W. Lim. Permission is grnted to copy, distribute nd/or modify this document under the terms of the GNU Free Documenttion License, Version 1.2 or ny lter version published
More informationApplications of the Definite Integral ( Areas and Volumes)
Mth1242 Project II Nme: Applictions of the Definite Integrl ( Ares nd Volumes) In this project, we explore some pplictions of the definite integrl. We use integrls to find the re etween the grphs of two
More informationSystems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits
Systems I Logic Design I Topics Digitl logic Logic gtes Simple comintionl logic circuits Simple C sttement.. C = + ; Wht pieces of hrdwre do you think you might need? Storge - for vlues,, C Computtion
More informationUnit #9 : Definite Integral Properties, Fundamental Theorem of Calculus
Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl
More informationProcedures vs. Functions. Procedure Call. Syntax. Activation Record for Nested Blocks. Environment. CSE 3302 Programming Languages
-2-3 CSE 3302 Progrmmng Lnguges Control II Procedures nd Envronments Chengk L, Wemn He Sprng Procedures vs. Functons Functon: no sde effect return vlue Functon cll: epresson Procedure: sde effect, eecuted
More informationMIPS I/O and Interrupt
MIPS I/O nd Interrupt Review Floting point instructions re crried out on seprte chip clled coprocessor 1 You hve to move dt to/from coprocessor 1 to do most common opertions such s printing, clling functions,
More informationPresentation Martin Randers
Presenttion Mrtin Rnders Outline Introduction Algorithms Implementtion nd experiments Memory consumption Summry Introduction Introduction Evolution of species cn e modelled in trees Trees consist of nodes
More informationCSCI 104. Rafael Ferreira da Silva. Slides adapted from: Mark Redekopp and David Kempe
CSCI 0 fel Ferreir d Silv rfsilv@isi.edu Slides dpted from: Mrk edekopp nd Dvid Kempe LOG STUCTUED MEGE TEES Series Summtion eview Let n = + + + + k $ = #%& #. Wht is n? n = k+ - Wht is log () + log ()
More informationDefinition of Regular Expression
Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll
More informationLEX5: Regexps to NFA. Lexical Analysis. CMPT 379: Compilers Instructor: Anoop Sarkar. anoopsarkar.github.io/compilers-class
LEX5: Regexps to NFA Lexicl Anlysis CMPT 379: Compilers Instructor: Anoop Srkr noopsrkr.github.io/compilers-clss Building Lexicl Anlyzer Token POern POern Regulr Expression Regulr Expression NFA NFA DFA
More informationLists in Lisp and Scheme
Lists in Lisp nd Scheme Lists in Lisp nd Scheme Lists re Lisp s fundmentl dt structures, ut there re others Arrys, chrcters, strings, etc. Common Lisp hs moved on from eing merely LISt Processor However,
More informationCS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis
CS143 Hndout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexicl Anlysis In this first written ssignment, you'll get the chnce to ply round with the vrious constructions tht come up when doing lexicl
More informationcisc1110 fall 2010 lecture VI.2 call by value function parameters another call by value example:
cisc1110 fll 2010 lecture VI.2 cll y vlue function prmeters more on functions more on cll y vlue nd cll y reference pssing strings to functions returning strings from functions vrile scope glol vriles
More informationChapter 1: Introduction
Chpter : Introduction Slides to ccompny the textbook, First Edition, by, John Wiley nd Sons Publishers, 7. http://www.ddvhid.com Copyright 7 Instructors of courses requiring Vhid's textbook (published
More informationEfficient Execution Path Exploration for Detecting Races in Concurrent Programs
IAENG Intenational Jounal of Compute Science, 403, IJCS_40_3_02 Efficient Execution Path Exploation fo Detecting Races in Concuent Pogams Theodous E. Setiadi, Akihiko Ohsuga, and Mamou Maekaa Abstact Concuent
More informationGARBAGE COLLECTION METHODS. Hanan Samet
gc0 GARBAGE COLLECTION METHODS Hanan Samet Compute Science Depatment and Cente fo Automation Reseach and Institute fo Advanced Compute Studies Univesity of Mayland College Pak, Mayland 07 e-mail: hjs@umiacs.umd.edu
More informationDemand-Driven Context-Sensitive Alias Analysis for Java
Demnd-Driven Context-Sensitive Alis Anlysis or Jv Dcong (Tony) Yn Guoqing (Hrry) Xu Atns Rountev Ohio Stte University PRESTO: Progrm Anlyses nd Sotwre Tools Reserch Group, Ohio Stte University Alis Anlysis
More informationLanguages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) *
Pln for Tody nd Beginning Next week Interpreter nd Compiler Structure, or Softwre Architecture Overview of Progrmming Assignments The MeggyJv compiler we will e uilding. Regulr Expressions Finite Stte
More informationNOTES. Figure 1 illustrates typical hardware component connections required when using the JCM ICB Asset Ticket Generator software application.
ICB Asset Ticket Genertor Opertor s Guide Septemer, 2016 Septemer, 2016 NOTES Opertor s Guide ICB Asset Ticket Genertor Softwre Instlltion nd Opertion This document contins informtion for downloding, instlling,
More information2/6/2018. Let s Act Like Compilers! ECE 220: Computer Systems & Programming. Decompose Finding Absolute Value
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Let s Act Like Compilers! Let s have some fun! Let s pretend to be a C compiler!
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology
More informationx )Scales are the reciprocal of each other. e
9. Reciprocls A Complete Slide Rule Mnul - eville W Young Chpter 9 Further Applictions of the LL scles The LL (e x ) scles nd the corresponding LL 0 (e -x or Exmple : 0.244 4.. Set the hir line over 4.
More information