|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.Analysis.BasicBlock.Factory<HCE>
public static class BasicBlock.Factory<HCE extends HCodeElement>
Factory structure for generating BasicBlock views of
an HCode.
| Constructor Summary | |
|---|---|
BasicBlock.Factory(HCode<HCE> code)
Constructs a BasicBlock.Factory using the
implicit control flow provided by code. |
|
BasicBlock.Factory(HCode<HCE> hcode,
CFGrapher<HCE> grapher)
Constructs a BasicBlock.Factory and generates
BasicBlocks for a given HCode. |
|
| Method Summary | |
|---|---|
Set<BasicBlock<HCE>> |
blockSet()
Returns the BasicBlocks constructed by
this. |
Iterator<BasicBlock<HCE>> |
blocksIterator()
Generates an Iterator that traverses over all
of the blocks generated by this BasicBlock.Factory. |
void |
dumpCFG()
|
static void |
dumpCFG(BasicBlock start)
|
BasicBlock<HCE> |
getBBInterf(HCE hce)
Does the same thing as getBlock. |
BasicBlock<HCE> |
getBlock(HCE hce)
Returns the BasicBlock containing
hce. |
static String |
getCFG(BasicBlock start)
|
HCode<HCE> |
getHCode()
Returns the HCode that this factory
produces basic blocks of. |
Set<BasicBlock<HCE>> |
getLeaves()
Returns the leaf BasicBlocks. |
Set<BasicBlock<HCE>> |
getLeavesBBInterf()
Does the same thing as getLeaves. |
BasicBlock<HCE> |
getRoot()
Returns the root BasicBlock. |
BasicBlock<HCE> |
getRootBBInterf()
Does the same thing as getRoot. |
Iterator<BasicBlock<HCE>> |
postorderBlocksIter()
Generates an Iterator that traverses over all
of the blocks generated by this
BasicBlock.Factory in Postorder (subtrees
first, then root). |
Iterator<BasicBlock<HCE>> |
preorderBlocksIter()
Generates an Iterator that traverses over all
of the blocks generated by this
BasicBlock.Factory in Preorder (root first,
then subtrees). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicBlock.Factory(HCode<HCE> code)
BasicBlock.Factory using the
implicit control flow provided by code.
code
implement CFGraphable.
BasicBlock.Factory using
this(code, CFGrapher.DEFAULT);
public BasicBlock.Factory(HCode<HCE> hcode,
CFGrapher<HCE> grapher)
BasicBlock.Factory and generates
BasicBlocks for a given HCode.
grapher.getFirstElement(hcode)
is an appropriate entry point for a
basic block.
BasicBlocks corresponding to the blocks
implicitly contained in
grapher.getFirstElement(hcode) and the
HCodeElement objects that this
points to, and returns the
BasicBlock that
grapher.getFirstElement(hcode) is an
instruction in. The BasicBlock returned
is considered to be the root (entry-point) of the set
of BasicBlocks created.
| Method Detail |
|---|
public BasicBlock<HCE> getRoot()
BasicBlock.
BasicBlock
that is at the start of the set of
HCodeElements being analyzed.
public BasicBlock<HCE> getRootBBInterf()
getRoot.
Work around Java's weak typing system.
getRootBBInterf in interface BasicBlockFactoryInterf<HCE extends HCodeElement,BasicBlock<HCE extends HCodeElement>>public Set<BasicBlock<HCE>> getLeaves()
BasicBlocks.
Set of
BasicBlocks that are at the ends of the
HCodeElements being analyzed.
public Set<BasicBlock<HCE>> getLeavesBBInterf()
getLeaves.
Work around Java's weak typing system.
getLeavesBBInterf in interface BasicBlockFactoryInterf<HCE extends HCodeElement,BasicBlock<HCE extends HCodeElement>>public HCode<HCE> getHCode()
HCode that this factory
produces basic blocks of.
getHCode in interface BasicBlockFactoryInterf<HCE extends HCodeElement,BasicBlock<HCE extends HCodeElement>>public Set<BasicBlock<HCE>> blockSet()
BasicBlocks constructed by
this.
blockSet in interface BasicBlockFactoryInterf<HCE extends HCodeElement,BasicBlock<HCE extends HCodeElement>>public Iterator<BasicBlock<HCE>> blocksIterator()
Iterator that traverses over all
of the blocks generated by this BasicBlock.Factory.
public Iterator<BasicBlock<HCE>> preorderBlocksIter()
Iterator that traverses over all
of the blocks generated by this
BasicBlock.Factory in Preorder (root first,
then subtrees).
public Iterator<BasicBlock<HCE>> postorderBlocksIter()
Iterator that traverses over all
of the blocks generated by this
BasicBlock.Factory in Postorder (subtrees
first, then root).
public BasicBlock<HCE> getBlock(HCE hce)
BasicBlock containing
hce.
this.
hce, or null if
hce is unreachable.
public BasicBlock<HCE> getBBInterf(HCE hce)
getBlock.
Work around Java's weak typing system.
getBBInterf in interface BasicBlockFactoryInterf<HCE extends HCodeElement,BasicBlock<HCE extends HCodeElement>>public void dumpCFG()
public String toString()
toString in class Objectpublic static void dumpCFG(BasicBlock start)
public static String getCFG(BasicBlock start)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||