next up previous
Next: Caveats and Limitations Up: Psd - a Portable Previous: Catching Runtime Errors

Tail Recursion and Continuations

In Scheme, iteration is expressed as tail recursion. It is important that the debugger maintains this property whenever possible, because otherwise a debugged program might easily run out of memory. During single stepping Psd does not preserve tail recursiveness (because of the way single stepping is implemented), but in other situations it is preserved.

Tail recursiveness could be fully preserved by using breakpoints to implement single stepping. This would add some complexity, though, and since it would take quite a time to run out of memory by single stepping a program by hand, it has not been judged worth the effort.

First class continuations are not a problem, since they are handled by the underlying Scheme environment.



Gary T. Leavens
8/19/1997