|
|
last edited 17 years ago by kratt6 |
1 2 3 | ||
Editor: kratt6
Time: 2008/01/04 04:23:32 GMT-8 |
||
Note: documented behaviour |
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 ]
![]() | (1) |
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..]
axiomv
Compiling body of rule v to compute value of type Stream Stream Integer
![]() | (2) |
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..]
axiomu(3,6)
Compiling function u with type (PositiveInteger,PositiveInteger) -> Stream Stream Integer
![]() | (3) |
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..]
![]() | (4) |
works, and
axiom[i+j+k for i in 0.. for j in 0.. for k in 0..]
![]() | (5) |
works!!
Current Axiom version:
axiom)version Value = "Friday November 9, 2007 at 19:35:06 "
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
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.
Status: open => duplicatesee also #375