Logic Programming - Autumn 2011
The aim of this course is to introduce you to the theory and practice
of logic programming. We teach it in two parts:
- A Prolog programming lecture given by
James Cheney, Mondays at 15:00.
- A theory lecture given by Alex Simpson, Thursdays at 15:00.
There will be 18 lectures, starting Monday 19th September.
All lectures are in Appleton Tower Lecture Theatre 4.
There will be no lectures in week 5 (17th, 20th October).
However, tutorials will be held as usual in Week 5.
Revision office hours
The course lecturers are available for discussion of course material
at the following hours during the revision period.
- Alex Simpson (IF 5.25): LP theory revision. 11.30-12.30 every Tuesday and Thursday. First session Tuesday 24th April. Last session Tuesday 15th May.
Meetings outside these hours are also possible by appointment.
Course Text and Supplementary Material
The primary book for the programming side of the course is
Learn Prolog Now,
by Blackburn, Bos and Striegnitz. The book is strongly recommended,
and is available free
on-line.
Other useful books on prolog programming are
- Programming in Prolog by Clocksin and Mellish, Springer.
(There are many copies of this in the University library.)
- The Art of Prolog by Sterling
and Shapiro, MIT Press
- Prolog Programming for Artificial Intelligence
by Ivan Bratko, Addison Wesley.
For the theory lectures, the following background material on propositional and
predicate will be useful for students who have not previously encountered
propositional and predicate logic.
SICStus Prolog
SICStus Prolog is recommended for use in the course and will be
used for the final exam. Any DICE machine (i.e. any Linux machine in
an Informatics computer lab) should have SICStus installed; type
sicstus at a command prompt to start.
The School also has a site license for student use, in case you would
prefer to install and run SICStus on your own computer. Contact
Computing Support in person or via this form
to arrange this.
Introductory Prolog Programming Notes
To get you quickly informed of the essential aspects of the Prolog
programming language, read the
Quick Prolog notes.
These refer to the Prolog programs:
ancestors.pl,
dcg.pl,
declar_v_proc.pl and
mapcolour.pl.
Prolog Programming Lecture Videos
Some lectures from this and previous years were recorded on video so if you want a re-run
of those lectures then visit the
video site
for the full lectures; clips of smaller segments; and instructions on
how to view them on the Informatics DICE system.
Course Organisation
Prolog Programming Lecture Slides
- Lecture 1 (Course orientation; Getting started), September 19: as PDF for viewing
and as Powerpoint for animation.
(Accompanying code: simpsons.pl)
- Lecture 2 (Terms, unification and proof search), September 26: as PDF for viewing
and as Powerpoint for
animation
- Lecture 3 (Recursion, lists and data structures), October 3: as PDF for viewing
and as Powerpoint for
animation
- Lecture 4 (Nonlogical features), October 10: as PDF for viewing
and as Powerpoint for animation
- Lecture 5 (Nonlogical features, continued), October 24: as PDF for viewing
and as Powerpoint for animation
- Lecture 6 (Parsing and definite clause grammars), October 31: as PDF for viewing
and as Powerpoint for animation
- Lecture 7 (Search strategies), November 7: as PDF for viewing
and as Powerpoint for animation
- Lecture 8 (Term manipulation and meta-programming), November 14: as PDF for viewing
and as Powerpoint for animation
- Lecture 9 (Constraint logic programming), November 21: as PDF for viewing
and as Powerpoint for animation
Prolog Theory Lecture Slides
- Lecture 1
(pdf handout,
pdf for animation):
Proof Search for Propositional Prolog
- Lecture 2
(pdf handout,
pdf for animation):
(In)completeness for Propositional Prolog
- Lecture 3
(pdf handout,
pdf for animation):
Definite Clause Predicate Logic
- Lecture 4
(pdf handout,
pdf for animation):
Proof Search for Definite Clause Predicate Logic
- Lecture 5
(pdf handout,
pdf for animation):
In(completeness) for Definite Clause Predicate Logic
- Lecture 6
(pdf handout,
pdf for animation):
Fixed Points and Herbrand Models
- Lecture 7
(pdf handout,
pdf for animation):
Negation by Failure and Completion Procedures
- Lecture 8
(pdf handout,
pdf for animation):
Higher-order Logic Programming
- Lecture 9
(pdf handout,
pdf for animation):
Wrapping Up
Coursework
There will be two, formatively assessed, coursework exercises. These
will not be part of the final grade (i.e., they are optional, but
strongly recommended). They will be marked and returned to students with feedback. It is
strongly recommended that students attempt these exercises in
order to reinforce the lectures and tutorial problems.
Tutorials
There are five tutorial groups, and tutorials start Week 3 (October
3). The tutorials schedule is:
- Monday, 1610-1700, AT4.14
- Thursday, 1305-1355, AT 4.14
- Thursday, 1610-1700, AT 4.14
- Friday, 1400-1450, AT 4.14 (except first tutorial on October 7
will be in AT4.03)
- Friday, 1500-1550, AT 4.14 (except first tutorial on October 7
will be in AT4.03)
See
tutorial groups and times
Note that full sample tutorial solutions will not be posted. Please ask
one of the instructors about any of these if you have questions.
Previous Exams