Comp 372: Programming Languages

Fall 1999 - Peter L Dordal

Text: Paul Graham, ANSI Common Lisp, Prentice Hall, 1996.

Study materials: Assignments, notes, handouts, sample exams and review guides will be linked here as available.

Here are the programming assignments:
homework 1
homework 2
homework 3
homework 4
homework 5 and 6 (combined) You can find the game files adventure.cl and SimplCon.java here or on the H: drive.

Here is the sample midterm exam; answers are available here

Here is the final exam study guide, or at least a start. Answers are (finally) available here

The final is not open-book; however, a very brief summary of some Lisp/ML examples will be provided.

Here is the programming language overview handed out Aug 30.

Office Hours: Wed 11:30-12:30; Mon, Wed 2:30-3:30, Fri 9:30-10:30. My office is in DH316, email pld@math.luc.edu, 508-3576

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 ML, which might be described as a Lisp-like language with strong typing, a conventional syntax, and an abstract notion of type variables used to support true polymorphism.

After ML we will return to the more familiar world of object-oriented programming: C++, Java, and CLOS.

Computers: We will be using the free "lite" version 5.0.1 of Allegro Common Lisp, for our Lisp programming. You can get this from www.franz.com; alternatively, here is a local copy at loyola.. It's 25 MB; both zip drives and LS-120 drives are available in DH340, but not on the same machines.
Here is the official SML/NJ page at Bell Labs; check it out for lots of general information on Standard ML of New Jersey. If you just want the Windows self-installing file (version 110, SML '97, 6.4 megabytes),  here is a link to a local copy of it at Loyola.
Here is my ML handout, in html form.

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.

The following schedule is a little ambitious; we'll see how things go.
Week 1: Review of C++ A functional style within C++: recursion, expressions, parameters, references, pointers.
Week 2: Lisp: atoms and lists, basic operations, setf, defun.
Week 3: Lisp: cond, recursion (cdr and car/cdr forms), let, iteration with do
Week 4: Memory management, other data structures, multiple-value returns, exceptions.
Week 5: Dynamic v static binding, variable numbers of args, closures, funargs
Week 6: Continuation of funargs, macros
Week 7: More Lisp
Week 8: A first look at ML
Week 9-10: More ML; exam 1
Week 11: Theory of expression evaluation; parameter passing issues (parameters: value, reference, result, value-result, name, order of eval, etc)
Week 12: CLOS v C++ v data-driven programming
Week 13: Java or C++
Week 14: Java or C++

Projects: There will be about five programming projects. None are intended to be particularly ardurous, although programming in a new language is often harder than programming with something familiar.
 
Grades: Programming assignments will count for about 25-30% of your grade; the remaining 70% will be based on your midterm and final exams. The final will count 25-40% more than the midterm. It will be partially cumulative, but will focus more on material covered since the midterm. The midterm is tentatively scheduled for Friday, October 22. The final exam is scheduled for Wed, Dec 15, at 8:00 am (ulp!). Before both exams you will receive a review guide, with some sample questions and answers.

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.