Prev Up Next
Go backward to Question 1
Go up to Top
Go forward to Question 3

Question 2

Consider the domain of house plumbing represented in the following diagram:
The Plumbing Domain

In this example constants p1, p2 and p3 denote cold water pipes. Constants t1, t2 and t3 denote taps and d1, d2 and d3 denote drainage pipes. The constants shower denotes a shower, bath denotes a bath, sink denotes a sink and floor denotes the floor. The diagram above is intended to give the denotation for the symbols.

Suppose we have as predicate symbols:

The file contains a CILog axiomatization for how water can flow down drain d1 if taps t1 and t2 are on and the bath is unplugged.
  1. Finish the axiomatization for the sink in the same manner as the axiomatization for the bath. Test it in CILog.
  2. Axiomatize how the floor is wet if the sink overflows or the bath overflows. They overflow if the plug is in and water is flowing in. You may invent new predicates as long as you give their intended interpretation. [Assume that the taps and plugs have been in the same positions for one hour; you don't need to axiomatize the dynamics of the turning on taps and inserting and removing plugs.] Test it in CILog.
  3. Suppose there is a hot water system is installed to the left of tap t1. This has another tap in the pipe leading into it, and supplies hot water to the shower and the sink (there are seperate hot and cold water taps for each). Add this to your axiomatization. Give the denotation for all constants and predicate symbols you invent. Test it in CILog.
You need to hand in a complete listing of your program, including the intended interpretation for all symbols used and a trace of the CILog session to show it runs.
  • Solution

  • David Poole

    Prev Up Next