Subject: Re: Circular references

From: Paul Singleton <[email-masked]>
Date: Fri, 15 Sep 2000 15:59:43 +0100

"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