next up previous contents index
Next: Declaring Rules Up: Special Forms Previous: Declaring a Taxonomy of

Declaring Slots and their Domains

(:slot  atom (term tex2html_wrap_inline1480 ) descriptor tex2html_wrap_inline1476 )
Declares a new slot and types it using term tex2html_wrap_inline1480 . Typing is enforced using an if-added rule. For example:

displaymath1614

declares the slot has-disease to be a relation between people and diseases. If one then asserts:

displaymath1615

Algernon concludes that p1 isa people, and d1 isa diseases.

:slot takes the following ``keyword'' arguments:

:cardinality  n
Asserts that the slot holds at most n values. Defaults to nil (no restriction). In the current implementation, cardinality information is primarily used to limit the application of if-needed rules (if a slot is queried but is full then the rules are not applied).
:partition  partition
Places the slot in partition partition (see section 2.3.1). Defaults to main-partition.
:backlink  slot2
Backlinks the slot to slot2. This means that if Algernon learns (slot f1 f2) it will conclude (via an if-added rule) (slot2 f2 f1).
:inverse  slot2
Asserts that the inverse of the slot is slot2. This is equivalent to bi-directional backlinks.
:comment 
Adds a comment for the slot.

See section 4 for examples of the use of :taxonomy and :slot.



Micheal S. Hewett
Tue Oct 29 11:15:33 CST 1996