Class AbstractDemandFlowGraph
java.lang.Object
com.ibm.wala.util.graph.AbstractGraph<Object>
com.ibm.wala.util.graph.AbstractNumberedGraph<Object>
com.ibm.wala.util.graph.labeled.AbstractNumberedLabeledGraph<Object, IFlowLabel>
com.ibm.wala.util.graph.labeled.SlowSparseNumberedLabeledGraph<Object, IFlowLabel>
com.ibm.wala.demandpa.flowgraph.AbstractFlowGraph
com.ibm.wala.demandpa.flowgraph.AbstractDemandFlowGraph
- All Implemented Interfaces:
IFlowGraph, EdgeManager<Object>, Graph<Object>, LabeledEdgeManager<Object, IFlowLabel>, LabeledGraph<Object, IFlowLabel>, NumberedLabeledEdgeManager<Object, IFlowLabel>, NumberedLabeledGraph<Object, IFlowLabel>, NodeManager<Object>, NumberedEdgeManager<Object>, NumberedGraph<Object>, NumberedNodeManager<Object>, Serializable, Iterable<Object>
- Direct Known Subclasses:
DemandPointerFlowGraph, DemandValueFlowGraph
A graph representing program flow, constructed method-by-method on demand
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface -
Field Summary
Fields inherited from class AbstractFlowGraph
callDefs, callParams, cg, cha, heapModel, mam, params, returns -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDemandFlowGraph(CallGraph cg, HeapModel heapModel, MemoryAccessMap mam, IClassHierarchy cha) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddBlockInstructionConstraints(CGNode node, ControlFlowGraph<SSAInstruction, ISSABasicBlock> cfg, ISSABasicBlock b, AbstractDemandFlowGraph.FlowStatementVisitor v) Add constraints for a particular basic block.protected voidaddNodeInstructionConstraints(CGNode node, IR ir) Add pointer flow constraints based on instructions in a given nodeprotected abstract voidaddNodesForParameters(CGNode node, IR ir) voidaddSubgraphForNode(CGNode node) add representation of flow for a node, if not already presentgetPossibleTargets(CGNode node, CallSiteReference site, LocalPointerKey actualPk) get the callees that should be considered at a particular call sitegetPotentialCallers(PointerKey formalPk) booleanhasSubgraphForNode(CGNode node) protected abstract AbstractDemandFlowGraph.FlowStatementVisitormakeVisitor(CGNode node) protected voidunconditionallyAddConstraintsFromNode(CGNode node, IR ir) Methods inherited from class AbstractFlowGraph
addExceptionDefConstraints, addNodeConstantConstraints, addNodePassthruExceptionConstraints, addNodesForInvocations, convertPointerKeyToHeapModel, getArrayReads, getInstrReturningTo, getInstrsPassingParam, getReadsOfInstanceField, getReadsOfStaticField, getWritesToInstanceField, getWritesToStaticField, isParam, visitPreds, visitSuccsMethods inherited from class SlowSparseNumberedLabeledGraph
copyInto, duplicate, getEdgeManager, getNodeManagerMethods inherited from class AbstractNumberedLabeledGraph
addEdge, edgeString, getDefaultLabel, getEdgeLabels, getPredLabels, getPredNodeCount, getPredNodeNumbers, getPredNodes, getSuccLabels, getSuccNodeCount, getSuccNodeNumbers, getSuccNodes, hasEdge, removeEdgeMethods inherited from class AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodesMethods inherited from class AbstractGraph
addEdge, addNode, containsNode, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, stream, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesMethods inherited from interface Graph
removeNodeAndEdgesMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface LabeledEdgeManager
addEdge, getDefaultLabel, getEdgeLabels, getPredLabels, getPredNodeCount, getPredNodes, getPredNodes, getSuccLabels, getSuccNodeCount, getSuccNodes, hasEdge, removeEdgeMethods inherited from interface NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, streamMethods inherited from interface NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbersMethods inherited from interface NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
-
Constructor Details
-
AbstractDemandFlowGraph
public AbstractDemandFlowGraph(CallGraph cg, HeapModel heapModel, MemoryAccessMap mam, IClassHierarchy cha)
-
-
Method Details
-
addSubgraphForNode
Description copied from interface:IFlowGraphadd representation of flow for a node, if not already present- Throws:
IllegalArgumentException- if node == null- See Also:
-
hasSubgraphForNode
- See Also:
-
getParamSuccs
- See Also:
-
getParamPreds
- See Also:
-
getReturnSuccs
- See Also:
-
getReturnPreds
- See Also:
-
addNodesForParameters
-
unconditionallyAddConstraintsFromNode
-
addNodeInstructionConstraints
-
addBlockInstructionConstraints
protected void addBlockInstructionConstraints(CGNode node, ControlFlowGraph<SSAInstruction, ISSABasicBlock> cfg, ISSABasicBlock b, AbstractDemandFlowGraph.FlowStatementVisitor v) Add constraints for a particular basic block. -
makeVisitor
-
getPotentialCallers
- Parameters:
formalPk- aPointerKeyrepresenting either a formal parameter or return value- Returns:
- the
CallerSiteContexts representing pointer callers offormalPk's method
-
getPossibleTargets
public Set<CGNode> getPossibleTargets(CGNode node, CallSiteReference site, LocalPointerKey actualPk) Description copied from interface:IFlowGraphget the callees that should be considered at a particular call site- Parameters:
node- 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
-