|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--soot.shimple.internal.analysis.DominatorTree
Dominator tree that implements the Soot DirectedGraph interface amongst other conveniences.
DominatorTree invokes DominatorsFinder to identify the list of dominators for each node, and then proceeds to build a tree.
Constructor Summary | |
DominatorTree(BlockGraph graph)
|
|
DominatorTree(BlockGraph graph,
boolean constructFrontier)
|
Method Summary | |
void |
buildFrontier()
|
void |
buildTree()
Add all the necessary links between nodes to form a meaningful tree structure. |
DominatorNode |
fetchNode(Block block)
Clever convenience method to make sure we don't create more than one DominatorNode for a given block. |
protected DominatorNode |
fetchParent(Block block)
Has most of the intelligence necessary to build the tree. |
BlockGraph |
getGraph()
|
java.util.List |
getHeads()
Returns a list of entry points for this graph. |
java.util.List |
getPredsOf(java.lang.Object node)
Returns a list of predecessors for the given node in the graph. |
java.util.List |
getSuccsOf(java.lang.Object node)
Returns a list of successors for the given node in the graph. |
java.util.List |
getTails()
Returns a list of exit points for this graph. |
java.util.Iterator |
iterator()
Returns an iterator for the nodes in this graph. |
int |
size()
Returns the node count for this graph. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DominatorTree(BlockGraph graph)
public DominatorTree(BlockGraph graph, boolean constructFrontier)
Method Detail |
public BlockGraph getGraph()
public java.util.List getHeads()
public java.util.List getTails()
public java.util.List getPredsOf(java.lang.Object node)
public java.util.List getSuccsOf(java.lang.Object node)
public java.util.Iterator iterator()
public int size()
public void buildTree()
public DominatorNode fetchNode(Block block)
Warning: Because fetchNode creates a new Node, if necessary, it is not 100% suitable for outside public use. We need it anyway, hence the interface is not protected.
protected DominatorNode fetchParent(Block block)
In fact, it's not that smart and can be improved. In short, we try to identify the most dominated dominator :-) and deduce that that dominator is our parent.
public void buildFrontier()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |