The Ant and the Grasshopper: Fast and Accurate Pointer Analysis for Millions of Lines of Code

Ben Hardekopf, Calvin Lin

Gokulan R

CS15B033

1 May 2020

Summary of the paper

  • Accurate and efficient points-to information
  • Cycle-detection in points-to graph is the bottleneck in computing points-to analysis
  • Lazy Cycle Detection (LCD)
    • Online cycle detection technique
  • Hybrid Cycle Detection (HCD)
    • Offline + Online cycle detection technique

LCD Algorithm

For an edge A \( \rightarrow \) B, if points to set of A and B are same, then depth-first search for possible cycle and merge nodes.

HCD Algorithm

For every node A, consider additional ref node (*A). In the offline phase, construct edges using ref nodes. In online phase, for cycles with ref nodes, merge the nodes present in the points-to set of the ref node.

Observations & Future Work

  • Dominant factors impacting performance
    • number of nodes collapsed due to SCC
    • depth of nodes analysed to detect cycles
    • no. of propagations of points-to information
  • Heuristics to define the max. depth to analyse to conclude earlier that cycle does not exist.
  • Efficient cycle detection using bitmap representation of points-to information
  • Abstract representation of points-to information can be used to handle out-of-memory issue

accurate_pointsto_info

By Gokulan Ravi

accurate_pointsto_info

  • 171