2022-08-03 16:15:15 -04:00
|
|
|
# PreScheme
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
|
|
PreScheme (also spelled Pre-Scheme) is a statically typed dialect of
|
|
|
|
Scheme that gives the programmer the efficiency and low-level machine
|
|
|
|
access of C while retaining many of the desirable features of Scheme.
|
|
|
|
|
|
|
|
The PreScheme compiler makes use of type inference, partial evaluation
|
|
|
|
and Scheme and Lisp compiler technology to compile the problematic
|
|
|
|
features of Scheme, such as closures, into C code without significant
|
|
|
|
run-time overhead. Use of such features in PreScheme programs is
|
|
|
|
restricted to those cases that can be compiled into efficient code.
|
|
|
|
|
|
|
|
Type reconstruction is done using a modified Hindley/Milner algorithm
|
|
|
|
that allows overloaded user-defined functions.
|
|
|
|
|
|
|
|
All top-level forms in PreScheme programs are evaluated at compile
|
|
|
|
time, which gives the user additional control over the compiler's
|
|
|
|
partial evaluation of a program.
|
|
|
|
|
|
|
|
PreScheme has been implemented and used to write a byte-code
|
|
|
|
interpeter and associated support code for a complete Scheme
|
|
|
|
implementation.
|
|
|
|
|
|
|
|
## Manuals
|
|
|
|
|
|
|
|
* [The Nearly Complete Scheme48 PreScheme 1.3 Reference Manual](1.3/)
|
|
|
|
|
|
|
|
## Implementations
|
|
|
|
|
|
|
|
### Scheme 48
|
|
|
|
|
|
|
|
### VLISP
|
|
|
|
|
|
|
|
No known public release.
|
|
|
|
|
|
|
|
### SPS
|
|
|
|
|
|
|
|
SPS is a Pre-Scheme to (GNU) C compiler written in Pre-Scheme.
|
|
|
|
|
|
|
|
Written in 1999.
|
|
|
|
|
|
|
|
[GitHub](https://github.com/nineties-retro/sps)
|
|
|
|
|
2022-12-02 05:24:37 -05:00
|
|
|
### Pre-Scheme for Guile
|
2022-11-18 17:07:15 -05:00
|
|
|
|
|
|
|
A port of Pre-Scheme from Scheme 48 to Guile.
|
|
|
|
|
|
|
|
Started in 2022.
|
|
|
|
|
|
|
|
[GitLab](https://gitlab.com/flatwhatson/guile-prescheme/)
|
|
|
|
|
2022-08-03 16:15:15 -04:00
|
|
|
## Research papers
|
|
|
|
|
|
|
|
From the MITRE Corporation:
|
|
|
|
|
|
|
|
* A Verified Compiler for Pure PreScheme (1991)
|
|
|
|
* The VLISP PreScheme Front End (1992)
|
|
|
|
* A Verified Run-Time Structure for Pure PreScheme (1992)
|
|
|
|
* The Revised VLISP PreScheme Front End (1993)
|
|
|
|
* The VLISP Verified PreScheme Compiler (1995)
|
|
|
|
* A Verified Compiler for Multithreaded PreScheme (1996)
|
|
|
|
|
|
|
|
From Kelsey:
|
|
|
|
|
|
|
|
* Pre-Scheme: A Scheme Dialect for Systems Programming (1997)
|