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,Object>>
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 to
LocalMustAliasAnalysis.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
invalidInstanceKeys
protected Set<Integer> invalidInstanceKeys
StrongLocalMustAliasAnalysis
public StrongLocalMustAliasAnalysis(UnitGraph g)
mustAlias
public boolean mustAlias(Local l1,
Stmt s1,
Local l2,
Stmt s2)
-
- Overrides:
mustAlias
in class LocalMustAliasAnalysis
- 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 or
null
if there is no such key associated or UNKNOWN
if
the value of l at s is LocalMustAliasAnalysis.UNKNOWN
.
- Overrides:
instanceKeyString
in class LocalMustAliasAnalysis
- Parameters:
l
- any local of the associated methods
- the statement at which to check