[Soot-list] How to add a Transform to the jb phase?

Eric Bodden eric.bodden at mail.mcgill.ca
Sat Dec 8 15:40:34 EST 2007


Hi, Mario.

If I remember correctly, there is no difference to other packs. Does
this here not work?

public class MySootMainExtension
{
    public static void main(String[] args) {
        // Inject the analysis tagger into Soot
        PackManager.v().getPack("jb").add(
        new Transform("jb.mytransform",
                               MyTransform.instance()));
        // Invoke soot.Main with arguments given
        Main.main(args);
    }
}

(adapted from the Soot Survivor's guide http://www.brics.dk/SootGuide/)

Eric

On 08/12/2007, Mario Mendez <mario at cs.unm.edu> wrote:
> Hi all,
>
> I need to add a Transform at the end of the jb phase in order to be able
> to manipulate the IR before it is transformed to SSA in the shimple
> phase. I couldn't find any way of doing it that does not imply modifying
> the Soot source, which is undesirable. Can you suggest any solution?
> Normally we add the transformations to jtp or stp, but what if, like in
> this case, you want them to be in jb?
>
> Thanks!
> _______________________________________________
> 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


More information about the Soot-list mailing list