Package com.ibm.wala.util.graph
Class GraphSlicer
- java.lang.Object
-
- com.ibm.wala.util.graph.GraphSlicer
-
public class GraphSlicer extends Object
Utilities related to simple graph subset operations.
-
-
Constructor Summary
Constructors Constructor Description GraphSlicer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> AbstractGraph<E>
project(Graph<E> G, Predicate<E> fmember)
static <T> Graph<T>
prune(Graph<T> g, Predicate<T> p)
Prune a graph to only the nodes accepted by thePredicate
pstatic <T> Set<T>
slice(Graph<T> g, Predicate<T> p)
Performs a backward slice.
-
-
-
Method Detail
-
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 slicef
- 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.
- Throws:
WalaException
-
prune
public static <T> Graph<T> prune(Graph<T> g, Predicate<T> p)
Prune a graph to only the nodes accepted by thePredicate
p
-
project
public static <E> AbstractGraph<E> project(Graph<E> G, Predicate<E> fmember)
-
-