[r6rs-discuss] Interpreters need not apply?

Abdulaziz Ghuloum aghuloum at cs.indiana.edu
Wed Mar 7 02:39:33 EST 2007


On Mar 6, 2007, at 2:10 PM, Andre van Tonder wrote:

> On Tue, 6 Mar 2007, Aubrey Jaffer wrote:
>
>> By requiring phased processing of libraries, R5.92RS has
>> disenfranchised "pure interpreters", apparently for the sake of
>> macros.
>
> This is not accurate.  At least one of the reference  
> implementations of libraries and macros, at
>
>   http://www.het.brown.edu/people/andre/macros/index.html
>
> runs as is in both the MzScheme and the Petite Chez interpreters'  
> REPLs, using only the ability of these implementations to interpret  
> vanilla r5rs code.  It is straightforward to port (and prior  
> versions have been ported) to other vanilla r5rs Scheme systems.   
> All that is needed to completely integrate with these interpreters  
> is to plug a call to the above expander at the appropriate native  
> slot between the R and E of the REPL.

As the person who wrote the second reference implementation, I say  
that Andre's notes are accurate.  An R6RS macro and library expander  
is simply a transformer taking the full-blown language (one  
containing libraries, library-global macro definitions, local macros,  
definitions, etc. etc.) into a simple language (containing lambda,  
variables, procedure calls, primitive calls, if, quoted constants,  
and set!).  This "core" language can be interpreted, compiled (for  
different architectures), serialized to disk, or done with as the  
specific implementation pleases. The core language can be tailored to  
the target implementation (for example, letrec is a core form in Chez  
Scheme, so it can be added to the core language, while lambda is not  
a core form in Ikarus so it gets dropped there).  The implementation  
of the macro expander is orthogonal to the evaluation strategy  
(compilation vs. interpretation) AFAICT.

Aubrey, what's this class of "pure interpreters" that you're  
concerned about?  How do they semantically differ from say petite,  
csi, gsi, mzscheme, guile, gosh, rscheme, etc?

Aziz,,,




More information about the r6rs-discuss mailing list