Next: Predicates
Up: Syntax and Semantics of
Previous: Facts
- A clause is a construction of the form
- Each of
are atoms
- Can be read as:
is true if
are all true
-
is termed as the head, and
as the
body
- For convenience,
is often written as :-
- Example:
-
- eats(X, Y):- bigger(X, Y).
-
- pet(X):- animal(X), sound(X, bark).
- Interpretation:
-
- The big eat the small, or
If some X is bigger than some Y, then X eats Y
-
- A pet is an animal which barks, or
If X is and animal and X barks, then X is a pet, or
For X to be a pet, it must be an animal and the sound it
produces must be a bark
Last modification: Thu Oct 7 12:04:03 MEST 1999 <webmaster@clip.dia.fi.upm.es>