326.516: Functional Programming: Lisp

Summer semester 2008.


The course is an introduction to programming in Lisp and it will be based on the book:

Programming in Common Lisp, R. A. Brooks, John Wiley 1985.

The students will be expected to perform practical programming in Lisp. A lisp interpreter and an editor, as well as various source code can be downloaded from the ftp site.

Purpose

Understand the principles of functional programming and aquire the skills for writing Lisp programs.

Organization

The lecture takes place on

Wednesdays from 16:30 to 18:30 in KG 712. If the lecture does not take place in a certain week, this will be announced on this page.

The final grade is 20% based on homeworks. Homeworks will be assigned every week and each one is due the next week. It is preferred to submit the homeworks in electronic form by e-mail, especially the Lisp code. Paper format is also accepted, especially if it contains drawings.

When you submit the homework by e-mail, please send it as attached file and use as name of the file your name and the number of the homework (examples: schreiner-hw-3.txt, mittermayr-hw-2.pdf) and use include the name of the file in the subject field of the e-mail.

Lectures

Lecture 1: Mar. 5: Book section 1.1:

- functional programming in relation to logic and to other programming styles;

- other functional programming languages, other Lisp dialects;

- Lisp and symbolic computation;

- working with the Lisp interpretor and with emacs;

- lists and s-expressions;

- car, cdr, cons.

Lecture 2: Mar. 12: Book sections 1.1 - 1.8.Chapt. 1.

Homework 1, due Apr 2: E1.2.1, E1.2.2.; E1.3.1, E1.3.2; E1.5.1, E1.5.2, E1.5.3, E1.5.4.

Lecture 3: Apr. 2: Book sections 1.9 to end of Chapt. 1.

Homework 2, due Apr 9: E1.9.1, E1.9.2; P1.1, P1.2, P1.3, P1.4, P1.5.

Lecture 4: Apr. 9: Book sections 2.1 to 2.3 Chapt. 2.

Homework 3, due Apr 16: E2.1.1, E2.1.2; E2.2.1, E2.2.2, E2.3.1.

Lecture 5: Apr. 16:Book sections 2.4 to 2.8.

Homework 4, due Apr. 23: E2.4.1; E2.5.1; E2.6.1; E2.7.1; E2.8.1, E2.8.2.

Lecture 6: Apr. 23:Book sections 2.9, 2.10; 3.1.Chapt. 3.

Homework 5, due Apr. 30: E2.9.1, E2.9.2; P2.1, P2.2, P2.3, P2.4.

Optional homework: P2.5, P2.6. We will discuss these in the next lecture.

Lecture 7: Apr. 30 (until 18:30):Book sections 3.2, 3.3.

Solution to problems P2.5, P2.6 typer.el

The logical meaning of LET.

Homework 6, due May 7: E3.1.1, E3.1.2, and P3.1.

Lecture 8: May 7 (until 18:30):

Book sections: 3.4, 3.5, 3.6.

Discussion on the Fibonacci algorithm: double recursion, tail recursion, iterative version.

Homework 7, due May 14: E3.3.1; E3.6.1, E3.6.2; P3.2, P3.3, P3.4, P3.5, P3.6.

Lecture 9: May 14 (until 18:30):

Timing execution of lisp programs.

Automatic transformation of tail-recursive programs into iterative programs.

Book sections 4.1, 4.2.

Homework 8, due June 4: Study individually the section 4.3 (use also the file Chapt. 4) and solve the exercises E4.1.1; E4.2.1, E4.2.2 and the problems P4.1, P4.2, P4.3.

May 21: No lecture.

May 28: No lecture.

Lecture 10: June 4 (until 18:30):

Chapters 5, 6.Chapt. 6

Design and implementation of a sequent based propositional prover propositional.el

Homework: Study the examples from Chapt. 5. (no written homework)

Lecture 11: June 11 (until 18:30):

Continuation of discussion on the propositional prover.

Merge-sort and its destructive version: sort-in-place.el

No homework, but: review the whole material in order to be able to ask final questions at the last lecture!

Lecture 12: June 18 (until 18:30) Last lecture:

Review of the whole material.

Johannes Middeke: Higher-order programming in lisp HigherOrderFunctions.el.

More programming examples:

Consultations: June 24, 18:00 - 19:00

in the RISC office (4th floor KG room 416).

Examination: June 25:

Written examination consisting in simple questions about the Lisp languages, as well as programming tasks.

No. additional material will be allowed, but "memo.txt" will be distributed by me.

Received homeworks: hw-lisp.txt.


T. Jebelean