Package soot.toolkits.graph.pdg
Interface ProgramDependenceGraph
-
- All Superinterfaces:
DirectedGraph<PDGNode>,EdgeLabelledDirectedGraph<PDGNode,String>,Iterable<PDGNode>,MutableEdgeLabelledDirectedGraph<PDGNode,String>
- All Known Implementing Classes:
HashMutablePDG
public interface ProgramDependenceGraph extends MutableEdgeLabelledDirectedGraph<PDGNode,String>
This defines the interface to a Program Dependence Graph as defined in Ferrante, J., Ottenstein, K. J., and Warren, J. D. 1987. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9, 3 (Jul. 1987), 319-349. DOI= http://doi.acm.org/10.1145/24039.24041 Note that this interface should evolve based on the need.- Author:
- Hossein Sadat-Mohtasham May 2009
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandependentOn(PDGNode node1, PDGNode node2)This method determines if node1 is control-dependent on node2 in this PDG.BlockGraphgetBlockGraph()List<PDGNode>getDependents(PDGNode node)This method returns the list of all dependents of a node in the PDG.PDGNodegetPDGNode(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.PDGNodeGetStartNode()IRegionGetStartRegion()List<Region>getStrongRegions()List<Region>getWeakRegions()StringtoString()-
Methods inherited from interface soot.toolkits.graph.DirectedGraph
getHeads, getPredsOf, getSuccsOf, getTails, iterator, size
-
Methods inherited from interface soot.toolkits.graph.EdgeLabelledDirectedGraph
containsAnyEdge, containsAnyEdge, containsEdge, containsNode, getEdgesForLabel, getLabelsForEdges
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface soot.toolkits.graph.MutableEdgeLabelledDirectedGraph
addEdge, addNode, removeAllEdges, removeAllEdges, removeEdge, removeNode
-
-
-
-
Method Detail
-
getWeakRegions
List<Region> getWeakRegions()
- Returns:
- A List of weak regions, generated by RegionAnalysis for the corresponding control flow graph (These are Regions and not PDGRegions.)
-
getStrongRegions
List<Region> getStrongRegions()
- Returns:
- A List of strong regions, generated when constructing the program dependence graph (These are Regions and not PDGRegions.)
-
getPDGRegions
List<PDGRegion> getPDGRegions()
This method returns the list of PDGRegions computed by the construction method.- Returns:
- The list of PDGRegions
-
GetStartRegion
IRegion GetStartRegion()
- Returns:
- The root region of the PDG.
-
getBlockGraph
BlockGraph getBlockGraph()
-
GetStartNode
PDGNode GetStartNode()
- Returns:
- The root node of the PDG, which is essentially the same as the start region but packaged in its PDGNode, which can be used to traverse the graph, etc.
-
dependentOn
boolean dependentOn(PDGNode node1, PDGNode node2)
This method determines if node1 is control-dependent on node2 in this PDG.- Parameters:
node1-node2-- Returns:
- returns true if node1 is dependent on node2
-
getDependents
List<PDGNode> getDependents(PDGNode node)
This method returns the list of all dependents of a node in the PDG.- Parameters:
node- is the PDG node whose dependents are desired.- Returns:
- a list of dependent nodes
-
getPDGNode
PDGNode getPDGNode(Object cfgNode)
This method returns the PDGNode in the PDG corresponding to the given CFG node. Note that currently the CFG node has to be a Block.- Parameters:
cfgNode- is expected to be a node in CFG (currently only Block).- Returns:
- The node in PDG corresponding to cfgNode.
-
-