|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.ipa.cfg.AbstractInterproceduralCFG<T>
public abstract class AbstractInterproceduralCFG<T extends ISSABasicBlock>
Interprocedural control-flow graph, constructed lazily.
| Constructor Summary | |
|---|---|
AbstractInterproceduralCFG(CallGraph cg)
Build an Interprocedural CFG from a call graph. |
|
AbstractInterproceduralCFG(CallGraph CG,
Filter<CGNode> relevant)
Build an Interprocedural CFG from a call graph. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractInterproceduralCFG(CallGraph cg)
cg - the call graph
public AbstractInterproceduralCFG(CallGraph CG,
Filter<CGNode> relevant)
CG - the call graphrelevant - a filter which accepts those call graph nodes which should be included in the I-CFG. Other nodes are ignored.| Method Detail |
|---|
public void callGraphUpdated()
public abstract ControlFlowGraph<SSAInstruction,T> getCFG(CGNode n)
protected void addEdgesToNonEntryBlock(CGNode n,
ControlFlowGraph<?,T> cfg,
SSAInstruction[] instrs,
T bb)
n - a call graph nodecfg - the CFG for ninstrs - the instructions for node nbb - a basic block in the CFG
protected SSAInstruction getLastInstructionForBlock(T pb,
SSAInstruction[] instrs)
public ControlFlowGraph<SSAInstruction,T> getCFG(BasicBlockInContext B)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if B == null
public CGNode getCGNode(BasicBlockInContext B)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if B == null
public void removeNodeAndEdges(BasicBlockInContext N)
throws java.lang.UnsupportedOperationException
Graph
removeNodeAndEdges in interface Graph<BasicBlockInContext<T extends ISSABasicBlock>>java.lang.UnsupportedOperationException - if the graph implementation does not allow removalpublic java.util.Iterator<BasicBlockInContext<T>> iterator()
iterator in interface NodeManager<BasicBlockInContext<T extends ISSABasicBlock>>iterator in interface java.lang.Iterable<BasicBlockInContext<T extends ISSABasicBlock>>Iterator of the nodes in this graphpublic int getNumberOfNodes()
getNumberOfNodes in interface NodeManager<BasicBlockInContext<T extends ISSABasicBlock>>
public void addNode(BasicBlockInContext n)
throws java.lang.UnsupportedOperationException
NodeManager
addNode in interface NodeManager<BasicBlockInContext<T extends ISSABasicBlock>>java.lang.UnsupportedOperationException
public void removeNode(BasicBlockInContext n)
throws java.lang.UnsupportedOperationException
NodeManager
removeNode in interface NodeManager<BasicBlockInContext<T extends ISSABasicBlock>>java.lang.UnsupportedOperationExceptionpublic java.util.Iterator<BasicBlockInContext<T>> getPredNodes(BasicBlockInContext<T> N)
EdgeManagerIterator over the immediate predecessor nodes of n
This method never returns null.
getPredNodes in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>Iterator over the immediate predecessor nodes of this Node.public int getPredNodeCount(BasicBlockInContext<T> N)
EdgeManagerimmediate predecessor nodes of n
getPredNodeCount in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>public java.util.Iterator<BasicBlockInContext<T>> getSuccNodes(BasicBlockInContext<T> N)
EdgeManager
This method never returns null.
getSuccNodes in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>public int getSuccNodeCount(BasicBlockInContext<T> N)
EdgeManagerimmediate successor nodes of this Node in the Graph
getSuccNodeCount in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>
public void addEdge(BasicBlockInContext src,
BasicBlockInContext dst)
throws java.lang.UnsupportedOperationException
addEdge in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>java.lang.UnsupportedOperationException
public void removeEdge(BasicBlockInContext src,
BasicBlockInContext dst)
throws java.lang.UnsupportedOperationException
removeEdge in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>java.lang.UnsupportedOperationException
public void removeAllIncidentEdges(BasicBlockInContext node)
throws java.lang.UnsupportedOperationException
removeAllIncidentEdges in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>java.lang.UnsupportedOperationExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean containsNode(BasicBlockInContext<T> N)
containsNode in interface NodeManager<BasicBlockInContext<T extends ISSABasicBlock>>public boolean hasCall(BasicBlockInContext<T> B)
B -
protected boolean hasCall(BasicBlockInContext<T> B,
ControlFlowGraph<SSAInstruction,T> cfg)
public java.util.Set<CGNode> getCallTargets(BasicBlockInContext<T> B)
B -
java.lang.IllegalArgumentException - if B is null
protected CallSiteReference getCallSiteForCallBlock(IBasicBlock<SSAInstruction> B,
ControlFlowGraph<SSAInstruction,T> cfg)
CallSiteReference corresponding to the last instruction in B (assumed to be a call)
public void removeIncomingEdges(BasicBlockInContext node)
throws java.lang.UnsupportedOperationException
removeIncomingEdges in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>java.lang.UnsupportedOperationException
public void removeOutgoingEdges(BasicBlockInContext node)
throws java.lang.UnsupportedOperationException
removeOutgoingEdges in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>java.lang.UnsupportedOperationException
public boolean hasEdge(BasicBlockInContext<T> src,
BasicBlockInContext<T> dst)
hasEdge in interface EdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>public int getNumber(BasicBlockInContext<T> N)
getNumber in interface NumberedNodeManager<BasicBlockInContext<T extends ISSABasicBlock>>
public BasicBlockInContext<T> getNode(int number)
throws UnimplementedError
getNode in interface NumberedNodeManager<BasicBlockInContext<T extends ISSABasicBlock>>UnimplementedErrorpublic int getMaxNumber()
getMaxNumber in interface NumberedNodeManager<BasicBlockInContext<T extends ISSABasicBlock>>
public java.util.Iterator<BasicBlockInContext<T>> iterateNodes(IntSet s)
throws UnimplementedError
iterateNodes in interface NumberedNodeManager<BasicBlockInContext<T extends ISSABasicBlock>>UnimplementedErrorpublic IntSet getSuccNodeNumbers(BasicBlockInContext<T> node)
getSuccNodeNumbers in interface NumberedEdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>public IntSet getPredNodeNumbers(BasicBlockInContext<T> node)
getPredNodeNumbers in interface NumberedEdgeManager<BasicBlockInContext<T extends ISSABasicBlock>>public BasicBlockInContext<T> getEntry(CGNode n)
public BasicBlockInContext<T> getExit(CGNode n)
public java.util.Iterator<BasicBlockInContext<T>> getReturnSites(BasicBlockInContext<T> callBlock)
callBlock - node in the IPCFG that ends in a call
java.lang.IllegalArgumentException - if bb is null
public java.util.Iterator<BasicBlockInContext<T>> getCallSites(BasicBlockInContext<T> returnBlock,
CGNode callee)
public boolean isReturn(BasicBlockInContext<T> bb)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic CallGraph getCallGraph()
CallGraph used to build this ICFG
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||