Clauses and Predicates Flashcards
1
Q
What is a clause
A
A fact;
A rule.
2
Q
What is a fact?
A
It is taken to be true.
christmas.
dog(fido).
likes(X, david).
3
Q
What is a rule?
A
A rule may be either true or false, only computation will show.
grandfather(X, Y)
:- father(X,Z), parent(Z, Y).
A rule must be an atom or compound term followed by a :- followed by further atoms or compound terms.
4
Q
Predicates + Data = …
A
Programs
5
Q
What is a predicate?
A
A predicate is defined by several clauses.