Class CallGraphPruning

java.lang.Object
com.ibm.wala.ipa.callgraph.pruned.CallGraphPruning

public final class CallGraphPruning extends Object
  • Constructor Details

    • CallGraphPruning

      public CallGraphPruning(CallGraph cg)
  • Method Details

    • findApplicationNodes

      public Set<CGNode> findApplicationNodes()
      Searches all nodes in the callgraph that correspond to a method of the application (and not the system library). It includes methods from the system library that transitively may call back into the application.
      Returns:
      Set of relevant callgraph nodes.
    • findApplicationNodes

      public Set<CGNode> findApplicationNodes(int depth)
      Searches all nodes in the callgraph that correspond to a method of the application (and not the system library). It includes methods from the system library that transitively may call back into the application. Library methods that do not transitively call back into application methods are cut at the level provided by parameter depth.
      Parameters:
      depth - The level at which non-returning library methods are cut off.
      Returns:
      Set of relevant callgraph nodes.
    • findNodes

      public Set<CGNode> findNodes(int depth, PruningPolicy policy)
      Searches all nodes in the callgraph according to the given pruning policy. It includes all methods which transitively may call methods which comply to the given pruning policy. All other methods are cut at the level provided by parameter 'depth'
      Parameters:
      depth - the level at which methods which do not comply to the given pruning policy are cut off.
      policy - pruning policy which decides which branches are kept in the call graph
      Returns:
      set of relevant callgraph nodes