shen-ruby 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/.gitignore +2 -0
  2. data/.travis.yml +5 -0
  3. data/Gemfile +2 -2
  4. data/HISTORY.md +12 -0
  5. data/README.md +10 -7
  6. data/Rakefile +92 -0
  7. data/bin/srrepl +2 -2
  8. data/k_lambda_spec/primitives/arithmetic_spec.rb +175 -0
  9. data/k_lambda_spec/primitives/assignments_spec.rb +44 -0
  10. data/k_lambda_spec/primitives/generic_functions_spec.rb +115 -2
  11. data/k_lambda_spec/primitives/lists_spec.rb +40 -0
  12. data/k_lambda_spec/primitives/strings_spec.rb +77 -0
  13. data/k_lambda_spec/primitives/symbols_spec.rb +24 -0
  14. data/k_lambda_spec/primitives/vectors_spec.rb +92 -0
  15. data/k_lambda_spec/support/shared_examples.rb +93 -2
  16. data/k_lambda_spec/tail_recursion_spec.rb +30 -0
  17. data/lib/kl/compiler.rb +19 -33
  18. data/lib/kl/environment.rb +1 -0
  19. data/lib/kl/primitives/assignments.rb +1 -0
  20. data/lib/kl/primitives/generic_functions.rb +7 -0
  21. data/lib/kl/primitives/lists.rb +2 -0
  22. data/lib/kl/primitives/strings.rb +13 -5
  23. data/lib/kl/primitives/symbols.rb +1 -0
  24. data/lib/kl/primitives/vectors.rb +5 -0
  25. data/lib/shen_ruby/version.rb +1 -1
  26. data/shen-ruby.gemspec +1 -1
  27. data/shen/lib/shen_ruby/shen.rb +5 -6
  28. data/shen/release/benchmarks/benchmarks.shen +0 -4
  29. data/shen/release/benchmarks/interpreter.shen +2 -2
  30. data/shen/release/benchmarks/plato.jpg +0 -0
  31. data/shen/release/k_lambda/core.kl +171 -1000
  32. data/shen/release/k_lambda/declarations.kl +90 -992
  33. data/shen/release/k_lambda/load.kl +69 -81
  34. data/shen/release/k_lambda/macros.kl +113 -478
  35. data/shen/release/k_lambda/prolog.kl +250 -1307
  36. data/shen/release/k_lambda/reader.kl +115 -996
  37. data/shen/release/k_lambda/sequent.kl +154 -554
  38. data/shen/release/k_lambda/sys.kl +246 -562
  39. data/shen/release/k_lambda/t-star.kl +114 -3643
  40. data/shen/release/k_lambda/toplevel.kl +136 -221
  41. data/shen/release/k_lambda/track.kl +101 -206
  42. data/shen/release/k_lambda/types.kl +143 -298
  43. data/shen/release/k_lambda/writer.kl +93 -106
  44. data/shen/release/k_lambda/yacc.kl +77 -252
  45. data/shen/release/test_programs/README.shen +1 -1
  46. data/shen/release/test_programs/classes-typed.shen +1 -1
  47. data/shen/release/test_programs/interpreter.shen +2 -2
  48. data/shen/release/test_programs/metaprog.shen +2 -2
  49. data/shen/release/test_programs/prolog.shen +79 -0
  50. data/shen/release/test_programs/structures-typed.shen +2 -2
  51. data/shen/release/test_programs/tests.shen +19 -80
  52. data/shen/release/test_programs/yacc.shen +11 -15
  53. metadata +14 -6
  54. data/Gemfile.lock +0 -20
  55. data/shen/release/benchmarks/br.shen +0 -13
@@ -1,1027 +1,125 @@
1
-
2
- " The License
3
-
4
- The user is free to produce commercial applications with the software, to distribute these applications in source or binary form, and to charge monies for them as he sees fit and in concordance with the laws of the land subject to the following license.
5
-
6
- 1. The license applies to all the software and all derived software and must appear on such.
7
- 2. It is illegal to distribute the software without this license attached to it and use of the software implies agreement
8
- with the license as such. It is illegal for anyone who is not the copyright holder to tamper with or change the license.
9
- 3. Neither the names of Lambda Associates or the copyright holder may be used to endorse or promote products built using
10
- the software without specific prior written permission from the copyright holder.
11
- 4. That possession of this license does not confer on the copyright holder any special contractual obligation towards the user. That in no event shall the copyright holder be liable for any direct, indirect, incidental, special, exemplary or consequential damages (including but not limited to procurement of substitute goods or services, loss of use, data, or profits; or business interruption), however caused and on any theory of liability, whether in contract, strict liability or tort (including negligence) arising in any way out of the use of the software, even if advised of the possibility of such damage.
12
- 5. It is permitted for the user to change the software, for the purpose of improving performance, correcting an error, or porting to a new platform, and distribute the modified version of Shen (hereafter the modified version) provided the resulting program conforms in all respects to the Shen standard and is issued under that title. The user must make it clear with his distribution that he/she is the author of the changes and what these changes are and why.
13
- 6. Derived versions of this software in whatever form are subject to the same restrictions. In particular it is not permitted to make derived copies of this software which do not conform to the Shen standard or appear under a different title.
14
- 7. It is permitted to distribute versions of Shen which incorporate libraries, graphics or other facilities which are not part of the Shen standard.
15
-
16
- For an explication of this license see http://www.lambdassociates.org/News/june11/license.htm which explains this license in full."
17
-
18
- (set shen-*installing-kl* false)
19
-
20
- (set shen-*history* ())
21
-
22
- (set shen-*tc* false)
23
-
24
- (set shen-*property-vector* (vector 20000))
25
-
26
- (set shen-*process-counter* 0)
27
-
28
- (set shen-*varcounter* (vector 1000))
29
-
30
- (set shen-*prologvectors* (vector 1000))
31
-
32
- (set shen-*reader-macros* ())
33
-
34
- (set *printer* ())
1
+ "**********************************************************************************
2
+ * The License *
3
+ * *
4
+ * The user is free to produce commercial applications with the software, to *
5
+ * distribute these applications in source or binary form, and to charge monies *
6
+ * for them as he sees fit and in concordance with the laws of the land subject *
7
+ * to the following license. *
8
+ * *
9
+ * 1. The license applies to all the software and all derived software and *
10
+ * must appear on such. *
11
+ * *
12
+ * 2. It is illegal to distribute the software without this license attached *
13
+ * to it and use of the software implies agreement with the license as such. *
14
+ * It is illegal for anyone who is not the copyright holder to tamper with *
15
+ * or change the license. *
16
+ * *
17
+ * 3. Neither the names of Lambda Associates or the copyright holder may be used *
18
+ * to endorse or promote products built using the software without specific *
19
+ * prior written permission from the copyright holder. *
20
+ * *
21
+ * 4. That possession of this license does not confer on the copyright holder *
22
+ * any special contractual obligation towards the user. That in no event *
23
+ * shall the copyright holder be liable for any direct, indirect, incidental, *
24
+ * special, exemplary or consequential damages (including but not limited *
25
+ * to procurement of substitute goods or services, loss of use, data, *
26
+ * interruption), however caused and on any theory of liability, whether in *
27
+ * contract, strict liability or tort (including negligence) arising in any *
28
+ * way out of the use of the software, even if advised of the possibility of *
29
+ * such damage. *
30
+ * *
31
+ * 5. It is permitted for the user to change the software, for the purpose of *
32
+ * improving performance, correcting an error, or porting to a new platform, *
33
+ * and distribute the derived version of Shen provided the resulting program *
34
+ * conforms in all respects to the Shen standard and is issued under that *
35
+ * title. The user must make it clear with his distribution that he/she is *
36
+ * the author of the changes and what these changes are and why. *
37
+ * *
38
+ * 6. Derived versions of this software in whatever form are subject to the same *
39
+ * restrictions. In particular it is not permitted to make derived copies of *
40
+ * this software which do not conform to the Shen standard or appear under a *
41
+ * different title. *
42
+ * *
43
+ * It is permitted to distribute versions of Shen which incorporate libraries, *
44
+ * graphics or other facilities which are not part of the Shen standard. *
45
+ * *
46
+ * For an explication of this license see www.shenlanguage.org/license.htm which *
47
+ * explains this license in full. *
48
+ * *
49
+ *****************************************************************************************
50
+ "(set shen.*installing-kl* false)
51
+
52
+ (set shen.*history* ())
53
+
54
+ (set shen.*tc* false)
55
+
56
+ (set *property-vector* (vector 20000))
57
+
58
+ (set shen.*process-counter* 0)
59
+
60
+ (set shen.*varcounter* (vector 1000))
61
+
62
+ (set shen.*prologvectors* (vector 1000))
63
+
64
+ (set shen.*reader-macros* ())
35
65
 
36
66
  (set *home-directory* ())
37
67
 
38
- (set shen-*gensym* 0)
68
+ (set shen.*gensym* 0)
39
69
 
40
- (set shen-*tracking* ())
70
+ (set shen.*tracking* ())
41
71
 
42
72
  (set *home-directory* "")
43
73
 
44
- (set shen-*alphabet*
45
- (cons A
46
- (cons B
47
- (cons C
48
- (cons D
49
- (cons E
50
- (cons F
51
- (cons G
52
- (cons H
53
- (cons I
54
- (cons J
55
- (cons K
56
- (cons L
57
- (cons M
58
- (cons N
59
- (cons O
60
- (cons P
61
- (cons Q
62
- (cons R
63
- (cons S
64
- (cons T
65
- (cons U
66
- (cons V
67
- (cons W
68
- (cons X (cons Y (cons Z ())))))))))))))))))))))))))))
74
+ (set shen.*alphabet* (cons A (cons B (cons C (cons D (cons E (cons F (cons G (cons H (cons I (cons J (cons K (cons L (cons M (cons N (cons O (cons P (cons Q (cons R (cons S (cons T (cons U (cons V (cons W (cons X (cons Y (cons Z ())))))))))))))))))))))))))))
69
75
 
70
- (set shen-*special*
71
- (cons @p
72
- (cons @s
73
- (cons @v
74
- (cons cons
75
- (cons lambda
76
- (cons let (cons type (cons where (cons set (cons open ())))))))))))
76
+ (set shen.*special* (cons @p (cons @s (cons @v (cons cons (cons lambda (cons let (cons type (cons where (cons set (cons open ())))))))))))
77
77
 
78
- (set shen-*extraspecial*
79
- (cons define (cons shen-process-datatype (cons input+ ()))))
78
+ (set shen.*extraspecial* (cons define (cons shen.process-datatype (cons input+ (cons defcc ())))))
80
79
 
81
- (set shen-*spy* false)
80
+ (set shen.*spy* false)
82
81
 
83
- (set shen-*datatypes* ())
82
+ (set shen.*datatypes* ())
84
83
 
85
- (set shen-*alldatatypes* ())
84
+ (set shen.*alldatatypes* ())
86
85
 
87
- (set shen-*shen-type-theory-enabled?* true)
86
+ (set shen.*shen-type-theory-enabled?* true)
88
87
 
89
- (set shen-*synonyms* ())
88
+ (set shen.*synonyms* ())
90
89
 
91
- (set shen-*system* ())
90
+ (set shen.*system* ())
92
91
 
93
- (set shen-*signedfuncs* ())
92
+ (set shen.*signedfuncs* ())
94
93
 
95
- (set shen-*maxcomplexity* 128)
94
+ (set shen.*maxcomplexity* 128)
96
95
 
97
- (set shen-*occurs* true)
96
+ (set shen.*occurs* true)
98
97
 
99
- (set shen-*maxinferences* 1000000)
98
+ (set shen.*maxinferences* 1000000)
100
99
 
101
100
  (set *maximum-print-sequence-size* 20)
102
101
 
103
- (set shen-*catch* 0)
102
+ (set shen.*catch* 0)
104
103
 
105
- (set shen-*call* 0)
104
+ (set shen.*call* 0)
106
105
 
107
- (set shen-*infs* 0)
106
+ (set shen.*infs* 0)
108
107
 
109
- (set shen-*process-counter* 0)
108
+ (defun shen.initialise_arity_table (V801) (cond ((= () V801) ()) ((and (cons? V801) (cons? (tl V801))) (let DecArity (put (hd V801) arity (hd (tl V801)) (value *property-vector*)) (shen.initialise_arity_table (tl (tl V801))))) (true (shen.sys-error shen.initialise_arity_table))))
110
109
 
111
- (set shen-*catch* 0)
110
+ (defun arity (V802) (trap-error (get V802 arity (value *property-vector*)) (lambda E -1)))
112
111
 
113
- (defun shen-initialise_arity_table (V1540)
114
- (cond ((= () V1540) ())
115
- ((and (cons? V1540) (cons? (tl V1540)))
116
- (let DecArity
117
- (put (hd V1540) arity (hd (tl V1540)) (value shen-*property-vector*))
118
- (shen-initialise_arity_table (tl (tl V1540)))))
119
- (true (shen-sys-error shen-initialise_arity_table))))
112
+ (shen.initialise_arity_table (cons adjoin (cons 2 (cons and (cons 2 (cons append (cons 2 (cons arity (cons 1 (cons assoc (cons 2 (cons boolean? (cons 1 (cons cd (cons 1 (cons compile (cons 3 (cons concat (cons 2 (cons cons (cons 2 (cons cons? (cons 1 (cons cn (cons 2 (cons declare (cons 2 (cons destroy (cons 1 (cons difference (cons 2 (cons do (cons 2 (cons element? (cons 2 (cons empty? (cons 1 (cons enable-type-theory (cons 1 (cons interror (cons 2 (cons eval (cons 1 (cons eval-kl (cons 1 (cons explode (cons 1 (cons external (cons 1 (cons fail-if (cons 2 (cons fail (cons 0 (cons fix (cons 2 (cons findall (cons 5 (cons freeze (cons 1 (cons fst (cons 1 (cons gensym (cons 1 (cons get (cons 3 (cons get-time (cons 1 (cons address-> (cons 3 (cons <-address (cons 2 (cons <-vector (cons 2 (cons > (cons 2 (cons >= (cons 2 (cons = (cons 2 (cons hd (cons 1 (cons hdv (cons 1 (cons hdstr (cons 1 (cons head (cons 1 (cons if (cons 3 (cons integer? (cons 1 (cons identical (cons 4 (cons inferences (cons 0 (cons intersection (cons 2 (cons length (cons 1 (cons lineread (cons 0 (cons load (cons 1 (cons < (cons 2 (cons <= (cons 2 (cons vector (cons 1 (cons macroexpand (cons 1 (cons map (cons 2 (cons mapcan (cons 2 (cons maxinferences (cons 1 (cons not (cons 1 (cons nth (cons 2 (cons n->string (cons 1 (cons number? (cons 1 (cons occurs-check (cons 1 (cons occurrences (cons 2 (cons occurs-check (cons 1 (cons or (cons 2 (cons package (cons 3 (cons pos (cons 2 (cons print (cons 1 (cons profile (cons 1 (cons profile-results (cons 0 (cons pr (cons 2 (cons ps (cons 1 (cons preclude (cons 1 (cons preclude-all-but (cons 1 (cons protect (cons 1 (cons address-> (cons 3 (cons put (cons 4 (cons shen.reassemble (cons 2 (cons read-file-as-string (cons 1 (cons read-file (cons 1 (cons read-byte (cons 1 (cons read-from-string (cons 1 (cons remove (cons 2 (cons reverse (cons 1 (cons set (cons 2 (cons simple-error (cons 1 (cons snd (cons 1 (cons specialise (cons 1 (cons spy (cons 1 (cons step (cons 1 (cons stinput (cons 0 (cons stoutput (cons 0 (cons string->n (cons 1 (cons string->symbol (cons 1 (cons string? (cons 1 (cons shen.strong-warning (cons 1 (cons subst (cons 3 (cons shen.sum (cons 1 (cons symbol? (cons 1 (cons tail (cons 1 (cons tl (cons 1 (cons tc (cons 1 (cons tc? (cons 1 (cons thaw (cons 1 (cons track (cons 1 (cons trap-error (cons 2 (cons tuple? (cons 1 (cons type (cons 1 (cons return (cons 3 (cons undefmacro (cons 1 (cons unprofile (cons 1 (cons unify (cons 4 (cons unify! (cons 4 (cons union (cons 2 (cons untrack (cons 1 (cons unspecialise (cons 1 (cons undefmacro (cons 1 (cons vector (cons 1 (cons vector-> (cons 3 (cons value (cons 1 (cons variable? (cons 1 (cons version (cons 1 (cons warn (cons 1 (cons write-to-file (cons 2 (cons y-or-n? (cons 1 (cons + (cons 2 (cons * (cons 2 (cons / (cons 2 (cons - (cons 2 (cons == (cons 2 (cons shen.<1> (cons 1 (cons <e> (cons 1 (cons @p (cons 2 (cons @v (cons 2 (cons @s (cons 2 (cons preclude (cons 1 (cons include (cons 1 (cons preclude-all-but (cons 1 (cons include-all-but (cons 1 (cons where (cons 2 ())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
120
113
 
121
- (defun arity (V1541)
122
- (trap-error (get V1541 arity (value shen-*property-vector*)) (lambda E -1)))
114
+ (defun systemf (V803) (let Shen (intern "shen") (let External (get Shen shen.external-symbols (value *property-vector*)) (put Shen shen.external-symbols (adjoin V803 External) (value *property-vector*)))))
123
115
 
124
- (shen-initialise_arity_table
125
- (cons adjoin
126
- (cons 2
127
- (cons and
128
- (cons 2
129
- (cons append
130
- (cons 2
131
- (cons arity
132
- (cons 1
133
- (cons assoc
134
- (cons 2
135
- (cons boolean?
136
- (cons 1
137
- (cons cd
138
- (cons 1
139
- (cons compile
140
- (cons 3
141
- (cons concat
142
- (cons 2
143
- (cons cons
144
- (cons 2
145
- (cons cons?
146
- (cons 1
147
- (cons cn
148
- (cons 2
149
- (cons declare
150
- (cons 2
151
- (cons destroy
152
- (cons 1
153
- (cons difference
154
- (cons 2
155
- (cons do
156
- (cons 2
157
- (cons element?
158
- (cons 2
159
- (cons empty?
160
- (cons 1
161
- (cons shen-enable-type-theory
162
- (cons 1
163
- (cons interror
164
- (cons 2
165
- (cons eval
166
- (cons 1
167
- (cons eval-kl
168
- (cons 1
169
- (cons explode
170
- (cons 1
171
- (cons external
172
- (cons 1
173
- (cons fail-if
174
- (cons 2
175
- (cons fail
176
- (cons 0
177
- (cons fix
178
- (cons 2
179
- (cons findall
180
- (cons 5
181
- (cons freeze
182
- (cons 1
183
- (cons fst
184
- (cons 1
185
- (cons gensym
186
- (cons 1
187
- (cons get
188
- (cons 3
189
- (cons get-time
190
- (cons 1
191
- (cons
192
- address->
193
- (cons 3
194
- (cons
195
- <-address
196
- (cons 2
197
- (cons
198
- <-vector
199
- (cons 2
200
- (cons
201
- >
202
- (cons
203
- 2
204
- (cons
205
- >=
206
- (cons
207
- 2
208
- (cons
209
- =
210
- (cons
211
- 2
212
- (cons
213
- hd
214
- (cons
215
- 1
216
- (cons
217
- hdv
218
- (cons
219
- 1
220
- (cons
221
- hdstr
222
- (cons
223
- 1
224
- (cons
225
- head
226
- (cons
227
- 1
228
- (cons
229
- if
230
- (cons
231
- 3
232
- (cons
233
- integer?
234
- (cons
235
- 1
236
- (cons
237
- identical
238
- (cons
239
- 4
240
- (cons
241
- inferences
242
- (cons
243
- 1
244
- (cons
245
- intoutput
246
- (cons
247
- 2
248
- (cons
249
- make-string
250
- (cons
251
- 2
252
- (cons
253
- intersection
254
- (cons
255
- 2
256
- (cons
257
- length
258
- (cons
259
- 1
260
- (cons
261
- lineread
262
- (cons
263
- 0
264
- (cons
265
- load
266
- (cons
267
- 1
268
- (cons
269
- <
270
- (cons
271
- 2
272
- (cons
273
- <=
274
- (cons
275
- 2
276
- (cons
277
- vector
278
- (cons
279
- 1
280
- (cons
281
- macroexpand
282
- (cons
283
- 1
284
- (cons
285
- map
286
- (cons
287
- 2
288
- (cons
289
- mapcan
290
- (cons
291
- 2
292
- (cons
293
- intmake-string
294
- (cons
295
- 2
296
- (cons
297
- maxinferences
298
- (cons
299
- 1
300
- (cons
301
- not
302
- (cons
303
- 1
304
- (cons
305
- nth
306
- (cons
307
- 2
308
- (cons
309
- n->string
310
- (cons
311
- 1
312
- (cons
313
- number?
314
- (cons
315
- 1
316
- (cons
317
- output
318
- (cons
319
- 2
320
- (cons
321
- occurs-check
322
- (cons
323
- 1
324
- (cons
325
- occurrences
326
- (cons
327
- 2
328
- (cons
329
- occurs-check
330
- (cons
331
- 1
332
- (cons
333
- or
334
- (cons
335
- 2
336
- (cons
337
- package
338
- (cons
339
- 3
340
- (cons
341
- pos
342
- (cons
343
- 2
344
- (cons
345
- print
346
- (cons
347
- 1
348
- (cons
349
- profile
350
- (cons
351
- 1
352
- (cons
353
- profile-results
354
- (cons
355
- 1
356
- (cons
357
- ps
358
- (cons
359
- 1
360
- (cons
361
- preclude
362
- (cons
363
- 1
364
- (cons
365
- preclude-all-but
366
- (cons
367
- 1
368
- (cons
369
- protect
370
- (cons
371
- 1
372
- (cons
373
- address->
374
- (cons
375
- 3
376
- (cons
377
- put
378
- (cons
379
- 4
380
- (cons
381
- shen-reassemble
382
- (cons
383
- 2
384
- (cons
385
- read-file-as-string
386
- (cons
387
- 1
388
- (cons
389
- read-file
390
- (cons
391
- 1
392
- (cons
393
- read-byte
394
- (cons
395
- 1
396
- (cons
397
- read-from-string
398
- (cons
399
- 1
400
- (cons
401
- remove
402
- (cons
403
- 2
404
- (cons
405
- reverse
406
- (cons
407
- 1
408
- (cons
409
- set
410
- (cons
411
- 2
412
- (cons
413
- simple-error
414
- (cons
415
- 1
416
- (cons
417
- snd
418
- (cons
419
- 1
420
- (cons
421
- specialise
422
- (cons
423
- 1
424
- (cons
425
- spy
426
- (cons
427
- 1
428
- (cons
429
- step
430
- (cons
431
- 1
432
- (cons
433
- stinput
434
- (cons
435
- 1
436
- (cons
437
- shen-stoutput
438
- (cons
439
- 1
440
- (cons
441
- string->n
442
- (cons
443
- 1
444
- (cons
445
- string?
446
- (cons
447
- 1
448
- (cons
449
- strong-warning
450
- (cons
451
- 1
452
- (cons
453
- subst
454
- (cons
455
- 3
456
- (cons
457
- symbol?
458
- (cons
459
- 1
460
- (cons
461
- tail
462
- (cons
463
- 1
464
- (cons
465
- tl
466
- (cons
467
- 1
468
- (cons
469
- tc
470
- (cons
471
- 1
472
- (cons
473
- tc?
474
- (cons
475
- 1
476
- (cons
477
- thaw
478
- (cons
479
- 1
480
- (cons
481
- track
482
- (cons
483
- 1
484
- (cons
485
- trap-error
486
- (cons
487
- 2
488
- (cons
489
- tuple?
490
- (cons
491
- 1
492
- (cons
493
- type
494
- (cons
495
- 1
496
- (cons
497
- return
498
- (cons
499
- 3
500
- (cons
501
- shen-undefmacro
502
- (cons
503
- 1
504
- (cons
505
- unprofile
506
- (cons
507
- 1
508
- (cons
509
- unify
510
- (cons
511
- 4
512
- (cons
513
- unify!
514
- (cons
515
- 4
516
- (cons
517
- union
518
- (cons
519
- 2
520
- (cons
521
- untrack
522
- (cons
523
- 1
524
- (cons
525
- unspecialise
526
- (cons
527
- 1
528
- (cons
529
- vector
530
- (cons
531
- 1
532
- (cons
533
- vector->
534
- (cons
535
- 3
536
- (cons
537
- value
538
- (cons
539
- 1
540
- (cons
541
- variable?
542
- (cons
543
- 1
544
- (cons
545
- version
546
- (cons
547
- 1
548
- (cons
549
- warn
550
- (cons
551
- 1
552
- (cons
553
- write-to-file
554
- (cons
555
- 2
556
- (cons
557
- y-or-n?
558
- (cons
559
- 1
560
- (cons
561
- +
562
- (cons
563
- 2
564
- (cons
565
- *
566
- (cons
567
- 2
568
- (cons
569
- /
570
- (cons
571
- 2
572
- (cons
573
- -
574
- (cons
575
- 2
576
- (cons
577
- ==
578
- (cons
579
- 2
580
- (cons
581
- shen-<1>
582
- (cons
583
- 1
584
- (cons
585
- <e>
586
- (cons
587
- 1
588
- (cons
589
- @p
590
- (cons
591
- 2
592
- (cons
593
- @v
594
- (cons
595
- 2
596
- (cons
597
- @s
598
- (cons
599
- 2
600
- (cons
601
- preclude
602
- (cons
603
- 1
604
- (cons
605
- include
606
- (cons
607
- 1
608
- (cons
609
- preclude-all-but
610
- (cons
611
- 1
612
- (cons
613
- include-all-but
614
- (cons
615
- 1
616
- (cons
617
- where
618
- (cons
619
- 2
620
- ())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
116
+ (defun adjoin (V804 V805) (if (element? V804 V805) V805 (cons V804 V805)))
621
117
 
622
- (defun systemf (V1542)
623
- (set shen-*system* (adjoin V1542 (value shen-*system*))))
118
+ (put (intern "shen") shen.external-symbols (cons ! (cons } (cons { (cons --> (cons <-- (cons && (cons : (cons ; (cons :- (cons := (cons _ (cons *language* (cons *implementation* (cons *stinput* (cons *home-directory* (cons *version* (cons *maximum-print-sequence-size* (cons *macros* (cons *os* (cons *release* (cons *property-vector* (cons @v (cons @p (cons @s (cons *port* (cons *porters* (cons <- (cons -> (cons <e> (cons == (cons = (cons >= (cons > (cons /. (cons =! (cons $ (cons - (cons / (cons * (cons + (cons <= (cons < (cons >> (cons (vector 0) (cons ==> (cons y-or-n? (cons write-to-file (cons where (cons when (cons warn (cons version (cons verified (cons variable? (cons value (cons vector-> (cons <-vector (cons vector (cons vector? (cons unspecialise (cons untrack (cons unit (cons shen.unix (cons union (cons unify (cons unify! (cons unprofile (cons undefmacro (cons return (cons type (cons tuple? (cons true (cons trap-error (cons track (cons time (cons thaw (cons tc? (cons tc (cons tl (cons tlstr (cons tlv (cons tail (cons systemf (cons synonyms (cons symbol (cons symbol? (cons string->symbol (cons subst (cons string? (cons string->n (cons stream (cons string (cons stinput (cons stoutput (cons step (cons spy (cons specialise (cons snd (cons simple-error (cons set (cons save (cons str (cons run (cons reverse (cons remove (cons read (cons read-file (cons read-file-as-bytelist (cons read-file-as-string (cons read-byte (cons read-from-string (cons quit (cons put (cons preclude (cons preclude-all-but (cons ps (cons prolog? (cons protect (cons profile-results (cons profile (cons print (cons pr (cons pos (cons package (cons output (cons out (cons or (cons open (cons occurrences (cons occurs-check (cons n->string (cons number? (cons number (cons null (cons nth (cons not (cons nl (cons mode (cons macro (cons macroexpand (cons maxinferences (cons mapcan (cons map (cons make-string (cons load (cons loaded (cons list (cons lineread (cons limit (cons length (cons let (cons lazy (cons lambda (cons is (cons intersection (cons inferences (cons intern (cons integer? (cons input (cons input+ (cons include (cons include-all-but (cons if (cons identical (cons head (cons hd (cons hdv (cons hdstr (cons hash (cons get (cons get-time (cons gensym (cons function (cons fst (cons freeze (cons fix (cons file (cons fail (cons fail-if (cons fwhen (cons findall (cons false (cons enable-type-theory (cons explode (cons external (cons exception (cons eval-kl (cons eval (cons error-to-string (cons error (cons empty? (cons element? (cons do (cons difference (cons destroy (cons defun (cons define (cons defmacro (cons defcc (cons defprolog (cons declare (cons datatype (cons cut (cons cn (cons cons? (cons cons (cons cond (cons concat (cons compile (cons cd (cons cases (cons call (cons close (cons bind (cons bound? (cons boolean? (cons boolean (cons bar! (cons assoc (cons arity (cons append (cons and (cons adjoin (cons <-address (cons address-> (cons absvector? (cons absvector (cons abort ()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) (value *property-vector*))
624
119
 
625
- (defun adjoin (V1543 V1544)
626
- (if (element? V1543 V1544) V1544 (cons V1543 V1544)))
120
+ (defun specialise (V806) (do (set shen.*special* (cons V806 (value shen.*special*))) V806))
627
121
 
628
- (map (lambda X (do (systemf X) X))
629
- (cons !
630
- (cons }
631
- (cons {
632
- (cons -->
633
- (cons <--
634
- (cons &&
635
- (cons :
636
- (cons ;
637
- (cons :-
638
- (cons :=
639
- (cons (intern "_")
640
- (cons <!>
641
- (cons -*-
642
- (cons *language*
643
- (cons *implementation*
644
- (cons *stinput*
645
- (cons *home-directory*
646
- (cons *version*
647
- (cons *maximum-print-sequence-size*
648
- (cons *printer*
649
- (cons *macros*
650
- (cons *os*
651
- (cons *release*
652
- (cons @v
653
- (cons @p
654
- (cons @s
655
- (cons <-
656
- (cons ->
657
- (cons <e>
658
- (cons ==
659
- (cons =
660
- (cons >=
661
- (cons >
662
- (cons /.
663
- (cons =!
664
- (cons $
665
- (cons -
666
- (cons /
667
- (cons *
668
- (cons +
669
- (cons <=
670
- (cons <
671
- (cons >>
672
- (cons <>
673
- (cons y-or-n?
674
- (cons write-to-file
675
- (cons where
676
- (cons when
677
- (cons warn
678
- (cons version
679
- (cons verified
680
- (cons variable?
681
- (cons value
682
- (cons vector->
683
- (cons <-vector
684
- (cons vector
685
- (cons vector?
686
- (cons unspecialise
687
- (cons untrack
688
- (cons shen-unix
689
- (cons union
690
- (cons unify
691
- (cons unify!
692
- (cons unprofile
693
- (cons
694
- shen-undefmacro
695
- (cons return
696
- (cons type
697
- (cons
698
- tuple?
699
- (cons true
700
- (cons
701
- trap-error
702
- (cons
703
- track
704
- (cons
705
- time
706
- (cons
707
- thaw
708
- (cons
709
- tc?
710
- (cons
711
- tc
712
- (cons
713
- tl
714
- (cons
715
- tlstr
716
- (cons
717
- tlv
718
- (cons
719
- tail
720
- (cons
721
- systemf
722
- (cons
723
- synonyms
724
- (cons
725
- symbol
726
- (cons
727
- symbol?
728
- (cons
729
- subst
730
- (cons
731
- string?
732
- (cons
733
- string->n
734
- (cons
735
- stream
736
- (cons
737
- string
738
- (cons
739
- stinput
740
- (cons
741
- shen-stoutput
742
- (cons
743
- step
744
- (cons
745
- spy
746
- (cons
747
- specialise
748
- (cons
749
- snd
750
- (cons
751
- simple-error
752
- (cons
753
- set
754
- (cons
755
- save
756
- (cons
757
- str
758
- (cons
759
- run
760
- (cons
761
- reverse
762
- (cons
763
- remove
764
- (cons
765
- read
766
- (cons
767
- read-file
768
- (cons
769
- read-file-as-bytelist
770
- (cons
771
- read-file-as-string
772
- (cons
773
- read-byte
774
- (cons
775
- read-from-string
776
- (cons
777
- quit
778
- (cons
779
- put
780
- (cons
781
- preclude
782
- (cons
783
- preclude-all-but
784
- (cons
785
- ps
786
- (cons
787
- prolog?
788
- (cons
789
- protect
790
- (cons
791
- profile-results
792
- (cons
793
- profile
794
- (cons
795
- print
796
- (cons
797
- pr
798
- (cons
799
- pos
800
- (cons
801
- package
802
- (cons
803
- output
804
- (cons
805
- out
806
- (cons
807
- or
808
- (cons
809
- open
810
- (cons
811
- occurrences
812
- (cons
813
- occurs-check
814
- (cons
815
- n->string
816
- (cons
817
- number?
818
- (cons
819
- number
820
- (cons
821
- null
822
- (cons
823
- nth
824
- (cons
825
- not
826
- (cons
827
- nl
828
- (cons
829
- mode
830
- (cons
831
- macro
832
- (cons
833
- macroexpand
834
- (cons
835
- maxinferences
836
- (cons
837
- mapcan
838
- (cons
839
- map
840
- (cons
841
- make-string
842
- (cons
843
- load
844
- (cons
845
- loaded
846
- (cons
847
- list
848
- (cons
849
- lineread
850
- (cons
851
- limit
852
- (cons
853
- length
854
- (cons
855
- let
856
- (cons
857
- lazy
858
- (cons
859
- lambda
860
- (cons
861
- is
862
- (cons
863
- intersection
864
- (cons
865
- inferences
866
- (cons
867
- intern
868
- (cons
869
- integer?
870
- (cons
871
- input
872
- (cons
873
- input+
874
- (cons
875
- include
876
- (cons
877
- include-all-but
878
- (cons
879
- in
880
- (cons
881
- if
882
- (cons
883
- identical
884
- (cons
885
- head
886
- (cons
887
- hd
888
- (cons
889
- hdv
890
- (cons
891
- hdstr
892
- (cons
893
- hash
894
- (cons
895
- get
896
- (cons
897
- get-time
898
- (cons
899
- gensym
900
- (cons
901
- function
902
- (cons
903
- fst
904
- (cons
905
- freeze
906
- (cons
907
- format
908
- (cons
909
- fix
910
- (cons
911
- file
912
- (cons
913
- fail
914
- (cons
915
- fail-if
916
- (cons
917
- fwhen
918
- (cons
919
- findall
920
- (cons
921
- false
922
- (cons
923
- shen-enable-type-theory
924
- (cons
925
- explode
926
- (cons
927
- external
928
- (cons
929
- exception
930
- (cons
931
- eval-kl
932
- (cons
933
- eval
934
- (cons
935
- error-to-string
936
- (cons
937
- error
938
- (cons
939
- empty?
940
- (cons
941
- element?
942
- (cons
943
- do
944
- (cons
945
- difference
946
- (cons
947
- destroy
948
- (cons
949
- defun
950
- (cons
951
- define
952
- (cons
953
- defmacro
954
- (cons
955
- defcc
956
- (cons
957
- defprolog
958
- (cons
959
- declare
960
- (cons
961
- datatype
962
- (cons
963
- cut
964
- (cons
965
- cn
966
- (cons
967
- cons?
968
- (cons
969
- cons
970
- (cons
971
- cond
972
- (cons
973
- concat
974
- (cons
975
- compile
976
- (cons
977
- cd
978
- (cons
979
- cases
980
- (cons
981
- call
982
- (cons
983
- close
984
- (cons
985
- bind
986
- (cons
987
- bound?
988
- (cons
989
- boolean?
990
- (cons
991
- boolean
992
- (cons
993
- bar!
994
- (cons
995
- assoc
996
- (cons
997
- arity
998
- (cons
999
- append
1000
- (cons
1001
- and
1002
- (cons
1003
- adjoin
1004
- (cons
1005
- <-address
1006
- (cons
1007
- address->
1008
- (cons
1009
- absvector?
1010
- (cons
1011
- absvector
1012
- (cons
1013
- abort
1014
- (cons
1015
- intmake-string
1016
- (cons
1017
- intoutput
1018
- (cons
1019
- interror
1020
- ()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
122
+ (defun unspecialise (V807) (do (set shen.*special* (remove V807 (value shen.*special*))) V807))
1021
123
 
1022
- (defun specialise (V1545)
1023
- (do (set shen-*special* (cons V1545 (value shen-*special*))) V1545))
1024
124
 
1025
- (defun unspecialise (V1546)
1026
- (do (set shen-*special* (remove V1546 (value shen-*special*))) V1546))
1027
125