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, iterateNodesModifier and TypeMethodDescriptionintgetNode(int number) intgetPredNodeNumbers(Statement node) getSuccNodeNumbers(Statement node) Methods inherited from class AbstractGraph
addEdge, addNode, containsNode, edgeString, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, streamModifier and TypeMethodDescriptionvoidvoidadd a node to this graphbooleanprotected StringedgeString(Statement from, Statement to) intintReturn the number ofimmediate predecessornodes of nReturn anIteratorover the immediate predecessor nodes of nintReturn the number ofimmediate successornodes of this Node in the GraphReturn an Iterator over the immediate successor nodes of nbooleaniterator()protected StringnodeString(Statement n, boolean forEdge) voidvoidremoveEdge(Statement src, Statement dst) voidremoveIncomingEdges(Statement node) voidremove a node from this graphvoidremove a node and all its incident edgesvoidremoveOutgoingEdges(Statement node) stream()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
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
-