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:
(1) -> [j for j in 0.. | j < 10 ]
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:
)set fun comp on
v==[[i+j for i in 0..] for j in 0..]
v
Compiling body of rule v to compute value of type Stream(Stream( Integer))
works!
something appears to be set funny when axiom starts.
Test 6:
)set streams calculate 10
u(m,n)==[[i*j for j in m..] for i in n..]
u(3,6)
Compiling function u with type (PositiveInteger,PositiveInteger) -> Stream(Stream(Integer))
causes GCL to exit, CCL works.
but:
)set streams calculate 5
[[[i+j+k for i in 0..] for j in 0..] for k in 0..]
works, and
[i+j+k for i in 0.. for j in 0.. for k in 0..]
works!!
Current Axiom version:
)version
"FriCAS 1.3.10 compiled at Wed 10 Jan 02:19:45 CET 2024"
Will these work in the pending October 2005 release?
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
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.
see also #375
#165 stream2.input => #165 stream2.input infinite loops with streams