[Soot-list] Problems with LoopFinder

Kelvin Tian kevinn.tian at gmail.com
Tue Sep 29 11:31:18 EDT 2009


Dear Eric,

     OK, I'll try to write a custom version myself.  Thanks for the
consistent help!


--
Best regards,
Kelvin



On Tue, Sep 29, 2009 at 11:24 AM, Eric Bodden <
bodden at st.informatik.tu-darmstadt.de> wrote:

> Hi Kelvin.
>
> Yes, that's the standard definition of a loop. (from the Dragon Book
> etc.) I know it's not always what one wants, but if not then one just
> has to write a custom version of LoopFinder.
>
> Eric
>
> 2009/9/29 Kelvin Tian <kevinn.tian at gmail.com>:
> > Dear Eric,
> >
> >     Yes, I checked the Jimple code, in the loop body there are three
> places
> > that jump back to the loop header, but there's only one loop essentially.
> > LoopFinder finds loops based on the following logic, if a statement's
> > dominator contains the statement's successor, then that successor will be
> > the loop header. So in this case, for a single loop, LoopFinder will
> > identify as many loops as the number of places that jump back to the loop
> > header. Is that right?  Thanks for the reply!
> >
> >
> > --
> > Best regards,
> > Kelvin
> >
> >
> >
> > On Tue, Sep 29, 2009 at 4:28 AM, Eric Bodden
> > <bodden at st.informatik.tu-darmstadt.de> wrote:
> >>
> >> Kelvin did you look at the Jimple code? It could well be that this
> >> method does have three possible loops, due to the exceptional flow.
> >>
> >> Eric
> >>
> >> 2009/9/28 Kelvin Tian <kevinn.tian at gmail.com>:
> >> > Hi,
> >> >
> >> >   I'm not sure whether this is a possible bug with LoopFinder, but
> when
> >> > I
> >> > tried to use LoopFinder to find loops in jvm benchmarks. I found some
> >> > loops
> >> > are identified by soot for more than one times.  One typical loop is
> >> > like
> >> > below.  I just compile it, and use LoopFinder to identify the loops.
> >> > Although there's only one loop in main(), LoopFinder identifies three
> >> > loops,
> >> > which all point to the same location.  This seems very strange to me,
> >> > and I
> >> > couldn't figure out what's the possible reason.  Thanks for any
> >> > suggestions!
> >> >
> >> >
> >> > ======================
> >> > import java.io.*;
> >> >
> >> > class Test2 {
> >> >
> >> >     public static void main(String args[]){
> >> >
> >> >              int numObj = 0, ObjID = 0;
> >> >
> >> >              try {
> >> >                     DataInputStream infile = new DataInputStream(new
> >> > FileInputStream("test"));
> >> >
> >> >                     String input;
> >> >
> >> >                     while ((input = infile.readLine()) != null) {
> >> >
> >> >                             if (input.equals("camera {"))
> >> >                                     numObj++;
> >> >                             else if (input.equals("point_light {"))
> >> >                                     ObjID++;
> >> >                     }
> >> >                     infile.close();
> >> >              } catch (Exception e) {
> >> >                     System.err.print("IO Error!\n");
> >> >              }
> >> >
> >> >     }
> >> >
> >> > }
> >> >
> >> >
> >> > --
> >> > Best regards,
> >> > Kelvin
> >> >
> >> >
> >> > _______________________________________________
> >> > Soot-list mailing list
> >> > Soot-list at sable.mcgill.ca
> >> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Eric Bodden
> >> Software Technology Group, Technische Universität Darmstadt, Germany
> >> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
> >> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
> >
> >
>
>
>
> --
> Eric Bodden
> Software Technology Group, Technische Universität Darmstadt, Germany
> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20090929/8f0c1e62/attachment.html 


More information about the Soot-list mailing list