[Soot-list] Error in Shimple
Ishan Khot
ishankhot.ik at gmail.com
Mon Jun 24 08:10:59 EDT 2013
Hello Soot List,
I tried to convert the following java code to extended shimple(SSI) and the
program goes into an infinite loop.
public class ShimpleTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int x = 100;
boolean doIt = true;
if(doIt){
if(x < 200){
x = 100;
}
else{
x = 200;
}
}
System.out.println(x);
}
}
The options I used to run soot are :
-cp . -pp -process-dir bin -d SootOutput -f shimple -p shimple extended:true
I also did a little debugging on soot and found that the following piece of
code is responsible for causing the infinite loop in the class
ShimpleBodyBuilder
public void transform()
{
phi.insertTrivialPhiNodes();
boolean change = false;
if(options.extended()){
change = pi.insertTrivialPiNodes();
while(change){
if(phi.insertTrivialPhiNodes()){
change = pi.insertTrivialPiNodes();
}
else{
break;
}
}
}
.....
The above while loop goes infinite with change = true and the
phi.insertTrivialPhiNodes() method keeps on inserting the same phi node
statement infinite times into a particular cfg block.
It would be great if someone could help me in removing this bug.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130624/5b8a1efc/attachment.html
More information about the Soot-list
mailing list