Predicates and arguments


next up previous contents
Next: What do they mean?
Up: Production systemspredicates, and logic
Previous: Production systemspredicates, and logic
Back: to main list of student notes

Predicates and arguments

In fact, this structure will be familiar if you have studied logic. A group starts with a name followed by an open bracket. This is called the predicate. After the bracket come a sequence of names or numbers separated by commas. These are called the arguments of the predicate. Finally, there comes a closing bracket. Note that the word ``argument'' is used in a technical sense peculiar to mathematics; this sense has nothing to do with its everyday meaning.

Predicates can have any number of arguments, so groups like these are all valid:

job(mp)
loves(john,mary)
pub(prince_of_wales,walton_street,oxford,morrells)

If a predicate has no arguments, then you just write its name:

mp
hot
Prolog will not allow you to have the name followed by an empty pair of brackets, though some other languages do.


next up previous contents
Next: What do they mean?
Up: Production systemspredicates, and logic
Previous: Production systemspredicates, and logic
Back: to main list of student notes



Jocelyn Paine
Thu Feb 15 00:10:41 GMT 1996