[Up]
ONTOLINGUA-USER::BIBLIOGRAPHIC-DATA's source file

ONTOLINGUA-USER::BIBLIOGRAPHIC-DATA's source file

(In-Package "ONTOLINGUA-USER")

;;; Written by user Rse from session "hacking2" owned by group JUST-ME
;;; Date: Oct 27, 1995  1520


(Define-Ontology
     Bibliographic-Data
     (Simple-Time Agents Frame-Ontology Slot-Constraint-Sugar documents)
   "The bibliographic-data ontology defines the terms used for describing
bibliographic references.  This ontology defines the basic class for
reference objects and the types (classes) for the data objects that
appear in references, such as authors and titles.  Specific databases
will use schemata that associate references with various combinations
of data objects, usually as fields in a record.  This ontology is
intended to provide the basic types from which a specific database
schema might be defined."
   :Generality
   :very-low
   :maturity :high
   :Io-Package
   "ONTOLINGUA-USER"
   :Issues
   ("Author: Thomas Gruber
Version: 3"
    "The objective of this ontology is to define the concepts and
relationships that underlie a family of databases and tools in the
domain of bibliographies.  Such a conceptualization is intended to
help with automatic translation among existing databases, to enable
the development of reference-formatting styles that are independent of
database or tool, and to support remote services such as bibliography
database search and reference-list generation.

An ontology can be partitioned into ontologies.  This file contains the
BIBLIOGRAPHIC-DATA ontology, which establishes the basic terminology.
Child ontologies that include (specialize) the bibliographic-data ontology
will describe the constraints of specific bibliographic databases and tools.

Basic ontological commitments:

A bibliography is made up of references.  A REFERENCE describes the
information needed to identify and retrieve a publication.  A publication is
associated with a DOCUMENT of some sort (e.g., a book or journal).  In some
cases there are several publications per document (e.g., papers in an edited
collection).  Thus documents are distinguished from references.  Documents
are created by AUTHOR s, which are PEOPLE or other agents (e.g.,
ORGANIZATION ).  They are published by PUBLISHER s or other organizations.

Bibliographic-Data includes a simple ontology of time, Time-Points.  A TIMEPOINT is a specification
of a single point in historical time.  CALENDAR-DATE is a timepoint at the
resolution of days; that is, the day, month, and year are known.  A
CALENDAR-YEAR is a timepoint at the resolution of years.  The publication
date of a DOCUMENT is some kind of timepoint; for many publications only
the year is known.  Events such as a CONFERENCE also occur on dates specified
with timepoints.

All documents have titles.  TITLEs are names (strings of characters), as are
AGENT-NAME s, CITY-ADDRESS es, and other data types that are used as
identifiers and are not further destructured.  The class called BIBLIO-NAME
is a place holder for these atomic identifiers.  The class BIBLIO-NL-TEXT is
for strings of characters meant for human reading, rather than as an
identifier.

The most interesting ontological commitment is the distinction between the
data fields in a reference and the facts about documents.  Facts are stated
as relationships over and properties of explicitly-represented objects.  For
example, some facts are about publishers: the publisher name, the city with
which the publisher is associated, and the year of (latest) publication.  In
a document, the PUBLISHER-OF is an ORGANIZATION.  In a REFERENCE, the
REF.PUBLISHER is the NAME of the publisher, and the REF.ADDRESS is
the PUBLISHER.ADDRESS of the document's publisher.  The REF.YEAR of the
reference is a number, which is the year-of of the
Publication-Date-Of (a timepoint) of the document associated with a
reference.  Thus, in a reference -- the entity we are trying to share -- many
of the facts have been mapped onto these atomic data types such as name
strings, title strings, and numbers.  In a document, some of the meaning of
these data types can be stated as logical constraints.  This is in the spirit
of the Cyc project, which aims to provide the background knowledge behind the
narrow, brittle representations of expert systems and conventional databases.

This distinction between data in references and facts in other parts of the
ontology is there to support the interoperability of tools that commit to
this ontology, and the integration of this ontology and associated databases
with other ontologies and databases.  Part of the incompatibility between
bibliography databases and tools is due to different _encodings_ and
_presentations_ of the same information.  For example, one database might
encode a date as a string, another as a structured record of integer fields.
Their ontological commitments might be the same -- they might both support
years and months for a magazine article reference -- but their encodings mask
their conceptual agreement.  Similarly, different bibliography formatting
styles might disagree on whether a publisher city is required for a given
reference type, but they both agree that the city is a function of the
publisher (not a name for it found in some reference field).  Explicitly
representing agents (authors), organizations (publishers), events
(conferences), and time (publication dates) as objects in the
conceptualization allows one to write knowledge-full constraints about how
the data fields are related.  Capturing these constraints is part of good
database design, because it reduces redundancy and anticipates integration
with other databases.  For example, associating author and publisher _names_
(which are all that appear in references) with independently defined agents
ensures that these agents will be named consistently in the references and
facilitates the importation of data on authors and publishers from other
databases.

This ontology is a set of definitions of classes, relations, and functions.
It is represented in Ontolingua forms, which use KIF as the formal language
and English documentation strings to describe meanings that we haven't
formalized.  We are using a slightly new-and-improved syntax for Ontolingua,
in which the result variable of a function resides next to the argument list.
Also, some new second-order relations are introduced (SAME-VALUES,
HAS-SOME, HAS-ONE, CAN-HAVE-ONE, CANNOT-HAVE, HAS-ONE-OF-TYPE, COMPOSE).
These are defined in an ontology called slot-constraint-sugar, and ontolingua
turns sentences in these forms into their canonical forms using the 
frame ontology vocabulary (value-cardinality, value-type, etc.)."
    "ACKNOWLEDGEMENTS: Many thanks to Richard Fikes, who helped with the
formalization and style decisions, and Fritz Mueller, who implemented
Ontolingua code to support these definitions.  This work is supported
by DARPA."
   "We used to say that

  (Subclass-Partition Biblio-Thing
		      (Setof Agent Timepoint Document Reference Conference))

  but now we've ditched biblio-thing.  We could make this a stand-alone axiom
  or an augmentation of individual-thing."

  "Substantially hacked by JPR and AXF to remove any reasonably general stuff
   on 30-Oct-95."

    (:Copyright "Copyright (c) 1992 Thomas R. Gruber"))
   :Intern-In
   ((Kif-Extensions String) (Kif-Lists Rest First List)
    (Kif-Numbers Integer Natural)))


(In-Ontology (Quote Bibliographic-Data))




;;; ------------------ Classes --------------

;;; Article-Reference

(Define-Class Article-Reference
              (?Ref)
              "An article is a piece published in a journal, magazine, or newspaper."
              :Def
              (And (Publication-Reference ?Ref)
               (Value-Type ?Ref Ref.Document Periodical-Publication)
               (Has-Some ?Ref Ref.Author) (Has-One ?Ref Title-Of)
               (Has-One ?Ref Ref.Year) (Has-One ?Ref Ref.Periodical)
               (Same-Values ?Ref Ref.Periodical
                (Compose Title-Of Ref.Document))
               (Same-Values ?Ref Ref.Secondary-Title Ref.Periodical)))


;;; Artwork-Reference

(Define-Class Artwork-Reference
              (?Ref)
              "A reference to a work of art that does not fit the other categories of
documents.  The author is the artist."
              :Def
              (And (Misc-Publication-Reference ?Ref)
               (Inherits-Author-From-Document ?Ref)
               (Inherits-Title-From-Document ?Ref)
               (Inherits-Year-From-Document ?Ref)))


;;; Author-Name

(Define-Class Author-Name
              (?Name)
              "A string that is used as the name of some author.
Often databases of author names are kept separately from
databases of people or documents."
              :Constraints
              (Biblio-Name ?Name)
              :Issues
              ("see the discussion of AGENT-NAME."))


;;; Biblio-Name

(Define-Class Biblio-Name
              (?name)
              "A name of something in the bibliographic-data ontology.
Names are distinguished from strings in general because
they may be treated specially in some databases; for example,
there may be uniqueness assumptions."
              :Def
              (Biblio-Text ?name)
	      :axiom-def
	      (subclass-partition biblio-name
				  Title Keyword City-Address)
              :Issues
              (("Why isn't there a subclass-partition for this, since
             classes like TITLE, KEYWORD, and CITY-ADDRESS are
             subclasses?"
                "Because these are all _strings_ that may be lexically
             equal.  If they were _concepts_ then they would be 
             mutually exclusive."
		"Fixed by AXF and JPR when we changed biblio-text to have
                 a textual representation slot.")))


;;; Biblio-Nl-Text

(Define-Class Biblio-Nl-Text
              (?text)
              "A string of natural language text mentioned in some bibliographic
reference.  Texts are distinguished from strings in general because
they may be treated specially in some databases, or presented as
free-flowing text to a human reader.  BIBLIO-NL-TEXT's are used for
different purposes than biblio-names.  BIBLIO-NL-TEXT's are for things like
notes and abstracts; BIBLIO-NAME's are meant to identify some object or
some property."
              :Def
              (Biblio-Text ?text)
              :Issues
              ((:See-Also Biblio-Name)))


;;; Biblio-Text

(define-relation has-textual-representation (?x ?string)
  "The textual representation of a text object.  This is a relation rather
   than a function because the textual representation of a thing could
   have manifestations in multiple languages or formats."
  :def (and (individual-thing ?x) (string ?string)))

(Define-Class Biblio-Text
              (?x)
              "The most general class of undifferentiated text objects."
              :Def
              (and (Individual-thing ?x)
		   (has-some ?x has-textual-representation))
              :Issues
              (("Why not make biblio-name and biblio-nl-text be disjoint
             subclasses of biblio-text?"
                "There may be valid names that are exactly the same strings
             as NL texts, so it would be overconstraining to require
             these two classes to be disjoint.  The distinction between
             names and NL texts is in their intended use, rather than
             their forms. This happens because we don't represent what
             the strings denote.  If we did, then we could offer a
             formal basis for distinguishing between these two classes
             of text strings.")))


;;; Biblio-Thing

;(Define-Class Biblio-Thing
;              (?X)
;              "Biblio-thing is the root of the bibliographic ontology.
;It is the superclass-of anything that would otherwise be a 
;a completely standalone primitive (i.e., a root of the class
;hierarchy)."
;              :Def
;              (Individual-Thing ?X)
;              :Axiom-Def
;              (Subclass-Partition Biblio-Thing
;               (Setof Agent Timepoint Document Reference Conference))
;              :Issues
;              ("Removed biblio-text because it is a subclass-of STRING."
;               "Added CONFERENCE because it is a subclass-of biblio-thing
;            and it is disjoint from these other primitive classes."))


;;; Book

;;; Book-Publication-Data-Constraint

(Define-Relation Book-Publication-Data-Constraint
                 (?Ref)
                 "In references associated with books, the reference fields
for publication data such as publisher, place, and edition
are all taken from the data on the book-document itself.
This unary relation captures these constraints in one place, 
so that each of the book reference types can just inherit them."
                 :Iff-Def
                 (And (Publication-Reference ?Ref)
                  (Has-One-Of-Type ?Ref Ref.Document Book)
                  (Has-One ?Ref Ref.Publisher)
                  (Inherits-Publisher-From-Document ?Ref)
                  (Has-One ?Ref Ref.Year) (Inherits-Year-From-Document ?Ref)))


;;; Book-Reference

(Define-Class Book-Reference
              (?Ref)
              "A book reference.   Book references usually include complete publisher
information, and may have a series editor and title, edition, and translator.
A reference to a book gets many of its publication data from the book qua
document."
              :Def
              (And (Publication-Reference ?Ref)
               (Has-One-Of-Type ?Ref Ref.Document Book)
               (Inherits-Author-From-Document ?Ref)
               (Inherits-Title-From-Document ?Ref)
               (Book-Publication-Data-Constraint ?Ref)
               (Same-Values ?Ref Ref.Secondary-Author Ref.Series-Editor)
               (Same-Values ?Ref Ref.Secondary-Title Series-Title-Of)))


;;; Book-Section-Reference

(Define-Class Book-Section-Reference
              (?Ref)
              "A section of a book, like a chapter or a paper in an edited collection."
              :Def
              (And (Publication-Reference ?Ref)
               (Has-One-Of-Type ?Ref Ref.Document Edited-Book)
               (Has-Some ?Ref Ref.Author) (Has-Some ?Ref Ref.Editor)
               (Has-One ?Ref Ref.Booktitle)
               (Same-Values ?Ref Ref.Booktitle
                (Compose Title-Of Ref.Document))
               (Book-Publication-Data-Constraint ?Ref)
               (Same-Values ?Ref Ref.Secondary-Author Ref.Editor)
               (Same-Values ?Ref Ref.Tertiary-Author Ref.Series-Editor)))


;;; Cartographic-Map

;;; Cartographic-Map-Reference

(Define-Class Cartographic-Map-Reference
              (?Ref)
              "A reference to a map created by a cartographer."
              :Def
              (And (Misc-Publication-Reference ?Ref)
               (Inherits-Author-From-Document ?Ref)
               (Inherits-Title-From-Document ?Ref)
               (Inherits-Year-From-Document ?Ref)))


;;; City-Address

(Define-Class City-Address
              (?Name)
              "A city-address is a string that identifies a city
somewhere in the world.  We distinguish it from other
names to facilitate integrating it with ontologies that
include representations for locations and alternative ways
of identifying places."
              :Def
              (Biblio-Name ?Name))


;;; Computer-Program

;;; Computer-Program-Reference

(Define-Class Computer-Program-Reference
              (?Ref)
              "A reference to a computer program.  The title-of is the name of the
program.  The author is the programmer."
              :Def
              (And (Misc-Publication-Reference ?Ref)
               (Inherits-Author-From-Document ?Ref)
               (Inherits-Title-From-Document ?Ref)))


;;; Conference

;;; Augmentation
(Define-Class Proceedings
              (?X)
              "The published proceedings of a conference, workshop, or similar
meeting.  If the proceedings appear as an edited book, the document
is an edited book with a title other than ``proceedings of...''
Proceedings may have editors, however."
              :Def
              (And (Has-One-Of-Type ?X Conference-Of Conference)
		   (Same-Values ?X Title-Of (Compose Name Conference-Of)))
              :Issues
              ("We are assuming that the title of the proceedings is
            the same as the name of the conferences.  This may be
            bogus."))

(Define-Class Conference
              (?X)
              "A conference is a big meeting where people wear badges, sit through
boring talks, and drink coffee in the halls."
              :Def
              (And (Individual-Thing ?X)
               (Has-One-Of-Type ?X Name Biblio-Name)
               (Has-One-Of-Type ?X Conf.Organization Organization)
               (Has-One-Of-Type ?X Conf.Date Calendar-Date)
               (Value-Type ?X Conf.Address City-Address)
               (Can-Have-One ?X Conf.Address)))

(Define-Function Conference-Of
                 (?proc)
                 :->
                 ?Conference
                 "The conference associated with a proceedings."
                 :Def (And (Proceedings ?proc)))

;;; Doctoral-Thesis-Reference

(Define-Class Doctoral-Thesis-Reference
              (?Ref)
              :Def
              (And (Thesis-Reference ?Ref)
               (Value-Type ?Ref Ref.Document Doctoral-Thesis)
               (Has-Value ?Ref Ref.Type-Of-Work "Doctoral Thesis")))


;;; Edited-Book-Reference

(Define-Class Edited-Book-Reference
              (?Ref)
              "like a book-reference, except the document is an edited-book and
the author and editor are the same."
              :Iff-Def
              (And (Book-Reference ?Ref)
               (Has-One-Of-Type ?Ref Ref.Document Edited-Book)
               (Has-Some ?Ref Ref.Editor)
               (Same-Values ?Ref Ref.Author Ref.Editor)))


;;; Generic-Unpublished-Reference

(Define-Class Generic-Unpublished-Reference
              (?Ref)
              :Def
              (Non-Publication-Reference ?Ref))


;;; Inherits-Author-From-Document

(Define-Relation Inherits-Author-From-Document
                 (?Ref)
                 "When a reference is a one-to-one account of a document, then the author
in the reference (ref.author) is the name of the author of the document.
This relation captures this relationship."
                 :Iff-Def
                 (And (Publication-Reference ?Ref)
                  (Same-Values ?Ref Ref.Author
                   (Compose Has-Author-Name Ref.Document))))


;;; Inherits-Publisher-From-Document

(Define-Relation Inherits-Publisher-From-Document
                 (?Ref)
                 "When a reference is a one-to-one account of a document, then the publisher
in the reference (ref.publisher) is the name of the publisher of the
document. This relation captures this relationship.  Inherits the 
publisher's address as well."
                 :Iff-Def
                 (And (Publication-Reference ?Ref)
                  (Same-Values ?Ref Ref.Publisher
                   (Compose Name Publisher-Of Ref.Document))
                  (Same-Values ?Ref Ref.Address
                   (Compose Publisher.Address Publisher-Of Ref.Document))))


;;; Inherits-Title-From-Document

(Define-Relation Inherits-Title-From-Document
                 (?Ref)
                 :Iff-Def
                 (And (Publication-Reference ?Ref)
                  (Same-Values ?Ref Title-Of
                   (Compose Title-Of Ref.Document))))


;;; Inherits-Year-From-Document

(Define-Relation Inherits-Year-From-Document
                 (?Ref)
                 "When a reference is a one-to-one account of a document, then the year
in the reference (ref.year) is the year of publication of the document.
This relation captures this relationship."
                 :Iff-Def
                 (And (Publication-Reference ?Ref)
                  (Same-Values ?Ref Ref.Year
                   (Compose year-of Publication-Date-Of
                    Ref.Document))))


;;; Journal-Article-Reference

(Define-Class Journal-Article-Reference
              (?Ref)
              "A reference to article in a journal must give information sufficient to
find the issue containing the article."
              :Def
              (And (Article-Reference ?Ref)
               (Value-Type ?Ref Ref.Document Journal)
               (Cannot-Have ?Ref Ref.Month)))


;;; Keyword

(Define-Class Keyword
              (?Keyword)
              "A keyword is a string used as an index."
              :Def
              (Biblio-Name ?Keyword))


;;; Magazine-Article-Reference

(Define-Class Magazine-Article-Reference
              (?Ref)
              "A reference to an article in a magazine is essentially the same as a
journal article reference.  Some formatting styles need the distinction.
Magazine article references sometimes include the month instead of the
volume/issue numbers."
              :Def
              (And (Article-Reference ?Ref)
               (Value-Type ?Ref Ref.Document Magazine)
               (Has-One ?Ref Ref.Magazine-Name)
               (Same-Values ?Ref Ref.Magazine-Name Ref.Periodical)))


;;; Masters-Thesis-Reference

(Define-Class Masters-Thesis-Reference
              (?Ref)
              :Def
              (And (Thesis-Reference ?Ref)
               (Value-Type ?Ref Ref.Document Masters-Thesis)
               (Has-Value ?Ref Ref.Type-Of-Work "Masters Thesis")))


;;; Misc-Publication-Reference

(Define-Class Misc-Publication-Reference
              (?Ref)
              :Def
              (Publication-Reference ?Ref)
              :Axiom-Def
              (Subclass-Partition Misc-Publication-Reference
               (Setof Technical-Manual-Reference Computer-Program-Reference
                Cartographic-Map-Reference Artwork-Reference
                Multimedia-Document-Reference)))


;;; Multimedia-Document

;;; Multimedia-Document-Reference

(Define-Class Multimedia-Document-Reference
              (?Ref)
              "A bibliographic reference to a multimedia document.
Who knows what conventions the future holds for these things."
              :Def
              (And (Misc-Publication-Reference ?Ref)
               (Inherits-Author-From-Document ?Ref)
               (Inherits-Title-From-Document ?Ref)
               (Inherits-Year-From-Document ?Ref)))


;;; Newspaper-Article-Reference

(Define-Class Newspaper-Article-Reference
              (?Ref)
              "A newspaper article reference is like a magazine article reference"
              :Def
              (And (Article-Reference ?Ref)
               (Value-Type ?Ref Ref.Document Newspaper)
               (Has-One ?Ref Ref.Newspaper-Name)
               (Same-Values ?Ref Ref.Magazine-Name Ref.Periodical)
               (Has-One ?Ref Ref.Month) (Has-One ?Ref Ref.Day)
               (Value-Type ?Ref Ref.Address City-Address)))


;;; Non-Publication-Reference

(Define-Class Non-Publication-Reference
              (?Ref)
              "A reference to something that just isn't a document."
              :Def
              (And (Reference ?Ref) (Cannot-Have ?Ref Ref.Document))
              :Axiom-Def
              (Subclass-Partition Non-Publication-Reference
               (Setof Personal-Communication-Reference
                Generic-Unpublished-Reference)))


;;; Personal-Communication-Reference

(Define-Class Personal-Communication-Reference
              (?Ref)
              "A reference to a personal communication between the author of the paper in
which the bibliography appears and some other person.  The ref.author of the
reference is the person with whom the conversation was held."
              :Def
              (And (Non-Publication-Reference ?Ref) (Has-One ?Ref Ref.Author)
               (Has-One ?Ref Ref.Year) (Has-One ?Ref Ref.Month)
               (Has-One ?Ref Ref.Day)))


;;; Proceedings-Paper-Reference

(Define-Class Proceedings-Paper-Reference
              (?Ref)
              "An article appearing in the published proceedings of some conference or
workshop."
              :Def
              (And (Publication-Reference ?Ref)
               (Value-Type ?Ref Ref.Document Proceedings)
               (Has-Some ?Ref Ref.Author) (Has-One ?Ref Title-Of)
               (Inherits-Year-From-Document ?Ref)
               (Has-One ?Ref Ref.Booktitle)
               (Same-Values ?Ref Ref.Booktitle
                (Compose Title-Of Ref.Document))
               (Same-Values ?Ref Ref.Secondary-Title Ref.Booktitle)
               (Same-Values ?Ref Ref.Secondary-Author Ref.Editor)
               (Same-Values ?Ref Ref.Organization
                (Compose Conf.Organization Conference-Of Ref.Document))
               (Same-Values ?Ref Ref.Address
                (Compose Conf.Address Conference-Of Ref.Document))
               (Same-Values ?Ref Ref.Month
                (Compose month-of Publication-Date-Of Ref.Document))
               (Same-Values ?Ref Ref.Day
                (Compose day-of Publication-Date-Of Ref.Document))))


;;; Publication-Reference

(Define-Class Publication-Reference
              (?Ref)
              "A reference associated with some kind of published document, where
publication and documenthood are interpreted broadly."
              :Def
              (And (Reference ?Ref)
               (Has-One-Of-Type ?Ref Ref.Document Document)
               (Has-One ?Ref Title-Of))
              :Axiom-Def
              (Subclass-Partition Publication-Reference
               (Setof Book-Reference Book-Section-Reference Article-Reference
                Proceedings-Paper-Reference Thesis-Reference
                Technical-Report-Reference Misc-Publication-Reference)))


;;; Publisher-Name

(Define-Class Publisher-Name
              (?Name)
              "A name of some publisher"
              :Axiom-Def
              (Exact-Range Name Publisher-Name)
              :Constraints
              (Biblio-Name ?Name)
              :Issues
              ("see the discussion of AGENT-NAME."))


;;; Reference

(Define-Class Reference
              (?Ref)
              "A bibliographic reference is a description of some publication that
uniquely identifies it, providing the information needed to retrieve the
associated document.  A reference is distinguished from a citation, which occurs
in the body of a document and points to a reference.  Note that references
are distinguished from documents as well.
    The information associated with a reference is contained in data fields,
which are binary relations (often unary functions).
   A reference should at least contain information about the author, title,
and year.  (Since there are exceptions, that constraint is associated with a
specialization of this class.) ."
              :Def
              (Individual-Thing ?Ref)
              :Axiom-Def
              (Exhaustive-Subclass-Partition Reference
               (Setof Publication-Reference Non-Publication-Reference)))


;;; Technical-Manual-Reference

(Define-Class Technical-Manual-Reference
              (?Ref)
              "A reference to a manual that may accompany a product but is otherwise
unpublished."
              :Def
              (And (Misc-Publication-Reference ?Ref)
               (Inherits-Author-From-Document ?Ref)
               (Inherits-Title-From-Document ?Ref)
               (Inherits-Year-From-Document ?Ref)))


;;; Technical-Report-Reference

(Define-Class Technical-Report-Reference
              (?Ref)
              :Def
              (And (Publication-Reference ?Ref)
               (Inherits-Author-From-Document ?Ref)
               (Inherits-Title-From-Document ?Ref)
               (Inherits-Year-From-Document ?Ref)
               (Has-One ?Ref Ref.Publisher)
               (Same-Values ?Ref Ref.Publisher
                (Compose Name Organization-Of))))


;;; Thesis-Reference

(Define-Class Thesis-Reference
              (?Ref)
              "A reference to a master's or doctoral thesis."
              :Def
              (And (Publication-Reference ?Ref)
               (Value-Type ?Ref Ref.Document Thesis)
               (Inherits-Author-From-Document ?Ref)
               (Inherits-Title-From-Document ?Ref)
               (Inherits-Year-From-Document ?Ref)
               (Has-One ?Ref Ref.Publisher)
               (Same-Values ?Ref Ref.Publisher
                (Compose Name Organization-Of)))
              :Axiom-Def
              (Subclass-Partition Thesis-Reference
               (Setof Doctoral-Thesis-Reference Masters-Thesis-Reference)))


;;; Title

(Define-Class Title
              (?X)
              "A title is a string naming a publication, a document, or 
something analogous.  Title strings are distinct from strings naming
agents (books can't talk)."
              :Def
              (Biblio-Name ?X))


;;; University





;;; ------------------ Relations --------------

(Define-Relation Has-Author-Name
    (?Doc ?Name)
  "Each author of a document is identified by an author-name.
   Although an author can have several pennames, the author only
   gets to use one of them for a particular document."
  :Def (And (Document ?Doc) (Author-Name ?Name)
	    (Exists (?Author)
		    (And (Has-Author ?Doc ?Author)
			 (Author.Name-Of ?Doc ?Author ?Name)))))

;;; Has-Penname

(Define-Relation Has-Penname
                 (?Author ?Name)
                 "An author's pseudonym [Webster].  An author may use several
pseudonyms.  Which name is a function of the document.
The penname of an author cannot be his or her real name [denoted
by the function name]; it must be some made-up name."
                 :Def
                 (And (Author ?Author) (Biblio-Name ?Name)
		      (Not (Name ?Author ?Name)))
                 :Issues
                 ((:See-Also Has-Name Has-Author-Name)))


;;; Publisher.Address

(Define-Relation Publisher.Address
                 (?Publisher ?City)
                 "The publisher.address is the name of a city with which a publisher
is associated for document ordering purposes.  There may be several
cities associated with a publisher.  If the city is well-known,
then just its name is given; otherwise its name and state and sometimes 
country are given as the location."
                 :Def
                 (And (Publisher ?Publisher) (City-Address ?City)))


;;; Ref.Address

(Define-Relation Ref.Address
                 (?Ref ?Address)
                 "The place (e.g., city) where a document is published.  Means
different things depending on the reference type."
                 :Def
                 (And (Reference ?Ref) (City-Address ?Address)))


;;; Ref.Author

(Define-Relation Ref.Author
                 (?Ref ?Author-Name)
                 "Relation between a reference and the name(s) of the
creator(s) of the publication."
                 :Def
                 (And (Reference ?Ref) (Author-Name ?Author-Name)))


;;; Ref.Editor

(Define-Relation Ref.Editor
                 (?Ref ?Editor)
                 "A reference's editor is the name of the document's editor."
                 :Axiom-Def
                 (= Ref.Editor (Compose Name Has-Editor Ref.Document)))


;;; Ref.Keywords

(Define-Relation Ref.Keywords
                 (?Ref ?Keyword)
                 "Keywords associated with a reference."
                 :Def
                 (And (Reference ?Ref) (Keyword ?Keyword)))


;;; Ref.Labels

(Define-Relation Ref.Labels
                 (?Ref ?Label)
                 "Labels associated with a reference."
                 :Def
                 (And (Reference ?Ref) (Biblio-Name ?Label)))


;;; Ref.Notes

(Define-Relation Ref.Notes
                 (?Ref ?Note-String)
                 "In a reference, the notes field contains a set of strings that is used 
to describe all sorts of things."
                 :Def
                 (And (Reference ?Ref) (Biblio-Nl-Text ?Note-String)))


;;; Ref.Secondary-Author

(Define-Relation Ref.Secondary-Author
                 (?Ref ?Editor)
                 "In a reference, the secondary author field usually names an editor
of some sort who was involved in the production of the work but who
was not a original author."
                 :Def
                 (And (Reference ?Ref) (Agent-Name ?Editor)))


;;; Ref.Secondary-Title

(Define-Relation Ref.Secondary-Title
                 (?Ref ?Title)
                 "In a reference, the secondary title usually names the book or 
serial in which the publication is published."
                 :Def
                 (And (Reference ?Ref) (Title ?Title)))


;;; Ref.Series-Editor

(Define-Relation Ref.Series-Editor
                 (?Ref ?Editor)
                 "A reference's series editor is the name of a series editor of 
the document."
                 :Axiom-Def
                 (= Ref.Series-Editor
                  (Compose Name Has-Series-Editor Ref.Document)))


;;; Ref.Tertiary-Author

(Define-Relation Ref.Tertiary-Author
                 (?Ref ?Editor)
                 "Teritiary author of a reference.  Beats me what this is."
                 :Def
                 (And (Reference ?Ref) (Agent-Name ?Editor)))


;;; Ref.Translator

(Define-Relation Ref.Translator
                 (?Ref ?Translator)
                 "A reference's translator is the name of the document's translator."
                 :Axiom-Def
                 (= Ref.Translator
                  (Compose Name Has-Translator Ref.Document)))



;;; ------------------ Functions --------------

;;; Conf.Address

(Define-Function Conf.Address
                 (?Conference)
                 :->
                 ?Address
                 "Conference address."
                 :Def
                 (And (Conference ?Conference) (City-Address ?Address)))


;;; Conf.Date

(Define-Function Conf.Date
                 (?Conference)
                 :->
                 ?Date
                 "Conference date."
                 :Def
                 (And (Conference ?Conference) (Calendar-Date ?Date)))


;;; Conf.Organization

(Define-Function Conf.Organization
                 (?Conference)
                 :->
                 ?Name
                 "Conference name."
                 :Def
                 (And (Conference ?Conference) (Organization ?Name)))


;;; Author.Name-Of

(Define-Function Author.Name-Of
                 (?Doc ?Author)
                 :->
                 ?Name
                 "The name used by an author is a function of the document and the author."
                 :Def
                 (And (Document ?Doc) (Author ?Author) (Author-Name ?Name)))


;;; Edition-Of

(Define-Function Edition-Of (?Doc) :-> ?Nth
                 "Refers to the nth edition of a document."
                 :Def (And (document ?doc) (Natural ?Nth)))


;;; Ref.Abstract

(Define-Function Ref.Abstract
                 (?Ref)
                 :->
                 ?Abstract-String
                 "In a reference, the abstract field contains a string of natural
language text that is used to describe all sorts of things."
                 :Def
                 (And (Reference ?Ref) (Biblio-Nl-Text ?Abstract-String)))


;;; Ref.Booktitle

(Define-Function Ref.Booktitle
                 (?Ref)
                 :->
                 ?Title
                 "The title of the document that is a collection in which a reference
appears.  For example, the title-of of a paper in an edited collection
would be the name of the paper, and the ref.booktitle would be the name
of the edited book."
                 :Def
                 (And (Reference ?Ref) (Title ?Title)))


;;; Ref.Day

(Define-Function Ref.Day
                 (?Ref)
                 :->
                 ?Day
                 "In a reference, the day of the month in which a publication is published.
Useful for conference proceedings, personal communications."
                 :Def
                 (And
                  (Or (Article-Reference ?Ref)
                   (Personal-Communication-Reference ?Ref))
                  (Day-Number ?Day)))


;;; Ref.Document

(Define-Function Ref.Document
                 (?Ref)
                 :->
                 ?Document
                 "Function from references to associated documents. 
Is only defined on publication-references, since by definition they are the
references associated with documents."
                 :Def
                 (And (Publication-Reference ?Ref) (Document ?Document)))


;;; Ref.Edition

(Define-Function Ref.Edition
                 (?Ref)
                 :->
                 ?Nth
                 "Refers to the nth edition of a document."
                 :Def
                 (And (Reference ?Ref) (Natural ?Nth))
                 :Lambda-Body
                 (Edition-Of (Ref.Document ?Ref)))


;;; Ref.Issue

(Define-Function Ref.Issue
                 (?Ref)
                 :->
                 ?Issue-Number
                 "In a reference, the issue number of a journal or magazine
in which an article occurs."
                 :Def
                 (And (Article-Reference ?Ref) (Natural ?Issue-Number)))


;;; Ref.Magazine-Name

(Define-Function Ref.Magazine-Name
                 (?Ref)
                 :->
                 ?Name
                 "Field for name of the magazine in a magazine article reference."
                 :Def
                 (And (Magazine-Article-Reference ?Ref) (Title ?Name)))


;;; Ref.Month

(Define-Function Ref.Month
                 (?Ref)
                 :->
                 ?Month
                 "In a reference, the month in which a publication is published.
Useful for magazines, conference proceedings, and technical reports."
                 :Def
                 (And (Or (Article-Reference ?Ref) (Technical-Report ?Ref))
		      (Month-Name ?Month)))


;;; Ref.Newspaper-Name

(Define-Function Ref.Newspaper-Name
                 (?Ref)
                 :->
                 ?Name
                 "Field for name of a newspaper in a newspaper article reference."
                 :Def
                 (And (Newspaper-Article-Reference ?Ref) (Title ?Name)))


;;; Ref.Number-Of-Volumes

(Define-Function Ref.Number-Of-Volumes
                 (?Ref)
                 :->
                 ?Number
                 "In a reference, the number of volumes in the associated document."
                 :Def
                 (And (Reference ?Ref) (Natural ?Number)))


;;; Ref.Organization

(Define-Function Ref.Organization
                 (?Ref)
                 :->
                 ?Address
                 "The organization that publishes a referenced document.
May be inherited from a conference organization for proceedings."
                 :Def
                 (And (Reference ?Ref) (Organization ?Address)))


;;; Ref.Pages

(Define-Function Ref.Pages
                 (?Ref)
                 :->
                 ?Page-Range
                 "In a reference, the pages of an article or analogous subdocument in which a
publication resides.  Specified as a sequence of two integers."
                 :Def
                 (And
                  (Or (Book-Section-Reference ?Ref) (Article-Reference ?Ref)
                   (Proceedings-Paper-Reference ?Ref))
                  (List ?Page-Range) (Integer (First ?Page-Range))
                  (Integer (First (Rest ?Page-Range)))))


;;; Ref.Periodical

(Define-Function Ref.Periodical
                 (?Ref)
                 :->
                 ?Journal-Title
                 "Most general relation between a reference and a journal."
                 :Def
                 (And (Reference ?Ref) (Title ?Journal-Title)))


;;; Ref.Publisher

(Define-Function Ref.Publisher
                 (?Ref)
                 :->
                 ?Publisher-Name
                 "The publisher field of a reference points to the publisher of 
the associated document."
                 :Def
                 (And (Reference ?Ref) (Publisher-Name ?Publisher-Name)))


;;; Ref.Report-Number

(Define-Function Ref.Report-Number
                 (?Ref)
                 :->
                 ?Identifier
                 "An alphanumeric identifier that identifies a technical report within a
series sponsored by the publishing institution.  For example, STAN-CS-68-118
is the 118th report number of a report written at Stanford in the computer
science department in 1968."
                 :Def
                 (And (Technical-Report-Reference ?Ref)
                  (Biblio-Name ?Identifier)))


;;; Ref.Type-Of-Work

(Define-Function Ref.Type-Of-Work
                 (?Ref)
                 :->
                 ?Name
                 "An identifier of some specialization within the reference type.
For example, technical reports are labeled with types-of-work such as
``technical report'' and ``memo''.  Dissertations are specialized by the
level of the associated degree."
                 :Def
                 (And
                  (Or (Thesis-Reference ?Ref)
                   (Technical-Report-Reference ?Ref)
                   (Misc-Publication-Reference ?Ref))
                  (Biblio-Name ?Name)))


;;; Ref.Volume

(Define-Function Ref.Volume
                 (?Ref)
                 :->
                 ?Number
                 "in a reference, the volume number of a journal or magazine
in which an article occurs."
                 :Def
                 (And
                  (Or (Book-Reference ?Ref) (Book-Section-Reference ?Ref)
                   (Article-Reference ?Ref))
                  (Natural ?Number)))


;;; Ref.Year

(Define-Function Ref.Year
                 (?Ref)
                 :->
                 ?Year
                 "The year field is a function from a reference to the year 
in which the publication was published."
                 :Def
                 (And (Reference ?Ref) (Year-Number ?Year)))


;;; ------------------ Instance --------------


;;; ------------------ Axiom --------------


;;; ------------------ Other --------------

(Define-Relation Has-Name
                 (?x ?Name)
                 "An author name is the name of an agent used to identify
  it as an author.  It is not necessarily unique; authors may
  go by pseudonyms.  A particular name of an author must 
  be either the author's real name (i.e., her name), or else
  it is one of her pennames."
  :axiom-def ((=> (author ?x)
		  (=> (Has-Name ?x ?name)
		      (And (Biblio-Name ?Name)
			   (Or (= (Name ?Author) ?Name)
			       (Has-Penname ?Author ?Name)))))))

(Define-Function Name (?x) :-> ?Name
  "Conference name, and the name of a publisher; one per publisher."
  :axiom-def ((=> (Conference ?x)
		  (=> (= (name ?x) ?name)
		      (Biblio-Name ?Name)))
	      (=> (Publisher ?x)
		  (=> (= (name ?x) ?name)
		      (and (Biblio-Name ?Name))))))


Other perspectives: Default, GFP KB, Name, Ontolingua ontology, XRef Ontology
Commands: Help, Apropos, Describe applicable perspectives, History, Inspect New, Set *!, Set Parameters