Pointer Analysis. What is Points-to Analysis? Outline. What is Points-to Analysis? What is Points-to Analysis? What is Pointer Analysis? Rupesh Nasre.
|
|
- Jonah Holmes
- 6 years ago
- Views:
Transcription
1 Pointer Anlysis Wht is? Ruesh Nsre. CS6843 Anlysis IIT Mdrs Jn 2014 = &x; = ; if ( == *) { } else { } oints to x 4 Outline Wht is? Introduction Pointer nlysis s DFA rolem Design decisions nlysis, Steensgrd's nlysis Pointer nlysis s grh rolem Otimiztions Pointer nlysis s grh rewrite rules Alictions Prlleliztion Constrint sed Reliction sed 2 = &x; = ; if ( == *) { } else { } oints to x nd re lises 5 Wht is Pointer Anlysis? Wht is? = &x; = ; if ( == *) { } else { } = &x; = ; if ( == *) { } else { } oints to x nd re lises Is this condition lwys stisfied? 3 6
2 Wht is? Plcement of = &x; = ; oints to x nd re lises Lock synchronizer Prllelizing comiler Memory lek detector if ( == *) { Is this condition lwys stisfied? Dt flow nlyzer String vulnerility finder } else { } Pointer Anlysis is is mechnism to stticlly find out run-time vlues of ointer. Better comile time time Affine exression nlyzer slicer Tye nlyzer 7 10 Why? Plcement of for Prlleliztion fun() fun() for Otimiztion Imroved runtime Lock synchronizer Prllelizing comiler Memory lek detector = + 2; = + 2; Clients of Dt flow nlyzer String vulnerility finder for Bug-Finding for Understnding Better comile time time Affine exression nlyzer Tye nlyzer... slicer 8 11 Plcement of Plcement of Prllelizing comiler Imroved runtime Prllelizing comiler Lock synchronizer Memory lek detector Lock synchronizer Memory lek detector Dt flow nlyzer String vulnerility finder Dt flow nlyzer Secure code code String vulnerility finder Better comile time time Affine exression nlyzer Tye nlyzer Affine exression nlyzer Tye nlyzer slicer slicer 9 12
3 Plcement of Imroved runtime Prllelizing comiler A C rogrm cn e normlized to contin only four tyes of ointer-mniulting sttements or constrints. Lock synchronizer Memory lek detector Dt flow nlyzer Better comile time time Affine exression nlyzer Secure code code String vulnerility finder Tye nlyzer Points-to constrints = & ddress-of = coy = * lod * = store slicer Better deugging A C rogrm cn e normlized to contin only four tyes of ointer-mniulting sttements or constrints. A C rogrm cn e normlized to contin only four tyes of ointer-mniulting sttements or constrints. Points-to constrints Points-to constrints = & ddress-of = coy = * lod * = store = & ddress-of = coy = * lod * = store A C rogrm cn e normlized to contin only four tyes of ointer-mniulting sttements or constrints. A C rogrm cn e normlized to contin only four tyes of ointer-mniulting sttements or constrints. Points-to constrints Points-to constrints = & ddress-of = coy = * lod * = store = & ddress-of = coy = * lod * = store 15 18
4 Definitions Cyclic Deendence Points-to nlysis comutes oints-to informtion for ech ointer. Alis nlysis comutes lising informtion for ll ointers. Alising informtion cn e comuted using oints-to informtion, ut not vice vers. Clients often uery for lising informtion, ut storing it is exensive O(n 2 ), hence frmeworks store ointsto informtion. If x, x is often clled ointee of. Points-to informtion {y, {y, z} z} c c {z} {z} Alising informtion c -- Yes No Yes c Cll grh function ointers Otimiztion oints-to informtion 22 Nomenclrure Pointer nlysis: Amiguous usge in literture. We will use it to refer to oth oints-to nlysis nd lis nlysis. In the context of Jv-like lnguges, it is clled reference nlysis. Also clled s he nlysis. 20 As DFA = &x: &x: gen{ gen{ x} x} = : : gen{ x} x} if if { { x} x} = *: *: gen{ gen{ x} x} if if { { x} x} * * = : : gen{ x} x} if if { { nd nd x} x} kill{ kill{ x} x} if if { { nd nd x} x} In(B) In(B) = U Out(P) Out(P) where where P Pred(B) Out(B) = Gen(B) U (In(B) (In(B) Kill(B)) = = &z = &y = & = if c gen(b0) = {} kill(b0) = {tsto(), tsto()} gen(b1) = {x if x, z} kill(b1) = {tsto(), tsto()} gen(b2) = {x,mn if m nd kill(b2) = {tsto(tsto()), tsto()} n nd m } gen(b3) = { } kill(b3) = { } in1 out1 in2 out2 in3 out3 * = = &x B0 {} { } {} {, {x,z}} {} {, {x,z}} B1 {} {z} out1(b0) {, {x,z}, {x,z}} out2(b0) {, {x,z}, {x,z}} B2 {} {x} out1(b0) {, {x,z}, {x,z}} out2(b0) {, {x,z}, {x,z}} B3 {} {} out1(b1) U out1(b2) {, {x,z}, {x,z}} out2(b1) U out2(b2) 23 {, {x,z}, {x,z}} B1 B3 B0 B2 Algeric Proerties Design Decisions Alising reltion is reflexive, symmetric, ut not trnsitive. Points-to reltion is neither reflexive, nor symmetric, not even trnsitive. The oints-to reltion induces restricted DAG for strictly tyed lnguges. Anlysis dimensions He modeling Set imlementtion Cll grh, function ointers Arry indices Memory Time Holy gril Precision loss 21 24
5 Anlysis Dimensions Context-sensitivity An nlysis's recision nd efficiency is guided y vrious design decisions. Flow-sensitivity Context-sensitivity min() {{ L0: L0: fun(&x); L1: L1: fun(&y); }} fun(int *) *){{ = ; ; }} Inter-rocedurl intr-rocedurl Context-sensitive solution: oints to x long L0, oints to y long L1 Context-insensitive solution: 's oints-to set is {x, y} in the rogrm 's oints-to set is {ll ddress-tken vriles} Pth-sensitivity Field-sensitivity Flow-sensitivity Pth-sensitivity L0: L0: L1: L1: = &y; &y; L2: L2: Flow-sensitive solution: t L1 oints to x, t L2 oints to y Flow-insensitive solution: in the rogrm 's oints-to set is {x, y} Flow-insensitive nlyses ignore the control-flow in the rogrm. if if ( ( == == 0) 0) = &x; &x; else else = &y; &y; Pth-sensitive solution: oints-to x when is 0, oints-to y when is not 0 Pth-insensitive solution: 's oints-to set is {x, y} in the rogrm B2 B2 B1 B1 B4 B4 B3 B3 B1 B1 B3 B3 B2 B2 B4 B4 B1 B1 B2 B2 B3 B3 B4 B4 PP 26 if if (c1) (c1) while while (c2) (c2){{ if if (c3) (c3) else for for (; (; c4; c4; )) }} else else c1 nd c2 nd c3, c1 nd c2 nd!c3 nd c4, c1 nd c2 nd!c3 nd!c4, c1 nd!c2,!c Context-sensitivity Field-sensitivity min() {{ L0: L0: fun(&x); L1: L1: fun(&y); }} fun(int *) *){{ = ; ; }} Context-sensitive solution: oints to x long L0, oints to y long L1 Context-insensitive solution: 's oints-to set is {x, y} in the rogrm struct T s; s; s. s. s. s. = &y; &y; Field-sensitive solution: s. oints-to x, s. oints-to y Field-insensitive solution: s's oints-to set is {x, y} f min g g g g... f Exonentil Numer of contexts Exonentil time reuirement Along min-f1-g1, Along min-f1-g2, Along min-f2-g1, Along min-f2-g2,... Exonentil storge reuirement 27 Aggregtes re collsed into single vrile. e.g., rrys, structures, unions. This reduces the numer of vriles trcked during the nlysis nd reduces recision. 30
6 Anlysis Inclusion-sed / suset-sed / constrint-sed nlysis Flow-insensitive nlysis For sttement =, crete constrint tsto() tsto() where is of the form *,, nd is of the form *,, &. Solving these inclusion constrints results into the oints-to solution. 31 Anlysis: Clsswork Constrints * * = c; c; = &y; &y; = *; *; = &; &; * * = c; c; c c = ; ; c c = &z; &z; tsto(*) tsto(c) tsto() tsto() tsto(*) tsto() tsto() {x} {x} tsto(*) tsto(c) tsto(c) tsto() tsto(c) {z} {z} fixed-oint Pointers Itertion 0 Itertion 1 Itertion 2 Itertion 3 { } {x} {, x, z} { } {y} {, x, y, z} c { } {, z} {, z} { } x { } y { } z 34 Anlysis: Exmle Anlysis: Otimiztions = &x; = &y; = &; c = ; * = c; Constrints tsto() {x} tsto() {y} tsto() {} tsto(c) tsto() tsto(*) tsto(c) fixed-oint Pointers Itertion 0 Itertion 1 Itertion 2 { } {x, y} { } {y} c { } {y} { } {} x { } y { } Imrecision 32 Avoid dulictes Reorder constrints Process ddress-of constrints once Difference rogtion 35 Anlysis: Modified Exmle Anlysis: Comlexity = &y; &y; = &; &; * * = c; c; c = ; ; Constrints tsto() {x} {x} tsto() Order Order does does not not mtter mtter tsto() for for correctness, tsto(*) tsto(c) ut ut it it does does mtter mtter tsto(c) tsto() for for efficiency. efficiency. fixed-oint Pointers Itertion 0 Itertion 1 Itertion 2 Itertion 3 { } {x} {x, y} { } {y} c { } {y} { } {} x { } y { } 33 Totl informtion comuted (storge) = O(n ) From ech ointer To ech other ointer Progte O(n) informtion O(n) times From ech ointer To ech other ointer Progte O(n) informtion O(n⁴) O(n³) Oen: Cn Cn you you reduce the the g g etween storge nd nd time time comlexities? Nive Difference Progtion 36
7 Steensgrd's Anlysis Unifiction-sed Almost liner time O(n α(n)) More imrecise For sttement =, merge the oints-to sets of nd. In suset terms, tsto() tsto() nd tsto() tsto() with single reresenttive element. 37 Steensgrd's Hierrchy Wht is its structure? How mny incoming edges to ech node? How mny outgoing edges from ech node? Cn there e cycles? Wht hens to = &? Wht is the recision difference etween nd Steensgrd's nlyses? If for ech P = Q, we dd Q = P nd solve using nlysis, would it e euivlent to Steensgrd's nlysis? 40 Steensgrd's Anlysis: Exmle Unifying Model Two = &x; = &y; = &; c = ; * = c; {x, y} {y} c {y} {} Steensgrd's {x, y} {x, y} c {x, y} {} Steensgrd's hierrchy is chrcterized y single outgoing edge. oints-to grh cn hve ritrry numer of outgoing edges (mximum n). Pointers Itertion 0 Itertion 1 {*} {*, *, *c, x, y} {*} {*, *, *c, x, y} Only Only one one itertion itertion Numer of edges in etween the two rovide recision-sclility trde-off. c {*c} {*, *, *c, x, y} {*} {*, } x {*x} y {*y} Steensgrd's Hierrchy Unifying Model Two Steensgrd's Steensgrd's = &y; &y; = &; &; c = ; ; * * = c; c; c c c = &y; &y; = &; &; c = ; ; * * = c; c; c c c * *, x *x *, x *x *, y *y, * *, x *, y *y, * *, x *, *c, y *y, * *, *, *c, x, y xx yy, * *, *, *c, x, y *x *x =&x =&y =& c= *=c *x, *y 39 *x, *y 42
8 Unifying Model Two Unifying Model Two = &y; &y; = &; &; c c = ; ; * * = c; c; c c Steensgrd's c = &y; &y; = &; &; c c = ; ; * * = c; c; = &z; &z; c c Steensgrd's c In etween c c x y x, y xx yy zz x, y, z x, y zz 43 Wht if x nd z re merged? 46 Unifying Model Two Unifying Model One = &y; &y; = &; &; c c = ; ; * * = c; c; c c x y Steensgrd's c x, y Steensgrd's unifiction cn e viewed s eulity of oints-to sets. Thus, if = merges their oints-to sets nd = c merges their oints-to sets, then nd c ecome lises! Rememer: lising is not trnsitive. So, unifiction dds trnsitivity to the lising reltion Unifying Model Two Unifying Model One Steensgrd's = &y; &y; = &; &; c c = ; ; * * = c; c; = &z; &z; c c c A B C Steensgrd's A, B, C Alising is non-trnsitive Alising ecomes trnsitive x y zz x, y, z 45 48
9 Bck to Steensgrd's Alising reltion is trnsitive. We know tht it is lso reflexive nd symmetric. This mens lising ecomes n euivlence reltion. Steensgrd's unifiction rtitions ointers into euivlent sets. Extr All redecessors of node form rtition. The euivlence sets re {}, {,, c}, {x, y, z}. x, y, z Bck to Steensgrd's Alising reltion is trnsitive. We know tht it is lso reflexive nd symmetric. This mens lising ecomes n euivlence reltion. Steensgrd's unifiction rtitions ointers into euivlent sets. Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Wekly tyed All redecessors of node form rtition. The euivlence sets re {, }, {, }, {c}, {x, y}, {z}. Two dereferences Aritrry dereference Fixed dereference Aritrry dereference x, y zz 50 Undecidle NP-Hrd 53 Relizle Fcts Sttements oints-to = &c &c {, {, c} c} = & & {, {,,, c} c} c c = & & c {} {} = d {, {,,, c} c} = d = Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Wekly tyed A relizility seuence is seuence of sttements such tht given oints-to fct is stisfied. The relizility seuence for c is =&c, =. The relizility seuence for is c=&, =&, *=c. Clsswork: Wht is the relizility seuence for d? nd c re relizle individully, ut not simultneously. Two dereferences Aritrry dereference Fixed dereference Aritrry dereference 51 Undecidle NP-Hrd 54
10 Comlexity of Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Wekly tyed Flow-sensitive Flow-insensitive Strongly tyed Wekly tyed Two dereferences Aritrry dereference Fixed dereference Aritrry dereference Two dereferences Aritrry dereference Fixed dereference Aritrry dereference Undecidle NP-Hrd 55 Undecidle NP-Hrd 58 Comlexity of Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Wekly tyed Flow-sensitive Flow-insensitive Strongly tyed Wekly tyed Two dereferences Aritrry dereference Fixed dereference Aritrry dereference Two dereferences Aritrry dereference Fixed dereference Aritrry dereference Undecidle NP-Hrd 56 Undecidle NP-Hrd 59 Comlexity of Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Wekly tyed Flow-sensitive Flow-insensitive Strongly tyed Wekly tyed Two dereferences Aritrry dereference Fixed dereference Aritrry dereference Two dereferences Aritrry dereference Fixed dereference Aritrry dereference Undecidle NP-Hrd 57 Undecidle NP-Hrd 60
11 Precision Relted Work Precision Context-Sensitive Flow-Sensitive Lndi, Ryder 92 Choi et l. 93 Emmi et l. 94 Res et l. 95 Hind et l. 99 Khlon 08 Flow-insensitive Ling, Hrrold 99 Whley, Lm 04 Zhu, Clmn 04 Lttner et l. 07 Surveys Hind, Pioli 00 Qing, Wu 06 Context-Insensitive Zheng 98 Hrdekof, Lin 09 Andersen 94 Steensgrd 96 Shiro, Horwitz 97 Fhndrich et l. 98 Ds 00 Rountev, Chndr 00 Berndl et l. 03 Hrdekof, Lin 07 Pereir, Berlin 09 Mendez-Lojo 10 61
Pointer Analysis. What is Points-to Analysis? Outline. What is Points-to Analysis? What is Points-to Analysis? What is Pointer Analysis? Rupesh Nasre.
Pointer Analysis What is? Ruesh Nasre. CS6843 Analysis IIT Madras Jan 2016 = a; if ( == *) { } else { } a oints to x 4 Outline What is? Introduction Pointer analysis as a DFA rolem Design decisions analysis,
More informationPointer Analysis. CSE 501 Spring 15
Pointer Anlysis CSE 501 Sring 15 Course Outline St8c nlysis Dtflow nd strct interret8on Alic8ons We re here Beyond generl- urose lnguges Progrm Verific8on Dynmic nlysis New comilers Tody Intro to ointer
More informationUninformed Search. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 31 Jan 2012
1 Hl Dumé III (me@hl3.nme) Uninformed Serch Hl Dumé III Comuter Science University of Mrylnd me@hl3.nme CS 421: Introduction to Artificil Intelligence 31 Jn 2012 Mny slides courtesy of Dn Klein, Sturt
More informationIf you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.
Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online
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 informationExample: 2:1 Multiplexer
Exmple: 2:1 Multiplexer Exmple #1 reg ; lwys @( or or s) egin if (s == 1') egin = ; else egin = ; 1 s B. Bs 114 Exmple: 2:1 Multiplexer Exmple #2 Normlly lwys include egin nd sttements even though they
More informationSpC: Synthesis of Pointers in C
SC: Synthesis of Pointers in C Aliction of Pointer Anlysis to the Behviorl Synthesis from C Luc Séméri Giovnni De Micheli lucs@zur.stnford.edu nnni@glileo.stnford.edu Comuter System Lortory, Stnford University
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 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 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 informationPage. Harsh Reality. Dynamic Memory Allocation. Malloc Package. Process Memory Image. Assumptions. Malloc Example
Hrsh Relity Memory Mtters Memory is not unbounded It must be llocted nd mnged 1 Mny lictions re memory dominted Esecilly those bsed on comlex, grh lgorithms Memory referencing bugs esecilly ernicious Effects
More informationDiscussion 1 Recap. COP4600 Discussion 2 OS concepts, System call, and Assignment 1. Questions. Questions. Outline. Outline 10/24/2010
COP4600 Discussion 2 OS concepts, System cll, nd Assignment 1 TA: Hufeng Jin hj0@cise.ufl.edu Discussion 1 Recp Introduction to C C Bsic Types (chr, int, long, flot, doule, ) C Preprocessors (#include,
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 informationCS553 Lecture Introduction to Data-flow Analysis 1
! Ide Introdution to Dt-flow nlysis!lst Time! Implementing Mrk nd Sweep GC!Tody! Control flow grphs! Liveness nlysis! Register llotion CS553 Leture Introdution to Dt-flow Anlysis 1 Dt-flow Anlysis! Dt-flow
More informationSymbol Table management
TDDD Compilers nd interpreters TDDB44 Compiler Construction Symol Tles Symol Tles in the Compiler Symol Tle mngement source progrm Leicl nlysis Syntctic nlysis Semntic nlysis nd Intermedite code gen Code
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 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 informationCS412/413. Introduction to Compilers Tim Teitelbaum. Lecture 4: Lexical Analyzers 28 Jan 08
CS412/413 Introduction to Compilers Tim Teitelum Lecture 4: Lexicl Anlyzers 28 Jn 08 Outline DFA stte minimiztion Lexicl nlyzers Automting lexicl nlysis Jlex lexicl nlyzer genertor CS 412/413 Spring 2008
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 informationLexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay
Lexicl Anlysis Amith Snyl (www.cse.iit.c.in/ s) Deprtment of Computer Science nd Engineering, Indin Institute of Technology, Bomy Septemer 27 College of Engineering, Pune Lexicl Anlysis: 2/6 Recp The input
More informationCS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig
CS311H: Discrete Mthemtics Grph Theory IV Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mthemtics Grph Theory IV 1/25 A Non-plnr Grph Regions of Plnr Grph The plnr representtion of
More informationGeorge Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables
George Boole IT 3123 Hrdwre nd Softwre Concepts My 28 Digitl Logic The Little Mn Computer 1815 1864 British mthemticin nd philosopher Mny contriutions to mthemtics. Boolen lger: n lger over finite sets
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 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 information2 Computing all Intersections of a Set of Segments Line Segment Intersection
15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design
More informationCS 432 Fall Mike Lam, Professor a (bc)* Regular Expressions and Finite Automata
CS 432 Fll 2017 Mike Lm, Professor (c)* Regulr Expressions nd Finite Automt Compiltion Current focus "Bck end" Source code Tokens Syntx tree Mchine code chr dt[20]; int min() { flot x = 42.0; return 7;
More informationControl-Flow Analysis and Loop Detection
! Control-Flow Anlysis nd Loop Detection!Lst time! PRE!Tody! Control-flow nlysis! Loops! Identifying loops using domintors! Reducibility! Using loop identifiction to identify induction vribles CS553 Lecture
More information4452 Mathematical Modeling Lecture 4: Lagrange Multipliers
Mth Modeling Lecture 4: Lgrnge Multipliers Pge 4452 Mthemticl Modeling Lecture 4: Lgrnge Multipliers Lgrnge multipliers re high powered mthemticl technique to find the mximum nd minimum of multidimensionl
More information1.1. Interval Notation and Set Notation Essential Question When is it convenient to use set-builder notation to represent a set of numbers?
1.1 TEXAS ESSENTIAL KNOWLEDGE AND SKILLS Prepring for 2A.6.K, 2A.7.I Intervl Nottion nd Set Nottion Essentil Question When is it convenient to use set-uilder nottion to represent set of numers? A collection
More informationHigh Priority Traffic in HCF on Wireless Networks
High Priority Trffic in HC on Wireless Networks Mo Add, Amnd Pert, Gordon Erly School of Comuting, University of Portsmouth, Lion Terrce, Portsmouth, UK {mo.dd, mnd.ert, gordon.erly }@ort.c.uk Abstrct
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 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 informationChapter 4 Fuzzy Graph and Relation
Chpter 4 Fuzzy Grph nd Reltion Grph nd Fuzzy Grph! Grph n G = (V, E) n V : Set of verties(node or element) n E : Set of edges An edge is pir (x, y) of verties in V.! Fuzzy Grph ~ n ( ~ G = V, E) n V :
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 informationTool Vendor Perspectives SysML Thus Far
Frontiers 2008 Pnel Georgi Tec, 05-13-08 Tool Vendor Perspectives SysML Thus Fr Hns-Peter Hoffmnn, Ph.D Chief Systems Methodologist Telelogic, Systems & Softwre Modeling Business Unit Peter.Hoffmnn@telelogic.com
More informationToday. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search.
CS 88: Artificil Intelligence Fll 00 Lecture : A* Serch 9//00 A* Serch rph Serch Tody Heuristic Design Dn Klein UC Berkeley Multiple slides from Sturt Russell or Andrew Moore Recp: Serch Exmple: Pncke
More informationReducing a DFA to a Minimal DFA
Lexicl Anlysis - Prt 4 Reducing DFA to Miniml DFA Input: DFA IN Assume DFA IN never gets stuck (dd ded stte if necessry) Output: DFA MIN An equivlent DFA with the minimum numer of sttes. Hrry H. Porter,
More informationTries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries
Tries Yufei To KAIST April 9, 2013 Y. To, April 9, 2013 Tries In this lecture, we will discuss the following exct mtching prolem on strings. Prolem Let S e set of strings, ech of which hs unique integer
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 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 informationCOMPUTER EDUCATION TECHNIQUES, INC. (MS_W2K3_SERVER ) SA:
In order to lern which questions hve een nswered correctly: 1. Print these pges. 2. Answer the questions. 3. Send this ssessment with the nswers vi:. FAX to (212) 967-3498. Or. Mil the nswers to the following
More informationReference types and their characteristics Class Definition Constructors and Object Creation Special objects: Strings and Arrays
Objects nd Clsses Reference types nd their chrcteristics Clss Definition Constructors nd Object Cretion Specil objects: Strings nd Arrys OOAD 1999/2000 Cludi Niederée, Jochim W. Schmidt Softwre Systems
More informationUNIT 11. Query Optimization
UNIT Query Optimiztion Contents Introduction to Query Optimiztion 2 The Optimiztion Process: An Overview 3 Optimiztion in System R 4 Optimiztion in INGRES 5 Implementing the Join Opertors Wei-Png Yng,
More informationCOMP 423 lecture 11 Jan. 28, 2008
COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring
More informationTopic: Software Model Checking via Counter-Example Guided Abstraction Refinement. Having a BLAST with SLAM. Combining Strengths. SLAM Overview SLAM
Hving BLAST with SLAM Topic: Softwre Model Checking vi Counter-Exmple Guided Abstrction Refinement There re esily two dozen SLAM/BLAST/MAGIC ppers; I will skim. # # Theorem Proving Combining Strengths
More informationHere is an example where angles with a common arm and vertex overlap. Name all the obtuse angles adjacent to
djcent tht do not overlp shre n rm from the sme vertex point re clled djcent ngles. me the djcent cute ngles in this digrm rm is shred y + + me vertex point for + + + is djcent to + djcent simply mens
More informationA Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards
A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin
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 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 informationSimplifying Algebra. Simplifying Algebra. Curriculum Ready.
Simplifying Alger Curriculum Redy www.mthletics.com This ooklet is ll out turning complex prolems into something simple. You will e le to do something like this! ( 9- # + 4 ' ) ' ( 9- + 7-) ' ' Give this
More informationOUTPUT DELIVERY SYSTEM
Differences in ODS formtting for HTML with Proc Print nd Proc Report Lur L. M. Thornton, USDA-ARS, Animl Improvement Progrms Lortory, Beltsville, MD ABSTRACT While Proc Print is terrific tool for dt checking
More informationTopological Queries on Graph-structured XML Data: Models and Implementations
Topologicl Queries on Grph-structured XML Dt: Models nd Implementtions Hongzhi Wng, Jinzhong Li, nd Jizhou Luo Astrct In mny pplictions, dt is in grph structure, which cn e nturlly represented s grph-structured
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 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 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 informationLexical Analysis: Constructing a Scanner from Regular Expressions
Lexicl Anlysis: Constructing Scnner from Regulr Expressions Gol Show how to construct FA to recognize ny RE This Lecture Convert RE to n nondeterministic finite utomton (NFA) Use Thompson s construction
More informationCompiler-Assisted Cache Replacement
LCPC 3 Formulting The Prolem of Compiler-Assisted Cche Replcement Hongo Yng LCPC 3 Agend Bckground: Memory hierrchy, ISA with cche hints Prolem definition: How should compiler give cche hint to minimize
More informationCS453 INTRODUCTION TO DATAFLOW ANALYSIS
CS453 INTRODUCTION TO DATAFLOW ANALYSIS CS453 Leture Register llotion using liveness nlysis 1 Introdution to Dt-flow nlysis Lst Time Register llotion for expression trees nd lol nd prm vrs Tody Register
More informationThe Structure of Forward, Reverse, and Transverse Path Graphs in The Pattern Recognition Algorithms of Sellers
The Structure of Forwrd, Reverse, nd Trnsverse Pth Grhs in The Pttern Recognition Algorithms of Sellers Lewis Lsser Dertment of Mthemtics nd Comuter Science York College/CUNY Jmic, New York 11451 llsser@york.cuny.edu
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 informationNetwork Interconnection: Bridging CS 571 Fall Kenneth L. Calvert All rights reserved
Network Interconnection: Bridging CS 57 Fll 6 6 Kenneth L. Clvert All rights reserved The Prolem We know how to uild (rodcst) LANs Wnt to connect severl LANs together to overcome scling limits Recll: speed
More informationClass Overview. Database Design. Database Design Process. Database Design. Introduction to Data Management CSE 414
Introution to Dt Mngement CSE 44 Unit 6: Coneptul Design E/R Digrms Integrity Constrints BCNF Introution to Dt Mngement CSE 44 E/R Digrms ( letures) CSE 44 Autumn 08 Clss Overview Dtse Design Unit : Intro
More informationHyperbolas. Definition of Hyperbola
CHAT Pre-Clculus Hyperols The third type of conic is clled hyperol. For n ellipse, the sum of the distnces from the foci nd point on the ellipse is fixed numer. For hyperol, the difference of the distnces
More informationGraphing Conic Sections
Grphing Conic Sections Definition of Circle Set of ll points in plne tht re n equl distnce, clled the rdius, from fixed point in tht plne, clled the center. Grphing Circle (x h) 2 + (y k) 2 = r 2 where
More informationCS380: Computer Graphics Modeling Transformations. Sung-Eui Yoon ( 윤성의 ) Course URL:
CS38: Computer Grphics Modeling Trnsformtions Sung-Eui Yoon ( 윤성의 ) Course URL: http://sgl.kist.c.kr/~sungeui/cg/ Clss Ojectives (Ch. 3.5) Know the clssic dt processing steps, rendering pipeline, for rendering
More informationLost in Translation: A Reflection on the Ballot Problem and André's Original Method
Lost in Trnsltion: A Reflection on the Bllot Prolem nd André's Originl Method Mrc Renult Shippensurg University Presented t MthFest August 5, 2007 The Bllot Prolem (1887) In how mny wys cn upsteps nd downsteps
More informationCS 188: Artificial Intelligence Fall 2008
CS 188: Artificil Intelligence Fll 2008 Lecture 2: Queue-Bsed Serc 9/2/2008 Dn Klein UC Berkeley Mny slides from eiter Sturt Russell or Andrew Moore Announcements Written ssignments: One mini-omework ec
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 informationSearch Gone Wrong? CS 188: Artificial Intelligence Fall Today. Announcements. General Tree Search. Recap: Search. Lecture 3: A* Search 9/3/2009
C 88: Artiicil Intelligence Fll 009 erch one Wrong? Lecture : A* erch 9//009 Pieter Aeel UC Berkeley Mny slides rom Dn Klein Announcements Assignments: Project 0 (Python tutoril): due Fridy /8 t 4:59m
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 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 informationComplexities In DSP Software Compilation: Performance, Code Size, Power, Retargetability
1060-3425/98 $1000 (C) 1998 IEEE Comlexities In DSP Softwre Comiltion: Performnce, Code Size, Power, Retrgetbility Ctherine H Gebotys Robert J Gebotys Dertment of Electricl nd Comuter Engineering University
More informationthis grammar generates the following language: Because this symbol will also be used in a later step, it receives the
LR() nlysis Drwcks of LR(). Look-hed symols s eplined efore, concerning LR(), it is possile to consult the net set to determine, in the reduction sttes, for which symols it would e possile to perform reductions.
More informationP(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have
Rndom Numers nd Monte Crlo Methods Rndom Numer Methods The integrtion methods discussed so fr ll re sed upon mking polynomil pproximtions to the integrnd. Another clss of numericl methods relies upon using
More informationHow to Design REST API? Written Date : March 23, 2015
Visul Prdigm How Design REST API? Turil How Design REST API? Written Dte : Mrch 23, 2015 REpresenttionl Stte Trnsfer, n rchitecturl style tht cn be used in building networked pplictions, is becoming incresingly
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 information1.5 Extrema and the Mean Value Theorem
.5 Extrem nd the Men Vlue Theorem.5. Mximum nd Minimum Vlues Definition.5. (Glol Mximum). Let f : D! R e function with domin D. Then f hs n glol mximum vlue t point c, iff(c) f(x) for ll x D. The vlue
More informationSolution of Linear Algebraic Equations using the Gauss-Jordan Method
Solution of Liner Algebric Equtions using the Guss-Jordn Method Populr pproch for solving liner equtions The Guss Jordn method depends on two properties of liner equtions: Scling one or more of ny of the
More informationThe Greedy Method. The Greedy Method
Lists nd Itertors /8/26 Presenttion for use with the textook, Algorithm Design nd Applictions, y M. T. Goodrich nd R. Tmssi, Wiley, 25 The Greedy Method The Greedy Method The greedy method is generl lgorithm
More informationLecture 7: Integration Techniques
Lecture 7: Integrtion Techniques Antiderivtives nd Indefinite Integrls. In differentil clculus, we were interested in the derivtive of given rel-vlued function, whether it ws lgeric, eponentil or logrithmic.
More informationRegister Transfer Level (RTL) Design
CSE4: Components nd Design Techniques for Digitl Systems Register Trnsfer Level (RTL) Design Tjn Simunic Rosing Where we re now Wht we hve covered lst time: Register Trnsfer Level (RTL) design Wht we re
More informationWhat are suffix trees?
Suffix Trees 1 Wht re suffix trees? Allow lgorithm designers to store very lrge mount of informtion out strings while still keeping within liner spce Allow users to serch for new strings in the originl
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 informationEECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining
EECS150 - Digitl Design Lecture 23 - High-level Design nd Optimiztion 3, Prllelism nd Pipelining Nov 12, 2002 John Wwrzynek Fll 2002 EECS150 - Lec23-HL3 Pge 1 Prllelism Prllelism is the ct of doing more
More informationZZ - Advanced Math Review 2017
ZZ - Advnced Mth Review Mtrix Multipliction Given! nd! find the sum of the elements of the product BA First, rewrite the mtrices in the correct order to multiply The product is BA hs order x since B is
More informationCOMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples
COMPUTER SCIENCE 123 Foundtions of Computer Science 6. Tuples Summry: This lecture introduces tuples in Hskell. Reference: Thompson Sections 5.1 2 R.L. While, 2000 3 Tuples Most dt comes with structure
More informationLU Decomposition. Mechanical Engineering Majors. Authors: Autar Kaw
LU Decomposition Mechnicl Engineering Mjors Authors: Autr Kw Trnsforming Numericl Methods Eduction for STEM Undergrdutes // LU Decomposition LU Decomposition LU Decomposition is nother method to solve
More informationApproximation of Two-Dimensional Rectangle Packing
pproximtion of Two-imensionl Rectngle Pcking Pinhong hen, Yn hen, Mudit Goel, Freddy Mng S70 Project Report, Spring 1999. My 18, 1999 1 Introduction 1-d in pcking nd -d in pcking re clssic NP-complete
More informationLinear Lists. Linked List Mechanics. Sequential Lists. Linked Lists. 6. LL Mechanics. 6. LL Mechanics. Slides
Lked Lt Mechnics 6. LL Mechnics 1 Ler Lts 6. LL Mechnics 2 Slides 1. Tble Contents 2. Ler Lts 3. Lt Node Design 4. Self Referencg Structures 5. Lt Formtion Exmle 6. Lt Trversl 7. Lked Lt Oertions 8. Dt
More informationAI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley
AI Adjcent Fields Philosophy: Logic, methods of resoning Mind s physicl system Foundtions of lerning, lnguge, rtionlity Mthemtics Forml representtion nd proof Algorithms, computtion, (un)decidility, (in)trctility
More informationIntroduction to Algebra
INTRODUCTORY ALGEBRA Mini-Leture 1.1 Introdution to Alger Evlute lgeri expressions y sustitution. Trnslte phrses to lgeri expressions. 1. Evlute the expressions when =, =, nd = 6. ) d) 5 10. Trnslte eh
More informationMATH 2530: WORKSHEET 7. x 2 y dz dy dx =
MATH 253: WORKSHT 7 () Wrm-up: () Review: polr coordintes, integrls involving polr coordintes, triple Riemnn sums, triple integrls, the pplictions of triple integrls (especilly to volume), nd cylindricl
More informationSlides for Data Mining by I. H. Witten and E. Frank
Slides for Dt Mining y I. H. Witten nd E. Frnk Simplicity first Simple lgorithms often work very well! There re mny kinds of simple structure, eg: One ttriute does ll the work All ttriutes contriute eqully
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 informationBasics of Logic Design Arithmetic Logic Unit (ALU)
Bsics of Logic Design Arithmetic Logic Unit (ALU) CPS 4 Lecture 9 Tody s Lecture Homework #3 Assigned Due Mrch 3 Project Groups ssigned & posted to lckord. Project Specifiction is on We Due April 9 Building
More information12 <= rm <digit> 2 <= rm <no> 2 <= rm <no> <digit> <= rm <no> <= rm <number>
DDD16 Compilers nd Interpreters DDB44 Compiler Construction R Prsing Prt 1 R prsing concept Using prser genertor Prse ree Genertion Wht is R-prsing? eft-to-right scnning R Rigthmost derivtion in reverse
More informationCOMBINATORIAL PATTERN MATCHING
COMBINATORIAL PATTERN MATCHING Genomic Repets Exmple of repets: ATGGTCTAGGTCCTAGTGGTC Motivtion to find them: Genomic rerrngements re often ssocited with repets Trce evolutionry secrets Mny tumors re chrcterized
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 information1 The Definite Integral
The Definite Integrl Definition. Let f be function defined on the intervl [, b] where
More informationMisrepresentation of Preferences
Misrepresenttion of Preferences Gicomo Bonnno Deprtment of Economics, University of Cliforni, Dvis, USA gfbonnno@ucdvis.edu Socil choice functions Arrow s theorem sys tht it is not possible to extrct from
More information