SIGN IN SIGN UP

Improve trace output

The tracing instrumentation emits redos when evaluation *may* restart. This is
done so that expression redos are emitted before rule/body redos. E.g.,
given the expression p[x] > 1, the event stream should receive
redo(Expr(p[x] > 1)) before redo(Rule(p[x] = y :- ...)). Because redos are
emitted this way, the event stream contains many redos that only indicate that
the search has terminated because no more bindings could be found.

This change adds a stack/buffer to the context which is used to store redos.
When non-redo events are emitted, the buffer is flushed. When adding new redos
to the stack, we discard any that are no longer relevant, i.e., that indicate
that a search terminated because no more bindings could be fine.
T
Torin Sandall committed
0f90fe993159410c71ba223bdfc0112f51239fec
Parent: 05b5b95