Using Concrete Abstractions with DrScheme 100

This web page provides information regarding the use of the DrScheme implementation of Scheme with Concrete Abstractions: An Introduction to Computer Science Using Scheme, by Max Hailperin, Barbara Kaiser, and Karl Knight.

The information here corresponds with version 100 of DrScheme, which is no longer the current version. See the parent web page for information on the current version.

Obtaining DrScheme

DrScheme is an implementation of Scheme, including a graphical user environment, that is made freely available by Rice University. It can be obtained from the web. Versions are available for Windows 95 and NT, MacOS, and various versions of Linux and Unix with X Windows. So far we have only tested it with the software for our book under Linux and Windows 95, but we don't know of any reason why it wouldn't work equally well on other systems. As far as we can tell, DrScheme seems quite well suited for use with our book; we'd like to hear of any problems you encounter. Be warned that DrScheme is quite memory-hungry. If it is the only program you are running, 32MB of memory suffices, but if you routinely run it together with other programs, then you may want more memory.

Settings for DrScheme

DrScheme can be set to use any of several variants of the Scheme language. This is controlled through the Language menu's Configure Language... option. The initial setting if you don't change it is known as Beginner mode. This mode is too restrictive to use with much of the Concrete Abstractions textbook. For full compatibility with Concrete Abstractions, switch to MrEd Debug mode.

Libraries for use with DrScheme

There are two areas of the textbook for which a special library needs to be loaded into DrScheme. One is the graphical images, introduced in the application section of chapter 1 and also used in subsequent chapters. The other is the object-oriented programming system, used in chapter 14. We are making available three libraries. One provides the graphics only, one the object-oriented programming system only, and the third provides all the functionality in a single combined library. There is no harm in using this library throughout the entire book, beyond the consumption of memory and loading time, but no benefit either.

Each of the three libraries can be downloaded from the web below. Once you have one of the library files on your system, you can load it into DrScheme using the Set Library To... option within the Language menu.

fungraph.ss
This is the library for graphical images only. In addition to the features described in the textbook (most succinctly in the appendix), there are a few extensions. Descriptions of those extensions and a couple hints regarding usage are in a separate web page. Note that we also have an alternative version of the functional graphics package that is a DrScheme "tool" rather than a "library". (See the web page for that version for what this difference means.) The tool version is easier to install in this release than in the last, and you should give it serious consideration.
oops.ss
This is the object-oriented programming system for use with chapter 14.
concabs.ss
This is the combined library, providing all the functionality of the other two.

General notes

Names defined in both Concrete Abstractions and DrScheme

There are a number of names that we define in Concrete Abstractions that are already pre-defined in DrScheme. The only real problem this causes is that if you perform the definition from the book, you can't expect the name to simultaneously have both the new value and the one described in the DrScheme documentation.

For each name, the DrScheme definition remains available by prefixing the name with #%. For example, if in chapter 7 you have defined length to be your own procedure, you can still use DrScheme's version using #%length. Or, you can return to the original definition of length by using (define length #%length)

We list below the affected names, organized into categories and listed within each category in their order of their appearance within the book:

Positioning of (newline)

Starting in chapter 6, we use the newline procedure to break output into separate lines. Unfortunately, there are two different conventions in use by different Scheme systems. One is to always use newline at the start of each line of output, while the other is to always use it at the end of each line. As a result of this lack of standardization, wherever we positioned the uses of (newline) in our programs would result in output that looked odd on some systems. We've tried in the textbook to make choices that don't look too horrible on any system, with the result that the output tends to look sub-optimal on every system. In particular, there tends to be extra blank lines. If you are working consistently within DrScheme (or any other one system), feel free to remove or reposition (newline) as necessary to make the output look best.

Chapter by chapter notes

Chapter 1
The procedures for manipulating graphical images need to be loaded from a library, as described above. Additionally, it is worth noting that the various basic blocks, such as rcross-bb, are neither pre-defined nor defined within the library. Instead, their definitions are in a separate file.
Chapter 6
This chapter first introduces interactive programs, which display output and read input. See the note above regarding the positioning of (newline). Also, there is one review problem at the end of this chapter that asks you to define a procedure with the name time. This will not be possible under DrScheme, since DrScheme reserves that name for a special form for timing the evaluation of expressions. Use another name instead.
Chapter 9
For the application section, we have a DrScheme-specific version of the show procedure.
Chapter 10
Be warned that DrScheme has its own pre-defined procedure read-eval-print-loop, which gives a normal Scheme (as opposed to micro-Scheme or mini-Scheme) REPL. Thus, if you fail to execute the definition from the book, you could be fooled by DrScheme's loop into thinking that everything is working fine. To guard against this, be on the lookout for the different prompts; micro-Scheme and mini-Scheme both specifically identify themselves in their prompts.
Chapter 11
Although you could use the SLIM simulator from the application section to work through the earlier sections of this chapter under DrScheme, you'd be better off using SLIME.
Chapter 14
You will need to load a library file into DrScheme to get the object-oriented programming system, as described above.
Chapter 15
DrScheme cannot be used for this chapter, since this chapter doesn't use the Scheme programming language. You will need to use a Java 1.1 system instead.

For more information, see the parent web page, or contact Max Hailperin:
Email: max@gustavus.edu
Mathematics and Computer Science Department
Gustavus Adolphus College
800 W. College Avenue
St. Peter, MN 56082
USA
Revision 1.2 as of 2002/12/05 15:04:27