The Loom trace function is identical to Lisp's trace, except that it also traces Loom methods and relations.
trace &body functionNames
The functionNames argument supplies the names of zero or more functions, methods, and sealed relations which are to be traced.
If functionNames are supplied, trace simply returns these names. Otherwise, a list of the names of all currently-traced functions, methods, and relations is returned.
On entry to a traced Loom method, Loom prints the method's action name, title, and arguments. If the method is untitled, its situation pattern is used instead of the title. On exit, the method value is printed.
When the predicate of a traced relation is invoked, Loom prints the names of the relation and its arguments. When the predicate returns, its value is printed. Relation predicates are invoked during both recognition and query processing.
The use-loom amd call-use-loom functions perform a shadowing-import of the symbol ``LOOM:trace'' into the using package.
(defun foo (x) x)
(defmethod M (?x) :title "test" :action ((foo ?x)))
(trace foo M) ==> (FOO M)
(perform (M 3)) -->
1 ENTER M-"test": 3
| 2 Enter FOO 3
| 2 Exit FOO 3
1 EXIT M-"test": 3
Last modified: Jun 1 1995