A DIRECTORY OF FILES USED TO RUN (TYPED) INTERPRETERS FOR SECOND EDITION OF THE BOOK ESSENTIALS OF PROGRAMMING LANGUAGES (File $Date: 2006/03/02 23:00:24 $) Gary T. Leavens Department of Computer Science, Iowa State University leavens@cs.iastate.edu 1. OVERVIEW The files in this directory go with the second edition of the book Essentials of Programming Languges,book by Friedman, Wand, and Haynes (MIT Press, 2001). They work under DrScheme (MzScheme) and Chez Scheme. This document describes some conventions and installation procedures. Note that the files can be browsed starting from the file: code-examples.html using your favorite web browser. 2. INSTALLATION 2.1. Installation Under DrScheme To work with DrScheme, you must install this directory under PLT/collects in a subdirectory named lib342. So this directory would be PLT/collects/lib342 (or plt/collects/lib342 on Linux). To be able to test homework, you should make sure that the files drscheme-342-teachpack.scm drscheme-342-test-homework-teachpack.scm drscheme-342-typechecker-teachpack.scm are present in PLT/teachpack/ (or plt/teachpack on Linux). You must also download and install the Typedscm language, which should be located in ../typedscm/. See ../typedscm/README.txt for more about installation of that language. The files can all be put in their proper directories by unzipping the provided lib342.zip into the DrScheme PLT directory. But you will still have to properly install the Typedscm language (see ../typedscm/README.txt). 2.2 Installation Under Chez Scheme If you are using this with Chez Scheme, you can place the directory anywhere. You still need to download and install the Typedscm language, which should be located in ../typedscm/. See ../typedscm/README.txt for more about installation of that language. In particular, you must create a file ../typedscm/chez/localize.scm, as described in more detail in ../typedscm/README.txt. To run the type checker from the command line, use a (Unix shell) script or DOS batch file like the ones named scheme-typed* in the directory ../typedscm/bin. If you wish, you can also add a load of test-homework.tst into these scripts; that will make it so you don't have to require test-homework.scm each time you wish to test homework. 2.3. USE WITHOUT THE TYPE CHECKER If you don't want to use the type checker, you can still work with files written in typedscm, by using the files ../typedscm/drscheme/tc-ignore-types-at-runtime.scm and ../typedscm/chez/tc-ignore-types-at-runtime.scm. There are scripts in the ../typedscm/bin directory named *untyped* to facilitate this. 3. CONVENTIONS The interpreter files for each section of the book are named after the chapter and section of the book, or occasionally, after a figure. FILE FOR SECTION (OR FIGURE) ----------------------------- ch3-1.scm 3.1 ch3-4.scm 3.4 ch3-3.scm 3.5 (etc.) For our type checker to work on the EOPL interpreters, we have to include in the code the define-datatype declarations instead of just having SLLGEN generate them. To accomodate PLT Scheme and to facilitate better checking, every file with suffix ".scm" in this directory is a PLT Scheme module. A file containing a function X is thus often found in a file named X-mod.scm. Tests are often found in files named *.tst; for example, tests for all-mod.scm are found in all-mod.tst. 4. CAVEATS Not all files type check at present, but most do. See ../typedscm/tc-bugs.txt for bugs in the type checker.