Using Concrete Abstractions with DrScheme

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 versions 370-372 of DrScheme, which are no longer current. 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 freely available. It can be obtained from the web. Versions are available for Windows (95 and later), MacOS, and various versions of Linux and Unix with X Windows. 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.

Settings for DrScheme

DrScheme can be set to use any of several variants of the Scheme language. You will need to set this when you first start up DrScheme, by using the Language menu's Choose Language... option. For compatibility with Concrete Abstractions, select to the "Textual" language listed under the "PLT" heading.

By default, this language setting causes DrScheme to be "case sensitive." For example, the symbols barbara and Barbara are treated as distinct, contradicting Exercise 13.18. If you consider compatibility in this regard to be important, you can use the Show Details button within the Change Language... panel and then turn case sensitivity off.

Note for instructors: These language settings can also be done once for all users with a site-specific preferences file, so that each user doesn't need to do it. Search in the Help Desk for "site-specific" for information on how to set this up.

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. As of DrScheme version 370, the mechanisms for downloading and installing these libraries and for using them within DrScheme have changed.

The libraries can either be installed in your own user-specific storage area or in an area that is shared by all users of your computer system. For the user-specific version, download concabs.plt. For the shared version, download concabs-all-users.plt. On some systems, such as Microsoft Windows and Mac OS X, you should then be able to install the libraries by double-clicking the icon for the .plt file you downloaded. (Some web browsers may even offer to open the file for you.) Or, on any system, you can go into DrScheme's File menu and select "Install .plt File...". Then select the .plt file you downloaded.

To use the library for graphical images, your definitions file within DrScheme should start with the line

(require (lib "fungraph.ss" "concabs"))

Bug note: There is a relevant bug in version 370 of DrScheme, which was fixed in version 371. Therefore, we recommend using version 371 or later. If you need to use version 370, then unless you are using a Mac or Windows machine, read about the bug.

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.

To use the object-oriented programming system library for chapter 14, your definitions file within DrScheme should start with the line

(require (lib "oops.ss" "concabs"))

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.

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).
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 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 or later 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.1 as of 2008/06/24 17:55:19