[Soot-list] Adding ENTRY/EXIT to CFG

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Wed Feb 10 04:08:13 EST 2010


Hello Hossein.

I would recommend first adding nops and then augmenting (i.e.,
wrapping) a control-flow graph into your "extended graph", which then
adds additional edges between these nops.

See InverseGraph for an example of wrapping such a graph:
http://www.sable.mcgill.ca/soot/doc/soot/toolkits/graph/InverseGraph.html

Eric

--
Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



On 9 February 2010 22:20,  <shmohtasham at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


More information about the Soot-list mailing list