[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: def-use in SOOT ?



Just remind by my experience on SOOT, SimpleLocalDefs is only for local variables within one method. For interprocedural def-uses information, and def-uses of fields/reference, you need to do those analysis yourself.

Hongjun

----- Original Message ----- 
From: "Patrick LAM" <plam@sable.mcgill.ca>
To: "Sandrine Sage" <sandrine@step.polymtl.ca>
Cc: <soot-list@sable.mcgill.ca>
Sent: Friday, July 27, 2001 12:12 PM
Subject: 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
> 
>