soot.toolkits.graph.pdg
Class Region
java.lang.Object
soot.toolkits.graph.pdg.Region
- All Implemented Interfaces:
- IRegion
public class Region
- extends Object
- implements IRegion
This class was originally designed to represent a weak region. Later,
PDGRegion was designed to represent a richer region representation but
since there were cases that we wanted to enforce the use of Region instead
of PDGRegion, and for some other compatibility issues, we chose not to eliminate
this class and even not to factor it into a common abstract class.
One major contributing factor to the above is that, a Region can exist
independent from a PDG since they are generated by RegionAnalysis, whereas
a PDGRegion is generated by a PDG.
- Author:
- Hossein Sadat-Mohtasham
Jan 2009
Region
public Region(int id,
SootMethod m,
SootClass c,
UnitGraph ug)
Region
public Region(int id,
List<Block> blocks,
SootMethod m,
SootClass c,
UnitGraph ug)
clone
public Object clone()
- Overrides:
clone in class Object
getSootMethod
public SootMethod getSootMethod()
- Specified by:
getSootMethod in interface IRegion
getSootClass
public SootClass getSootClass()
- Specified by:
getSootClass in interface IRegion
getBlocks
public List<Block> getBlocks()
- Specified by:
getBlocks in interface IRegion
getUnitGraph
public UnitGraph getUnitGraph()
- Specified by:
getUnitGraph in interface IRegion
getUnits
public List<Unit> getUnits()
- Specified by:
getUnits in interface IRegion
getUnits
public List<Unit> getUnits(Unit from,
Unit to)
- Specified by:
getUnits in interface IRegion
getLast
public Unit getLast()
- Specified by:
getLast in interface IRegion
getFirst
public Unit getFirst()
- Specified by:
getFirst in interface IRegion
add
public void add(Block b)
add2Back
public void add2Back(Block b)
remove
public void remove(Block b)
getID
public int getID()
- Specified by:
getID in interface IRegion
occursBefore
public boolean occursBefore(Unit u1,
Unit u2)
- Specified by:
occursBefore in interface IRegion
setParent
public void setParent(IRegion pr)
- Specified by:
setParent in interface IRegion
getParent
public IRegion getParent()
- Specified by:
getParent in interface IRegion
addChildRegion
public void addChildRegion(IRegion chr)
- Specified by:
addChildRegion in interface IRegion
getChildRegions
public List<IRegion> getChildRegions()
- Specified by:
getChildRegions in interface IRegion
toString
public String toString()
- Overrides:
toString in class Object