[Soot-list] Re: Escape analysis

Chris Pickett chris.pickett at mail.mcgill.ca
Tue Sep 21 19:23:14 EDT 2004


Archie Cobbs wrote:
> Dear Soot gurus,
> 
> I'm interested in doing a simple analysis of Jimple bodies for escape
> analysis. Specifically, for each "new" statement in a method body,
> I'd like to determine if any of the following is true of the newly
> created object:
> 
>   - it can be assigned to any field (static or instance)
>   - it can be assigned to an element of an array
>   - it can be passed as a parameter to any method
>   - it can be returned or thrown
>   - the "new" statement is possibly within some execution loop (*)
> 
> (*) optional but would be nice to know
> 
> The point of this is to determine if the new object can be allocated
> on the stack, i.e., when the method returns (normally or otherwise)
> the object is proven to be no longer reachable.
> 
> I'm looking for a basic, high level description of the most appropriate
> way to do this, e.g., which Soot tools to use, and maybe some example
> code to look at performing some similar task.

This is probably available in Flex (see Martin Rinard's publications), 
and it might be worth looking at if you're going to write it in Soot. 
At some point in the next year (?) I might do the same thing for their 
purity analysis (which is related).

Cheers,
Chris


More information about the Soot-list mailing list