public class HashMutablePDG extends HashMutableEdgeLabelledDirectedGraph<PDGNode,String> implements ProgramDependenceGraph
Modifier and Type | Field and Description |
---|---|
protected BlockGraph |
m_blockCFG |
protected Body |
m_body |
protected UnitGraph |
m_cfg |
protected SootClass |
m_class |
protected Hashtable<Object,PDGNode> |
m_obj2pdgNode |
protected List<PDGRegion> |
m_pdgRegions |
protected PDGNode |
m_startNode |
protected List<Region> |
m_strongRegions |
protected List<Region> |
m_weakRegions |
edgeToLabels, heads, labelToEdges, nodeToPreds, nodeToSuccs, tails
Constructor and Description |
---|
HashMutablePDG(UnitGraph cfg) |
Modifier and Type | Method and Description |
---|---|
protected void |
constructPDG()
This is the heart of the PDG contruction.
|
boolean |
dependentOn(PDGNode node1,
PDGNode node2)
This method determines if node1 is control-dependent on node2 in this PDG.
|
BlockGraph |
getBlockGraph() |
UnitGraph |
getCFG() |
List<PDGNode> |
getDependents(PDGNode node)
This method returns the list of all dependents of a node in the PDG.
|
PDGNode |
getPDGNode(Object cfgNode)
This method returns the PDGNode in the PDG corresponding to the given
CFG node.
|
List<PDGRegion> |
getPDGRegions()
This method returns the list of PDGRegions computed by the construction method.
|
static List<PDGRegion> |
getPostorderPDGRegionList(PDGNode r)
This method returns a list of regions obtained by post-order
traversal of the region hierarchy.
|
static List<IRegion> |
getPostorderRegionList(IRegion r) |
static List<IRegion> |
getPreorderRegionList(IRegion r) |
PDGNode |
GetStartNode() |
IRegion |
GetStartRegion() |
List<Region> |
getStrongRegions() |
List<Region> |
getWeakRegions() |
void |
removeAllEdges(PDGNode from,
PDGNode to)
The existing removeAllEdges in the parent class seems to be throwing concurrentmodification exception
most of the time.
|
String |
toString() |
addEdge, addNode, clearAll, clone, containsAnyEdge, containsAnyEdge, containsEdge, containsNode, getEdgesForLabel, getHeads, getLabelsForEdges, getNodes, getPredsOf, getSuccsOf, getTails, iterator, printGraph, removeAllEdges, removeEdge, removeNode, size
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEdge, addNode, containsAnyEdge, containsAnyEdge, containsEdge, containsNode, getEdgesForLabel, getLabelsForEdges, getNodes, removeAllEdges, removeEdge, removeNode
getHeads, getPredsOf, getSuccsOf, getTails, iterator, size
forEach, spliterator
protected Body m_body
protected SootClass m_class
protected UnitGraph m_cfg
protected BlockGraph m_blockCFG
protected PDGNode m_startNode
public HashMutablePDG(UnitGraph cfg)
public BlockGraph getBlockGraph()
getBlockGraph
in interface ProgramDependenceGraph
protected void constructPDG()
public UnitGraph getCFG()
public List<Region> getWeakRegions()
getWeakRegions
in interface ProgramDependenceGraph
public List<Region> getStrongRegions()
getStrongRegions
in interface ProgramDependenceGraph
public IRegion GetStartRegion()
GetStartRegion
in interface ProgramDependenceGraph
public PDGNode GetStartNode()
GetStartNode
in interface ProgramDependenceGraph
public List<PDGRegion> getPDGRegions()
getPDGRegions
in interface ProgramDependenceGraph
public static List<PDGRegion> getPostorderPDGRegionList(PDGNode r)
The
- root from which the traversal should begin.public boolean dependentOn(PDGNode node1, PDGNode node2)
dependentOn
in interface ProgramDependenceGraph
public List<PDGNode> getDependents(PDGNode node)
getDependents
in interface ProgramDependenceGraph
node
- is the PDG node whose dependents are desired.public PDGNode getPDGNode(Object cfgNode)
getPDGNode
in interface ProgramDependenceGraph
cfgNode
- is expected to be a node in CFG (currently only Block).public void removeAllEdges(PDGNode from, PDGNode to)
removeAllEdges
in interface MutableEdgeLabelledDirectedGraph<PDGNode,String>
removeAllEdges
in class HashMutableEdgeLabelledDirectedGraph<PDGNode,String>
from
- out node for the edges to remove.to
- in node for the edges to remove.public String toString()
toString
in interface ProgramDependenceGraph
toString
in class Object