Introduction to Prolog

The material in these pages provides a basic introduction to the programming language Prolog. It is highly recommended that you also consult one of the books listed in the further references.

Other Prolog Resources

The Prolog Language

The Prolog language is unlike the imperative languages that you are used to. In a real sense there is no such thing as a "Prolog program". Prolog works by querying a database of facts and rules. The language is thus declarative in nature. You tell the system how to recognize the answer and the system searches for the answer. This make prolog both easier and harder than other languages. Easier because there is trmendous evelrage obtained from the declarative approach, harder because some things that you are used to (mainly destructive assignment) are not supported at all.

This guide to the language is divided into four parts. But before you start you need to know how to access and use Prolog at SJU.

  1. Database programming with Prolog
  2. Pure Prolog programming
  3. Non logical Elements of Prolog. This includes I/O.
  4. Advanced Techniques of Prolog It is not necessary to use these techniques in your programs although they will run better if you do.


Return to UG AI home page

Last Changed: 2 August 1995