|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--soot.toolkits.scalar.FlowAnalysis
An abstract class providing a framework for carrying out dataflow analysis. Subclassing either BackwardFlowAnalysis or ForwardFlowAnalysis and providing implementations for the abstract methods will allow Soot to compute the corresponding flow analysis.
Field Summary | |
protected DirectedGraph |
graph
The graph being analysed. |
protected java.util.Map |
unitToAfterFlow
Maps graph nodes to OUT sets. |
protected java.util.Map |
unitToBeforeFlow
Maps graph nodes to IN sets. |
Constructor Summary | |
FlowAnalysis(DirectedGraph graph)
Constructs a flow analysis on the given DirectedGraph . |
Method Summary | |
protected abstract void |
copy(java.lang.Object source,
java.lang.Object dest)
Creates a copy of the source flow object in dest . |
protected void |
customizeInitialFlowGraph()
Customize the initial flow graph. |
protected abstract void |
doAnalysis()
Carries out the actual flow analysis. |
protected abstract void |
flowThrough(java.lang.Object in,
java.lang.Object d,
java.lang.Object out)
Given the merge of the out sets, compute the in set for s . |
java.lang.Object |
getFlowAfter(java.lang.Object s)
Accessor function returning value of OUT set for s. |
java.lang.Object |
getFlowBefore(java.lang.Object s)
Accessor function returning value of IN set for s. |
protected abstract boolean |
isForward()
Returns true if this analysis is forwards. |
protected abstract void |
merge(java.lang.Object in1,
java.lang.Object in2,
java.lang.Object out)
Compute the merge of the in1 and in2 sets, putting the result into out . |
protected abstract java.lang.Object |
newInitialFlow()
Returns the flow object corresponding to the initial values for each graph node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Map unitToBeforeFlow
protected java.util.Map unitToAfterFlow
protected DirectedGraph graph
Constructor Detail |
public FlowAnalysis(DirectedGraph graph)
DirectedGraph
.Method Detail |
protected abstract java.lang.Object newInitialFlow()
protected abstract boolean isForward()
protected abstract void flowThrough(java.lang.Object in, java.lang.Object d, java.lang.Object out)
out
sets, compute the in
set for s
.protected abstract void merge(java.lang.Object in1, java.lang.Object in2, java.lang.Object out)
in1
and in2
sets, putting the result into out
.
The behavior of this function depends on the implementation ( it may be necessary to check whether
in1
and in2
are equal or aliased ).
Used by the doAnalysis method.protected abstract void copy(java.lang.Object source, java.lang.Object dest)
source
flow object in dest
.protected abstract void doAnalysis()
protected void customizeInitialFlowGraph()
public java.lang.Object getFlowAfter(java.lang.Object s)
public java.lang.Object getFlowBefore(java.lang.Object s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |