[Soot-list] Stack and local values in Soot

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Tue Jul 20 04:07:26 EDT 2010


Hi Hal.

I would appreciate if you could send such emails to the soot mailing
list - other people have good ideas too.

Regarding your problem I would suggest to just formulate it without
the notion of a compute stack. You still have a control-flow stack
with stack frames (one for each method call) but there each frame only
has a set of local-variable slots. The values in these slots have to
be stored, plus the program counter.

Hope that helps,
Eric

--
Dr. Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



On 20 July 2010 04:37, Hal Hildebrand <hal.hildebrand at gmail.com> wrote:
> I have started to use Soot for the transformations I have been using ASM for and I am finding Soot to be quite useful.  However, one of the things I need to do is create a cheesy version of continuations.  I have been doing this in ASM and what I use is basically a symbolic interpretation of the method to determine precisely what is on the stack and the values of any live locals at a give method call site.  I was wondering how one would go about doing such a thing in Soot.  Given that the IR schemes are stackless, it would appear to be a little bit tricky and I was wondering if you had any suggestions.
>
> The continuation scheme I've implemented involves creating synthetic stack frame classes which are populated on continuable calls.  Upon continuation, the methods are reentered, the stack and locals repopulated from these frames, and then the continued method's return value is pushed to the stack.  Any pointers or alternate strategies suitable to Soot would be appreciated.
>
> Thanks,
>
> Hal


More information about the Soot-list mailing list