YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT...
Transcript of YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT...
![Page 1: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/1.jpg)
POINTER ANALYSIS
EVERYTHINGYOU NEED TO KNOW ABOUT
10 RULESGeorge Kastrinis ~ University of Athens ~ PLAST lab
![Page 2: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/2.jpg)
BASED ON WORK FROM
● “Efficient and Effective Handling of Exceptions in Java Points-To Analysis” Kastrinis G., Smaragdakis Y. (CC'13)
● “Pick Your Contexts Well: Understanding Object-Sensitivity” Smaragdakis Y., Bravenboer M., Lhoták O. (POPL'11)
● “Strictly Declarative Specification of Sophisticated Points-to Analyses” Bravenboer M., Smaragdakis Y. (OOPSLA'09)
University of Athens ~ PL lab (PLAST)
Yannis Smaragdakis George Kastrinis George Balatsouras
Aggelos Biboudis Kostas Ferles George Kollias Prodromos Gerakios
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 3: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/3.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 4: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/4.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 5: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/5.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 6: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/6.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→
Represent objects as
allocation sites
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 7: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/7.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a new A1(), new A2()→
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 8: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/8.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a new A1(), new A2()→foo::b new A1(), new A2()→bar::b new A1(), new A2()→
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 9: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/9.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a new A1(), new A2()→foo::b new A1(), new A2()→bar::b new A1(), new A2()→
Not the most precise, right?
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 10: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/10.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a new A1(), new A2()→
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 11: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/11.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a new A1(), new A2()→
Add “context” to variables
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 12: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/12.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a (foo) new A1()→ id::a (bar) new A2()→
Add “context” to variables
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 13: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/13.jpg)
IN SHORT: WHAT OBJECTS CAN A VARIABLE POINT TO?
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a (foo) new A1()→ id::a (bar) new A2()→foo::b new A1()→bar::b new A2()→
Add “context” to variables
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 14: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/14.jpg)
10 RULES? NO ALGORITHMS?
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 15: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/15.jpg)
10 RULES? NO ALGORITHMS?
Using Datalog
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 16: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/16.jpg)
10 RULES? NO ALGORITHMS?
Using Datalog Purely declarative
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 17: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/17.jpg)
de·clar·a·tive/di kle( )r tiv/ˈ ə ə
Computing denoting high-level programming languages which can be used to solve problems without requiring the programmer to specify an exact procedure to be followed.
Adjective
~ Oxford dictionaries
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 18: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/18.jpg)
de·clar·a·tive/di kle( )r tiv/ˈ ə ə
Computing denoting high-level programming languages which can be used to solve problems without requiring the programmer to specify an exact procedure to be followed.
Adjective
~ Oxford dictionaries
From algorithms to specifications
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 19: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/19.jpg)
Datalog Rules
INTERPROCASSIGN(to, calleeCtx, from, callerCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALARG(invo, i, from), FORMALARG(meth, i, to).
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 20: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/20.jpg)
Datalog Rules
INTERPROCASSIGN(to, calleeCtx, from, callerCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALARG(invo, i, from), FORMALARG(meth, i, to).
head
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 21: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/21.jpg)
Datalog Rules
INTERPROCASSIGN(to, calleeCtx, from, callerCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALARG(invo, i, from), FORMALARG(meth, i, to).
body
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 22: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/22.jpg)
Datalog Rules
INTERPROCASSIGN(to, calleeCtx, from, callerCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALARG(invo, i, from), FORMALARG(meth, i, to).
Output relations in red
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 23: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/23.jpg)
Datalog Rules
INTERPROCASSIGN(to, calleeCtx, from, callerCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALARG(invo, i, from), FORMALARG(meth, i, to).
Input relations in blue
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 24: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/24.jpg)
Datalog Rules
INTERPROCASSIGN(to, calleeCtx, from, callerCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALARG(invo, i, from), FORMALARG(meth, i, to).
#1meth(..,from,..)
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 25: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/25.jpg)
Datalog Rules#1
invo: meth(..,from,..)meth(..,to,..) {
...}
callerCtx calleeCtx
INTERPROCASSIGN(to, calleeCtx, from, callerCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALARG(invo, i, from), FORMALARG(meth, i, to).
meth(..,from,..)
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 26: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/26.jpg)
Datalog Rules#1
invo: meth(..,from,..)meth(..,to,..) {
...}
INTERPROCASSIGN(to, calleeCtx, from, callerCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALARG(invo, i, from), FORMALARG(meth, i, to).
meth(..,from,..)
callerCtx calleeCtx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 27: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/27.jpg)
Datalog Rules
INTERPROCASSIGN(to, callerCtx, from, calleeCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALRETURN(invo, to), FORMALRETURN(meth, from).
#2to = meth(..)
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 28: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/28.jpg)
Datalog Rules
INTERPROCASSIGN(to, callerCtx, from, calleeCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALRETURN(invo, to), FORMALRETURN(meth, from).
#2to = meth(..)
invo: to = meth(..)meth(..) { .. return from;}
callerCtx calleeCtx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 29: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/29.jpg)
Datalog Rules
INTERPROCASSIGN(to, callerCtx, from, calleeCtx) ←
CALLGRAPH(invo, callerCtx, meth, calleeCtx),
ACTUALRETURN(invo, to), FORMALRETURN(meth, from).
#2to = meth(..)
invo: to = meth(..)meth(..) { .. return from;}
calleeCtxcallerCtx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 30: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/30.jpg)
Datalog Rules
RECORD(heap, ctx) = hctx,
VARPOINTSTO(var, ctx, heap, hctx) ←
REACHABLE(meth, ctx), ALLOC(var, heap, meth).
#3var = new A()
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 31: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/31.jpg)
Datalog Rules
RECORD(heap, ctx) = hctx,
VARPOINTSTO(var, ctx, heap, hctx) ←
REACHABLE(meth, ctx), ALLOC(var, heap, meth).
#3var = new A()
meth
var = new A();
ctx
heap
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 32: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/32.jpg)
Datalog Rules
RECORD(heap, ctx) = hctx,
VARPOINTSTO(var, ctx, heap, hctx) ←
REACHABLE(meth, ctx), ALLOC(var, heap, meth).
#3var = new A()
meth
var = new A(); heap
hctx
new context!
ctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 33: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/33.jpg)
Datalog Rules
RECORD(heap, ctx) = hctx,
VARPOINTSTO(var, ctx, heap, hctx) ←
REACHABLE(meth, ctx), ALLOC(var, heap, meth).
#3var = new A()
meth
var = new A(); heap
hctx
ctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 34: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/34.jpg)
Datalog Rules
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx), MOVE(to, from).
#4to = from
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 35: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/35.jpg)
Datalog Rules
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx), MOVE(to, from).
#4to = from
heap
hctx
from
ctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 36: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/36.jpg)
Datalog Rules
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx), MOVE(to, from).
#4to = from
heap
hctx
from
ctx
to
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 37: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/37.jpg)
Datalog Rules
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx), MOVE(to, from).
#4to = from
heap
hctx
from
ctx
to
ctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 38: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/38.jpg)
Datalog Rules
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx), MOVE(to, from).
#4to = from
Recursion!
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 39: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/39.jpg)
Datalog Rules#5to ≈ from
VARPOINTSTO(to, toCtx, heap, hctx) ←
INTERPROCASSIGN(to, toCtx, from, fromCtx),
VARPOINTSTO(from, fromCtx, heap, hctx).
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 40: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/40.jpg)
Datalog Rules#5to ≈ from
VARPOINTSTO(to, toCtx, heap, hctx) ←
INTERPROCASSIGN(to, toCtx, from, fromCtx),
VARPOINTSTO(from, fromCtx, heap, hctx).
from
fromCtx
to
toCtx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 41: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/41.jpg)
Datalog Rules#5to ≈ from
VARPOINTSTO(to, toCtx, heap, hctx) ←
INTERPROCASSIGN(to, toCtx, from, fromCtx),
VARPOINTSTO(from, fromCtx, heap, hctx).
from
fromCtx
to
toCtx
heap
hctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 42: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/42.jpg)
Datalog Rules#5to ≈ from
VARPOINTSTO(to, toCtx, heap, hctx) ←
INTERPROCASSIGN(to, toCtx, from, fromCtx),
VARPOINTSTO(from, fromCtx, heap, hctx).
from
fromCtx
to
toCtx
heap
hctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 43: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/43.jpg)
Datalog Rules#6base.fld = from
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx),
STORE(base, fld, from), VARPOINTSTO(base, ctx, baseH, baseHCtx).
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 44: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/44.jpg)
Datalog Rules#6base.fld = from
heap
hctxfrom
ctx
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx),
STORE(base, fld, from), VARPOINTSTO(base, ctx, baseH, baseHCtx).
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 45: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/45.jpg)
Datalog Rules#6base.fld = from
heap
hctxfrom
ctx
base
ctx
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx),
STORE(base, fld, from), VARPOINTSTO(base, ctx, baseH, baseHCtx).
fld
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 46: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/46.jpg)
Datalog Rules#6base.fld = from
heap
hctxfrom
ctx
base
ctx
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx),
STORE(base, fld, from), VARPOINTSTO(base, ctx, baseH, baseHCtx).
fldbaseH
baseHCtx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 47: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/47.jpg)
Datalog Rules#6base.fld = from
heap
hctxfrom
ctx
base
ctx
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx) ←
VARPOINTSTO(from, ctx, heap, hctx),
STORE(base, fld, from), VARPOINTSTO(base, ctx, baseH, baseHCtx).
fldbaseH
baseHCtx
fld
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 48: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/48.jpg)
Datalog Rules#7to = base.fld
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(base, ctx, baseH, baseHCtx),
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx), LOAD(to, base, fld).
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 49: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/49.jpg)
Datalog Rules#7to = base.fld
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(base, ctx, baseH, baseHCtx),
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx), LOAD(to, base, fld).
base
ctx baseH
baseHCtx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 50: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/50.jpg)
Datalog Rules#7to = base.fld
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(base, ctx, baseH, baseHCtx),
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx), LOAD(to, base, fld).
base
ctx baseH
baseHCtx
fld
heap
hctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 51: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/51.jpg)
Datalog Rules#7to = base.fld
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(base, ctx, baseH, baseHCtx),
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx), LOAD(to, base, fld).
base
ctx baseH
baseHCtx
fld
heap
hctx
to
fld
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 52: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/52.jpg)
Datalog Rules#7to = base.fld
VARPOINTSTO(to, ctx, heap, hctx) ←
VARPOINTSTO(base, ctx, baseH, baseHCtx),
FLDPOINTSTO(baseH, baseHCtx, fld, heap, hctx), LOAD(to, base, fld).
base
ctx baseH
baseHCtx
fld
to
fld
ctx
heap
hctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 53: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/53.jpg)
Datalog Rules#8A::toMeth()
MERGESTATIC(invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
SCALL(toMeth, invo, inMeth), REACHABLE(inMeth, callerCtx).
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 54: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/54.jpg)
Datalog Rules#8A::toMeth()
MERGESTATIC(invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
SCALL(toMeth, invo, inMeth), REACHABLE(inMeth, callerCtx).
invo: A::toMeth(..)
inMeth
callerCtx
toMeth
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 55: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/55.jpg)
Datalog Rules#8A::toMeth()
MERGESTATIC(invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
SCALL(toMeth, invo, inMeth), REACHABLE(inMeth, callerCtx).
invo: A::toMeth(..)
inMeth
callerCtx
toMeth
callerCtx
new context!
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 56: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/56.jpg)
Datalog Rules#8A::toMeth()
MERGESTATIC(invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
SCALL(toMeth, invo, inMeth), REACHABLE(inMeth, callerCtx).
invo: A::toMeth(..)
inMeth
callerCtx
toMeth
calleeCtx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 57: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/57.jpg)
Datalog Rules#9MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
base.sig(..)!!
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 58: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/58.jpg)
Datalog Rules#9MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
base.sig(..)!!
invo: base.sig(..)
inMeth
callerCtx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 59: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/59.jpg)
George Kastrinis ~ University of Athens ~ PLAST lab
Datalog Rules#9MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
base.sig(..)!!
invo: base.sig(..)
inMeth
callerCtx heap
hctx
![Page 60: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/60.jpg)
George Kastrinis ~ University of Athens ~ PLAST lab
Datalog Rules#9MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
base.sig(..)!!
invo: base.sig(..)
inMeth
callerCtx heap
hctx this
toMeth
![Page 61: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/61.jpg)
George Kastrinis ~ University of Athens ~ PLAST lab
Datalog Rules#9MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
base.sig(..)!!
invo: base.sig(..)
inMeth
callerCtx heap
hctx this
toMeth
calleeCtx
new context!
![Page 62: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/62.jpg)
George Kastrinis ~ University of Athens ~ PLAST lab
Datalog Rules#9MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
base.sig(..)!!
invo: base.sig(..)
inMeth
callerCtx heap
hctx this
toMeth
calleeCtx
![Page 63: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/63.jpg)
George Kastrinis ~ University of Athens ~ PLAST lab
Datalog Rules#9MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
base.sig(..)!!
invo: base.sig(..)
inMeth
callerCtx heap
hctx this
toMeth
calleeCtx
![Page 64: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/64.jpg)
Datalog Rules#10
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 65: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/65.jpg)
Datalog Rules#10
9 RULES ARE ENOUGH!
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 66: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/66.jpg)
Variety of Analyses
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 67: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/67.jpg)
Variety of Analyses
Just alter the definition of “context”
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 68: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/68.jpg)
LET'S RECALL WHERE CONTEXTS ARE CREATED
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 69: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/69.jpg)
RECORD(heap, ctx) = hctx,
VARPOINTSTO(var, ctx, heap, hctx) ←
REACHABLE(meth, ctx), ALLOC(var, heap, meth).
MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
MERGESTATIC(invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
SCALL(toMeth, invo, inMeth), REACHABLE(inMeth, callerCtx).
#3
#8
#9
LET'S RECALL WHERE CONTEXTS ARE CREATED
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 70: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/70.jpg)
RECORD(heap, ctx) = hctx,
VARPOINTSTO(var, ctx, heap, hctx) ←
REACHABLE(meth, ctx), ALLOC(var, heap, meth).
MERGE(heap, hctx, invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
VARPOINTSTO(this, calleeCtx, heap, hctx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
REACHABLE(inMeth, callerCtx), VCALL(base, sig, invo, inMeth),
VARPOINTSTO(base, callerCtx, heap, hctx),
HEAPTYPE(heap, heapT), LOOKUP(heapT, sig, toMeth),
THISVAR(toMeth, this).
MERGESTATIC(invo, callerCtx) = calleeCtx,
REACHABLE(toMeth, calleeCtx),
CALLGRAPH(invo, callerCtx, toMeth, calleeCtx) ←
SCALL(toMeth, invo, inMeth), REACHABLE(inMeth, callerCtx).
#3
#8
#9
LET'S RECALL WHERE CONTEXTS ARE CREATED
George Kastrinis ~ University of Athens ~ PLAST lab
Method invocation
Object allocation
![Page 71: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/71.jpg)
CONTEXT INSENSITIVEIGNORE CONTEXT ALTOGETHER
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 72: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/72.jpg)
CONTEXT INSENSITIVEIGNORE CONTEXT ALTOGETHER
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a new A1(), new A2()→foo::b new A1(), new A2()→bar::b new A1(), new A2()→
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 73: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/73.jpg)
CONTEXT INSENSITIVEIGNORE CONTEXT ALTOGETHER
RECORD(heap, ctx) = *
MERGE(heap, hctx, invo, callerCtx) = *
MERGESTATIC(invo, callerCtx) = *
Use a single context everywhere!
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 74: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/74.jpg)
CALL-SITE SENSITIVITYUSE CALL-SITES AS CONTEXTS
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 75: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/75.jpg)
CALL-SITE SENSITIVITYUSE CALL-SITES AS CONTEXTS
void foo() {a = new A1();b = id(a);
}
void bar() {a = new A2();b = id(a);
}
A id(A a) {return a;
}
foo::a new A1()→bar::a new A2()→ id::a (inv1) new A1()→ id::a (inv2) new A2()→foo::b new A1()→bar::b new A2()→
inv1
inv2
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 76: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/76.jpg)
1-CALL-SITE SENSITIVEContext's depth
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 77: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/77.jpg)
1-CALL-SITE SENSITIVE
RECORD(heap, ctx) = *
No context for heap abstractions
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 78: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/78.jpg)
1-CALL-SITE SENSITIVE
RECORD(heap, ctx) = *
MERGE(heap, hctx, invo, callerCtx) = invo
MERGESTATIC(invo, callerCtx) = invo
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 79: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/79.jpg)
1-CALL-SITE SENSITIVE+1-HEAP
Context sensitive heap abstractions
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 80: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/80.jpg)
1-CALL-SITE SENSITIVE+1-HEAP
RECORD(heap, ctx) = ctx
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 81: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/81.jpg)
1-CALL-SITE SENSITIVE+1-HEAP
RECORD(heap, ctx) = ctx
MERGE(heap, hctx, invo, callerCtx) = invo
MERGESTATIC(invo, callerCtx) = invo
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 82: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/82.jpg)
OBJECT SENSITIVITYUSE ALLOCATION-SITES AS CONTEXTS
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 83: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/83.jpg)
OBJECT SENSITIVITYUSE ALLOCATION-SITES AS CONTEXTS
Based on the receiverobject in a method call
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 84: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/84.jpg)
OBJECT SENSITIVITYUSE ALLOCATION-SITES AS CONTEXTS
Really good for Object-Oriented languages
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 85: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/85.jpg)
OBJECT SENSITIVITYUSE ALLOCATION-SITES AS CONTEXTS
class C {void meth(Object o) { ... }
}
class Client {void bar(C c1, C c2) {
...c1.meth(obj1);...c2.meth(obj2);
}}
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 86: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/86.jpg)
OBJECT SENSITIVITYUSE ALLOCATION-SITES AS CONTEXTS
class C {void meth(Object o) { ... }
}
class Client {void bar(C c1, C c2) {
...c1.meth(obj1);...c2.meth(obj2);
}}
#contexts for meth::o?
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 87: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/87.jpg)
OBJECT SENSITIVITYUSE ALLOCATION-SITES AS CONTEXTS
class C {void meth(Object o) { ... }
}
class Client {void bar(C c1, C c2) {
...c1.meth(obj1);...c2.meth(obj2);
}}
#contexts for meth::o?
#objects (and which) c1 and c2 point to?
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 88: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/88.jpg)
1-OBJECT SENSITIVE
RECORD(heap, ctx) = *
No context for heap abstractions
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 89: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/89.jpg)
1-OBJECT SENSITIVE
RECORD(heap, ctx) = *
MERGE(heap, hctx, invo, callerCtx) = heap
Use the allocation-site of the receiver object
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 90: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/90.jpg)
1-OBJECT SENSITIVE
RECORD(heap, ctx) = *
MERGE(heap, hctx, invo, callerCtx) = heap
MERGESTATIC(invo, callerCtx) = ctx
No receiver object to use!
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 91: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/91.jpg)
1-OBJECT SENSITIVE
RECORD(heap, ctx) = *
MERGE(heap, hctx, invo, callerCtx) = heap
MERGESTATIC(invo, callerCtx) = ctx
No receiver object to use!
Copy context from caller
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 92: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/92.jpg)
AND NOW?
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 93: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/93.jpg)
AND NOW?
● DIFFERENT CONTEXT DEPTHS
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 94: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/94.jpg)
AND NOW?
● DIFFERENT CONTEXT DEPTHS
● ALTER DEFINITIONS OF RECORD AND MERGE
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 95: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/95.jpg)
AND NOW?
● DIFFERENT CONTEXT DEPTHS
● ALTER DEFINITIONS OF RECORD AND MERGE
● OTHER TYPES OF CONTEXT
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 96: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/96.jpg)
AND NOW?
● DIFFERENT CONTEXT DEPTHS
● ALTER DEFINITIONS OF RECORD AND MERGE
● OTHER TYPES OF CONTEXT
● COMBINE DIFFERENT CONTEXTS
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 97: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/97.jpg)
AND NOW?
● DIFFERENT CONTEXT DEPTHS
● ALTER DEFINITIONS OF RECORD AND MERGE
● OTHER TYPES OF CONTEXT
● COMBINE DIFFERENT CONTEXTSWhat to combine? Where? How?
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 98: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/98.jpg)
9 Rules 3 Context Functions
x = ∞ Analyses
RECAP
George Kastrinis ~ University of Athens ~ PLAST lab
![Page 99: YOU NEED TO KNOW ABOUT POINTER ANALYSIS 10 RULES › pdf › softlab_2012.pdfYOU NEED TO KNOW ABOUT 10 RULES George Kastrinis ~ University of Athens ~ PLAST lab. BASED ON WORK FROM](https://reader034.fdocuments.us/reader034/viewer/2022042404/5f1be84fe6a7333ea834d386/html5/thumbnails/99.jpg)
Hope you enjoyed!http://gkastrinis.infoGeorge Kastrinis ●