I have no idea what caused this, but during a gtrace I got the output below in the console window. Does anyone know what these messages mean and how they got “triggered”?:
[trace] 73 ?- nlg_translate_complex_item_id(key(unlocks(room(son(youngest)))), R).
% clause_info(<clause>(0000008F6F9ED470)) (1-st clause of nlg_translate_complex_item_id/2)...
% from nlg.pl:241 ...
% Trying with syntax prolog
% read ...
% unified ...
% got names
% Added to info-cache
% clause_info(<clause>(0000008F6F9ED470)): from cache
% clause_info(<clause>(0000008F6F9ED470)): from cache
% clause_info(<clause>(0000008F6F9ED470)): from cache
% clause_info(<clause>(0000008F6B3DDE80)) (1-st clause of inspect_arguments/2)...
% from src_text.pl:154 ...
% Trying with syntax prolog
% read ...
% unified ...
% got names
% Added to info-cache
% clause_info(<clause>(0000008F6B3DDE80)): from cache
% clause_info(<clause>(0000008F6B3DDE80)): from cache
% clause_info(<clause>(0000008F6B3DDE80)): from cache
% clause_info(<clause>(0000008F6B40F970)) (2-nd clause of inspect_arguments/2)...
% from src_text.pl:158 ...
% Trying with syntax prolog
% read ...
% unified ...
% got names
% Added to info-cache
% clause_info(<clause>(0000008F6B40F970)): from cache
% clause_info(<clause>(0000008F6B40F970)): from cache
% clause_info(<clause>(0000008F6B40F970)): from cache
% clause_info(<clause>(0000008F6B3BBE80)) (4-th clause of inspect_arguments/2)...
% from src_text.pl:169 ...
% Trying with syntax prolog
% read ...
% unified ...
% got names
% Added to info-cache
% clause_info(<clause>(0000008F6B3BBE80)): from cache
% clause_info(<clause>(0000008F6B3BBE80)): from cache
% clause_info(<clause>(0000008F6B3BBE80)): from cache
% clause_info(<clause>(0000008F6B3BBE80)): from cache
% clause_info(<clause>(0000008F6B3BBE80)): from cache
% clause_info(<clause>(0000008F6B3BBE80)): from cache
% clause_info(<clause>(0000008F6B3BBE80)): from cache
% clause_info(<clause>(0000008F6F9ED470)): from cache
% clause_info(<clause>(0000008F6F9ED470)): from cache
% clause_info(<clause>(0000008F6F9ED470)): from cache
% clause_info(<clause>(0000008F6F9ED470)): from cache
% Breakpoint 2 in 1-st clause of nlg_translate_complex_item_id/2 at nlg.pl:249
% clause_info(<clause>(0000008F6F8C9FC0)) (1-st clause of nlg_translate_complex_item_id_1/2)...
% from nlg.pl:227 ...
% Trying with syntax prolog
% read ...
% unified ...
% got names
% Added to info-cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
% clause_info(<clause>(0000008F6F8C9FC0)): from cache
Looks like you typed ?- debug(_). or something similar to activate the debug messages in library(prolog_clause). Try ?- list_debug_topics. or simply ?- nodebug(_)..
library(debug) provides a lot of useful stuff for debugging. Notable
debug(Channel, Format, Args)
which acts as format(Format,Args) through the print_message/2 channel debug(Channel)IFFChannel has been activated using debug/1. By default the mesage end up on the console. You can redirect channels to files using e.g.
debug(http(_) > 'http.log')
Note the use of variables, which allows switching on/off sets of related de bug channels as whether or not a channel is active is decided by unification.
And the best part: if you compile with optimization enabled the debug/3 statements are removed from your code (goal_expansion maps them to true, which the compiler removes in optimized mode).
The other noteworthy primitive is assertion(:Condition) which evaluates \+ \+ Condition. On failure it prints a stack trace and will try to activate the debugger. Once again, in optimized mode this is removed.
Note there is also a graphical tool accessible from Prolog/View debug messages from PceEmacs. It is not really good though. You can enable/disable messages and select messages in the output that belong to a given channel.