DM22, Spring 2007 - Weekly Note 15


The exact curriculum (pdf) for the course is now available.

There will be a "spørgetime" meeting Friday, June 15, at 09:15 in room U49. We will do the entire exam of summer 2006 (pdf), and will discuss any questions on the curriculum and on the exam you may have.

The graded projects are now available at the lecturers office.


Lecture May 21

Unification. Prolog and logic: Horn clauses and Prologs use of the resolution principle. Monadic IO in Haskell.

Reading

Rest of Chapter 10 in Clocksin and Mellish. Section 3.2 (mainly the algorithm on page 40) in Ulf Nilsson, Jan Maluszynski: Logic, Programming and Prolog, 2nd edition, Wiley, 1995. Sections 18.1-4 and 18.6-7 in Thompson book (handouts).

Remarks

The textbook is a bit vague in Chapter 10 (except for the algorithm for conversion to clausal form in Section 10.2). For the interested, a more precise account of the subject can be found in Chapters 1-3 in Ulf Nilsson, Jan Maluszynski: Logic, Programming and Prolog, 2nd edition, Wiley, 1995 (Sections 2.3-4 can be omitted). The book is out of print, but is available online at http://www.ida.liu.se/~ulfni/lpp/. Note that Horn clauses are termed definite clauses in this book.

In relation to the exam, only the algorithm on page 40 in Nilsson and Maluszynski is relevant. It is not deep, but for a full understanding, reading most of Section 3.2, as well as Section 1.5 (and the errata of the book, which corrects an error in Section 1.5) is an advantage (mainly to get the notation used). The rest of the handed out Sections 3.1-3 can be seen as a more elaborate version of (part of) the material in Chapter 10 in Clocksin and Mellish, to be read if desired.

For the Haskell I/O part, you may also read Section 10.1 of Bird. Note that there, the symbol for one of the monadic combination operators is a triangle. In Haskell, the symbol is >>=. (The symbol of the other monadic combination operator is >> in Haskell as well as in Bird.)


Maintained by Rolf Fagerberg (rolf@imada.sdu.dk)