6.001 | Spring 2005 | Undergraduate

Structure and Interpretation of Computer Programs

Tools

Scheme Documentation

Don’t Panic: An Introductory Guide to the 6.001 Computer System (PDF)

This is the revised version of the manual for using Edwin and the MIT Scheme environment. This manual is a basic orientation to the Scheme programming environment, designed for students taking 6.001. It is highly recommended that you familiarize yourself with it.

Guide to MIT Scheme

This is the reference manual for MIT Scheme, listing all the commands. You should need to look at this rarely, if at all, for 6.001, since any Scheme features required for the course will be introduced in classes and problem sets.

Revised (5) Report on the Algorithmic Language Scheme

This is the formal definition of the “standard” Scheme language. It will be interesting for you to look at how a language is described formally, but you should not need to consult this for 6.001. This is also included with the MIT 6.001 Scheme implementations.

Installation on Windows NT®, Windows® 95, Windows® 2000, Windows® XP

Warning for Windows® 95 users: In order to be able to print from Edwin you must be sure that your default printer was installed with the “Allow printing from DOS” option turned on.

Disclaimer: While it may be possible to install Scheme on Windows® 98 or Windows® ME, we do not support these operating systems and can only offer limited help. We believe that this Scheme will work on Windows® 2000 and Windows® XP, but if you experience difficulties in using these systems, please let us know. Caveat Hacker.

MIT Scheme requires two directories:

  • One for holding the Scheme system itself. This can be placed anywhere you like (but no spaces are allowed in the directory name!), and requires about 15 Megabytes of disk space. Before downloading the installation program, be sure you have 25 Megabytes free on the disk where you plan to place MIT Scheme.
  • One for holding problem sets. This, too, can be placed anywhere you like (but no spaces are allowed in the directory name!). Over the course of the semester you should assume that it will grow to be about 5 Megabytes (maybe). There will be two subdirectories: PSets (where you will install the problem sets as they are distributed) and Work (where you will write your solutions).

Installation Instructions

  1. Download the Scheme installer, (EXE - 10.8 MB), into a temporary directory of your choice. This file is about 11 megabytes long.
  2. Run the install program, win32-6001.exe
  3. The InstallWizard will ask you some questions; we suggest that you accept the default for installing the MIT Scheme system itself.
  4. The installer will ask you where you want to install the applications database. This is the location that you will store problem set code and your own work, and defaults to c:\u6001. The installer will create two subdirectories named PSets (to hold the problem sets in the form they are distributed) and Work (where you should modify the problem sets to produce your solutions).
  5. You can then delete the install program.

Installing Problem Sets

Problem sets will be distributed as ZIP files. In order to install them, you will need to be able to “unzip” them on your machine. You can use the shareware program WinZip®, which provides a graphical user interface as well as integration into both Netscape® and Microsoft® browsers.

The 6.001 system has two parts:

  • One part is the Scheme system itself. There are two executables installed in /usr/local/bin, and several data files installed in /usr/local/lib/mit-scheme. The system requires about 30 Megabytes of disk space. Before downloading the tar file, be sure you have enough free space on /usr/local. If you do not have enough space on /usr/local you can use symbolic links to other parts of the file system – but you will be on your own to make sure that it all works (the lab TAs may be able to help).
  • The other part is for problem sets. This can be placed anywhere you like. Over the course of the semester you should assume that it will grow to be about 5 Megabytes (maybe). There will be two subdirectories: psets (where you will install the problem sets as they are distributed) and work (where you will write your solutions).

Installation Instructions:

  1. Download the Scheme system (TAR.GZ - 11.5 MB) - a TAR file, compressed with gzip - into a temporary directory of your choice. Let’s assume that you put the file into /tmp/gnulinux-6001.tar.gz
  2. Be sure you are logged in with root privileges. If your system does not have a directory /usr/local, you will need to create one. Then execute the command line:
    cd /usr/local; tar -xvzf /tmp/gnulinux-6001.tar.gz
  3. As part of your normal initialization (perhaps in your .login or .cshrc file) set an environment variable named MITSCHEME_6001_DIRECTORY to the directory in which you plan to store the problem sets (be sure the directory exists and has two subdirectories, named psets and work).
  4. The command line to start Scheme for use in 6.001 is
    scheme -large -band 6001.com -edit
    (you might want to make an alias for that command line – you are likely to be typing it often!)
  5. If everything seems to work you can now remove the tar file:
    rm /tmp/gnulinux-6001.tar.gz

Note: We have tested this Scheme system under RedHat Linux® 5.2, 6.2, and 7.0. Other versions of Linux® may need additional libraries to run this system. Ask for help if you run into problems.

DrScheme is The Rice University Programming Languages Team’s graphical user interface to a Scheme system for students. A quick examination of the latest version was encouraging. And DrScheme is free.

DrScheme has some innovative user-interface features not found in MIT Scheme: text is color-coded, for example to highlight (in red) undefined variables; it has a syntax analysis command which, for example, can display arrows from occurrences of variables to their definitions elsewhere in the code; it has several output modes in addition to the standard one, for example an output mode which shows sharing in lists, and another output mode in which values are printed as canonical INPUT expressions - in this mode, for example, the list value which is the result of evaluating (cons 1 (cons (+ 2 3) ‘())) prints out as (list 1 5). DrScheme also has Windows menu control of most features, and error messages that are more clear than those in MIT Scheme.

To run satisfactorily, it requires at least 20 MB of RAM and a 150 MHZ processor. It has extensive online documentation.

Edscheme has been developed for student use by Schemers, Inc., a small Florida company founded by two high school teachers. It has been used successfully in high schools and colleges for several years. It strives to be much more student-friendly than MIT Scheme: text is color-coded to distinguish Scheme primitives, keywords, user definitions, constants, etc.; there are dynamic reminders (as you type in your program) of expected Scheme syntax and your syntactic errors; there is point-and-click lookup of previously entered procedure definitions; and it has menu control of most features, clear error messages, and convenient online documentation.

You can download the EdScheme initialization files in ZIP format. After the two-week free trial, you have to buy a copy to continue using EdScheme. It lists for $130 but is available to 6.001 students for $68.95.

Supported Options

The following systems are supported for 6.001 and 6.090:

All these implementations (including editor, debugger, etc.) are virtually identical. Feel free to do assignments partially in the 6.001 Lab, where you can work with the Lab Assistants, and partially on your own machine. You can also save your work in progress on a floppy disk or in the MIT server locker, come to the 6.001 lab, and get help from the lab assistants based on your work.

If you have a PC capable of running Scheme, we suggest that you install Scheme on it, since it will be convenient for you to work at home a lot of the time. You should feel free to use the lab, in addition, at any time – because you would like help from the Lab Assistants, because you want to work in a room with your fellow students, or just because you want to enjoy the beauty and comfort of the lab. But you should realize that the lab is often very crowded just before projects are due.

Note: The Scheme system supported in 6.001 for Fall 2001 and subsequent terms is Scheme version 7.5.1. This is a newer version than has been used in 6.001 in previous semesters. If you have an older version of Scheme (perhaps obtained from someone who took the course previously) please update your system, since problem sets may not run on the older version.

Special note on Windows® XP: Windows® XP Service Pack 2 removes a few files that are needed to run older programs (like MITScheme) under Windows® XP. Try the instructions at Microsoft® Help and Support Web site if you have difficulties.

Unsupported Options

There are several other versions of Scheme available, either for free or for a small fee:

Feel free to try these out, but bear in mind that:

  • The projects are not tested on these systems, and may not work on them.
     
  • If you need help from the staff, you must be prepared to copy all the files you are using to the MIT server locker and reproduce the problem in the 6.001 lab using the supported system.
     
  • The staff will not grant extensions or waivers on problem sets that can’t be done in these systems. You have been warned.
Learning Resource Types
Online Textbook
Exams
Lecture Notes
Projects
Lecture Videos