Package sootup.analysis.intraprocedural
Class AbstractFlowAnalysis<F>
java.lang.Object
sootup.analysis.intraprocedural.AbstractFlowAnalysis<F>
- Type Parameters:
F
- abstraction type for the Facts
- Direct Known Subclasses:
FlowAnalysis
An abstract class providing a meta-framework for carrying out dataflow analysis. This class
provides common methods and fields required by the BranchedFlowAnalysis and FlowAnalysis abstract
classes.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final StmtGraph<? extends BasicBlock<?>>
The graph being analysed.Maps graph nodes to IN sets. -
Constructor Summary
ConstructorDescriptionAbstractFlowAnalysis
(StmtGraph<? extends BasicBlock<?>> graph) Constructs a flow analysis on the givenStmtGraph
. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Creates a copy of thesource
flow object indest
.protected F
Returns the initial flow value for entry/ exit graph nodes.protected abstract void
execute()
Carries out the actual flow analysis.Accessor function returning value of IN set for s.protected abstract boolean
Returns true if this analysis is forwards.protected abstract void
Compute the merge of thein1
andin2
sets, putting the result intoout
.protected void
Merges in1 and in2 into out, just before node succNode.protected void
Merges in into inout, just before node succNode.protected abstract F
Returns the flow object corresponding to the initial values for each graph node.protected boolean
Determines whetherentryInitialFlow()
is applied to trap handlers.
-
Field Details
-
graph
The graph being analysed. -
stmtToBeforeFlow
Maps graph nodes to IN sets.
-
-
Constructor Details
-
AbstractFlowAnalysis
Constructs a flow analysis on the givenStmtGraph
.
-
-
Method Details
-
newInitialFlow
Returns the flow object corresponding to the initial values for each graph node. -
entryInitialFlow
Returns the initial flow value for entry/ exit graph nodes. -
treatTrapHandlersAsEntries
protected boolean treatTrapHandlersAsEntries()Determines whetherentryInitialFlow()
is applied to trap handlers. -
isForward
protected abstract boolean isForward()Returns true if this analysis is forwards. -
merge
Compute the merge of thein1
andin2
sets, putting the result intoout
. The behavior of this function depends on the implementation ( it may be necessary to check whetherin1
andin2
are equal or aliased ). Used by the doAnalysis method. -
merge
Merges in1 and in2 into out, just before node succNode. By default, this method just calls merge(A,A,A), ignoring the node. -
copy
Creates a copy of thesource
flow object indest
. -
execute
protected abstract void execute()Carries out the actual flow analysis. Typically called from a concrete FlowAnalysis's constructor. -
getFlowBefore
Accessor function returning value of IN set for s. -
mergeInto
Merges in into inout, just before node succNode.
-