Skip to main content
main-content

Über dieses Buch

Scheme provides a flexible and powerful language for programming embodying many of the best features of logical and functional programming. This enjoyable book provides readers with an introduction to programming in Scheme by constructing a series of interesting and re-usable programs. The book includes two diskettes containing MIT Scheme to run on Windows PCs.

Inhaltsverzeichnis

Frontmatter

Chapter 1. Introduction

Abstract
I have always believed that computer programmers who only know one programming language are at a competitive disadvantage. Depending on the application and audience for a computer program, some languages are more suitable than others. I have enjoyed programming in LISP, and have often been disappointed when colleagues whom I respect seem to have a closed mind with respect to LISP languages. The Scheme language, a dialect of LISP, is a modern, efficient, dynamic language. I hope that this book, in addition to being a good first programming book, will also convince C, C++, Ada, COBOL, and FORTRAN programmers that dynamic, list-oriented languages like Scheme are appropriate for solving a wide range of programming problems.
Mark Watson

Chapter 2. Tutorial Introduction to Scheme

Abstract
Scheme is a fairly simple, extensible language. Scheme is extensible because functions that you define are essentially indistinguishable from built-in functions. As we will see in later chapters, with a good design a large part of writing an application program is developing a library of reusable components that in effect extend the Scheme language for your programming projects.
Mark Watson

Chapter 3. Designing for Reuse

Abstract
The syntax for writing Scheme programs was discussed in the Scheme tutorial in chapter 2. We must certainly understand the syntax of a programming language, but there is more to writing programs than writing a sequence of instructions to solve a problem. It is expensive to write software, so it important to write programs so that portions of the program can be reused in future programs. It is also important to document properly what the program is supposed to do (analysis of problem) and the design decisions that were used to implement the program. These topics will be introduced in chapter 4. We will discuss modularity and cohesion in this chapter. Modularity refers to separating functions into separate program modules. These fairly independent modules can more easily be reused in future programs that we write. Cohesion refers to placing in a code module (or library) functions that have similar functionality and that tend to operate on the same type of data.
Mark Watson

Chapter 4. Writing Portable Scheme Code

Abstract
We never know when we first write a program what the futures uses for the program will be. Developing software costs money, so there are strong economic reasons to make software reusable. Software has a greater probability of reuse if it is written to be (relatively) portable on different types of computers using different compilers and run-time environments. Not all Scheme systems are completely compatible.
Mark Watson

Chapter 5. An Iterative Approach to Analysis, Design, and Implementation

Abstract
The example programs that we have developed so far in this book have been fairly simple. More complex programs usually require an iterative approach: we perform initial requirements analysis, design, and a first-stage implementation. After using the first-stage implementation we revisit the analysis and design, then re-implement parts of the program, building a second-stage implementation.
Mark Watson

Chapter 6. Neural Network Library

Abstract
Neural networks are useful for many pattern recognition and control applications. In this chapter we design a library that supports “delta rule,” or backwards error propagation networks. For flexibility our library supports any number of neuron layers. For efficiency our li­brary uses momentum calculations to train networks. We will discuss momentum in the discussion of requirements in Section 6.1.
Mark Watson

Chapter 7. Complex Data Structures

Abstract
Data structures are the heart of computer programming. There is no excuse for starting a programming project without first carefully considering what data structures are required to express and solve a problem. We should naturally think of problem solving as starting with naming types of objects in the problem domain, thinking about what information instances of each type of object needs to store, and how data objects will interact.
Mark Watson

Chapter 8. Chess Playing Program

Abstract
Computer chess programs have long been a testing ground for developing search techniques. Chess programs use some form of lookahead (prediction of future moves) search combined with static evaluation (judging the relative worth of a chess position without lookahead, that is, by counting material worth of both black and white pieces and comparing the relative mobility of the black and white pieces). We will develop a chess playing program in this chapter that relies mostly on static evaluation using heuristic chess knowledge. The program will usually give the impression of strong positional play, although it plays a poor tactical game. The static evaluation function uses a two-ply (i.e., two half moves) lookahead to evaluate piece capture.
Mark Watson

Chapter 9. Go Playing Program

Abstract
Go is an ancient game of strategy that is purported to be over 4,000 years old. My older brother Ron taught me to play Go when I was about eight years old. The rules of Go are simple, but it is very difficult to play the game well. As an indication of how difficult it is to write a Go program, a Taiwanese businessman, Mr. Ing, has offered (seriously!) a cash prize of about one million dollars to the first programmer who can write a Go playing program that can win a match against a Taiwanese professional Go player.
Mark Watson

Backmatter

Weitere Informationen