Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Graph syntax reader bug #14

Open
ijp opened this issue Jun 28, 2010 · 2 comments
Open

Graph syntax reader bug #14

ijp opened this issue Jun 28, 2010 · 2 comments

Comments

@ijp
Copy link

ijp commented Jun 28, 2010

I just installed Vicare Scheme and came across a bug in the reader, it is also present in Ikarus. If you are constructing a graph using reader syntax as opposed to by mutating the list explicitly, and you forget the quote, then it will hang your system.

'#0=(a b c #0#)

#0=(a b c #0#)

#0=(a b c #0#)

hangs

While I am sure that this is a bug, I am not sure whether or not the 'correct' solution is to have this be an error, or to allow it a la bytevectors.

@marcomaggi
Copy link
Owner

The reader works fine, the problem is somewhere around the call to LOAD-R6RS-SCRIPT in "ikarus.main.ss"; that is: the expander (probably) or the compiler enters an infinite loop while visiting the recursive input S-Expression.

I agree that it would be nice to detect this problem and raise an error, but deep understanding of the expander is needed for this and I do not have it now. For the time being, I tag this as wont-fix, because graph notation is just a (sometimes useful) extension and not part of R6RS.

@marcomaggi
Copy link
Owner

More on this from Ikarus bug 809250 reported by Göran Weinholt:

Per Bothner posted a message on scheme-reports:
http://lists.scheme-reports.org/pipermail/scheme-reports/2011-July/001142.html
The context is that R7RS probably will have the syntax for self-referential data structures. The expression he posted gives an infinite loop in Ikarus:

Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1870, build 2010-11-07)
Copyright (c) 2006-2009 Abdulaziz Ghuloum

`#0=(,x #0#)
[Ikarus uses 100% cpu here.]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants