soot.jimple.toolkits.thread.mhp
Class UnsynchronizedMhpAnalysis
java.lang.Object
soot.jimple.toolkits.thread.mhp.UnsynchronizedMhpAnalysis
- All Implemented Interfaces:
- Runnable, MhpTester
public class UnsynchronizedMhpAnalysis
- extends Object
- implements MhpTester, Runnable
UnsynchronizedMhpAnalysis written by Richard L. Halpert 2006-12-09
Calculates May-Happen-in-Parallel (MHP) information as if in the absence
of synchronization. Any synchronization statements (synchronized, wait,
notify, etc.) are ignored. If the program has no synchronization, then this
actually generates correct MHP. This is useful if you are trying to generate
(replacement) synchronization. It is also useful if an approximation is
acceptable, because it runs much faster than a synch-aware MHP analysis.
This analysis uses may-alias information to determine the types of threads
launched and the call graph to determine which methods they may call.
This analysis uses a run-once/run-one-at-a-time/run-many classification to
determine if a thread may be run in parallel with itself.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnsynchronizedMhpAnalysis
public UnsynchronizedMhpAnalysis()
buildMHPLists
public void buildMHPLists()
run
public void run()
- Specified by:
run
in interface Runnable
mayHappenInParallel
public boolean mayHappenInParallel(SootMethod m1,
Unit u1,
SootMethod m2,
Unit u2)
- Specified by:
mayHappenInParallel
in interface MhpTester
mayHappenInParallel
public boolean mayHappenInParallel(SootMethod m1,
SootMethod m2)
- Specified by:
mayHappenInParallel
in interface MhpTester
printMhpSummary
public void printMhpSummary()
- Specified by:
printMhpSummary
in interface MhpTester
getThreadClassList
public List<SootClass> getThreadClassList()
getThreads
public List<AbstractRuntimeThread> getThreads()
- Specified by:
getThreads
in interface MhpTester