The course is an introduction to logic programming through Prolog. It basically follows the following book:

W. F. Clocksin and C. S. Mellish. Programming in Prolog. Fourth edition. Springer. 1994.

With each lecture the students will be given exercises involving the concepts of the lecture. At the end of the semester students are supposed to make a programming project or, alternatively, to take a final written exam.

Winter Semester 2006.

**Number:**326.028**Title:**Logic Programming**Lecturer:**Temur Kutsia**Time:**Wed 16:15-18:00**Place:**T 212**First lecture:**October 4

Please register for the course via the KUSSS system.

- Logical foundations. Introduction to Prolog programming.
- Questions, variables, conjunctions, rules, goals.
- Prolog syntax. Characters, operators, equality and matching, arithmetic.
- Using data structures. Several programming techniques on Prolog (Mapping, recursion, accumulators, difference structures).
- Backtracking, generating multiple solutions, the cut.
- Examples, debugging.
- Unification, computational model of logic programs.
- Constraint logic programming.

**Book:**W. F. Clocksin and C. S. Mellish. Programming in Prolog. Fourth edition. Springer. 1994.**Slides:**- Introduction - pdf
- Questions, variables, conjunctions - pdf
- Rules, goals - pdf
- Prolog syntax - pdf
- Data structures, mapping, recursion - pdf
- Data structures, comparison, joining, accumulators, difference structures - pdf
- Backtracking, the cut - pdf
- Unification - pdf
- Computational Model - pdf
- Using Grammar Rules - pdf
- Efficiency issues - pdf
- Examples - pdf

**Homeworks:**- Homework 1. Deadline: Monday, October 9.
- Homework 2. Deadline: Monday, October 16.
- Homework 3. Deadline: Monday, October 23.
- Homework 4. Deadline: Friday, November 3.
- Homework 5. Deadline: Monday, November 13.
- Homework 6. Deadline: Monday, November 27.
- Homework 7. Deadline: Monday, November 4.
- Homework 7. Deadline: Monday, January 8.

**Programs:**- vicar, sum, backtracking, prince, density.
- train_network.pro.
- Einstein's puzzle: Description and solution.

**Projects:****Additional material:**- M. A. Covington. Some Coding Guidelines for Prolog
- M. A. Covington. Efficient Prolog: A Practical Guide. Research Report AI-1989-08, The University of Georgia, Athens, Georgia, 1989.
- W. F. Clocksin. Prolog Programming (PowerPoint format).
- J. Lloyd. Foundations of Logic Programming, second edition, 1987. Springer.
- Open lists and difference lists. A section from Paul Brna's online Prolog book.
- P. Gloess. Constraint Logic Programming (PowerPoint format).

**System:**SWI-Prolog. For Windows users there is a convenient SWI-Prolog editor.**Some useful on-line resources:**WWW Virtual Library: Logic programming, Prolog newsgroup.

Maintained by Temur Kutsia