Package com.ibm.wala.demandpa.flowgraph
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
public interface IFlowGraph extends LabeledGraph<Object,IFlowLabel>
-
-
Method Summary
-
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, getSuccLabels, getSuccNodeCount, getSuccNodes, hasEdge, removeEdge
-
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode
-
-
-
-
Method Detail
-
visitSuccs
void visitSuccs(Object node, IFlowLabel.IFlowLabelVisitor v)
Apply a visitor to the successors of some node.
-
visitPreds
void visitPreds(Object node, IFlowLabel.IFlowLabelVisitor v)
Apply a visitor to the predecessors of some node.
-
addSubgraphForNode
void addSubgraphForNode(CGNode node) throws IllegalArgumentException
add representation of flow for a node, if not already present- Throws:
IllegalArgumentException
- if node == null
-
hasSubgraphForNode
boolean hasSubgraphForNode(CGNode node)
-
isParam
boolean isParam(LocalPointerKey pk)
- Parameters:
pk
-- Returns:
true
iffpk
is a formal parameter
-
getInstrsPassingParam
Iterator<SSAAbstractInvokeInstruction> getInstrsPassingParam(LocalPointerKey pk)
- Parameters:
pk
-- Returns:
- the
SSAInvokeInstruction
s passing some pointer as a parameter
-
getInstrReturningTo
SSAAbstractInvokeInstruction getInstrReturningTo(LocalPointerKey pk)
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
Iterator<PointerKey> getWritesToInstanceField(PointerKey pk, IField f)
-
getReadsOfInstanceField
Iterator<PointerKey> getReadsOfInstanceField(PointerKey pk, IField f)
-
getPotentialCallers
Set<CallerSiteContext> getPotentialCallers(PointerKey formalPk)
- Parameters:
formalPk
- aPointerKey
representing either a formal parameter or return value- Returns:
- the
CallerSiteContext
s representing pointer callers offormalPk
's method
-
getPossibleTargets
Set<CGNode> getPossibleTargets(CGNode caller, CallSiteReference site, LocalPointerKey actualPk)
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
-
-