[Soot-list] get enclosing if statement

Eric Bodden eric.bodden at mail.mcgill.ca
Sun Oct 5 10:14:55 EDT 2008


There's different ways to go about this. You are right that the
information is not directly accessible but you can easily construct
it.

The easiest way seems to construct a UnitGraph, presumably an
ExceptionalUnitGraph and then do a backwards breath-first-search
through that graph. The first IfStmt that you encounter on this search
is the statement you are looking for.

Eric


2008/10/4 Sang Min Park <sangminp at cc.gatech.edu>:
> Hello,
>
> I want to get the nearest enclosing if-statement for an arbitrary soot Stmt.
> As far as I know, there is no predecessor, successor, or enclosing method
> information in soot statement.
>
> Do you have any idea on this problem?
>
> Thanks,
> Sangmin
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list