Prev Up
Go backward to Solution to Question 1, part (b)
Go up to Question 1 [15 marks]

Solution to Question 1, part (c)

Clark's completion of the knowledge base:
passed_each([],St).
passed_each([C|R],St) <-
    passed(St,C) &
    passed_each(R,St).
is
passed_each(X,Y) <->
    (exist  St  X=[] & Y = St)  or 
    (exist  C exist  R exist  St  X=[C|R] & Y = St &
passed(St,C) & passed_each(R,St).) 
You could also replace Y everywhere with St, and remove the exist St and Y=St.
Prev Up