[Soot-list] "in-memory" input to Soot

Patrick Lam plam at sable.mcgill.ca
Thu Jun 27 00:20:22 EDT 2013


On 06/27/13 00:15, Stephan Arlt wrote:
> Hi,
>
> We are currently integrating our tool Joogie (which incorporates Soot) into a web service. As far as I know, Soot only accepts input files (*.jar, *.java, *.class) from the command line, that is, using soot.Main.main(...). Is there an 'in-memory' way of introducing input to Soot? For example, is it possible to use a BufferedReader?
>
> The thing is, our web service receives a Java program posted from a HTML form. Most web service providers (e.g., Google AppEngine) do not allow write access to the file system. Thus, we cannot just save the Java program (posted from a HTML form) to a file, and then forward it to Joogie and Soot respectively.

Hi Stephan,

[I've queued Martin Schäf's personal email to me and hope to reply to it 
tomorrow].

It'll be cool to see Joogie as a web service! I don't think that Soot 
currently has any support for non-filesystem inputs, but it should be 
fairly easy to introduce support for such inputs. All you have to do is 
modify the SourceLocator class. I don't think it'll take you very long. 
We already have code that does funky stuff with JAR inputs because there 
used to be a JDK bug about that. Code to accept inputs from a 
BufferedReader should be quite similar.

pat



More information about the Soot-list mailing list