[Soot-list] How to get loop info?
TELKUNTE NIKHIL RAJENDRA cs16m028
cs16m028 at smail.iitm.ac.in
Tue Mar 13 00:28:28 EDT 2018
Hi all;
I am new to Soot. I am using LoopNestTree to find the loop.
// Note that I will be working with loops which have simple termination
// condition and incerement/decrement values
for(int i = 0;i<5;i++)
System.out.println(i);
But, What I want for my work is:
for the above loop I want
Start_i = 0;
End_i = 5;
Incr_i = 1;
Is there any way of getting this info.
I am getting the loop termination conditions using getLoopExits().
I think I can extract the End_i using that.
#Jimple for reference
i = 0;
label1:
if i >= 5 goto label2;
$r0 = <java.lang.System: java.io.PrintStream out>;
virtualinvoke $r0.<java.io.PrintStream: void println(int)>(i);
i = i + 1;
goto label1;
label2:
return;
Thanks,
--Nikhil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20180313/aef0a04b/attachment.html>
More information about the Soot-list
mailing list