2001-04-09 20:54:03 +01:00
/*************************************************************************
* *
* YAP Prolog *
* *
* Yap Prolog was developed at NCCUP - Universidade do Porto *
* *
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
* *
**************************************************************************
* *
2004-01-23 02:23:51 +00:00
* File: errors.yap *
2001-04-09 20:54:03 +01:00
* comments: error messages for YAP *
* *
2007-01-24 14:20:04 +00:00
* Last rev: $Date: 2007-01-24 14:20:04 $,$Author: vsc $ *
2004-06-09 04:32:03 +01:00
* $Log: not supported by cvs2svn $
2007-01-24 14:20:04 +00:00
* Revision 1.79 2006/12/13 16:10:26 vsc
* several debugger and CLP(BN) improvements.
*
2006-12-13 16:10:26 +00:00
* Revision 1.78 2006/05/22 16:12:01 tiagosoares
* MYDDAS: MYDDAS version boot message
*
2006-05-22 17:12:01 +01:00
* Revision 1.77 2006/04/10 19:24:52 vsc
* fix syntax error message handling
* improve redblack trees and use it to reimplement association lists and
* to have better implementation of several graph algorithms.
*
2006-04-10 20:24:52 +01:00
* Revision 1.76 2006/04/05 00:16:55 vsc
* Lots of fixes (check logfile for details
*
2006-04-05 01:16:55 +01:00
* Revision 1.75 2006/02/24 14:26:37 vsc
* fix informational_messages
*
2006-02-24 14:26:37 +00:00
* Revision 1.74 2006/01/26 19:20:00 vsc
* syntax error was giving the offset
*
2006-01-26 19:20:00 +00:00
* Revision 1.73 2006/01/20 04:35:28 vsc
*
* fix error message
*
2006-01-20 04:35:28 +00:00
* Revision 1.72 2005/11/23 13:24:00 vsc
* cleanups in OS interface predicates.
*
2005-11-23 13:24:00 +00:00
* Revision 1.71 2005/11/10 01:27:12 vsc
* fix debugger message for EOF input
* fix fix to setof
* fix profiler spewing out hidden atoms.
*
2005-11-10 01:27:13 +00:00
* Revision 1.70 2005/11/03 18:27:10 vsc
* fix quote
*
2005-11-03 18:27:10 +00:00
* Revision 1.69 2005/11/01 18:54:06 vsc
* small fixes
*
2005-11-01 18:54:06 +00:00
* Revision 1.68 2005/10/29 01:28:37 vsc
* make undefined more ISO compatible.
*
2005-10-29 02:28:37 +01:00
* Revision 1.67 2005/10/28 17:38:50 vsc
* sveral updates
*
2005-10-28 18:38:50 +01:00
* Revision 1.66 2005/10/18 17:04:43 vsc
* 5.1:
* - improvements to GC
* 2 generations
* generic speedups
* - new scheme for attvars
* - hProlog like interface also supported
* - SWI compatibility layer
* - extra predicates
* - global variables
* - moved to Prolog module
* - CLP(R) by Leslie De Koninck, Tom Schrijvers, Cristian Holzbaur, Bart
* Demoen and Jan Wielemacker
* - load_files/2
*
* from 5.0.1
*
* - WIN32 missing include files (untested)
* - -L trouble (my thanks to Takeyuchi Shiramoto-san)!
* - debugging of backtrable user-C preds would core dump.
* - redeclaring a C-predicate as Prolog core dumps.
* - badly protected YapInterface.h.
* - break/0 was failing at exit.
* - YAP_cut_fail and YAP_cut_succeed were different from manual.
* - tracing through data-bases could core dump.
* - cut could break on very large computations.
* - first pass at BigNum issues (reported by Roberto).
* - debugger could get go awol after fail port.
* - weird message on wrong debugger option.
*
2005-10-18 18:04:43 +01:00
* Revision 1.65 2005/05/25 21:43:33 vsc
* fix compiler bug in 1 << X, found by Nuno Fonseca.
* compiler internal errors get their own message.
*
2005-05-25 22:43:33 +01:00
* Revision 1.64 2005/05/25 18:18:02 vsc
* fix error handling
* configure should not allow max-memory and use-malloc at same time
* some extensions for jpl
*
2005-05-25 19:18:02 +01:00
* Revision 1.63 2005/04/20 20:06:26 vsc
* try to improve error handling and warnings from within consults.
*
2005-04-20 21:06:26 +01:00
* Revision 1.62 2005/04/07 17:55:05 ricroc
* Adding tabling support for mixed strategy evaluation (batched and local scheduling)
* UPDATE: compilation flags -DTABLING_BATCHED_SCHEDULING and -DTABLING_LOCAL_SCHEDULING removed. To support tabling use -DTABLING in the Makefile or --enable-tabling in configure.
* NEW: yap_flag(tabling_mode,MODE) changes the tabling execution mode of all tabled predicates to MODE (batched, local or default).
* NEW: tabling_mode(PRED,MODE) changes the default tabling execution mode of predicate PRED to MODE (batched or local).
*
2005-04-07 18:56:58 +01:00
* Revision 1.61 2005/02/21 16:50:21 vsc
* amd64 fixes
* library fixes
*
2005-02-21 16:50:21 +00:00
* Revision 1.60 2005/01/28 23:14:41 vsc
* move to Yap-4.5.7
* Fix clause size
*
2005-01-28 23:14:41 +00:00
* Revision 1.59 2005/01/13 05:47:27 vsc
* lgamma broke arithmetic optimisation
* integer_y has type y
* pass original source to checker (and maybe even use option in parser)
* use warning mechanism for checker messages.
*
2005-01-13 05:47:27 +00:00
* Revision 1.58 2004/11/19 21:32:53 vsc
* change abort so that it won't be caught by handlers.
*
2004-11-19 21:32:53 +00:00
* Revision 1.57 2004/10/27 15:56:34 vsc
* bug fixes on memory overflows and on clauses :- fail being ignored by clause.
*
2004-10-27 16:56:34 +01:00
* Revision 1.56 2004/10/04 18:56:20 vsc
* fixes for thread support
* fix indexing bug (serious)
*
2004-10-04 19:56:20 +01:00
* Revision 1.55 2004/09/17 19:34:53 vsc
* simplify frozen/2
*
2004-09-17 20:34:53 +01:00
* Revision 1.54 2004/07/22 21:32:22 vsc
* debugger fixes
* initial support for JPL
* bad calls to garbage collector and gc
* debugger fixes
*
2004-07-22 22:32:23 +01:00
* Revision 1.53 2004/06/23 17:24:20 vsc
* New comment-based message style
* Fix thread support (at least don't deadlock with oneself)
* small fixes for coroutining predicates
* force Yap to recover space in arrays of dbrefs
* use private predicates in debugger.
*
2004-06-23 18:24:20 +01:00
* Revision 1.52 2004/06/18 15:41:19 vsc
* fix extraneous line in yes/no messages
*
2004-06-18 16:41:19 +01:00
* Revision 1.51 2004/06/09 03:32:03 vsc
* fix bugs
*
2004-06-09 04:32:03 +01:00
* Revision 1.50 2004/04/27 16:21:25 vsc
* stupid bug
* *
2004-04-27 17:21:25 +01:00
* *
2001-04-09 20:54:03 +01:00
*************************************************************************/
2002-09-09 18:40:12 +01:00
'$do_error'(Type,Message) :-
'$current_stack'(local_sp(_,Envs,CPs)),
throw(error(Type,[Message|local_sp(Message,Envs,CPs)])).
2001-04-09 20:54:03 +01:00
'$Error'(E) :-
2003-12-01 17:27:42 +00:00
'$LoopError'(E,top).
2001-04-09 20:54:03 +01:00
2003-12-01 17:27:42 +00:00
'$LoopError'(_, _) :-
2001-04-09 20:54:03 +01:00
flush_output(user_output),
flush_output(user_error),
fail.
2003-12-01 17:27:42 +00:00
'$LoopError'(Error, Level) :- !,
'$process_error'(Error, Level),
2001-04-09 20:54:03 +01:00
fail.
2003-12-01 17:27:42 +00:00
'$LoopError'(_, _) :-
2002-09-17 00:01:59 +01:00
flush_all_streams,
2001-04-09 20:54:03 +01:00
fail.
2003-12-01 17:27:42 +00:00
'$process_error'(abort, top) :- !,
print_message(informational,abort(user)).
'$process_error'(abort, _) :- !,
2004-11-19 21:32:53 +00:00
throw('$abort').
2003-12-01 17:27:42 +00:00
'$process_error'(error(Msg, Where), _) :- !,
2002-02-04 16:12:54 +00:00
'$set_fpu_exceptions',
'$print_message'(error,error(Msg, Where)).
2003-12-01 17:27:42 +00:00
'$process_error'(Throw, _) :-
2001-04-09 20:54:03 +01:00
print_message(error,Throw).
2002-01-22 17:11:36 +00:00
print_message(Level, Mss) :-
'$print_message'(Level, Mss).
'$print_message'(force(_Severity), Msg) :- !,
2001-04-09 20:54:03 +01:00
print(user_error,Msg).
2002-01-22 17:11:36 +00:00
'$print_message'(Severity, Msg) :-
2003-01-10 11:52:33 +00:00
nonvar(Severity), nonvar(Msg),
2001-11-15 00:01:43 +00:00
\+ '$undefined'(portray_message(Severity, Msg), user),
user:portray_message(Severity, Msg), !.
2003-01-10 11:52:33 +00:00
'$print_message'(error,error(Msg,Info)) :-
( var(Msg) ; var(Info) ), !,
2004-07-22 22:32:23 +01:00
format(user_error,'% YAP: no handler for error ~w~n', [error(Msg,Info)]).
2002-09-09 18:40:12 +01:00
'$print_message'(error,error(syntax_error(A,B,C,D,E,F),_)) :- !,
'$output_error_message'(syntax_error(A,B,C,D,E,F), 'SYNTAX ERROR').
2003-03-20 14:22:08 +00:00
'$print_message'(error,error(Msg,[Info|local_sp(Where,Envs,CPs)])) :-
2005-05-25 19:18:02 +01:00
'$output_error_location'('\% ERROR:'),
2002-09-09 18:40:12 +01:00
'$prepare_loc'(Info,Where,Location),
2002-10-01 21:29:58 +01:00
'$output_error_message'(Msg, Location), !,
'$do_stack_dump'(Envs, CPs).
2002-10-10 06:58:49 +01:00
% old format: don't want a stack dump.
2003-01-10 11:52:33 +00:00
'$print_message'(error,error(Type,Where)) :-
'$output_error_message'(Type, Where), !.
2002-01-22 17:11:36 +00:00
'$print_message'(error,Throw) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% YAP: no handler for error ~w~n', [Throw]).
2006-02-24 14:26:37 +00:00
'$print_message'(informational,_) :-
2006-04-05 01:16:55 +01:00
get_value('$verbose',off), !.
2002-01-22 17:11:36 +00:00
'$print_message'(informational,M) :-
2005-10-18 18:04:43 +01:00
'$do_informational_message'(M).
2002-01-22 17:11:36 +00:00
'$print_message'(warning,M) :-
2005-05-25 19:18:02 +01:00
'$output_error_location'('!! WARNING:'),
format(user_error, '!! ', []),
2002-06-01 02:46:06 +01:00
'$do_print_message'(M),
2004-07-22 22:32:23 +01:00
format(user_error, '~n', []).
2005-10-18 18:04:43 +01:00
'$print_message'(silent,_).
2002-01-22 17:11:36 +00:00
'$print_message'(help,M) :-
2002-06-01 02:46:06 +01:00
'$do_print_message'(M),
2004-07-22 22:32:23 +01:00
format(user_error, '~n', []).
2001-04-09 20:54:03 +01:00
2005-05-25 19:18:02 +01:00
'$output_error_location'(MsgCodes) :-
2005-04-20 21:06:26 +01:00
get_value('$consulting_file',FileName),
2005-05-25 19:18:02 +01:00
FileName \= [], !,
2005-04-20 21:06:26 +01:00
'$start_line'(LN),
'$show_consult_level'(LC),
2005-05-25 19:18:02 +01:00
'$output_file_pos'(FileName,LN,LC,MsgCodes),
2005-04-20 21:06:26 +01:00
format(user_error, '~*|', [LC]).
2005-05-25 19:18:02 +01:00
'$output_error_location'(_).
2005-04-20 21:06:26 +01:00
2005-05-25 19:18:02 +01:00
'$output_file_pos'(user_input,LN,LC,MsgCodes) :- !,
format(user_error,'~*|~a at user_input near line ~d,~n',[LC,MsgCodes,LN]).
'$output_file_pos'(FileName,LN,LC,MsgCodes) :-
format(user_error,'~*|~a at file ~a, near line ~d,~n',[LC,MsgCodes,FileName,LN]).
2001-04-09 20:54:03 +01:00
2004-04-27 16:14:38 +01:00
'$do_informational_message'(halt) :- !,
2004-07-22 22:32:23 +01:00
format(user_error, '% YAP execution halted~n', []).
2004-11-19 21:32:53 +00:00
'$do_informational_message'('$abort') :- !,
2004-07-22 22:32:23 +01:00
format(user_error, '% YAP execution aborted~n', []).
2002-06-01 02:46:06 +01:00
'$do_informational_message'(loading(_,user)) :- !.
'$do_informational_message'(loading(What,AbsoluteFileName)) :- !,
2002-01-22 17:11:36 +00:00
'$show_consult_level'(LC),
2004-07-22 22:32:23 +01:00
format(user_error, '~*|% ~a ~a...~n', [LC, What, AbsoluteFileName]).
2002-06-01 02:46:06 +01:00
'$do_informational_message'(loaded(_,user,_,_,_)) :- !.
2004-10-04 19:56:20 +01:00
'$do_informational_message'(loaded(included,AbsoluteFileName,Mod,Time,Space)) :- !,
'$show_consult_level'(LC),
format(user_error, '~*|% ~a included in module ~a, ~d msec ~d bytes~n', [LC, AbsoluteFileName,Mod,Time,Space]).
2002-06-01 02:46:06 +01:00
'$do_informational_message'(loaded(What,AbsoluteFileName,Mod,Time,Space)) :- !,
2002-01-22 17:11:36 +00:00
'$show_consult_level'(LC0),
LC is LC0+1,
2004-07-22 22:32:23 +01:00
format(user_error, '~*|% ~a ~a in module ~a, ~d msec ~d bytes~n', [LC, What, AbsoluteFileName,Mod,Time,Space]).
2005-10-18 18:04:43 +01:00
'$do_informational_message'(prompt(BreakLevel,TraceDebug)) :- !,
(BreakLevel =:= 0 ->
(
var(TraceDebug) ->
true
;
format(user_error, '% ~a~n', [TraceDebug])
)
;
(
var(TraceDebug) ->
format(user_error, '% ~d~n', [BreakLevel])
;
format(user_error, '% ~d,~a~n', [BreakLevel,TraceDebug])
)
).
'$do_informational_message'(debug) :- !,
format(user_error, '% [debug]~n', []).
'$do_informational_message'(trace) :- !,
format(user_error, '% [trace]~n', []).
2002-06-01 02:46:06 +01:00
'$do_informational_message'(M) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% ', []),
2002-06-01 02:46:06 +01:00
'$do_print_message'(M),
2004-07-22 22:32:23 +01:00
format(user_error,'~n', []).
2002-06-01 02:46:06 +01:00
2002-01-22 17:11:36 +00:00
%message(loaded(Past,AbsoluteFileName,user,Msec,Bytes), Prefix, Suffix) :- !,
2004-07-22 22:32:23 +01:00
'$do_print_message'(format(Msg, Args)) :- !,
format(user_error,Msg,Args).
2006-12-13 16:10:26 +00:00
'$do_print_message'(ancestors([])) :- !,
format(user_error,'There are no ancestors.',
[]).
2002-06-01 02:46:06 +01:00
'$do_print_message'(breakp(bp(debugger,_,_,M:F/N,_),add,already)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'There is already a spy point on ~w:~w/~w.',
2002-06-01 02:46:06 +01:00
[M,F,N]).
'$do_print_message'(breakp(bp(debugger,_,_,M:F/N,_),add,ok)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'Spy point set on ~w:~w/~w.',
2002-06-01 02:46:06 +01:00
[M,F,N]).
'$do_print_message'(breakp(bp(debugger,_,_,M:F/N,_),remove,last)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'Spy point on ~w:~w/~w removed.',
2002-06-01 02:46:06 +01:00
[M,F,N]).
'$do_print_message'(breakp(no,breakpoint_for,M:F/N)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'There is no spy point on ~w:~w/~w.',
2002-06-01 02:46:06 +01:00
[M,F,N]).
'$do_print_message'(breakpoints([])) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'There are no spy-points set.',
2007-01-24 14:20:04 +00:00
[]).
2002-06-01 02:46:06 +01:00
'$do_print_message'(breakpoints(L)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'Spy-points set on:', []),
2002-06-01 02:46:06 +01:00
'$print_list_of_preds'(L).
2005-04-20 21:06:26 +01:00
'$do_print_message'(clauses_not_together(P)) :- !,
format(user_error, 'Discontiguous definition of ~q.',[P]).
2004-06-23 18:24:20 +01:00
'$do_print_message'(debug(debug)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'Debug mode on.',[]).
2004-06-23 18:24:20 +01:00
'$do_print_message'(debug(off)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'Debug mode off.',[]).
2004-06-23 18:24:20 +01:00
'$do_print_message'(debug(trace)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'Trace mode on.',[]).
2005-04-20 21:06:26 +01:00
'$do_print_message'(declaration(Args,Action)) :- !,
format(user_error,'declaration ~w ~w.', [Args,Action]).
'$do_print_message'(defined_elsewhere(P,F)) :- !,
2005-11-03 18:27:10 +00:00
format(user_error, 'predicate ~q previously defined in file ~w',[P,F]).
2004-06-23 18:24:20 +01:00
'$do_print_message'(import(Pred,To,From,private)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'Importing private predicate ~w:~w to ~w.',
2004-06-23 18:24:20 +01:00
[From,Pred,To]).
'$do_print_message'(leash([])) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'No leashing.',
2007-01-24 14:20:04 +00:00
[]).
2004-06-23 18:24:20 +01:00
'$do_print_message'(leash([A|B])) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'Leashing set to ~w.',
2004-06-23 18:24:20 +01:00
[[A|B]]).
'$do_print_message'(no) :- !,
2004-07-22 22:32:23 +01:00
format(user_error, 'no', []).
2004-06-23 18:24:20 +01:00
'$do_print_message'(no_match(P)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'No matching predicate for ~w.',
2004-06-23 18:24:20 +01:00
[P]).
2005-01-13 05:47:27 +00:00
'$do_print_message'(leash([A|B])) :- !,
format(user_error,'Leashing set to ~w.',
[[A|B]]).
2005-04-20 21:06:26 +01:00
'$do_print_message'(singletons(SVs,P,CLN)) :- !,
2005-01-13 05:47:27 +00:00
format(user_error, 'Singleton variable',[]),
'$write_svs'(SVs),
2005-04-20 21:06:26 +01:00
format(user_error, ' in ~q, clause ~d.',[P,CLN]).
2005-11-10 01:27:13 +00:00
'$do_print_message'(trace_command(-1)) :- !,
format(user_error,'EOF is not a valid debugger command.', []).
2005-10-18 18:04:43 +01:00
'$do_print_message'(trace_command(C)) :- !,
format(user_error,'~c is not a valid debugger command.', [C]).
2004-06-23 18:24:20 +01:00
'$do_print_message'(trace_help) :- !,
2005-10-18 18:04:43 +01:00
format(user_error,' Please enter a valid debugger command (h for help).', []).
2004-04-27 16:43:29 +01:00
'$do_print_message'(version(Version)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'YAP version ~a', [Version]).
2006-05-22 17:12:01 +01:00
'$do_print_message'(myddas_version(Version)) :- !,
format(user_error,'MYDDAS version ~a', [Version]).
2004-06-23 18:24:20 +01:00
'$do_print_message'(yes) :- !,
2004-07-22 22:32:23 +01:00
format(user_error, 'yes', []).
2001-04-09 20:54:03 +01:00
'$do_print_message'(Messg) :-
2004-07-22 22:32:23 +01:00
format(user_error,'~q',Messg).
2001-04-09 20:54:03 +01:00
2005-01-13 05:47:27 +00:00
'$write_svs'([H]) :- !, write(user_error,' '), '$write_svs1'([H]).
'$write_svs'(SVs) :- write(user_error,'s '), '$write_svs1'(SVs).
'$write_svs1'([H]) :- !,
'$write_str_in_stderr'(H).
'$write_svs1'([H|T]) :-
'$write_str_in_stderr'(H),
write(user_error,','),
'$write_svs1'(T).
'$write_str_in_stderr'([]).
'$write_str_in_stderr'([C|T]) :-
put(user_error,C),
'$write_str_in_stderr'(T).
2002-06-01 02:46:06 +01:00
'$print_list_of_preds'([]).
'$print_list_of_preds'([P|L]) :-
2004-07-22 22:32:23 +01:00
format(user_error,'~n ~w',[P]),
2002-06-01 02:46:06 +01:00
'$print_list_of_preds'(L).
2002-10-01 21:29:58 +01:00
'$do_stack_dump'(Envs, CPs) :-
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(CPs,0, PCPs),
'$preprocess_stack'(Envs,0, PEnvs),
2002-10-01 21:29:58 +01:00
'$say_stack_dump'(PEnvs, PCPs),
'$show_cps'(PCPs),
'$show_envs'(PEnvs),
'$close_stack_dump'(PEnvs, PCPs).
2002-11-11 19:48:07 +00:00
'$preprocess_stack'([], _, []).
2007-01-24 14:20:04 +00:00
'$preprocess_stack'([_|_],40, [overflow]) :- !.
2002-11-11 19:48:07 +00:00
'$preprocess_stack'([G|Gs],I, NGs) :-
2002-10-01 21:29:58 +01:00
'$pred_for_code'(G,Name,Arity,Mod,Clause),
2002-11-11 19:48:07 +00:00
I1 is I+1,
'$beautify_stack_goal'(Name,Arity,Mod,Clause,Gs,I1,NGs).
2002-10-01 21:29:58 +01:00
2007-01-24 14:20:04 +00:00
'$beautify_stack_goal'(_,_,_,0,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs,I,NGs).
'$beautify_stack_goal'(Name,Arity,Module,Clause,Gs,I,NGs) :-
2002-10-01 21:29:58 +01:00
functor(G,Name,Arity),
'$hidden_predicate'(G,Module), !,
2002-11-11 19:48:07 +00:00
'$beautify_hidden_goal'(Name,Arity,Module,Clause,Gs,I,NGs).
'$beautify_stack_goal'(Name,Arity,Module,Clause,Gs,I,[cl(Name,Arity,Module,Clause)|NGs]) :-
'$preprocess_stack'(Gs,I,NGs).
2002-10-01 21:29:58 +01:00
2002-11-11 19:48:07 +00:00
'$beautify_hidden_goal'('$yes_no',_,_,_,_,_,[]) :- !.
'$beautify_hidden_goal'('$do_yes_no',_,_,_,_,_,[]) :- !.
'$beautify_hidden_goal'('$query',_,_,_,_,_,[]) :- !.
'$beautify_hidden_goal'('$enter_top_level',_,_,_,_,_,[]) :- !.
2002-10-01 21:29:58 +01:00
% The user should never know these exist.
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$csult',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$use_module',2,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$ensure_loaded',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$continue_with_command',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$spycall_stdpred',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$spycalls',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$spycall',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$do_spy',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$spy',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$do_creep_execute',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$creep_execute',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$direct_spy',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$system_catch',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$execute_command',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$process_directive',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$catch',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$loop',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$consult',3,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$reconsult',_,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$undefp',1,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
2007-01-24 14:20:04 +00:00
'$beautify_hidden_goal'('$use_module',2,prolog,_,Gs,I,NGs) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$repeat',0,prolog,ClNo,Gs,I,[cl(repeat,0,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$recorded_with_key',3,prolog,ClNo,Gs,I,[cl(recorded,3,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
2004-02-10 01:07:46 +00:00
'$beautify_hidden_goal'('$consult',3,prolog,ClNo,Gs,I,[cl(consult,1,prolog,ClNo)|NGs]) :- !,
2002-11-11 19:48:07 +00:00
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$findall_with_common_vars',_,prolog,ClNo,Gs,I,[cl(findall,4,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$findall',_,prolog,ClNo,Gs,I,[cl(findall,4,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$bagof',_,prolog,ClNo,Gs,I,[cl(bagof,3,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$listing',_,prolog,ClNo,Gs,I,[cl(listing,1,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$call',Args,prolog,ClNo,Gs,I,[cl(call,Args,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$current_predicate',Args,prolog,ClNo,Gs,I,[cl(current_predicate,Args,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$list_clauses',_,prolog,ClNo,Gs,I,[cl(listing,1,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'('$use_module',1,prolog,ClNo,Gs,I,[cl(use_module,1,prolog,ClNo)|NGs]) :- !,
'$preprocess_stack'(Gs, I, NGs).
'$beautify_hidden_goal'(Name,Args,Mod,ClNo,Gs,I,[cl(Name,Args,Mod,ClNo)|NGs]) :-
'$preprocess_stack'(Gs, I, NGs).
2002-10-01 21:29:58 +01:00
'$say_stack_dump'([], []) :- !.
'$say_stack_dump'(_, _) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% Stack dump for error:', []).
2002-10-01 21:29:58 +01:00
'$close_stack_dump'([], []) :- !.
'$close_stack_dump'(_, _) :-
2004-07-22 22:32:23 +01:00
format(user_error,'~n', []).
2002-10-01 21:29:58 +01:00
'$show_cps'([]) :- !.
2002-09-09 18:40:12 +01:00
'$show_cps'(List) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% ~n choice-points (goals with alternatives left):',[]),
2002-10-01 21:29:58 +01:00
'$print_stack'(List).
2002-09-09 18:40:12 +01:00
2002-10-01 21:29:58 +01:00
'$show_envs'([]) :- !.
2002-09-09 18:40:12 +01:00
'$show_envs'(List) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% ~n environments (partially executed clauses):',[]),
2002-10-01 21:29:58 +01:00
'$print_stack'(List).
2002-09-09 18:40:12 +01:00
'$prepare_loc'(Info,Where,Location) :- integer(Where), !,
'$pred_for_code'(Where,Name,Arity,Mod,Clause),
'$construct_code'(Clause,Name,Arity,Mod,Info,Location).
2007-01-24 14:20:04 +00:00
'$prepare_loc'(Info,_,Info).
2002-09-09 18:40:12 +01:00
'$print_stack'([]).
2002-11-11 19:48:07 +00:00
'$print_stack'([overflow]) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'~n% ...',[]).
2002-10-01 21:29:58 +01:00
'$print_stack'([cl(Name,Arity,Mod,Clause)|List]) :-
'$show_goal'(Clause,Name,Arity,Mod),
'$print_stack'(List).
2002-09-09 18:40:12 +01:00
'$show_goal'(-1,Name,Arity,Mod) :- !,
2004-07-22 22:32:23 +01:00
format('~n% ~a:~a/~d at indexing code',[Mod,Name,Arity]).
2007-01-24 14:20:04 +00:00
'$show_goal'(0,_,_,_) :- !.
2002-09-09 18:40:12 +01:00
'$show_goal'(I,Name,Arity,Mod) :-
2004-07-22 22:32:23 +01:00
format(user_error,'~n% ~a:~a/~d at clause ~d',[Mod,Name,Arity,I]).
2002-09-09 18:40:12 +01:00
'$construct_code'(-1,Name,Arity,Mod,Where,Location) :- !,
number_codes(Arity,ArityCode),
atom_codes(ArityAtom,ArityCode),
atom_concat([Where,' at ',Mod,':',Name,'/',ArityAtom,' at indexing code'],Location).
'$construct_code'(0,_,_,_,Location,Location) :- !.
'$construct_code'(Cl,Name,Arity,Mod,Where,Location) :-
number_codes(Arity,ArityCode),
atom_codes(ArityAtom,ArityCode),
number_codes(Cl,ClCode),
atom_codes(ClAtom,ClCode),
atom_concat([Where,' at ',Mod,':',Name,'/',ArityAtom,' (clause ',ClAtom,')'],Location).
2004-02-13 18:39:29 +00:00
'$output_error_message'(consistency_error(Who),Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% CONSISTENCY ERROR- ~w ~w~n',
2004-02-13 18:39:29 +00:00
[Who,Where]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(context_error(Goal,Who),Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% CONTEXT ERROR- ~w: ~w appeared in ~w~n',
2001-04-09 20:54:03 +01:00
[Goal,Who,Where]).
'$output_error_message'(domain_error(array_overflow,Opt), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid index ~w for array~n',
2001-04-09 20:54:03 +01:00
[Where,Opt]).
'$output_error_message'(domain_error(array_type,Opt), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid static array type ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Opt]).
'$output_error_message'(domain_error(builtin_procedure,P), P) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- non-iso built-in procedure ~w~n',
2001-04-09 20:54:03 +01:00
[P]).
'$output_error_message'(domain_error(character_code_list,Opt), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid list of codes ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Opt]).
2001-05-21 21:00:05 +01:00
'$output_error_message'(domain_error(delete_file_option,Opt), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid list of options ~w~n',
2001-05-21 21:00:05 +01:00
[Where,Opt]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(domain_error(operator_specifier,Op), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid operator specifier ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Op]).
2003-10-28 01:16:03 +00:00
'$output_error_message'(domain_error(out_of_range,Value), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: expression ~w is out of range~n',
2003-10-28 01:16:03 +00:00
[Where,Value]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(domain_error(close_option,Opt), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid close option ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Opt]).
'$output_error_message'(domain_error(radix,Opt), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid radix ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Opt]).
'$output_error_message'(domain_error(shift_count_overflow,Opt), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: shift count overflow in ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Opt]).
'$output_error_message'(domain_error(flag_value,F+V), W) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid value ~w for flag ~w~n',
2001-04-09 20:54:03 +01:00
[W,V,F]).
'$output_error_message'(domain_error(io_mode,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid io mode ~w~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
'$output_error_message'(domain_error(mutable,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: invalid mutable ~w~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
2001-04-19 18:12:18 +01:00
'$output_error_message'(domain_error(module_decl_options,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: expect module declaration options, found ~w~n',
2001-04-19 18:12:18 +01:00
[Where,N]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(domain_error(not_empty_list,_), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: found empty list~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(domain_error(not_less_than_zero,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: number ~w less than zero~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
'$output_error_message'(domain_error(not_newline,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: number ~w not newline~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
'$output_error_message'(domain_error(not_zero,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w is not allowed in the domain ~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
'$output_error_message'(domain_error(operator_priority,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w invalid operator priority~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
'$output_error_message'(domain_error(operator_specifier,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w invalid operator specifier~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
2002-06-01 02:46:06 +01:00
'$output_error_message'(domain_error(predicate_spec,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w invalid predicate specifier~n',
2002-06-01 02:46:06 +01:00
[Where,N]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(domain_error(read_option,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w invalid option to read~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
'$output_error_message'(domain_error(semantics_indicator,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected predicate indicator, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(domain_error(source_sink,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w is not a source sink term~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
'$output_error_message'(domain_error(stream,What), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w not a stream~n',
2001-04-09 20:54:03 +01:00
[Where,What]).
'$output_error_message'(domain_error(stream_or_alias,What), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w not a stream~n',
2001-04-09 20:54:03 +01:00
[Where,What]).
'$output_error_message'(domain_error(stream_option,What), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w not a stream option~n',
2001-04-09 20:54:03 +01:00
[Where,What]).
'$output_error_message'(domain_error(stream_position,What), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w not a stream position~n',
2001-04-09 20:54:03 +01:00
[Where,What]).
'$output_error_message'(domain_error(stream_property,What), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w not a stream property~n',
2001-04-09 20:54:03 +01:00
[Where,What]).
'$output_error_message'(domain_error(syntax_error_handler,What), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w not a syntax error handler~n',
2001-04-09 20:54:03 +01:00
[Where,What]).
2004-02-11 01:20:56 +00:00
'$output_error_message'(domain_error(thread_create_option,Option+Opts), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w not in ~w~n',
2004-02-11 01:20:56 +00:00
[Where,Option, Opts]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(domain_error(time_out_spec,What), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w not a valid specification for a time out~n',
2001-04-09 20:54:03 +01:00
[Where,What]).
2005-10-18 18:04:43 +01:00
'$output_error_message'(domain_error(unimplemented_option,What), Where) :-
format(user_error,'% DOMAIN ERROR- ~w: ~w not yet implemented~n',
[Where,What]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(domain_error(write_option,N), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% DOMAIN ERROR- ~w: ~w invalid option to write~n',
2001-04-09 20:54:03 +01:00
[Where,N]).
2005-04-07 18:56:58 +01:00
'$output_error_message'(domain_error(table,P), Where) :-
format(user_error,'% DOMAIN ERROR- ~w: non-tabled procedure ~w~n',
[Where,P]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(existence_error(array,F), W) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% EXISTENCE ERROR- ~w could not open array ~w~n',
2001-04-09 20:54:03 +01:00
[W,F]).
2004-01-23 02:23:51 +00:00
'$output_error_message'(existence_error(mutex,F), W) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% EXISTENCE ERROR- ~w could not open mutex ~w~n',
2004-01-23 02:23:51 +00:00
[W,F]).
2005-02-21 16:50:21 +00:00
'$output_error_message'(existence_error(library,F), W) :-
format(user_error,'% EXISTENCE ERROR- ~w could not open library ~w~n',
[W,F]).
2006-04-05 01:16:55 +01:00
'$output_error_message'(existence_error(message_queue,F), W) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% EXISTENCE ERROR- ~w could not open message queue ~w~n',
2004-01-23 02:23:51 +00:00
[W,F]).
2005-10-29 02:28:37 +01:00
'$output_error_message'(existence_error(procedure,P), context(Call,Parent)) :-
format(user_error,'% EXISTENCE ERROR- procedure ~w is undefined, called from context ~w~n% Goal was ~w~n',
[P,Parent,Call]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(existence_error(source_sink,F), W) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% EXISTENCE ERROR- ~w could not find file ~w~n',
2001-04-09 20:54:03 +01:00
[W,F]).
2001-07-16 16:26:14 +01:00
'$output_error_message'(existence_error(stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% EXISTENCE ERROR- ~w: ~w not an open stream~n',
2001-07-16 16:26:14 +01:00
[Where,Stream]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(evaluation_error(int_overflow), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% INTEGER OVERFLOW ERROR- ~w~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(evaluation_error(float_overflow), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% FLOATING POINT OVERFLOW ERROR- ~w~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(evaluation_error(undefined), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% UNDEFINED ARITHMETIC RESULT ERROR- ~w~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(evaluation_error(underflow), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% UNDERFLOW ERROR- ~w~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(evaluation_error(float_underflow), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% FLOATING POINT UNDERFLOW ERROR- ~w~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(evaluation_error(zero_divisor), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% ZERO DIVISOR ERROR- ~w~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(instantiation_error, Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% INSTANTIATION ERROR- ~w: expected bound value~n',
2001-04-09 20:54:03 +01:00
[Where]).
2005-11-23 13:24:00 +00:00
'$output_error_message'(operating_system_error, Where) :-
format(user_error,'% OPERATING SYSTEM ERROR- ~w~n',
[Where]).
2002-10-10 06:58:49 +01:00
'$output_error_message'(out_of_heap_error, Where) :-
2004-10-27 16:56:34 +01:00
format(user_error,'% OUT OF DATABASE SPACE ERROR- ~w~n',
2002-10-10 06:58:49 +01:00
[Where]).
'$output_error_message'(out_of_stack_error, Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% OUT OF STACK SPACE ERROR- ~w~n',
2002-10-10 06:58:49 +01:00
[Where]).
'$output_error_message'(out_of_trail_error, Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% OUT OF TRAIL SPACE ERROR- ~w~n',
2002-10-10 06:58:49 +01:00
[Where]).
2004-09-17 20:34:53 +01:00
'$output_error_message'(out_of_attvars_error, Where) :-
format(user_error,'% OUT OF STACK SPACE ERROR- ~w~n',
[Where]).
2004-10-27 16:56:34 +01:00
'$output_error_message'(out_of_auxspace_error, Where) :-
format(user_error,'% OUT OF AUXILIARY STACK SPACE ERROR- ~w~n',
[Where]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(permission_error(access,private_procedure,P), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot see clauses for ~w~n',
2001-04-09 20:54:03 +01:00
[Where,P]).
'$output_error_message'(permission_error(access,static_procedure,P), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot access static procedure ~w~n',
2001-04-09 20:54:03 +01:00
[Where,P]).
2001-04-16 17:41:04 +01:00
'$output_error_message'(permission_error(alias,new,P), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot create alias ~w~n',
2001-04-16 17:41:04 +01:00
[Where,P]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(permission_error(create,array,P), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot create array ~w~n',
2001-04-09 20:54:03 +01:00
[Where,P]).
2004-01-23 02:23:51 +00:00
'$output_error_message'(permission_error(create,mutex,P), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot create mutex ~a~n',
2004-01-23 02:23:51 +00:00
[Where,P]).
2006-04-05 01:16:55 +01:00
'$output_error_message'(permission_error(create,message_queue,P), Where) :-
format(user_error,'% PERMISSION ERROR- ~w: cannot create message queue ~a~n',
2004-01-23 02:23:51 +00:00
[Where,P]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(permission_error(create,operator,P), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot create operator ~w~n',
2001-04-09 20:54:03 +01:00
[Where,P]).
'$output_error_message'(permission_error(input,binary_stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot read from binary stream ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(input,closed_stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: trying to read from closed stream ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(input,past_end_of_stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: past end of stream ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(input,stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot read from ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(input,text_stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot read from text stream ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(modify,dynamic_procedure,_), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: modifying a dynamic procedure~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(permission_error(modify,flag,W), _) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- cannot modify flag ~w~n',
2001-04-09 20:54:03 +01:00
[W]).
'$output_error_message'(permission_error(modify,operator,W), _) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- T cannot declare ~w an operator~n',
2001-04-09 20:54:03 +01:00
[W]).
2004-02-05 16:57:02 +00:00
'$output_error_message'(permission_error(modify,dynamic_procedure,_), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: modifying a dynamic procedure~n',
2004-02-05 16:57:02 +00:00
[Where]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(permission_error(modify,static_procedure,_), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: modifying a static procedure~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(permission_error(modify,static_procedure_in_use,_), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: modifying a static procedure in use~n',
2001-04-09 20:54:03 +01:00
[Where]).
2005-04-07 18:56:58 +01:00
'$output_error_message'(permission_error(modify,table,P), _) :-
format(user_error,'% PERMISSION ERROR- cannot table procedure ~w~n',
[P]).
2004-02-13 13:31:44 +00:00
'$output_error_message'(permission_error(module,redefined,Mod), Who) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR ~w- redefining module ~a in a different file~n',
2004-02-13 13:31:44 +00:00
[Who,Mod]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(permission_error(open,source_sink,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot open file ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(output,binary_stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot write to binary stream ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(output,stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot write to ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(output,text_stream,Stream), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot write to text stream ~w~n',
2001-04-09 20:54:03 +01:00
[Where,Stream]).
'$output_error_message'(permission_error(resize,array,P), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot resize array ~w~n',
2001-04-09 20:54:03 +01:00
[Where,P]).
2004-01-23 02:23:51 +00:00
'$output_error_message'(permission_error(unlock,mutex,P), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% PERMISSION ERROR- ~w: cannot unlock mutex ~w~n',
2004-01-23 02:23:51 +00:00
[Where,P]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(representation_error(character), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% REPRESENTATION ERROR- ~w: expected character~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(representation_error(character_code), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% REPRESENTATION ERROR- ~w: expected character code~n',
2001-04-09 20:54:03 +01:00
[Where]).
'$output_error_message'(representation_error(max_arity), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% REPRESENTATION ERROR- ~w: number too big~n',
2001-04-09 20:54:03 +01:00
[Where]).
2007-01-24 14:20:04 +00:00
'$output_error_message'(syntax_error(G,0,Msg,[],0,0), _) :- !,
2005-04-20 21:06:26 +01:00
format(user_error,'% SYNTAX ERROR: ~a',[G,Msg]).
'$output_error_message'(syntax_error(_,_,_,Term,Pos,Start), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% ~w ',[Where]),
2006-01-20 04:35:28 +00:00
'$dump_syntax_error_line'(Start,Pos),
2002-04-11 16:31:58 +01:00
'$dump_syntax_error_term'(10,Pos, Term),
2005-04-20 21:06:26 +01:00
format(user_error,'.~n',[]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(system_error, Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% SYSTEM ERROR- ~w~n',
2001-04-09 20:54:03 +01:00
[Where]).
2005-05-25 22:43:33 +01:00
'$output_error_message'(internal_compiler_error, Where) :-
format(user_error,'% INTERNAL COMPILER ERROR- ~w~n',
[Where]).
2001-05-21 21:00:05 +01:00
'$output_error_message'(system_error(Message), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% SYSTEM ERROR- ~w at ~w]~n',
2001-05-21 21:00:05 +01:00
[Message,Where]).
2001-10-30 16:42:05 +00:00
'$output_error_message'(type_error(T,_,Err,M), _Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected ~w, got ~w~n',
2001-05-07 20:56:02 +01:00
[T,Err,M]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(type_error(array,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected array, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(atom,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected atom, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(atomic,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected atomic, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(byte,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected byte, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(callable,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected callable goal, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
2002-11-26 22:28:32 +00:00
'$output_error_message'(type_error(char,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected char, got ~w~n',
2002-11-26 22:28:32 +00:00
[Where,W]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(type_error(character,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected character, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(character_code,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected character code, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(compound,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected compound, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(db_reference,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected data base reference, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(db_term,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected data base term, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(evaluable,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected evaluable term, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(float,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected float, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(in_byte,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected byte, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(in_character,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected atom character, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(in_character_code,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected character code, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(integer,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected integer, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(key,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected database key, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(leash_mode,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected modes for leash, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(list,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected list, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(number,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected number, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(pointer,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected pointer, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(predicate_indicator,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected predicate indicator, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(type_error(unsigned_byte,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected unsigned byte, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
2002-11-26 22:28:32 +00:00
'$output_error_message'(type_error(unsigned_char,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected unsigned char, got ~w~n',
2002-11-26 22:28:32 +00:00
[Where,W]).
2001-04-09 20:54:03 +01:00
'$output_error_message'(type_error(variable,W), Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% TYPE ERROR- ~w: expected unbound variable, got ~w~n',
2001-04-09 20:54:03 +01:00
[Where,W]).
'$output_error_message'(unknown, Where) :-
2004-07-22 22:32:23 +01:00
format(user_error,'% EXISTENCE ERROR- procedure ~w undefined~n',
2001-04-09 20:54:03 +01:00
[Where]).
2006-04-10 20:24:52 +01:00
'$dump_syntax_error_line'(Position,_) :-
format(user_error,', near line ~d:~n',[Position]).
2002-04-11 16:31:58 +01:00
'$dump_syntax_error_term'(0,J,L) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'~n', []),
2002-04-11 16:31:58 +01:00
'$dump_syntax_error_term'(10,J,L).
'$dump_syntax_error_term'(_,0,L) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,'~n<==== HERE ====>~n', []),
2002-04-11 16:31:58 +01:00
'$dump_syntax_error_term'(10,-1,L).
'$dump_syntax_error_term'(_,_,[]) :- !.
2007-01-24 14:20:04 +00:00
'$dump_syntax_error_term'(I,J,[T-_P|R]) :-
2002-04-11 16:31:58 +01:00
'$dump_error_token'(T),
I1 is I-1,
J1 is J-1,
'$dump_syntax_error_term'(I1,J1,R).
'$dump_error_token'(atom(A)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,' ~a', [A]).
2002-04-11 16:31:58 +01:00
'$dump_error_token'(number(N)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,' ~w', [N]).
2002-04-11 16:31:58 +01:00
'$dump_error_token'(var(_,S,_)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,' ~s ', [S]).
2002-04-11 16:31:58 +01:00
'$dump_error_token'(string(S)) :- !,
2004-07-22 22:32:23 +01:00
format(user_error,' ""~s""', [S]).
2002-09-17 06:55:14 +01:00
'$dump_error_token'('(') :- !,
2004-07-22 22:32:23 +01:00
format(user_error,"(", []).
2002-09-17 06:55:14 +01:00
'$dump_error_token'(')') :- !,
2004-07-22 22:32:23 +01:00
format(user_error," )", []).
2002-09-17 06:55:14 +01:00
'$dump_error_token'(',') :- !,
2004-07-22 22:32:23 +01:00
format(user_error," ,", []).
2002-04-11 16:31:58 +01:00
'$dump_error_token'(A) :-
2004-07-22 22:32:23 +01:00
format(user_error," ~a", [A]).
2002-04-11 16:31:58 +01:00