PLI Lecture 7
Runtime environments I: Meta-circular Scheme interpreters

Expressions, environments, Scheme interpreters.

1. SCHEME

See my few Scheme examples.

References:
* schemers.org
* Matthias Felleisen, Robert Bruce Findler, Matthew Flatt and 
  Shriram Krishnamurthi, How to Design Programs, MIT Press, 2001
* Daniel Friedman and Matthias Felleisen, The Little Schemer,
  Fourth edition, MIT Press 1995.
* Kent Dybvig, The Scheme Programming Language, Third Edition, 
  Prentice Hall, 2003.
* Revised^5 Report on the Algorithmic Language Scheme

Implementations:
* Guile, available on most GNU/Linux systems, including dwarf
* DrScheme, simpler, available on all common platforms
* Scm, available on every platform with a C compiler
* Chez Scheme, efficient, available on all common platforms

2. META-CIRCULAR SCHEME INTERPRETERS

* Constant expression evaluator
* Constant expression evaluator with table of primitive functions
* Let-expression evaluator with environments (redundant, see next item)
* Let- and let*-expression evaluator with environments
* Scheme evaluator using dynamic binding
* Scheme evaluator using static binding
* See Lecture 12 for further material.

Focus on interpreters 2, 4 and 6 of this list.

Examples:
* Simple let- and let*-expression examples
* Simple example to distinguish dynamic and static binding

References:
* Hal Abelson and Jerry Sussman, Structure and Interpretation 
  of Computer Programs, Second Edition, MIT Press, 1996.
* Daniel Friedman, Mitchell Wand and Christopher Haynes,
  Essentials of Programming Languages, First Edition (MIT Press, 1992),
  Second Edition (MIT Press, 2001).