|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--harpoon.Analysis.BasicBlock.Factory
Factory structure for generating BasicBlock views of
an HCode
.
Constructor Summary | |
BasicBlock.Factory(HCode code)
Constructs a BasicBlock.Factory using the
implicit control flow provided by code . |
|
BasicBlock.Factory(HCode hcode,
CFGrapher grapher)
Constructs a BasicBlock.Factory and generates
BasicBlock s for a given HCode . |
Method Summary | |
Set |
blockSet()
Returns the BasicBlock s constructed by
this . |
Iterator |
blocksIterator()
Generates an Iterator that traverses over all
of the blocks generated by this BasicBlock.Factory . |
void |
dumpCFG()
|
static void |
dumpCFG(BasicBlock start)
|
BasicBlockInterf |
getBBInterf(HCodeElement hce)
Does the same thing as getBlock . |
BasicBlock |
getBlock(HCodeElement hce)
Returns the BasicBlock containing
hce . |
static String |
getCFG(BasicBlock start)
|
HCode |
getHCode()
Returns the HCode that this factory
produces basic blocks of. |
Set |
getLeaves()
Returns the leaf BasicBlock s. |
Set |
getLeavesBBInterf()
Does the same thing as getLeaves . |
BasicBlock |
getRoot()
Returns the root BasicBlock . |
BasicBlockInterf |
getRootBBInterf()
Does the same thing as getRoot . |
Iterator |
postorderBlocksIter()
Generates an Iterator that traverses over all
of the blocks generated by this
BasicBlock.Factory in Postorder (subtrees
first, then root). |
Iterator |
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 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 hcode, CFGrapher grapher)
BasicBlock.Factory
and generates
BasicBlock
s for a given HCode
.
grapher.getFirstElement(hcode)
is an appropriate entry point for a
basic block.
BasicBlock
s 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 BasicBlock
s created.
Method Detail |
public BasicBlock getRoot()
BasicBlock
.
BasicBlock
that is at the start of the set of
HCodeElement
s being analyzed.
public BasicBlockInterf getRootBBInterf()
getRoot
.
Work around Java's weak typing system.
getRootBBInterf
in interface BasicBlockFactoryInterf
public Set getLeaves()
BasicBlock
s.
Set
of
BasicBlock
s that are at the ends of the
HCodeElement
s being analyzed.
public Set getLeavesBBInterf()
getLeaves
.
Work around Java's weak typing system.
getLeavesBBInterf
in interface BasicBlockFactoryInterf
public HCode getHCode()
HCode
that this
factory
produces basic blocks of.
getHCode
in interface BasicBlockFactoryInterf
public Set blockSet()
BasicBlock
s constructed by
this
.
blockSet
in interface BasicBlockFactoryInterf
public Iterator blocksIterator()
Iterator
that traverses over all
of the blocks generated by this BasicBlock.Factory
.
public Iterator preorderBlocksIter()
Iterator
that traverses over all
of the blocks generated by this
BasicBlock.Factory
in Preorder (root first,
then subtrees).
public Iterator postorderBlocksIter()
Iterator
that traverses over all
of the blocks generated by this
BasicBlock.Factory
in Postorder (subtrees
first, then root).
public BasicBlock getBlock(HCodeElement hce)
BasicBlock
containing
hce
.
this
.
hce
, or null
if
hce
is unreachable.
public BasicBlockInterf getBBInterf(HCodeElement hce)
getBlock
.
Work around Java's weak typing system.
getBBInterf
in interface BasicBlockFactoryInterf
public void dumpCFG()
public String toString()
toString
in class Object
public 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 |