If you haven’t already, install the Call Graph Toolbox plugin into Eclipse.
First decide if you are analyzing a library (partial program analysis for a project with no main methods) or an application (whole program analysis). Navigate to
Call Graph Construction and check the
Enable Library Call Graph Construction checkbox depending on your analysis needs.
To create a call graph for a project navigate to
Manage Project Settings, select the project to analyze and press
OK. Navigate to
Re-Map Workspace to regenerate the program graph. Then navigate to
Open Smart View. From the drop down menu select one of the nine call graph implementations
0-CFA. Note that the
Call Smart View is provided by default in Atlas and is equivalent to the
CHA algorithm results provided by this plugin. When the call graph construction is finished the view will automatically update in response to a selection in the source editor or graph view windows.
0-CFA (Points-to) Configuration
To utilize the 0-CFA call graph construction algorithm the Points-to Toolbox must be configured. Navigate to
Points-to Toolbox and check the
Enable Jimple Points-to Analysis checkbox.
Note: Currently “Jimple Points-to Analysis” analyzes both Java and Java bytecode.
If points-to analysis is enabled it will be invoked automatically after the workspace has been mapped.
A complete writeup and analysis of each algorithm is available at ben-holland.com/call-graph-construction-algorithms-explained.
A summary of the tradeoffs for each algorithm can be found in the figure below.