CSE 413

Quiz #5

5/12/97

In giving the answer for any Prolog query on any quiz or test, give ALL possible answers fully unless otherwise indicated.

Given that the following facts and rules (and no others) have been entered in a Prolog database:

What would be the result of making the following queries?

sister (S,maria) ?

 

female (maria) ?

 

Suppose "mother(X,Y)" means that "X is the mother of Y." Add one (only) plausible rule to the above database which would deduce at least one case of when someone is a mother.

 

 

Suppose L is the list [1,2,3,4,5]. For each of the following, tell whether it can be unified (matched) with L, and if so, what the instantiation of the variables would be.

(2 pts.) Explain briefly the difference (if there is any) between a type and a type constructor.