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

Richard Xiao richardxx at cse.ust.hk
Wed Jun 2 05:45:47 EDT 2010


Hi, Tobias:

Wonderful solution!
Thanks in advance for your detailed explanation, it works correctly now, :)

Regards,
Richard


On Wed, Jun 2, 2010 at 5:22 PM, Tobias Gutzmann <tobias.gutzmann at lnu.se>wrote:

> 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
> >
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
One day I met you then love appear to the world.
The girl devotes her whole life to the man, for the one who is worth to.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100602/fe1c5b3b/attachment.html 


More information about the Soot-list mailing list