[Soot-list] Using soot as a library

Patrick Meredith pmeredit at gmail.com
Sat Jul 7 11:34:38 EDT 2012


On Fri, Jul 6, 2012 at 6:00 PM, David Given <dg at cowlark.com> wrote:

> On 06/07/12 12:51, Eric Bodden wrote:
> [...]
> > An easier way to set options is to use the "Options" class. You can
> > use Options.v().setXYZ(..) to set options.
> >
> > Then you typically call Soot's main method or do something more
> > elaborate if needed.
>
> Yes, that's much easier; ta. I'm actually invoking Soot by setting up
> Options, then calling Scene.v().loadNecessaryClasses() and
> PackManager.v().runPacks(); at this point, getClasses() seems to be
> returning valid data. Is this the right way to do it?
>

This is what we do in our predictive runtime analysis tool.  So I can
confirm it works for us in two separate phases.



>
> I haven't got as far as getting at the jimple AST yet, but looking at
> the tracing Soot does appear to be generating it, so I'm confident it'll
> be there...
>
> Next newbie question: is there an easy way of asking Soot what classes a
> particular class references? AFAICT it should just be a matter of
> pulling the class references out of the constant pool, but I can't find
> any API to do it.
>
> --
> ┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
>> │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
> │ --- Conway's Game Of Life, in one line of APL
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>


-- 
-Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120707/a8c8fe2d/attachment.html 


More information about the Soot-list mailing list