[Soot-list] Multiple instances of Soot in a single host program

Wei Peng pengw at umail.iu.edu
Fri Dec 26 17:18:12 EST 2014


Hi,

First, thanks for open sourcing Soot and keeping on making it better after
so many years.

I have searched but not found any answer to my following question.

It appears to me that Soot is designed to be Singleton, evidenced by the
ubiquitous .v() calls for retrieving the root objects (Scene, Main, etc).
However, if I want to do *separate* analyses on *totally different set of
classes* in a *single host* program, the global states shared by Singleton
would interfere with each other.

My questions are:
* How can I host multiple instances of Soot in a single program?
* If it is not possible without making intrusive changes to Soot, can I
somehow reset the global state?

What I have found that maybe relevant:
* G.v().reset()

*Use case *I have a host program that uses Soot to construct
SootMethod/SootClass, on which the host program will extract info. The host
program takes a bunch of Android APK names from STDIN, and farms out
*isolated* analyses of the APKs to a pool of worker threads. One step in
these worker threads is to use Soot to construct SootMethod of the APK
(using the "jb" pack). However, the Singleton architecture of Soot would
prevent me from doing this.

*Motivation* All the benefits of using a single JVM to do multiple tasks:
Saving JVM start time, using lightweight theads instead of OS processes,
cache warming, control parallelism through FixedThreadPool instead of using
GNU Make "-j" trick, etc.

Wei.

Wei Peng
Department of Computer and Information Science
Indiana University-Purdue University, Indianapolis (IUPUI)
pengw at iupui.edu  |  www.cs.iupui.edu/~pengw/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141226/0b7c2774/attachment.html 


More information about the Soot-list mailing list