Next: Programs
Up: Syntax and Semantics of
Previous: Clauses
- A collection of clauses with the same head name
- They represent different possibilities for something to be true
- Or, alternatively, different ways of accomplishing a task
- Example:
-
- pet(X):- animal(X), sound(X, bark).
pet(X):- animal(X), sound(X, bubbles).
- Meaning:
-
- A pet is an animal which barks, or an animal which
makes bubbles
- Variables in a clause are local to that clause (e.g., the Xs in the predicate above).
Last modification: Thu Oct 7 12:04:03 MEST 1999 <webmaster@clip.dia.fi.upm.es>