Scheme Substitution Model
Notes on the Scheme Substitution Model
(pdf)
Pattern Matching Code
- match.scm. Procedures for pattern
matching with "context variables," as explained at the beginning
of the file.
-
eliza.scm Procedures for a minimal
"doctor" dialog program based on
pattern matching. Illustrates use of "tilde" variables that match any
number of items in a list; does not use context variables. Load
"match.scm" before evaluating this file.
-
deriv-simplify-rules.scm Procedures for
simplifying arithmetic expressions with simple derivatives, as
explained at the beginning of the file. Load "match.scm" before
evaluating this file.
Scheme Substitution Model
-
sm.scm A Scheme Substitution Model interpreter
based on pattern-matching rewrite rules. This file begins with a brief
intro to the Scheme Substitution Model, along with further instructions
for running the interpreter. Use a Loader file to load the
interpreter.
- Loader files for the Interpreter (choose one):
-
mitscheme-loadsm.scm: To run the Scheme
Substitution Model interpreter described in
sm.scm
using MIT Scheme, evaluate this load-file in a
directory containing match.scm and sm.scm. (Make sure your Edwin/Emacs *scheme* buffer also has this directory as its
working directory, (see (pwd) and (cd "filename") in the MIT Scheme references).
- test-submodel.scm, politician.scm:
Sample expressions to evaluate in the Substitution Model.
Scheme information
The Scheme information site is
http://www.schemers.org/.
In particular, the latest official Scheme specification is in the Revised^5
Report on the Algorithmic Language Scheme, also available in
pdf.
This document last modified