Class InterproceduralCFG
java.lang.Object
com.ibm.wala.ipa.cfg.AbstractInterproceduralCFG<ISSABasicBlock>
com.ibm.wala.ipa.cfg.InterproceduralCFG
- All Implemented Interfaces:
EdgeManager<BasicBlockInContext<ISSABasicBlock>>, Graph<BasicBlockInContext<ISSABasicBlock>>, NodeManager<BasicBlockInContext<ISSABasicBlock>>, NumberedEdgeManager<BasicBlockInContext<ISSABasicBlock>>, NumberedGraph<BasicBlockInContext<ISSABasicBlock>>, NumberedNodeManager<BasicBlockInContext<ISSABasicBlock>>, Iterable<BasicBlockInContext<ISSABasicBlock>>
Interprocedural control-flow graph.
TODO: think about a better implementation; perhaps a lazy view of the constituent CFGs Lots of ways this can be optimized?
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class AbstractInterproceduralCFG
addEdge, addEdgesToNonEntryBlock, addNode, callGraphUpdated, containsNode, getCallGraph, getCallSiteForCallBlock, getCallSites, getCallTargets, getCFG, getCGNode, getEntry, getExit, getLastInstructionForBlock, getMaxNumber, getNode, getNumber, getNumberOfNodes, getPredNodeCount, getPredNodeNumbers, getPredNodes, getReturnSites, getSuccNodeCount, getSuccNodeNumbers, getSuccNodes, hasCall, hasCall, hasEdge, isReturn, iterateNodes, iterator, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, stream, toStringModifier and TypeMethodDescriptionvoidprotected voidaddEdgesToNonEntryBlock(CGNode n, ControlFlowGraph<?, ISSABasicBlock> cfg, SSAInstruction[] instrs, ISSABasicBlock bb) Add edges to the IPCFG for the incoming edges incident on a basic block bb.voidadd a node to this graphvoidShould be invoked when the underlying call graph has changed.booleanprotected CallSiteReferencegetCallSiteForCallBlock(IBasicBlock<SSAInstruction> B, ControlFlowGraph<SSAInstruction, ISSABasicBlock> cfg) get theCallSiteReferencecorresponding to the last instruction in B (assumed to be a call)getCallSites(BasicBlockInContext<ISSABasicBlock> returnBlock, CGNode callee) get the basic blocks which are call sites that may call callee and return to returnBlock if callee is null, answer return sites for which no callee was found.protected SSAInstructiongetLastInstructionForBlock(ISSABasicBlock pb, SSAInstruction[] instrs) intgetNode(int number) intintintReturn the number ofimmediate predecessornodes of nReturn anIteratorover the immediate predecessor nodes of ngetReturnSites(BasicBlockInContext<ISSABasicBlock> callBlock) intReturn the number ofimmediate successornodes of this Node in the GraphReturn an Iterator over the immediate successor nodes of nbooleanprotected booleanhasCall(BasicBlockInContext<ISSABasicBlock> B, ControlFlowGraph<SSAInstruction, ISSABasicBlock> cfg) booleanbooleaniterator()voidvoidvoidvoidremove a node from this graphvoidremove a node and all its incident edgesvoidstream()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
InterproceduralCFG
-
InterproceduralCFG
-
-
Method Details
-
getCFG
public ControlFlowGraph<SSAInstruction, ISSABasicBlock> getCFG(CGNode n) throws IllegalArgumentException - Specified by:
getCFGin classAbstractInterproceduralCFG<ISSABasicBlock>- Returns:
- the cfg for n, or null if none found
- Throws:
IllegalArgumentException- if n == null
-