From p.singleton@keele.ac.uk  Fri Sep 15 17:06:54 2000
Received: from mail4.svr.pol.co.uk (mail4.svr.pol.co.uk [195.92.193.211])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id RAA17205
	for <prolog@swi.psy.uva.nl>; Fri, 15 Sep 2000 17:06:54 +0200 (MET DST)
Received: from modem4294967203.events.dialup.pol.co.uk ([195.92.2.93] helo=keele.ac.uk)
	by mail4.svr.pol.co.uk with esmtp (Exim 3.13 #0)
	id 13Zx54-000077-00; Fri, 15 Sep 2000 16:07:10 +0100
Message-ID: <39C2395F.92A20022@keele.ac.uk>
Date: Fri, 15 Sep 2000 15:59:43 +0100
From: Paul Singleton <p.singleton@keele.ac.uk>
Organization: SmartArts Computing Consultancy
X-Mailer: Mozilla 4.74 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: prolog@swi.psy.uva.nl
CC: "Richard A. O'Keefe" <ok@atlas.otago.ac.nz>
Subject: Re: Circular references
References: <200009150024.MAA17632@atlas.otago.ac.nz>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

"Richard A. O'Keefe" wrote:
 
> Cyclic terms are a big headache all over the place,

For Prolog implementors maybe, but surely not intractable; and for
application programmers surely they needn't be a headache at all?

(I guess garbage collection is a big headache for implementors,
and I'm thankful that it's theirs and not mine :-)

> and the fact that
> Prolog ever failed to block them is in the "Top 3 Design Misfeatures" list.

As I currently understand it, Prolog implementors have always had at least
three options:

 * block the creation of cyclic terms

 * handle them as representations of their obvious corresponding "rational"
   infinite terms

 * behave in an undefined (and possibly catastrophic) manner once a cyclic
   term is built

If the second option is feasible (and I believe there are constructive
proofs of this), then I for one think it's a Good Thing that the blocking
option wasn't universally adopted, since a "rational term" Prolog surely
has more utility than an "occurs-checking" Prolog?

Paul Singleton


