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

Edit detail for #165 stream2.input infinite loops with streams revision 1 of 3

1 2 3
Editor: kratt6
Time: 2008/01/04 04:23:32 GMT-8
Note: documented behaviour

changed:
-
stream2.input.pamphlet

In general this fixes the problems::

  )set functions compile on

but the way axiom is initialized seems to leave something
in a broken state which the set command fixes.

Test 1::

  !\begin{axiom}
  )set streams calculate 10
  [j for j in 4.. | j < 10 ] 
  \end{axiom}

does not stop.

Test 2::

  !\begin{axiom}
  m==[j for j in 4.. | j < 10 ]
  m
  \end{axiom}

causes GCL to exit, CCL to never complete.

but:
\begin{axiom}
[j for j in 0.. | j < 10 ]
\end{axiom}
works!

issue seems to be 0 vs 4 in loop index

Test 3::

  !\begin{axiom}
  )set streams calculate 10
  u==[i+j for i in (-4)..10 | i < 5 for j in 4.. | j < 10]
  u
  \end{axiom}

causes GCL to exit, CCL works.

Test 4::

  !\begin{axiom}
  )set streams calculate 10
  u==[i+j for i in 0..10 | i < 5 for j in 0.. | j < 10]
  u
  \end{axiom}

also fails.

issue seems to be end test compile.

Test 5::

  !\begin{axiom}
  )set streams calculate 10
  u==[[i+j for i in 0..] for j in 0..]
  u
  \end{axiom}

causes GCL to exit, CCL works.

issue seems to have something to do with macros

because::

  [[i+j for i in 0..] for j in 0..]

works::

  !\begin{axiom}
  [[i+j for i in 0..] for j in 0..]
  \end{axiom}

also the sequence:
\begin{axiom}
)set fun comp on
v==[[i+j for i in 0..] for j in 0..]
v
\end{axiom}
works!

something appears to be set funny when
axiom starts.

Test 6:
\begin{axiom}
)set streams calculate 10
u(m,n)==[[i*j for j in m..] for i in n..]
u(3,6)
\end{axiom}
causes GCL to exit, CCL works.

but:
\begin{axiom}
)set streams calculate 5
[[[i+j+k for i in 0..] for j in 0..] for k in 0..]
\end{axiom}
works, and
\begin{axiom}
[i+j+k for i in 0.. for j in 0.. for k in 0..]
\end{axiom}
works!!


From BillPage Sun Oct 30 14:50:25 -0600 2005
From: Bill Page
Date: Sun, 30 Oct 2005 14:50:25 -0600
Subject: Tests 1, 2, 3, 4, and 5 still fail
Message-ID: <20051030145025-0600@wiki.axiom-developer.org>

In the version of Axiom used on MathAction which was compiled
from the tla archive on Tuesday August 23, 2005 at 22:37:35

Current Axiom version:
\begin{axiom}
)version
\end{axiom}

Will these work in the pending October 2005 release?

From root Sun Oct 30 20:16:55 -0600 2005
From: root
Date: Sun, 30 Oct 2005 20:16:55 -0600
Subject: [#165 stream2.input]
Message-ID: <200510310212.j9V2CY726577@localhost.localdomain>
In-Reply-To: <20051030144416-0600@wiki.axiom-developer.org>
	(mathaction@axiom-developer.org)

no, those are unchanged.

i've been concentrating on the problem of documentation.
at present i see that the system is too large and difficult
for anyone to really begin to make changes, do real debugging,
and add new features; all of which we need.

i'm working on organizing and documenting what i know so others
can begin to understand.

the key change in this release and in this direction is the file
$AXIOM/doc/bookvol5.dvi This file begins to document the interpreter.
A similar file will begin to document the compiler, the browser,
the graphics, the algebra, etc.

t


From Waldek Sat May 26 22:11:00 -0500 2007
From: Waldek
Date: May 26, 2007 22:11:00 -0500 2007
Subject: Cleaning issues
Message-ID: <20050612121753-0500@page.axiom-developer.org>

I have looked at older issues in Issue Tracker and it seems that
there are significant number of issues which are just users not
understanding what Axiom is doing and expecting different result.
 
For example issue 165 the user clearly do not understand that
that Axiom blindly performs specified computations and that::
 
   [j for j in 4.. | j < 10 ]
 
simply is an infinite loop.  Correct stream computation work
because they eventually produce some output and compuation
is aborted when sufficently many elements are produced, but
this one just loops without producing any output.
 
BTW, my impression is that this issue is a duplicate.
 


From kratt6 Fri Jan 4 04:23:12 -0800 2008
From: kratt6
Date: Fri, 04 Jan 2008 04:23:12 -0800
Subject: documented behaviour
Message-ID: <20080104042312-0800@axiom-wiki.newsynthesis.org>

Status: open => duplicate 

see also #375

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

stream2.input.pamphlet

In general this fixes the problems:

  )set functions compile on

but the way axiom is initialized seems to leave something in a broken state which the set command fixes.

Test 1:

  \begin{axiom}
  )set streams calculate 10
  [j for j in 4.. | j < 10 ] 
  \end{axiom}

does not stop.

Test 2:

  \begin{axiom}
  m==[j for j in 4.. | j < 10 ]
  m
  \end{axiom}

causes GCL to exit, CCL to never complete.

but:

axiom
[j for j in 0.. | j < 10 ]
LatexWiki Image(1)
Type: Stream NonNegativeInteger?

works!

issue seems to be 0 vs 4 in loop index

Test 3:

  \begin{axiom}
  )set streams calculate 10
  u==[i+j for i in (-4)..10 | i < 5 for j in 4.. | j < 10]
  u
  \end{axiom}

causes GCL to exit, CCL works.

Test 4:

  \begin{axiom}
  )set streams calculate 10
  u==[i+j for i in 0..10 | i < 5 for j in 0.. | j < 10]
  u
  \end{axiom}

also fails.

issue seems to be end test compile.

Test 5:

  \begin{axiom}
  )set streams calculate 10
  u==[[i+j for i in 0..] for j in 0..]
  u
  \end{axiom}

causes GCL to exit, CCL works.

issue seems to have something to do with macros

because:

  [[i+j for i in 0..] for j in 0..]

works:

  \begin{axiom}
  [[i+j for i in 0..] for j in 0..]
  \end{axiom}

also the sequence:

axiom
)set fun comp on v==[[i+j for i in 0..] for j in 0..]
Type: Void
axiom
v
axiom
Compiling body of rule v to compute value of type Stream Stream 
      Integer
LatexWiki Image(2)
Type: Stream Stream Integer

works!

something appears to be set funny when axiom starts.

Test 6:

axiom
)set streams calculate 10 u(m,n)==[[i*j for j in m..] for i in n..]
Type: Void
axiom
u(3,6)
axiom
Compiling function u with type (PositiveInteger,PositiveInteger) -> 
      Stream Stream Integer
LatexWiki Image(3)
Type: Stream Stream Integer

causes GCL to exit, CCL works.

but:

axiom
)set streams calculate 5 [[[i+j+k for i in 0..] for j in 0..] for k in 0..]
LatexWiki Image(4)
Type: Stream Stream Stream Integer

works, and

axiom
[i+j+k for i in 0.. for j in 0.. for k in 0..]
LatexWiki Image(5)
Type: Stream NonNegativeInteger?

works!!

Tests 1, 2, 3, 4, and 5 still fail --Bill Page, Sun, 30 Oct 2005 14:50:25 -0600 reply
In the version of Axiom used on MathAction? which was compiled from the tla archive on Tuesday August 23, 2005 at 22:37:35

Current Axiom version:

axiom
)version Value = "Friday November 9, 2007 at 19:35:06 "

Will these work in the pending October 2005 release?

[#165 stream2.input]? --root, Sun, 30 Oct 2005 20:16:55 -0600 reply
no, those are unchanged.

i've been concentrating on the problem of documentation. at present i see that the system is too large and difficult for anyone to really begin to make changes, do real debugging, and add new features; all of which we need.

i'm working on organizing and documenting what i know so others can begin to understand.

the key change in this release and in this direction is the file $AXIOM/doc/bookvol5.dvi This file begins to document the interpreter. A similar file will begin to document the compiler, the browser, the graphics, the algebra, etc.

t

Cleaning issues --Waldek, May 26, 2007 22:11:00 -0500 2007 reply
I have looked at older issues in Issue Tracker and it seems that there are significant number of issues which are just users not understanding what Axiom is doing and expecting different result.

For example issue 165 the user clearly do not understand that that Axiom blindly performs specified computations and that:

   [j for j in 4.. | j < 10 ]

simply is an infinite loop. Correct stream computation work because they eventually produce some output and compuation is aborted when sufficently many elements are produced, but this one just loops without producing any output.

BTW, my impression is that this issue is a duplicate.

documented behaviour --kratt6, Fri, 04 Jan 2008 04:23:12 -0800 reply
Status: open => duplicate

see also #375