[plt-scheme] two tool ideas

From: Neil W. Van Dyke (neil at neilvandyke.org)
Date: Fri Feb 14 06:55:16 EST 2003

I'd been muddle-headedly using a recursive-function idiom I picked up
years ago from a CL implementation that (much to my shame) doesn't seem
to be valid R5RS: essentially treating `cons' as a special form that
both evaluates its arguments in order and treats the second argument as
a tail position.  Half a dozen Scheme implementations humored me wrt
eval order, and it took a debugging session with MIT Scheme to confront
me with the brutal truth...

This experience suggested two tool ideas:

1. A useful companion to PLT's evolving test suite framework would be
   alternate interpreter modes that would vary interpreter behavior
   within the bounds of the language definition.  For example, after a
   test suite passes using the interpreter's normal argument evaluation
   order behavior (which I suspect in many implementations is usually
   in-order or otherwise predictable), the test execution tool could run
   N more passes of the suite using randomized evaluation order.  There
   may be other unspecified implementation behavior for which varying
   the actual behavior would be useful.

2. For educational purposes, a DrScheme "Show Tail Positions" feature,
   akin to (or integrated with) the "Check Syntax" feature, that uses
   syntax highlighting to indicate all tail positions that can be
   determined statically.  (I've actually thought for awhile this would
   be useful for students doing their first recursion homework, but
   didn't realize I needed it myself.)


Posted on the users mailing list.