Chris Mellish's graphical tracer
To be able to use the graphical Prolog tracer written by Chris
Mellish, add the following line to your "~/purl.org/net/local/lib/mellish_sicstus_tracer/tcl').
To use this tracer:
- Call the goal "tracer." once after starting up PROLOG.
- Prefix every call you want to step through using the graphical
debugger with a question mark, e.g., call "?append([a,b],[],Res)."
instead of "append([a,b],[],Res)." Then use the buttons on the graphical
window to step through the execution of that goal.
- A short manual for the tracer and its use and
limitations can be found in this postscript file. (Note that in some places it refers to a particular file setup in Edinburgh.)
Sicstus source level debugger
For more advanced debugging features, you can use the Sicstus source
level debugger for Emacs by adding the following lines to your
~/.emacs file, before calling xemacs and starting prolog with M-x
run-prolog. The functionality is the same as the ordinary Sicstus
debugger described in the Manual of SICStus
Prolog, but a window with the code that is being stepped through
is automatically displayed in addition.
(setq load-path (cons (expand-file-name "/opt/local/lib/sicstus-3.8.5/emacs") load-path))
(autoload 'run-prolog "prolog" "Start a Prolog sub-process." t)
(autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t)
(setq prolog-system 'sicstus) ; This will ensure that sicstus-sup is loaded!
(setq auto-mode-alist (cons '("\\.pl$" . prolog-mode) auto-mode-alist))
Back to main course page
For questions or comments regarding this page, please contact: Detmar Meurers
Last modified: Mon Mar 5 17:14:29 EST 2001