public class HashMutablePDG extends HashMutableEdgeLabelledDirectedGraph<PDGNode,java.lang.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 java.util.Hashtable<java.lang.Object,PDGNode> |
m_obj2pdgNode |
protected java.util.List<PDGRegion> |
m_pdgRegions |
protected PDGNode |
m_startNode |
protected java.util.List<Region> |
m_strongRegions |
protected java.util.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() |
java.util.List<PDGNode> |
getDependents(PDGNode node)
This method returns the list of all dependents of a node in the PDG.
|
PDGNode |
getPDGNode(java.lang.Object cfgNode)
This method returns the PDGNode in the PDG corresponding to the given
CFG node.
|
java.util.List<PDGRegion> |
getPDGRegions()
This method returns the list of PDGRegions computed by the construction method.
|
static java.util.List<PDGRegion> |
getPostorderPDGRegionList(PDGNode r)
This method returns a list of regions obtained by post-order
traversal of the region hierarchy.
|
static java.util.List<IRegion> |
getPostorderRegionList(IRegion r) |
static java.util.List<IRegion> |
getPreorderRegionList(IRegion r) |
PDGNode |
GetStartNode() |
IRegion |
GetStartRegion() |
java.util.List<Region> |
getStrongRegions() |
java.util.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.
|
java.lang.String |
toString() |
addEdge, addNode, clearAll, clone, containsAnyEdge, containsAnyEdge, containsEdge, containsNode, getEdgesForLabel, getHeads, getLabelsForEdges, getPredsOf, getSuccsOf, getTails, iterator, printGraph, removeAllEdges, removeEdge, removeNode, size
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEdge, addNode, removeAllEdges, removeEdge, removeNode
containsAnyEdge, containsAnyEdge, containsEdge, containsNode, getEdgesForLabel, getLabelsForEdges
getHeads, getPredsOf, getSuccsOf, getTails, iterator, size
protected Body m_body
protected SootClass m_class
protected UnitGraph m_cfg
protected BlockGraph m_blockCFG
protected java.util.Hashtable<java.lang.Object,PDGNode> m_obj2pdgNode
protected java.util.List<Region> m_weakRegions
protected java.util.List<Region> m_strongRegions
protected PDGNode m_startNode
protected java.util.List<PDGRegion> m_pdgRegions
public HashMutablePDG(UnitGraph cfg)
public BlockGraph getBlockGraph()
getBlockGraph
in interface ProgramDependenceGraph
protected void constructPDG()
public UnitGraph getCFG()
public java.util.List<Region> getWeakRegions()
getWeakRegions
in interface ProgramDependenceGraph
public java.util.List<Region> getStrongRegions()
getStrongRegions
in interface ProgramDependenceGraph
public IRegion GetStartRegion()
GetStartRegion
in interface ProgramDependenceGraph
public PDGNode GetStartNode()
GetStartNode
in interface ProgramDependenceGraph
public java.util.List<PDGRegion> getPDGRegions()
getPDGRegions
in interface ProgramDependenceGraph
public static java.util.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 java.util.List<PDGNode> getDependents(PDGNode node)
getDependents
in interface ProgramDependenceGraph
node
- is the PDG node whose dependents are desired.public PDGNode getPDGNode(java.lang.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,java.lang.String>
removeAllEdges
in class HashMutableEdgeLabelledDirectedGraph<PDGNode,java.lang.String>
from
- out node for the edges to remove.to
- in node for the edges to remove.public java.lang.String toString()
toString
in interface ProgramDependenceGraph
toString
in class java.lang.Object