[Soot-list] Control Flow Graph representation

Bruno Harbulot bruno.harbulot at cs.man.ac.uk
Fri Jun 10 08:38:27 EDT 2005


Hello,


The javadoc for soot.toolkits.graph.ExceptionalUnitGraph says:
"For every Unit which may implicitly throw an exception that could be 
caught by a Trap in the Body, there will be an edge from each of the 
excepting Unit's predecessors to the Trap handler's first Unit (since 
any of those predecessors may have been the last Unit to complete 
execution before the handler starts execution)."

Our FOAL2005 paper [1], in Section 7, talked briefly about an example 
from [2]. I was suggesting a work-around to make the corresponding CFG 
reducible by introducing a pseudo-node just before a node representing 
an excepting Unit: the exceptional edge would come from that pseudo-node 
instead of the previous non-excepting node.

How feasible would it be to extend ExceptionalUnitGraph to have this 
kind of structure? Is it possible to have "empty" nodes in a UnitGraph?
Maybe introducing nop units outside the trap range would help, but this 
would require to change the body beforehands, and not only its graph 
representation.
Would it be reasonable to assume that, using such a representation, the 
control flow graph of methods in classes generated by javac (no goto) 
are always reducible?


Best regards,


Bruno.




[1] Bruno Harbulot and John R. Gurd. A join point for loops in AspectJ. 
  Proceedings of the 4th workshop on Foundations of Aspect-Oriented 
Languages (FOAL 2005). Chicago, USA, March 2005.
<http://www.cs.iastate.edu/~leavens/FOAL/index-2005.shtml>
<http://www.cs.man.ac.uk/cnc/students/harbulob/>

[2] J. Miecznikowski and L. Hendren. Decompiling Java
bytecode: Problems, traps and pitfalls. In Proceedings
of CC’02, 2002.


More information about the Soot-list mailing list