Comp 372, 11:30-12:20 MWF, 25EP room 205; also Comp 471
Texts:
Simon Thompson, Haskell: The Craft of Functional Programming,
Addison-Wesley, 1999.
Paul Graham, Ansi Common Lisp, Prentice Hall, 1996.
My general course groundrules are here. Exams will count for between 70% to 80% of your grade, with homework and programs making up the rest. The midterm is tentatively scheduled for Week 8, Wed, Oct 20. The final will be Friday December 17, 8:30 am [!], in our usual classroom.
Study materials: Assignments, notes, handouts, sample exams and review guides will be linked here as available.
Here is the final exam study guide.
Please note
that I made some corrections on Tuesday, Dec 14; if you have an earlier
version please update it.
Final guide answers are here.
Here is the midterm study guide.
Answers are now available here.
Here are my (sometimes sketchy) class notes.
Here is a programming language overview.
Here is the LISP handout.
Programming assignments:
Assignment | Due date | data file | files needed, etc |
Lisp 1: sumcubes, etc | Sept 15 | none | |
Haskell: sumcubes, etc | Sept 29 | none | |
House of York (Roses) in Lisp & Haskell | Oct 27 | roses.lisp, roses.hs | |
Implementing Lisp in Java, plist note (NEW) | Nov 19 | lisp.java | |
CLOS game | Dec 10 | adventure2.lisp |
Demos:
Reachability: Certain announcements and individual messages may be sent to you via email. You are expected to receive them; make sure I have your preferred email address.
Goals: The goal of the course is to compare and contrast the familiar imperative programming idiom with the alternative approaches of functional programming and object-oriented programming. We will begin, after a brief overview, with the Lisp language. Lisp goes back to 1959, and is still an actively used language in the Artificial Intelligence community. Lisp has a strikingly unusual syntax, but its ability to treat data as programs is even more striking. Other innovative features of Lisp include run-time type checking, list processing (from which the name derives), and dynamic memory management with garbage collection. Finally, Common Lisp includes the Common Lisp Object System, or CLOS.
After Lisp we will look at Haskell, which illustrates polymorphism and type inference, and lazy evaluation.
After Haskell we will return to the more familiar world of object-oriented programming: C++, Java, and CLOS.
Computers: We will be using the free "trial" version 6.2 of Allegro Common Lisp for Lisp programming.
For Haskell, we will use hugs.
Prerequisites: Students are expected to be reasonably familiar with either the Java or C++ language, and have a reference book available. I'll survey you at some point about which of Java versus C++ you're more familiar with.
Academic Honesty: Your work on exams is expected to be entirely
your own; failure to adhere to this may result in an F for the course.
As for written homework assignments, talking to others about confusing
points is permitted and, to some extent, encouraged. However, it is expected
that all actual solution writing, program typing, and program design be
done by yourself. In particular, the sharing of your program source files
is never acceptable. Inappropriate collaboration may result in your receiving
a zero for the homework or programming portions of the course.