soot.jimple.toolkits.thread.mhp
Class SynchObliviousMhpAnalysis

java.lang.Object
  extended by soot.jimple.toolkits.thread.mhp.SynchObliviousMhpAnalysis
All Implemented Interfaces:
Runnable, MhpTester
Direct Known Subclasses:
UnsynchronizedMhpAnalysis

public class SynchObliviousMhpAnalysis
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.


Constructor Summary
SynchObliviousMhpAnalysis()
           
 
Method Summary
protected  void buildThreadList()
           
 List<SootClass> getThreadClassList()
           
 List<AbstractRuntimeThread> getThreads()
           
 boolean mayHappenInParallel(SootMethod m1, SootMethod m2)
           
 boolean mayHappenInParallel(SootMethod m1, Unit u1, SootMethod m2, Unit u2)
           
 void printMhpSummary()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchObliviousMhpAnalysis

public SynchObliviousMhpAnalysis()
Method Detail

buildThreadList

protected void buildThreadList()

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