From c7995f276c3b393fa6546ba2ff9fd2447c5fc175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Fri, 20 Apr 2018 14:59:17 +0100 Subject: [PATCH] docs --- C/exec.c | 26 ++++++- H/YapFlags.h | 2 +- H/YapLFlagInfo.h | 4 +- docs/CMakeLists.txt | 3 +- docs/Doxyfile | 2 +- docs/checkpl.yap | 65 +++++++++++++++++ docs/md/yap.md | 2 +- docs/{my.yap => my.xxx} | 0 docs/{yapdocs.yap => yapdocs.xxx} | 0 packages/raptor/doc/Doxyfile | 2 +- pl/arrays.yap | 7 +- pl/debug.yap | 112 +++++++++++++++++++++--------- pl/flags.yap | 4 +- pl/top.yap | 5 +- 14 files changed, 186 insertions(+), 48 deletions(-) create mode 100644 docs/checkpl.yap rename docs/{my.yap => my.xxx} (100%) rename docs/{yapdocs.yap => yapdocs.xxx} (100%) diff --git a/C/exec.c b/C/exec.c index 00ab8ddda..0500d6857 100755 --- a/C/exec.c +++ b/C/exec.c @@ -1233,8 +1233,15 @@ static Int creep_step(USES_REGS1) { /* '$execute_nonstop'(Goal,Mod) return rc; } -static Int execute_nonstop(USES_REGS1) { /* '$execute_nonstop'(Goal,Mod) - */ + +/** + * @brief Two argument version of non-interruptible execution: this will + * ignore signals including debugging requests. + * + * @return Int succeeds if it can transfer control. + */ + +static Int execute_nonstop(USES_REGS1) { Term t = Deref(ARG1); Term mod = Deref(ARG2); unsigned int arity; @@ -1309,6 +1316,20 @@ static Int execute_nonstop(USES_REGS1) { /* '$execute_nonstop'(Goal,Mod) } } + +/** + * @brief One argument version of non-interruptible execution: this will + * ignore signals including debugging requests. + * + * @return Int succeeds if it can transfer control. + */ +static Int execute_nonstop1(USES_REGS1) +{ + ARG2 = CurrentModule; +return execute_nonstop( PASS_REGS1 ); +} + + static Int execute_0(USES_REGS1) { /* '$execute_0'(Goal) */ Term mod = CurrentModule; Term t = Yap_YapStripModule(Deref(ARG1), &mod); @@ -2233,6 +2254,7 @@ void Yap_InitExecFs(void) { #endif Yap_InitCPred("$execute0", 2, execute0, NoTracePredFlag); Yap_InitCPred("$execute_nonstop", 2, execute_nonstop, NoTracePredFlag); + Yap_InitCPred("$execute_nonstop", 1, execute_nonstop1, NoTracePredFlag); Yap_InitCPred("$creep_step", 2, creep_step, NoTracePredFlag); Yap_InitCPred("$execute_clause", 4, execute_clause, NoTracePredFlag); Yap_InitCPred("$current_choice_point", 1, current_choice_point, 0); diff --git a/H/YapFlags.h b/H/YapFlags.h index aaff6428f..88e6ddab3 100644 --- a/H/YapFlags.h +++ b/H/YapFlags.h @@ -17,7 +17,7 @@ /** @file YapFlags.h - @addtogroup Flags + @addtogroup YAPFlags */ #ifndef YAP_FLAGS_H diff --git a/H/YapLFlagInfo.h b/H/YapLFlagInfo.h index 7acb70172..da6bcda8b 100644 --- a/H/YapLFlagInfo.h +++ b/H/YapLFlagInfo.h @@ -18,10 +18,12 @@ /** @file YapLFlagInfo.h - @addtogroup Flags + @addtogroup YAPFlags */ +/** + `autoload`: set the system to look for undefined procedures */ YAP_FLAG( AUTOLOAD_FLAG, "autoload", true, booleanFlag, "false" , NULL ), +/** + `read-only flag, that tells if Prolog is in an inner top-level */ YAP_FLAG( BREAK_LEVEL_FLAG, "break_level", true, nat, "0" , NULL ), YAP_FLAG( CALL_COUNTING_FLAG, "call_counting", true, booleanFlag, "true" , NULL ), /** + `call_counting` diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 765680d56..17c5c8012 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -33,6 +33,8 @@ SET (CMAKE_HTML_EXTRA_ endforeach(i ${CMAKE_HTML_EXTRA_}) set(DOCS_EXCLUDE_ +${CMAKE_SOURCE_DIR}/build +${CMAKE_SOURCE_DIR}/Debug ${CMAKE_SOURCE_DIR}/packages/jpl ${CMAKE_SOURCE_DIR}/packages/swig ${CMAKE_SOURCE_DIR}/packages/myddas/sqlite3/src @@ -47,7 +49,6 @@ ${CMAKE_SOURCE_DIR}/packages/gecode/3.7.0 ${CMAKE_SOURCE_DIR}/packages/gecode/3.6.0 ${CMAKE_SOURCE_DIR}/packages/gecode/dev ${CMAKE_SOURCE_DIR}/C/traced_absmi_insts.h -${CMAKE_SOURCE_DIR}/H/locals.h ${CMAKE_SOURCE_DIR}/H/globals.h ${CMAKE_SOURCE_DIR}/packages/cplint ${CMAKE_SOURCE_DIR}/packages/CLPBN/examples diff --git a/docs/Doxyfile b/docs/Doxyfile index 35b3be2dc..b06c8b843 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -816,7 +816,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = /home/vsc/github/yap-6.3/packages/jpl /home/vsc/github/yap-6.3/packages/swig /home/vsc/github/yap-6.3/packages/myddas/sqlite3/src /home/vsc/github/yap-6.3/packages/gecode/4.4.0 /home/vsc/github/yap-6.3/packages/gecode/4.2.1 /home/vsc/github/yap-6.3/packages/gecode/4.2.0 /home/vsc/github/yap-6.3/packages/gecode/4.0.0 /home/vsc/github/yap-6.3/packages/gecode/3.7.3 /home/vsc/github/yap-6.3/packages/gecode/3.7.2 /home/vsc/github/yap-6.3/packages/gecode/3.7.1 /home/vsc/github/yap-6.3/packages/gecode/3.7.0 /home/vsc/github/yap-6.3/packages/gecode/3.6.0 /home/vsc/github/yap-6.3/packages/gecode/dev /home/vsc/github/yap-6.3/C/traced_absmi_insts.h /home/vsc/github/yap-6.3/H/locals.h /home/vsc/github/yap-6.3/H/globals.h /home/vsc/github/yap-6.3/packages/cplint /home/vsc/github/yap-6.3/packages/CLPBN/examples /home/vsc/github/yap-6.3/packages/CLPBN/horus /home/vsc/github/yap-6.3/packages/prosqlite /home/vsc/github/yap-6.3/packages/pyswip /home/vsc/github/yap-6.3/packages/yap-lbfgs/liblbfgs-1.10 /home/vsc/github/yap-6.3/library/dialect/swi/os /home/vsc/github/yap-6.3/packages/gecode/gecode3_yap.cc /home/vsc/github/yap-6.3/packages/gecode/gecode4_yap.cc /home/vsc/github/yap-6.3/packages/gecode/gecode3.yap /home/vsc/github/yap-6.3/packages/gecode/gecode4.yap /home/vsc/github/yap-6.3/packages/gecode/gecode3_yap_hand_written.yap /home/vsc/github/yap-6.3/packages/gecode/gecode4_yap_hand_written.yap */CMakeFiles/* *~ */ +EXCLUDE = /home/vsc/github/yap-6.3/build /home/vsc/github/yap-6.3/Debug /home/vsc/github/yap-6.3/packages/jpl /home/vsc/github/yap-6.3/packages/swig /home/vsc/github/yap-6.3/packages/myddas/sqlite3/src /home/vsc/github/yap-6.3/packages/gecode/4.4.0 /home/vsc/github/yap-6.3/packages/gecode/4.2.1 /home/vsc/github/yap-6.3/packages/gecode/4.2.0 /home/vsc/github/yap-6.3/packages/gecode/4.0.0 /home/vsc/github/yap-6.3/packages/gecode/3.7.3 /home/vsc/github/yap-6.3/packages/gecode/3.7.2 /home/vsc/github/yap-6.3/packages/gecode/3.7.1 /home/vsc/github/yap-6.3/packages/gecode/3.7.0 /home/vsc/github/yap-6.3/packages/gecode/3.6.0 /home/vsc/github/yap-6.3/packages/gecode/dev /home/vsc/github/yap-6.3/C/traced_absmi_insts.h /home/vsc/github/yap-6.3/H/globals.h /home/vsc/github/yap-6.3/packages/cplint /home/vsc/github/yap-6.3/packages/CLPBN/examples /home/vsc/github/yap-6.3/packages/CLPBN/horus /home/vsc/github/yap-6.3/packages/prosqlite /home/vsc/github/yap-6.3/packages/pyswip /home/vsc/github/yap-6.3/packages/yap-lbfgs/liblbfgs-1.10 /home/vsc/github/yap-6.3/library/dialect/swi/os /home/vsc/github/yap-6.3/packages/gecode/gecode3_yap.cc /home/vsc/github/yap-6.3/packages/gecode/gecode4_yap.cc /home/vsc/github/yap-6.3/packages/gecode/gecode3.yap /home/vsc/github/yap-6.3/packages/gecode/gecode4.yap /home/vsc/github/yap-6.3/packages/gecode/gecode3_yap_hand_written.yap /home/vsc/github/yap-6.3/packages/gecode/gecode4_yap_hand_written.yap */CMakeFiles/* *~ */ # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded diff --git a/docs/checkpl.yap b/docs/checkpl.yap new file mode 100644 index 000000000..a07a1aa5d --- /dev/null +++ b/docs/checkpl.yap @@ -0,0 +1,65 @@ + +:- use_module(library(lists)). +:- use_module(library(lineutils)). + +:- initialization(main). + +main :- + %system('find . \( -name '*.pl' -o -name '*.yap' -o -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hh' \) -type f -print | xargs grep '@defgroup\|@ingroup\|@addtogroup\|@{|@}'). + + file_filter_with_start_end( docs, tmp, add2graph, initgraph, checkgraph). + +initgraph(_,_). + +:- dynamic node/3, edge/3, e_b_n/3. + +checkgraph(_,_) :- + e_b_n(F,KN,_C), + node(KF,KN,_), + add_edge(KF, F, KN), + fail. +checkgraph(_,_) :- + listing(node), + listing(edge). + + + add2graph(Line, _Out) :- + split( Line, "% \t/*:", [File, Job, Name|_]), + append( _, L, Line), + append(Name, R, L), + dispatch( Name, File, Job, R). + +dispatch( Name, File, "defgroup", Comment):- + atom_codes(KN, Name), + atom_codes(KF, File), + atom_codes(C, Comment), + add_node(KF, KN,C). +dispatch( Name, File, "addtogroup", Comment):- + atom_codes(KN, Name), + atom_codes(KF, File), + atom_codes(C, Comment), + add_node_edge(KF, KN,C). +dispatch( Name, File, "ingroup", Comment):- + atom_codes(KN, Name), + atom_codes(KF, File), + atom_codes(C, Comment), + add_edge(KF, KN,C). +add_node(F, K,_C) :- + node(_,K,_), + throw( repeat(F:K) ). +add_node(F, K,C) :- + assert(node(F,K,C)). + + add_node_edge(F, K,_C) :- + node(F1,K,_), + !, + assert(edge(F1,F,K)). + add_node_edge(F, K,C) :- + assert(node(F,K,C)). + + add_edge(F, K,_C) :- + node(F1,K,_), + !, + assert(edge(F1,F,K)). + add_edge(F, K,C) :- + assert(e_b_n(F,K,C)). diff --git a/docs/md/yap.md b/docs/md/yap.md index 894b0a0bb..b2aeb8d43 100644 --- a/docs/md/yap.md +++ b/docs/md/yap.md @@ -17,7 +17,7 @@ Porto. The manual is organised as follows: -+ @subpage install ++ @subpage INSTALL + @subpage run diff --git a/docs/my.yap b/docs/my.xxx similarity index 100% rename from docs/my.yap rename to docs/my.xxx diff --git a/docs/yapdocs.yap b/docs/yapdocs.xxx similarity index 100% rename from docs/yapdocs.yap rename to docs/yapdocs.xxx diff --git a/packages/raptor/doc/Doxyfile b/packages/raptor/doc/Doxyfile index 651e67e6e..140da6681 100644 --- a/packages/raptor/doc/Doxyfile +++ b/packages/raptor/doc/Doxyfile @@ -816,7 +816,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = /home/vsc/github/yap-6.3/packages/jpl /home/vsc/github/yap-6.3/packages/swig /home/vsc/github/yap-6.3/packages/myddas/sqlite3/src /home/vsc/github/yap-6.3/packages/gecode/4.4.0 /home/vsc/github/yap-6.3/packages/gecode/4.2.1 /home/vsc/github/yap-6.3/packages/gecode/4.2.0 /home/vsc/github/yap-6.3/packages/gecode/4.0.0 /home/vsc/github/yap-6.3/packages/gecode/3.7.3 /home/vsc/github/yap-6.3/packages/gecode/3.7.2 /home/vsc/github/yap-6.3/packages/gecode/3.7.1 /home/vsc/github/yap-6.3/packages/gecode/3.7.0 /home/vsc/github/yap-6.3/packages/gecode/3.6.0 /home/vsc/github/yap-6.3/packages/gecode/dev /home/vsc/github/yap-6.3/C/traced_absmi_insts.h /home/vsc/github/yap-6.3/H/locals.h /home/vsc/github/yap-6.3/H/globals.h /home/vsc/github/yap-6.3/packages/cplint /home/vsc/github/yap-6.3/packages/CLPBN/examples /home/vsc/github/yap-6.3/packages/CLPBN/horus /home/vsc/github/yap-6.3/packages/prosqlite /home/vsc/github/yap-6.3/packages/pyswip /home/vsc/github/yap-6.3/packages/yap-lbfgs/liblbfgs-1.10 /home/vsc/github/yap-6.3/library/dialect/swi/os /home/vsc/github/yap-6.3/packages/gecode/gecode3_yap.cc /home/vsc/github/yap-6.3/packages/gecode/gecode4_yap.cc /home/vsc/github/yap-6.3/packages/gecode/gecode3.yap /home/vsc/github/yap-6.3/packages/gecode/gecode4.yap /home/vsc/github/yap-6.3/packages/gecode/gecode3_yap_hand_written.yap /home/vsc/github/yap-6.3/packages/gecode/gecode4_yap_hand_written.yap */CMakeFiles/* *~ */ +EXCLUDE = /home/vsc/github/yap-6.3/build /home/vsc/github/yap-6.3/Debug /home/vsc/github/yap-6.3/packages/jpl /home/vsc/github/yap-6.3/packages/swig /home/vsc/github/yap-6.3/packages/myddas/sqlite3/src /home/vsc/github/yap-6.3/packages/gecode/4.4.0 /home/vsc/github/yap-6.3/packages/gecode/4.2.1 /home/vsc/github/yap-6.3/packages/gecode/4.2.0 /home/vsc/github/yap-6.3/packages/gecode/4.0.0 /home/vsc/github/yap-6.3/packages/gecode/3.7.3 /home/vsc/github/yap-6.3/packages/gecode/3.7.2 /home/vsc/github/yap-6.3/packages/gecode/3.7.1 /home/vsc/github/yap-6.3/packages/gecode/3.7.0 /home/vsc/github/yap-6.3/packages/gecode/3.6.0 /home/vsc/github/yap-6.3/packages/gecode/dev /home/vsc/github/yap-6.3/C/traced_absmi_insts.h /home/vsc/github/yap-6.3/H/globals.h /home/vsc/github/yap-6.3/packages/cplint /home/vsc/github/yap-6.3/packages/CLPBN/examples /home/vsc/github/yap-6.3/packages/CLPBN/horus /home/vsc/github/yap-6.3/packages/prosqlite /home/vsc/github/yap-6.3/packages/pyswip /home/vsc/github/yap-6.3/packages/yap-lbfgs/liblbfgs-1.10 /home/vsc/github/yap-6.3/library/dialect/swi/os /home/vsc/github/yap-6.3/packages/gecode/gecode3_yap.cc /home/vsc/github/yap-6.3/packages/gecode/gecode4_yap.cc /home/vsc/github/yap-6.3/packages/gecode/gecode3.yap /home/vsc/github/yap-6.3/packages/gecode/gecode4.yap /home/vsc/github/yap-6.3/packages/gecode/gecode3_yap_hand_written.yap /home/vsc/github/yap-6.3/packages/gecode/gecode4_yap_hand_written.yap */CMakeFiles/* *~ */ # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded diff --git a/pl/arrays.yap b/pl/arrays.yap index 54c1be381..d14d6ed3c 100644 --- a/pl/arrays.yap +++ b/pl/arrays.yap @@ -15,10 +15,13 @@ * * *************************************************************************/ -%% @{ - /** + +@file arrays.yap + @addtogroup YAPArrays + +@{ */ % % These are the array built-in predicates. They will only work if diff --git a/pl/debug.yap b/pl/debug.yap index d7ae4a411..eeedbbfc5 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -284,28 +284,30 @@ be lost. /** * @pred $trace( +Goal ) * + * This launches a goal from the debugger with the call. It must: + * - disable user interaction; + * - verify whether debugging is still ok; + * - enter the debugger core. + * The top gated_call should set up creeping for the next call. * - * @param _Goal_ is the goal to be examined. + * @param _Mod_:_Goal_ is the goal to be examined. * @return `call(Goal)` */ -% handle suspended goals -% take care with hidden goals. -% -% $trace may be called from user code, so be careful. '$trace'([Mod|G]) :- - '$stop_creeping'(_), + '$stop_creeping'(_), current_prolog_flag(debug, false), !, '$execute_nonstop'(G,Mod). '$trace'([Mod|G]) :- CP is '$last_choice_pt', gated_call( - '$debugger_input', - '$trace_query'(G, Mod, CP, not_expanded), - E, - '$continue_debugging'(E) + '$debugger_input', + '$trace_query'(G, Mod, CP, not_expanded), + E, + '$continue_debugging'(E) ). + '$continue_debugging'(_) :- !, current_prolog_flag(debug, false). '$continue_debugging'(exit) :- !, '$creep'. @@ -361,10 +363,12 @@ be lost. /** * @pred debugger_input. - * name of stream used for debugging, - * must be always connected to a tty. * - * '$debugger_input': try to connect the debugger to an open terminal. + * set up the stream used for debugging, + * - must be interactive. + * - default is `user_input`, but /dev/tty and CONIN$ can be used directly if + * user_input is bound to a file. + * */ '$debugger_input' :- stream_property(_,alias(debugger_input)), @@ -388,10 +392,13 @@ be lost. %% @pred '$trace_query'( +G, +M, +CP, +Expanded) % -%% debug a complex query - +% debug a complex query +% +'$trace_query'(V, M, CP, _) :- + '$creep', + !, + '$call'(V,M,V,CP). '$trace_query'(V, M, CP, _) :- - '$stop_creeping'(_), var(V), !, '$trace_query'(call(V), M, CP, _). '$trace_query'(!, _, CP, _) :- @@ -459,7 +466,7 @@ be lost. %% @pred $trace_goal( +Goal, +Module, +CallId, +CallInfo) %% -%% Actually debugs a +%% Actuallb sy debugs a %% goal! '$trace_goal'(G, M, GoalNumber, _H) :- ( @@ -490,18 +497,18 @@ be lost. '$debugger_expand_meta_call'(M:G, [], G1), strip_module(G1, MF, NG), gated_call( - '$enter_trace'(GoalNumber, G, M, H, _What), + '$enter_trace'(GoalNumber, G, M, H), '$execute_nonstop'(NG,MF), Port, '$trace_port'(Port, GoalNumber, G, M, true, H) ). % system_ '$trace_goal'(G, M, GoalNumber, H) :- - ( - '$is_opaque_predicate'(G, M) - ; - 'strip_module'(M:G, prolog, _NG) - ), + ( + '$is_opaque_predicate'(G, M) + ; + 'strip_module'(M:G, prolog, _NG) + ), !, gated_call( '$enter_trace'(GoalNumber, G, M, H), @@ -510,12 +517,24 @@ be lost. '$trace_port'(Port, GoalNumber, G, M, true, H) ). '$trace_goal'(G, M, GoalNumber, H) :- - gated_call( - '$enter_trace'(GoalNumber, G, M, H), - '$debug'( GoalNumber, G, M, H), - Port, - '$trace_port'(Port, GoalNumber, G, M, true, H) - ). + gated_call( + '$enter_trace'(GoalNumber, G, M, H), + '$debug'( GoalNumber, G, M, H), + Port, + '$trace_port'(Port, GoalNumber, G, M, true, H) + ). + + +/** + * @pred '$enter_trace'(+L, 0:G, +Module, +Info) + * + * call goal: prelims + * + * @parameter _Module_:_G_ + * @parameter _L_ is the list of active goals + * @parameter _Info_ describes the goal + * + */ '$enter_trace'(L, G, Module, Info) :- /* get goal no. */ ( var(L) -> @@ -543,6 +562,19 @@ be lost. /* and save it globaly */ '__NB_setval__'('$spy_gn',L1). +/** + * @pred '$enter_trace'(+L, 0:G, +Module, +Info) + * + * call goal: setup the diferrent cases + * - zip, just run through + * - source, call an interpreter + * - compiled code: try black magic. + * + * @parameter _Module_:_G_ + * @parameter _GoalNumber_ identifies the active goal + * @parameter _Info_ describes the goal + * + */ '$debug'(_, G, M, _H) :- '__NB_getval__'('$debug_status',state(zip,_Border,_), fail), !, @@ -555,12 +587,24 @@ be lost. '$creep_step'(GoalNumber, G, M, Info). - +/** + * @pred '$trace_go'(+L, 0:G, +Module, +Info) + * + * It needs to run in two separate steps: + * 1. Select a clause; + * 2. Debug it. + * We use a marker to track who we are in gated_call. + * + * @parameter _Module_:_G_ + * @parameter _GoalNumber_ identifies the active goal + * @parameter _Info_ describes the goal + * + */ '$trace_go'(GoalNumber, G, M, Info) :- - X=marker(_,M,G), + X=marker(_,M,G), CP is '$last_choice_pt', clause(M:G, Cl, _), - '$retry_clause'(GoalNumber, G, M, Info, X), + '$retry_clause'(GoalNumber, G, M, Info, X), '$trace_query'(Cl, M, CP, expanded). '$creep_step'(GoalNumber, G, M, Info) :- @@ -592,7 +636,7 @@ be lost. GoalNumber =< G0, !, fail. -'$re_trace_query'(forward(redo,G0), G, M, GoalNumber, H) :- + '$re_trace_query'(forward(redo,G0), G, M, GoalNumber, H) :- GoalNumber > G0, !, catch( @@ -638,7 +682,7 @@ be lost. '$TraceError'(forward(redo,_G0), _, _, _, _). %%% - backtrack long distance '$TraceError'(forward(fail,_G0),GoalNumber, _, _, _) :- !, - throw(error(fail(GoalNumber))). + throw(debugger(fail,GoalNumber)). %%% %%% - forward through the debugger '$TraceError'(forward('$wrapper',Event), _, _, _, _) :- diff --git a/pl/flags.yap b/pl/flags.yap index 6ec93294e..298666c4f 100644 --- a/pl/flags.yap +++ b/pl/flags.yap @@ -17,8 +17,8 @@ /** * @file flagd.ysp * - * @defgroup Flags Yap Flags - * @{} + * @defgroup YAPFlags Yap Flags + * * @ingroup builtins * */ diff --git a/pl/top.yap b/pl/top.yap index 87ab54131..e79aea434 100644 --- a/pl/top.yap +++ b/pl/top.yap @@ -670,6 +670,7 @@ write_query_answer( Bindings ) :- ; '$call'(Z,CP,G0,M) ). + '$call'((X*->Y| Z),CP,G0,M) :- !, ( '$current_choice_point'(DCP), @@ -831,7 +832,7 @@ gated_call(Setup, Goal, Catcher, Cleanup) :- Task0 = cleanup( All, Catcher, Cleanup, Tag, true, CP0), TaskF = cleanup( All, Catcher, Cleanup, Tag, false, CP0), '$tag_cleanup'(CP0, Task0), - '$execute'( Goal ), + '$execute_nonstop'( Goal ), '$cleanup_on_exit'(CP0, TaskF). @@ -965,7 +966,7 @@ catch(G, C, A) :- ). '$catch'(_,C,A) :- '$get_exception'(C0), - ( C = C0 -> '$execute'(A) ; throw(C0) ). + ( C = C0 -> '$execute_nonstop'(A, prolog) ; throw(C0) ). % variable throws are user-handled. '$run_catch'(G,E) :-