[Soot-list] New option -no-bodies-for-excluded for Soot

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Fri Jun 4 06:09:55 EDT 2010


Hello.

> But what's the difference between following two options?
> 1. Use -allow-phantom-refs and remove JDK classes from Soot's class path
> 2. Use -no-bodies-for-excluded, add JDK classes to Soot's class path
> (as we usually did) and add JDK classes to -exclude

Ok, let me try to explain.

Option 1 will not include any information at all about JDK classes.
(There can be no such information because the JDK is not even on the
classpath.) This can be problematic because then the analysis even
misses the entire type hierarchy of java.lang classes etc. For
instance, consider a method with a try/catch block that catches
RuntimeExceptions. To conduct its exception analsyis and construct a
correct control-flow graph for this method, Soot needs to know that
RuntimeException is a sub-type of Throwable, etc. With Option 1, this
won't work properly.

Option 2 *will* include JDK classes (and other excluded classes), but
it will only include hierarchy and signature information for those.
Now when analyzing a class C that uses such excluded classes, Soot
will be able to analyze this class correctly, because it has all the
necessary information about the signatures of outgoing method calls
and field accesses, and hierarchy information too. But at the same
time, because we load no bodies for excluded classes, Soot will not
consider any method calls that the excluded classes themselves
contain. This speeds up the analysis dramatically.

Hope that helps,
Eric


More information about the Soot-list mailing list