Class DominatorFinder<N>

java.lang.Object
pascal.taie.util.graph.DominatorFinder<N>

public class DominatorFinder<N> extends Object
Finds dominators for the nodes in given Graph.
  • Constructor Details

    • DominatorFinder

      public DominatorFinder(Graph<N> graph)
    • DominatorFinder

      public DominatorFinder(Graph<N> graph, boolean isSparse)
    • DominatorFinder

      public DominatorFinder(Graph<N> graph, Indexer<N> indexer, boolean isSparse)
      Constructs a dominator finder with a graph and given indexer. Note that indexer must assign continuous indexes for nodes in graph, starting from 0, otherwise the finder may throw exception.
  • Method Details

    • getDominatorsOf

      public Set<N> getDominatorsOf(N node)
      Returns:
      the dominators of node.
    • getNodesDominatedBy

      public Set<N> getNodesDominatedBy(N dominator)
      Returns:
      the nodes dominated by the dominator.
    • isDominatedBy

      public boolean isDominatedBy(N node, N dominator)
      Returns:
      true if dominator is a dominator of node.