[plt-scheme] #%app and tail recursion
On Wednesday, July 16, 2003, at 05:13 PM, Stefan Ottosson wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Hi,
>
> I need to keep track of environments and when they are created. It
> seems I
> can do this with #%app. But I also need to know when a procedure call
> is
> tail recursive. Is there a way to tell when it is and isnt?
Have you looked into continuation marks? If what you want is a
mechanism to
track environments while preserving tail-cursion --- that is,
environments attached
to frames that made tail-cursive calls should disappear --- then
continuation-marks
are your solution.
You wouldn't be implementing a debugger, would you?
See the docs for continuation marks, and my paper on the topic
('Modeling an Algebraic Stepper,' available at
http://www.ccs.neu.edu/scheme/pubs/).
And if you _are_ building a debugger, keep me posted!
john clements