An Executable Implementation of the Denotational Semantics for Scheme
Here you will find an executable implementation of the denotational
semantics for the Scheme language, as defined in R5RS. The program is itself
written in R5RS Scheme. Please follow the Documentation link below for
more information.
Core semantic functions from R5RS
This is the plain code, as converted from R5RS:
For a more richly documented and cross-referenced version of this code,
see the next heading below.
The above code is a direct translation from the corresponding R5RS sections.
By itself, this code will not run - it requires supporting functions,
not defined in R5RS. To provide a usable program to demonstrate the semantics
in action, a small sample interpreter has been developed around the core
semantic functions. This is documented in the link below.
The above link takes you to a fully cross-referenced, syntax highlighted
version of all source code and associated documentation. If you'd
like to understand more about this implementation, that's the place to start.
Downloads
The following links are archives of the full Scheme source code to the
R5RS semantics and the sample interpreter. Any reasonably standard
Scheme implementation should be able to run this program, with no configuration
required. The source archives contain a README
which provides instructions on running the sample interpreter. Note
that the full documentation above is not yet included in the source distribution.
Generated Denotational Semantics
The Scheme code for the R5RS functions was processed via Christian Queinnec's
L2T tool to produce
a traditional denotational representation, similar to the one provided by
R5RS. The results of this translation can be seen in the following
links. [Note: the PDFs below may not load correctly in Microsoft
Internet Explorer. They should load in Adobe Acrobat.]
- With traditional if / then / else: {temporarily unavailable}
- With McCarthy conditional arrows, as in R5RS: PDF
If you have any questions or comments, please email Anton van Straaten.