|
From: Vitor S. C. <vs...@us...> - 2001-06-12 16:16:01
|
Update of /cvsroot/yap/pl In directory usw-pr-cvs1:/tmp/cvs-serv4780/pl Modified Files: preds.yap Log Message: bug in abolish Index: preds.yap =================================================================== RCS file: /cvsroot/yap/pl/preds.yap,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- preds.yap 2001/06/11 20:23:57 1.4 +++ preds.yap 2001/06/12 16:15:58 1.5 @@ -382,14 +382,21 @@ \+ atom(M), !, throw(error(type_error(atom,Na), Msg)). -'$old_abolish'(V) :- - '$abolish_all'. +'$old_abolish'(V) :- var(V), !, + '$abolish_all_old'. '$old_abolish'(M:N) :- !, '$mod_switch'(M,'$old_abolish'(N)). '$old_abolish'([]) :- !. '$old_abolish'([H|T]) :- !, abolish(H), abolish(T). '$old_abolish'(N/A) :- abolish(N,A). +'$abolish_all_old' :- + current_predicate(_,P), + functor(P, Na, Ar), + '$abolish_old'(Na/Ar), + fail. +'$abolish_all_old'. + '$abolishd'(T) :- '$recordedp'(T,_,R), erase(R), fail. '$abolishd'(T) :- '$kill_dynamic'(T), fail. |