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
This commit is contained in:
vsc 2004-11-22 16:22:14 +00:00
parent 1c681ebd9b
commit 6c7b891ec8
2 changed files with 22 additions and 6 deletions

View File

@ -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.
%

View File

@ -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).