Prev Up Next
Go backward to Solution to part (b)
Go up to Question 1
Go forward to Solution to part (d)

Solution to part (c)

Give axioms that let you derive noflow for the shower, into the bath and in the drains. noflow is true when flow is not true. You may not use negation as failure. You can define other predicates if you like.

We need to know when a tap is off, and this must be primitive:

off(t3,init).
off(t2,init).
off(t1,init).
off(T,do(turnoff(T),S)) <-
   poss(turnoff(T),S).
off(T,do(A,S)) <-
   poss(A,S) &
   off(T,S) &
   A \= turnon(T).
We can then axiomatize how flows work:
noflow(sink,S) <-
    off(t3,S).
noflow(sink,S) <- 
   unpressurised(p3,S).
unpressurised(p3,S) <- 
   off(t1,S).
unpressurised(p3,S) <- 
   unpressurised(p1,S).
noflow(shower,S) <-
    off(t2,S).
noflow(shower,S) <-
   unpressurised(p2,S).
unpressurised(p2,S) <- 
   off(t1,S).
unpressurised(p2,S) <- 
   unpressurised(p1,S).

David Poole

Prev Up Next