(create-instance <instance-name> (<class-name>+) [:documentation <docstring>] {{:= <term-expression-without-arg-vars>} | {:axiom-def <sent-without-arg-vars>}} [:slots (<slot-spec>*)] [:theory <theory-name>] [:implementation <target-system-name>] [:issues <issue-tree>])
Defines an Ontolingua instance. See also DEFINE-INSTANCE, which is the macro form.
<instance-name> should be a symbol which names the instance being defined. Ontolingua will convert this symbol into a format which is appropriate for the selected target representation system during translation (e.g., if one were translating into CycL, the symbol would be converted into a string which would obey the CycL conventions for case and word delimiters.)
<docstring> should be a string which describes the instance being defined. It is used in hypertext reports.
The remaining keyword arguments may occur in any order, and are described below:
:= - The value of this keyword argument should be a KIF term expression which denotes the instance being defined. For example:
(define-instance PI (real-number) "PI is the ratio of the perimeter of a circle to its diameter." := 3.145)
:AXIOM-DEF - The value of this keyword argument should be a KIF sentence which mentions the instance being defined; it will be asserted when the instance is defined. Terminologically, this sentence will be considered part of the definition of the instance. For example:
(define-instance FRED (GUYS-WITH-GENERIC-NAMES) "The canonical random person name." :axiom-def (usual-temperament fred nice))
means that FRED is a member of the class GUYS-WITH-GENERIC-NAMES, and that FRED is usually nice. The axiom that fred is usually nice is considered part of the definition of FRED.- The value should be a KIF sentence with no free variables. In particular, the sentence does not implicitly constrain the variables in the argument list (that is what :def and :iff-def are for). The :AXIOM-DEF sentence is considered to be definitional. That is, it is part of the definition as are :DEF and :IFF-DEF sentences. Non-definition axioms should be specified with the :AXIOM-CONSTRAINTS keyword.
A list of sentences may be supplied instead of a single sentence; Ontolingua will automatically construct a conjunction of all the supplied :AXIOM-DEF sentences in this case.
:DOCUMENTATION - should be a string which describes the instance being defined. It is used in hypertext reports.
:IMPLEMENTATION - The value of this keyword argument should be a symbol (usually a keyword) which names the target representation system in which the definition should be defined. This is independent of the theory in which the defined is defined. If the :IMPLEMENTATION argument is not supplied, the current implementation is assumed (see IN-IMPLEMENTATION.)
:ISSUES - The value of this argument should be a Lisp "tree" of strings. The tree can be either a string, or a list of strings, or a list of (<label> <any-lisp-object>) pairs, where <label> is a string or symbol that names the type of the comment. For examples,
:issues ("This is a footnote about FOO." (:example (= (foo ?x) (inverse (bar ?x)))) ("Why not do it this way?
:SLOTS The value of the :SLOTS keyword is a list of slot specifications. These are the same as :OWN-SLOTS used in DEFINE-CLASS.
:THEORY - The value of this keyword argument should be a symbol which names the theory in which the definition should be defined. If the :THEORY argument is not supplied, the current theory is assumed (see IN-THEORY.)
In principle one could define Ontolingua classes, relations, and functions by making them instances of OL:CLASS, KIF:RELATION, and KIF:FUNCTION, but this is not guaranteed to do the right thing in supported implementations. For these cases, use DEFINE-CLASS (or CREATE-CLASS), DEFINE(CREATE)-RELATION, and DEFINE(CREATE)-FUNCTION.