Class DemandValueFlowGraph
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
com.ibm.wala.demandpa.flowgraph.DemandValueFlowGraph
- 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>
A flow graph including both pointer and primitive values.
TODO share more code with DemandPointerFlowGraph
- Author:
- Manu Sridharan
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractDemandFlowGraph
AbstractDemandFlowGraph.FlowStatementVisitorModifier and TypeClassDescriptionprotected static interface -
Field Summary
Fields inherited from class AbstractFlowGraph
callDefs, callParams, cg, cha, heapModel, mam, params, returnsModifier and TypeFieldDescriptionprotected final Map<PointerKey, SSAAbstractInvokeInstruction> Map: LocalPointerKey -> SSAInvokeInstruction.protected final Map<PointerKey, Set<SSAAbstractInvokeInstruction>> protected final CallGraphprotected final IClassHierarchyprotected final HeapModelprotected final MemoryAccessMapprotected final Map<PointerKey, CGNode> Map: LocalPointerKey -> CGNode.protected final Map<PointerKey, CGNode> Map:LocalPointerKey->CGNode. -
Constructor Summary
ConstructorsConstructorDescriptionDemandValueFlowGraph(CallGraph cg, HeapModel heapModel, MemoryAccessMap mam, ClassHierarchy cha) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddNodesForParameters(CGNode node, IR ir) makeVisitor(CGNode node) Methods inherited from class AbstractDemandFlowGraph
addBlockInstructionConstraints, addNodeInstructionConstraints, addSubgraphForNode, getParamPreds, getParamSuccs, getPossibleTargets, getPotentialCallers, getReturnPreds, getReturnSuccs, hasSubgraphForNode, unconditionallyAddConstraintsFromNodeModifier 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 nodevoidaddSubgraphForNode(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 voidunconditionallyAddConstraintsFromNode(CGNode node, IR ir) Methods inherited from class AbstractFlowGraph
addExceptionDefConstraints, addNodeConstantConstraints, addNodePassthruExceptionConstraints, addNodesForInvocations, convertPointerKeyToHeapModel, getArrayReads, getInstrReturningTo, getInstrsPassingParam, getReadsOfInstanceField, getReadsOfStaticField, getWritesToInstanceField, getWritesToStaticField, isParam, visitPreds, visitSuccsModifier and TypeMethodDescriptionprotected voidaddExceptionDefConstraints(IR ir, CGNode node, List<ProgramCounter> peis, PointerKey exceptionVar, Set<IClass> catchClasses) Generate constraints which assign exception values into an exception pointerprotected voidaddNodeConstantConstraints(CGNode node, IR ir) add constraints for reference constants assigned to varsprotected voidaddNodePassthruExceptionConstraints(CGNode node, IR ir) Add constraints to represent the flow of exceptions to the exceptional return value for this nodeprotected voidaddNodesForInvocations(CGNode node, IR ir) For each invocation in the method, add nodes for actual parameters and return valuesstatic PointerKeyconvert a pointer key to one in the memory access map's heap modelprotected Iterator<PointerKey> getArrayReads(PointerKey arrayRef) get theSSAInvokeInstructionwhose return value is assigned to a pointer key.Iterator<?> Iterator<?> 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 class SlowSparseNumberedLabeledGraph
copyInto, duplicate, getEdgeManager, getNodeManagerModifier and TypeMethodDescriptionstatic <T,U> void copyInto(LabeledGraph<T, U> g, LabeledGraph<T, U> into) static <T,U> SlowSparseNumberedLabeledGraph <T, U> duplicate(LabeledGraph<T, U> g) protected NumberedLabeledEdgeManager<Object, IFlowLabel> protected NumberedNodeManager<Object> Methods inherited from class AbstractNumberedLabeledGraph
addEdge, edgeString, getDefaultLabel, getEdgeLabels, getPredLabels, getPredNodeCount, getPredNodeNumbers, getPredNodes, getSuccLabels, getSuccNodeCount, getSuccNodeNumbers, getSuccNodes, hasEdge, removeEdgeModifier and TypeMethodDescriptionvoidaddEdge(Object src, Object dst, IFlowLabel label) adds an edge with some labelprotected StringedgeString(Object from, Object to) Sets 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.getPredNodeNumbers(Object node, IFlowLabel label) 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 GraphgetSuccNodeNumbers(Object node, IFlowLabel label) getSuccNodes(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 class AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodesModifier and TypeMethodDescriptionintgetNode(int number) intgetPredNodeNumbers(Object node) getSuccNodeNumbers(Object node) Methods inherited from class AbstractGraph
addEdge, addNode, containsNode, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, stream, toStringModifier and TypeMethodDescriptionvoidvoidadd a node to this graphbooleanintintReturn 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 nbooleaniterator()protected StringnodeString(Object n, boolean forEdge) voidremoveAllIncidentEdges(Object node) voidremoveEdge(Object src, Object dst) voidremoveIncomingEdges(Object node) voidremoveNode(Object n) remove a node from this graphvoidremove a node and all its incident edgesvoidremoveOutgoingEdges(Object node) stream()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface LabeledEdgeManager
getPredNodes
-
Constructor Details
-
DemandValueFlowGraph
public DemandValueFlowGraph(CallGraph cg, HeapModel heapModel, MemoryAccessMap mam, ClassHierarchy cha)
-
-
Method Details
-
addNodesForParameters
- Specified by:
addNodesForParametersin classAbstractDemandFlowGraph
-
makeVisitor
- Specified by:
makeVisitorin classAbstractDemandFlowGraph
-