public abstract class ForwardFlowAnalysisExtended<N,A>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DirectedGraph<N> |
graph
The graph being analysed.
|
protected java.util.Map<N,java.util.Map<N,A>> |
unitToAfterFlow
Maps graph nodes to OUT sets.
|
protected java.util.Map<N,java.util.Map<N,A>> |
unitToBeforeFlow
Maps graph nodes to IN sets.
|
Constructor and Description |
---|
ForwardFlowAnalysisExtended(DirectedGraph<N> graph)
Construct the analysis from a DirectedGraph representation of a Body.
|
Modifier and Type | Method and Description |
---|---|
protected Orderer<N> |
constructOrderer()
Default implementation constructing a PseudoTopologicalOrderer.
|
protected abstract void |
copy(A source,
A dest)
Creates a copy of the
source flow object in dest . |
protected void |
doAnalysis() |
protected abstract A |
entryInitialFlow()
Returns the initial flow value for entry/exit graph nodes.
|
protected abstract void |
flowThrough(A in,
N cur,
N next,
A out) |
A |
getFlowBefore(N s)
Accessor function returning value of IN set for s.
|
A |
getFromMap(java.util.Map<N,java.util.Map<N,A>> map,
N s,
N t) |
protected abstract void |
merge(A in1,
A in2,
A out)
Compute the merge of the
in1 and in2 sets, putting the result into out . |
protected void |
merge(N succNode,
A in1,
A in2,
A out)
Merges in1 and in2 into out, just before node succNode.
|
protected void |
mergeInto(N succNode,
A inout,
A in)
Merges in into inout, just before node succNode.
|
protected abstract A |
newInitialFlow()
Returns the flow object corresponding to the initial values for
each graph node.
|
void |
putToMap(java.util.Map<N,java.util.Map<N,A>> map,
N s,
N t,
A val) |
protected java.util.Map<N,java.util.Map<N,A>> unitToBeforeFlow
protected java.util.Map<N,java.util.Map<N,A>> unitToAfterFlow
protected DirectedGraph<N> graph
public ForwardFlowAnalysisExtended(DirectedGraph<N> graph)
protected Orderer<N> constructOrderer()
protected abstract A newInitialFlow()
protected abstract A entryInitialFlow()
protected abstract void copy(A source, A dest)
source
flow object in dest
.protected abstract void merge(A in1, A in2, A 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 void merge(N succNode, A in1, A in2, A out)
protected void mergeInto(N succNode, A inout, A in)
protected void doAnalysis()