Interface IFlowGraph
- All Superinterfaces:
EdgeManager<Object>
,Graph<Object>
,Iterable<Object>
,LabeledEdgeManager<Object,
,IFlowLabel> LabeledGraph<Object,
,IFlowLabel> NodeManager<Object>
- All Known Implementing Classes:
AbstractDemandFlowGraph
,AbstractFlowGraph
,DemandPointerFlowGraph
,DemandValueFlowGraph
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSubgraphForNode
(CGNode node) add representation of flow for a node, if not already presentget theSSAInvokeInstruction
whose return value is assigned to a pointer key.getPossibleTargets
(CGNode caller, CallSiteReference site, LocalPointerKey actualPk) get the callees that should be considered at a particular call sitegetPotentialCallers
(PointerKey formalPk) boolean
hasSubgraphForNode
(CGNode node) boolean
void
visitPreds
(Object node, IFlowLabel.IFlowLabelVisitor v) Apply a visitor to the predecessors of some node.void
visitSuccs
(Object node, IFlowLabel.IFlowLabelVisitor v) Apply a visitor to the successors of some node.Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
Methods inherited from interface com.ibm.wala.util.graph.Graph
removeNodeAndEdges
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.ibm.wala.util.graph.labeled.LabeledEdgeManager
addEdge, getDefaultLabel, getEdgeLabels, getPredLabels, getPredNodeCount, getPredNodes, getPredNodes, getSuccLabels, getSuccNodeCount, getSuccNodes, hasEdge, removeEdge
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, stream
-
Method Details
-
visitSuccs
Apply a visitor to the successors of some node. -
visitPreds
Apply a visitor to the predecessors of some node. -
addSubgraphForNode
add representation of flow for a node, if not already present- Throws:
IllegalArgumentException
- if node == null
-
hasSubgraphForNode
-
isParam
- Returns:
true
iffpk
is a formal parameter
-
getInstrsPassingParam
- Returns:
- the
SSAInvokeInstruction
s passing some pointer as a parameter
-
getInstrReturningTo
get theSSAInvokeInstruction
whose return value is assigned to a pointer key.- Returns:
- the instruction, or
null
if no return value is assigned to pk
-
getWritesToStaticField
Iterator<? extends Object> getWritesToStaticField(StaticFieldKey sfk) throws IllegalArgumentException - Parameters:
sfk
- the static field- Returns:
- all the variables whose values are written to sfk
- Throws:
IllegalArgumentException
- if sfk == null
-
getReadsOfStaticField
Iterator<? extends Object> getReadsOfStaticField(StaticFieldKey sfk) throws IllegalArgumentException - Parameters:
sfk
- the static field- Returns:
- all the variables that get the value of sfk
- Throws:
IllegalArgumentException
- if sfk == null
-
getWritesToInstanceField
-
getReadsOfInstanceField
-
getPotentialCallers
- Parameters:
formalPk
- aPointerKey
representing either a formal parameter or return value- Returns:
- the
CallerSiteContext
s representing pointer callers offormalPk
's method
-
getPossibleTargets
get the callees that should be considered at a particular call site- Parameters:
caller
- the callersite
- the call siteactualPk
- aLocalPointerKey
corresponding to the actual parameter or return value of interest. This may be used to filter out certain callees.- Returns:
- the callees of interest
-