Package soot.toolkits.graph.pdg
Class RegionAnalysis
- java.lang.Object
-
- 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
Fields Modifier and Type Field Description protected Hashtable<Block,Region>m_block2regionprotected BlockGraphm_blockCFGprotected UnitGraphm_cfgprotected SootClassm_classprotected SootMethodm_methodprotected Bodym_methodBodyprotected Hashtable<Integer,Region>m_regionsprotected List<Region>m_regionsListprotected BlockGraphm_reverseBlockCFGprotected UnitGraphm_reverseCFGprotected Regionm_topLevelRegion
-
Constructor Summary
Constructors Constructor Description RegionAnalysis(UnitGraph cfg, SootMethod m, SootClass c)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringCFGtoString(DirectedGraph<Block> cfg, boolean blockDetail)protected RegioncreateRegion(int id)Create a regionHashtable<Block,Region>getBlock2RegionMap()BlockGraphgetBlockCFG()DominatorTree<Block>getDominatorTree()DominatorTree<Block>getPostDominatorTree()List<Region>getRegions()RegiongetTopLevelRegion()Hashtable<Unit,Region>getUnit2RegionMap()voidreset()
-
-
-
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_topLevelRegion
protected Region m_topLevelRegion
-
-
Constructor Detail
-
RegionAnalysis
public RegionAnalysis(UnitGraph cfg, SootMethod m, SootClass c)
-
-
Method Detail
-
getBlockCFG
public BlockGraph getBlockCFG()
-
getPostDominatorTree
public DominatorTree<Block> getPostDominatorTree()
-
getDominatorTree
public DominatorTree<Block> getDominatorTree()
-
reset
public void reset()
-
createRegion
protected Region createRegion(int id)
Create a region
-
getTopLevelRegion
public Region getTopLevelRegion()
-
CFGtoString
public static String CFGtoString(DirectedGraph<Block> cfg, boolean blockDetail)
-
-