Download presentation

Presentation is loading. Please wait.

Published byCedric Turbin Modified over 2 years ago

1
Worst case complexity of Andersen *x = y x abc y def x abc y def Worst case: N 2 per statement, so at least N 3 for the whole program. Andersen is in fact O(N 3 )

2
New idea: one successor per node Make each node have only one successor. This is an invariant that we want to maintain. x a,b,c y d,e,f *x = y x a,b,c y d,e,f

3
x *x = y y More general case for *x = y

4
x *x = y yxyxy More general case for *x = y

5
x x = *y y Handling: x = *y

6
x x = *y yxyxy Handling: x = *y

7
x x = y y x = &y xy Handling: x = y (what about y = x?) Handling: x = &y

8
x x = y yxyxy x = &y xyx y,… xy Handling: x = y (what about y = x?) Handling: x = &y get the same for y = x

9
Our favorite example, once more! S1: l := new Cons p := l S2: t := new Cons *p := t p := t 1 2 3 4 5

10
Our favorite example, once more! S1: l := new Cons p := l S2: t := new Cons *p := t p := t l S1 t S2 p l S1 l p l t S2 p l S1,S2 tp 1 2 3 4 5 12 3 l S1 t S2 p 4 5

11
Flow insensitive loss of precision S1: l := new Cons p := l S2: t := new Cons *p := t p := t l t S1 p S2 l t S1 p S2 l t S1 p S2 l t S1 p S2 Flow-sensitive Subset-based Flow-insensitive Subset-based l t S1 p S2 l S1,S2 tp Flow-insensitive Unification- based

12
bar() { i := &a; j := &b; foo(&i); foo(&j); // i pnts to what? *i :=...; } void foo(int* p) { printf(“%d”,*p); } 1 2 3 4 Another example

13
bar() { i := &a; j := &b; foo(&i); foo(&j); // i pnts to what? *i :=...; } void foo(int* p) { printf(“%d”,*p); } i a j b p i a i a j b i a j b p i,j a,b p 1 2 3 4 12 Another example 4 3

Similar presentations

Presentation is loading. Please wait....

OK

Intraprocedural Points-to Analysis Flow functions:

Intraprocedural Points-to Analysis Flow functions:

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on child labour in nepal Ppt on channels of distribution of pepsi Free download ppt on green revolution Ppt on production management information system Ppt on business environment nature concept and significance of ash Ppt on total parenteral nutrition images Ppt on earth movements and major landforms in italy Ppt on carburetor diagram Ppt on tyres manufacturing process Ppt online open courses