Typo! In exercise 5 part 9, I say Person.Family when I meant Person.FamilyMember.
Typo! In exercise 5 part 9, when I refer to step 7 I meant step 8.
Typo! In exercise 5 part 11, when I refer to problems 7 and 8 I meant steps 9 and 10.
Typo! In exercise 5 part 6, the Ancestor attribute should belong only to students.
In Exerise 5 part 3, what do you mean by "being stored"?
What I mean by "being stored" is that Student.Advisor links are extensional, while "not being stored" means that the Advisor.Student links are intensional. That is, Student.Advisor is like a base relation while Advisor.Student is like a view. To "unstore" the current Advisor.Student facts, you can use rules if you want, but probably the easiest thing is to use the Examine command. But you still need a rule to define the intensional links.
For Exercise 5, can I create attributes other than the ones I have been told to make?
No.
Do I need rules to make, for example, Person.Name an attibute of Advisor?
No. A single attribute can be assoicated with multiple classes. You just associate the attribute with many classes in the same way that you associated it with one class. You will need to do this quite often in this exercise set.
Can I automate class inheritance of attributes, or do I need to add each attribute of a superclass to a subclass manually?
This is possible, and you can try it if you like. You would need to add a meta-level rule to do this for all classes. Meta-level rules go in the metalibrary. Note that adding attributes to subclasses manually is just fine as far as grading is concerned. However adventurous students can try and add a rule to the metalibrary.
Can I make advisor a subclass of student?
No. All Advisors and Students are Persons, but not every Advisor is a Student (and not every Student is an Advisor).
I have an attribute with a range of Number. What should its createstyle, searchstyle and changestyle be?
Use the TypeIn style.
Can you explain the Transform operation?
The XForm operation is like the Transform operation you used in exercise set 1, expcept it uses a textual interface (KIF) instead of a graphical one. The upper box contains the conditions, and the lower box the conclusions. For example: Conditions: (book.year ?b ?y) (- ?y 1900 ?x) Conclusions: (book.year ?b ?x) (not (book.year ?b ?y))
Where can I learn about the "string manipulation procedural attachments"?
These are described at the end of Lecture 7. See the lecture notes.
Do I need to enforce the fact that no student has more than one advisor?
No. However if you want to, here's some code that should do that
for you:
(=> (student.advisor ?s ?a)
(student.advisor ?s ?b)
(distinct ?a ?b)
(not (student.advisor ?s ?b))
(I haven't tested it, but it looks right to me :) ).Can I use XForm to do the initial materialization of the FamilyMember attribute?
Sure. Of course you still need update rules to keep it up to date.
Can I view an object as being other than its primary class?
Yes. You can use the View operation. For example:
http://localhost:3000/repository/VIEW?Object=JOHN.DOE&Class=ADVISOR
If you like, then yes. However don't add a Founder attribute to Person. Persons don't have founders, though students and advisors do. Incidentally, there are solutions that don't require this new attribute, so I'm not implying that everyone should do this. You are also allowed to create a predicate Founder.Instance if you like.
Which algorithm is used for query rules? Several were given in class.
The repository uses the algorithm without a history list. That is, it doesn't check if a subgoal has already been seen in the past. This can lead to infinite loops, such as:
(<= (advisor.student ?a ?s) (advisor.student ?a ?s))
(<= (father.instance ?p) (parent.instance ?p) (not (mother ?c ?p)))
The problem is that ?c is unbounded, and can in theory be anything. The meaning of the above rule is "if ?p is a parent and there is some ?c such that ?p is not the mother of ?c, then ?p is a father.
Can a student be a founder?
No, a student cannot be a founder. All students should have exactly one advisor, and a founder has no advisor.
What is expected of me during the presentation?
You should show us your database, now working with rules. All "obvious" rules should be there, like subclassing and reverse links. Also make a couple of "cool" rules to show off- be creative here! You will demo your system, showing that it works, and show the rules using Examine.