[Soot-list] a possible problem for LoopFinder
Peng Li
lipeng360 at gmail.com
Mon Jan 28 19:57:41 EST 2008
HI
I am using the soot build-in
LoopFinder(soot.jimple.toolkits.annotation.logic.LoopFinder) to
identify all the loops in my code. However, I found there is a problem
for this LoopFinder.
If a loop happens at the end of a method and there is no more code
after the loop, the LoopFinder is not able to find that loop. For
example, in the following two methods , methodA and methodB, the
LoopFinder is no problem to find the loop in the MethodB because
there are some code after the loop. However, the LoopFinder cannnot
find the loop in MethodA
MethodA ()
{
for (int i=0; i<10; i++)
{
int k=0;
k++;
}
}
MethodB ()
{
for (int i=0; i<10; i++)
{
int k=0;
k++;
}
System.out.println("find loop");
}
We tried to trace the problem by looking the source of the LoopFinder,
which used MHGDominatorsFinder to find all the loops, but it seems
that there is no reason why the loop in MethodA cannot be found...
Cheers
Peng
More information about the Soot-list
mailing list