Package sootup.analysis.intraprocedural
Class FlowAnalysis<A>
java.lang.Object
sootup.analysis.intraprocedural.AbstractFlowAnalysis<A>
sootup.analysis.intraprocedural.FlowAnalysis<A>
- Direct Known Subclasses:
BackwardFlowAnalysis
,ForwardFlowAnalysis
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.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionFiltered: Maps graph nodes to OUT sets.Maps graph nodes to OUT sets.Fields inherited from class sootup.analysis.intraprocedural.AbstractFlowAnalysis
graph, stmtToBeforeFlow
-
Constructor Summary
ConstructorDescriptionFlowAnalysis
(StmtGraph<? extends BasicBlock<?>> graph) Constructs a flow analysis on the givenDirectedGraph
. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
flowThrough
(A in, Stmt d, A out) Given the merge of theout
sets, compute thein
set fors
(or in to out, depending on direction).protected FlowAnalysis.Flow
You can specify which flow set you would like to use of nodefrom
getFlowAfter
(Stmt s) Accessor function returning value of OUT set for s.Accessor function returning value of IN set for s.protected boolean
If a flow node can be omitted returntrue
, otherwisefalse
.Methods inherited from class sootup.analysis.intraprocedural.AbstractFlowAnalysis
copy, entryInitialFlow, execute, isForward, merge, merge, mergeInto, newInitialFlow, treatTrapHandlersAsEntries
-
Field Details
-
stmtToAfterFlow
Maps graph nodes to OUT sets. -
filterStmtToAfterFlow
Filtered: Maps graph nodes to OUT sets.
-
-
Constructor Details
-
FlowAnalysis
Constructs a flow analysis on the givenDirectedGraph
.
-
-
Method Details
-
flowThrough
Given the merge of theout
sets, compute thein
set fors
(or in to out, depending on direction).This function often causes confusion, because the same interface is used for both forward and backward flow analyses. The first parameter is always the argument to the flow function (i.e. it is the "in" set in a forward analysis and the "out" set in a backward analysis), and the third parameter is always the result of the flow function (i.e. it is the "out" set in a forward analysis and the "in" set in a backward analysis).
- Parameters:
in
- the input flowd
- the current nodeout
- the returned flow
-
getFlowAfter
Accessor function returning value of OUT set for s. -
getFlowBefore
Description copied from class:AbstractFlowAnalysis
Accessor function returning value of IN set for s.- Overrides:
getFlowBefore
in classAbstractFlowAnalysis<A>
-
omissible
If a flow node can be omitted returntrue
, otherwisefalse
. There is no guarantee a node will be omitted. A omissible node does not influence the result of an analysis.If you are unsure, don't overwrite this method
- Parameters:
stmt
- the node to check- Returns:
false
-
getFlow
You can specify which flow set you would like to use of nodefrom
- Parameters:
from
-mergeNode
-- Returns:
- Flow.OUT
-