[Soot-list] Using soot as a library

David Given dg at cowlark.com
Fri Jul 6 07:24:25 EDT 2012


Hello,

I would like to use Soot in a tool I'm working on: basically, what I
want to do is to process a set of class files into jimple and then walk
the jimple AST. Eventually I'll want to do whole-program optimisation,
but that's for later.

I've done some playing with using Soot as a library from my own Java
application, and am a little confused: classes like Scene and
PackManager appear to have deep hooks into the CLI parsing in Options;
currently I'm faking up a command line and calling Options.v().parse()
with it. Is this the right way of doing things?

Above all, does anyone have an example of doing this that I can look at
and steal, er, use for reference?

(Alternatively, if I'd be better off just using the standard Soot driver
and somehow adding a custom phase, does anyone have an example of doing
*that*?)

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "Parents let children ride bicycles on the street. But parents do not
│ allow children to hear vulgar words. Therefore we can deduce that
│ cursing is more dangerous than being hit by a car." --- Scott Adams


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120706/a3c9cfba/attachment.bin 


More information about the Soot-list mailing list