From dschuman@agouron.com Tue Sep 18 01:38:32 2001
Received: from tbone.agouron.com (tbone.agouron.com [198.182.177.3])
	by swi.psy.uva.nl (8.11.2/8.11.2) with SMTP id f8HNcVv10965
	for <prolog@swi.psy.uva.nl>; Tue, 18 Sep 2001 01:38:31 +0200 (MET DST)
Received: from relay.agouron.com by tbone.agouron.com
          via smtpd (for [145.18.152.22]) with SMTP; 17 Sep 2001 23:38:30 UT
Received: from agouron.com (shamshir.agouron.com [10.0.76.129])
	by hermes.agouron.com (8.9.3+Sun/8.9.3) with ESMTP id QAA13421;
	Mon, 17 Sep 2001 16:31:36 -0700 (PDT)
Sender: dschuman@agouron.com
Message-ID: <3BA68970.1F199F66@agouron.com>
Date: Mon, 17 Sep 2001 16:38:25 -0700
From: Dave Schumann <dschuman@agouron.com>
Organization: Agouron Pharmaceuticals, Inc.
X-Mailer: Mozilla 4.75C-SGI [en] (X11; I; IRIX64 6.5 IP30)
X-Accept-Language: en
MIME-Version: 1.0
To: Steve Prior <sprior@geekster.com>
CC: prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] Getting Started with SWI
References: <200109172300.LAA328556@atlas.otago.ac.nz> <3BA684F3.ACF3F935@geekster.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Only the known problem of infinite recursion.  The recursive definition of
friends
appears in the database before the concrete definition.  So given the query

friends("steve", "alicja").

Prolog tries to find some Y such that friends("steve",Y) is true, and to do that
it
tries to find some Y' such that friends("steve",Y') is true, etc etc.

--David Schumann
Pfizer, Inc.

Steve Prior wrote:

> Thanks Richard and all the others who have responded.  You have all
> been eager to help and that made me feel welcome.  I tried the [user].
> and entered the following:
>
> ?- [user].
> |: friends(X,Z):-
> |: friends(X,Y),
> |: friends(Y,Z).
> |: friends("steve","alicja").
> |: friends("alicja","tim").
> ^D
> %user compiled 0.00 sec, 676 bytes
>
> ?- friends("steve","alicja").
> ERROR: Out of local stack
> Exception: (31,742) friends([115, 116, 101, 118, 101], _G404) ?
>
> I'm using SWI-Prolog (version 4.0.9) on Windows 2000
>
> Did I step on some kind of known problem?
>
> Thanks
> Steve
>
> "Richard A. O'Keefe" wrote:
>
> > Tom Breton wrote:
> >
> >         You need to type
> >
> >                 [user].
> >
> >         before defining rules, and ^D when you're done.
> >
> > Correction.  You should type *whatever* your end-of-file key is,
> > at the beginning of a line with nothing else on it.
> > For many people, the end-of-file key is ^Z, not ^D.
> >
> > Or you can use the Prolog end-of-file convention, which is to type
> >         end_of_file.
> > and works whatever the host's end-of-file convention might be.
>
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
>
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
>
> or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe"
> (without the quotes) and *no* message body.
>
> ** An ARCHIVE of this list is maintained at
>
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/

