[Soot-list] Scripting with soot

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Tue Nov 25 18:37:06 EST 2014


Namaskar Mihir,

I am using Soot as a library and I have some tests that run as ScalaTest
tsets (very similar to JUnit).

If you want to try something like that, I encourage you to have a look
at the InfoFlow class in Flowdroid. You'll see how options are set and
how different parts and pieces fit together. It is a steep learning
curve, but would totally meet your need.

One of the tricks, when you want to load a specific class, is to set
your process-dir properly and use Scene.v.forceResolve.

Personally, I use some test objects in pure Jimple, which saves me the
trouble of having to store additional files in my source tree.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 11/25/2014 12:56 PM, Mihir Mehta wrote:
> Hi,
> 
> I'm working on a data flow analysis using soot, following these 
> steps(http://www.bodden.de/2008/09/22/soot-intra/). I'd like to set up a 
> regression test suite, which would look something like a number of 
> source code files (classes, in .java files) and some assertions on the 
> result of the flow analysis on some methods in each of these classes. 
> However, because of the way soot seems to be structured, I'm not able to 
> figure out how to make a harness that runs my analysis on each of these 
> classes in turn and checks the assertions - because I can only see the 
> Body corresponding to a method in the internalTransform method of my 
> BodyTransformer instance, which means I cannot do the obvious thing, 
> i.e. search for all the relevant methods in all the different class 
> files, run the analysis on each method's Body, and print whether the 
> assertion passed.
> 
> Can anyone suggest a work-around?
> 
> Thanks,
> Mihir Mehta,
> Doctoral student,
> UT Austin.
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list