[Soot-list] Converting Baf Body to jimple Body

Bodden, Eric eric.bodden at sit.fraunhofer.de
Tue Nov 5 11:05:20 EST 2013


Hello.

It really helps us if you provide more context...

> I am trying to perform interprocedural analysis over some program. The problem i am facing is that , for all the event listener registrations of the following form 
> 
> 
> myButton.setOnClickListener(new A.OnClickListener() {
>           public void onClick(A a) {
>              //onClick Body here 
>           }
>       });
> 
> where A is a class with onClickListener defined.
> 
> For such code fragments , there is no edge in the call graph from the current context to the onClick. This produces an incomplete call graph.

Is this an Android app or a Java program? In Android one needs to model the lifecycle very specifically, something which we do in FlowDroid, an extension to Soot, but Soot does not handle this on its own. Without such a model it is no surprise that the edges are missing.

> Now , if i want to parse the body of the onClick() method, there is no jimple body and only Baf Body. Is there some library available for Baf to Jimple transformation, or I need to do it manually. 

The problem you describe has nothing to do with Baf. It would be the same for Jimple.

Cheers,
Eric


More information about the Soot-list mailing list