public class ICFGSupergraph extends Object implements ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>
ExplodedInterproceduralCFG
This should lazily build the supergraph as it is explored.CALL_EDGE, CALL_TO_RETURN_EDGE, OTHER, RETURN_EDGE| Modifier | Constructor and Description |
|---|---|
protected |
ICFGSupergraph(ExplodedInterproceduralCFG icfg,
AnalysisCache cache) |
protected ICFGSupergraph(ExplodedInterproceduralCFG icfg, AnalysisCache cache)
public static ICFGSupergraph make(CallGraph cg, AnalysisCache cache)
public com.ibm.wala.util.graph.Graph<? extends CGNode> getProcedureGraph()
getProcedureGraph in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>public IClassHierarchy getClassHierarchy()
public byte classifyEdge(BasicBlockInContext<IExplodedBasicBlock> src, BasicBlockInContext<IExplodedBasicBlock> dest)
classifyEdge in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>src - node in the supergraphdest - a successor of src in the supergraphpublic Iterator<BasicBlockInContext<IExplodedBasicBlock>> getCallSites(BasicBlockInContext<IExplodedBasicBlock> r, CGNode callee)
getCallSites in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>callee - a "called" "procedure" in the supergraph. if callee is null, answer return sites for which no callee was found.public Iterator<? extends BasicBlockInContext<IExplodedBasicBlock>> getCalledNodes(BasicBlockInContext<IExplodedBasicBlock> call)
getCalledNodes in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>call - a "call" node in the supergraphpublic BasicBlockInContext<IExplodedBasicBlock>[] getEntriesForProcedure(CGNode procedure)
getEntriesForProcedure in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>public BasicBlockInContext<IExplodedBasicBlock>[] getExitsForProcedure(CGNode procedure)
getExitsForProcedure in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>public BasicBlockInContext<IExplodedBasicBlock> getLocalBlock(CGNode procedure, int i)
getLocalBlock in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>procedure - an object that represents a procedurei - the "logical" basic block number of a node in the procedurepublic int getLocalBlockNumber(BasicBlockInContext<IExplodedBasicBlock> n)
getLocalBlockNumber in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>n - a node in the supergraphpublic BasicBlockInContext<IExplodedBasicBlock> getMainEntry()
public Iterator<BasicBlockInContext<IExplodedBasicBlock>> getNormalSuccessors(BasicBlockInContext<IExplodedBasicBlock> call)
getNormalSuccessors in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>call - a "call" node in the supergraphpublic int getNumberOfBlocks(CGNode procedure)
getNumberOfBlocks in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>procedure - an object that represents a procedurepublic CGNode getProcOf(BasicBlockInContext<IExplodedBasicBlock> n)
getProcOf in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>n - a node in the supergraphpublic Iterator<? extends BasicBlockInContext<IExplodedBasicBlock>> getReturnSites(BasicBlockInContext<IExplodedBasicBlock> call, CGNode callee)
getReturnSites in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>call - a "call" node in the supergraphcallee - a "called" "procedure" in the supergraph. if callee is null, answer return sites for which no callee was found.public boolean isCall(BasicBlockInContext<IExplodedBasicBlock> n)
isCall in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>n - a node in this supergraphpublic boolean isEntry(BasicBlockInContext<IExplodedBasicBlock> n)
isEntry in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>public boolean isExit(BasicBlockInContext<IExplodedBasicBlock> n)
isExit in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>n - a node in the supergraphpublic boolean isReturn(BasicBlockInContext<IExplodedBasicBlock> n)
isReturn in interface ISupergraph<BasicBlockInContext<IExplodedBasicBlock>,CGNode>n - a node in this supergraphpublic void removeNodeAndEdges(BasicBlockInContext<IExplodedBasicBlock> N) throws UnsupportedOperationException
removeNodeAndEdges in interface com.ibm.wala.util.graph.Graph<BasicBlockInContext<IExplodedBasicBlock>>UnsupportedOperationExceptionpublic void addNode(BasicBlockInContext<IExplodedBasicBlock> n)
addNode in interface com.ibm.wala.util.graph.NodeManager<BasicBlockInContext<IExplodedBasicBlock>>public boolean containsNode(BasicBlockInContext<IExplodedBasicBlock> N)
containsNode in interface com.ibm.wala.util.graph.NodeManager<BasicBlockInContext<IExplodedBasicBlock>>public int getNumberOfNodes()
getNumberOfNodes in interface com.ibm.wala.util.graph.NodeManager<BasicBlockInContext<IExplodedBasicBlock>>public Iterator<BasicBlockInContext<IExplodedBasicBlock>> iterator()
iterator in interface com.ibm.wala.util.graph.NodeManager<BasicBlockInContext<IExplodedBasicBlock>>iterator in interface Iterable<BasicBlockInContext<IExplodedBasicBlock>>public void removeNode(BasicBlockInContext<IExplodedBasicBlock> n)
removeNode in interface com.ibm.wala.util.graph.NodeManager<BasicBlockInContext<IExplodedBasicBlock>>public void addEdge(BasicBlockInContext<IExplodedBasicBlock> src, BasicBlockInContext<IExplodedBasicBlock> dst)
addEdge in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>public int getPredNodeCount(BasicBlockInContext<IExplodedBasicBlock> N)
getPredNodeCount in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>public Iterator<BasicBlockInContext<IExplodedBasicBlock>> getPredNodes(BasicBlockInContext<IExplodedBasicBlock> N)
getPredNodes in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>public int getSuccNodeCount(BasicBlockInContext<IExplodedBasicBlock> N)
getSuccNodeCount in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>public Iterator<BasicBlockInContext<IExplodedBasicBlock>> getSuccNodes(BasicBlockInContext<IExplodedBasicBlock> N)
getSuccNodes in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>public boolean hasEdge(BasicBlockInContext<IExplodedBasicBlock> src, BasicBlockInContext<IExplodedBasicBlock> dst)
hasEdge in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>public void removeAllIncidentEdges(BasicBlockInContext<IExplodedBasicBlock> node) throws UnsupportedOperationException
removeAllIncidentEdges in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>UnsupportedOperationExceptionpublic void removeEdge(BasicBlockInContext<IExplodedBasicBlock> src, BasicBlockInContext<IExplodedBasicBlock> dst) throws UnsupportedOperationException
removeEdge in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>UnsupportedOperationExceptionpublic void removeIncomingEdges(BasicBlockInContext<IExplodedBasicBlock> node) throws UnsupportedOperationException
removeIncomingEdges in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>UnsupportedOperationExceptionpublic void removeOutgoingEdges(BasicBlockInContext<IExplodedBasicBlock> node) throws UnsupportedOperationException
removeOutgoingEdges in interface com.ibm.wala.util.graph.EdgeManager<BasicBlockInContext<IExplodedBasicBlock>>UnsupportedOperationExceptionpublic int getMaxNumber()
getMaxNumber in interface com.ibm.wala.util.graph.NumberedNodeManager<BasicBlockInContext<IExplodedBasicBlock>>public BasicBlockInContext<IExplodedBasicBlock> getNode(int number)
getNode in interface com.ibm.wala.util.graph.NumberedNodeManager<BasicBlockInContext<IExplodedBasicBlock>>public int getNumber(BasicBlockInContext<IExplodedBasicBlock> N)
getNumber in interface com.ibm.wala.util.graph.NumberedNodeManager<BasicBlockInContext<IExplodedBasicBlock>>public Iterator<BasicBlockInContext<IExplodedBasicBlock>> iterateNodes(com.ibm.wala.util.intset.IntSet s)
iterateNodes in interface com.ibm.wala.util.graph.NumberedNodeManager<BasicBlockInContext<IExplodedBasicBlock>>public com.ibm.wala.util.intset.IntSet getPredNodeNumbers(BasicBlockInContext<IExplodedBasicBlock> node)
getPredNodeNumbers in interface com.ibm.wala.util.graph.NumberedEdgeManager<BasicBlockInContext<IExplodedBasicBlock>>public com.ibm.wala.util.intset.IntSet getSuccNodeNumbers(BasicBlockInContext<IExplodedBasicBlock> node)
getSuccNodeNumbers in interface com.ibm.wala.util.graph.NumberedEdgeManager<BasicBlockInContext<IExplodedBasicBlock>>public ControlFlowGraph<SSAInstruction,IExplodedBasicBlock> getCFG(BasicBlockInContext<IExplodedBasicBlock> node)
public ExplodedInterproceduralCFG getICFG()
Copyright © 2015. All rights reserved.