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 201-209 of DrScheme, which are no longer
current. See the parent web page for
information on the current version.
DrScheme is an implementation of Scheme, including a graphical user
environment, that is freely available. It can
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. This is set when you first start up DrScheme, and can also
be controlled through the
Choose Language... option. The initial setting if you
don't change it is known as "Beginning Student" language. This
language is too restrictive to use even at the beginning of the
Concrete Abstractions textbook. For compatibility with Concrete
Abstractions, switch to the "Textual" language listed under the "PLT" heading.
Note for instructors: This language setting can also be done once for
all users with a site-specific preferences file, so that 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.
Teachpacks for use with DrScheme
There are two areas of the textbook for which a special "teachpack"
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 two teachpacks,
one for each area. They can also be used in combination; in fact,
there is no harm in using both teachpacks throughout the entire book,
beyond the consumption of memory and loading time, but no benefit
Each of the teachpacks can be downloaded from the web below.
Once you have one of the teachpack files on your system, you set
DrScheme to load it using the
Add Teachpack... option within
Language menu. (DrScheme won't actually load the
teachpack until you press the Execute button.)
- This is the teachpack for graphical images. 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 "teachpack". (See the web
page for that version for what this difference means, including
the advantages the tool confers.) The tool
version is easier to install in this release than it was in early releases, and you
should give it serious consideration.
- This is the object-oriented programming system for use with
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:
- R4RS names noted as such in the text
- R4RS names not noted as such in the text
- Non-R4RS names
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
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
(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 teachpack (or tool), as described above. Additionally, it is worth noting
that the various basic blocks, such as
neither pre-defined nor defined within the teachpack. 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
- Chapter 9
For the application section, we have a
DrScheme-specific version of the
- Chapter 10
Be warned that DrScheme has its own
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 teachpack 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:
Mathematics and Computer Science Department
Gustavus Adolphus College
800 W. College Avenue
St. Peter, MN 56082
Revision 1.1 as of 2005/12/19 15:21:59