[Soot-list] NaiveSideEffectTester

Ondrej Lhotak olhotak at sable.mcgill.ca
Mon Nov 8 10:48:31 EST 2004


On Mon, Nov 08, 2004 at 10:34:15AM -0500, Navindra Umanee wrote:
> Now, it's certainly possible for an invoke expression to modify the
> state of a final field, right?  Doesn't that count as a side-effect,
> or are you only considering whole re-assignments to the field?

Navin: The side-effect tester does indeed consider only re-assignments
to the field itself. If there's an assignment to a field of the object
that the original field points to, that will show up as a side-effect of
the field that is actually assigned to, not the original field.

Phung: Unfortunately, it is not true that a final field cannot be
written to, in bytecode. It can definitely be written to in a
constructor (and therefore in a call to a constructor). If I remember
correctly, Java bytecode allows it to be written even outside a
constructor, although the Java source language does not.

Ondrej



More information about the Soot-list mailing list