Important note about XML loading - Infomaster doesn't like files encoded in UTF-8. Change the encoding to ANSI (using, say, Notepad in Windows), and it should like it. Also, sometimes Infomaster is confused by DOCTYPE declarations, so try removing those if you are having problems.
Minor change (Sunday 11:59pm) - feature.classroom has been removed from the metadata.
Minor change (Monday 2:00pm) - the year class has been added to the pivot schema, along with the attribute year.student. Year is a subclass of Thing.
More than minor change (Tuesday 1:15am) - in exercise 7.2, use semipositive negation instead of classical negation.
Minor change (Tuesday 11:30pm) - there are some professors in the Stanford data that do not have offices in Gates. Two of them were just found- David Heeker and David Rummelhart. I changed their offices to Gates 401 and Gates 414, respectively. There may be more examples of this. If you find them, feel free to delete the fact from your data, since every person in the Stanford data should have an office in Gates. (Clean that dirty data!)
Some bugs in the University example metadata
-Faculty.jpeg is an old attribute that is not used anymore. It has been replaced by faculty.image. Just ignore the faculty.jpeg attribute.
-The domain of school.name should be School, not Book.
-The domain and range of staff.classification should be Staff and Job, not Faculty and Rank.
Can I change the pivot schema? For example, can I add classes and/or attributes?
No, you are not allowed to change the pivot schema in any way. Your job is to write query rules that virtually populate the pivot schema from the other two sources. As discussed in class, when loading data into the repository you might find it useful to standardize the names apart. For example, you could first load in the Stanford data to the repository, and use XForm to change person.instance to stanford.person.instance. Then load in the "Harvard" data to the repository and similarly change person.instance to harvard.person.instance. Then you could write rules that distinguish between the two concepts of person, should that be required.
Should I use the bucket algorithm or the inverse rules algorithm for exercise 8?
No, you will not be using either of these advanced techniques for this exercise. You will be writing rules by hand that populate the pivot schema given to you in terms of the Stanford and "Harvard" schemas.
Can I assume that the persons don't overlap between the two sources? What about buildings?
No, people can overlap, although only faculty (sometimes Stanford has visiting faculty from other universities). You can assume that Stanford doesn't share buildings with any other universities.
What is the range of the following attributes: school.dean, department.chair, and group.director?
school.dean - person
department.chair - faculty
group.director - faculty
Do I need to use XForm to do the renaming?
No, you can use whatever method you like. For example, a simple search-and-replace in a text editor would probably be eaiser than using XForm.What negation semantics should I assume for exercise 7.3?
Your answer to 7.3 should work for all negation semantics. You don't need to use negation at all for 7.3. See the lecture 12 slides- the inverse rules for the simple cases don't use negation.
Can I turn on automatic subclassing?
You can make inheritance of attributes happen automatically by adding the following rule to the metalibrary:
(<= (attribute ?y ?a) (superclass ?y ?x) (attribute ?x ?a))
How can I quickly create a schema?
To quickly create a schema, use the Examine command on the manager. Find some existing class and attribute definitions and use them as templates (copy/paste is useful here).
How can I set Infomaster with classical negation? Nagation-as-failure? Semipositive negation?
Infomaster defaults to classical negation unless you use "unprovable", which forces negation as failure. Say you have:
(p bob) (q sue) (<= (c ?x) (q ?x) (not (p ?x))) (<= (f ?x) (q ?x) (unprovable (p ?x))) Then the system will conclude (f sue) but not (c sue).To simulate semipositive negation in Infomaster, use unprovable on the base relations and not on the intensional relations.
For exercise 8, do I have to write the metadata for the pivot schema?
No, you do not need to write the metadata for the pivot schema. You just need to write rules to define base level pivot schema facts from the source facts.
In the pivot schema, should I use the hyphenated version of the appliances (overhead-projector, computer-projector) or the dot version (overhead.projector, computer.projector)?
Use the hypenated version. You might want to use either string functions or a mapping table to convert between the two versions. (See lecture 7, slide 36 for info about the string functions).
Should I extract floor information from offices that don't have a floor listed?
Yes, you should do this. Assume that the first digit of the room number is the floor of the room. The makestring function should prove useful here. For example, (makestring 300 "300"). Note: you will have to create a fifthfloor instance.
How can I check the integrity of my data? For example, how can I check that Total attributes are indeed Total?
There are a whole bunch of checks on the operations page (CheckClass, CheckPredicate, CheckAttribute, CheckRelation, CheckData, CheckRules). For example, CheckAttribute will tell you if you have problems with an attribute being total or not. CheckClass will check all of the attributes for a particular class, so that may be more useful.
If we don't have to write metadata for the pivot schema, then how can we check and see if our virtually populated schema is correct?
Well, one solution is to write the metadata. :) Just because I'm not grading it doesn't mean it won't be useful. My intent was for you to not have to worry about making all of the details of the schema perfect, like unique/total and the UI information. You can create a schema pretty quickly using Examine and copy/paste in the manager, and that may be the best idea.
Another solution is to use the Ask command to query the database. You can use Ask as follows:
In the top box, type the head of the query.
In the bottom box, type the body of the query.
For example:
Top box:
(grandfather ?x ?z)
Bottom box:
(parent ?x ?y)
(father ?y ?z)
A minor note: for students, person.affiliation and student.major are exactly the same.
For 7.1/7.2, should I use query rules or update rules?
Use query rules.
What is the definition of a great-grandparent?
A great-grandparent is the parent of a grandparent.