[Soot-list] soot always requires StringBuilder class, but this class is never used

Tobias Gutzmann tobias.gutzmann at lnu.se
Wed Jun 2 05:22:32 EDT 2010


Hej,

If the generated classes are for 1.5 or 1.6 (which is default if you use
a compiler from the 1.5 or 1.6 JDK), then each string concatenation, e.g.,
   "a is " + e;
uses a StringBuilder; it's generated by the compiler. Older Java
compilers use the class StringBuffer instead.
Solution: Use an old compiler, or (with a current compiler) compile the
program with
javac -source 1.4 -target 1.4 <standard arguments>
in order to generate class files that are targeted at 1.4
(alternatively, exchange both arguments with 1.3).

However, if the source code is written for 1.5, that's not possible.
Then you need to go back to older versions of the programs that still
worked with 1.3/1.4.

Hope this helps!
Regards,
Tobias

On 2010-06-02 11:09, Richard Xiao wrote:
> Dear all:
>
> I have some problems in compiling the benchmarks with soot.
> I plan to do a points-to analysis experiment, and the first step is to
> run spark to general a call graph. According to the instructions, I
> use JDK 1.3 for my purpose. Thus, here comes my problem:
>
> I cannot compile the software "polyglot" under the JDK1.3, even 1.4.
> The reason is, soot requires the "StringBuilder" which is first
> appeared in JDK 1.5. However, as I manually search for the source
> files, I found no reference to  "StringBuilder". Therefore, I'm
> wondering how I can deal with this case in my experimental setting? I
> try this problem because it is one of the benchmark both in Lhotak's
> paper "Context-Sensitive Points-to Analysis: Is It Worth It?" and
> Guoqing Xu's paper " Merging Equivalent Contexts for Scalable
> Heap-Cloning-Based Context-Sensitive Points-to Analysis".
>
> This problem also occurs for "jlex", which is a tiny program. I
> guarantee there's no use of StringBuilder.
>
> Please help me with this question if guys you know the solution.
> Thanks very very much~
>
> Regards,
> Richard
>



More information about the Soot-list mailing list