Subject: Fw: Implementation of assert in SWI

From: "Eric Neufeld" <[email-masked]>
Date: Thu, 14 Oct 1999 18:24:08 -0600

SICStus Prolog behaves as follows:
 
 | ?- assert(a(1)).
 
 yes
 | ?- a(X), Y is X + 1, assert(a(Y)).
 
 X = 1,
 Y = 2 ? ;
 
 no
 | ?- a(X), Y is X + 1, assert(a(Y)).
 
 X = 1,
Y = 2 ? ;
 
 X =2,
Y =3 ? ;
 
 no

That is, the choice points generated by a(X) are just those that exist
when a(X) is first called. SWI continues ad infinitum after the second
query. Bug or feature? Thanks. I am using SWI in a 4th yr AI class.
 
 Eric Neufeld