[Soot-list] Problems with LoopFinder

Kelvin Tian kevinn.tian at gmail.com
Mon Sep 28 17:16:04 EDT 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20090928/c12cd0ba/attachment.html 


More information about the Soot-list mailing list