Re: Bibliography Example QuestionsTom Gruber <Gruber@Sumex-AIM.Stanford.edu>
Date: Fri, 28 Aug 92 11:03:49 PDT
From: Tom Gruber <Gruber@Sumex-AIM.Stanford.edu>
To: Charles Petrie <firstname.lastname@example.org>
Cc: email@example.com, ontolingua@SUMEX-AIM.Stanford.EDU
Subject: Re: Bibliography Example Questions
In-Reply-To: Msg of Mon, 24 Aug 92 11:34:46 MET DST from Charles Petrie <firstname.lastname@example.org>
Here are some excellent questions about the bibliography ontology,
with my replies. The Q&A reveals a lot about how to use ontolingua
and the design rationale of the ontology.
I make reference to the bibliography ontology and frame ontology. The
latest version of them, and other example ontologies, are maintained
in the public directory
Please feel free to send in questions like this to the ontolingua
and/or srkb list (addressed above).
> :axiom-def (subclass-partition
> BIBLIO-THING (setof biblio-text
> agent organization timepoint document reference)))
> Does this just define the set of subclasses of BIBLIO-THING? If so, why
> not have a simpler syntax? Why the "set-of" notation in particular?
Subclass-partition says two things. First, the set is a
class-partition. That means the instances of each class are mutually
exclusive. Second, all the classes in the set are subclasses of
biblio-text. It is possible to say either of those constraints
independently using the frame ontology vocabulary, but they happen
together so often that I built a relation that captures both.
Why "setof"? Interesting design choice. The "notation" here is not
new syntax for a language, it's just the definition of a particular
relation called subclass-partition. In KIF you can define relations
that take an arbitrary number of arguments, using a a "sequence
variable" that acts like &rest in Lisp. So I could have made the
subclass-partition relation take a variable number of arguments. I
decided not to use a sequence variable because that is not a minimal
ontological commitment; it imposes an extra logical constraint for the
sake of syntactic convenience. A sequence (list) imposes an order.
But a class-partition requires no order among the classes. And I
wanted the second argument to subclass-partition to be a
class-partition -- a thing that is defined independently as a set of
I'm not convinced that this is the best style for shared definitions,
but that's the rationale. Suggestions are welcome.
FYI, Here's the definition of subclass-partition from the frame
(define-relation SUBCLASS-PARTITION (?C ?class-partition)
"A subclass-partition of a class C is a set of
subclasses of C that are mutually disjoint."
:iff-def (and (instance-of ?C class)
(instance-of ?class-partition class-partition)
(=> (member ?subclass ?class-partition)
(subclass-of ?subclass ?C)))))
> 2. (define-class KEYWORD (?keyword)
> "A keyword is a name used as an index."
> :def (biblio-name ?keyword))
> (define-relation REF.KEYWORDS (?ref ?keyword)
> "Keywords associated with a reference."
> :def (and (reference ?ref)
> (keyword ?keyword)))
> This definitions just say that keywords are biblio-names and that the
> domain of REF.KEYWORDS are references and the range is keywords,
> right? That is, the only inferential constraint on keywords is that they
> must be strings?
Yes, that is the only formal constraint. But notice that I
defined the class biblio-name as a primitive subclass of string
in anticipation that there are meaningful differences between
identifiers and other kinds of strings. Maybe when this ontology is
merged or specialized there will be some formal constraints on those
names, such as their participation in some special relation or a
> 3. (define-function AGENT.NAME (?agent) :-> ?name
> "Function from an agent to the name by which it goes. One name per
> :def (and (agent ?agent)
> (biblio-name ?name)))
> The use of functions here seems to be define an attribute (slot) of a
> class and restrict its values to a certain class and a cardinality of one.
> Wouldn't a simpler syntax do? Don't you want a more general way of
> specifying cardinality restrictions? I'll suggest something below. But
> my basic understanding is that by "function", you mean a single-valued
> attribute or slot.
The semantics of functions and relations, now an official part of the
KIF specification, is that functions are a special case of relations.
Functions are relations with the "single-valued" property: the last
argument to the relation is unique given the butlast arguments.
Relations are defined as sets of tuples (which you can think of as a
subset of the cross product of sets). This is a standard treatment of
relations. In the math textbooks, functions are sometimes defined as
relations and sometimes as mappings. We chose the former for a lot of
reasons, mainly for internal coherence. This doesn't exclude the
possibility of axiomatizing mathematics based on mappings, but gives
the name "function" to that subset of relations that are functional.
The KIF document is conspicuously silent on "slots". The frame
ontology makes a minimal commitment: it talks about the
properties of binary relations and unary functions that are usually
associated with slots, without defining a special class called "slot".
So far that has been adequate for ontolingua translators.
I am working on an axiomatization of the several flavors of slots that
one finds in the literature and systems, but that is still in
As for "simpler syntax". First, there are relations in the frame
ontology that constitute "a more general way of specifying cardinality
restrictions." Second, functions are an important special case. UNARY
functions are equivalent to single valued binary relations. However,
functions can have other arities as well; they aren't always
interpretable as slots. Third, if you read carefully in the
Ontolingua documentation you will see that there is an alternate "slot
syntax" for those who prefer it. I haven't encouraged its use, but
you are free to play around with it and let me know what you think.
It is a pure syntactic sugar over existing notation for binary
relations and constraints on classes.
> 4. (define-class AGENT-NAME (?name)
> "A string that is the name of some agent."
> :axiom-def (exact-range AGENT.NAME AGENT-NAME))
> I think this says that anthing that is of type AGENT-NAME must be the
> output of a call to AGENT.NAME. Does this, together with the definition
> of AGENT.NAME, automatically make AGENT-NAME a subclass of
> BIBLIO-NAME? If so, I would rather see this explicitly stated. If not,
> then my model is hopelessly confused and I need help, please.
I think your model is intuitively correct. Words like "output" and
"call" suggest a functional language; remember these are purely
logical constraints. However, it is correct to infer that agent-name
is a subclass of biblio-name by the reasoning you gave. So strictly
speaking, it would be redundant to state this in addition to the
axiom given. Some systems, perhaps the description logics, could
infer this for you when they classify the thing. However, as a
matter of good practice I was putting in the domain, range, and
subclass relationships explicitly, even if they were redundant. So,
to do what you suggested would result in:
(define-class AGENT-NAME (?name)
"A string that is the name of some agent."
:axiom-def (exact-range AGENT.NAME AGENT-NAME)
:constraints (biblio-name ?name))
Notice I use :constraints instead of :def or :iff-def. The :def label
says that this is a partial (primitive) definition. However, the
axiom actually is a complete definition; something is an agent name if
and only if it is in the exact range of the relation agent.name. But
if I used :iff-def, it would be incorrect because the statement
(biblio-name ?name) is NOT, by itself, the necessary and sufficient
condition for (agent-name ?name). This kind of situation is one of
the reasons for the :constraints clause, which labels a sentence as a
> 5. (define-class AUTHOR (?x)
> "An author is a person who writes things. An author must have a
> :def (and (person ?x)
> (has-one-of-type ?x author.name biblio-name)
> (have-same-values ?x author.name person.name)))
> It looks like the "have-same-values" call is saying that for any ?x
> that's an author, then the value of a call to author.name should be the
> value of a call to person.name. And the "has-one-of-type" call says
> that there must exist a value of the type "biblio-name". That's a little
> redundant, but presumably, it could have been of a subclass. Is that
This is the same issue of redundancy brought up in the previous case,
only this time I'm guilty of being redundant for the sake of clarity.
I am not aware of any guidelines for making such choices; usually they
are motivated by the expressive and inferential power of the
underlying representation system. Since I'm shooting for portability,
I tend to be a bit redundant.
> 6. I don't think you defined AUTHOR.NAME, did you?
> Again, my model may be all screwed up, but why didn't you just say
> that AUTHORs are AGENT's that are people? All agents have exactly one
> agent.name by definition. Then you can just define AUTHOR.NAME to be
> the PERSON.NAME.
Yes, that is a problem with my ontology design that I fixed in the
second version. This sort of redesign loop is informing the design of
ontology support tools. I can imagine a tool that would have caught
this (something that generates incompleteness warnings like a Lisp
compiler). Send in examples of similar "bugs" and how they might be
supported in software. That's part of the purpose in doing this