define-relation [Function]
Purpose
The define-relation function allows the user to procedurally define or redefine a Loom relation.
Syntax
define-relation &key name is is-primitive implies domain domains range arity
predicate function inheritance-link inheritance-method annotations identifier
kb characteristics
Arguments
The name argument is a symbol or string. If name is null, the relation is given a system-generated name.
All of the remaining define-relation arguments are Lisp expressions which evaluate to atoms or lists that are legal arguments to defrelation. Variables appearing in these expressions may evaluate to Loom objects or to the names of such objects.
Value
These functions return the newly-defined (or redefined) relation.
Examples
(define-relation) ==> |R|BINARY-TUPLE_2
(define-relation :name "son" :is '(:and child (:range Male))) ==> |R|SON
(let ((arity 3))
(define-relation :name 'distance :arity arity)) ==> |R|DISTANCE
See Also
Last modified: Dec 28 1995