soot.jimple
Class NaiveSideEffectTester

java.lang.Object
  extended by soot.jimple.NaiveSideEffectTester
All Implemented Interfaces:
SideEffectTester

public class NaiveSideEffectTester
extends Object
implements SideEffectTester

Provides naive side effect information. Relies on no context information; instead, does the least conservative thing possible even in the possible presence of badness. Possible weakness of SideEffectTester: consider a Box. We don't have a name for "what-is-inside-the-box" and so we can't ask questions about it. But perhaps we need only ask questions about the box itself; the sideeffect tester can deal with that internally.


Constructor Summary
NaiveSideEffectTester()
           
 
Method Summary
 void newMethod(SootMethod m)
           
 boolean unitCanReadFrom(Unit u, Value v)
          Returns true if the unit can read from v.
 boolean unitCanWriteTo(Unit u, Value v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NaiveSideEffectTester

public NaiveSideEffectTester()
Method Detail

newMethod

public void newMethod(SootMethod m)
Specified by:
newMethod in interface SideEffectTester

unitCanReadFrom

public boolean unitCanReadFrom(Unit u,
                               Value v)
Returns true if the unit can read from v. Does not deal with expressions; deals with Refs.

Specified by:
unitCanReadFrom in interface SideEffectTester

unitCanWriteTo

public boolean unitCanWriteTo(Unit u,
                              Value v)
Specified by:
unitCanWriteTo in interface SideEffectTester