<aside> 💡 Key Points

I. Motivation


So far, all analyses we learnt are intraprocedural.

For better precision, we need Interprocedural analysis: propagate data-flow information along interprocedural control-flow edges

The concept “procedure” was used in old PL’s

Untitled

II. Call Graph Construction (CHA)

To perform interprocedural analysis, we need call graph


A representation of calling relationships in the program

Essentially, a call graph is a set of call edges from call-sites to their target methods (callees)

Call graph is very important program information

1. Call Graph Construction for OOPLs

←Top← More Efficient ↔ More Precise →Bottom→

2. Method Calls in Java

Static call Special call Virtual call
Instruction invokestatic invokespecial invokeinterface
invokevirtual
Receiver objects No Yes Yes
Target methods - Static methods - Constructors

3. Method Dispatch of Virtual Calls