Class CallGraphTransitiveClosure

java.lang.Object
com.ibm.wala.ipa.callgraph.CallGraphTransitiveClosure

public class CallGraphTransitiveClosure extends Object
Utility class for computing an analysis result for call graph nodes and their transitive callees, given the results for individual nodes.
  • Constructor Details

    • CallGraphTransitiveClosure

      public CallGraphTransitiveClosure()
  • Method Details

    • transitiveClosure

      public static <T> Map<CGNode,OrdinalSet<T>> transitiveClosure(CallGraph cg, Map<CGNode,Collection<T>> nodeResults)
      Compute the transitive closure of an analysis result over all callees.
      Parameters:
      cg - the call graph
      nodeResults - analysis result for each individual node
      Returns:
      a map from each node to the analysis result for the node and its transitive callees
    • collectNodeResults

      public static <T> Map<CGNode,Collection<T>> collectNodeResults(CallGraph cg, Function<CGNode,Collection<T>> nodeResultComputer)
      Collect analysis result for each CGNode in a Map.