Logic Programming
06-25433
Autumn 2012

 

 

 

Lecture 16: The theory behind logic programming

Logic programming is based on logic, specifically a restricted form of predicate logic called horn clauses with inference done using resolution.

This lecture:

  • revises predicate logic;
  • show how formulae in the predicate calculus are transformed into clauses in conjunctive normal form;
  • explains resolution as a method of inference;
  • shows how Prolog uses a restricted form of clauses called horn clauses;
  • brief describes how LP can differ from Prolog.
How to prepare

 

Ensure you have a grasp of the idea of how a logic programming language selects clauses from the program database.

Revise your knowledge of propositional calculus, perhaps by using Dr Lee's notes:

Slides

  If you really want the slides from the lecture ... but don't forget printing the slides is not the same as understanding them.

Summary

  Summary from the lecture

Individual study suggestions and further reading

 

The theoretical basis of logic programming is covered in:

Clocksin and Mellish have a program to change predicate logic formulae into clausal form:

Assessed work associated with this lecture

  Tutorial sheet 6