XPCE/SWI-Prolog --- Graphical tracer front-end
SWI-Prolog and XPCE concentrate on program development by offering an environment that is especially suitable for (rapid) prototyping and debugging. This is supported by the very fast incremental SWI-Prolog compiler, the debugger that is capable of debugging compiled code, GNU-readline based command-line editor and XPCE's support for dynamic modification of the running environment.
Though sufficient to support expert (Prolog) users, the current support is not satisfactory for novice users raised with a mouse.
In addition, even being a Prolog expert, tracing Prolog programs using a traditional 4-port debugger in a terminal is difficult. Large Prolog terms make the trace hard to read, it is difficult to understand determinism and backtracking and hard to examine the running clauses.

The XPCE/SWI-Prolog GUI tracer in action
In this picture, the top-left window indicates the binding.
B is not listed as this variable is unbound. The top-right
window displays the call-stack. The
icon
indicates the called predicate is a normal user-defined predicate. The
icon indicates the call is deterministic,
while the
icon indicates the frame has
choice-points left. The user can click on any frame to switch both
source and bindings window to the clicked frame.
The tracer is loaded using the (autoload) predicate guitracer/0. Executing this installs hooks into the SWI-Prolog tracer that will cause any normal trace actions to be redirected to the GUI tracer. The interface appears whenever the tracer is started: using trace/0, spy/1 or by putting a call to trace/0 somewhere in your source-code:
?- guitracer. % The graphical front-end will be used for subsequent tracing Yes ?- spy(dubious/1). Spy point on dubious/1 Yes [debug] ?- go. |
|
| This page is maintained using the chpp macro language |