CS322 Fall 1999
Module 7 (Knowledge Representation Issues)
Assignment 7
Due: 1:30pm, Friday 29 October 1999.
The aim of this assignment is to learn about some knowledge
representation issues that will be used later in the course.
Consider the relations:
- course(Id,Year,Inst,Room,Limit) that is true if the course
with identifier Id, in year Year has instructor Inst, is held in
room Room and has a limit of Limit students.
- limit(Id,Year,Limit) that is true if the course
with identifier Id, in year Year has a limit of Limit students.
Consider the knowledge base:
limit(Id,Year,Limit) <-
course(Id,Year,Inst,Room,Limit).
course(cs322,1999,david,cicsr208,120).
course(cs322,1998,craig,cicsr208,100).
course(cs327,1999,jim,cicsr202,50).
- Give the knowledge base where we represent the course relation using
the object-attribute-value representation. (I.e., specify the above
three facts for course in terms of the prop relation.)
- Define limit
in terms of this new representation for the course
information. (The limit relation should have the same semantics as
before.)
- Explain why it may be advantageous to use the
object-attribute-value representation for course information.
Check that your representation works with CIlog. Your new axiomatization should be able
to answer exactly the same
limit queries as the original version.
Suppose a conditional expression is either:
- a value, where a value is either a number or is a Boolean value (true or
false); or
- is of the form if(Att,Then,Else) where Att is a Boolean
attribute, and Then and Else are conditional expressions.
You are to write a relation
- ceval(Obj,CE,Val) where Obj is an object, CE is a
conditional expression and Val is the resulting value of evaluating
the conditional expression for the individual Obj.
To evaluate a conditional expression for an individual is simple: if
the conditional expression is a value, then that value is returned. If
the conditional expression is of the form
if(Att,Then,Else), then if
the value of the attribute
Att for the individual is
true, you
evaluate the
Then conditional expression, otherwise evaluate the
Else conditional expression.
For example, given the knowledge base:
prop(cs322,fun,true).
prop(cs322,easy,false).
prop(cs322,interesting,true).
prop(cs322,confusing,true).
Then
ceval(cs322,if(fun,if(easy,99,80),if(confusing,55,70)),Val)
should return
Val=80.
For each question in this assignment, say how long you spent on it.
Was this
reasonable? What did you learn?
David Poole