Package soot.jimple.toolkits.pointer
Class StrongLocalMustAliasAnalysis
- java.lang.Object
-
- soot.toolkits.scalar.AbstractFlowAnalysis<N,A>
-
- soot.toolkits.scalar.FlowAnalysis<N,A>
-
- soot.toolkits.scalar.ForwardFlowAnalysis<Unit,HashMap<Value,Integer>>
-
- soot.jimple.toolkits.pointer.LocalMustAliasAnalysis
-
- soot.jimple.toolkits.pointer.StrongLocalMustAliasAnalysis
-
public class StrongLocalMustAliasAnalysis extends LocalMustAliasAnalysis
A special version of the local must-alias analysis that takes redefinitions within loops into account. For variable that is redefined in a loop, the must-alias information is invalidated and set toLocalMustAliasAnalysis#UNKNOWN. E.g. assume the following example:while(..) { c = foo(); //(1) c.doSomething(); //(2) }While it is certainly true that c at (2) must-alias c at (1) (they have the same value number), it is also true that in a second iteration, c at (2) may not alias the previous c at (2).- Author:
- Eric Bodden
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class soot.toolkits.scalar.FlowAnalysis
FlowAnalysis.Flow
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<Integer>invalidInstanceKeys-
Fields inherited from class soot.jimple.toolkits.pointer.LocalMustAliasAnalysis
container, localsAndFieldRefs, mergePointToValueToNumber, nextNumber, rhsToNumber
-
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 StrongLocalMustAliasAnalysis(UnitGraph g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringinstanceKeyString(Local l, Stmt s)Returns a string (natural number) representation of the instance key associated with l at statement s ornullif there is no such key associated.booleanmustAlias(Local l1, Stmt s1, Local l2, Stmt s2)-
Methods inherited from class soot.jimple.toolkits.pointer.LocalMustAliasAnalysis
copy, entryInitialFlow, flowThrough, hasInfoOn, merge, merge, newInitialFlow, parameterRefNumber, thisRefNumber
-
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
mergeInto, treatTrapHandlersAsEntries
-
-
-
-
Constructor Detail
-
StrongLocalMustAliasAnalysis
public StrongLocalMustAliasAnalysis(UnitGraph g)
-
-
Method Detail
-
mustAlias
public boolean mustAlias(Local l1, Stmt s1, Local l2, Stmt s2)
- Overrides:
mustAliasin classLocalMustAliasAnalysis- Returns:
- true if values of l1 (at s1) and l2 (at s2) have the exact same object IDs, i.e. at statement s1 the variable l1 must point to the same object as l2 at s2.
-
instanceKeyString
public String instanceKeyString(Local l, Stmt s)
Returns a string (natural number) representation of the instance key associated with l at statement s ornullif there is no such key associated.- Overrides:
instanceKeyStringin classLocalMustAliasAnalysis- Parameters:
l- any local of the associated methods- the statement at which to check
-
-