Non-declarative Constructors?
macgregor@ISI.EDU
Message-id: <199210021709.AA17573@quark.isi.edu>
Date: Fri, 2 Oct 1992 10:09:21 -0800
To: Tom Gruber <Gruber@Sumex-AIM.Stanford.edu>, interlingua@ISI.EDU
From: macgregor@ISI.EDU
Subject: Non-declarative Constructors?
I've run across the "the-foo" construction in a few different contexts.
Saying (the-foo ?x ?y) is supposed to return an object uniquely
defined by the function "the-foo" and its arguments. Logically,
this corresponds to returning a skolem instance that satisfies certain
constraints. Procedurally, the constructor functions like a "find-or-create"
operation, if I understand its use correctly. Its not clear to me that one
can obtain satisfactory behavior with this kind of construct within a
purely declarative framework.
Consider the following Ontolingua definition (sorry, but I'm not
confident that I know how to express the same thing in KIF):
(define-function the-location (?lat ?lon) :-> ?loc
:iff-def (and (location ?loc)
(legal-latitude ?lat)
(legal-longitude ?long)
(latitude ?loc ?lat)
(longitude ?loc ?lon)))
Given this definition and an otherwise empty knowledge base, suppose
I submit the following three queries to a Brand X KR system:
(retrieve ?x (location ?x))
=> ans1
(retrieve ?y (the-location 30 40 ?y))
=> ans2
(retrieve ?x (location ?x))
=> ans3
What are the appropriate responses corresponding to "ans1", "ans2", and
"ans3"? That somewhat depends on whether or not the something like
the following axiom is implicit in the Ontolingua definition:
(forall (?lat ?lon)
(=> (and (legal-latitude ?lat)
(legal-longitude ?lon))
(exists (?loc)
(and (location ?loc)
(latitude ?loc ?lat)
(longitude ?loc ?lon)))))
If this last axiom is NOT implicit in the definition, then I would
expect that the three retrieve statements all would return nil. If
it IS implied by the definition, then I would expect that the first
query should return an infinite list of locations. However, my
impression is that the behavior that people want from constructors
like "the-location" is:
(retrieve ?x (location ?x))
=> nil
(retrieve ?y (the-location 30 40 ?y))
=> loc-0 ; "loc-0" is a newly-created location object
(retrieve ?x (location ?x))
=> (loc-1)
Could someone please clarify for me the intended meaning of constructors
such as "the-location" as defined above? First, is the axiom
asserting the existence of an infinite number of locations implicit
in the definition? Second, which of the three interpretations of
the retrieve statements is correct?
Cheers, Bob
Robert M. MacGregor macgregor@isi.edu
USC/ISI, 4676 Admiralty Way, Marina del Rey, CA 90292 (310) 822-1511