Package com.ibm.wala.analysis.pointers
Class HeapGraphImpl<T extends InstanceKey>
- java.lang.Object
-
- com.ibm.wala.analysis.pointers.HeapGraphImpl<T>
-
- All Implemented Interfaces:
HeapGraph<T>
,EdgeManager<Object>
,Graph<Object>
,NodeManager<Object>
,NumberedEdgeManager<Object>
,NumberedGraph<Object>
,NumberedNodeManager<Object>
,Iterable<Object>
- Direct Known Subclasses:
BasicHeapGraph
public abstract class HeapGraphImpl<T extends InstanceKey> extends Object implements HeapGraph<T>
AGraph
view of a pointer analysis solution. Nodes in the Graph arePointerKey
s andInstanceKey
s. There is an edge from a PointerKey P to an InstanceKey I iff the PointerAnalysis indicates that P may point to I. There is an edge from an InstanceKey I to a PointerKey P iff - P represents a field of an object instance modeled by I, or - P represents the array contents of array instance I.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HeapGraphImpl(PointerAnalysis<T> pa)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HeapModel
getHeapModel()
PointerAnalysis<T>
getPointerAnalysis()
Collection<Object>
getReachableInstances(Set<Object> roots)
Iterator<Object>
iterateNodes(IntSet s)
void
removeNodeAndEdges(Object N)
remove a node and all its incident edges-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode
-
Methods inherited from interface com.ibm.wala.util.graph.NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbers
-
Methods inherited from interface com.ibm.wala.util.graph.NumberedNodeManager
getMaxNumber, getNode, getNumber
-
-
-
-
Constructor Detail
-
HeapGraphImpl
protected HeapGraphImpl(PointerAnalysis<T> pa)
-
-
Method Detail
-
iterateNodes
public Iterator<Object> iterateNodes(IntSet s)
- Specified by:
iterateNodes
in interfaceNumberedNodeManager<T extends InstanceKey>
- Returns:
- iterator of nodes with the numbers in set s
-
getReachableInstances
public Collection<Object> getReachableInstances(Set<Object> roots)
- Specified by:
getReachableInstances
in interfaceHeapGraph<T extends InstanceKey>
-
removeNodeAndEdges
public void removeNodeAndEdges(Object N) throws UnsupportedOperationException
Description copied from interface:Graph
remove a node and all its incident edges- Specified by:
removeNodeAndEdges
in interfaceGraph<T extends InstanceKey>
- Throws:
UnsupportedOperationException
- if the graph implementation does not allow removal
-
getHeapModel
public HeapModel getHeapModel()
- Specified by:
getHeapModel
in interfaceHeapGraph<T extends InstanceKey>
- Returns:
- the heap model used in this pointer analysis.
-
getPointerAnalysis
public PointerAnalysis<T> getPointerAnalysis()
- Specified by:
getPointerAnalysis
in interfaceHeapGraph<T extends InstanceKey>
-
-