Class LockableReferenceAnalysis
- java.lang.Object
-
- soot.toolkits.scalar.AbstractFlowAnalysis<N,A>
-
- soot.toolkits.scalar.FlowAnalysis<N,A>
-
- soot.toolkits.scalar.BackwardFlowAnalysis<Unit,soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo>
-
- soot.jimple.toolkits.thread.synchronization.LockableReferenceAnalysis
-
public class LockableReferenceAnalysis extends BackwardFlowAnalysis<Unit,soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo>
Finds the set of local variables and/or references that represent all of the relevant objects used in a synchronized region, as accessible at the start of that region. Basically this is value numbering, done in reverse, interprocedurally, and only tracking the values that contribute to the given set of side effects.- Since:
- 2007-04-19
- Author:
- Richard L. Halpert
-
-
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, unitToBeforeFlow
-
-
Constructor Summary
Constructors Constructor Description LockableReferenceAnalysis(UnitGraph g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegeraddFromSubanalysis(soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo outInfo, LockableReferenceAnalysis la, Stmt stmt, Value lock)EquivalentValuebaseFor(Ref ref)protected voidcopy(soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo sourceInfo, soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo destInfo)Creates a copy of thesourceflow object indest.protected voidflowThrough(soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo inInfo, Unit u, soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo outInfo)Given the merge of theoutsets, compute theinset fors(or in to out, depending on direction).List<EquivalentValue>getLocksetOf(CriticalSectionAwareSideEffectAnalysis tasea, RWSet contributingRWSet, soot.jimple.toolkits.thread.synchronization.CriticalSection tn)EquivalentValueindexFor(Ref ref)protected voidmerge(soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo in1, soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo in2, soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo out)Compute the merge of thein1andin2sets, putting the result intoout.protected soot.jimple.toolkits.thread.synchronization.LocksetFlowInfonewInitialFlow()Returns the flow object corresponding to the initial values for each graph node.voidprintMsg(String msg)-
Methods inherited from class soot.toolkits.scalar.BackwardFlowAnalysis
doAnalysis, isForward
-
Methods inherited from class soot.toolkits.scalar.FlowAnalysis
copyFreshToExisting, getFlow, getFlowAfter, getFlowBefore, omissible
-
Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
entryInitialFlow, merge, mergeInto, treatTrapHandlersAsEntries
-
-
-
-
Constructor Detail
-
LockableReferenceAnalysis
public LockableReferenceAnalysis(UnitGraph g)
-
-
Method Detail
-
printMsg
public void printMsg(String msg)
-
getLocksetOf
public List<EquivalentValue> getLocksetOf(CriticalSectionAwareSideEffectAnalysis tasea, RWSet contributingRWSet, soot.jimple.toolkits.thread.synchronization.CriticalSection tn)
-
baseFor
public EquivalentValue baseFor(Ref ref)
-
indexFor
public EquivalentValue indexFor(Ref ref)
-
merge
protected void merge(soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo in1, soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo in2, soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo 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,soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo>
-
addFromSubanalysis
public Integer addFromSubanalysis(soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo outInfo, LockableReferenceAnalysis la, Stmt stmt, Value lock)
-
flowThrough
protected void flowThrough(soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo inInfo, Unit u, soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo outInfo)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,soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo>- Parameters:
inInfo- the input flowu- the current nodeoutInfo- the returned flow
-
copy
protected void copy(soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo sourceInfo, soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo destInfo)Description copied from class:AbstractFlowAnalysisCreates a copy of thesourceflow object indest.- Specified by:
copyin classAbstractFlowAnalysis<Unit,soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo>
-
newInitialFlow
protected soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo newInitialFlow()
Description copied from class:AbstractFlowAnalysisReturns the flow object corresponding to the initial values for each graph node.- Specified by:
newInitialFlowin classAbstractFlowAnalysis<Unit,soot.jimple.toolkits.thread.synchronization.LocksetFlowInfo>
-
-