From eric@cs.usask.ca  Fri Oct 15 02:24:03 1999
Received: from mail.rdc1.ab.home.com (imail@ha1.rdc1.ab.wave.home.com [24.64.2.50])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id CAA13307
	for <prolog@swi.psy.uva.nl>; Fri, 15 Oct 1999 02:24:03 +0200 (MET DST)
Received: from causality ([24.65.108.104]) by mail.rdc1.ab.home.com
          (InterMail v4.01.01.07 201-229-111-110) with SMTP
          id <19991015002413.ZDIS2887.mail.rdc1.ab.home.com@causality>
          for <prolog@swi.psy.uva.nl>; Thu, 14 Oct 1999 17:24:13 -0700
Message-ID: <001d01bf16a3$98ff1f00$0228a8c0@ssdt1.sk.wave.home.com>
From: "Eric Neufeld" <eric@cs.usask.ca>
To: <prolog@swi.psy.uva.nl>
Subject: Fw: Implementation of assert in SWI
Date: Thu, 14 Oct 1999 18:24:08 -0600
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300


 
 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
 


