[Soot-list] Soot method transformation

Jeff Huang jeffwalt630 at gmail.com
Wed Aug 24 10:41:55 EDT 2011


Dear Friends:

Basically I want to automatically transform the following method m1()
to method m2():

m1()
{
   if(o==null)
   {
      o=new MyObject();
   }
   o.f();
}

m2()
{
    o1=o;
    if(o1==null)
    {
       o=new MyObject();
       o.f();
    }
   else
   {
       o1.f();
   }

}

One way I am thinking of is to first construct the CFG of m2() based on that
of m1(), and then make m2() using the constructed CFG. Currently I have two
questions:
1. Does Soot support CFG manipulation, e.g., block&edge insert, delete,
clone? If not, is there any easy way to achieve that?
2. Is it be possible to make a Soot Body from a CFG?

Any input is appreciated:)

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20110824/a76e68bb/attachment.html 


More information about the Soot-list mailing list