soot.toolkits.graph.pdg
Class RegionAnalysis

java.lang.Object
  extended by soot.toolkits.graph.pdg.RegionAnalysis

public class RegionAnalysis
extends Object

This class computes the set of weak regions for a given method. It is based on the algorithm given in the following paper: Ball, T. 1993. What's in a region?: or computing control dependence regions in near-linear time for reducible control flow. ACM Lett. Program. Lang. Syst. 2, 1-4 (Mar. 1993), 1-16. DOI= http://doi.acm.org/10.1145/176454.176456

Author:
Hossein Sadat-Mohtasham Jan 2009

Field Summary
protected  Hashtable<Block,Region> m_block2region
           
protected  BlockGraph m_blockCFG
           
protected  UnitGraph m_cfg
           
protected  SootClass m_class
           
protected  SootMethod m_method
           
protected  Body m_methodBody
           
protected  Hashtable<Integer,Region> m_regions
           
protected  List<Region> m_regionsList
           
protected  BlockGraph m_reverseBlockCFG
           
protected  UnitGraph m_reverseCFG
           
protected  Region m_topLevelRegion
           
 
Constructor Summary
RegionAnalysis(UnitGraph cfg, SootMethod m, SootClass c)
           
 
Method Summary
 String CFGtoString(DirectedGraph cfg, boolean blockDetail)
           
protected  Region createRegion(int id)
          Create a region
 Hashtable<Block,Region> getBlock2RegionMap()
           
 BlockGraph getBlockCFG()
           
 DominatorTree getDominatorTree()
           
 DominatorTree getPostDominatorTree()
           
 List<Region> getRegions()
           
 Region getTopLevelRegion()
           
 Hashtable<Unit,Region> getUnit2RegionMap()
           
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_class

protected SootClass m_class

m_method

protected SootMethod m_method

m_methodBody

protected Body m_methodBody

m_cfg

protected UnitGraph m_cfg

m_reverseCFG

protected UnitGraph m_reverseCFG

m_blockCFG

protected BlockGraph m_blockCFG

m_reverseBlockCFG

protected BlockGraph m_reverseBlockCFG

m_regions

protected Hashtable<Integer,Region> m_regions

m_regionsList

protected List<Region> m_regionsList

m_topLevelRegion

protected Region m_topLevelRegion

m_block2region

protected Hashtable<Block,Region> m_block2region
Constructor Detail

RegionAnalysis

public RegionAnalysis(UnitGraph cfg,
                      SootMethod m,
                      SootClass c)
Method Detail

getRegions

public List<Region> getRegions()

getUnit2RegionMap

public Hashtable<Unit,Region> getUnit2RegionMap()

getBlock2RegionMap

public Hashtable<Block,Region> getBlock2RegionMap()

getBlockCFG

public BlockGraph getBlockCFG()

getPostDominatorTree

public DominatorTree getPostDominatorTree()

getDominatorTree

public DominatorTree getDominatorTree()

reset

public void reset()

createRegion

protected Region createRegion(int id)
Create a region


getTopLevelRegion

public Region getTopLevelRegion()

CFGtoString

public String CFGtoString(DirectedGraph cfg,
                          boolean blockDetail)