[Soot-list] Can i have 2 internal transformations?

Eric Bodden eric.bodden at mail.mcgill.ca
Mon Aug 18 12:11:46 EDT 2008


Oh sorry, you are right, that was my mistake; I thought that the
iteration order would be different.

In that case you need to have your transformations in different packs.
I would suggest to add the first one to the "jtp" pack and the second
one to the "jap" pack (the Jimple Annotation Pack).

PackManager.v().getPack("jtp").add(new Transform("jtp.annotexample1",
InternalTransformTry1.v()));
PackManager.v().getPack("jap").add(new Transform("jap.annotexample2",
InternalTransformTry2.v()));

Note that in that case the name of the second transform also needs to
start with "jap.".

Eric


2008/8/18 Manjiri Namjoshi <manjiri.namjoshi at googlemail.com>:
> Hello,
>
> Actually, i want 1 transformation to happen for all the methods and then the
> second transformation to start.
>
> So, in my program if i have methodA and methodB then i get :
>
>       PackManager.v().getPack("jtp").add(new Transform("jtp.annotexample1",
> InternalTransformTry1.v()));
>       PackManager.v().getPack("jtp").add(new Transform("jtp.annotexample1",
> InternalTransformTry2.v()));
>
> InternalTransform1 for methodA  then InternalTransform2 for again methodA
> and then the two transformations for methodB.
>
>
> Thank You.
>
> Sincerely,
> Manjiri
>
>
> 2008/8/16 Eric Bodden <eric.bodden at mail.mcgill.ca>
>>
>> Hi Manjiri.
>>
>> Sure, just add two transforms. The first one will be run first, the
>> second one second.
>>
>> Eric
>>
>> 2008/8/16 Manjiri Namjoshi <manjiri.namjoshi at googlemail.com>:
>> > Hello,
>> >
>> > I am interested to traverse each and every method and populate some
>> > structure.
>> > After i am done traversing the entire program (all methods once) then i
>> > would like to annotate the class files based on the populated data
>> > structure.
>> >
>> > So, basically i need to have 2 transformations.
>> >
>> > Is it possible to have this?
>> >
>> > Something like:
>> >
>> > /* adds the transformer. */
>> >         PackManager.v().getPack("jtp").add(new
>> >                         Transform("jtp.annotexample",
>> >                   InternalTransformTry.v()));
>> >
>> >
>> > /* invokes Soot */
>> >  soot.Main.main(args);
>> >
>> >
>> > To update my data structure and then i want to implement another
>> > "internalTranform" to annotate based on the populated structure.
>> >
>> > Thank You.
>> >
>> >
>> > Sincerely,
>> > Manjiri
>> >
>> > _______________________________________________
>> > Soot-list mailing list
>> > Soot-list at sable.mcgill.ca
>> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>> >
>> >
>>
>>
>>
>> --
>> Eric Bodden
>> Sable Research Group
>> McGill University, Montréal, Canada
>
>



-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list