[Soot-list] Soot method transformation

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Thu Aug 25 09:02:31 EDT 2011


Hello.

> By this transformation, I want to do some shared variable privatization. For
> example, here 'o' is a shared variable, while 'o1' is a local
> variable. Either transforming an old method or making a fresh one is fine to
> me. The key thing is that I have to correctly handle to control flow.

Actually Soot already contains a local-variable splitter (phase jj.ls)
that does exactly that.

> An easy way to do this is to directly operate the basic blocks in the CFG.
> Since Soot does not support it, I will proceed at the statement-level (just
> as what you suggested, inserting/removing/updating statements in the
> JimpleBody is surely doable).

Try the above code first. Maybe you can just use it or modify it to your needs.

Eric


More information about the Soot-list mailing list