[Soot-list] Back edge query

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Wed Mar 31 02:58:33 EDT 2010


Hi Dinesh.

The easiest way should be to use
soot.jimple.toolkits.annotation.logic.LoopFinder:

LoopFinder loopFinder = new LoopFinder();
loopFinder.transform(b);	
Collection<Loop> loops = loopFinder.loops();
for(Loop l: loops) {
  l.getBackJumpStmt();
}

Eric

--
Dr. 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



On 31 March 2010 07:27, dinesh chhatani <dinustudy at gmail.com> wrote:
> Hi,
>
> UnitGraph graph =new ExceptionalUnitGraph(body);
> gives me CFG.
> Now I can iterate over it using Iterator and fetch the Units(which are nodes
> in this CFG).
>
> Now if I want to know whether the given node branches or not,I can get by
> Unit.branches();
>
> The question is that,I want to know whether that Branch is back edge(while
> loops...) or edge of ' If else' ?How can I get this information through Unit
> or anything that u know.
>
> Thanks
> --
> Regards,
> Dinesh Chhatani
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>


More information about the Soot-list mailing list