[plt-scheme] eval

From: John Clements (clements at brinckerhoff.org)
Date: Tue Jan 14 09:31:56 EST 2003

On Tuesday, January 14, 2003, at 04:40  AM, Carlos Pita wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Hi!
>
> I´m using mzscheme since a few days and I´m relatively
> new to scheme. Looking for a way to do some debugging
> I discovered that getting a (current-environment) is
> not well seen by most schemers. I don´t disagree with
> performance arguments neither with stuff of the
> usually-there-is-a-better-way-to-do-it kind. But it
> would be really really nice to be able to (eval exp
> env) an arbitrary expression exp in the current
> environment env in an
> interactive/interpreted/debugging context. Would this
> still impose a performance penalty for compiled code
> that doesn´t use it? I think it wouldn´t.
>
> Is it very difficult to add this feature to mzscheme?
> Do you think it is even desirable? Is there a better
> solution? (I don´t like instrumenting alla psd and the
> facilities for breakpoints and traces in slib are very
> rudimentary). How is the stepper in drscheme
> implemented?

Good question.  The stepper does use an "instrumenting" solution, but 
it differs from tools like PSD in that it uses a feature of mzscheme 
called 'continuation marks' which allow the debugging code to inspect 
certain aspects of the continuation.  Unlike a tool like PSD(?) or 
Tolmach's debugger for ML, instrumenting with continuation marks does 
not require adding an argument to all procedures.  This means that 
instrumented code can interoperate with uninstrumented code.  This 
means that it should be straightforward to write a debugger using 
continuation marks that uses a mix of instrumented and plain code.  
Parts of this debugger are written, and anonymous CVS users can see 
this tool (contact me if you're interested).  Currently, the debugger 
lacks a 'single-stepping' facility, and has just about the most 
rudimentary user interface you've ever seen.  Basically, you get 
continue, backtrace, frame, and variable values.  OTOH, the ui takes 
the form of a REPL, so it's arbitrarily extensible...  This is a work 
in progress.


john clements
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2190 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20030114/34ede3ef/attachment.bin>

Posted on the users mailing list.