Learning Lisp for CMPT 310
You will be coding in the Common LISP programming language for
your assignments. Since you are already a third-year student,
you will be learning the language on your own, with the following
assistance:
- a set of tutorial notes to
guide you through Common LISP in 4 weeks
- a LISP development environment to
let you experiment with the language and work on the
exercises from the tutorial notes
- recommended references on Common LISP
- some web resources for learning LISP
All the Lisp that you need for completing the programming
assignments will be presented in the following tutorial
notes. You are expected to master the materials of one
tutorial in a week. Work through the exercises. They
are good for your soul.
- Tutorial 1: Basic LISP
Programming
Basic Lisp data types, some built-in functions, defining
functions, loading and compiling programs, recursions (linear,
multiple, structural).
[source code]
[solution to selected exercises]
- Tutorial 2: Advanced Functional
Programming in LISP
Tail recursions, higher-order functions, multiple values.
[source code]
[solution to selected exercises]
- Tutorial 3: Data Abstraction in
LISP
Recursive data types (constructors, recognizers, selectors),
structural recursions, abstract data types, larger examples.
[source code]
[solution to selected exercises]
- Tutorial 4: Imperative Programming
in LISP
Variables, destructive operations, sequencing,
function closures, looping constructs.
[source code]
[solution to selected exercises]
Although you will not be asked to hand in your solution,
you should nevertheless try to work on the programming exercises
given in the tutorial notes above. Nothinig can replace the experience you
gain from hands-on programming. Do try running your solutions in
the Allegro Common LISP development environment. See
the CMPT 310 Assignments page
for information on how to access the software.
For those who cannot live without a textbook, I highly recommend
the following:
- Patrick Henry Winston and Berthold Klaus Paul Horn.
Lisp, 3rd Edition. Addison-Wesley, 1989.
SFU Library call no. QA 76.73 L23 W56 1989.
Our library has 3 copies. Two of them are on 24-hour
reserve, and the third one on 4-hour reserve.
The book is also available from the SFU bookstore
if you want to buy a copy of your own. You will need
the materials in chapters 1-13,
except for the following:
- the parts in chapter 9 about file input (you only need terminal output)
- the parts in chapter 11 about properties (you only need arrays)
The follow manual, commonly referred to as the CLTL2,
was the basis on which the ANSI standard was built. Although it is
not the standard, it is close enough. It
allows you to quickly look up specific features of the Common LISP
language:
- Guy L. Steele, Jr. COMMON LISP: the language, 2nd Edition.
Digital Press, 1990. SFU Library call no.
QA
76.73 L23 S73 1990
Our library has 3 copies, two of them are on 24-hour reserve.
If you have enough hard drive space at home, you may also
download the entire manual from
an
FTP site.
Additional information about Lisp can be obtained from the following
sources: