login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #386 Infinite loop in LISP related to Tuple? revision 2 of 3

1 2 5
Editor: gdr
Time: 2008/04/01 13:04:42 GMT-7
Note: for x in l

added:

From gdr Tue Apr 1 13:04:42 -0700 2008
From: gdr
Date: Tue, 01 Apr 2008 13:04:42 -0700
Subject: for x in l
Message-ID: <20080401130442-0700@axiom-wiki.newsynthesis.org>

The Axiom Book (Jenks&Sutor) does not describe
this syntax valid.  All `for in' discussions are
with single variable names -- not structured or
pattern matching stuff.

So, I suspect the right answer is a diagnostic.


Submitted by : (unknown) at: 2007-11-17T22:35:54-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

The second line (which should report syntax error at worse), seems to be generating an infinite loop that exhausts memory.

axiom
g:=[(1,2),(3,4)]
LatexWiki Image(1)
Type: List Tuple PositiveInteger?
axiom
[1 for (a,b) in g] >> System error: The storage for CONS is exhausted. Currently, 241150 pages are allocated. Use ALLOCATE to expand the space.

On my system, the following message finally appeared:

   >> System error:
   The storage for CONS is exhausted.
   Currently, 85895 pages are allocated.
   Use ALLOCATE to expand the space.

The Axiom Book (Jenks&Sutor) does not describe this syntax valid. All `for in' discussions are with single variable names -- not structured or pattern matching stuff.

So, I suspect the right answer is a diagnostic.