get-relation [Function]


Purpose

The get-relation function returns the relation having a specified name.

Syntax

get-relation relation &key no-error-p context

Arguments

The relation argument is a relation, or a symbol which names a relation. If it is a symbol, it may be an extended identifier having the form context\^{\space}name, where context is the context from which the search is to proceed.

If the no-error-p argument is t, then no error is generated if Loom cannot find a relation having the specified name.

The context argument is the context, or the name of the context, from which the lookup is to be performed. The relation will be found if it is interned in context or any context above context. This argument defaults to the current context.

Value

The get-relation function returns the relation with the specified name. If there is none, nil is returned if no-error-p is set, and otherwise a continuable error is generated.

Remarks

The get- functions are faster and do less error-checking than the find- functions (such as find-relation). Applications should use the get- functions for best performance.

Examples

(get-relation '+) ==> |R|+ 
(get-relation 'cl-user-theory\^{\space}age :no-error-p t) ==> |R|AGE 
(get-relation 'child :context 'bottom-theory) ==> |R|CHILD

See Also

Last modified: Jun 1 1995