[Soot-list] How do I implement my requirement?

Marc-Andre Laverdiere-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Thu May 31 14:39:36 EDT 2012


Hello,

I have started diving into the world of Soot, and I have to admit that 
there are far too many "magical" options for me to comprehend fully.

I have the following requirement I'd like to implement, and I think Soot 
fits the bill without major tweaking:

1- Parse a bunch of Java code files
2- Make some pre-defined transformations to the representation of the code
3- Create a bunch of interprocedural CFGs for a few starting points of 
my choosing in there
4- Export the CFGs into some in-house file format
5- I need to NOT got deep into libraries, I need my whole-program 
analysis to be pretty shallow. Ideally, anything that is in a jar should 
not be analyzed.

 From what I understand of the bit of documentation, this is how I would 
implement things:

1- I have a wrapper main class around soot.Main that creates the right 
parsing option:
String[] myArgs = new String[]{"-v", "-src-prec", "java", "-f", 
"jimple",  "-process-dir", ...
The problem I have is that it doesn't find some of the class definitions 
deeper in the folder hierarchy. How do I make soot crawl the directory 
structure?
2- I guess I would have to implement a new transformer class. But I am 
not sure how to make it executed though.
3- Is that the -w flag? Which interprocedural analysis does it perform?
4- Same as #2 I guess
5- Would I have to create a big list of -x java. -x org.apache. -x ... etc?

Is this the right way to get things done with Soot? Otherwise, how 
should I go about it?

Regards,

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


More information about the Soot-list mailing list