Package soot.jimple.toolkits.pointer
Class LocalMayAliasAnalysis
- java.lang.Object
-
- soot.toolkits.scalar.AbstractFlowAnalysis<N,A>
-
- soot.toolkits.scalar.FlowAnalysis<N,A>
-
- soot.toolkits.scalar.ForwardFlowAnalysis<Unit,Set<Set<Value>>>
-
- soot.jimple.toolkits.pointer.LocalMayAliasAnalysis
-
public class LocalMayAliasAnalysis extends ForwardFlowAnalysis<Unit,Set<Set<Value>>>
Conducts a method-local, equality-based may-alias analysis.- Author:
- Eric Bodden
-
-
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 LocalMayAliasAnalysis(UnitGraph graph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcopy(Set<Set<Value>> source, Set<Set<Value>> target)Creates a copy of thesourceflow object indest.protected Set<Set<Value>>entryInitialFlow()Returns the initial flow value for entry/exit graph nodes.protected voidflowThrough(Set<Set<Value>> source, Unit unit, Set<Set<Value>> target)Given the merge of theoutsets, compute theinset fors(or in to out, depending on direction).booleanmayAlias(Value v1, Value v2, Unit u)Returns true if v1 and v2 may alias before u.Set<Value>mayAliases(Value v, Unit u)Returns all values that may-alias with v before u.Set<Value>mayAliasesAtExit(Value v)Returns all values that may-alias with v at the end of the procedure.protected voidmerge(Set<Set<Value>> source1, Set<Set<Value>> source2, Set<Set<Value>> target)Compute the merge of thein1andin2sets, putting the result intoout.protected Set<Set<Value>>newInitialFlow()Returns the flow object corresponding to the initial values for each graph node.-
Methods inherited from class soot.toolkits.scalar.ForwardFlowAnalysis
doAnalysis, isForward
-
Methods inherited from class soot.toolkits.scalar.FlowAnalysis
copyFreshToExisting, getFlow, getFlowAfter, getFlowBefore, omissible
-
Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
merge, mergeInto, treatTrapHandlersAsEntries
-
-
-
-
Constructor Detail
-
LocalMayAliasAnalysis
public LocalMayAliasAnalysis(UnitGraph graph)
-
-
Method Detail
-
flowThrough
protected void flowThrough(Set<Set<Value>> source, Unit unit, Set<Set<Value>> target)
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,Set<Set<Value>>>- Parameters:
source- the input flowunit- the current nodetarget- the returned flow
-
copy
protected void copy(Set<Set<Value>> source, Set<Set<Value>> target)
Description copied from class:AbstractFlowAnalysisCreates a copy of thesourceflow object indest.
-
entryInitialFlow
protected Set<Set<Value>> entryInitialFlow()
Description copied from class:AbstractFlowAnalysisReturns the initial flow value for entry/exit graph nodes. This is equal toAbstractFlowAnalysis.newInitialFlow()- Overrides:
entryInitialFlowin classAbstractFlowAnalysis<Unit,Set<Set<Value>>>
-
merge
protected void merge(Set<Set<Value>> source1, Set<Set<Value>> source2, Set<Set<Value>> target)
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.
-
newInitialFlow
protected Set<Set<Value>> newInitialFlow()
Description copied from class:AbstractFlowAnalysisReturns the flow object corresponding to the initial values for each graph node.- Specified by:
newInitialFlowin classAbstractFlowAnalysis<Unit,Set<Set<Value>>>
-
mayAlias
public boolean mayAlias(Value v1, Value v2, Unit u)
Returns true if v1 and v2 may alias before u.
-
mayAliases
public Set<Value> mayAliases(Value v, Unit u)
Returns all values that may-alias with v before u.
-
-