Package sootup.spark

Class IncrementalPointsToAnalysis

java.lang.Object
sootup.spark.IncrementalPointsToAnalysis

public class IncrementalPointsToAnalysis extends Object
Worklist-based incremental Andersen-style points-to propagation.

Used by the on-the-fly call graph builder, which needs intermediate points-to results to resolve virtual call sites. Edges are fed in via addEdge(Node, Node) as the PAG grows; propagate() drains the dirty-node and dirty-heap worklists to bring points-to and heap state to a fixed point with respect to the currently-known edges. The analysis can then be re-driven when more edges are discovered, without recomputing from scratch.

  • Constructor Details

    • IncrementalPointsToAnalysis

      public IncrementalPointsToAnalysis(@NonNull @NonNull PAG pag)
  • Method Details

    • getPag

      public PAG getPag()
    • addEdge

      public void addEdge(@NonNull @NonNull Node src, @NonNull @NonNull Node tgt)
      Adds an edge to the underlying PAG and applies its semantic effect to the points-to / heap state. New work generated by the edge is enqueued for propagate() to drain.
    • propagate

      public void propagate()
      Drains worklists; bringing points-to and heap state up to date with currently-known edges.
    • reachingObjects

      public Set<AllocationNode> reachingObjects(@NonNull @NonNull Node n)
    • getPointsTo

      public Map<Node,Set<AllocationNode>> getPointsTo()
    • getHeap