326.516: Functional Programming: Lisp


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 first lecture will take place

Wed, Mar. 1, 16:15 - 17:45, KG 712,

which will be the usual time and place for the lecture. 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.

The list of received homeworks is linked below - please check it and complain of any mistaken record.

Lectures

Lecture 1: Mar. 1: Book sections 1.1:

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

- working with the Lisp interpretor and with emacs;

- list and s-expressions;

- car, cdr, cons.

Lecture 2: Mar. 8: Book sections 1.2 - 1.9:

- quote, defun

- variables and reference

- predicates

Homework 1, due Mar 22: E1.2.1, E1.2.2; E1.3.1, E1.3.2; E1.5.1, E1.5.2, E1.5.3, E1.5.4; E1.9.1, E1.9.2.

Mar. 15: No lecture.

Lecture 3: Mar. 22: Book sections 1.10 - 2.3

Homework 2, due Mar 29: P1.1, P1.2, P1.3, P1.4, P1.5; E2.1.1, E2.1.2; E2.2.1, E2.2.2; E2.3.1.

Lecture 4: Mar. 29: Book sections 2.4

Homework 3, due Apr 5: E2.4.1

Lecture 5: Apr. 5: Book sections 2.5 - 2.8

Homework 4, due Apr 26: E2.5.1, E2.6.1, E2.7.1, E2.8.1, E2.8.2.

Apr. 12: holiday

Apr. 17: holiday

Lecture 6: Apr. 26: The language Scheme.

Slides (zip file).

Lecture 7: May 3: Book sections 2.9 and 2.10.

Homework 5, due May 10: E2.9.1, E2.9.2, P2.1, P2.2, P2.3, P2.4, P2.5, P2.6.

Lecture 8: May 10: Book sections 3.1, 3.2, 3.3.

Homework 5, due May 17: E3.1.1, E3.1.2, E3.3.1.

Lecture 9: May 17: Book sections: 3.4, 3.5, 3.6.

Homework 6, due May 24: E3.6.1, E3.6.2; P3.1, P3.2, P3.3, P3.4, P3.5, P3.6 (not P3.7).

Lecture 10: May 24: In relation to Chapter 4, a functional implementation of various list operations in "scheme". Programs and description of concepts are available here.

No homework in the traditional sense, but experiment with the concepts and with the programs.

Lecture 11: May 31:

More about DO: automatic transformation of tail recursive programs into iterative programs.

Solution to problem 3.7: recursive, tail-recursive, iterative.

No homework.

Lecture 12: June 7:

Chapter 4: More list operations.

Chapter 5: Programming style.

Chapter 6: Input and output.

Programming exercise: Sorting - see sort-in-place.el.

Homework 7, due June 14: E4.1.1; E4.2.1; P4.1, P4.2, P4.3.

Problems from Chapters 5 will be assigned for next homework - see below.

Lecture 13: June 14

Programming exercises: unification, simple PROLOG interpreter.

Homework 8, due June 21: P5.1, P5.2, P5.3.

Optionally: P5.4, P5.5, P5.6.

Lecture 14: June 21:

Further programming exercises.

Review of the material for the exam.

No homework.

Examination: June 28:

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


T. Jebelean