Clauses and Predicates Flashcards

1
Q

What is a clause

A

A fact;

A rule.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a fact?

A

It is taken to be true.
christmas.
dog(fido).
likes(X, david).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Predicates + Data = …

A

Programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a predicate?

A

A predicate is defined by several clauses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly