simplified way to specify definitions in ontolingua

Tom Gruber <>
Full-Name: Tom Gruber
Message-id: <2872399687-1043847@KSL-Mac-69>
Date: Wed, 9 Jan 91  00:48:07 PST
From: Tom Gruber <>
Subject: simplified way to specify definitions in ontolingua
One of the problems with the :DEFINITION and :PRIMITIVE-DEFINITION
keywords is that they are disjoint with :SECOND-ORDER,  :SLOT-VALUES,
etc.  This is a problem since some of the things you will naturally
say about a class or relation in second-order statements may be part
of its definition.  For example, it was implicitly assumed that
specifying a SUPERCLASS meant that it was part of the definition.
Moreover, as I use this language to define real ontologies and
translate into epikit and cycl, I find that the :PRIMITIVE-DEFINITION
business is a noisy intrusion that only makes sense for LOOM.
Furthermore, LOOM can't do much with primitive-definitions (unlike
definitions), and without exception every term I have defined has been
primitive.   Therefore, I propose the following extension to the
syntax, leaving the current :DEFINITION and :PRIMITIVE-DEFINITION in
place for compatability (for now).

  :DEF takes a sentence, possibly a conjunction, that contains
  the definition of the term.  This is the 'primitive' definition.
  The keyword :IFF-DEF is for non-primitive definitions.
  The sentence (or sentences, if a conjunction) the is the :DEF
  can be either predicates using the free variables listed in the
  argument list of the define-x form (the instance variables) or
  second-order predicates taking the name of the relation or
  class as an argument.  Some examples:

(define-class module (?module)
   "A module is an object that encapsulates a set of state variables
and constraints on their values with respect to time (or other state).
It is the most abstract 'object' in a lumped-parameter model,
including what might be thought of as components, connections, and entire systems."

  :def (and (model-object module)
            (domain-of module module-state-variables)
            (domain-of module module-constraints))

;;; Note that the above is different than just asserting that the
;;; domain of module-state-variables subsumes module.
;;; It says that the fact that module "can have the slot" is
;;; intrinsic to its being a module.  You would not normally use
;;; domain-of as a normal constraint (i.e., in the :IMPLIES sentence)
;;; because it is automatically asserted as the inverse of domain.

(define-class module (?module)
   "A module is a model-object that encapsulates a set of state
variables and behavior constraints using them."

  :def (and (model-object module)
	(domain-of module module-state-variables)
	(domain-of module module-constraints))

;;;DOMAIN-OF (aka #%canHaveSlots) is the inverse of DOMAIN, which is a
;;;second-order relation over binary relations (slots, roles, attributes)
;;;specifying the class to which the relation can apply.

(define-class parameter (?p)
  "a property of the modelled world that 'has a value'."

  :def (and (model-object module)
            (domain-of p-value)))

;;; note you can still specify domain and range of a relation using
;;; either the second order relations DOMAIN and RANGE or by
;;; constraining the free variables.

(define-relation p-value (?parameter ?quantity)
  "p-value is short for parameter value.  It is defined as a function
>From parameters to quantities."

  :def (and (parameter ?parameter)
            (physical-quantity ?quantity)
            (single-valued p-value)))

(define-class state-variable (?variable)
  "A state variable is a parameter whose value is determined by a
function from states to quantities.  State variables are used to
describe behavior: that is, some quantity of interest to model that
may change during simulation or is dependent on some other quantities,
as expressed in algebraic constraints.   A state variable may be
associated with a model element (e.g., module, port, connection)
State variables are reified as objects, rather than left implicit as
a term denoting a value function, because they are 'parts' of a
'model'; systems that help construct models will reason about state
variables as entities in the domain of discourse."

  :def (parameter ?variable)

(define-function sv-fluent (?variable ?function)
  "Since the 'value' of a state variable depends on state, the value
of a state variable is not specified with a direct relation from
variable to value.  Instead, each variable is associated with a
reified function, called a fluent, that represents the mapping from
states to values.  This relation, SV-FLUENT, maps variables to
their fluents."

  :def (and (state-variable ?variable)
            (fluent ?function)))