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

Eric Bodden eric at bodden.de
Tue Mar 8 09:56:12 EST 2005


 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I don't know about any docs about this either. But in our tool
"JAnalyzer", we did use it as a framework rather than as a
commandline tool. You might wanna have a look at the sources:

http://janalyzer.bodden.de

Eric


Kin Keung Ma wrote:
> Hi, I skimmed through the topics of recent months and couldn't find
> a topic related to this. Sorry if it's a repost. 
> 
> It seems to me that most Soot users either use Soot as a command
> line tool, or as an API + framework (write modules and throw into
> soot.Main()). But what if I don't want to use soot.Main? I find no
> resources about that.   
> 
> However, I tried the following and it works with Soot 2.1.0:
> 
> //beginning of my main
> Set bag = new HashSet();
> for(int i=0;i<args.length;i++)
>     bag.add(Scene.v().loadClassAndSupport(args[i]));
> 
> Then I have a bag of SootClasses to work with (e.g. to run flow
> analysis on every method of every class). I don't know if it's the
> correct way to write . But it works, and I'm very happy with that. 
>   
> 
> 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. 
> 
> Kin
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://www.sable.mcgill.ca/mailman/listinfo/soot-list



- -- 
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQi29DMwiFCm7RlWCEQKPrQCfZiuubSpL8oxEUlAAB4ehbkM3gZgAnR5X
NQC8EoGIAFGs61YXq9lCQymu
=0MT1
-----END PGP SIGNATURE-----




More information about the Soot-list mailing list