Prolog, like LISP, has a pure subset of features. The implication is that some features of both languages are regarded as impure ---these are often provided for efficiency or for useful, but strictly unnecessary features. The impure features of Prolog damage the pleasing equality between the declarative and procedural readings of Prolog programs.

Do not worry about the term first order for now. Much later on, it will become relevant.

Note that this is a recursive definition.

The failure to capitalise ``france'' and ``paris'' is quite deliberate. In Prolog, named, specific objects ( i.e. the atoms) usually start with a lower case letter.

Referred to as a float in the SICStus Prolog manual [SICStus, 1988].

These two body parts are `joined' by the neck. There is an analogous concept in the Prolog literature.

This could be enforced by the move/3 relation (predicate) but this would produce an unnaturally specific version of moving. The real solution is to provide some predicate such as not_same/2 which has the meaning that not_same(P1,P2) precisely when P1 is not the same as P2.

It's meaning is more accurately captured by the procedural `and then'.

This term is used informally. The basic idea is that a program has an initial structure which can be represented as a tree. The nodes of the tree are goals and the arcs represent the rules used to invoke a particular goal or set of goals. A computation can be regarded very roughly as a path through this tree (really, a subtree).

At some point we had to input these facts into the system. This is usually done by creating a file containing the facts and rules needed and issuing a command that Prolog is to consult the file(s). Use the command
where filename is the name of your file. A command is very like a query. A query is written something like ?- woman(X). The result (on the screen) is X= something followed by yes or the word no (if there is no such X). A command is written something like :- woman(X). The result is that the system will not print the binding for X (if there is one) (or the word yes) or will print the symbol ? if the query failed. The reason for the distinction between a query and a command will be explained later.

See chapter 5 for more details.

We also need ways of accessing an arbitrary element, but this can wait


In SICStus anyway ---if you are using a Prolog system that distinguishes between consult/1 and reconsult/1 then you must use reconsult/1 or you can get into trouble.

div/2 is integer division. It is a synonym for ///2 ---read this as an infix operator of arity 2 written //.

If you have compiled your program then you now have a problem!

The off (no prompt) choice provided by Quintus does not seem to be supported.

Paul Brna
Mon May 24 20:14:48 BST 1999