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:
parent
bfca528833
commit
a5638757d3
24
H/amiops.h
24
H/amiops.h
@ -371,10 +371,28 @@ Int unify(Term t0, Term t1)
|
||||
return(TRUE);
|
||||
} else {
|
||||
while(TR != TR0) {
|
||||
CELL *p;
|
||||
CELL d1;
|
||||
--TR;
|
||||
p = (CELL *)TrailTerm(TR);
|
||||
RESET_VARIABLE(p);
|
||||
d1 = TrailTerm(TR);
|
||||
#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);
|
||||
}
|
||||
|
@ -2291,7 +2291,7 @@ over @var{G}.
|
||||
If you want @var{G} to be deterministic you should use if-then-else, as
|
||||
it is both more efficient and more portable.
|
||||
|
||||
@item once(+@var{G}) [IS0]
|
||||
@item once(:@var{G}) [IS0]
|
||||
@findex once/1
|
||||
@snindex 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
|
||||
both static and dynamic predicates.
|
||||
|
||||
@item assert_static(+@var{C})
|
||||
@item assert_static(:@var{C})
|
||||
@findex assert_static/1
|
||||
@snindex 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
|
||||
undefined results.
|
||||
|
||||
@item asserta_static(+@var{C})
|
||||
@item asserta_static(:@var{C})
|
||||
@findex asserta_static/1
|
||||
@snindex asserta_static/1
|
||||
@cnindex asserta_static/1
|
||||
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
|
||||
@snindex assertz_static/1
|
||||
@cnindex assertz_static/1
|
||||
|
@ -530,10 +530,13 @@ source_module(Mod) :-
|
||||
all(?,:,?),
|
||||
assert(:),
|
||||
assert(:,+),
|
||||
assert_static(:),
|
||||
asserta(:),
|
||||
asserta(:,+),
|
||||
asserta_static(:),
|
||||
assertz(:),
|
||||
assertz(:,+),
|
||||
assertz_static(:),
|
||||
bagof(?,:,?),
|
||||
bb_get(:,-),
|
||||
bb_put(:,+),
|
||||
@ -565,6 +568,7 @@ source_module(Mod) :-
|
||||
listing(:),
|
||||
nospy(:),
|
||||
not(:),
|
||||
once(:),
|
||||
phrase(:,?),
|
||||
phrase(:,?,+),
|
||||
predicate_property(:,?),
|
||||
|
Reference in New Issue
Block a user