[Soot-list] Using Soot without using soot.Main

Chris Pickett chris.pickett at mail.mcgill.ca
Tue Mar 8 17:00:37 EST 2005


Kin Keung Ma wrote:
> But this fails to work with Soot 2.2.1. The exceptions show that some
> methods of some classes outside the "bag" are missing. I guess it's
> due to the fact that Soot 2.2.1 does not resolve all classes
> completely:
> 
> http://svn.sable.mcgill.ca/wiki/index.php/ClassResolver
> 
> While -full-resolver causes all classes to be resolved at Bodies, what
> can I do if I don't use soot.Main at all? Thanks.

Hi,

All the documentation you need should ideally be on these two pages:

http://svn.sable.mcgill.ca/wiki/index.php/ClassResolver
http://svn.sable.mcgill.ca/wiki/index.php/ClassResolverFAQ

When you've read them, please let us know which particular parts you 
don't understand and which of your questions aren't addressed (just so 
everybody is in sync here -- it's not your fault if something is 
unclear).  I updated the ClassResolver page to make Ganesh's new and 
improved documentation official so as not to cause confusion ... they 
should hold back until 2.2.0, with the exception of comments about 
deprecated methods (it's still safer and better to treat them as 
deprecated in any event).

I *think* the answer to your question is that you need to call 
addBasicClass() to put your needed classes onto a list to be processed, 
before Soot starts its resolving phase, and then you need to call one of 
loadBasicClasses() or loadNecessaryClasses() depending on whether or not 
you've set up command line arguments manually from within your application.

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)...

Cheers,
Chris


More information about the Soot-list mailing list