[Soot-list] Should CFG be used for transformation

Khanh Nguyen khanhtn1 at uci.edu
Mon Oct 28 15:15:47 EDT 2013


Dear All,

I have a transformation that operates on Jimple. Up to now, in my
transformation, I consider the method body as straight line of codes. Thus,
I just loop thru the units in the body in top-down manner and perform my
transformation accordingly. The result is the new class.

However, I'm concerned whether doing this would create problems (what
problems, I dont know) A suggestion to me was to use the CFG instead. I.e.,
get the original CFG, clone it (to preserve the same flow structure) then
going inside each basic block and still perform the transformation on each
unit in the basic block, the transformed units will be put in the
correspondent basic block in the clone version.

Obviously, the latter method involves serious interference with soot since
UnitGraph doesnt offer methods to do what I need.
So soot experts, do you think CFG is needed? I do not believe CFG is needed
(but again, I'm new with soot, I dont know what kind of problems could
arise by doing straight-line transformation)
Furthermore, CFG requires a body to work on, if I just clone the CFG and
then change the statements in the CFG, isnt it the same as considering the
body as straight line of codes?

Thank you,

Khanh Nguyen
UC Irvine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20131028/2b9eda39/attachment.html 


More information about the Soot-list mailing list