A declaration of interest: Minty Scheme.

23 views
Skip to first unread message

Martin Rodgers

unread,
Nov 14, 2021, 6:07:15 AM11/14/21
to scheme-re...@googlegroups.com
My interest in R7 is simple. I'm writing a self-hosting, whole-program
Scheme-to-C compiler in R7.

Thanks,
Martin Rodgers

Don Taylor

unread,
Nov 14, 2021, 8:02:46 AM11/14/21
to scheme-re...@googlegroups.com
You've piqued my curiosity. Are you talking about creating a metacircular evaluator in C and then passing the Scheme program to the evaluator as input or are you talking about actually converting the Scheme to C and compiling the result? Or are you looking at combining the two methods and translating the Scheme to some intermediate language that would be much faster to execute in a C-based evaluator? 

                                      
Don Taylor
Sr. IT Architect
614-284-0397
http://lh3.googleusercontent.com/-JLOiljSTVs0/Tx6wSgDmftI/AAAAAAAAABI/hbhyA0DjgjU/s32/linkedin-png32.gifhttp://lh6.googleusercontent.com/-BjyWFLdn-2Q/Tx6whzd0RtI/AAAAAAAAABQ/w4-A_3OpXRs/s32/twitter-png32.gifhttp://lh5.googleusercontent.com/-af6k6Y6TKYA/Tx6wn8XfeVI/AAAAAAAAABY/Lez-iC5ZT18/s32/wordpress-png32.gif


--
You received this message because you are subscribed to the Google Groups "scheme-reports-wg2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-wg2+unsub...@googlegroups.com.

Martin Rodgers

unread,
Nov 14, 2021, 9:53:23 AM11/14/21
to scheme-reports-wg2
It's called Minty, short for Minty Is Not There Yet. It's designed to be self-hosting, but of course it needs bootstrapping. The only currently supported bootstrap hosts are Chibi and Larceny.

While Minty has no code generater yet (please recall the meaning of the name), it now has a full runtime system written in Scheme. The generated C code will use libguile. I'm currently working on the inliner. This requires only a very small degree of meta-circularity. See the inliner section of Oscar Waddell's Phd thesis. There is, however, a high degree of syntax abstraction, reflection and reification.

For practical reasons, Minty will not be supporting syntax-case. It may be possible to do so, but the effort at this point would take much more work than for other R7 implmentations like Chibi and Larceny. Minty doesn't use that model at all. Minty has only a minimal (scheme eval) to support the inliner, mapping symbols to procedures. Syntax transformers are instead combinator-compiled from denotations
, after parsing syntax-rules expressions. Supporting syntax-case in Minty would therefore require a combinator compiler for Scheme itself, and a compatible runtime system.

Likewise, supporting a full (scheme eval) would require a lot more work. It would be a full R7 implementation written in R7. It would not be a part of Minty at all, as it can only exist at runtime, and Minty only only exists at compile time. The only runtime code will be libguile, and while that has eval, it can't be used by Minty. So Minty must omit syntax-case and eval, at least until I can say I've done enough work on everything else.

Today Minty can merely parse itself and runtime system, and produce a diagnostic output for the AST. This looks like a giant Scheme expression for the compiler and all the library code it imports. This will look very different after inlining, of course.

Apologies for the length of this post, but I believe these details are needed to explain why Minty won't be supporting syntax-case. However, so long as R7's syntax-case makes no assumptions about internal representations of syntax objects, it *may* be possible to add syntax-case at a later date. I only require that Minty be bootstrapped by an R7 host. I can't claim strict R7 compliance for Minty itself, but I want to get as close as I can.

Taylan Kammer

unread,
Nov 14, 2021, 1:47:05 PM11/14/21
to scheme-re...@googlegroups.com, Martin Rodgers
On 14.11.2021 15:53, Martin Rodgers wrote:
> It's called Minty, short for Minty Is Not There Yet.
When you release 1.0, you should call it "Minty Is Now There, Yay!" :-D

--
Taylan
Reply all
Reply to author
Forward
0 new messages