consult of dynamic predicates was working as reconsult

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@166 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2001-09-27 14:01:16 +00:00
parent 2eb822797e
commit c3aa27e76b
3 changed files with 9 additions and 4 deletions

View File

@ -16,6 +16,8 @@
<h2>Yap-4.3.20:</h2>
<ul>
<li>FIXED: consult should not erase dynamic clauses (report
from James Cussens).</li>
<li>FIXED: check if we still can do garbage collection (MBIT
and RBIT ok) (report from James Cussens).</li>
<li>FIXED: always release stack after InitBigNum (report from

View File

@ -300,7 +300,7 @@ repeat :- '$repeat'.
'$go_compile_clause'(G,V,5),
fail.
'$continue_with_command'(consult,V,G) :-
'$go_compile_clause'(G,V,5),
'$go_compile_clause'(G,V,13),
fail.
'$continue_with_command'(top,V,G) :-
'$query'(G,V).
@ -328,7 +328,7 @@ repeat :- '$repeat'.
'$check_term'(G,V) ; true ),
'$precompile_term'(G, G0, G1).
% proccess an input clause
% process an input clause
'$$compile'(G,G0,L) :-
'$head_and_body'(G,H,_),
'$inform_of_clause'(H,L),

View File

@ -174,13 +174,16 @@ assertz_static(C) :-
'$assertz_dynamic'(X,C,C0) :- (X/\4)=:=0, !,
'$head_and_body'(C,H,B),
'$assertat_d'(last,H,B,C0,_).
'$assertz_dynamic'(_,C,C0) :-
'$assertz_dynamic'(X,C,C0) :-
'$head_and_body'(C,H,B), functor(H,N,A),
( '$check_if_reconsulted'(N,A) ->
('$check_if_reconsulted'(N,A) ->
true
;
(X/\8)=:=0 ->
'$inform_as_reconsulted'(N,A),
'$remove_all_d_clauses'(H)
;
true
),
'$assertat_d'(last,H,B,C0,_).