Logic Programming - Autumn 2012
The aim of this course is to introduce you to the theory and practice
of logic programming. We teach it in two parts:
- Logic programming - programming: lectures given by
Alan Smaill
- Logic programming - theory: lectures given by Alex Simpson
There will be 18 lectures, starting Monday 17th September.
Monday lectures are in David Hume Tower - Faculty Room South.
Thursday lectures are in Lecture Theatre 3, 7 Bristo Square.
Lectures take place 1510-1600 on Mondays and Thursdays in weeks 1,2,3,4,6,7,8,9 and 10. (Note that
there are no lectures in week 5, i.e., no lectures on 15th, 18th October.)
Tutorials are held in weeks 3,4,5,6,7,8,9 and 10.
(Note that tutorials take place as usual in Week 5.)
There will be two, summatively assessed, coursework exercises; each worth 10% of the final grade.
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 on Wednesdays, Thursdays and Fridays. First session Friday 3rd May. Last session Friday 17th May.
Meetings outside these hours are also possible by appointment.
Course timetable
|
Week
|
Date
|
Mon Lec
|
Thu Lec
|
Tutorials
|
Coursework (CW)
|
| 1 |
17 Sep |
Prog 1 |
Prog 2 |
|
|
| 2 |
24 Sep |
Theory 1 |
Prog 3 |
|
|
| 3 |
1 Oct |
Theory 2 |
Prog 4 |
Tut 1 |
|
| 4 |
8 Oct |
Theory 3 |
Prog 5 |
Tut 2 |
CW1 handed out: Mon 8 |
| 5 |
15 Oct |
|
|
Tut 3 |
|
| 6 |
22 Oct |
Theory 4 |
Prog 6 |
Tut 4 |
CW1 deadline: 3pm Mon 22 |
| 7 |
29 Oct |
Theory 5 |
Theory 6 |
Tut 5 |
CW2 handed out: Mon 29 |
| 8 |
5 Nov |
Prog 7 |
Theory 7 |
Tut 6 |
|
| 9 |
12 Nov |
Theory 8 |
Prog 8 |
Tut 7 |
CW2 deadline: 3pm Mon 12 |
| 10 |
19 Nov |
Theory 9 |
Prog 9 |
Tut 8 |
|
Office hours
The course lecturers are available (during Semester 1) for discussion of course material
at the following hours.
- Alan Smaill (IF 2.03): Thursdays 10:30-11:30 (from week 4)
- Alex Simpson (IF 5.25): Thursdays 11.30-12.30 (Weeks 4-8,10-11); Tuesday 11.30-12.30 (Week 9 - Nov 13)
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.
Programming Lecture Slides
- Lecture 1 (Course orientation; Getting started), September 17:
PDF for viewing
PDF for animation.
(Accompanying code: simpsons.pl)
- Lecture 2 (Terms, unification and proof search), September 20: as PDF for viewing
and as odp/Powerpoint for animation
- Lecture 3 (Recursion, lists and data structures), September 27:
PDF
- Lecture 4 (Nonlogical features), October 4: as PDF
- Lecture 5 (Nonlogical features, continued), October 11:
as PDF
- Lecture 6 (Parsing and definite clause grammars), October 25:
as PDF.
- Lecture 7 (Search strategies), November 5: as PDF
- Lecture 8 (Higher-order logic programming), November 15:
PDF
- Lecture 9 (Term manipulation, meta-programming), November 22:
PDF
Theory Lecture Slides
- Lecture 1 (Proof Search for Propositional Prolog), September 24:
PDF for animation.
- Lecture 2 ((In)completeness for Propositional Prolog), October 1:
PDF for animation.
- Lecture 3 (Definite Clause Predicate Logic), October 8:
PDF for animation.
- Lecture 4 (Proof Search for Definite Clause Predicate Logic), October 22:
PDF for animation.
- Lecture 5 ((In)completeness for Definite Clause Predicate Logic), October 29:
PDF for animation.
- Lecture 6 (Fixed Points and Herbrand Models), November 1:
PDF for animation.
- Lecture 7 (The Closed World Assumption), November 8:
PDF for animation.
- Lecture 8 (Clark Completion), November 12:
PDF for animation.
- Lecture 9 (Extensions of Predicate Logic), November 19:
PDF for animation.
Coursework
There will be two, summatively assessed, coursework exercises; each worth 10% of the final grade. Once marked, the coursework will be returned to students with feedback.
Tutorials
Tutorials start Week 3 (October 1).
See tutorial groups
with times and membership.
Previous Exams