[Soot-list] Disable a phase in Soot

Michael Williams michealwms83 at gmail.com
Fri Mar 31 11:53:08 EDT 2017


Hello,
I am using Soot to generate shimple IR of some Java programs.

I would like to disable some phases, but I cannot understand how to do it.

Specifically, this is my analysis code:

    Options.v().set_process_dir(Collections.singletonList("/myjar.jar"));
    Options.v().set_output_format(Options.output_format_shimple);
    Options.v().setPhaseOption("jb.uce", "enabled:false"); // --> trying to
disable the UnreachableCodeEliminator phase
    Options.v().set_verbose(true);

    Scene.v().loadNecessaryClasses();
    PackManager.v().runPacks();

    for(SootClass sc : Scene.v().getClasses()){
        //...
    }

In the code I try to disable the phase jb.uce (implemented in
UnreachableCodeEliminator.java).

However, in the program output, I still see logging lines such as:
[<init>] Eliminating unreachable code...
which means that UnreachableCodeEliminator is still running.

What am I doing wrong?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20170331/84e5b104/attachment.html>


More information about the Soot-list mailing list