[Soot-list] Using Soot without using soot.Main
Kin Keung Ma
archicat at gmail.com
Sun Mar 13 22:50:37 EST 2005
I now turn it on by
Options.v().parse(new String[]{"-full-resolver"});
Any javadoc-like API for Options?
Kin
On Tue, 08 Mar 2005 16:16:47 -0600, Archie Cobbs <archie at dellroad.org> wrote:
> Chris Pickett wrote:
> > However, as for how you would actually set Options.full_resolver to be
> > true without calling soot.Main, I'm not sure. Perhaps somebody else can
> > clarify here (and this should probably go in an FAQ too, although it's
> > not really particular to the class resolver)...
>
> The code generator for JC [1] uses Soot in "library mode". Here is a
> snippet of code that might be useful:
>
> // Reset Soot
> G.reset();
> System.gc();
>
> // Set global Soot options
> Options.v().set_keep_line_number(true);
> Options.v().set_keep_offset(true);
>
> // Set Jimple optimization options
> PhaseOptions.v().setPhaseOption("jop", "enabled:true");
> PhaseOptions.v().setPhaseOption("tag.ln", "on");
> PhaseOptions.v().setPhaseOption("jb.lp", "on");
> PhaseOptions.v().setPhaseOption("jap", "enabled:true");
> PhaseOptions.v().setPhaseOption("jap.npc", "on");
> PhaseOptions.v().setPhaseOption("jap.abc", "on");
> PhaseOptions.v().setPhaseOption("jap.abc",
> "with-classfield:true");
>
> // Include cast check elimination tagging
> PackManager.v().getPack("jap").add(
> new Transform("jap.cce", CastCheckEliminatorDumper.v()));
> PhaseOptions.v().setPhaseOption("jap.cce", "on");
>
> Hope this helps.
>
> -Archie
>
> [1] http://jcvm.sourceforge.net/
>
> __________________________________________________________________________
> Archie Cobbs * CTO, Awarix * http://www.awarix.com
>
More information about the Soot-list
mailing list