[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying loop body



Hi,

There is a LoopFinder analysis in the development version of Soot that you
could use. It produces a map for each method with the loop header as the
key and a list of all the statements in the loop as the value. To get
Soot from subversion follow the instructions at

http://www.sable.mcgill.ca/soot/#svn

The LoopFinder can be found in soot/jimple/toolkits/annotation/logic/

Jennifer

On Sat, 17 Jul 2004, Oksana I Tkachuk wrote:

> Hello,
>
> I am working on an analysis where I need to identify loops and then
> traverse them again to identify whether they contain a path with certain
> properties. I can identify the first statement of a loop using a dfs-like
> procedure on a method control flow graph. The problem is to identify the
> loop body. When processing loops, I want to make sure I don't jump outside
> the loop body.
>
> I understand that there are three types of Java statements that generate
> loops on Jimple level: while, do-while, and for-loop. Are there more?
> You also have Dava decompiler that can identify loops and convert them
> back to Java structures.
>
> I think, soot should have enough info for me to identify the loop body but
> I am not sure which way is the best.
>
> Hope you can help,
> Oksana.
>
>
>
>
>