[Soot-list] Scripting with soot

Steven Arzt Steven.Arzt at cased.de
Tue Nov 25 13:40:41 EST 2014


Hi,

>From what I understood from your descriptions, it looks as if a
SceneTransfomer is something worth looking at. As an alternative, Soot does
not clean up its objects after returning from its main() method. The caller
of main() can thus still operate on the Scene and retrieve classes and
methods (Scene.v().getMethod etc.)

Concerning the data flow analysis: There is already a quite sophisticated
static taint tracker called FlowDroid that was implemented on top of Soot:
http://sseblog.ec-spride.de/tools/flowdroid/ It's all open source, so you
can use it, re-use parts of it, extend it, and learn from how things are
implemented there.

Best regards,
  Steven

-----Ursprüngliche Nachricht-----
Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
Im Auftrag von Mihir Mehta
Gesendet: Dienstag, 25. November 2014 19:35
An: Soot-list at CS.McGill.CA
Betreff: Re: [Soot-list] Scripting with soot

There is no way for me to iterate through the method Bodys. I need to call
soot.Main.main at the end of my class, which I believe is the standard. Once
I do that, soot takes over and eventually calls internalTransform on each of
the Bodys. I have a work-around in mind, but it's somewhat kludgy: I store
all the relevant method names and the relevant assertions in a static data
structure, and in the internalTransform method, I check the current Body
against this static data structure and check assertions if any. You can see
how storing assertions in a data structure is messy in a language such as
java, which doesn't allow me to simply store functions as first-class
values. 
This is why I'm wondering if there's a way for me to iterate through the
method Bodys, which feels like a cleaner solution.

Mihir.

On 11/25/14 12:22, Patrick Lam wrote:
> Hi Mihir,
>
> It would be great to have an assertion-based test infrastructure for 
> Soot and sharing that with the community would be awesome.
>
> I'm not sure why you can't do the obvious thing. Can you not just run 
> the BodyTransformer on all Bodys and filter out the ones that aren't 
> relevant?
>
> pat
>
> On 25/11/14 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
>>
>

_______________________________________________
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