[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: def-use in SOOT ?
On Fri, 27 Jul 2001, Sandrine Sage wrote:
> I would like to know if SOOT is able to compute approximate/easy
> def-uses for some code under test. If not, does it already have built-in
> tools/methods that I could use to get def-use chains efficiently ?
If you have a JimpleBody, you can create new SimpleLocalDefs and
SimpleLocalUses for that body.
These classes live in soot.toolkits.scalar. The CompleteUnitGraph lives
in soot.toolkits.graph.
To get a SimpleLocalDefs, use the following code, assuming that b is your
JimpleBody.
LocalDefs ld = new SimpleLocalDefs(new CompleteUnitGraph(b));
pat