public interface ISupergraph<T,P>
extends com.ibm.wala.util.graph.NumberedGraph<T>
In our implementation we don't require explicit entry and exit nodes. So, the first basic block in a method is implicitly the entry node, but might also be a call node too. Similarly for exit nodes. The solver is coded to deal with this appropriately.
Additionally, due to exceptional control flow, each method might have multiple exits or multiple entries. T type of node in the supergraph P type of a procedure (like a box in an RSM)
Modifier and Type | Field and Description |
---|---|
static byte |
CALL_EDGE |
static byte |
CALL_TO_RETURN_EDGE |
static byte |
OTHER |
static byte |
RETURN_EDGE |
Modifier and Type | Method and Description |
---|---|
byte |
classifyEdge(T src,
T dest) |
Iterator<? extends T> |
getCalledNodes(T call) |
Iterator<? extends T> |
getCallSites(T ret,
P callee) |
T[] |
getEntriesForProcedure(P procedure) |
T[] |
getExitsForProcedure(P procedure) |
T |
getLocalBlock(P procedure,
int i) |
int |
getLocalBlockNumber(T n) |
Iterator<T> |
getNormalSuccessors(T call) |
int |
getNumberOfBlocks(P procedure) |
com.ibm.wala.util.graph.Graph<P> |
getProcedureGraph() |
P |
getProcOf(T n) |
Iterator<? extends T> |
getReturnSites(T call,
P callee) |
boolean |
isCall(T n) |
boolean |
isEntry(T n) |
boolean |
isExit(T n) |
boolean |
isReturn(T n) |
getMaxNumber, getNode, getNumber, iterateNodes
addNode, containsNode, getNumberOfNodes, iterator, removeNode
forEach, spliterator
static final byte CALL_EDGE
static final byte RETURN_EDGE
static final byte CALL_TO_RETURN_EDGE
static final byte OTHER
com.ibm.wala.util.graph.Graph<P> getProcedureGraph()
boolean isCall(T n)
n
- a node in this supergraphIterator<? extends T> getCalledNodes(T call)
call
- a "call" node in the supergraphIterator<T> getNormalSuccessors(T call)
call
- a "call" node in the supergraphIterator<? extends T> getReturnSites(T call, P callee)
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.Iterator<? extends T> getCallSites(T ret, P callee)
ret
- a "return" node in the supergraphcallee
- a "called" "procedure" in the supergraph. if callee is null, answer return sites for which no callee was found.boolean isExit(T n)
n
- a node in the supergraphP getProcOf(T n)
n
- a node in the supergraphT[] getEntriesForProcedure(P procedure)
T[] getExitsForProcedure(P procedure)
int getNumberOfBlocks(P procedure)
procedure
- an object that represents a procedureint getLocalBlockNumber(T n)
n
- a node in the supergraphT getLocalBlock(P procedure, int i)
procedure
- an object that represents a procedurei
- the "logical" basic block number of a node in the procedureboolean isReturn(T n)
n
- a node in this supergraphboolean isEntry(T n)
Copyright © 2019. All rights reserved.