1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
|
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input bugs.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{bugs}
\subsection{bug1}
MANEXP is invalid as a function
<<bug1>>=
draw(x, x=-1..1)
@
\subsection{bug2}
The attributed tree formNILis not a vector
<<bug2>>=
{}
@
\subsection{bug3}
The attributed tree formNILis not a vector
<<bug3>>=
-- The following still doesn't work
union({}, {1,2})
@
<<bugs>>=
-- File of Currently active and recently fixed interpreter bugs
--- eval a polynomial with EXPR substitution values
--- Fixed by SCM, verified on 10/30/90
)clear all
eq1:= A*x**2 + B*x*y + C*y**2 +D*x + E*y + F
eq2:= eval(eq1,[x= xdot*cos(t) - ydot*sin(t), y=xdot*sin(t) + ydot*cos(t)])
-- UTS coercions. Fixed by SCM, verified on 10/30/90
)clear all
taylor exp x
s := %
s::(UTS(EXPR FLOAT, x, 0))
s::(UTS(FLOAT, x, 0))
eval(s,1)
%::(Stream Float)
-- overloading interpreter maps on arity
--- Fixed by SCM, verified on 10/30/90
)clear all
f(x) == x+1
f(x,y) == x+y
f 3
f(3,4)
f(5)
f(1,x)
-- targetted function requiring a coercion
--- Fixed by SCM, verified on 10/30/90
)clear all
series(n +-> bernoulli(n)/factorial(n), t=0)
-- in-homogeneous list mapping
--- Fixed by SCM, verified on 10/30/90
)clear all
l := [1,2,-1]
f : INT -> FRAC INT
f x == x
map(f, l)
-- Function args to interpreter functions
--- Fixed by SCM, verified on 10/30/90
)cl all
f: INT -> INT
f x == x+1
u g == g 3
u f
-- category modemap requiring a field to be constructed
--- Fixed by SCM, verified on 10/30/90
)clear all
groebner [x**2 - y, y**3+1]
-- operations requiring polynomials, passed variables
--- Fixed by SCM, verified on 10/30/90
)clear all
factor x
<<bug1>>
-- bracket parsing and empty-set types
--- Fixed by SCM, verified on 10/30/90
)clear all
<<bug2>>
{}$Set(INT)
{1}
<<bug3>>
--- Fixed by SCM, verified on 10/30/90
)clear all
map(variable, [x,y])
-- Recursive map type analysis bug
--- Fixed by SCM, verified on 10/30/90
)set fun recur off
)clear all
p(n,x) == if n=0 then 1 else (x+n-1)*p(n-1,x)
pp(n,x) == if n=0 then 1 else if n<0 then (-1)**n/p(-n,1-x) else p(n,x)
pp(-1,x) -- should be 1/(x-1)
-- interpret-code mode for iterators is broken
)cl all
f n ==
for i in 1..n repeat
j:=2*i
m:SQMATRIX(j,?):=1
print m
g n ==
j:=2*n
m:SQMATRIX(j,?):=1
print m
g 3 -- Should work
f 3 -- Bombs
-- Test interpreter list destructuring
)clear all
mp(x,l) ==
l is [a,:b] =>
a*x**(#b)+ mp(x,b)
0
mp(x, [1,3,4, 2])
mp(x, [1,2,-3, 4])
-- Tests compilation of recursive functions
)clear all
f1 n ==
if n=0 then 1 else if n=1 then 1 else f1(n-1)+f1(n-2)
f2 n ==
m:=n
if n=0 then 1 else if n=1 then 1 else f2(n-1)+f2(n-2)
f3 n ==
n=0 => 1
n=1 => 1
f3(n-1)+f3(n-2)
f4 n ==
m:=n
n=0 => 1
n=1 => 1
m:=n
f4(n-1)+f4(n-2)
f5 n == if n=0 or n=1 then 1 else f5(n-1)+f5(n-2)
[f1 3,f2 3, f3 3,f4 3,f5 3]
@
<<*>>=
-- File of Currently active and recently fixed interpreter bugs
--- eval a polynomial with EXPR substitution values
--- Fixed by SCM, verified on 10/30/90
)clear all
eq1:= A*x**2 + B*x*y + C*y**2 +D*x + E*y + F
eq2:= eval(eq1,[x= xdot*cos(t) - ydot*sin(t), y=xdot*sin(t) + ydot*cos(t)])
-- UTS coercions. Fixed by SCM, verified on 10/30/90
)clear all
taylor exp x
s := %
s::(UTS(EXPR FLOAT, x, 0))
s::(UTS(FLOAT, x, 0))
eval(s,1)
%::(Stream Float)
-- overloading interpreter maps on arity
--- Fixed by SCM, verified on 10/30/90
)clear all
f(x) == x+1
f(x,y) == x+y
f 3
f(3,4)
f(5)
f(1,x)
-- targetted function requiring a coercion
--- Fixed by SCM, verified on 10/30/90
)clear all
series(n +-> bernoulli(n)/factorial(n), t=0)
-- in-homogeneous list mapping
--- Fixed by SCM, verified on 10/30/90
)clear all
l := [1,2,-1]
f : INT -> FRAC INT
f x == x
map(f, l)
-- Function args to interpreter functions
--- Fixed by SCM, verified on 10/30/90
)cl all
f: INT -> INT
f x == x+1
u g == g 3
u f
-- category modemap requiring a field to be constructed
--- Fixed by SCM, verified on 10/30/90
)clear all
groebner [x**2 - y, y**3+1]
-- operations requiring polynomials, passed variables
--- Fixed by SCM, verified on 10/30/90
)clear all
factor x
-- bracket parsing and empty-set types
--- Fixed by SCM, verified on 10/30/90
)clear all
{}$(List INT)
{1}
-- Shouldn't work, but no longer bombs the interpreter
--- Fixed by SCM, verified on 10/30/90
)clear all
map(variable, [x,y])
-- Recursive map type analysis bug
--- Fixed by SCM, verified on 10/30/90
)set fun recur off
)clear all
p(n,x) == if n=0 then 1 else (x+n-1)*p(n-1,x)
pp(n,x) == if n=0 then 1 else if n<0 then (-1)**n/p(-n,1-x) else p(n,x)
pp(-1,x) -- should be 1/(x-1)
-- interpret-code mode for iterators is broken
)cl all
f n ==
for i in 1..n repeat
j:=2*i
m:SQMATRIX(j,?):=1
print m
g n ==
j:=2*n
m:SQMATRIX(j,?):=1
print m
g 3 -- Should work
f 3 -- Bombs
-- Test interpreter list destructuring
)clear all
mp(x,l) ==
l is [a,:b] =>
a*x**(#b)+ mp(x,b)
0
mp(x, [1,3,4, 2])
mp(x, [1,2,-3, 4])
-- Tests compilation of recursive functions
)clear all
f1 n ==
if n=0 then 1 else if n=1 then 1 else f1(n-1)+f1(n-2)
f2 n ==
m:=n
if n=0 then 1 else if n=1 then 1 else f2(n-1)+f2(n-2)
f3 n ==
n=0 => 1
n=1 => 1
f3(n-1)+f3(n-2)
f4 n ==
m:=n
n=0 => 1
n=1 => 1
m:=n
f4(n-1)+f4(n-2)
f5 n == if n=0 or n=1 then 1 else f5(n-1)+f5(n-2)
[f1 3,f2 3, f3 3,f4 3,f5 3]
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}
|