debugging
This commit is contained in:
parent
847edfd432
commit
f7ed109d1c
@ -1592,6 +1592,7 @@ void Yap_InitCPreds(void) {
|
|||||||
Yap_udi_init();
|
Yap_udi_init();
|
||||||
Yap_udi_Interval_init();
|
Yap_udi_Interval_init();
|
||||||
Yap_InitSignalCPreds();
|
Yap_InitSignalCPreds();
|
||||||
|
Yap_InitTermCPreds();
|
||||||
Yap_InitUserCPreds();
|
Yap_InitUserCPreds();
|
||||||
Yap_InitUtilCPreds();
|
Yap_InitUtilCPreds();
|
||||||
Yap_InitSortPreds();
|
Yap_InitSortPreds();
|
||||||
|
2769
C/utilpreds.c
2769
C/utilpreds.c
File diff suppressed because it is too large
Load Diff
@ -409,9 +409,7 @@ ${CMAKE_SOURCE_DIR}/OPTYap
|
|||||||
${CMAKE_SOURCE_DIR}/utf8proc
|
${CMAKE_SOURCE_DIR}/utf8proc
|
||||||
${CMAKE_SOURCE_DIR}/JIT/HPP
|
${CMAKE_SOURCE_DIR}/JIT/HPP
|
||||||
${GMP_INCLUDE_DIRS}
|
${GMP_INCLUDE_DIRS}
|
||||||
${READLINE_LIBRARIES}
|
${READLINE_INCLUDE_DIR}
|
||||||
${SQLITE_LIBRARIES}
|
|
||||||
${ANDROID_LIBRARIES}
|
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
|||||||
*/
|
*/
|
||||||
YAP_FLAG(DEBUG_FLAG, "debug", true, booleanFlag, "false", NULL),
|
YAP_FLAG(DEBUG_FLAG, "debug", true, booleanFlag, "false", NULL),
|
||||||
|
|
||||||
// YAP_FLAG(DEBUG_INFO_FLAG, "debug_info", true, booleanFlag, "true", NULL),
|
YAP_FLAG(DEBUG_INFO_FLAG, "debug_info", true, booleanFlag, "true", NULL),
|
||||||
/**<
|
/**<
|
||||||
|
|
||||||
Says whether to call the debUgger on an exception. False in YAP..
|
Says whether to call the debUgger on an exception. False in YAP..
|
||||||
|
@ -65,6 +65,7 @@ set (ENGINE_SOURCES
|
|||||||
C/tracer.c
|
C/tracer.c
|
||||||
C/unify.c
|
C/unify.c
|
||||||
C/userpreds.c
|
C/userpreds.c
|
||||||
|
C/terms.c
|
||||||
C/utilpreds.c
|
C/utilpreds.c
|
||||||
C/yap-args.c
|
C/yap-args.c
|
||||||
C/write.c
|
C/write.c
|
||||||
|
22
pl/boot.yap
22
pl/boot.yap
@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @pred system_module( +_Mod_, +_ListOfPublicPredicates, +ListOfPrivatePredicates *
|
* @pred system_module( _Mod_, _ListOfPublicPredicates, ListOfPrivatePredicates *
|
||||||
* Define a system module _Mod_. _ListOfPublicPredicates_ . Currentlt, all
|
* Define a system module _Mod_. _ListOfPublicPredicates_ . Currentlt, all
|
||||||
* predicates are in the 'prolog' module. The first
|
* predicates are in the 'prolog' module. The first
|
||||||
* are visible outside the Prolog module, all others are hidden at the end of booting.
|
* are visible outside the Prolog module, all others are hidden at the end of booting.
|
||||||
@ -37,21 +37,26 @@
|
|||||||
*/
|
*/
|
||||||
system_module(Mod, SysExps) :-
|
system_module(Mod, SysExps) :-
|
||||||
system_module(Mod, SysExps, []).
|
system_module(Mod, SysExps, []).
|
||||||
|
|
||||||
|
|
||||||
|
use_system_module(_Module, _SysExps).
|
||||||
|
|
||||||
system_module(_Mod, SysExps, _Decls) :-
|
system_module(_Mod, SysExps, _Decls) :-
|
||||||
|
% '$new_system_predicates'(SysExps),
|
||||||
|
fail.
|
||||||
|
system_module(_Mod, _SysExps, _Decls) :-
|
||||||
(
|
(
|
||||||
'$new_system_predicates'(SysExps),
|
|
||||||
fail
|
|
||||||
;
|
|
||||||
stream_property(loop_stream,file_name(File))
|
stream_property(loop_stream,file_name(File))
|
||||||
->
|
->
|
||||||
recordz(system_file, File, _ )
|
recordz(system_file, File, _ )
|
||||||
;
|
;
|
||||||
recordz(system_file, loop_stream, _ )
|
recordz(system_file, loop_stream, _ )
|
||||||
).
|
).
|
||||||
|
|
||||||
|
private(_).
|
||||||
|
|
||||||
'$new_system_predicates'([P|_Ps]) :-
|
'$new_system_predicates'([]).
|
||||||
functor(P, N, Ar),
|
'$new_system_predicates'([N/Ar|_Ps]) :-
|
||||||
'$new_system_predicate'(N, Ar, prolog).
|
'$new_system_predicate'(N, Ar, prolog).
|
||||||
'$new_system_predicates'([_P|Ps]) :-
|
'$new_system_predicates'([_P|Ps]) :-
|
||||||
'$new_system_predicates'(Ps).
|
'$new_system_predicates'(Ps).
|
||||||
@ -77,9 +82,6 @@ system_module(_Mod, SysExps, _Decls) :-
|
|||||||
|
|
||||||
% be careful here not to generate an undefined exception..
|
% be careful here not to generate an undefined exception..
|
||||||
|
|
||||||
use_system_module(_,_).
|
|
||||||
private(_).
|
|
||||||
|
|
||||||
print_message(L,E) :-
|
print_message(L,E) :-
|
||||||
(L = informational
|
(L = informational
|
||||||
->
|
->
|
||||||
@ -247,7 +249,7 @@ initialize_prolog :-
|
|||||||
:- c_compile( 'preds.yap' ).
|
:- c_compile( 'preds.yap' ).
|
||||||
:- c_compile( 'modules.yap' ).
|
:- c_compile( 'modules.yap' ).
|
||||||
:- c_compile( 'grammar.yap' ).
|
:- c_compile( 'grammar.yap' ).
|
||||||
:- c_compile( 'protect.yap' ).
|
%:- c_compile( 'protect.yap' ).
|
||||||
|
|
||||||
:- ['absf.yap'].
|
:- ['absf.yap'].
|
||||||
|
|
||||||
|
@ -97,9 +97,10 @@
|
|||||||
set_prolog_flag(debug, false),
|
set_prolog_flag(debug, false),
|
||||||
% simple trick to find out if this is we are booting from Prolog.
|
% simple trick to find out if this is we are booting from Prolog.
|
||||||
% boot from a saved state
|
% boot from a saved state
|
||||||
'$init_from_saved_state_and_args', %start_low_level_trace,
|
writeln(ok),
|
||||||
|
'$init_from_saved_state_and_args', %start_low_level_trace,
|
||||||
|
|
||||||
'$db_clean_queues'(0),
|
'$db_clean_queues'(_),
|
||||||
% this must be executed from C-code.
|
% this must be executed from C-code.
|
||||||
% '$startup_saved_state',
|
% '$startup_saved_state',
|
||||||
set_input(user_input),
|
set_input(user_input),
|
||||||
@ -186,7 +187,7 @@
|
|||||||
get_value('$consult_on_boot',X), X \= [],
|
get_value('$consult_on_boot',X), X \= [],
|
||||||
set_value('$consult_on_boot',[]),
|
set_value('$consult_on_boot',[]),
|
||||||
'$do_startup_reconsult'(X),
|
'$do_startup_reconsult'(X),
|
||||||
fail.
|
!.
|
||||||
'$init_from_saved_state_and_args' :-
|
'$init_from_saved_state_and_args' :-
|
||||||
recorded('$restore_flag', init_file(M:B), R),
|
recorded('$restore_flag', init_file(M:B), R),
|
||||||
erase(R),
|
erase(R),
|
||||||
|
@ -82,8 +82,8 @@ Saves an image of the current state of the YAP database in file
|
|||||||
trying goal _G_.
|
trying goal _G_.
|
||||||
**/
|
**/
|
||||||
qsave_program(File) :-
|
qsave_program(File) :-
|
||||||
'$save_program_status'([], qsave_program(File)),
|
'$save_program_status'([], qsave_program(File)),
|
||||||
open(File, write, S, [type(binary)]),
|
open(File, write, S, [type(binary)]),
|
||||||
'$qsave_program'(S),
|
'$qsave_program'(S),
|
||||||
close(S).
|
close(S).
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user