Class CISDG
java.lang.Object
com.ibm.wala.ipa.slicer.thin.CISDG
- All Implemented Interfaces:
IClassHierarchyDweller
,ISDG
,EdgeManager<Statement>
,Graph<Statement>
,NodeManager<Statement>
,NumberedEdgeManager<Statement>
,NumberedGraph<Statement>
,NumberedNodeManager<Statement>
,Iterable<Statement>
A context-insensitive SDG. This class assumes that it is given a normal NO_HEAP SDG. It adds
context-insensitive heap information directly from heap stores to corresponding loads, based on
an underlying pointer analysis.
-
Constructor Summary
ModifierConstructorDescriptionprotected
CISDG
(SDG<InstanceKey> noHeap, Map<Statement, Set<PointerKey>> mod, Map<Statement, Set<PointerKey>> ref) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
add a node to this graphboolean
boolean
Slicer.ControlDependenceOptions
used to construct this graph.int
getNode
(int number) int
int
Get the program dependence graph constructed for a particular node.int
Return the number ofimmediate predecessor
nodes of ngetPredNodeNumbers
(Statement node) Return anIterator
over the immediate predecessor nodes of nint
Return the number ofimmediate successor
nodes of this Node in the GraphgetSuccNodeNumbers
(Statement node) Return an Iterator over the immediate successor nodes of nboolean
int
hashCode()
Iterate over the nodes which have been discovered so far, but do NOT eagerly construct the entire graph.iterator()
void
void
removeEdge
(Statement src, Statement dst) void
removeIncomingEdges
(Statement node) void
remove a node from this graphvoid
remove a node and all its incident edgesvoid
removeOutgoingEdges
(Statement node) stream()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CISDG
protected CISDG(SDG<InstanceKey> noHeap, Map<Statement, Set<PointerKey>> mod, Map<Statement, Set<PointerKey>> ref)
-
-
Method Details
-
addEdge
- Specified by:
addEdge
in interfaceEdgeManager<Statement>
-
addNode
Description copied from interface:NodeManager
add a node to this graph- Specified by:
addNode
in interfaceNodeManager<Statement>
-
containsNode
- Specified by:
containsNode
in interfaceNodeManager<Statement>
- Returns:
- true iff the graph contains the specified node
-
equals
-
getCOptions
Description copied from interface:ISDG
Slicer.ControlDependenceOptions
used to construct this graph.- Specified by:
getCOptions
in interfaceISDG
-
getMaxNumber
public int getMaxNumber()- Specified by:
getMaxNumber
in interfaceNumberedNodeManager<Statement>
-
getNode
- Specified by:
getNode
in interfaceNumberedNodeManager<Statement>
-
getNumber
- Specified by:
getNumber
in interfaceNumberedNodeManager<Statement>
-
getNumberOfNodes
public int getNumberOfNodes()- Specified by:
getNumberOfNodes
in interfaceNodeManager<Statement>
- Returns:
- the number of nodes in this graph
-
getPDG
-
getPredNodeCount
Description copied from interface:EdgeManager
Return the number ofimmediate predecessor
nodes of n- Specified by:
getPredNodeCount
in interfaceEdgeManager<Statement>
- Returns:
- the number of immediate predecessors of n.
-
getPredNodeNumbers
- Specified by:
getPredNodeNumbers
in interfaceNumberedEdgeManager<Statement>
- Returns:
- the numbers identifying the immediate predecessors of node
-
getPredNodes
Description copied from interface:EdgeManager
Return anIterator
over the immediate predecessor nodes of nThis method never returns
null
.- Specified by:
getPredNodes
in interfaceEdgeManager<Statement>
- Returns:
- an
Iterator
over the immediate predecessor nodes of this Node.
-
getSuccNodeCount
Description copied from interface:EdgeManager
Return the number ofimmediate successor
nodes of this Node in the Graph- Specified by:
getSuccNodeCount
in interfaceEdgeManager<Statement>
- Returns:
- the number of immediate successor Nodes of this Node in the Graph.
-
getSuccNodeNumbers
- Specified by:
getSuccNodeNumbers
in interfaceNumberedEdgeManager<Statement>
- Returns:
- the numbers identifying the immediate successors of node
-
getSuccNodes
Description copied from interface:EdgeManager
Return an Iterator over the immediate successor nodes of nThis method never returns
null
.- Specified by:
getSuccNodes
in interfaceEdgeManager<Statement>
- Returns:
- an Iterator over the immediate successor nodes of n
-
hasEdge
- Specified by:
hasEdge
in interfaceEdgeManager<Statement>
-
hashCode
-
iterateLazyNodes
Description copied from interface:ISDG
Iterate over the nodes which have been discovered so far, but do NOT eagerly construct the entire graph.- Specified by:
iterateLazyNodes
in interfaceISDG
-
iterator
-
stream
-
iterateNodes
- Specified by:
iterateNodes
in interfaceNumberedNodeManager<Statement>
- Returns:
- iterator of nodes with the numbers in set s
-
removeAllIncidentEdges
- Specified by:
removeAllIncidentEdges
in interfaceEdgeManager<Statement>
-
removeEdge
- Specified by:
removeEdge
in interfaceEdgeManager<Statement>
-
removeIncomingEdges
- Specified by:
removeIncomingEdges
in interfaceEdgeManager<Statement>
-
removeNode
Description copied from interface:NodeManager
remove a node from this graph- Specified by:
removeNode
in interfaceNodeManager<Statement>
-
removeNodeAndEdges
Description copied from interface:Graph
remove a node and all its incident edges- Specified by:
removeNodeAndEdges
in interfaceGraph<Statement>
-
removeOutgoingEdges
- Specified by:
removeOutgoingEdges
in interfaceEdgeManager<Statement>
-
toString
-
getClassHierarchy
- Specified by:
getClassHierarchy
in interfaceIClassHierarchyDweller
-