unify might bound a multi-assignment variable?\027?\024

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@480 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-05-21 04:18:15 +00:00
parent bfca528833
commit a5638757d3
3 changed files with 29 additions and 7 deletions

View File

@ -371,10 +371,28 @@ Int unify(Term t0, Term t1)
return(TRUE); return(TRUE);
} else { } else {
while(TR != TR0) { while(TR != TR0) {
CELL *p; CELL d1;
--TR; --TR;
p = (CELL *)TrailTerm(TR); d1 = TrailTerm(TR);
RESET_VARIABLE(p); #ifdef MULTI_ASSIGNMENT_VARIABLES
if (IsVarTerm(d1)) {
#endif
CELL *pt = (CELL *)d1;
RESET_VARIABLE(pt);
#ifdef MULTI_ASSIGNMENT_VARIABLES
} else {
CELL *pt = RepAppl(d1);
/* AbsAppl means */
/* multi-assignment variable */
/* so the next cell is the old value */
TR--;
#if FROZEN_STACKS
pt[0] = TrailVal(TR);
#else
pt[0] = TrailTerm(TR);
#endif
}
#endif
} }
return(FALSE); return(FALSE);
} }

View File

@ -2291,7 +2291,7 @@ over @var{G}.
If you want @var{G} to be deterministic you should use if-then-else, as If you want @var{G} to be deterministic you should use if-then-else, as
it is both more efficient and more portable. it is both more efficient and more portable.
@item once(+@var{G}) [IS0] @item once(:@var{G}) [IS0]
@findex once/1 @findex once/1
@snindex once/1 @snindex once/1
@cnindex once/1 @cnindex once/1
@ -4668,7 +4668,7 @@ long as they are not currently in use.
Deletes the predicate with name @var{P} and arity @var{N}. It will remove Deletes the predicate with name @var{P} and arity @var{N}. It will remove
both static and dynamic predicates. both static and dynamic predicates.
@item assert_static(+@var{C}) @item assert_static(:@var{C})
@findex assert_static/1 @findex assert_static/1
@snindex assert_static/1 @snindex assert_static/1
@cnindex assert_static/1 @cnindex assert_static/1
@ -4676,13 +4676,13 @@ both static and dynamic predicates.
for a predicate while choice-points for the predicate are availabe has for a predicate while choice-points for the predicate are availabe has
undefined results. undefined results.
@item asserta_static(+@var{C}) @item asserta_static(:@var{C})
@findex asserta_static/1 @findex asserta_static/1
@snindex asserta_static/1 @snindex asserta_static/1
@cnindex asserta_static/1 @cnindex asserta_static/1
Adds clause @var{C} to the beginning of a static procedure. Adds clause @var{C} to the beginning of a static procedure.
@item assertz_static(+@var{C}) @item assertz_static(:@var{C})
@findex assertz_static/1 @findex assertz_static/1
@snindex assertz_static/1 @snindex assertz_static/1
@cnindex assertz_static/1 @cnindex assertz_static/1

View File

@ -530,10 +530,13 @@ source_module(Mod) :-
all(?,:,?), all(?,:,?),
assert(:), assert(:),
assert(:,+), assert(:,+),
assert_static(:),
asserta(:), asserta(:),
asserta(:,+), asserta(:,+),
asserta_static(:),
assertz(:), assertz(:),
assertz(:,+), assertz(:,+),
assertz_static(:),
bagof(?,:,?), bagof(?,:,?),
bb_get(:,-), bb_get(:,-),
bb_put(:,+), bb_put(:,+),
@ -565,6 +568,7 @@ source_module(Mod) :-
listing(:), listing(:),
nospy(:), nospy(:),
not(:), not(:),
once(:),
phrase(:,?), phrase(:,?),
phrase(:,?,+), phrase(:,?,+),
predicate_property(:,?), predicate_property(:,?),