[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: segmentation fault writing cyclic term

From: Paul Eggert
Subject: Re: segmentation fault writing cyclic term
Date: Sat, 4 Dec 2021 08:55:53 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

On 12/4/21 03:21, Paulo Moura wrote:
| ?- X = X+1, write(X).
X = X+1, write(X).
Segmentation fault (core dumped)

Shouldn't write/1 be protected against cyclic terms?
Note that support for cyclic terms is not a ISO Prolog standard requirement.

Quite right, this is not a standards violation. Still, gprolog already defends against cyclic terms when it outputs them:

  | ?- X=X+1.

  cannot display cyclic term for X

so presumably it could defend against them in 'write' if this was considered useful (which it would be, for my students...).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]