next up previous
Next: MC215 Software Engineering Project Up: Year 2 Previous: MC211 Automata, Languages and

MC214 Logic Programming

MC214 Logic Programming

Credits: 10 Convenor: Dr. S.J. Ambler Semester: 2

Prerequisites: essential: MC111, MC103 desirable: MC104
Assessment: Continual assessment: 40% 1$\frac{1}{2}$ hour exam in May/June: 60%

Lectures: 18 Classes: none
Tutorials: 6 Private Study: 39
Labs: 12 Seminars: none
Project: none Other: none
Total: 75

Explanation of Pre-requisites

The Prolog language is based on the predicate calculus so the knowledge of logic from MC111 is essential. Some prior experience in computer programming is also important so MC103 is essential and MC104 is recommended.

Course Description

Many of the programming tasks which arise in Artificial Intelligence can be formulated as search problems, e.g. find a series of moves which will guide the robot out of the maze, find a medical diagnosis which is consistent with the patient's symptoms, find a combination of components which fits the customer's requirements for a computer system, and so on. The predicate calculus introduced in MC111 provides a convenient language to describe such problems; logic programming provides a means of finding the solution by the application of rules. Prolog is the prime example of a logic programming language and has become a standard tool in Artificial Intelligence programming.


The course is intended to give the student an understanding of the principles of logic programming, the basic skills of programming in Prolog and an appreciation of how to apply these skills in practice to standard problems in AI.


Transferable Skills


Fundamentals of Prolog: facts and rules, recursion, backtracking, simple examples; execution mechanism: unification, resolution, SLD-trees and search strategies; list processing in Prolog; cut operator and efficiency issues; worked examples; negation as finite failure; arithmetic; system predicates for IO; assert and retract; debugging programs by tracing.

Reading list


I. Bratko, Prolog, Programming for Artificial Intelligence, 2nd edition, Addison-Wesley, 1986.


L. Sterling and E. Shapiro, The Art of Prolog, 2nd edition., MIT Press, 1994.

Details of Assessment

There is a series of five worksheets, which are all assessed.

The written Midsummer examination has three questions and candidates can obtain full marks for good answers to two questions.

next up previous
Next: MC215 Software Engineering Project Up: Year 2 Previous: MC211 Automata, Languages and
S. J. Ambler