method George Kastrinis , Yannis Smaragdakis ~ Efficient and - - PowerPoint PPT Presentation

method
SMART_READER_LITE
LIVE PREVIEW

method George Kastrinis , Yannis Smaragdakis ~ Efficient and - - PowerPoint PPT Presentation

E FFICIENT AND E FFECTIVE H ANDLING OF E XCEPTIONS IN J AVA P OINTS- T O A NALYSIS George Kastrinis ~ Yannis Smaragdakis University of Athens E XECUTIVE S UMMARY Huge amount of analysis time spent on exceptions They mainly affect


slide-1
SLIDE 1

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

George Kastrinis ~ Yannis Smaragdakis University of Athens

slide-2
SLIDE 2

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

  • Huge amount of analysis time spent on exceptions
  • They mainly affect control-flow
  • Significant speedup from coarsening exceptions
  • Type-based merging as an effective coarsening
  • No trade-off in precision (in “normal” code)
  • Datalog formalism makes changes clear
  • Also excellent implementation platform

EXECUTIVE SUMMARY

slide-3
SLIDE 3

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

slide-4
SLIDE 4

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

What objects may a variable point to?

(statically, object = allocation site)

slide-5
SLIDE 5

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

slide-6
SLIDE 6

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

void foo (...) throws AnException {

try {

...

throw new MyException();

... }

catch (OtherException e) { ... }

}

REFRESHER ON EXCEPTIONS

slide-7
SLIDE 7

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

SIGNIFICANCE OF EXCEPTIONS

  • Exceptions are non-local control flow
  • They are also regular objects with data fields
  • How significant is the data-flow of exceptions?
  • Our research indirectly answers this
slide-8
SLIDE 8

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

FLOW OF OBJECTS

method

slide-9
SLIDE 9

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

NORMAL FLOW OF OBJECTS

method

arguments return

slide-10
SLIDE 10

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EXCEPTIONAL FLOW OF OBJECTS

method

arguments return throw

slide-11
SLIDE 11

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

method

arguments return throw

Normal Flow Exceptional Flow

VS

slide-12
SLIDE 12

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

Normal Flow

VS

Exceptional Flow

Which one do you think dominates?

  • i.e., for the average method are there

more objects that may be thrown out

  • f it or that may be passed into/out
  • f it as args/returns?
slide-13
SLIDE 13

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

Normal Flow

VS

Exceptional Flow

normal flow exceptional flow

Which one do you think dominates?

slide-14
SLIDE 14

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

NEED PRECISE EXCEPTIONS?

slide-15
SLIDE 15

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

Not per se

NEED PRECISE EXCEPTIONS?

slide-16
SLIDE 16

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

Overall analysis effect Not per se

NEED PRECISE EXCEPTIONS?

slide-17
SLIDE 17

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

COARSEN EXCEPTIONS

  • A. Context Insensitive
slide-18
SLIDE 18

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

  • A. Context Insensitive
  • B. Type-based Merging

COARSEN EXCEPTIONS

slide-19
SLIDE 19

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

slide-20
SLIDE 20

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

slide-21
SLIDE 21

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

INPUT

slide-22
SLIDE 22

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

v = new A(); to = from; to = base.fld; base.fld = from; void meth(..., A arg, ...) { ... return ret; } base.sig(...);

JAVA CODE

slide-23
SLIDE 23

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

JAVA CODE AS TABLES

v = new A(); to = from; to = base.fld; base.fld = from; void meth(..., A arg, ...) { ... return ret; } base.sig(...); ALLOC (var, obj, meth) OBJTYPE (obj, type) MOVE (to, from) LOAD (to, base, fld) STORE (base, fld, from) FORMALARG (meth, i, arg) FORMALRETURN (meth, ret) VCALL (base, sig, invo)

slide-24
SLIDE 24

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

JAVA CODE AS TABLES

v = new A(); to = from; to = base.fld; base.fld = from; void meth(..., A arg, ...) { ... return ret; } base.sig(...); ALLOC (var, obj, meth) OBJTYPE (obj, type) MOVE (to, from) LOAD (to, base, fld) STORE (base, fld, from) FORMALARG (meth, i, arg) FORMALRETURN (meth, ret) VCALL (base, sig, invo)

slide-25
SLIDE 25

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

JAVA CODE AS TABLES

and many more... v = new A(); to = from; to = base.fld; base.fld = from; void meth(..., A arg, ...) { ... return ret; } base.sig(...); ALLOC (var, obj, meth) OBJTYPE (obj, type) MOVE (to, from) LOAD (to, base, fld) STORE (base, fld, from) FORMALARG (meth, i, arg) FORMALRETURN (meth, ret) VCALL (base, sig, invo)

slide-26
SLIDE 26

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

JAVA CODE AS TABLES

v = new A(); to = from; to = base.fld; base.fld = from; void meth(..., A arg, ...) { ... return ret; } base.sig(...); ALLOC (var, obj, meth) OBJTYPE (obj, type) MOVE (to, from) LOAD (to, base, fld) STORE (base, fld, from) FORMALARG (meth, i, arg) FORMALRETURN (meth, ret) VCALL (base, sig, invo)

Blue is Input

and many more...

slide-27
SLIDE 27

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

OUTPUT

slide-28
SLIDE 28

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

OUTPUT

VARPOINTSTO (var, ctx, obj, objCtx)

most important...

slide-29
SLIDE 29

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

OUTPUT

VARPOINTSTO (var, ctx, obj, objCtx) REACHABLE (meth, ctx) CALLGRAPH (invo, callerCtx, meth, calleeCtx)

most important... “On the fly” construction

slide-30
SLIDE 30

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

OUTPUT

VARPOINTSTO (var, ctx, obj, objCtx) REACHABLE (meth, ctx) CALLGRAPH (invo, callerCtx, meth, calleeCtx)

most important... “On the fly” construction

Orange is Output

slide-31
SLIDE 31

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

CONTEXTS : BLACK BOX

VARPOINTSTO (var, ctx, obj, objCtx) REACHABLE (meth, ctx) CALLGRAPH (invo, callerCtx, meth, calleeCtx)

slide-32
SLIDE 32

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

CONTEXTS CONSTRUCTORS

RECORD (...) = newObjCtx MERGE (...) = newCtx

Pick Your Contexts Well: Understanding Object-Sensitivity

Smaragdakis – Bravenboer – Lhotak

POPL'11

VARPOINTSTO (var, ctx, obj, objCtx) REACHABLE (meth, ctx) CALLGRAPH (invo, callerCtx, meth, calleeCtx)

slide-33
SLIDE 33

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RULES

slide-34
SLIDE 34

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EXAMPLE RULE

P (x), Q (x, z) ← R (x, y, w), S (y, z).

slide-35
SLIDE 35

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EXAMPLE RULE

“Body” If... P (x), Q (x, z) ← R (x, y, w), S (y, z).

slide-36
SLIDE 36

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EXAMPLE RULE

“Body” If... “Head” Then... P (x), Q (x, z) ← R (x, y, w), S (y, z).

slide-37
SLIDE 37

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

REACHABLE (meth, ctx), ALLOC (var, obj, meth).

var = new ...

OBJECT ALLOCATION

slide-38
SLIDE 38

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

VARPOINTSTO (var, obj ) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth).

var = new ...

OBJECT ALLOCATION

slide-39
SLIDE 39

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

VARPOINTSTO (var, ctx, obj ) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth).

var = new ... Variables share context with their methods

OBJECT ALLOCATION

slide-40
SLIDE 40

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECORD (...) = objCtx, VARPOINTSTO (var, ctx, obj, objCtx) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth).

var = new ... Construct a new object context

OBJECT ALLOCATION

slide-41
SLIDE 41

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

LOCAL ASSIGNMENT

to = from

MOVE (to, from), VARPOINTSTO (from, ctx, obj, objCtx).

slide-42
SLIDE 42

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

to = from

VARPOINTSTO (to, ctx, obj, objCtx) ← MOVE (to, from), VARPOINTSTO (from, ctx, obj, objCtx).

LOCAL ASSIGNMENT

slide-43
SLIDE 43

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

to = from Recursion

VARPOINTSTO (to, ctx, obj, objCtx) ← MOVE (to, from), VARPOINTSTO (from, ctx, obj, objCtx).

LOCAL ASSIGNMENT

slide-44
SLIDE 44

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

N u l l P

  • i

n t e r E x c e p t i

  • n
slide-45
SLIDE 45

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

INPUT

THROW (instr, e) CATCH (objT, instr, arg)

slide-46
SLIDE 46

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

INPUT OUTPUT

THROWPOINTSTO (meth, ctx, obj, objCtx) THROW (instr, e) CATCH (objT, instr, arg)

slide-47
SLIDE 47

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

“On the fly” handling of exceptions

INPUT OUTPUT

THROWPOINTSTO (meth, ctx, obj, objCtx) THROW (instr, e) CATCH (objT, instr, arg)

Exception Analysis and Points-to Analysis:Better Together

Bravenboer – Smaragdakis

ISSTA'09

slide-48
SLIDE 48

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

void meth() { ... throw e; ... }

THROW (instr, e)

EXCEPTION RULES

slide-49
SLIDE 49

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

void meth() { ... throw e; ... }

THROW (instr, e), VARPOINTSTO (e, ctx, obj, objCtx), OBJTYPE (obj, objT)

EXCEPTION RULES

slide-50
SLIDE 50

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

void meth() { ... throw e; ... }

THROW (instr, e), VARPOINTSTO (e, ctx, obj, objCtx), OBJTYPE (obj, objT), ¬CATCH (objT, instr, _)

EXCEPTION RULES

slide-51
SLIDE 51

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

void meth() { ... throw e; ... }

THROWPOINTSTO (meth, ctx, obj, objCtx) ← THROW (instr, e), VARPOINTSTO (e, ctx, obj, objCtx), OBJTYPE (obj, objT), ¬CATCH (objT, instr, _), INMETHOD (instr, meth).

EXCEPTION RULES

slide-52
SLIDE 52

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EXCEPTION RULES

void meth() { try { throw e; } catch (objT arg) {...} }

THROW (instr, e), VARPOINTSTO (e, ctx, obj, objCtx), OBJTYPE (obj, objT), CATCH (objT, instr, arg).

slide-53
SLIDE 53

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

void meth() { try { throw e; } catch (objT arg) {...} }

EXCEPTION RULES

VARPOINTSTO (arg, ctx, obj, objCtx) ← THROW (instr, e), VARPOINTSTO (e, ctx, obj, objCtx), OBJTYPE (obj, objT), CATCH (objT, instr, arg).

slide-54
SLIDE 54

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EXCEPTION RULES

Same logic for method invocation

slide-55
SLIDE 55

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

IS IT ENOUGH?

slide-56
SLIDE 56

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

NORMAL FLOW VS EXCEPTIONAL FLOW

antlr bloat eclipse luindex xalan

1000 2000 3000 4000 5000

Context Insensitive

normal flow exceptional flow

(in thousands)

antlr bloat eclipse luindex xalan

20000 40000 60000 80000

1-Call-Site-Sensitive + Heap

normal flow exceptional flow

(in thousands)

antlr bloat eclipse luindex xalan

10000 20000 30000 40000 50000

1-Type-Sensitive + Heap

normal flow exceptional flow

(in thousands)

slide-57
SLIDE 57

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

slide-58
SLIDE 58

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EFFICIENT AND EFFECTIVE HANDLING OF EXCEPTIONS

IN JAVA POINTS-TO ANALYSIS

Coarsen Exceptions

slide-59
SLIDE 59

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECORD (...) = objCtx, VARPOINTSTO (var, ctx, obj, objCtx) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth).

Recall...

OBJECT ALLOCATION

slide-60
SLIDE 60

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECORD (...) = objCtx, VARPOINTSTO (var, ctx, obj, objCtx) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth), OBJTYPE (obj, objT), ¬EXCEPTIONTYPE (objT).

Change to...

FILTER OUT EXCEPTIONS

slide-61
SLIDE 61

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

HANDLING EXCEPTIONS

REACHABLE (meth, ctx), ALLOC (var, obj, meth), OBJTYPE (obj, objT), EXCEPTIONTYPE (objT).

slide-62
SLIDE 62

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

HANDLING EXCEPTIONS

VARPOINTSTO (var, ctx, obj ) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth), OBJTYPE (obj, objT), EXCEPTIONTYPE (objT).

slide-63
SLIDE 63

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

  • A. CONTEXT INSENSITIVE EXCEPTIONS

VARPOINTSTO (var, ctx, obj, ?) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth), OBJTYPE (obj, objT), EXCEPTIONTYPE (objT).

slide-64
SLIDE 64

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

Single Context

VARPOINTSTO (var, ctx, obj, “ConstantObjCtx”) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth), OBJTYPE (obj, objT), EXCEPTIONTYPE (objT).

  • A. CONTEXT INSENSITIVE EXCEPTIONS
slide-65
SLIDE 65

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

  • B. MERGE EXCEPTIONS

VARPOINTSTO (var, ctx, obj, “ConstantObjCtx”) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth), OBJTYPE (obj, objT), EXCEPTIONTYPE (objT).

Not enough Get more aggressive

slide-66
SLIDE 66

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

  • B. MERGE EXCEPTIONS

VARPOINTSTO (var, ctx, obj, “ConstantObjCtx”) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth), OBJTYPE (obj, objT), EXCEPTIONTYPE (objT).

slide-67
SLIDE 67

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

  • B. MERGE EXCEPTIONS

VARPOINTSTO (var, ctx, reprObj, “ConstantObjCtx”) ← REACHABLE (meth, ctx), ALLOC (var, obj, meth), OBJTYPE (obj, objT), EXCEPTIONTYPE (objT), REPRESENTATIVE (obj, reprObj).

slide-68
SLIDE 68

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EXPERIMENTS

slide-69
SLIDE 69

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

EXPERIMENTS

JDK 1.6 JDK 1.6

slide-70
SLIDE 70

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

slide-71
SLIDE 71

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis insensitive 1object 1object+H 2object+H 1type+H 2type+H 1call-site 1call-site+H

500 1000 1500 2000 2500

Eclipse

sensitive insensitive

(seconds)

CONTEXT INSENSITIVE EXCEPTIONS

insensitive 1object 1object+H 1type+H 2type+H 1call-site 1call-site+H

500 1000 1500 2000 2500 3000 3500

Bloat

sensitive insensitive

(seconds)

slide-72
SLIDE 72

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis insensitive 1object 1object+H 2object+H 1type+H 2type+H 1call-site 1call-site+H

200 400 600 800 1000 1200

Eclipse

insensitive merge

(seconds)

insensitive 1object 1object+H 1type+H 2type+H 1call-site 1call-site+H

500 1000 1500 2000 2500 insensitive merge

(seconds)

Bloat

MERGE EXCEPTIONS

slide-73
SLIDE 73

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

MERGE EXCEPTIONS

insensitive 1object 1object+H 2object+H 1type+H 2type+H 1call-site 1call-site+H

200 400 600 800 1000 1200

Eclipse

insensitive merge

(seconds)

insensitive 1object 1object+H 1type+H 2type+H 1call-site 1call-site+H

500 1000 1500 2000 2500 insensitive merge

(seconds)

Bloat

Speedup as high as 70% Usually around 50%

slide-74
SLIDE 74

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis insensitive 1object+H 2object+H 1type+H 1call-site+H

10000 20000 30000 40000

Eclipse - Context Insensitive Exceptions

normal flow exceptional flow

(in thousands)

NORMAL FLOW VS EXCEPTIONAL FLOW

slide-75
SLIDE 75

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis insensitive 1object+H 2object+H 1type+H 1call-site+H

5000 10000 15000 20000

Eclipse - Merge Exceptions

normal flow exceptional flow

(in thousands)

NORMAL FLOW VS EXCEPTIONAL FLOW

insensitive 1object+H 2object+H 1type+H 1call-site+H

10000 20000 30000 40000

Eclipse - Context Insensitive Exceptions

normal flow exceptional flow

(in thousands)

slide-76
SLIDE 76

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

slide-77
SLIDE 77

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECAP

  • Huge amount of analysis time spent on exceptions
slide-78
SLIDE 78

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECAP

  • Huge amount of analysis time spent on exceptions
  • They mainly affect control-flow
slide-79
SLIDE 79

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECAP

  • Huge amount of analysis time spent on exceptions
  • They mainly affect control-flow
  • Significant speedup from coarsening exceptions
slide-80
SLIDE 80

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECAP

  • Huge amount of analysis time spent on exceptions
  • They mainly affect control-flow
  • Significant speedup from coarsening exceptions
  • Type-based merging as an effective coarsening
slide-81
SLIDE 81

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECAP

  • Huge amount of analysis time spent on exceptions
  • They mainly affect control-flow
  • Significant speedup from coarsening exceptions
  • Type-based merging as an effective coarsening
  • No trade-off in precision (in “normal” code)
slide-82
SLIDE 82

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECAP

  • Huge amount of analysis time spent on exceptions
  • They mainly affect control-flow
  • Significant speedup from coarsening exceptions
  • Type-based merging as an effective coarsening
  • No trade-off in precision (in “normal” code)
  • Datalog formalism makes changes clear
slide-83
SLIDE 83

George Kastrinis, Yannis Smaragdakis ~ Efficient and Effective Handling of Exceptions in Java Points-To Analysis

RECAP

  • Huge amount of analysis time spent on exceptions
  • They mainly affect control-flow
  • Significant speedup from coarsening exceptions
  • Type-based merging as an effective coarsening
  • No trade-off in precision (in “normal” code)
  • Datalog formalism makes changes clear
  • Also excellent implementation platform
slide-84
SLIDE 84

Hope you enjoyed!

George Kastrinis

http://gkastrinis.info