# CS322 Fall 1999

Module 2 (Symbols and Semantics)

Assignment 2

## Due: 1:30pm, Monday 20 September 1999.

The aim of this assignment is to learn about semantics and how to
axiomatize a domain.
We will discuss this assignment in Monday's class. Please be prepared
to play your part in the discussion.
You are to hand in this assignment at the end of the lecture.

Given the knowledge base
a <- b & g.
b <- c & d.
b <- e.
c.
d <- f.
f.

where *{a,b,c,d,e,f,g}* is the set of all atoms.
- Give a model of the knowledge base.
- Give an interpretation that is not a model of the
knowledge base.
- Give two atoms that are logical consequences of the
knowledge base.
- Give two atoms that are not logical consequences of the
knowledge base.

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:

*pressurised*, where *pressurised(P)* is true if pipe *P* has
mains pressure in it.
*on*, where *on(T)* is true if tap *T* is on.
*off*, where *off(T)* is true if tap *T* is off.
*wet*, where *wet(B)* is true if *B* is wet.
*flow*, where *flow(P)* is true if water is flowing through *P*.
*plugged*, where *plugged(S)* is true if *S* is either a sink or
a bath and has the plug in.
*unplugged*, where *unplugged(S)* is true if *S* is either a sink or
a bath and has the plug in.

The file plumbing.pl
contains a CILog axiomatization for how water can flow down drain *d1* if
taps *t1* and *t2* are on and the bath is unplugged.
- Finish the axiomatization for the sink in the same manner as the
axiomatization for the bath. Test it in CILog.
- 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.
- 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.
For each question in this assignment, say how long you spent on it.
Was this
reasonable? What did you learn?

David Poole