Package soot.toolkits.graph.pdg
Class PDGRegion
- java.lang.Object
-
- soot.toolkits.graph.pdg.PDGRegion
-
public class PDGRegion extends Object implements IRegion, Iterable<PDGNode>
This represents a region of control dependence obtained by constructing a program dependence graph. A PDGRegion is slightly different than a weak or strong region; the loops and conditional relations between regions are explicitly represented in the PDGRegion.- Author:
- Hossein Sadat-Mohtasham Sep 2009
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildRegion(IRegion chr)voidaddPDGNode(PDGNode node)Objectclone()List<Block>getBlocks()List<IRegion>getChildRegions()PDGNodegetCorrespondingPDGNode()UnitgetFirst()intgetID()UnitgetLast()List<PDGNode>getNodes()IRegiongetParent()SootClassgetSootClass()SootMethodgetSootMethod()UnitGraphgetUnitGraph()List<Unit>getUnits()List<Unit>getUnits(Unit from, Unit to)Iterator<PDGNode>iterator()return an iterator that know how to follow the control flow in a region.booleanoccursBefore(Unit u1, Unit u2)voidsetParent(IRegion pr)StringtoString()PDGNodeunit2PDGNode(Unit u)-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getCorrespondingPDGNode
public PDGNode getCorrespondingPDGNode()
-
getSootMethod
public SootMethod getSootMethod()
- Specified by:
getSootMethodin interfaceIRegion
-
getSootClass
public SootClass getSootClass()
- Specified by:
getSootClassin interfaceIRegion
-
getUnitGraph
public UnitGraph getUnitGraph()
- Specified by:
getUnitGraphin interfaceIRegion
-
iterator
public Iterator<PDGNode> iterator()
return an iterator that know how to follow the control flow in a region. This actually returns a ChildPDGFlowIterator that only iterates through the dependent nodes that contribute to the units that belong to a region as defined by a weak region.
-
unit2PDGNode
public PDGNode unit2PDGNode(Unit u)
- Parameters:
a- Statement within the region- Returns:
- The PDGNode that contains that unit, if this unit is in this region.
-
addPDGNode
public void addPDGNode(PDGNode node)
-
occursBefore
public boolean occursBefore(Unit u1, Unit u2)
- Specified by:
occursBeforein interfaceIRegion
-
addChildRegion
public void addChildRegion(IRegion chr)
- Specified by:
addChildRegionin interfaceIRegion
-
getChildRegions
public List<IRegion> getChildRegions()
- Specified by:
getChildRegionsin interfaceIRegion
-
-