Pointer Analysis. What is Points-to Analysis? Outline. What is Points-to Analysis? What is Points-to Analysis? What is Pointer Analysis? Rupesh Nasre.

Size: px
Start display at page:

Download "Pointer Analysis. What is Points-to Analysis? Outline. What is Points-to Analysis? What is Points-to Analysis? What is Pointer Analysis? Rupesh Nasre."

Transcription

1 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, Steensgrd's analysis Pointer analysis as a grah rolem Otimizations Pointer analysis as grah rewrite rules Alications Parallelization Constraint ased Relication ased 2 = a; if ( == *) { } else { } a oints to x a and are aliases 5 What is Pointer Analysis? What is? = a; if ( == *) { } else { } = a; if ( == *) { } else { } a oints to x a and are aliases Is this condition always satisfied? 3 6

2 What is? Placement of = a; a oints to x a and are aliases Lock synchronizer Parallelizing comiler Memory leak detector if ( == *) { Is this condition always satisfied? Data flow analyzer String vulneraility finder } else { } Pointer Analysis is is a mechanism to statically find out run-time values of a ointer. Better comile time time Affine exression analyzer slicer Tye analyzer 7 10 Why? Placement of for Parallelization fun() fun(q) for Otimization Imroved runtime Lock synchronizer Parallelizing comiler Memory leak detector a = + 2; = q + 2; Clients of Data flow analyzer String vulneraility finder for Bug-Finding for Understanding Better comile time time Affine exression analyzer Tye analyzer... slicer 8 11 Placement of Placement of Parallelizing comiler Imroved runtime Parallelizing comiler Lock synchronizer Memory leak detector Lock synchronizer Memory leak detector Data flow analyzer String vulneraility finder Data flow analyzer Secure code code String vulneraility finder Better comile time time Affine exression analyzer Tye analyzer Affine exression analyzer Tye analyzer slicer slicer 9 12

3 Placement of Imroved runtime Parallelizing comiler A C rogram can e normalized to contain only four tyes of ointer-maniulating statements or constraints. Lock synchronizer Memory leak detector Data flow analyzer Better comile time time Affine exression analyzer Secure code code String vulneraility finder Tye analyzer Points-to constraints = &q address-of q = q coy = *q load * = q store q slicer Better deugging A C rogram can e normalized to contain only four tyes of ointer-maniulating statements or constraints. A C rogram can e normalized to contain only four tyes of ointer-maniulating statements or constraints. Points-to constraints Points-to constraints = &q address-of = q coy = *q load * = q store q = &q address-of = q coy = *q load * = q store q A C rogram can e normalized to contain only four tyes of ointer-maniulating statements or constraints. A C rogram can e normalized to contain only four tyes of ointer-maniulating statements or constraints. Points-to constraints Points-to constraints q = &q address-of q = q coy = *q load * = q store q = &q address-of = q coy = *q load * = q store q 15 18

4 Definitions Cyclic Deendence Points-to analysis comutes oints-to information for each ointer. Alias analysis comutes aliasing information for all ointers. Aliasing information can e comuted using oints-to information, ut not vice versa. Clients often query for aliasing information, ut storing it is exensive O(n 2 ), hence frameworks store ointsto information. If a x, x is often called a ointee of a. Points-to information a {y, {y, z} z} c c {z} {z} Aliasing information a c a -- Yes No Yes c Call grah function ointers Otimization oints-to information 22 Nomenclarure Pointer analysis: Amiguous usage in literature. We will use it to refer to oth oints-to analysis and alias analysis. In the context of Java-like languages, it is called reference analysis. Also called as hea analysis. 20 As a DFA a = &x: &x: gen{a gen{a x} x} a = : : gen{a x} x} if if { { x} x} a = *: *: gen{a gen{a x} x} if if { { x} x} * * = a: a: gen{ x} x} if if { { and and a x} x} kill{ kill{ x} x} if if { { and and 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)) a = = &z = &y = &a = a if c gen(b0) = {a, x if ax} kill(b0) = {tsto(), tsto()} gen(b1) = {ax if x, z} kill(b1) = {tsto(a), tsto()} gen(b2) = {ax,mn if m and kill(b2) = {tsto(tsto()), tsto(a)} n and m a} gen(b3) = { } kill(b3) = { } in1 out1 in2 out2 in3 out3 * = a = &x B0 {} { a} {} {a, {x,z {} {a, {x,z B1 {} {z} out1(b0) {a,a {x,z}, {z out2(b0) {a,a {x,z}, {z B2 {} {ax} out1(b0) {a,a {x}, {x,z out2(b0) {a,a {x}, {x,z B3 {} {} out1(b1) U out1(b2) {a,a {x,z}, {x,z out2(b1) U out2(b2) {a,a {x,z}, 23 {x,z B1 B3 B0 B2 Algeraic Proerties Aliasing relation is reflexive, symmetric, ut not transitive. Points-to relation is neither reflexive, nor symmetric, not even transitive. The oints-to relation induces a restricted DAG for strictly tyed languages. As a DFA: Notes Gen and Kill are dynamic (not fixed efore analysis). Gen/Kill and Points-to Information are cyclically deendent. Single coy of a variale leads to imrecision. e.g., a's oints-to set doesn't reach B0 in any execution, ut the analysis treats it otherwise

5 Design Decisions Context-sensitivity Analysis dimensions Hea modeling Set imlementation Call grah, function ointers Time Holy grail main() main() {{ L0: L0: fun(&x); L1: L1: fun(&y); fun(int *a) *a){{ = a; a; Context-sensitive solution: oints to x along L0, oints to y along L1 Context-insensitive solution: 's oints-to set is {x, y} in the rogram Array indices Memory Precision loss f main g g g g f Exonential Numer of contexts Along main-f1-g1, Along main-f1-g2, Along main-f2-g1, Along main-f2-g2, Exonential time requirement Exonential storage requirement 28 Analysis Dimensions Context-sensitivity An analysis's recision and efficiency is guided y various design decisions. Flow-sensitivity Context-sensitivity main() {{ L0: L0: fun(&x); L1: L1: fun(&y); fun(int *a) *a){{ = a; a; Inter-rocedural intra-rocedural Context-sensitive solution: oints to x along L0, oints to y along L1 Context-insensitive solution: 's oints-to set is {x, y} in the rogram 's oints-to set is {all address-taken variales} Path-sensitivity Field-sensitivity Flow-sensitivity Path-sensitivity L0: L0: L1: L1: a = &y; &y; L2: L2: Flow-sensitive solution: at L1 a oints to x, at L2 a oints to y Flow-insensitive solution: in the rogram a's oints-to set is {x, y} Flow-insensitive analyses ignore the control-flow in the rogram. if if (a (a == == 0) 0) = &x; &x; else else = &y; &y; Path-sensitive solution: oints-to x when a is 0, oints-to y when a is not 0 Path-insensitive solution: 's oints-to set is {x, y} in the rogram 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 27 if if (c1) (c1) while while (c2) (c2){{ if if (c3) (c3) else else for for (; (; c4; c4; )) else c1 and c2 and c3, c1 and c2 and!c3 and c4, c1 and c2 and!c3 and!c4, c1 and!c2,!c

6 Field-sensitivity Analysis: Modified Examle struct struct T s; s; s.a s. s. s. = &y; &y; Field-sensitive solution: s.a oints-to x, s. oints-to y Field-insensitive solution: s's oints-to set is {x, y} = &y; &y; = &a; &a; * * = c; c; c c = ; ; Constraints tsto(a) {x} {x} tsto() tsto() tsto(*) tsto(c) tsto(c) tsto() Order Order does does not not matter matter for for correctness, ut ut it it does does matter matter for for efficiency. efficiency. Aggregates are collased into a single variale. e.g., arrays, structures, unions. This reduces the numer of variales tracked during the analysis and reduces recision. fixed-oint Pointers Iteration 0 Iteration 1 Iteration 2 Iteration 3 a { } {x} {x, y} { } {y} c { } {y} { } {a} x { } 31 y { } 34 Analysis Inclusion-ased / suset-ased / constraint-ased analysis Flow-insensitive analysis For a statement = q, create a constraint tsto() tsto(q) where is of the form *a, a, and q is of the form *a, a, &a. Solving these inclusion constraints results into the oints-to solution. 32 Analysis: Classwork Constraints * * = c; c; = &y; &y; = *; *; = &a; &a; * * = c; c; c c = ; ; c c = &z; &z; tsto(*) tsto(c) tsto() tsto() tsto(*) tsto() tsto(a) {x} {x} tsto(*) tsto(c) tsto(c) tsto() tsto(c) {z} {z} fixed-oint Pointers Iteration 0 Iteration 1 Iteration 2 Iteration 3 a { } {x} {a, x, z} { } {y} {a, x, y, z} c { } {a, z} {a, z} { } x { } y { } z 35 Analysis: Examle Analysis: Otimizations = &y; = &a; c = ; * = c; Constraints tsto(a) {x} tsto() {y} tsto() {a} tsto(c) tsto() tsto(*) tsto(c) Avoid dulicates Reorder constraints Process address-of constraints once Difference roagation fixed-oint Pointers Iteration 0 Iteration 1 Iteration 2 a { } {x, y} { } {y} Imrecision c { } {y} { } {a} x { } y { } 33 36

7 Analysis: Comlexity Steensgrd's Hierarchy Total information comuted (storage) = O(n 2 ) From each ointer To each other ointer Proagate O(n) information O(n) times From each ointer To each other ointer Proagate O(n) information O(n⁴) O(n³) Oen: Can Can you you reduce the the ga ga etween storage and and time time comlexities? Naive Difference Proagation 37 *a *a, x *x = &y; &y; = &a; &a; c c = ; ; * * = c; c; a *a, x *x a c c *, y *y a, * *a, x *, y *y Steensgrd's a c *a, x *x *x a=&x =&y =&a c= *=c a, * *, *c, y *y a, * *a, *, *c, x, y *x, *y 40 Steensgrd's Analysis Unification-ased Almost linear time O(n α(n)) More imrecise For a statement = q, merge the oints-to sets of and q. In suset terms, tsto() tsto(q) and tsto(q) tsto() with a single reresentative element. 38 Classwork Steensgrd's * * = c; c; a {a, {a, x, x, z} z} = &y; &y; {a, {a, x, x, y, y, z} z} = *; *; c c {a, {a, z} z} = &a; &a; * * = c; c; c = ; ; c c = &z; &z; 41 Steensgrd's Analysis: Examle Steensgrd's Hierarchy = &y; = &a; c = ; * = c; a {x, y} {y} c {y} {a} Steensgrd's a {x, y} {x, y} c {x, y} {a} What is its structure? How many incoming edges to each node? How many outgoing edges from each node? Can there e cycles? Pointers Iteration 0 Iteration 1 a {*a} {*a, *, *c, x, y} {*} {*a, *, *c, x, y} c {*c} {*a, *, *c, x, y} {*} {*, a} x {*x} y {*y} Only Only one one iteration iteration 39 What haens to = &? What is the recision difference etween and Steensgrd's analyses? If for each P = Q, we add Q = P and solve using analysis, would it e equivalent to Steensgrd's analysis? 42

8 Unifying Model Two Unifying Model Two Steensgrd's hierarchy is characterized y a single outgoing edge. oints-to grah can have aritrary numer of outgoing edges (maximum n). = &y; &y; = &a; &a; c c = ; ; * * = c; c; a c c Steensgrd's a c Numer of edges in etween the two rovide recision-scalaility trade-off. a xx yy x, y Unifying Model Two Unifying Model Two Steensgrd's Steensgrd's = &y; &y; = &a; &a; c c = ; ; * * = c; c; a c c a c = &y; &y; = &a; &a; c c = ; ; * * = c; c; a = &z; &z; a c a c a, * a x y *a, *, *c, x, y xx yy zz x, y, z *x, *y Unifying Model Two Unifying Model Two Steensgrd's Steensgrd's In etween = &y; &y; = &a; &a; c c = ; ; * * = c; c; a c c a c = &y; &y; = &a; &a; c = ; ; * * = c; c; a = &z; &z; a c c a c a c c a a x y x, y xx yy zz x, y, z x, y zz 45 What if x and z are merged? 48

9 Unifying Model One Steensgrd's unification can e viewed as equality of oints-to sets. Thus, if a = merges their oints-to sets and = c merges their oints-to sets, then a and c ecome aliases! Rememer: aliasing is not transitive. So, unification adds transitivity to the aliasing relation. Back to Steensgrd's Aliasing relation is transitive. We know that it is also reflexive and symmetric. This means aliasing ecomes an equivalence relation. Steensgrd's unification artitions ointers into equivalent sets. qq All redecessors of a node form a artition. The equivalence sets are {, q}, {a, }, {c}, {x, y}, {z}. 49 x, y zz 52 Unifying Model One Realizale Facts A B C Steensgrd's A, B, C Statements oints-to a = &c &c a {, {, c} c} = &a &a {a, {a,,, c} c} c = & & c {} {} = a d {a, {a,,, c} c} = d = a Aliasing is non-transitive Aliasing ecomes transitive A realizaility sequence is a sequence of statements such that a given oints-to fact is satisfied. 50 The realizaility sequence for c is a=&c, =a. The realizaility sequence for a is c=&, =&a, *=c. Classwork: What is the realizaility sequence for d a? Classwork: What is the realizaility sequence for d c? a and c are realizale individually, ut not simultaneously. 53 Back to Steensgrd's Aliasing relation is transitive. We know that it is also reflexive and symmetric. This means aliasing ecomes an equivalence relation. Steensgrd's unification artitions ointers into equivalent sets. x, y, z All redecessors of a node form a artition. The equivalence sets are {}, {a,, c}, {x, y, z}. 51 int int *fun(int *a, *a, int int *) *){{ int int *c; *c; if if (*a (*a == == *) *){{ c c = ; ; else else {{ c c = a; a; return c; c; int int *g; *g; void void main() {{ int int *x, *x,*y, *y,*z, *z,**w; **w; int int m = 0, 0, n = 1; 1; char char *str; *str; x = &m; &m; y = &n; &n; str str = (char *)malloc(30); w = (int (int*)&str; if if (m (m < n) n) {{ strcy(str, m m is is smaller\n ); z = fun(y, x); x); else else {{ rintf( m is is >= >= n\n ); w = &x; &x; *w *w = fun(x, y); y); How do we take care of malloc? How do we take care of tye-casts? Find the set of normalized statements for intra-rocedural ointer analysis. Perform intra-rocedural analysis. How do we take care of strcy and rintf? How aout the gloal g? Perform inter-rocedural contextinsensitive analysis. Perform Steensgrd's analysis. 54

10 Extra Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Weakly tyed Two dereferences Aritrary dereference Fixed dereference Aritrary dereference 55 Undecidale NP-Hard 58 Comlexity of Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Weakly tyed Flow-sensitive Flow-insensitive Strongly tyed Weakly tyed Two dereferences Aritrary dereference Fixed dereference Aritrary dereference Two dereferences Aritrary dereference Fixed dereference Aritrary dereference Undecidale NP-Hard 56 Undecidale NP-Hard 59 Comlexity of Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Weakly tyed Flow-sensitive Flow-insensitive Strongly tyed Weakly tyed Two dereferences Aritrary dereference Fixed dereference Aritrary dereference Two dereferences Aritrary dereference Fixed dereference Aritrary dereference Undecidale NP-Hard 57 Undecidale NP-Hard 60

11 Comlexity of Related Work Precision Context-Sensitive Context-Insensitive Flow-sensitive Flow-insensitive Strongly tyed Weakly tyed Flow-Sensitive Landi, Ryder 92 Choi et al. 93 Emami et al. 94 Res et al. 95 Hind et al. 99 Kahlon 08 Zheng 98 Hardekof, Lin 09 Two dereferences Aritrary dereference Fixed dereference Aritrary dereference Undecidale NP-Hard 61 Precision Flow-insensitive Liang, Harrold 99 Whaley, Lam 04 Zhu, Calman 04 Lattner et al. 07 Surveys Hind, Pioli 00 Qiang, Wu 06 Andersen 94 Steensgrd 96 Shairo, Horwitz 97 Fahndrich et al. 98 Das 00 Rountev, Chandra 00 Berndl et al. 03 Hardekof, Lin 07 Pereira, Berlin 09 Mendez-Lojo Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Weakly tyed Two dereferences Aritrary dereference Fixed dereference Aritrary dereference Undecidale NP-Hard 62 Comlexity of Flow-sensitive Flow-insensitive Strongly tyed Weakly tyed Two dereferences Aritrary dereference Fixed dereference Aritrary dereference Undecidale NP-Hard 63

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 Points-to Analysis? Outline. What is Points-to Analysis? What is Points-to Analysis? What is Pointer Analysis? Rupesh Nasre. 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

More information

Simple example. Analysis of programs with pointers. Points-to relation. Program model. Points-to graph. Ordering on points-to relation

Simple example. Analysis of programs with pointers. Points-to relation. Program model. Points-to graph. Ordering on points-to relation Simle eamle Analsis of rograms with ointers := 5 tr := @ *tr := 9 := rogram S1 S2 S3 S4 deendences What are the deendences in this rogram? Problem: just looking at variable names will not give ou the correct

More information

Lecture 14 Pointer Analysis

Lecture 14 Pointer Analysis Lecture 14 Pointer Analysis Basics Design Options Pointer Analysis Algorithms Pointer Analysis Using BDDs Probabilistic Pointer Analysis [ALSU 12.4, 12.6-12.7] Phillip B. Gibbons 15-745: Pointer Analysis

More information

Storage Allocation CSE 143. Pointers, Arrays, and Dynamic Storage Allocation. Pointer Variables. Pointers: Review. Pointers and Types

Storage Allocation CSE 143. Pointers, Arrays, and Dynamic Storage Allocation. Pointer Variables. Pointers: Review. Pointers and Types CSE 143 Pointers, Arrays, and Dynamic Storage Allocation [Chater 4,. 148-157, 172-177] Storage Allocation Storage (memory) is a linear array of cells (bytes) Objects of different tyes often reuire differing

More information

Lecture 20 Pointer Analysis

Lecture 20 Pointer Analysis Lecture 20 Pointer Analysis Basics Design Options Pointer Analysis Algorithms Pointer Analysis Using BDDs Probabilistic Pointer Analysis (Slide content courtesy of Greg Steffan, U. of Toronto) 15-745:

More information

Lecture 27. Pros and Cons of Pointers. Basics Design Options Pointer Analysis Algorithms Pointer Analysis Using BDDs Probabilistic Pointer Analysis

Lecture 27. Pros and Cons of Pointers. Basics Design Options Pointer Analysis Algorithms Pointer Analysis Using BDDs Probabilistic Pointer Analysis Pros and Cons of Pointers Lecture 27 Pointer Analysis Basics Design Options Pointer Analysis Algorithms Pointer Analysis Using BDDs Probabilistic Pointer Analysis Many procedural languages have pointers

More information

Lecture 16 Pointer Analysis

Lecture 16 Pointer Analysis Pros and Cons of Pointers Lecture 16 Pointer Analysis Basics Design Options Pointer Analysis Algorithms Pointer Analysis Using BDDs Probabilistic Pointer Analysis Many procedural languages have pointers

More information

Who. Winter Compiler Construction Generic compiler structure. Mailing list and forum. IC compiler. How

Who. Winter Compiler Construction Generic compiler structure. Mailing list and forum. IC compiler. How Winter 2007-2008 Comiler Construction 0368-3133 Mooly Sagiv and Roman Manevich School of Comuter Science Tel-Aviv University Who Roman Manevich Schreiber Oen-sace (basement) Tel: 640-5358 rumster@ost.tau.ac.il

More information

Alias Analysis. Last time Interprocedural analysis. Today Intro to alias analysis (pointer analysis) CS553 Lecture Alias Analysis I 1

Alias Analysis. Last time Interprocedural analysis. Today Intro to alias analysis (pointer analysis) CS553 Lecture Alias Analysis I 1 Alias Analysis Last time Interprocedural analysis Today Intro to alias analysis (pointer analysis) CS553 Lecture Alias Analysis I 1 Aliasing What is aliasing? When two expressions denote the same mutable

More information

Query-Directed Adaptive Heap Cloning for Optimizing Compilers

Query-Directed Adaptive Heap Cloning for Optimizing Compilers Query-Directed Adative Hea Cloning for Otimizing Comilers Yulei Sui Yue Li Jingling Xue Programming Languages and Comilers Grou School of Comuter Science and Engineering University of New South Wales,

More information

Example: Runtime Memory Allocation: Example: Dynamical Memory Allocation: Some Comments: Allocate and free dynamic memory

Example: Runtime Memory Allocation: Example: Dynamical Memory Allocation: Some Comments: Allocate and free dynamic memory Runtime Memory Allocation: Examle: All external and static variables Global systemcontrol Suose we want to design a rogram for handling student information: tyedef struct { All dynamically allocated variables

More information

Cascade 2.0. C static analysis tool with an SMT backend. Wei Wang, Clark Barrett, Thomas Wies

Cascade 2.0. C static analysis tool with an SMT backend. Wei Wang, Clark Barrett, Thomas Wies Cascade 2.0 C static analysis tool with an SMT backend Wei Wang, Clark Barrett, Thomas Wies htt://cascade.cims.nyu.edu Overview Memory models Flat memory model Burstall memory model Partition memory model

More information

Parallel Flow-Sensitive Pointer Analysis by Graph-Rewriting

Parallel Flow-Sensitive Pointer Analysis by Graph-Rewriting Parae Fow-Sensitive Pointer Anaysis by Grah-Rewriting Vaivaswatha Nagaraj R. Govindarajan Indian Institute of Science, Bangaore PACT 2013 2 Outine Introduction Background Fow-sensitive grah-rewriting formuation

More information

Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects

Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScrit Objects Shiyi Wei and Barbara G. Ryder Deartment of Comuter Science, Virginia Tech, Blacksburg, VA, USA. {wei,ryder}@cs.vt.edu

More information

Why Global Dataflow Analysis?

Why Global Dataflow Analysis? Why Global Dataflow Analysis? Answer key questions at compile-time about the flow of values and other program properties over control-flow paths Compiler fundamentals What defs. of x reach a given use

More information

Context-Sensitive Pointer Analysis. Recall Context Sensitivity. Partial Transfer Functions [Wilson et. al. 95] Emami 1994

Context-Sensitive Pointer Analysis. Recall Context Sensitivity. Partial Transfer Functions [Wilson et. al. 95] Emami 1994 Context-Sensitive Pointer Analysis Last time Flow-insensitive pointer analysis Today Context-sensitive pointer analysis Emami invocation graphs Partial Transfer Functions The big picture Recall Context

More information

Lecture06: Pointers 4/1/2013

Lecture06: Pointers 4/1/2013 Lecture06: Pointers 4/1/2013 Slides modified from Yin Lou, Cornell CS2022: Introduction to C 1 Pointers A ointer is a variable that contains the (memory) address of another variable What is a memory address?

More information

Alias Analysis & Points-to Analysis. Hwansoo Han

Alias Analysis & Points-to Analysis. Hwansoo Han Alias Analysis & Points-to Analysis Hwansoo Han May vs. Must Information May information The information is true on some path through a CFG Must information The information is true on all paths through

More information

Pointers and Memory Allocation p. 1. Brooklyn College. Michael Lampis. CISC 3130 Notes. Pointers and Memory Allocation

Pointers and Memory Allocation p. 1. Brooklyn College. Michael Lampis. CISC 3130 Notes. Pointers and Memory Allocation Pointers and Memory Allocation CISC 3130 Notes Michael Lamis mlamis@cs.ntua.gr Brooklyn College Pointers and Memory Allocation. 1 int x; Pointers x Pointers and Memory Allocation. 2 Pointers int x; int

More information

Lecture Notes: Pointer Analysis

Lecture Notes: Pointer Analysis Lecture Notes: Pointer Analysis 15-819O: Program Analysis Jonathan Aldrich jonathan.aldrich@cs.cmu.edu Lecture 9 1 Motivation for Pointer Analysis In programs with pointers, program analysis can become

More information

Applications of Pointers (1A) Young Won Lim 4/11/18

Applications of Pointers (1A) Young Won Lim 4/11/18 (1A) Coyright (c) 2010-2018 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version ublished

More information

1.5 Case Study. dynamic connectivity quick find quick union improvements applications

1.5 Case Study. dynamic connectivity quick find quick union improvements applications . Case Study dynamic connectivity quick find quick union imrovements alications Subtext of today s lecture (and this course) Stes to develoing a usable algorithm. Model the roblem. Find an algorithm to

More information

Dataflow analysis (ctd.)

Dataflow analysis (ctd.) Dataflow analysis (ctd.) Available expressions Determine which expressions have already been evaluated at each point. A expression x+y is available at point p if every path from the entry to p evaluates

More information

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University Query Processing Shuigeng Zhou May 18, 2016 School of Comuter Science Fudan University Overview Outline Measures of Query Cost Selection Oeration Sorting Join Oeration Other Oerations Evaluation of Exressions

More information

Applications of Pointers (1A) Young Won Lim 2/27/18

Applications of Pointers (1A) Young Won Lim 2/27/18 Alications of (1A) Coyright (c) 2010-2018 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Pointers (1A) Young Won Lim 10/18/17

Pointers (1A) Young Won Lim 10/18/17 Pointers (1A) Coyright (c) 2010-2013 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

Applications of Pointers (1A) Young Won Lim 3/21/18

Applications of Pointers (1A) Young Won Lim 3/21/18 (1A) Coyright (c) 2010-2018 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version ublished

More information

Applications of Pointers (1A) Young Won Lim 3/14/18

Applications of Pointers (1A) Young Won Lim 3/14/18 (1A) Coyright (c) 2010-2018 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version ublished

More information

Pointer Analysis. Outline. Points-to Analysis as a Graph Problem. Points-to Analysis as a Graph Problem. Points-to Analysis as a Graph Problem

Pointer Analysis. Outline. Points-to Analysis as a Graph Problem. Points-to Analysis as a Graph Problem. Points-to Analysis as a Graph Problem Pointer Analysis,,,, Rupesh Nasre. b { } CS6843 Program Analysis IIT Madras Jan 2014 4 Outline Introduction Pointer analysis as a DFA problem Design decisions,,,, Andersen's analysis, Steensgaard's analysis

More information

Pointers (1A) Young Won Lim 12/4/17

Pointers (1A) Young Won Lim 12/4/17 Pointers (1A) Coyright (c) 2010-2017 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

Lecture Notes: Pointer Analysis

Lecture Notes: Pointer Analysis Lecture Notes: Pointer Analysis 17-355/17-665/17-819: Program Analysis (Spring 2019) Jonathan Aldrich aldrich@cs.cmu.edu 1 Motivation for Pointer Analysis In the spirit of extending our understanding of

More information

Applications of Pointers (1A) Young Won Lim 3/31/18

Applications of Pointers (1A) Young Won Lim 3/31/18 (1A) Coyright (c) 2010-2018 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version ublished

More information

Equality-Based Translation Validator for LLVM

Equality-Based Translation Validator for LLVM Equality-Based Translation Validator for LLVM Michael Ste, Ross Tate, and Sorin Lerner University of California, San Diego {mste,rtate,lerner@cs.ucsd.edu Abstract. We udated our Peggy tool, reviously resented

More information

Dimensions of Precision in Reference Analysis of Object-oriented Programming Languages. Outline

Dimensions of Precision in Reference Analysis of Object-oriented Programming Languages. Outline Dimensions of Precision in Reference Analysis of Object-oriented Programming Languages Dr. Barbara G. Ryder Rutgers University http://www.cs.rutgers.edu/~ryder http://prolangs.rutgers.edu/ Research supported,

More information

Applications of Pointers (1A) Young Won Lim 1/5/18

Applications of Pointers (1A) Young Won Lim 1/5/18 Alications of (1A) Coyright (c) 2010-2017 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Pointers (1A) Young Won Lim 10/23/17

Pointers (1A) Young Won Lim 10/23/17 Pointers (1A) Coyright (c) 2010-2013 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

CMPE-013/L. Introduction to C Programming

CMPE-013/L. Introduction to C Programming CMPE-013/L Introduction to C Programming Gabriel Hugh Elkaim Winter 2015 and memory Pointer/array equivalency Pointer arithmetic and the stack and strings Arrays of ointers 1 Syntax tye *trname; How to

More information

Applications of Pointers (1A) Young Won Lim 4/24/18

Applications of Pointers (1A) Young Won Lim 4/24/18 (1A) Coyright (c) 2010-2018 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version ublished

More information

CS711 Advanced Programming Languages Pointer Analysis Overview and Flow-Sensitive Analysis

CS711 Advanced Programming Languages Pointer Analysis Overview and Flow-Sensitive Analysis CS711 Advanced Programming Languages Pointer Analysis Overview and Flow-Sensitive Analysis Radu Rugina 8 Sep 2005 Pointer Analysis Informally: determine where pointers (or references) in the program may

More information

Linear Data Structure Linked List

Linear Data Structure Linked List . Definition. Reresenting List in C. Imlementing the oerations a. Inserting a node b. Deleting a node c. List Traversal. Linked imlementation of Stack 5. Linked imlementation of Queue 6. Circular List

More information

Analysis of Object-oriented Programming Languages

Analysis of Object-oriented Programming Languages Analysis of Object-oriented Programming Languages Dr. Barbara G. Ryder Rutgers University http://www.cs.rutgers.edu/~ryder http://prolangs.rutgers.edu/ OOAnalysis, Dagstuhl 2/03, BG Ryder 1 Outline Why

More information

Relations with Relation Names as Arguments: Algebra and Calculus. Kenneth A. Ross. Columbia University.

Relations with Relation Names as Arguments: Algebra and Calculus. Kenneth A. Ross. Columbia University. Relations with Relation Names as Arguments: Algebra and Calculus Kenneth A. Ross Columbia University kar@cs.columbia.edu Abstract We consider a version of the relational model in which relation names may

More information

COSE312: Compilers. Lecture 20 Data-Flow Analysis (2)

COSE312: Compilers. Lecture 20 Data-Flow Analysis (2) COSE312: Compilers Lecture 20 Data-Flow Analysis (2) Hakjoo Oh 2017 Spring Hakjoo Oh COSE312 2017 Spring, Lecture 20 June 6, 2017 1 / 18 Final Exam 6/19 (Mon), 15:30 16:45 (in class) Do not be late. Coverage:

More information

Pointer Analysis. CSE 501 Spring 15

Pointer 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 information

Classes. Code Generation for Objects. Compiling Methods. Dynamic Dispatch. The Need for Dispatching CS412/CS413

Classes. Code Generation for Objects. Compiling Methods. Dynamic Dispatch. The Need for Dispatching CS412/CS413 Classes CS4/CS43 Introduction to Comilers Tim Teitelbaum Lecture : Imlementing Objects 8 March 5 Comonents ields/instance variables values ma dier rom object to object usuall mutable methods values shared

More information

Polymorphism (1A) Young Won Lim 8/22/13

Polymorphism (1A) Young Won Lim 8/22/13 Polymorhism (1A) Coyright (c) 2011-2012 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Reference Analyses. VTA - Variable Type Analysis

Reference Analyses. VTA - Variable Type Analysis Reference Analyses Variable Type Analysis for Java Related points-to analyses for C Steengaard Andersen Field-sensitive points-to for Java Object-sensitive points-to for Java Other analysis approaches

More information

Polymorphism (1A) Young Won Lim 8/15/13

Polymorphism (1A) Young Won Lim 8/15/13 Polymorhism (1A) Coyright (c) 2011-2012 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

A Context-Sensitive Memory Model for Verification of C/C++ Programs

A Context-Sensitive Memory Model for Verification of C/C++ Programs A Context-Sensitive Memory Model for Verification of C/C++ Programs Arie Gurfinkel and Jorge A. Navas University of Waterloo and SRI International SAS 17, August 30th, 2017 Gurfinkel and Navas (UWaterloo/SRI)

More information

Advanced Compiler Construction

Advanced Compiler Construction CS 526 Advanced Compiler Construction http://misailo.cs.illinois.edu/courses/cs526 INTERPROCEDURAL ANALYSIS The slides adapted from Vikram Adve So Far Control Flow Analysis Data Flow Analysis Dependence

More information

ELEC 876: Software Reengineering

ELEC 876: Software Reengineering ELEC 876: Software Reengineering () Dr. Ying Zou Department of Electrical & Computer Engineering Queen s University Compiler and Interpreter Compiler Source Code Object Compile Execute Code Results data

More information

Optimizing Dynamic Memory Management!

Optimizing Dynamic Memory Management! Otimizing Dynamic Memory Management! 1 Goals of this Lecture! Hel you learn about:" Details of K&R hea mgr" Hea mgr otimizations related to Assignment #6" Faster free() via doubly-linked list, redundant

More information

14. Memory API. Operating System: Three Easy Pieces

14. Memory API. Operating System: Three Easy Pieces 14. Memory API Oerating System: Three Easy Pieces 1 Memory API: malloc() #include void* malloc(size_t size) Allocate a memory region on the hea. w Argument size_t size : size of the memory block(in

More information

Definition. Pointers. Outline. Why pointers? Definition. Memory Organization Overview. by Ziad Kobti. Definition. Pointers enable programmers to:

Definition. Pointers. Outline. Why pointers? Definition. Memory Organization Overview. by Ziad Kobti. Definition. Pointers enable programmers to: Pointers by Ziad Kobti Deinition When you declare a variable o any tye, say: int = ; The system will automatically allocated the required memory sace in a seciic location (tained by the system) to store

More information

Intermediate Code Generation

Intermediate Code Generation Intermediate Code Generation Rupesh Nasre. CS3300 Compiler Design IIT Madras Aug 2015 Character stream Lexical Analyzer Machine-Independent Code Optimizer F r o n t e n d Token stream Syntax Analyzer Syntax

More information

Partitioned Memory Models for Program Analysis

Partitioned Memory Models for Program Analysis Partitioned Memory Models for Program Analysis Wei Wang 1 Clark Barrett 2 Thomas Wies 3 1 Google 2 Stanford University 3 New York University January 13, 2017 Wei Wang Partitioned Memory Models January

More information

Lecture 4 Introduction to Data Flow Analysis

Lecture 4 Introduction to Data Flow Analysis Lecture 4 Introduction to Data Flow Analysis I. Structure of data flow analysis II. Example 1: Reaching definition analysis III. Example 2: Liveness analysis IV. Generalization What is Data Flow Analysis?

More information

Data Flow Analysis. Agenda CS738: Advanced Compiler Optimizations. 3-address Code Format. Assumptions

Data Flow Analysis. Agenda CS738: Advanced Compiler Optimizations. 3-address Code Format. Assumptions Agenda CS738: Advanced Compiler Optimizations Data Flow Analysis Amey Karkare karkare@cse.iitk.ac.in http://www.cse.iitk.ac.in/~karkare/cs738 Department of CSE, IIT Kanpur Static analysis and compile-time

More information

Array Dependence Analysis as Integer Constraints. Array Dependence Analysis Example. Array Dependence Analysis as Integer Constraints, cont

Array Dependence Analysis as Integer Constraints. Array Dependence Analysis Example. Array Dependence Analysis as Integer Constraints, cont Theory of Integers CS389L: Automated Logical Reasoning Omega Test Işıl Dillig Earlier, we talked aout the theory of integers T Z Signature of T Z : Σ Z : {..., 2, 1, 0, 1, 2,..., 3, 2, 2, 3,..., +,, =,

More information

OOPLs - call graph construction. Example executed calls

OOPLs - call graph construction. Example executed calls OOPLs - call graph construction Compile-time analysis of reference variables and fields Problem: how to resolve virtual function calls? Need to determine to which objects (or types of objects) a reference

More information

Reuse Optimization. Partial Redundancy Elimination (PRE)

Reuse Optimization. Partial Redundancy Elimination (PRE) Reuse Otimization!Last time! Dead code elimination! Common subession elimination (CSE)! Coy roagation! Simle constants!today! Partial redundancy elimination (PRE) CS553 Lecture Reuse Otimization: PRE 1

More information

Topics Introduction to Microprocessors

Topics Introduction to Microprocessors Topics 22440 Introduction to Microprocessors C-Language Review (I) Important: : You will not learn how to code in C in this one lecture! You ll still need some sort of C reference. C Syntax Important Tidits

More information

Lecture 7: Objects (Chapter 15) CS 1110 Introduction to Computing Using Python

Lecture 7: Objects (Chapter 15) CS 1110 Introduction to Computing Using Python htt://www.cs.cornell.edu/courses/cs1110/2018s Lecture 7: Objects (Chater 15) CS 1110 Introduction to Comuting Using Python [E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner, C. Van Loan, W. White]

More information

Intermediate Code Generation

Intermediate Code Generation Intermediate Code Generation Rupesh Nasre. CS3300 Compiler Design IIT Madras July 2018 Character stream Lexical Analyzer Machine-Independent Code Code Optimizer F r o n t e n d Token stream Syntax Analyzer

More information

Object and Native Code Thread Mobility Among Heterogeneous Computers

Object and Native Code Thread Mobility Among Heterogeneous Computers Object and Native Code Thread Mobility Among Heterogeneous Comuters Bjarne Steensgaard Eric Jul Microsoft Research DIKU (Det. of Comuter Science) One Microsoft Way University of Coenhagen Redmond, WA 98052

More information

Decoding-Workload-Aware Video Encoding

Decoding-Workload-Aware Video Encoding Decoding-Workload-Aware Video Encoding Yicheng Huang, Guangming Hong, Vu An Tran and Ye Wang Deartment of Comuter Science ational University of Singaore Law Link, Singaore 117590 Reulic of Singaore {huangyic,

More information

Lecture 2. Introduction to Data Flow Analysis

Lecture 2. Introduction to Data Flow Analysis Lecture 2 Introduction to Data Flow Analysis I II III Example: Reaching definition analysis Example: Liveness Analysis A General Framework (Theory in next lecture) Reading: Chapter 9.2 Advanced Compilers

More information

Theory of Integers. CS389L: Automated Logical Reasoning. Lecture 13: The Omega Test. Overview of Techniques. Geometric Description

Theory of Integers. CS389L: Automated Logical Reasoning. Lecture 13: The Omega Test. Overview of Techniques. Geometric Description Theory of ntegers This lecture: Decision procedure for qff theory of integers CS389L: Automated Logical Reasoning Lecture 13: The Omega Test şıl Dillig As in previous two lectures, we ll consider T Z formulas

More information

Demand-Driven Alias Analysis for C

Demand-Driven Alias Analysis for C Demand-Driven Alias Analysis for C Xin Zheng and Radu Rugina Computer Science Department Cornell University Ithaca, NY 14853 {xinz, rugina}@cs.cornell.edu Abstract This paper presents a demand-driven,

More information

The Rest of the Course More DFA and Model Checking

The Rest of the Course More DFA and Model Checking The Rest of the Course More DFA and Model Checking Tuesday, Dec. 6: Guest Lecture Thursday, Dec. 8: Guest Lecture Final Exam Wednesday, Dec. 14 @ 10:30-12:30 Prof. Leon Osterweil CS 521-621 Fall Semester

More information

Cloning-Based Context-Sensitive Pointer Alias Analysis using BDDs

Cloning-Based Context-Sensitive Pointer Alias Analysis using BDDs More Pointer Analysis Last time Flow-Insensitive Pointer Analysis Inclusion-based analysis (Andersen) Today Class projects Context-Sensitive analysis March 3, 2014 Flow-Insensitive Pointer Analysis 1 John

More information

Data Flow Information. already computed

Data Flow Information. already computed Data Flow Information Determine if Determine if a constant in loop modifies Determine if expression already computed Determine if not used later in program Data Flow Equations Local Information: Gen(B):

More information

Lecture 18. Today, we will discuss developing algorithms for a basic model for parallel computing the Parallel Random Access Machine (PRAM) model.

Lecture 18. Today, we will discuss developing algorithms for a basic model for parallel computing the Parallel Random Access Machine (PRAM) model. U.C. Berkeley CS273: Parallel and Distributed Theory Lecture 18 Professor Satish Rao Lecturer: Satish Rao Last revised Scribe so far: Satish Rao (following revious lecture notes quite closely. Lecture

More information

Lecture 6 Foundations of Data Flow Analysis

Lecture 6 Foundations of Data Flow Analysis Lecture 6 Foundations of Data Flow Analysis I. Meet operator II. Transfer functions III. Correctness, Precision, Convergence IV. Efficiency ALSU 9.3 Phillip B. Gibbons 15-745: Foundations of Data Flow

More information

Using Standard AADL for COMPASS

Using Standard AADL for COMPASS Using Standard AADL for COMPASS (noll@cs.rwth-aachen.de) AADL Standards Meeting Aachen, Germany; July 5 8, 06 Overview Introduction SLIM Language Udates COMPASS Develoment Roadma Fault Injections Parametric

More information

Simone Campanoni Alias Analysis

Simone Campanoni Alias Analysis Simone Campanoni simonec@eecs.northwestern.edu Alias Analysis Memory alias analysis: the problem Does j depend on i? i: (*p) = vara + 1 j: varb = (*q) * 2 i: obj1.f = vara + 1 j: varb= obj2.f * 2 Do p

More information

Lecture 04 Control Flow II. Stephen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Based on Michael Bailey s ECE 422

Lecture 04 Control Flow II. Stephen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Based on Michael Bailey s ECE 422 Lecture 04 Control Flow II Stehen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Based on Michael Bailey s ECE 422 Function calls on 32-bit x86 Stack grows down (from high to low addresses)

More information

The Spatial Skyline Queries

The Spatial Skyline Queries Coffee sho The Satial Skyline Queries Mehdi Sharifzadeh and Cyrus Shahabi VLDB 006 Presented by Ali Khodaei Coffee sho Three friends Coffee sho Three friends Don t choose this lace is closer to each three

More information

An Indexing Framework for Structured P2P Systems

An Indexing Framework for Structured P2P Systems An Indexing Framework for Structured P2P Systems Adina Crainiceanu Prakash Linga Ashwin Machanavajjhala Johannes Gehrke Carl Lagoze Jayavel Shanmugasundaram Deartment of Comuter Science, Cornell University

More information

Alias Analysis in LLVM

Alias Analysis in LLVM Alias Analysis in LLVM by Sheng-Hsiu Lin Presented to the Graduate and Research Committee of Lehigh University in Candidacy for the Degree of Master of Science in Computer Science Lehigh University May

More information

CMSC430 Spring 2009 Midterm 2 (Solutions)

CMSC430 Spring 2009 Midterm 2 (Solutions) CMSC430 Spring 2009 Midterm 2 (Solutions) Instructions You have until 4:45pm to complete the midterm. Feel free to ask questions on the midterm. One sentence answers are sufficient for the ``essay'' questions.

More information

Matlab Virtual Reality Simulations for optimizations and rapid prototyping of flexible lines systems

Matlab Virtual Reality Simulations for optimizations and rapid prototyping of flexible lines systems Matlab Virtual Reality Simulations for otimizations and raid rototying of flexible lines systems VAMVU PETRE, BARBU CAMELIA, POP MARIA Deartment of Automation, Comuters, Electrical Engineering and Energetics

More information

Compiler Optimization and Code Generation

Compiler Optimization and Code Generation Compiler Optimization and Code Generation Professor: Sc.D., Professor Vazgen Melikyan 1 Course Overview Introduction: Overview of Optimizations 1 lecture Intermediate-Code Generation 2 lectures Machine-Independent

More information

Source level Unrolling of Loops Containing Pointers and Array References

Source level Unrolling of Loops Containing Pointers and Array References Source level Unrolling of Loos Containing Pointers and Array References Yosi Ben Asher Jawad Haj-Yihia CS deartment, Haifa University, Israel. yosi@cs.haifa.ac.il, jawad.haj-yihia@intel.com Abstract We

More information

Control-Flow Graphs & Dataflow Analysis. CS4410: Spring 2013

Control-Flow Graphs & Dataflow Analysis. CS4410: Spring 2013 Control-Flow Graphs & Dataflow Analysis CS4410: Spring 2013 Past Few Lectures: High-level Intermediate Languages: Monadic Normal Form Optimization as algebraic transformations: 3+4 7, (λx.e) v e[v/x],

More information

Dynamic Points-To Sets: A Comparison with Static Analyses and Potential Applications in Program Understanding and Optimization

Dynamic Points-To Sets: A Comparison with Static Analyses and Potential Applications in Program Understanding and Optimization Dynamic Points-To Sets: A Comparison with Static Analyses and Potential Applications in Program Understanding and Optimization Markus Mock *, Manuvir Das +, Craig Chambers *, and Susan J. Eggers * * Department

More information

Making Context-sensitive Points-to Analysis with Heap Cloning Practical For The Real World

Making Context-sensitive Points-to Analysis with Heap Cloning Practical For The Real World Making Context-sensitive Points-to Analysis with Heap Cloning Practical For The Real World Chris Lattner Apple Andrew Lenharth UIUC Vikram Adve UIUC What is Heap Cloning? Distinguish objects by acyclic

More information

Memory and Addresses. Pointers in C. Memory is just a sequence of byte-sized storage devices.

Memory and Addresses. Pointers in C. Memory is just a sequence of byte-sized storage devices. Memory and Addresses Memory is just a sequence of byte-sized storage devices. 1 The bytes are assigned numeric addresses, starting with zero, just like the indexing of the cells of an array. It is the

More information

Lecture 6 Foundations of Data Flow Analysis

Lecture 6 Foundations of Data Flow Analysis Review: Reaching Definitions Lecture 6 Foundations of Data Flow Analysis I. Meet operator II. Transfer functions III. Correctness, Precision, Convergence IV. Efficiency [ALSU 9.3] Phillip B. Gibbons 15-745:

More information

Reaching Definitions and u-d Chaining M.B.Chandak

Reaching Definitions and u-d Chaining M.B.Chandak Reaching Definitions and u-d Chaining M.B.Chandak hodcs@rknec.edu Reaching Definitions A definition of any variable is killed if between two points along the path, there is a re-assignment. A definition

More information

Efficient Field-Sensitive Pointer Analysis for C

Efficient Field-Sensitive Pointer Analysis for C Efficient Field-Sensitive Pointer Analysis for C David J. Pearce Department of Computing, Imperial College, London, SW7 2BZ, UK djp1@doc.ic.ac.uk Paul H. J. Kelly Department of Computing, Imperial College,

More information

Points-to Analysis. Xiaokang Qiu Purdue University. November 16, ECE 468 Adapted from Kulkarni 2012

Points-to Analysis. Xiaokang Qiu Purdue University. November 16, ECE 468 Adapted from Kulkarni 2012 Points-to Analysis Xiaokang Qiu Purdue University ECE 468 Adapted from Kulkarni 2012 November 16, 2016 Simple example x := 5 ptr := @x *ptr := 9 y := x program S1 S2 S3 S4 dependences What are the dependences

More information

Executable Knowledge for rule-based modelling of cellular signalling networks

Executable Knowledge for rule-based modelling of cellular signalling networks Executable Knowledge for rule-based modelling of cellular signalling networks Russ Harmer (CNRS & ENS Lyon) + Adrien Basso-Blandin (ENSL) & Walter Fontana (HMS) + John Bachman (HMS) & Pierre Boutillier

More information

Demand-Driven Alias Analysis for C

Demand-Driven Alias Analysis for C Demand-Driven Alias Analysis for C Xin Zheng and Radu Rugina Computer Science Department Cornell University Ithaca, NY 14853 {xinz, rugina}@cs.cornell.edu July 2007 Abstract This paper presents a demand-driven,

More information

Argo Programming Guide

Argo Programming Guide Argo Programming Guide Evangelia Kasaaki, asmus Bo Sørensen February 9, 2015 Coyright 2014 Technical University of Denmark This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International

More information

Introduction to Machine Learning Spring 2018 Note Sparsity and LASSO. 1.1 Sparsity for SVMs

Introduction to Machine Learning Spring 2018 Note Sparsity and LASSO. 1.1 Sparsity for SVMs CS 189 Introduction to Machine Learning Spring 2018 Note 21 1 Sparsity and LASSO 1.1 Sparsity for SVMs Recall the oective function of the soft-margin SVM prolem: w,ξ 1 2 w 2 + C Note that if a point x

More information

Data-flow Analysis - Part 2

Data-flow Analysis - Part 2 - Part 2 Department of Computer Science Indian Institute of Science Bangalore 560 012 NPTEL Course on Compiler Design Data-flow analysis These are techniques that derive information about the flow of data

More information

Flow Analysis. Data-flow analysis, Control-flow analysis, Abstract interpretation, AAM

Flow Analysis. Data-flow analysis, Control-flow analysis, Abstract interpretation, AAM Flow Analysis Data-flow analysis, Control-flow analysis, Abstract interpretation, AAM Helpful Reading: Sections 1.1-1.5, 2.1 Data-flow analysis (DFA) A framework for statically proving facts about program

More information

Efficient Parallel Hierarchical Clustering

Efficient Parallel Hierarchical Clustering Efficient Parallel Hierarchical Clustering Manoranjan Dash 1,SimonaPetrutiu, and Peter Scheuermann 1 Deartment of Information Systems, School of Comuter Engineering, Nanyang Technological University, Singaore

More information

Wave Propagation and Deep Propagation for Pointer Analysis

Wave Propagation and Deep Propagation for Pointer Analysis Wave Propagation and Deep Propagation for Pointer Analysis Fernando Magno Quintão Pereira February 15, 2009 Outline Points-to Analysis Our new algorithms Wave Propagation Deep Propagation Experiments Outline

More information