Class SDG<T extends InstanceKey>
- All Implemented Interfaces:
IClassHierarchyDweller, ISDG, EdgeManager<Statement>, Graph<Statement>, NodeManager<Statement>, NumberedEdgeManager<Statement>, NumberedGraph<Statement>, NumberedNodeManager<Statement>, Iterable<Statement>
System dependence graph.
An SDG comprises a set of PDGs, one for each method. We compute these lazily.
Prototype implementation. Not efficient.
-
Constructor Summary
ConstructorsConstructorDescriptionSDG(CallGraph cg, PointerAnalysis<T> pa, ModRef<T> modRef, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions) SDG(CallGraph cg, PointerAnalysis<T> pa, ModRef<T> modRef, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions, HeapExclusions heapExclude) SDG(CallGraph cg, PointerAnalysis<T> pa, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions) -
Method Summary
Modifier and TypeMethodDescriptionSlicer.ControlDependenceOptionsused to construct this graph.Set<? extends Dependency> getEdgeLabels(Statement src, Statement dst) protected NumberedEdgeManager<Statement> Get the program dependence graph constructed for a particular node.iterate over the nodes without constructing any new ones.toString()Use this with care.Methods inherited from class AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodesMethods inherited from class AbstractGraph
addEdge, addNode, containsNode, edgeString, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, streamMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesMethods inherited from interface Graph
removeNodeAndEdgesMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, streamMethods inherited from interface NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbersMethods inherited from interface NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
-
Constructor Details
-
SDG
public SDG(CallGraph cg, PointerAnalysis<T> pa, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions) -
SDG
public SDG(CallGraph cg, PointerAnalysis<T> pa, ModRef<T> modRef, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions) -
SDG
public SDG(CallGraph cg, PointerAnalysis<T> pa, ModRef<T> modRef, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions, HeapExclusions heapExclude) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
toString
Use this with care. This forces eager construction of the SDG, and SDGs can be big.- Overrides:
toStringin classAbstractGraph<Statement>- See Also:
-
iterateLazyNodes
iterate over the nodes without constructing any new ones. Use with extreme care. May break graph traversals that lazily add more nodes.- Specified by:
iterateLazyNodesin interfaceISDG
-
getEdgeManager
- Specified by:
getEdgeManagerin classAbstractNumberedGraph<Statement>- Returns:
- the object which manages edges in the graph
-
getNodeManager
- Specified by:
getNodeManagerin classAbstractNumberedGraph<Statement>- Returns:
- the object which manages nodes in the graph
-
getPDG
-
getCOptions
Description copied from interface:ISDGSlicer.ControlDependenceOptionsused to construct this graph.- Specified by:
getCOptionsin interfaceISDG
-
getDOptions
-
getCallGraph
-
getClassHierarchy
- Specified by:
getClassHierarchyin interfaceIClassHierarchyDweller
-
getPointerAnalysis
-
getEdgeLabels
-