[Soot-list] How to do several passes over the code

David Mohr dmohr at cs.unm.edu
Wed Sep 23 19:03:42 EDT 2009


Hi Eric,
thanks for the very quick response!

After your suggestion I tried using a SceneTransformer, but that
requires using whole program mode. Whole program mode is not necessary
for my purposes, and it also resulted in some issues resolving
classes, which I didn't have before.

I ended up adding the field to classes on demand, which seems to work
well. I guess I didn't want this "extra" logic before, but in the end
it was easier to implement than dealing with the issues in
whole-program mode.

~David


On Wed, Sep 23, 2009 at 11:12 AM, Eric Bodden
<bodden at st.informatik.tu-darmstadt.de> wrote:
> Hi David.
>
> The wjtp is, like all w* packs, applied to the entire Scene, i.e. not
> to one class at a time. Just make sure you add a SceneTransformer, not
> a BodyTransformer. Packs added to the wjtp should be executed in the
> order in which you add them to the pack.
>
> Eric
>
> 2009/9/23 David Mohr <dmohr at cs.unm.edu>:
>> Hi,
>> I need to do two passes over the code. During the first pass, I add a
>> field to all classes. In the second pass I want to make use of this
>> field.
>>
>> Naively I added the field transformation to the pack before I added
>> the second transformation. That did not work, since all
>> transformations are applied in order, but one class at a time. I then
>> tried to use different packs; adding the field transformation to wjtp,
>> and the second transformation to jtp, with the same result.
>>
>> I went on to run soot.Main.main() with only the field transformation
>> added to the pack, then call G.reset(), add the second transformation
>> and run soot.Main.main again - but the changes made before G.reset()
>> were not visible afterwards.
>>
>> Can anyone let me know how I can do two passes over the code?
>>
>> Thanks,
>> ~David
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>
>
>
> --
> Eric Bodden
> Software Technology Group, Technische Universität Darmstadt, Germany
> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>


More information about the Soot-list mailing list