How to trace the FGL rewriter
FGL allows attempts at applying rewrite rules to be traced using a configurable tracing function. By default, a basic tracing function is provided such that the user only needs to set up some state global variables to enable and use it.
The default tracing implementation may be activated by setting the following state globals:
;; Enable the tracing function (assign :fgl-trace-rewrites t) ;; Alist whose keys are the rules that will be traced (assign :fgl-trace-rule-alist '(((:rewrite fgl::fgl-lognot)))) ;; Evisc tuple for trace output (assign :fgl-trace-evisc-tuple (evisc-tuple 8 12 nil nil))
More specific tracing behavior can be specified for each rule via the trace-rule-alist. The fgl-trace macro offers a more user-friendly interface for this than direct manipulation of the trace-rule-alist; see that topic for options, as well as fgl-advanced-tracing.