Package soot.toolkits.scalar
Class ForwardFlowAnalysisExtended<N,A>
- java.lang.Object
-
- soot.toolkits.scalar.ForwardFlowAnalysisExtended<N,A>
-
public abstract class ForwardFlowAnalysisExtended<N,A> extends Object
Abstract class that provides a fixed-point iteration for forward flow analyses that need to distinguish between the different successors of a unit in an exceptional unit graph. Note that this class does not extend FlowAnalysis as it has a different definition of a flow function (namely one that does not only include the current unit, but also the successor). For the same reason, it does not integrate into the interactive analysis infrastructure of Soot either.- Author:
- Steven Arzt
-
-
Field Summary
Fields Modifier and Type Field Description protected DirectedGraph<N>graphThe graph being analysed.protected Map<N,Map<N,A>>unitToAfterFlowMaps graph nodes to OUT sets.protected Map<N,Map<N,A>>unitToBeforeFlowMaps graph nodes to IN sets.
-
Constructor Summary
Constructors Constructor Description ForwardFlowAnalysisExtended(DirectedGraph<N> graph)Construct the analysis from a DirectedGraph representation of a Body.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Orderer<N>constructOrderer()Default implementation constructing a PseudoTopologicalOrderer.protected abstract voidcopy(A source, A dest)Creates a copy of thesourceflow object indest.protected voiddoAnalysis()protected abstract AentryInitialFlow()Returns the initial flow value for entry/exit graph nodes.protected abstract voidflowThrough(A in, N cur, N next, A out)AgetFlowBefore(N s)Accessor function returning value of IN set for s.AgetFromMap(Map<N,Map<N,A>> map, N s, N t)protected abstract voidmerge(A in1, A in2, A out)Compute the merge of thein1andin2sets, putting the result intoout.protected voidmerge(N succNode, A in1, A in2, A out)Merges in1 and in2 into out, just before node succNode.protected voidmergeInto(N succNode, A inout, A in)Merges in into inout, just before node succNode.protected abstract AnewInitialFlow()Returns the flow object corresponding to the initial values for each graph node.voidputToMap(Map<N,Map<N,A>> map, N s, N t, A val)
-
-
-
Constructor Detail
-
ForwardFlowAnalysisExtended
public ForwardFlowAnalysisExtended(DirectedGraph<N> graph)
Construct the analysis from a DirectedGraph representation of a Body.
-
-
Method Detail
-
constructOrderer
protected Orderer<N> constructOrderer()
Default implementation constructing a PseudoTopologicalOrderer.- Returns:
- an Orderer to order the nodes for the fixed-point iteration
-
newInitialFlow
protected abstract A newInitialFlow()
Returns the flow object corresponding to the initial values for each graph node.
-
entryInitialFlow
protected abstract A entryInitialFlow()
Returns the initial flow value for entry/exit graph nodes.
-
copy
protected abstract void copy(A source, A dest)
Creates a copy of thesourceflow object indest.
-
merge
protected abstract void merge(A in1, A in2, A out)
Compute the merge of thein1andin2sets, putting the result intoout. The behavior of this function depends on the implementation ( it may be necessary to check whetherin1andin2are equal or aliased ). Used by the doAnalysis method.
-
merge
protected void merge(N succNode, A in1, A in2, A out)
Merges in1 and in2 into out, just before node succNode. By default, this method just calls merge(A,A,A), ignoring the node.
-
mergeInto
protected void mergeInto(N succNode, A inout, A in)
Merges in into inout, just before node succNode.
-
doAnalysis
protected void doAnalysis()
-
-