[Soot-list] Using the demand driven points-to analysis

Eric Bodden eric.bodden at mail.mcgill.ca
Mon Jul 13 15:46:08 EDT 2009


> However, I'm having some problems. First of all, do I need to enable whole-program analysis in order to get Spark to work? I know Paddle requires it, but I didn't see it mentioned anywhere whether Spark needs it as well. If I don't enable it, I get the dumb pointer analysis version, and not demand driven implementation.

Yes, it needs to be enabled. Spark is a whole-program points-to
analysis framework.

> If I do enable whole program analysis, the analysis of even the simplest program takes almost a minute (because it parses all the java.* and com.sun.* packages). Can I make the whole program analysis not go through the library classes?

Nope, as of yet there is no support for this. Unfortunately, even a
simple HelloWorld program causes about a thousand methods to be
called. Hence, all these methods and classes need to be analyzed by
Spark.

> And, finally, I'm also encountering a lot of temp$ variables, which I thought (after reading this: http://www.sable.mcgill.ca/pipermail/soot-list/2009-April/002285.html) would go away by the time Spark analyzes the program. This is especially true of
> array accesses, where arr[0] becomes temp$1[temp$2], which is pretty difficult to track.
>
> I've tried finding some answers in the mailing list archives, but apart from the temp$ issue (which doesn't seem to be working for me, as I'm using the default options for Soot), I couldn't find the others.

One can eliminate some of the $temp variables through copy propagation
and constant folding. However, some still need to be in place. The
reason is that Jimple is a three-address code with certain (specially
designed) restrictions. One restriction is that, for example, one can
perform array  or field accesses or method calls only on local
variables, not on any other (more complex) values. Hence, the Java to
Jimple conversion breaks down "complex" expressions such as "arr[0]"
into simple statements such as...

$t1 = arr;
$t2 = 0;
$t3 = $t1[$t2];

Eric
-- 
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada


More information about the Soot-list mailing list