[Soot-list] Unconditional branch statements

Tristan RATCHFORD tratch at cs.mcgill.ca
Tue Apr 13 10:44:00 EDT 2010


Hi Eric,

I'm definitely using it as a base. It shows how to navigate through the 
units But check out the code snippet:

          Iterator it = b.getUnits().iterator();
          while (it.hasNext())
          {
              Stmt s = (Stmt)it.next();
              Unit target = null;
              if (s instanceof IfStmt){
                  target = ((IfStmt)s).getTarget();
              }
              else if (s instanceof GotoStmt){
                  target = ((GotoStmt)s).getTarget();
              }
              else continue;
          }


It literally doesn't do anything. No targets are updated.

Tristan


On 13/04/10 10:40 AM, Eric Bodden wrote:
> Hi Tristan.
>
>    
>> Thanks for the reply. I checked out the GotoEliminator and it doesn't do
>> anything (lol).
>>      
> Yes, I know, it won't solve your problem because it only eliminates
> unconditional branches. But I still though it would be worth looking
> at.
>
> Eric
>    



More information about the Soot-list mailing list