Quiz Stuff

Quiz 8; March 1; Time: 3:30; 4 points

  1. What are the names of the ports in the four port model?
  2. What does Prolog do if a rule's very first clause fails?
  3. What is the output of the following query?
    ?- A=5, writeln(A), write(B), B=7, B=A, write(done).
  4. Write a rule positive(N) that succeeds iff (if and only if) N is an integer that is greater than zero.
    ?- positive(5).
    true.
    ?- positive(apple).
    false.
EC ½ pt: What's the output of the following query?
                A=5, B=7, write(A=B+A).