[Soot-list] identify calls on local objects with Jimple?

Patrick LAM plam at sable.mcgill.ca
Fri Aug 12 10:47:14 EDT 2005


Christian Lindig wrote:
>
> We like to classify method calls into calls on local objects versus
> calls on non-local objects. A local object is created inside a method
> and is not a parameter or held in a static variable. Is there a good way
> to do this in Jimple, at least approximately?
>
> Just because an object is held in a local register (like r7) this does
> not guarantee that the object was created locally. It seems, that all
> objects are loaded into a local register before a method call and thus
> this is too simple.

It depends on what accuracy you'd like.  A simple intraprocedural analysis
to propagate the set of objects that have been 'new'ed is pretty simple to
implement, but might not be as precise as you'd need.  If you're looking
for something more complicated, you might want something like a variation
of purity analysis.

pat





More information about the Soot-list mailing list