[Soot-list] how does infoFlowAnalysis handle interfaceinvoke ?

Patrick LAM plam at cs.mcgill.ca
Tue Aug 19 15:01:42 EDT 2008


jiangfan shi wrote:
> Thanks for your pattern. This gives me another way to add these edges
> into the call graph by using CHA.
> 
> I did three small experiments as following:
> 
> 1. I use CHA option
> -w -main-class hello.helloworld -p cg.cha on  -f jimple --app hello.helloworld
> 
> The core source code is the following:
>                 helloworld3 hw33=new helloworld3();
> 		helloworld hw=new helloworld(hw33);
> 		new myinter1();
> 	        hw33.setup(null);
> 		hw.start();

Hi jiangfan,

You may be looking for the -process-dir option. For instance, if I run 
Soot with -process-dir ., with just the 'hello' directory as a 
subdirectory and just the classfiles in that directory(*), then it will 
explicitly load myinter1 and myinter2; otherwise, it won't process 
myinter1 and myinter2 at all. -process-dir tells it to read all of the 
files in the directory that you specify, which seems to be what you want.

In general, Soot will start with the main class and read all of the 
classes that are explicitly referred to in that main class. (In 
particular, it snarfs classes that are explicitly referred to by name). 
In your original example, there is no reference to inter2 or inter1, so 
those classes aren't loaded. If you modify your example to simply add 
declarations of inter1 and inter2, for instance:

	myinter1 a;
	myinter2 b;

then it will load myinter1 and myinter2.

If it were RTA, then it would only load myinter1 and myinter2 after it 
saw new statements for myinter1 and myinter2. Because it's CHA, it uses 
  references to the myinter1 and myinter2 classes to determine when it 
should load them.

I hope that makes sense!

pat

(*) What I mean here is that you have to remove extra stuff for 
-process-dir to work properly. I struggled with it loading the sample 
transformation as well, until I removed everything but the class files.


More information about the Soot-list mailing list