The define-relation function allows the user to procedurally define or redefine a Loom relation.
define-relation &key name is is-primitive implies domain domains range arity
predicate function inheritance-link inheritance-method annotations identifier
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.
These functions return the newly-defined (or redefined) relation.
(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
Last modified: Dec 28 1995