TDDD08 Logic Programming
Course information
Language
The course is given in English. (Tutorials may be given in Swedish, if all participants are fluent in Swedish). Exams are given in English but answers can be given in Swedish or English.
Course literature
- U. Nilsson and J. Maluszynski. Logic, Programming and Prolog
(2ed),
(previously published by John Wiley & Sons, 1995).
The book is available electronically. - U. Nilsson. Logic, Programming and Prolog (Supplement). A supplementary chapter on CLP(fd)
- W. Drabent. Example proofs of program correctness and completeness.
Additional non-required reading
- The Power of Prolog.
- Prolog programming: Sterling och Shapiro. The Art of Prolog, 2ed, MIT-Press, 1994.
-
Reasoning about programs:
W. Drabent. Logic + control: On program construction and verification. Theory and Practice of Logic Programming, June 2017. DOI: 10.1017/S1471068417000047. Also, an almost final version available from CoRR arXiv:1110.4978v5 [cs.LO], 2017. - Systematic construction of programs: Section 2.4 (<1 page) of "Logic + control:..." (see above).
-
Declarative diagnosis:
W. Drabent. Section 7 of Correctness and Completeness of Logic Programs. ACM Transactions on Computational Logic. 17, 3, Article 18 (May 2016). DOI: 10.1145/2898434. - Negation: Sections 2.3 and 3 of W. Drabent, Hybrid Reasoning with Non-monotonic Rules. (In Reasoning Web. Semantic Technologies for Software Engineering. Vol. 6325 of LNCS, Springer, pp 28-61, 2010)
-
Theory:
K. Apt. From Logic Programming to Prolog. Prentice-Hall 1997.
J. Lloyd. Foundations of Logic Programming, 2ed, Springer-Verlag 1987.
Prerequisites
An introductory course in logic (TDDD72 or similar) and discrete mathematics. The course also assumes programming experience.
Summary
The course should provide knowledge in logic programming including both theoretical notions as well as practical programming practice in the programming language Prolog. Theoretical notions, which are the basis of Prolog, are covered at lectures. Declarative and procedural semantics is discussed as well as how to deal with negation. Application areas (such as deductive databases and grammars) are also covered. Another topic addressed at the lectures is constraints and constraint logic programming. The tutorials address more pragmatic issues -- databases, recursive datastructures (e.g. lists) and abstract data types are discussed, as well as how to write efficient Prolog code.The laboratory classes focus on pratical problem solving in the above areas using the programming language Prolog.
Examination
To pass the course you must pass both the written examination and complete all laboratory execises. There are two re-examinations during the academic year.
Page responsible: Victor Lagerkvist
Last updated: 2023-08-18