public class BackwardsSupergraph<T,P> extends Object implements ISupergraph<T,P>
CALL_EDGE, CALL_TO_RETURN_EDGE, OTHER, RETURN_EDGE| Modifier | Constructor and Description |
|---|---|
protected |
BackwardsSupergraph(ISupergraph<T,P> forwardGraph) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(Object src,
Object dst) |
void |
addNode(Object n) |
byte |
classifyEdge(T src,
T dest) |
boolean |
containsNode(T N) |
Iterator<T> |
getCalledNodes(T ret)
get the "called" (sic) nodes for a return site; i.e., the exit nodes that flow directly to this return site.
|
Iterator<? extends T> |
getCallSites(T r,
P callee) |
T[] |
getEntriesForProcedure(P object) |
T[] |
getExitsForProcedure(P object) |
T |
getLocalBlock(P procedure,
int i) |
int |
getLocalBlockNumber(T n) |
int |
getMaxNumber() |
T |
getNode(int number) |
Iterator<T> |
getNormalSuccessors(T ret)
get the "normal" successors (sic) for a return site; i.e., the "normal" CFG predecessors that are not call nodes.
|
int |
getNumber(T N) |
int |
getNumberOfBlocks(P procedure) |
int |
getNumberOfNodes() |
int |
getPredNodeCount(T N) |
com.ibm.wala.util.intset.IntSet |
getPredNodeNumbers(Object node) |
Iterator<T> |
getPredNodes(T N) |
com.ibm.wala.util.graph.Graph<? extends P> |
getProcedureGraph()
TODO: for now, this is not inverted.
|
P |
getProcOf(T n) |
Iterator<? extends T> |
getReturnSites(T c,
P callee) |
int |
getSuccNodeCount(T N) |
com.ibm.wala.util.intset.IntSet |
getSuccNodeNumbers(T node) |
Iterator<T> |
getSuccNodes(T N) |
boolean |
hasEdge(T src,
T dst) |
boolean |
isCall(T n) |
boolean |
isEntry(T n) |
boolean |
isExit(T n) |
boolean |
isReturn(T n) |
Iterator<T> |
iterateNodes(com.ibm.wala.util.intset.IntSet s) |
Iterator<T> |
iterator() |
static <T,P> BackwardsSupergraph<T,P> |
make(ISupergraph<T,P> forwardGraph) |
void |
removeAllIncidentEdges(Object node) |
void |
removeEdge(Object src,
Object dst) |
void |
removeIncomingEdges(Object node) |
void |
removeNode(Object n) |
void |
removeNodeAndEdges(Object N) |
void |
removeOutgoingEdges(T node) |
String |
toString() |
protected BackwardsSupergraph(ISupergraph<T,P> forwardGraph)
forwardGraph - the graph to ``reverse''public static <T,P> BackwardsSupergraph<T,P> make(ISupergraph<T,P> forwardGraph)
public com.ibm.wala.util.graph.Graph<? extends P> getProcedureGraph()
getProcedureGraph in interface ISupergraph<T,P>ISupergraph.getProcedureGraph()public boolean isCall(T n)
isCall in interface ISupergraph<T,P>n - a node in this supergraphpublic Iterator<T> getCalledNodes(T ret)
getCalledNodes in interface ISupergraph<T,P>ret - a "call" node in the supergraphISupergraph.getCalledNodes(java.lang.Object)public Iterator<T> getNormalSuccessors(T ret)
getNormalSuccessors in interface ISupergraph<T,P>ret - a "call" node in the supergraphISupergraph.getCalledNodes(java.lang.Object)public Iterator<? extends T> getReturnSites(T c, P callee)
getReturnSites in interface ISupergraph<T,P>c - 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 isExit(T n)
isExit in interface ISupergraph<T,P>n - a node in the supergraphpublic P getProcOf(T n)
getProcOf in interface ISupergraph<T,P>n - a node in the supergraphpublic void removeNodeAndEdges(Object N) throws UnsupportedOperationException
removeNodeAndEdges in interface com.ibm.wala.util.graph.Graph<T>UnsupportedOperationExceptionpublic int getNumberOfNodes()
getNumberOfNodes in interface com.ibm.wala.util.graph.NodeManager<T>public void addNode(Object n) throws UnsupportedOperationException
addNode in interface com.ibm.wala.util.graph.NodeManager<T>UnsupportedOperationExceptionpublic void removeNode(Object n) throws UnsupportedOperationException
removeNode in interface com.ibm.wala.util.graph.NodeManager<T>UnsupportedOperationExceptionpublic boolean containsNode(T N)
containsNode in interface com.ibm.wala.util.graph.NodeManager<T>public Iterator<T> getPredNodes(T N)
getPredNodes in interface com.ibm.wala.util.graph.EdgeManager<T>public int getPredNodeCount(T N)
getPredNodeCount in interface com.ibm.wala.util.graph.EdgeManager<T>public Iterator<T> getSuccNodes(T N)
getSuccNodes in interface com.ibm.wala.util.graph.EdgeManager<T>public boolean hasEdge(T src, T dst)
hasEdge in interface com.ibm.wala.util.graph.EdgeManager<T>public int getSuccNodeCount(T N)
getSuccNodeCount in interface com.ibm.wala.util.graph.EdgeManager<T>public void addEdge(Object src, Object dst) throws UnsupportedOperationException
addEdge in interface com.ibm.wala.util.graph.EdgeManager<T>UnsupportedOperationExceptionpublic void removeEdge(Object src, Object dst) throws UnsupportedOperationException
removeEdge in interface com.ibm.wala.util.graph.EdgeManager<T>UnsupportedOperationExceptionpublic void removeAllIncidentEdges(Object node) throws UnsupportedOperationException
removeAllIncidentEdges in interface com.ibm.wala.util.graph.EdgeManager<T>UnsupportedOperationExceptionpublic T[] getEntriesForProcedure(P object)
getEntriesForProcedure in interface ISupergraph<T,P>public T[] getExitsForProcedure(P object)
getExitsForProcedure in interface ISupergraph<T,P>public boolean isReturn(T n) throws com.ibm.wala.util.debug.UnimplementedError
isReturn in interface ISupergraph<T,P>n - a node in this supergraphcom.ibm.wala.util.debug.UnimplementedErrorpublic Iterator<? extends T> getCallSites(T r, P callee)
getCallSites in interface ISupergraph<T,P>callee - a "called" "procedure" in the supergraph. if callee is null, answer return sites for which no callee was found.public boolean isEntry(T n)
isEntry in interface ISupergraph<T,P>public byte classifyEdge(T src, T dest)
classifyEdge in interface ISupergraph<T,P>src - node in the supergraphdest - a successor of src in the supergraphpublic void removeIncomingEdges(Object node) throws UnsupportedOperationException
removeIncomingEdges in interface com.ibm.wala.util.graph.EdgeManager<T>UnsupportedOperationExceptionpublic void removeOutgoingEdges(T node) throws UnsupportedOperationException
removeOutgoingEdges in interface com.ibm.wala.util.graph.EdgeManager<T>UnsupportedOperationExceptionpublic int getNumberOfBlocks(P procedure)
getNumberOfBlocks in interface ISupergraph<T,P>procedure - an object that represents a procedurepublic int getLocalBlockNumber(T n)
getLocalBlockNumber in interface ISupergraph<T,P>n - a node in the supergraphpublic T getLocalBlock(P procedure, int i)
getLocalBlock in interface ISupergraph<T,P>procedure - an object that represents a procedurei - the "logical" basic block number of a node in the procedurepublic int getNumber(T N)
getNumber in interface com.ibm.wala.util.graph.NumberedNodeManager<T>public T getNode(int number)
getNode in interface com.ibm.wala.util.graph.NumberedNodeManager<T>public int getMaxNumber()
getMaxNumber in interface com.ibm.wala.util.graph.NumberedNodeManager<T>public Iterator<T> iterateNodes(com.ibm.wala.util.intset.IntSet s) throws com.ibm.wala.util.debug.UnimplementedError
iterateNodes in interface com.ibm.wala.util.graph.NumberedNodeManager<T>com.ibm.wala.util.debug.UnimplementedErrorpublic com.ibm.wala.util.intset.IntSet getSuccNodeNumbers(T node)
getSuccNodeNumbers in interface com.ibm.wala.util.graph.NumberedEdgeManager<T>Copyright © 2015. All rights reserved.