defining an abstract class
Toshiyuki HAMA <hama@vnet.ibm.com>
Date: Thu, 10 Sep 92 16:36:30 +0900
From: Toshiyuki HAMA <hama@vnet.ibm.com>
To: ontolingua@sumex-aim.stanford.edu (Ontolingua mailing-list)
Subject: defining an abstract class
Message-id: <9209100736.AA07297@ns3.trl.ibm.com>
When I tried to define an abstract class in ontolingua, I have got in
trouble.
In the bibliography ontology, you defined timepoint.year and
timepoint.month as functions from timepoint to year-number and
month-name. However, as for timepoint.day and timepoint.minutes, you
did not defined any classes as ranges of the functions. Instead, you
restricted the ranges of the functions by thier necessary confitions
as follows.
(define-function TIMEPOINT.DAY (?timepoint) :-> ?day-of-month
"function from time points to integers representing the day
component of the time specification."
:def (and (timepoint ?timepoint)
(integer ?day-of-month)
(=< 0 ?day-of-month)
(=< ?day-of-month 31)))
It seemes to me rather confusing. I prefer defining a class day-number
as a range of the function timepoint.day.
(define-class DAY-NUMBER (?day-number)
:def (and (integer ?day-number)
(=< 0 ?day-number)
(=< ?day-number 31)))
(define-function TIMEPOINT.DAY (?timepoint) :-> ?day-of-month
:def (and (timepoint ?timepoint)
(day-numberr ?day-of-month)))
So I defined several classes, day-number, hour-number, minutes-number
and seconds-number in the same manner. Then I felt like defining a
parent class of these classes. Let's say BOUNDED-INTEGER, which is a
subset of integer whose range is bounded by maxmun-integer and
minimum-integer.
Strictly speaking, BOUNDED-INTERGER is not a parent class but a meta
class, because day-number is an instance of BOUNDED-INTEGER. So
defining such a class is beyound the expressive power of Ontolingua.
But if Ontolingua has a macro facility, BOUNDED-INTEGER can be defined
as a macro which is expanded to a class defintion with a
maxmun-interger and minimum-interger as argnuments. Definition of
BOUNDED-INTEGER is not translated to any form, and only its instances
are translated to each knowledge representation form.
Do you think defining such an abstract concept as BOUNDED-INTERGER is not
approproate for ontology? Or, is there any problem from a logical
point of view in defining a meta class as a macro in Ontolingua.
Please give me any comments or suggestion.
Regards.
--------------
Toshiyuki Hama (HAMA at TRL)
Computer Science Institute, Tokyo Research Laboratory, IBM Japan
e-mail:hama@vnet.ibm.com, hama@trl.ibm.co.jp