[Soot-list] Using soot as a library

Marc-Andre Laverdiere-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Sat Jul 7 07:28:25 EDT 2012


That is exactly the point I guess. So far, I've only tried to do 
something simple - adding custom entry points - and I've been bashing my 
head on the wall for more than a week.

I'm thinking about my next requirement - doing some syntax-directed 
modifications. I could be doing it in JastAddJ, which is soot's Java 
front-end, but I'm afraid of how I'm gonna make this get hooked together 
without breaking apart.

I'd really vote for a major refactoring, so that we don't have to ever 
see on the ML something along the lines of "well, just use soot main".

Soot is great - don't get me wrong. It is just designed for a narrower 
set of use cases than needed.

On 07/06/2012 10:25 PM, Patrick Lam wrote:
> On 07/06/2012 07:00 PM, David Given 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?
>
> That would probably work, but no guarantees... we find that calling
> Soot's main method is more foolproof.
>
>> 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.
>
> We get rid of the constant pool in Soot. You can consult the
> SootResolver class and see what it does; there's no specific call to
> find all references.
>
> pat
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


-- 
Marc-André Laverdière-Papineau
Étudiant au doctorat - PhD Student




More information about the Soot-list mailing list