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
FieldsModifier and TypeFieldDescriptionprotected final StmtGraph<? extends BasicBlock<?>>The graph being analysed.Maps graph nodes to IN sets. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractFlowAnalysis(StmtGraph<? extends BasicBlock<?>> graph) Constructs a flow analysis on the givenStmtGraph. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidCreates a copy of thesourceflow object indest.protected FReturns the initial flow value for entry/ exit graph nodes.protected abstract voidexecute()Carries out the actual flow analysis.@NonNull FgetFlowBefore(@NonNull Stmt s) Accessor function returning value of IN set for s.protected abstract booleanReturns true if this analysis is forwards.protected abstract voidCompute the merge of thein1andin2sets, putting the result intoout.protected voidMerges in1 and in2 into out, just before node succNode.protected voidMerges in into inout, just before node succNode.protected abstract @NonNull FReturns the flow object corresponding to the initial values for each graph node.protected booleanDetermines 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 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
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 thesourceflow 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.
-