Class GraphSlicer

java.lang.Object
com.ibm.wala.util.graph.GraphSlicer

public class GraphSlicer extends Object
Utilities related to simple graph subset operations.
  • Constructor Details

    • GraphSlicer

      public GraphSlicer()
  • Method Details

    • slice

      public static <T> Set<T> slice(Graph<T> g, Predicate<T> p)
      Performs a backward slice.
      Type Parameters:
      T - type for nodes
      Parameters:
      g - the graph to slice
      p - identifies targets for the backward slice
      Returns:
      the set of nodes in g, from which any of the targets (nodes that f accepts) is reachable.
    • prune

      public static <T> Graph<T> prune(Graph<T> g, Predicate<T> p)
      Prune a graph to only the nodes accepted by the Predicate p
    • project

      public static <E> AbstractGraph<E> project(Graph<E> G, Predicate<E> fmember)