Spring 2001, CSE 428: Quiz 10.2 - 11 April 2001


Please write your Name and Student ID at the top of the page. By default, this quiz will be returned in Section 2 (morning section).
  1. [Pts 2]   For each of the following datatypes, say whether it is polymorphic (aka parametric) or not

  2. [Pts 2]   A polymorphic function is (only one answer, please)

  3. [Pts 2]   One of the features of logic programming is (only one answer, please)

  4. [Pts 4]   Consider the following definition of the mother and of the ancestor predicates:
       mother(a,b). /* a is mother of b */
       mother(a,c). /* a is mother of c */
       mother(c,d). /* c is mother of d */
       mother(d,e). /* d is mother of e */
    
       ancestor(X,Y) :- mother(X,Y).
       ancestor(X,Y) :- mother(X,Z), ancestor(Z,Y).
    
    For each of the following queries, please indicate all the answers that are returned (assuming that we interactively keep asking for more answers). If no answers are returned, write "no". If the query generates an error, write "error".