harpoon.Analysis
Class FCFGBasicBlock.Factory

java.lang.Object
  extended by harpoon.Analysis.FCFGBasicBlock.Factory
All Implemented Interfaces:
BasicBlockFactoryInterf
Enclosing class:
FCFGBasicBlock

public static class FCFGBasicBlock.Factory
extends Object
implements BasicBlockFactoryInterf

Factory structure for generating FCFGBasicBlock views of an HCode.


Field Summary
protected  Set blocks
           
protected  Code hcode
           
protected  Set leaves
           
protected  Map quadToBB
           
protected  FCFGBasicBlock root
           
 
Constructor Summary
FCFGBasicBlock.Factory(HCode hcode)
          Produces a FCFGBasicBlock view of hcode hcode must be in "quad-with-try" format.
 
Method Summary
 Set blockSet()
          Returns the FCFGBasicBlocks constructed by this factory.
 BasicBlockInterf getBBInterf(HCodeElement hce)
          Does the same thing as getBlock.
 FCFGBasicBlock getBlock(HCodeElement hce)
          Returns the FCFGBasicBlock containing hce.
 HCode getHCode()
          Returns the HCode that this factory produces FCFG basic blocks of.
 Set getLeaves()
          Returns the leaf FCFGBasicBlocks.
 Set getLeavesBBInterf()
          Does the same thing as getLeaves.
 FCFGBasicBlock getRoot()
          Returns the root FCFGBasicBlock.
 BasicBlockInterf getRootBBInterf()
          Does the same thing as getRoot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hcode

protected Code hcode

blocks

protected Set blocks

leaves

protected Set leaves

root

protected FCFGBasicBlock root

quadToBB

protected Map quadToBB
Constructor Detail

FCFGBasicBlock.Factory

public FCFGBasicBlock.Factory(HCode hcode)
Produces a FCFGBasicBlock view of hcode hcode must be in "quad-with-try" format.

Method Detail

getHCode

public HCode getHCode()
Returns the HCode that this factory produces FCFG basic blocks of.

Specified by:
getHCode in interface BasicBlockFactoryInterf

getRoot

public FCFGBasicBlock getRoot()
Returns the root FCFGBasicBlock.
effects: returns the FCFGBasicBlock that is at the start of the set of HCodeElements being analyzed.


getRootBBInterf

public BasicBlockInterf getRootBBInterf()
Does the same thing as getRoot. Work around Java's weak typing system.

Specified by:
getRootBBInterf in interface BasicBlockFactoryInterf

blockSet

public Set blockSet()
Returns the FCFGBasicBlocks constructed by this factory.

Specified by:
blockSet in interface BasicBlockFactoryInterf

getLeaves

public Set getLeaves()
Returns the leaf FCFGBasicBlocks.
effects: returns a Set of terminal FCFGBasicBlocks for the underlying HCode. Usually, this set will contain a single element, the FCFGBasicBlock for the FOOTER.


getLeavesBBInterf

public Set getLeavesBBInterf()
Does the same thing as getLeaves. Work around Java's weak typing system.

Specified by:
getLeavesBBInterf in interface BasicBlockFactoryInterf

getBlock

public FCFGBasicBlock getBlock(HCodeElement hce)
Returns the FCFGBasicBlock containing hce.
requires: hce is present in the code for this.
effects: returns the basic block that contains hce, or null if hce is unreachable.


getBBInterf

public BasicBlockInterf getBBInterf(HCodeElement hce)
Does the same thing as getBlock. Work around Java's weak typing system.

Specified by:
getBBInterf in interface BasicBlockFactoryInterf