Package soot.toolkits.graph
Class SimpleDominatorsFinder<N>
- java.lang.Object
-
- soot.toolkits.graph.SimpleDominatorsFinder<N>
-
- All Implemented Interfaces:
DominatorsFinder<N>
public class SimpleDominatorsFinder<N> extends Object implements DominatorsFinder<N>
Wrapper class for a simple dominators analysis based on a simple flow analysis algorithm. Works with any DirectedGraph with a single head.- Author:
- Navindra Umanee
-
-
Field Summary
Fields Modifier and Type Field Description protected DirectedGraph<N>graphprotected Map<N,FlowSet<N>>nodeToDominators
-
Constructor Summary
Constructors Constructor Description SimpleDominatorsFinder(DirectedGraph<N> graph)Compute dominators for provided singled-headed directed graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<N>getDominators(N node)Returns a list of dominators for the given node in the graph.DirectedGraph<N>getGraph()Returns the graph to which the analysis pertains.NgetImmediateDominator(N node)Returns the immediate dominator of node or null if the node has no immediate dominator.booleanisDominatedBy(N node, N dominator)True if "node" is dominated by "dominator" in the graph.booleanisDominatedByAll(N node, Collection<N> dominators)True if "node" is dominated by all nodes in "dominators" in the graph.
-
-
-
Constructor Detail
-
SimpleDominatorsFinder
public SimpleDominatorsFinder(DirectedGraph<N> graph)
Compute dominators for provided singled-headed directed graph.
-
-
Method Detail
-
getGraph
public DirectedGraph<N> getGraph()
Description copied from interface:DominatorsFinderReturns the graph to which the analysis pertains.- Specified by:
getGraphin interfaceDominatorsFinder<N>
-
getDominators
public List<N> getDominators(N node)
Description copied from interface:DominatorsFinderReturns a list of dominators for the given node in the graph.- Specified by:
getDominatorsin interfaceDominatorsFinder<N>
-
getImmediateDominator
public N getImmediateDominator(N node)
Description copied from interface:DominatorsFinderReturns the immediate dominator of node or null if the node has no immediate dominator.- Specified by:
getImmediateDominatorin interfaceDominatorsFinder<N>
-
isDominatedBy
public boolean isDominatedBy(N node, N dominator)
Description copied from interface:DominatorsFinderTrue if "node" is dominated by "dominator" in the graph.- Specified by:
isDominatedByin interfaceDominatorsFinder<N>
-
isDominatedByAll
public boolean isDominatedByAll(N node, Collection<N> dominators)
Description copied from interface:DominatorsFinderTrue if "node" is dominated by all nodes in "dominators" in the graph.- Specified by:
isDominatedByAllin interfaceDominatorsFinder<N>
-
-