The top-level interpreter

next up previous contents
Next: Example of top-level interpreter
Up: Introduction to Prolog for Mathematicians
Previous: A note on the quantification of variables

The top-level interpreter

I have shown lots of definitions. How can you use them?

All Prolog systems come with a top-level interpreter. This is a program which reads questions from the user, and calls Prolog's inference mechanism to determine their truth.

    Display a '?-' prompt.
    Read the next question.
    If it is true,
        display the variable bindings
        say 'no'
    Goto Loop.

Jocelyn Ireson-Ireson-Paine
Mon Jul 17 22:27:41 BST 1995