quote:Original post by kordova
quote:Original post by bishop_pass
So, in the beginning, you want to bootstrap the knowledge base with enough meta-info and common sense to disallow such things. It''s possible.
Ok, that''s where I reasoned that you stood. My other question is whether bassert should only allow slots to be added to existing structures (which will do all the necessary checks to make certain no illegal entries) and add a separate instantiation function taking the name and type. This would force a distinction between making and modifying which seems to me to have some benefits.
Either way. Your preference would appear to be in part motivated by a desire for less errors. Certainly, you don''t want a typo to cause a new frame to be made when you meant an existing one.
I hope you have (and it appears that you have) caught on to the subtlety that slots are also frames, and part of a hierarchy themselves.
For example, instance-of is a frame, and it looks like this:
instance-of:
((instance-of (slot))
(makes-sense-for (thing))
(inverse (instances)))
So, given that info, we see that when we assert:
(instance-of human-male bob)
assert looks up the frame for instance-of and sees that the inverse is instances, and automatically asserts the inverse relation, that being:
(instances bob human-male)
Also, bob must be an instance-of thing for the slot
instance-of
to reside on the bob frame, this following from the fact that instance-of makes-sense-for thing.
And lastly, the context under which we use instance-of is to to be a slot on another frame, and that''s why instance-of is an instance-of slot, as opposed to something else, like a frog.