Package soot.toolkits.scalar
Class FlowSensitiveConstantPropagator.BetterConstantPropagator
- java.lang.Object
-
- soot.toolkits.scalar.AbstractFlowAnalysis<N,A>
-
- soot.toolkits.scalar.FlowAnalysis<N,A>
-
- soot.toolkits.scalar.ForwardFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>
-
- soot.toolkits.scalar.FlowSensitiveConstantPropagator.BetterConstantPropagator
-
- Enclosing class:
- FlowSensitiveConstantPropagator
protected class FlowSensitiveConstantPropagator.BetterConstantPropagator extends ForwardFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class soot.toolkits.scalar.FlowAnalysis
FlowAnalysis.Flow
-
-
Field Summary
-
Fields inherited from class soot.toolkits.scalar.FlowAnalysis
filterUnitToAfterFlow, unitToAfterFlow
-
Fields inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
filterUnitToBeforeFlow, graph, unitToBeforeFlow
-
-
Constructor Summary
Constructors Constructor Description BetterConstantPropagator(DirectedGraph<Unit> graph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcopy(FlowSensitiveConstantPropagator.ConstantState source, FlowSensitiveConstantPropagator.ConstantState dest)Creates a copy of thesourceflow object indest.protected voidcopyFreshToExisting(FlowSensitiveConstantPropagator.ConstantState in, FlowSensitiveConstantPropagator.ConstantState dest)Copies a *fresh* copy of in to dest.protected voidflowThrough(FlowSensitiveConstantPropagator.ConstantState in, Unit d, FlowSensitiveConstantPropagator.ConstantState out)Given the merge of theoutsets, compute theinset fors(or in to out, depending on direction).protected voidmerge(FlowSensitiveConstantPropagator.ConstantState in1, FlowSensitiveConstantPropagator.ConstantState in2, FlowSensitiveConstantPropagator.ConstantState out)Compute the merge of thein1andin2sets, putting the result intoout.protected voidmergeInto(Unit succNode, FlowSensitiveConstantPropagator.ConstantState inout, FlowSensitiveConstantPropagator.ConstantState in)Merges in into inout, just before node succNode.protected FlowSensitiveConstantPropagator.ConstantStatenewInitialFlow()Returns the flow object corresponding to the initial values for each graph node.protected booleanomissible(Unit n)If a flow node can be omitted returntrue, otherwisefalse.-
Methods inherited from class soot.toolkits.scalar.ForwardFlowAnalysis
doAnalysis, isForward
-
Methods inherited from class soot.toolkits.scalar.FlowAnalysis
getFlow, getFlowAfter, getFlowBefore
-
Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
entryInitialFlow, merge, treatTrapHandlersAsEntries
-
-
-
-
Constructor Detail
-
BetterConstantPropagator
public BetterConstantPropagator(DirectedGraph<Unit> graph)
-
-
Method Detail
-
omissible
protected boolean omissible(Unit n)
Description copied from class:FlowAnalysisIf 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- Overrides:
omissiblein classFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>- Parameters:
n- the node to check- Returns:
false
-
flowThrough
protected void flowThrough(FlowSensitiveConstantPropagator.ConstantState in, Unit d, FlowSensitiveConstantPropagator.ConstantState out)
Description copied from class:FlowAnalysisGiven the merge of theoutsets, compute theinset 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).- Specified by:
flowThroughin classFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>- Parameters:
in- the input flowd- the current nodeout- the returned flow
-
newInitialFlow
protected FlowSensitiveConstantPropagator.ConstantState newInitialFlow()
Description copied from class:AbstractFlowAnalysisReturns the flow object corresponding to the initial values for each graph node.- Specified by:
newInitialFlowin classAbstractFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>
-
mergeInto
protected void mergeInto(Unit succNode, FlowSensitiveConstantPropagator.ConstantState inout, FlowSensitiveConstantPropagator.ConstantState in)
Description copied from class:AbstractFlowAnalysisMerges in into inout, just before node succNode.- Overrides:
mergeIntoin classAbstractFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>
-
merge
protected void merge(FlowSensitiveConstantPropagator.ConstantState in1, FlowSensitiveConstantPropagator.ConstantState in2, FlowSensitiveConstantPropagator.ConstantState out)
Description copied from class:AbstractFlowAnalysisCompute 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.- Specified by:
mergein classAbstractFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>
-
copy
protected void copy(FlowSensitiveConstantPropagator.ConstantState source, FlowSensitiveConstantPropagator.ConstantState dest)
Description copied from class:AbstractFlowAnalysisCreates a copy of thesourceflow object indest.- Specified by:
copyin classAbstractFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>
-
copyFreshToExisting
protected void copyFreshToExisting(FlowSensitiveConstantPropagator.ConstantState in, FlowSensitiveConstantPropagator.ConstantState dest)
Description copied from class:FlowAnalysisCopies a *fresh* copy of in to dest. The input is not referenced somewhere else. This allows subclasses for a smarter and faster copying.- Overrides:
copyFreshToExistingin classFlowAnalysis<Unit,FlowSensitiveConstantPropagator.ConstantState>
-
-