Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Output complete trace at once in SWI-Prolog

7 views
Skip to first unread message

Raphael

unread,
Dec 8, 2009, 9:14:27 AM12/8/09
to
Hey,

is there a way to output the whole trace of one call in SWI-Prolog at
once?

I am trying to debug something with very many steps in between and do
not want to keep holding down the return key all the time.

Jan Wielemaker

unread,
Dec 8, 2009, 11:07:22 AM12/8/09
to

See http://www.swi-prolog.org/pldoc/doc_for?object=leash%2f1

But you really do not want that. Instead:

* Think and make hypothesis
* Use assertion/1 and/or debug/3 from library(debug).
* Use breakpoint (in the graphical debugger)
* Conditional breakpoints are not there, but you can put
this somewhere in a clause: ( some_condition -> gtrace ; true ).
The run ?- make. and try again.
* For all the above, you may want to run the program using
?- debug, mygoal., making the system remember more context.

Cheers --- Jan

0 new messages