6.844 | Spring 2003 | Graduate

Computability Theory of and with Scheme

Tools

Scheme software is required to run the .scm files in this section. The .ini and .edwin files in this section are customization files that can be loaded into Edwin, the MIT Scheme text editor.

Scheme Substitution Model

Notes on the Scheme Substitution Model (PDF)

Pattern Matching Code

  • match.scm (SCM) Procedures for pattern matching with “context variables,” as explained at the beginning of the file.
  • eliza.scm (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 (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 (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 (SCM): To run the Scheme Substitution Model interpreter described in sm.scm (SCM) using MIT Scheme, evaluate this load-file in a directory containing match.scm (SCM) and sm.scm (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)

    • drscheme-loadsm.scm (SCM): To run the Scheme Substitution Model interpreter described in sm.scm (SCM ) using Rice U. DrScheme, evaluate this load-file in a directory containing match.scm (SCM) and sm.scm (SCM)

    • other-loadsm.scm (SCM ): To run the Scheme “Substitution Model” interpreter described in sm.scm using a Scheme implementation other than MIT Scheme or DrScheme, FILL IN THE BLANKS in this load-file as appropriate to the implementation, and then evaluate this load-file in a directory containing match.scm (SCM) and sm.scm (SCM)

       

  • test-submodel.scm (SCM), politician.scm (SCM): Sample expressions to evaluate in the Substitution Model.
  • Submodel with parallel convergence operator CNVG? cnvg-loadsm.scm (SCM), cnvg-sm.scm (SCM)
     

Scheme Information

  • Buy at MIT Press Harold Abelson and Gerald Jay Sussman. Structure and Interpretation of Computer Programs, second edition. MIT Press, 1996. 657pp. ISBN: 9780262510875.
    • The MIT 6.001 course text, henceforth referred to as SICP. A masterpiece.
  • Buy at MIT Press Daniel P. Friedman and Matthias Felleisen. The Little Schemer, fourth edition. MIT Press, 1995. 216pp. ISBN: 9780262332545.
    • An elementary Scheme tutorial in dialog form.
  • Buy at MIT Press Daniel P. Friedman, Mitchell Wand, and Christopher T. Haynes. Essentials of Programming Languages. MIT Press, 1992. 536pp.
    • Programming language implementation in Scheme; a sequel to SICP.
  • Buy at MIT Press Brian Harvey and Matthew Wright. Simply Scheme. MIT Press, 1994. 583pp.
    • An intro to functional programming in Scheme designed as a prequel to SICP.
  • Max Hailperin, Barbara Kaiser, and Karl Knight. Concrete Abstractions. Brooks/Cole Publishing, c. 1999. 670pp.
    • An attractive alternative to SICP.
  • Vincent Manis and James Little.The Schematics of Computation. Prentice-Hall, 1995.
    • An attractive alternative to SICP.
  • George Springer and Daniel P. Friedman.Scheme and the Art of Programming. MIT Press, 1989. 617pp.
    • Intro to programming in Scheme comparable at a level comparable to SICP. Does not cover concurrency, interpreters or compilers; does cover control abstractions such as continuations.

Course Info

As Taught In
Spring 2003
Level