[Soot-list] Soot method transformation

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Wed Aug 24 10:52:30 EDT 2011


Hi Jeff.

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

I am sorry but I think I am missing the point of this transformation.
Could you elaborate? In "o1=o" the value "o" is undefined.

Also, I am not sure whether you want to transform a method (updating
its code) or generate a new fresh method in addition to the old
method.

> 1. Does Soot support CFG manipulation, e.g., block&edge insert, delete,
> clone? If not, is there any easy way to achieve that?
Soot does not support manipulation in the CFG itself - the CFG is just
a view on a body of code. There is elaborate support, though, for
updating code within a JimpleBody (basically
inserting/removing/updating statements in a list of statements).

> 2. Is it be possible to make a Soot Body from a CFG?

No. It's always done the other way around. But usually, that's not a problem.

Eric
-- 
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt


More information about the Soot-list mailing list