CSC 8310, First Quiz
David Matuszek, Spring 2001
  Name ____________________________________
  1. True or False (Prolog):

    1. ____ Unification is a symmetric operation.

    2. ____ A variable can be unified with anything.

    3. ____ A clause consists of one or more predicates.

    4. ____ A name that begins with an underscore is an "anonymous" variable.

    5. ____ SWI-Prolog uses "consult" rather than "reconsult."

    6. ____ When you do unification, any arithmetic in the clauses being unified is performed automatically.

    7. The following unifications will succeed:

      1. ____ mother(john) = mother(mary).

      2. ____ loves(john, X) = loves(X, mary).

      3. ____ mother(father(john)) = grandmother(john).

      4. ____ mother(mary, father(X)) = mother(X, father(Y)).

  2. Short answer (Prolog):
    1. To add a fact to the database, use the predicate named _______________.

    2. To remove a fact from the database, use the predicate named _______________.

    3. To display all the facts and rules in the database with a given name, use the predicate named _______________.

    4. To end a line of output text, use the predicate named _______________.

    5. To indicate that a particular predicate may be added or removed, use the predicate named _______________.

  3. Short answer (General):
    1. The two programming paradigms that both claim the title of "Fifth Generation" are _______________ and ________________.

    2. When you talk about what a statement in a programming language "means," you are talking about its _______________.

    3. If a function can modify the value of a parameter, and the new value is available to the calling routine, then the parameter was passed by _________________.

    4. Fortran was successful primarily because it was very _______________.