[Soot-list] NaiveSideEffectTester
Chris Pickett
chris.pickett at mail.mcgill.ca
Mon Nov 8 01:53:53 EST 2004
Phung Hua Nguyen wrote:
> Hi all,
>
> I think NaiveSideEffectTester is a simple and cheap side effect tester but
> it is so weak. I think we can improve the effect of the tester but still
> keep it cheap by exploiting the final property of fields.
>
> Particlarly, we can change:
>
> if (s.containsInvokeExpr()) {
> if (!(v instnaceof Local))
> return true;
> }
>
> into
>
> if (s.containsInvokeExpr()) {
> if (!(v instanceof Local ||
> ((v instanceof FieldRef) && ((FieldRef)v).getField().isFinal()))
> return true;
> }
>
> Am I correct ? I think it can improve significantly the effect of
> NaiveSideEffectTester.
Just out of curiousity, do you have experimental data confirming that
this is useful?
Chris
More information about the Soot-list
mailing list