[Soot-list] Adding ENTRY/EXIT to CFG

shmohtasham at gmail.com shmohtasham at gmail.com
Tue Feb 9 16:20:49 EST 2010


Hi,

To work properly, some control flow graph algorithms add an ENTRY node  
to the beginning of CFGs and an EXIT node to the end. The Entry has  
one outgoing edge to the EXIT and one outgoing edge to the start of  
the method body (the first node(s) of the actual CFG). Also, the  
actual end nodes of the CFG are connected to EXIT node. Intuitively,  
ENTRY represents whatever condition that causes the method body to  
execute.

I'd like to add the ENTRY/EXIT nodes to the CFGs produced by Soot;  
however, since the graphs given by Soot are "views" into the method  
body (immutable), one would need to change the method body in order to  
do this. Maybe adding a pair of "nop"s at the beginning and end of the  
body is harmless, but I'm not sure if this would break any internal  
assumptions within Soot. Obviously, I don't want to break the other  
parts of the Soot, which I'm using! I was wondering what the best way  
is to do this.

I appreciate your help and advice on this.

Cheers

--Hossein




More information about the Soot-list mailing list