I have repeatedly emphasised that, as far as the production system is concerned, the groups of symbols are completely arbitrary. Only their form matters to the program that runs the matching, resolution, and firing processes, not their content. However, when we write programs, we usually do intend each name to have some content - to refer to something. Here are some examples of two-argument predicates, where the meaning should be clear.
event( 1756, mozarts_birth ) loves( joe, mary ) teaches_at( joseph, st_annes ) colour( grass, green ) legs( sheep, 4 ) costs_pence( mars_bar, 21 ) is_a( sheep, mammal )
For such predicates, the predicate usually names a relation that holds between its arguments. This is easiest to see with spatial predicates, such as
on( block_a, block_b )You can also use predicates to say that an object has a certain property, to say that an object belongs to a certain class, or to give the result of operating on the object in a certain way. The last use is like that of a function in maths, where one argument is the input and the other is the result.
Predicates of fewer or more than two arguments can also be interpreted as relations, though this is less obvious to non-logicians.
In most programs, the names appearing as arguments are used in one of three ways:
A predicate and its arguments form a proposition: a logical statement. This may be either true or false, depending on the meaning of all the names and the state of the real world. Here are some propositions and possible meanings:
When writing a program, you should always keep the intended meanings of
your predicates and arguments in mind. It is not always clear from the
names alone. For example, does
gold refer to gold as a chemical
entity in general, or to gold in finance at a particular time, or to a
particular chunk of gold? Compare its meaning in the sentences ``Gold
does not dissolve in water'', ``Gold rose by £2.45 today'', and
``The gold in this ring was mined in 1847''.
As another example, of a different kind, does
mean that A is standing on B, or that B is standing on A? Be careful
about the order of your arguments.