From 6c7b891ec82b0aa1b4c37764fdb8ee58e0c550d1 Mon Sep 17 00:00:00 2001 From: vsc Date: Mon, 22 Nov 2004 16:22:14 +0000 Subject: [PATCH] previous fixes would not work for ! (eg, call((!,X=2;X=3))). git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1183 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- pl/boot.yap | 22 ++++++++++++++++++++++ pl/init.yap | 6 ------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/pl/boot.yap b/pl/boot.yap index ddcfcd830..da5596308 100644 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -611,6 +611,28 @@ incore(G) :- '$execute'(G). '$save_current_choice_point'(CP), '$call'(G, CP, G, M). + +','(X,Y) :- + '$save_current_choice_point'(CP), + '$current_module'(M), + '$call'(X,CP,G0,M), + '$call'(Y,CP,G0,M). +';'(X,Y) :- + '$save_current_choice_point'(CP), + '$current_module'(M), + ( '$call'(X,CP,G0,M) ; '$call'(Y,CP,G0,M) ). +'|'(X,Y) :- + '$save_current_choice_point'(CP), + '$current_module'(M), + ( '$call'(X,CP,G0,M) ; '$call'(Y,CP,G0,M) ). +'|'(X,Y) :- + '$save_current_choice_point'(CP), + '$current_module'(M), + ( '$call'(X,CP,G0,M) -> '$call'(Y,CP,G0,M) ). +\+(G) :- \+ '$execute'(G). +not(G) :- \+ '$execute'(G). + + % % do it in ISO mode. % diff --git a/pl/init.yap b/pl/init.yap index d47b8b076..5ae802536 100644 --- a/pl/init.yap +++ b/pl/init.yap @@ -27,12 +27,6 @@ false :- fail. (:- G) :- '$execute'(G), !. '$$!'(CP) :- '$cut_by'(CP). [] :- true. -','(A,B) :- '$execute'(A), '$execute'(B). -';'(A,B) :- ('$execute'(A) ; '$execute'(B)). -'|'(A,B) :- ('$execute'(A) ; '$execute'(B)). -'->'(A,B) :- ('$execute'(A) -> '$execute'(B)). -\+(G) :- \+ '$execute'(G). -not(G) :- \+ '$execute'(G). :- set_value('$doindex',true).