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 TypeMethodDescriptionvoidaddSubgraphForNode(CGNode node) add representation of flow for a node, if not already presentget theSSAInvokeInstructionwhose 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) Iterator<?> Iterator<?> booleanhasSubgraphForNode(CGNode node) booleanvoidvisitPreds(Object node, IFlowLabel.IFlowLabelVisitor v) Apply a visitor to the predecessors of some node.voidvisitSuccs(Object node, IFlowLabel.IFlowLabelVisitor v) Apply a visitor to the successors of some node.Methods inherited from interface EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesModifier and TypeMethodDescriptionvoidintReturn 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 nbooleanvoidremoveAllIncidentEdges(Object node) voidremoveEdge(Object src, Object dst) voidremoveIncomingEdges(Object node) voidremoveOutgoingEdges(Object node) Methods inherited from interface Graph
removeNodeAndEdgesModifier and TypeMethodDescriptionvoidremove a node and all its incident edgesMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface LabeledEdgeManager
addEdge, getDefaultLabel, getEdgeLabels, getPredLabels, getPredNodeCount, getPredNodes, getPredNodes, getSuccLabels, getSuccNodeCount, getSuccNodes, hasEdge, removeEdgeModifier and TypeMethodDescriptionvoidaddEdge(Object src, Object dst, IFlowLabel label) adds an edge with some labelSets the default object used as label for operations where no specific edge label is provided.Set<? extends IFlowLabel> getEdgeLabels(Object src, Object dst) Returns a set of all labeled edges between node src and node dstIterator<? extends IFlowLabel> intgetPredNodeCount(Object N, IFlowLabel label) Return the number ofimmediate predecessornodes of this Node in the Graph on edges with some label.getPredNodes(Object N, Predicate<IFlowLabel> pred) getPredNodes(Object N, IFlowLabel label) Return an Iterator over the immediate predecessor nodes of this Node in the Graph on edges with some label.Iterator<? extends IFlowLabel> intgetSuccNodeCount(Object N, IFlowLabel label) Return the number ofimmediate successornodes of this Node in the GraphgetSuccNodes(Object N, IFlowLabel label) Return an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.booleanhasEdge(Object src, Object dst, IFlowLabel label) voidremoveEdge(Object src, Object dst, IFlowLabel label) Methods inherited from interface NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, streamModifier and TypeMethodDescriptionvoidadd a node to this graphbooleanintiterator()voidremoveNode(Object n) remove a node from this graphstream()
-
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:
trueiffpkis a formal parameter
-
getInstrsPassingParam
- Returns:
- the
SSAInvokeInstructions passing some pointer as a parameter
-
getInstrReturningTo
get theSSAInvokeInstructionwhose return value is assigned to a pointer key.- Returns:
- the instruction, or
nullif no return value is assigned to pk
-
getWritesToStaticField
- Parameters:
sfk- the static field- Returns:
- all the variables whose values are written to sfk
- Throws:
IllegalArgumentException- if sfk == null
-
getReadsOfStaticField
- 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- aPointerKeyrepresenting either a formal parameter or return value- Returns:
- the
CallerSiteContexts 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- aLocalPointerKeycorresponding to the actual parameter or return value of interest. This may be used to filter out certain callees.- Returns:
- the callees of interest
-