shen-ruby 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/.gitignore +4 -0
  2. data/.rspec +0 -0
  3. data/Gemfile +6 -0
  4. data/Gemfile.lock +20 -0
  5. data/MIT_LICENSE.txt +26 -0
  6. data/README.md +94 -0
  7. data/bin/shen_test_suite.rb +9 -0
  8. data/bin/srrepl +23 -0
  9. data/lib/kl.rb +7 -0
  10. data/lib/kl/absvector.rb +12 -0
  11. data/lib/kl/compiler.rb +253 -0
  12. data/lib/kl/cons.rb +51 -0
  13. data/lib/kl/empty_list.rb +12 -0
  14. data/lib/kl/environment.rb +123 -0
  15. data/lib/kl/error.rb +4 -0
  16. data/lib/kl/internal_error.rb +7 -0
  17. data/lib/kl/lexer.rb +186 -0
  18. data/lib/kl/primitives/arithmetic.rb +60 -0
  19. data/lib/kl/primitives/assignments.rb +18 -0
  20. data/lib/kl/primitives/booleans.rb +17 -0
  21. data/lib/kl/primitives/error_handling.rb +13 -0
  22. data/lib/kl/primitives/generic_functions.rb +22 -0
  23. data/lib/kl/primitives/lists.rb +21 -0
  24. data/lib/kl/primitives/streams.rb +38 -0
  25. data/lib/kl/primitives/strings.rb +55 -0
  26. data/lib/kl/primitives/symbols.rb +17 -0
  27. data/lib/kl/primitives/time.rb +17 -0
  28. data/lib/kl/primitives/vectors.rb +30 -0
  29. data/lib/kl/reader.rb +40 -0
  30. data/lib/kl/trampoline.rb +14 -0
  31. data/lib/shen_ruby.rb +7 -0
  32. data/lib/shen_ruby/version.rb +3 -0
  33. data/shen-ruby.gemspec +26 -0
  34. data/shen/README.txt +17 -0
  35. data/shen/lib/shen_ruby/shen.rb +124 -0
  36. data/shen/license.txt +34 -0
  37. data/shen/release/benchmarks/N_queens.shen +45 -0
  38. data/shen/release/benchmarks/README.shen +14 -0
  39. data/shen/release/benchmarks/benchmarks.shen +56 -0
  40. data/shen/release/benchmarks/bigprog +2173 -0
  41. data/shen/release/benchmarks/br.shen +13 -0
  42. data/shen/release/benchmarks/einstein.shen +33 -0
  43. data/shen/release/benchmarks/heatwave.gif +0 -0
  44. data/shen/release/benchmarks/interpreter.shen +219 -0
  45. data/shen/release/benchmarks/picture.jpg +0 -0
  46. data/shen/release/benchmarks/plato.jpg +0 -0
  47. data/shen/release/benchmarks/powerset.shen +10 -0
  48. data/shen/release/benchmarks/prime.shen +10 -0
  49. data/shen/release/benchmarks/short.shen +129 -0
  50. data/shen/release/benchmarks/text.txt +68 -0
  51. data/shen/release/k_lambda/core.kl +1002 -0
  52. data/shen/release/k_lambda/declarations.kl +1021 -0
  53. data/shen/release/k_lambda/load.kl +94 -0
  54. data/shen/release/k_lambda/macros.kl +479 -0
  55. data/shen/release/k_lambda/prolog.kl +1309 -0
  56. data/shen/release/k_lambda/reader.kl +1058 -0
  57. data/shen/release/k_lambda/sequent.kl +556 -0
  58. data/shen/release/k_lambda/sys.kl +582 -0
  59. data/shen/release/k_lambda/t-star.kl +3493 -0
  60. data/shen/release/k_lambda/toplevel.kl +223 -0
  61. data/shen/release/k_lambda/track.kl +208 -0
  62. data/shen/release/k_lambda/types.kl +455 -0
  63. data/shen/release/k_lambda/writer.kl +108 -0
  64. data/shen/release/k_lambda/yacc.kl +280 -0
  65. data/shen/release/test_programs/Chap13/problems.txt +26 -0
  66. data/shen/release/test_programs/README.shen +53 -0
  67. data/shen/release/test_programs/TinyLispFunctions.txt +16 -0
  68. data/shen/release/test_programs/TinyTypes.shen +55 -0
  69. data/shen/release/test_programs/binary.shen +24 -0
  70. data/shen/release/test_programs/bubble_version_1.shen +28 -0
  71. data/shen/release/test_programs/bubble_version_2.shen +22 -0
  72. data/shen/release/test_programs/calculator.shen +21 -0
  73. data/shen/release/test_programs/cartprod.shen +23 -0
  74. data/shen/release/test_programs/change.shen +25 -0
  75. data/shen/release/test_programs/classes-defaults.shen +94 -0
  76. data/shen/release/test_programs/classes-inheritance.shen +100 -0
  77. data/shen/release/test_programs/classes-typed.shen +74 -0
  78. data/shen/release/test_programs/classes-untyped.shen +46 -0
  79. data/shen/release/test_programs/depth_.shen +14 -0
  80. data/shen/release/test_programs/einstein.shen +33 -0
  81. data/shen/release/test_programs/fruit_machine.shen +46 -0
  82. data/shen/release/test_programs/interpreter.shen +219 -0
  83. data/shen/release/test_programs/metaprog.shen +85 -0
  84. data/shen/release/test_programs/minim.shen +193 -0
  85. data/shen/release/test_programs/mutual.shen +11 -0
  86. data/shen/release/test_programs/n_queens.shen +45 -0
  87. data/shen/release/test_programs/newton_version_1.shen +33 -0
  88. data/shen/release/test_programs/newton_version_2.shen +24 -0
  89. data/shen/release/test_programs/parse.prl +14 -0
  90. data/shen/release/test_programs/parser.shen +52 -0
  91. data/shen/release/test_programs/powerset.shen +10 -0
  92. data/shen/release/test_programs/prime.shen +10 -0
  93. data/shen/release/test_programs/proof_assistant.shen +81 -0
  94. data/shen/release/test_programs/proplog_version_1.shen +25 -0
  95. data/shen/release/test_programs/proplog_version_2.shen +27 -0
  96. data/shen/release/test_programs/qmachine.shen +67 -0
  97. data/shen/release/test_programs/red-black.shen +55 -0
  98. data/shen/release/test_programs/search.shen +56 -0
  99. data/shen/release/test_programs/semantic_net.shen +44 -0
  100. data/shen/release/test_programs/spreadsheet.shen +35 -0
  101. data/shen/release/test_programs/stack.shen +27 -0
  102. data/shen/release/test_programs/streams.shen +20 -0
  103. data/shen/release/test_programs/strings.shen +59 -0
  104. data/shen/release/test_programs/structures-typed.shen +71 -0
  105. data/shen/release/test_programs/structures-untyped.shen +42 -0
  106. data/shen/release/test_programs/tests.shen +294 -0
  107. data/shen/release/test_programs/types.shen +11 -0
  108. data/shen/release/test_programs/whist.shen +240 -0
  109. data/shen/release/test_programs/yacc.shen +136 -0
  110. data/spec/kl/cons_spec.rb +12 -0
  111. data/spec/kl/environment_spec.rb +306 -0
  112. data/spec/kl/lexer_spec.rb +149 -0
  113. data/spec/kl/primitives/generic_functions_spec.rb +29 -0
  114. data/spec/kl/primitives/symbols_spec.rb +21 -0
  115. data/spec/kl/reader_spec.rb +36 -0
  116. data/spec/spec_helper.rb +2 -0
  117. metadata +189 -0
@@ -0,0 +1,3493 @@
1
+ " The License
2
+
3
+
4
+
5
+ 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.
6
+
7
+
8
+
9
+ 1. The license applies to all the software and all derived software and must appear on such.
10
+
11
+ 2. It is illegal to distribute the software without this license attached to it and use of the software implies agreement
12
+
13
+ with the license as such. It is illegal for anyone who is not the copyright holder to tamper with or change the license.
14
+
15
+ 3. Neither the names of Lambda Associates or the copyright holder may be used to endorse or promote products built using
16
+
17
+ the software without specific prior written permission from the copyright holder.
18
+
19
+ 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.
20
+
21
+ 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 it clear with his distribution that he/she is the author of the changes and what these changes are and why.
22
+
23
+ 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.
24
+
25
+ 7. It is permitted to distribute versions of Shen which incorporate libraries, graphics or other facilities which are not part of the Shen standard.
26
+
27
+
28
+
29
+ For an explication of this license see http://www.lambdassociates.org/News/june11/license.htm which explains this license in full."
30
+
31
+ (defun shen-typecheck (V761 V762)
32
+ (let Curry (shen-curry V761)
33
+ (let ProcessN (shen-start-new-prolog-process)
34
+ (let Type
35
+ (shen-insert-prolog-variables (shen-normalise-type (shen-curry-type V762))
36
+ ProcessN)
37
+ (let Continuation (freeze (return Type ProcessN shen-void))
38
+ (shen-t* (cons Curry (cons : (cons Type ()))) () ProcessN Continuation))))))
39
+
40
+ (defun shen-curry (V763)
41
+ (cond
42
+ ((and (cons? V763) (shen-special? (hd V763)))
43
+ (cons (hd V763) (map (lambda X (shen-curry X)) (tl V763))))
44
+ ((and (cons? V763) (and (cons? (tl V763)) (shen-extraspecial? (hd V763))))
45
+ V763)
46
+ ((and (cons? V763) (and (cons? (tl V763)) (cons? (tl (tl V763)))))
47
+ (shen-curry
48
+ (cons (cons (hd V763) (cons (hd (tl V763)) ())) (tl (tl V763)))))
49
+ ((and (cons? V763) (and (cons? (tl V763)) (= () (tl (tl V763)))))
50
+ (cons (shen-curry (hd V763)) (cons (shen-curry (hd (tl V763))) ())))
51
+ (true V763)))
52
+
53
+ (defun shen-special? (V764) (element? V764 (value shen-*special*)))
54
+
55
+ (defun shen-extraspecial? (V765) (element? V765 (value shen-*extraspecial*)))
56
+
57
+ (defun shen-t* (V622 V623 V624 V625)
58
+ (let Throwcontrol (shen-catchpoint)
59
+ (shen-cutpoint Throwcontrol
60
+ (let Case
61
+ (let Error (shen-newpv V624)
62
+ (do (shen-incinfs)
63
+ (fwhen (shen-maxinfexceeded?) V624
64
+ (freeze (bind Error (shen-errormaxinfs) V624 V625)))))
65
+ (if (= Case false)
66
+ (let Case
67
+ (let V616 (shen-lazyderef V622 V624)
68
+ (if (= fail V616)
69
+ (do (shen-incinfs)
70
+ (cut Throwcontrol V624 (freeze (shen-prolog-failure V624 V625))))
71
+ false))
72
+ (if (= Case false)
73
+ (let Case
74
+ (let V617 (shen-lazyderef V622 V624)
75
+ (if (cons? V617)
76
+ (let X (hd V617)
77
+ (let V618 (shen-lazyderef (tl V617) V624)
78
+ (if (cons? V618)
79
+ (let V619 (shen-lazyderef (hd V618) V624)
80
+ (if (= : V619)
81
+ (let V620 (shen-lazyderef (tl V618) V624)
82
+ (if (cons? V620)
83
+ (let A (hd V620)
84
+ (let V621 (shen-lazyderef (tl V620) V624)
85
+ (if (= () V621)
86
+ (do (shen-incinfs)
87
+ (fwhen (shen-type-theory-enabled?) V624
88
+ (freeze
89
+ (cut Throwcontrol V624
90
+ (freeze (shen-th* X A V623 V624 V625))))))
91
+ false)))
92
+ false))
93
+ false))
94
+ false)))
95
+ false))
96
+ (if (= Case false)
97
+ (let Datatypes (shen-newpv V624)
98
+ (do (shen-incinfs)
99
+ (shen-show V622 V623 V624
100
+ (freeze
101
+ (bind Datatypes (value shen-*datatypes*) V624
102
+ (freeze (shen-udefs* V622 V623 Datatypes V624 V625)))))))
103
+ Case))
104
+ Case))
105
+ Case)))))
106
+
107
+ (defun shen-type-theory-enabled? ()
108
+ (value shen-*shen-type-theory-enabled?*))
109
+
110
+ (defun enable-type-theory (V630)
111
+ (cond ((= + V630) (set shen-*shen-type-theory-enabled?* true))
112
+ ((= - V630) (set shen-*shen-type-theory-enabled?* false))
113
+ (true (interror "enable-type-theory expects a + or a -~%" ()))))
114
+
115
+ (defun shen-prolog-failure (V584 V585) false)
116
+
117
+ (defun shen-maxinfexceeded? ()
118
+ (> (inferences shen-skip) (value shen-*maxinferences*)))
119
+
120
+ (defun shen-errormaxinfs () (simple-error "maximum inferences exceeded~%"))
121
+
122
+ (defun shen-udefs* (V773 V774 V775 V776 V777)
123
+ (let Case
124
+ (let V749 (shen-lazyderef V775 V776)
125
+ (if (cons? V749)
126
+ (let D (hd V749)
127
+ (do (shen-incinfs) (call (cons D (cons V773 (cons V774 ()))) V776 V777)))
128
+ false))
129
+ (if (= Case false)
130
+ (let V750 (shen-lazyderef V775 V776)
131
+ (if (cons? V750)
132
+ (let Ds (tl V750)
133
+ (do (shen-incinfs) (shen-udefs* V773 V774 Ds V776 V777)))
134
+ false))
135
+ Case)))
136
+
137
+ (defun shen-th* (V786 V787 V788 V789 V790)
138
+ (let Throwcontrol (shen-catchpoint)
139
+ (shen-cutpoint Throwcontrol
140
+ (let Case
141
+ (do (shen-incinfs)
142
+ (shen-show (cons V786 (cons : (cons V787 ()))) V788 V789
143
+ (freeze (fwhen false V789 V790))))
144
+ (if (= Case false)
145
+ (let Case
146
+ (let F (shen-newpv V789)
147
+ (do (shen-incinfs)
148
+ (fwhen (shen-typedf? (shen-lazyderef V786 V789)) V789
149
+ (freeze
150
+ (bind F (shen-sigf (shen-lazyderef V786 V789)) V789
151
+ (freeze (call (cons F (cons V787 ())) V789 V790)))))))
152
+ (if (= Case false)
153
+ (let Case (do (shen-incinfs) (shen-base V786 V787 V789 V790))
154
+ (if (= Case false)
155
+ (let Case
156
+ (do (shen-incinfs) (shen-by_hypothesis V786 V787 V788 V789 V790))
157
+ (if (= Case false)
158
+ (let Case
159
+ (let V678 (shen-lazyderef V786 V789)
160
+ (if (cons? V678)
161
+ (let F (hd V678)
162
+ (let V679 (shen-lazyderef (tl V678) V789)
163
+ (if (cons? V679)
164
+ (let X (hd V679)
165
+ (let V680 (shen-lazyderef (tl V679) V789)
166
+ (if (= () V680)
167
+ (let B (shen-newpv V789)
168
+ (do (shen-incinfs)
169
+ (shen-th* F (cons B (cons --> (cons V787 ()))) V788 V789
170
+ (freeze (shen-th* X B V788 V789 V790)))))
171
+ false)))
172
+ false)))
173
+ false))
174
+ (if (= Case false)
175
+ (let Case
176
+ (let V681 (shen-lazyderef V786 V789)
177
+ (if (cons? V681)
178
+ (let V682 (shen-lazyderef (hd V681) V789)
179
+ (if (= cons V682)
180
+ (let V683 (shen-lazyderef (tl V681) V789)
181
+ (if (cons? V683)
182
+ (let X (hd V683)
183
+ (let V684 (shen-lazyderef (tl V683) V789)
184
+ (if (cons? V684)
185
+ (let Y (hd V684)
186
+ (let V685 (shen-lazyderef (tl V684) V789)
187
+ (if (= () V685)
188
+ (let V686 (shen-lazyderef V787 V789)
189
+ (if (cons? V686)
190
+ (let V687 (shen-lazyderef (hd V686) V789)
191
+ (if (= list V687)
192
+ (let V688 (shen-lazyderef (tl V686) V789)
193
+ (if (cons? V688)
194
+ (let A (hd V688)
195
+ (let V689 (shen-lazyderef (tl V688) V789)
196
+ (if (= () V689)
197
+ (do (shen-incinfs)
198
+ (shen-th* X A V788 V789
199
+ (freeze
200
+ (shen-th* Y (cons list (cons A ())) V788
201
+ V789 V790))))
202
+ (if (shen-pvar? V689)
203
+ (do (shen-bindv V689 () V789)
204
+ (let Result
205
+ (do (shen-incinfs)
206
+ (shen-th* X A V788 V789
207
+ (freeze
208
+ (shen-th* Y (cons list (cons A ()))
209
+ V788 V789 V790))))
210
+ (do (shen-unbindv V689 V789) Result)))
211
+ false))))
212
+ (if (shen-pvar? V688)
213
+ (let A (shen-newpv V789)
214
+ (do (shen-bindv V688 (cons A ()) V789)
215
+ (let Result
216
+ (do (shen-incinfs)
217
+ (shen-th* X A V788 V789
218
+ (freeze
219
+ (shen-th* Y (cons list (cons A ()))
220
+ V788 V789 V790))))
221
+ (do (shen-unbindv V688 V789) Result))))
222
+ false)))
223
+ (if (shen-pvar? V687)
224
+ (do (shen-bindv V687 list V789)
225
+ (let Result
226
+ (let V690 (shen-lazyderef (tl V686) V789)
227
+ (if (cons? V690)
228
+ (let A (hd V690)
229
+ (let V691 (shen-lazyderef (tl V690) V789)
230
+ (if (= () V691)
231
+ (do (shen-incinfs)
232
+ (shen-th* X A V788 V789
233
+ (freeze
234
+ (shen-th* Y (cons list (cons A ()))
235
+ V788 V789 V790))))
236
+ (if (shen-pvar? V691)
237
+ (do (shen-bindv V691 () V789)
238
+ (let Result
239
+ (do (shen-incinfs)
240
+ (shen-th* X A V788 V789
241
+ (freeze
242
+ (shen-th* Y
243
+ (cons list (cons A ())) V788 V789
244
+ V790))))
245
+ (do (shen-unbindv V691 V789) Result)))
246
+ false))))
247
+ (if (shen-pvar? V690)
248
+ (let A (shen-newpv V789)
249
+ (do (shen-bindv V690 (cons A ()) V789)
250
+ (let Result
251
+ (do (shen-incinfs)
252
+ (shen-th* X A V788 V789
253
+ (freeze
254
+ (shen-th* Y (cons list (cons A ()))
255
+ V788 V789 V790))))
256
+ (do (shen-unbindv V690 V789) Result))))
257
+ false)))
258
+ (do (shen-unbindv V687 V789) Result)))
259
+ false)))
260
+ (if (shen-pvar? V686)
261
+ (let A (shen-newpv V789)
262
+ (do
263
+ (shen-bindv V686 (cons list (cons A ())) V789)
264
+ (let Result
265
+ (do (shen-incinfs)
266
+ (shen-th* X A V788 V789
267
+ (freeze
268
+ (shen-th* Y (cons list (cons A ())) V788
269
+ V789 V790))))
270
+ (do (shen-unbindv V686 V789) Result))))
271
+ false)))
272
+ false)))
273
+ false)))
274
+ false))
275
+ false))
276
+ false))
277
+ (if (= Case false)
278
+ (let Case
279
+ (let V692 (shen-lazyderef V786 V789)
280
+ (if (cons? V692)
281
+ (let V693 (shen-lazyderef (hd V692) V789)
282
+ (if (= @p V693)
283
+ (let V694 (shen-lazyderef (tl V692) V789)
284
+ (if (cons? V694)
285
+ (let X (hd V694)
286
+ (let V695 (shen-lazyderef (tl V694) V789)
287
+ (if (cons? V695)
288
+ (let Y (hd V695)
289
+ (let V696 (shen-lazyderef (tl V695) V789)
290
+ (if (= () V696)
291
+ (let V697 (shen-lazyderef V787 V789)
292
+ (if (cons? V697)
293
+ (let A (hd V697)
294
+ (let V698 (shen-lazyderef (tl V697) V789)
295
+ (if (cons? V698)
296
+ (let V699 (shen-lazyderef (hd V698) V789)
297
+ (if (= * V699)
298
+ (let V700 (shen-lazyderef (tl V698) V789)
299
+ (if (cons? V700)
300
+ (let B (hd V700)
301
+ (let V701 (shen-lazyderef (tl V700) V789)
302
+ (if (= () V701)
303
+ (do (shen-incinfs)
304
+ (shen-th* X A V788 V789
305
+ (freeze
306
+ (shen-th* Y B V788 V789 V790))))
307
+ (if (shen-pvar? V701)
308
+ (do (shen-bindv V701 () V789)
309
+ (let Result
310
+ (do (shen-incinfs)
311
+ (shen-th* X A V788 V789
312
+ (freeze
313
+ (shen-th* Y B V788 V789 V790))))
314
+ (do (shen-unbindv V701 V789)
315
+ Result)))
316
+ false))))
317
+ (if (shen-pvar? V700)
318
+ (let B (shen-newpv V789)
319
+ (do (shen-bindv V700 (cons B ()) V789)
320
+ (let Result
321
+ (do (shen-incinfs)
322
+ (shen-th* X A V788 V789
323
+ (freeze
324
+ (shen-th* Y B V788 V789 V790))))
325
+ (do (shen-unbindv V700 V789)
326
+ Result))))
327
+ false)))
328
+ (if (shen-pvar? V699)
329
+ (do (shen-bindv V699 * V789)
330
+ (let Result
331
+ (let V702 (shen-lazyderef (tl V698) V789)
332
+ (if (cons? V702)
333
+ (let B (hd V702)
334
+ (let V703
335
+ (shen-lazyderef (tl V702) V789)
336
+ (if (= () V703)
337
+ (do (shen-incinfs)
338
+ (shen-th* X A V788 V789
339
+ (freeze
340
+ (shen-th* Y B V788 V789 V790))))
341
+ (if (shen-pvar? V703)
342
+ (do (shen-bindv V703 () V789)
343
+ (let Result
344
+ (do (shen-incinfs)
345
+ (shen-th* X A V788 V789
346
+ (freeze
347
+ (shen-th* Y B V788 V789
348
+ V790))))
349
+ (do (shen-unbindv V703 V789)
350
+ Result)))
351
+ false))))
352
+ (if (shen-pvar? V702)
353
+ (let B (shen-newpv V789)
354
+ (do
355
+ (shen-bindv V702 (cons B ()) V789)
356
+ (let Result
357
+ (do (shen-incinfs)
358
+ (shen-th* X A V788 V789
359
+ (freeze
360
+ (shen-th* Y B V788 V789 V790))))
361
+ (do (shen-unbindv V702 V789)
362
+ Result))))
363
+ false)))
364
+ (do (shen-unbindv V699 V789) Result)))
365
+ false)))
366
+ (if (shen-pvar? V698)
367
+ (let B (shen-newpv V789)
368
+ (do
369
+ (shen-bindv V698 (cons * (cons B ()))
370
+ V789)
371
+ (let Result
372
+ (do (shen-incinfs)
373
+ (shen-th* X A V788 V789
374
+ (freeze (shen-th* Y B V788 V789 V790))))
375
+ (do (shen-unbindv V698 V789) Result))))
376
+ false))))
377
+ (if (shen-pvar? V697)
378
+ (let A (shen-newpv V789)
379
+ (let B (shen-newpv V789)
380
+ (do
381
+ (shen-bindv V697
382
+ (cons A (cons * (cons B ()))) V789)
383
+ (let Result
384
+ (do (shen-incinfs)
385
+ (shen-th* X A V788 V789
386
+ (freeze (shen-th* Y B V788 V789 V790))))
387
+ (do (shen-unbindv V697 V789) Result)))))
388
+ false)))
389
+ false)))
390
+ false)))
391
+ false))
392
+ false))
393
+ false))
394
+ (if (= Case false)
395
+ (let Case
396
+ (let V704 (shen-lazyderef V786 V789)
397
+ (if (cons? V704)
398
+ (let V705 (shen-lazyderef (hd V704) V789)
399
+ (if (= @v V705)
400
+ (let V706 (shen-lazyderef (tl V704) V789)
401
+ (if (cons? V706)
402
+ (let X (hd V706)
403
+ (let V707 (shen-lazyderef (tl V706) V789)
404
+ (if (cons? V707)
405
+ (let Y (hd V707)
406
+ (let V708 (shen-lazyderef (tl V707) V789)
407
+ (if (= () V708)
408
+ (let V709 (shen-lazyderef V787 V789)
409
+ (if (cons? V709)
410
+ (let V710 (shen-lazyderef (hd V709) V789)
411
+ (if (= vector V710)
412
+ (let V711 (shen-lazyderef (tl V709) V789)
413
+ (if (cons? V711)
414
+ (let A (hd V711)
415
+ (let V712 (shen-lazyderef (tl V711) V789)
416
+ (if (= () V712)
417
+ (do (shen-incinfs)
418
+ (shen-th* X A V788 V789
419
+ (freeze
420
+ (shen-th* Y
421
+ (cons vector (cons A ())) V788 V789
422
+ V790))))
423
+ (if (shen-pvar? V712)
424
+ (do (shen-bindv V712 () V789)
425
+ (let Result
426
+ (do (shen-incinfs)
427
+ (shen-th* X A V788 V789
428
+ (freeze
429
+ (shen-th* Y
430
+ (cons vector (cons A ())) V788
431
+ V789 V790))))
432
+ (do (shen-unbindv V712 V789)
433
+ Result)))
434
+ false))))
435
+ (if (shen-pvar? V711)
436
+ (let A (shen-newpv V789)
437
+ (do (shen-bindv V711 (cons A ()) V789)
438
+ (let Result
439
+ (do (shen-incinfs)
440
+ (shen-th* X A V788 V789
441
+ (freeze
442
+ (shen-th* Y
443
+ (cons vector (cons A ())) V788
444
+ V789 V790))))
445
+ (do (shen-unbindv V711 V789) Result))))
446
+ false)))
447
+ (if (shen-pvar? V710)
448
+ (do (shen-bindv V710 vector V789)
449
+ (let Result
450
+ (let V713 (shen-lazyderef (tl V709) V789)
451
+ (if (cons? V713)
452
+ (let A (hd V713)
453
+ (let V714
454
+ (shen-lazyderef (tl V713) V789)
455
+ (if (= () V714)
456
+ (do (shen-incinfs)
457
+ (shen-th* X A V788 V789
458
+ (freeze
459
+ (shen-th* Y
460
+ (cons vector (cons A ())) V788
461
+ V789 V790))))
462
+ (if (shen-pvar? V714)
463
+ (do (shen-bindv V714 () V789)
464
+ (let Result
465
+ (do (shen-incinfs)
466
+ (shen-th* X A V788 V789
467
+ (freeze
468
+ (shen-th* Y
469
+ (cons vector (cons A ()))
470
+ V788 V789 V790))))
471
+ (do (shen-unbindv V714 V789)
472
+ Result)))
473
+ false))))
474
+ (if (shen-pvar? V713)
475
+ (let A (shen-newpv V789)
476
+ (do
477
+ (shen-bindv V713 (cons A ()) V789)
478
+ (let Result
479
+ (do (shen-incinfs)
480
+ (shen-th* X A V788 V789
481
+ (freeze
482
+ (shen-th* Y
483
+ (cons vector (cons A ())) V788
484
+ V789 V790))))
485
+ (do (shen-unbindv V713 V789)
486
+ Result))))
487
+ false)))
488
+ (do (shen-unbindv V710 V789) Result)))
489
+ false)))
490
+ (if (shen-pvar? V709)
491
+ (let A (shen-newpv V789)
492
+ (do
493
+ (shen-bindv V709 (cons vector (cons A ()))
494
+ V789)
495
+ (let Result
496
+ (do (shen-incinfs)
497
+ (shen-th* X A V788 V789
498
+ (freeze
499
+ (shen-th* Y (cons vector (cons A ()))
500
+ V788 V789 V790))))
501
+ (do (shen-unbindv V709 V789) Result))))
502
+ false)))
503
+ false)))
504
+ false)))
505
+ false))
506
+ false))
507
+ false))
508
+ (if (= Case false)
509
+ (let Case
510
+ (let V715 (shen-lazyderef V786 V789)
511
+ (if (cons? V715)
512
+ (let V716 (shen-lazyderef (hd V715) V789)
513
+ (if (= @s V716)
514
+ (let V717 (shen-lazyderef (tl V715) V789)
515
+ (if (cons? V717)
516
+ (let X (hd V717)
517
+ (let V718 (shen-lazyderef (tl V717) V789)
518
+ (if (cons? V718)
519
+ (let Y (hd V718)
520
+ (let V719 (shen-lazyderef (tl V718) V789)
521
+ (if (= () V719)
522
+ (let V720 (shen-lazyderef V787 V789)
523
+ (if (= string V720)
524
+ (do (shen-incinfs)
525
+ (shen-th* X string V788 V789
526
+ (freeze
527
+ (shen-th* Y string V788 V789 V790))))
528
+ (if (shen-pvar? V720)
529
+ (do (shen-bindv V720 string V789)
530
+ (let Result
531
+ (do (shen-incinfs)
532
+ (shen-th* X string V788 V789
533
+ (freeze
534
+ (shen-th* Y string V788 V789 V790))))
535
+ (do (shen-unbindv V720 V789) Result)))
536
+ false)))
537
+ false)))
538
+ false)))
539
+ false))
540
+ false))
541
+ false))
542
+ (if (= Case false)
543
+ (let Case
544
+ (let V721 (shen-lazyderef V786 V789)
545
+ (if (cons? V721)
546
+ (let V722 (shen-lazyderef (hd V721) V789)
547
+ (if (= lambda V722)
548
+ (let V723 (shen-lazyderef (tl V721) V789)
549
+ (if (cons? V723)
550
+ (let X (hd V723)
551
+ (let V724 (shen-lazyderef (tl V723) V789)
552
+ (if (cons? V724)
553
+ (let Y (hd V724)
554
+ (let V725 (shen-lazyderef (tl V724) V789)
555
+ (if (= () V725)
556
+ (let V726 (shen-lazyderef V787 V789)
557
+ (if (cons? V726)
558
+ (let A (hd V726)
559
+ (let V727 (shen-lazyderef (tl V726) V789)
560
+ (if (cons? V727)
561
+ (let V728
562
+ (shen-lazyderef (hd V727) V789)
563
+ (if (= --> V728)
564
+ (let V729
565
+ (shen-lazyderef (tl V727) V789)
566
+ (if (cons? V729)
567
+ (let B (hd V729)
568
+ (let V730
569
+ (shen-lazyderef (tl V729) V789)
570
+ (if (= () V730)
571
+ (let Z (shen-newpv V789)
572
+ (let X&& (shen-newpv V789)
573
+ (do (shen-incinfs)
574
+ (cut Throwcontrol V789
575
+ (freeze
576
+ (bind X&& (shen-placeholder)
577
+ V789
578
+ (freeze
579
+ (bind Z
580
+ (shen-ebr
581
+ (shen-lazyderef X&&
582
+ V789)
583
+ (shen-lazyderef X V789)
584
+ (shen-lazyderef Y V789))
585
+ V789
586
+ (freeze
587
+ (shen-th* Z B
588
+ (cons
589
+ (cons X&&
590
+ (cons :
591
+ (cons A ())))
592
+ V788)
593
+ V789 V790))))))))))
594
+ (if (shen-pvar? V730)
595
+ (do (shen-bindv V730 () V789)
596
+ (let Result
597
+ (let Z (shen-newpv V789)
598
+ (let X&& (shen-newpv V789)
599
+ (do (shen-incinfs)
600
+ (cut Throwcontrol V789
601
+ (freeze
602
+ (bind X&&
603
+ (shen-placeholder) V789
604
+ (freeze
605
+ (bind Z
606
+ (shen-ebr
607
+ (shen-lazyderef X&&
608
+ V789)
609
+ (shen-lazyderef X
610
+ V789)
611
+ (shen-lazyderef Y
612
+ V789))
613
+ V789
614
+ (freeze
615
+ (shen-th* Z B
616
+ (cons
617
+ (cons X&&
618
+ (cons :
619
+ (cons A ())))
620
+ V788)
621
+ V789 V790))))))))))
622
+ (do (shen-unbindv V730 V789)
623
+ Result)))
624
+ false))))
625
+ (if (shen-pvar? V729)
626
+ (let B (shen-newpv V789)
627
+ (do
628
+ (shen-bindv V729 (cons B ())
629
+ V789)
630
+ (let Result
631
+ (let Z (shen-newpv V789)
632
+ (let X&& (shen-newpv V789)
633
+ (do (shen-incinfs)
634
+ (cut Throwcontrol V789
635
+ (freeze
636
+ (bind X&&
637
+ (shen-placeholder) V789
638
+ (freeze
639
+ (bind Z
640
+ (shen-ebr
641
+ (shen-lazyderef X&&
642
+ V789)
643
+ (shen-lazyderef X V789)
644
+ (shen-lazyderef Y
645
+ V789))
646
+ V789
647
+ (freeze
648
+ (shen-th* Z B
649
+ (cons
650
+ (cons X&&
651
+ (cons :
652
+ (cons A ())))
653
+ V788)
654
+ V789 V790))))))))))
655
+ (do (shen-unbindv V729 V789)
656
+ Result))))
657
+ false)))
658
+ (if (shen-pvar? V728)
659
+ (do (shen-bindv V728 --> V789)
660
+ (let Result
661
+ (let V731
662
+ (shen-lazyderef (tl V727) V789)
663
+ (if (cons? V731)
664
+ (let B (hd V731)
665
+ (let V732
666
+ (shen-lazyderef (tl V731) V789)
667
+ (if (= () V732)
668
+ (let Z (shen-newpv V789)
669
+ (let X&& (shen-newpv V789)
670
+ (do (shen-incinfs)
671
+ (cut Throwcontrol V789
672
+ (freeze
673
+ (bind X&&
674
+ (shen-placeholder) V789
675
+ (freeze
676
+ (bind Z
677
+ (shen-ebr
678
+ (shen-lazyderef X&&
679
+ V789)
680
+ (shen-lazyderef X
681
+ V789)
682
+ (shen-lazyderef Y
683
+ V789))
684
+ V789
685
+ (freeze
686
+ (shen-th* Z B
687
+ (cons
688
+ (cons X&&
689
+ (cons :
690
+ (cons A ())))
691
+ V788)
692
+ V789 V790))))))))))
693
+ (if (shen-pvar? V732)
694
+ (do
695
+ (shen-bindv V732 () V789)
696
+ (let Result
697
+ (let Z (shen-newpv V789)
698
+ (let X&& (shen-newpv V789)
699
+ (do (shen-incinfs)
700
+ (cut Throwcontrol V789
701
+ (freeze
702
+ (bind X&&
703
+ (shen-placeholder)
704
+ V789
705
+ (freeze
706
+ (bind Z
707
+ (shen-ebr
708
+ (shen-lazyderef
709
+ X&& V789)
710
+ (shen-lazyderef X
711
+ V789)
712
+ (shen-lazyderef Y
713
+ V789))
714
+ V789
715
+ (freeze
716
+ (shen-th* Z B
717
+ (cons
718
+ (cons X&&
719
+ (cons :
720
+ (cons A ())))
721
+ V788)
722
+ V789
723
+ V790))))))))))
724
+ (do
725
+ (shen-unbindv V732 V789)
726
+ Result)))
727
+ false))))
728
+ (if (shen-pvar? V731)
729
+ (let B (shen-newpv V789)
730
+ (do
731
+ (shen-bindv V731 (cons B ())
732
+ V789)
733
+ (let Result
734
+ (let Z (shen-newpv V789)
735
+ (let X&& (shen-newpv V789)
736
+ (do (shen-incinfs)
737
+ (cut Throwcontrol V789
738
+ (freeze
739
+ (bind X&&
740
+ (shen-placeholder) V789
741
+ (freeze
742
+ (bind Z
743
+ (shen-ebr
744
+ (shen-lazyderef X&&
745
+ V789)
746
+ (shen-lazyderef X
747
+ V789)
748
+ (shen-lazyderef Y
749
+ V789))
750
+ V789
751
+ (freeze
752
+ (shen-th* Z B
753
+ (cons
754
+ (cons X&&
755
+ (cons :
756
+ (cons A ())))
757
+ V788)
758
+ V789 V790))))))))))
759
+ (do (shen-unbindv V731 V789)
760
+ Result))))
761
+ false)))
762
+ (do (shen-unbindv V728 V789)
763
+ Result)))
764
+ false)))
765
+ (if (shen-pvar? V727)
766
+ (let B (shen-newpv V789)
767
+ (do
768
+ (shen-bindv V727
769
+ (cons --> (cons B ())) V789)
770
+ (let Result
771
+ (let Z (shen-newpv V789)
772
+ (let X&& (shen-newpv V789)
773
+ (do (shen-incinfs)
774
+ (cut Throwcontrol V789
775
+ (freeze
776
+ (bind X&& (shen-placeholder)
777
+ V789
778
+ (freeze
779
+ (bind Z
780
+ (shen-ebr
781
+ (shen-lazyderef X&& V789)
782
+ (shen-lazyderef X V789)
783
+ (shen-lazyderef Y V789))
784
+ V789
785
+ (freeze
786
+ (shen-th* Z B
787
+ (cons
788
+ (cons X&&
789
+ (cons : (cons A ())))
790
+ V788)
791
+ V789 V790))))))))))
792
+ (do (shen-unbindv V727 V789)
793
+ Result))))
794
+ false))))
795
+ (if (shen-pvar? V726)
796
+ (let A (shen-newpv V789)
797
+ (let B (shen-newpv V789)
798
+ (do
799
+ (shen-bindv V726
800
+ (cons A (cons --> (cons B ()))) V789)
801
+ (let Result
802
+ (let Z (shen-newpv V789)
803
+ (let X&& (shen-newpv V789)
804
+ (do (shen-incinfs)
805
+ (cut Throwcontrol V789
806
+ (freeze
807
+ (bind X&& (shen-placeholder) V789
808
+ (freeze
809
+ (bind Z
810
+ (shen-ebr
811
+ (shen-lazyderef X&& V789)
812
+ (shen-lazyderef X V789)
813
+ (shen-lazyderef Y V789))
814
+ V789
815
+ (freeze
816
+ (shen-th* Z B
817
+ (cons
818
+ (cons X&&
819
+ (cons : (cons A ())))
820
+ V788)
821
+ V789 V790))))))))))
822
+ (do (shen-unbindv V726 V789)
823
+ Result)))))
824
+ false)))
825
+ false)))
826
+ false)))
827
+ false))
828
+ false))
829
+ false))
830
+ (if (= Case false)
831
+ (let Case
832
+ (let V733 (shen-lazyderef V786 V789)
833
+ (if (cons? V733)
834
+ (let V734 (shen-lazyderef (hd V733) V789)
835
+ (if (= let V734)
836
+ (let V735 (shen-lazyderef (tl V733) V789)
837
+ (if (cons? V735)
838
+ (let X (hd V735)
839
+ (let V736 (shen-lazyderef (tl V735) V789)
840
+ (if (cons? V736)
841
+ (let Y (hd V736)
842
+ (let V737 (shen-lazyderef (tl V736) V789)
843
+ (if (cons? V737)
844
+ (let Z (hd V737)
845
+ (let V738 (shen-lazyderef (tl V737) V789)
846
+ (if (= () V738)
847
+ (let W (shen-newpv V789)
848
+ (let X&& (shen-newpv V789)
849
+ (let B (shen-newpv V789)
850
+ (do (shen-incinfs)
851
+ (cut Throwcontrol V789
852
+ (freeze
853
+ (shen-th* Y B V788 V789
854
+ (freeze
855
+ (bind X&& (shen-placeholder)
856
+ V789
857
+ (freeze
858
+ (bind W
859
+ (shen-ebr
860
+ (shen-lazyderef X&& V789)
861
+ (shen-lazyderef X V789)
862
+ (shen-lazyderef Z V789))
863
+ V789
864
+ (freeze
865
+ (shen-th* W V787
866
+ (cons
867
+ (cons X&&
868
+ (cons : (cons B ())))
869
+ V788)
870
+ V789 V790)))))))))))))
871
+ false)))
872
+ false)))
873
+ false)))
874
+ false))
875
+ false))
876
+ false))
877
+ (if (= Case false)
878
+ (let Case
879
+ (let V739 (shen-lazyderef V786 V789)
880
+ (if (cons? V739)
881
+ (let V740 (shen-lazyderef (hd V739) V789)
882
+ (if (= open V740)
883
+ (let V741 (shen-lazyderef (tl V739) V789)
884
+ (if (cons? V741)
885
+ (let V742 (shen-lazyderef (hd V741) V789)
886
+ (if (= file V742)
887
+ (let V743 (shen-lazyderef (tl V741) V789)
888
+ (if (cons? V743)
889
+ (let FileName (hd V743)
890
+ (let V744 (shen-lazyderef (tl V743) V789)
891
+ (if (cons? V744)
892
+ (let Direction674 (hd V744)
893
+ (let V745
894
+ (shen-lazyderef (tl V744) V789)
895
+ (if (= () V745)
896
+ (let V746 (shen-lazyderef V787 V789)
897
+ (if (cons? V746)
898
+ (let V747
899
+ (shen-lazyderef (hd V746) V789)
900
+ (if (= stream V747)
901
+ (let V748
902
+ (shen-lazyderef (tl V746) V789)
903
+ (if (cons? V748)
904
+ (let Direction (hd V748)
905
+ (let V749
906
+ (shen-lazyderef (tl V748)
907
+ V789)
908
+ (if (= () V749)
909
+ (do (shen-incinfs)
910
+ (unify! Direction
911
+ Direction674 V789
912
+ (freeze
913
+ (cut Throwcontrol V789
914
+ (freeze
915
+ (shen-th* FileName
916
+ string V788 V789
917
+ V790))))))
918
+ (if (shen-pvar? V749)
919
+ (do
920
+ (shen-bindv V749 () V789)
921
+ (let Result
922
+ (do (shen-incinfs)
923
+ (unify! Direction
924
+ Direction674 V789
925
+ (freeze
926
+ (cut Throwcontrol V789
927
+ (freeze
928
+ (shen-th* FileName
929
+ string V788 V789
930
+ V790))))))
931
+ (do
932
+ (shen-unbindv V749 V789)
933
+ Result)))
934
+ false))))
935
+ (if (shen-pvar? V748)
936
+ (let Direction
937
+ (shen-newpv V789)
938
+ (do
939
+ (shen-bindv V748
940
+ (cons Direction ()) V789)
941
+ (let Result
942
+ (do (shen-incinfs)
943
+ (unify! Direction
944
+ Direction674 V789
945
+ (freeze
946
+ (cut Throwcontrol V789
947
+ (freeze
948
+ (shen-th* FileName
949
+ string V788 V789
950
+ V790))))))
951
+ (do
952
+ (shen-unbindv V748 V789)
953
+ Result))))
954
+ false)))
955
+ (if (shen-pvar? V747)
956
+ (do
957
+ (shen-bindv V747 stream V789)
958
+ (let Result
959
+ (let V750
960
+ (shen-lazyderef (tl V746)
961
+ V789)
962
+ (if (cons? V750)
963
+ (let Direction (hd V750)
964
+ (let V751
965
+ (shen-lazyderef (tl V750)
966
+ V789)
967
+ (if (= () V751)
968
+ (do (shen-incinfs)
969
+ (unify! Direction
970
+ Direction674 V789
971
+ (freeze
972
+ (cut Throwcontrol V789
973
+ (freeze
974
+ (shen-th* FileName
975
+ string V788 V789
976
+ V790))))))
977
+ (if (shen-pvar? V751)
978
+ (do
979
+ (shen-bindv V751 ()
980
+ V789)
981
+ (let Result
982
+ (do (shen-incinfs)
983
+ (unify! Direction
984
+ Direction674 V789
985
+ (freeze
986
+ (cut Throwcontrol
987
+ V789
988
+ (freeze
989
+ (shen-th*
990
+ FileName string
991
+ V788 V789
992
+ V790))))))
993
+ (do
994
+ (shen-unbindv V751
995
+ V789)
996
+ Result)))
997
+ false))))
998
+ (if (shen-pvar? V750)
999
+ (let Direction
1000
+ (shen-newpv V789)
1001
+ (do
1002
+ (shen-bindv V750
1003
+ (cons Direction ())
1004
+ V789)
1005
+ (let Result
1006
+ (do (shen-incinfs)
1007
+ (unify! Direction
1008
+ Direction674 V789
1009
+ (freeze
1010
+ (cut Throwcontrol
1011
+ V789
1012
+ (freeze
1013
+ (shen-th* FileName
1014
+ string V788 V789
1015
+ V790))))))
1016
+ (do
1017
+ (shen-unbindv V750
1018
+ V789)
1019
+ Result))))
1020
+ false)))
1021
+ (do (shen-unbindv V747 V789)
1022
+ Result)))
1023
+ false)))
1024
+ (if (shen-pvar? V746)
1025
+ (let Direction (shen-newpv V789)
1026
+ (do
1027
+ (shen-bindv V746
1028
+ (cons stream
1029
+ (cons Direction ()))
1030
+ V789)
1031
+ (let Result
1032
+ (do (shen-incinfs)
1033
+ (unify! Direction Direction674
1034
+ V789
1035
+ (freeze
1036
+ (cut Throwcontrol V789
1037
+ (freeze
1038
+ (shen-th* FileName string
1039
+ V788 V789 V790))))))
1040
+ (do (shen-unbindv V746 V789)
1041
+ Result))))
1042
+ false)))
1043
+ false)))
1044
+ false)))
1045
+ false))
1046
+ false))
1047
+ false))
1048
+ false))
1049
+ false))
1050
+ (if (= Case false)
1051
+ (let Case
1052
+ (let V752 (shen-lazyderef V786 V789)
1053
+ (if (cons? V752)
1054
+ (let V753 (shen-lazyderef (hd V752) V789)
1055
+ (if (= type V753)
1056
+ (let V754 (shen-lazyderef (tl V752) V789)
1057
+ (if (cons? V754)
1058
+ (let X (hd V754)
1059
+ (let V755 (shen-lazyderef (tl V754) V789)
1060
+ (if (cons? V755)
1061
+ (let A (hd V755)
1062
+ (let V756 (shen-lazyderef (tl V755) V789)
1063
+ (if (= () V756)
1064
+ (do (shen-incinfs)
1065
+ (cut Throwcontrol V789
1066
+ (freeze
1067
+ (unify A V787 V789
1068
+ (freeze
1069
+ (shen-th* X A V788 V789 V790))))))
1070
+ false)))
1071
+ false)))
1072
+ false))
1073
+ false))
1074
+ false))
1075
+ (if (= Case false)
1076
+ (let Case
1077
+ (let V757 (shen-lazyderef V786 V789)
1078
+ (if (cons? V757)
1079
+ (let V758 (shen-lazyderef (hd V757) V789)
1080
+ (if (= input+ V758)
1081
+ (let V759 (shen-lazyderef (tl V757) V789)
1082
+ (if (cons? V759)
1083
+ (let V760 (shen-lazyderef (hd V759) V789)
1084
+ (if (= : V760)
1085
+ (let V761 (shen-lazyderef (tl V759) V789)
1086
+ (if (cons? V761)
1087
+ (let A (hd V761)
1088
+ (let V762
1089
+ (shen-lazyderef (tl V761) V789)
1090
+ (if (= () V762)
1091
+ (let C (shen-newpv V789)
1092
+ (do (shen-incinfs)
1093
+ (bind C
1094
+ (shen-normalise-type
1095
+ (shen-lazyderef A V789))
1096
+ V789
1097
+ (freeze
1098
+ (unify V787 C V789 V790)))))
1099
+ false)))
1100
+ false))
1101
+ false))
1102
+ false))
1103
+ false))
1104
+ false))
1105
+ (if (= Case false)
1106
+ (let Case
1107
+ (let V763 (shen-lazyderef V786 V789)
1108
+ (if (cons? V763)
1109
+ (let V764 (shen-lazyderef (hd V763) V789)
1110
+ (if (= where V764)
1111
+ (let V765 (shen-lazyderef (tl V763) V789)
1112
+ (if (cons? V765)
1113
+ (let P (hd V765)
1114
+ (let V766
1115
+ (shen-lazyderef (tl V765) V789)
1116
+ (if (cons? V766)
1117
+ (let X (hd V766)
1118
+ (let V767
1119
+ (shen-lazyderef (tl V766) V789)
1120
+ (if (= () V767)
1121
+ (do (shen-incinfs)
1122
+ (cut Throwcontrol V789
1123
+ (freeze
1124
+ (shen-th* P boolean V788 V789
1125
+ (freeze
1126
+ (cut Throwcontrol V789
1127
+ (freeze
1128
+ (shen-th* X V787
1129
+ (cons
1130
+ (cons P
1131
+ (cons :
1132
+ (cons verified ())))
1133
+ V788)
1134
+ V789 V790))))))))
1135
+ false)))
1136
+ false)))
1137
+ false))
1138
+ false))
1139
+ false))
1140
+ (if (= Case false)
1141
+ (let Case
1142
+ (let V768 (shen-lazyderef V786 V789)
1143
+ (if (cons? V768)
1144
+ (let V769 (shen-lazyderef (hd V768) V789)
1145
+ (if (= set V769)
1146
+ (let V770 (shen-lazyderef (tl V768) V789)
1147
+ (if (cons? V770)
1148
+ (let Var (hd V770)
1149
+ (let V771
1150
+ (shen-lazyderef (tl V770) V789)
1151
+ (if (cons? V771)
1152
+ (let Val (hd V771)
1153
+ (let V772
1154
+ (shen-lazyderef (tl V771) V789)
1155
+ (if (= () V772)
1156
+ (do (shen-incinfs)
1157
+ (cut Throwcontrol V789
1158
+ (freeze
1159
+ (shen-th*
1160
+ (cons value (cons Var ()))
1161
+ V787 V788 V789
1162
+ (freeze
1163
+ (shen-th* Val V787 V788 V789
1164
+ V790))))))
1165
+ false)))
1166
+ false)))
1167
+ false))
1168
+ false))
1169
+ false))
1170
+ (if (= Case false)
1171
+ (let Case
1172
+ (let V773 (shen-lazyderef V786 V789)
1173
+ (if (cons? V773)
1174
+ (let V774 (shen-lazyderef (hd V773) V789)
1175
+ (if (= fail V774)
1176
+ (let V775
1177
+ (shen-lazyderef (tl V773) V789)
1178
+ (if (= () V775)
1179
+ (let V776 (shen-lazyderef V787 V789)
1180
+ (if (= symbol V776)
1181
+ (do (shen-incinfs) (thaw V790))
1182
+ (if (shen-pvar? V776)
1183
+ (do (shen-bindv V776 symbol V789)
1184
+ (let Result
1185
+ (do (shen-incinfs) (thaw V790))
1186
+ (do (shen-unbindv V776 V789)
1187
+ Result)))
1188
+ false)))
1189
+ false))
1190
+ false))
1191
+ false))
1192
+ (if (= Case false)
1193
+ (let Case
1194
+ (let NewHyp (shen-newpv V789)
1195
+ (do (shen-incinfs)
1196
+ (shen-t*-hyps V788 NewHyp V789
1197
+ (freeze
1198
+ (shen-th* V786 V787 NewHyp V789
1199
+ V790)))))
1200
+ (if (= Case false)
1201
+ (let Case
1202
+ (let V777 (shen-lazyderef V786 V789)
1203
+ (if (cons? V777)
1204
+ (let V778
1205
+ (shen-lazyderef (hd V777) V789)
1206
+ (if (= define V778)
1207
+ (let V779
1208
+ (shen-lazyderef (tl V777) V789)
1209
+ (if (cons? V779)
1210
+ (let F (hd V779)
1211
+ (let X (tl V779)
1212
+ (do (shen-incinfs)
1213
+ (cut Throwcontrol V789
1214
+ (freeze
1215
+ (shen-t*-def
1216
+ (cons define (cons F X))
1217
+ V787 V788 V789 V790))))))
1218
+ false))
1219
+ false))
1220
+ false))
1221
+ (if (= Case false)
1222
+ (let Case
1223
+ (let V780 (shen-lazyderef V786 V789)
1224
+ (if (cons? V780)
1225
+ (let V781
1226
+ (shen-lazyderef (hd V780) V789)
1227
+ (if (= shen-process-datatype V781)
1228
+ (let V782
1229
+ (shen-lazyderef V787 V789)
1230
+ (if (= symbol V782)
1231
+ (do (shen-incinfs) (thaw V790))
1232
+ (if (shen-pvar? V782)
1233
+ (do
1234
+ (shen-bindv V782 symbol V789)
1235
+ (let Result
1236
+ (do (shen-incinfs)
1237
+ (thaw V790))
1238
+ (do (shen-unbindv V782 V789)
1239
+ Result)))
1240
+ false)))
1241
+ false))
1242
+ false))
1243
+ (if (= Case false)
1244
+ (let Case
1245
+ (let V783
1246
+ (shen-lazyderef V786 V789)
1247
+ (if (cons? V783)
1248
+ (let V784
1249
+ (shen-lazyderef (hd V783) V789)
1250
+ (if (= shen-synonyms-help V784)
1251
+ (let V785
1252
+ (shen-lazyderef V787 V789)
1253
+ (if (= symbol V785)
1254
+ (do (shen-incinfs)
1255
+ (thaw V790))
1256
+ (if (shen-pvar? V785)
1257
+ (do
1258
+ (shen-bindv V785 symbol
1259
+ V789)
1260
+ (let Result
1261
+ (do (shen-incinfs)
1262
+ (thaw V790))
1263
+ (do
1264
+ (shen-unbindv V785 V789)
1265
+ Result)))
1266
+ false)))
1267
+ false))
1268
+ false))
1269
+ (if (= Case false)
1270
+ (let Datatypes (shen-newpv V789)
1271
+ (do (shen-incinfs)
1272
+ (bind Datatypes
1273
+ (value shen-*datatypes*) V789
1274
+ (freeze
1275
+ (shen-udefs*
1276
+ (cons V786
1277
+ (cons : (cons V787 ())))
1278
+ V788 Datatypes V789 V790)))))
1279
+ Case))
1280
+ Case))
1281
+ Case))
1282
+ Case))
1283
+ Case))
1284
+ Case))
1285
+ Case))
1286
+ Case))
1287
+ Case))
1288
+ Case))
1289
+ Case))
1290
+ Case))
1291
+ Case))
1292
+ Case))
1293
+ Case))
1294
+ Case))
1295
+ Case))
1296
+ Case))
1297
+ Case))
1298
+ Case))
1299
+ Case)))))
1300
+
1301
+ (defun shen-t*-hyps (V783 V784 V785 V786)
1302
+ (let Case
1303
+ (let V549 (shen-lazyderef V783 V785)
1304
+ (if (cons? V549)
1305
+ (let V550 (shen-lazyderef (hd V549) V785)
1306
+ (if (cons? V550)
1307
+ (let V551 (shen-lazyderef (hd V550) V785)
1308
+ (if (cons? V551)
1309
+ (let V552 (shen-lazyderef (hd V551) V785)
1310
+ (if (= cons V552)
1311
+ (let V553 (shen-lazyderef (tl V551) V785)
1312
+ (if (cons? V553)
1313
+ (let X (hd V553)
1314
+ (let V554 (shen-lazyderef (tl V553) V785)
1315
+ (if (cons? V554)
1316
+ (let Y (hd V554)
1317
+ (let V555 (shen-lazyderef (tl V554) V785)
1318
+ (if (= () V555)
1319
+ (let V556 (shen-lazyderef (tl V550) V785)
1320
+ (if (cons? V556)
1321
+ (let V557 (shen-lazyderef (hd V556) V785)
1322
+ (if (= : V557)
1323
+ (let V558 (shen-lazyderef (tl V556) V785)
1324
+ (if (cons? V558)
1325
+ (let V559 (shen-lazyderef (hd V558) V785)
1326
+ (if (cons? V559)
1327
+ (let V560 (shen-lazyderef (hd V559) V785)
1328
+ (if (= list V560)
1329
+ (let V561 (shen-lazyderef (tl V559) V785)
1330
+ (if (cons? V561)
1331
+ (let A (hd V561)
1332
+ (let V562 (shen-lazyderef (tl V561) V785)
1333
+ (if (= () V562)
1334
+ (let V563 (shen-lazyderef (tl V558) V785)
1335
+ (if (= () V563)
1336
+ (let Hyp (tl V549)
1337
+ (do (shen-incinfs)
1338
+ (bind V784
1339
+ (cons
1340
+ (cons (shen-lazyderef X V785)
1341
+ (cons :
1342
+ (cons (shen-lazyderef A V785) ())))
1343
+ (cons
1344
+ (cons (shen-lazyderef Y V785)
1345
+ (cons :
1346
+ (cons
1347
+ (cons list
1348
+ (cons (shen-lazyderef A V785) ()))
1349
+ ())))
1350
+ (shen-lazyderef Hyp V785)))
1351
+ V785 V786)))
1352
+ (if (shen-pvar? V563)
1353
+ (do (shen-bindv V563 () V785)
1354
+ (let Result
1355
+ (let Hyp (tl V549)
1356
+ (do (shen-incinfs)
1357
+ (bind V784
1358
+ (cons
1359
+ (cons (shen-lazyderef X V785)
1360
+ (cons :
1361
+ (cons (shen-lazyderef A V785)
1362
+ ())))
1363
+ (cons
1364
+ (cons (shen-lazyderef Y V785)
1365
+ (cons :
1366
+ (cons
1367
+ (cons list
1368
+ (cons (shen-lazyderef A V785)
1369
+ ()))
1370
+ ())))
1371
+ (shen-lazyderef Hyp V785)))
1372
+ V785 V786)))
1373
+ (do (shen-unbindv V563 V785) Result)))
1374
+ false)))
1375
+ (if (shen-pvar? V562)
1376
+ (do (shen-bindv V562 () V785)
1377
+ (let Result
1378
+ (let V564 (shen-lazyderef (tl V558) V785)
1379
+ (if (= () V564)
1380
+ (let Hyp (tl V549)
1381
+ (do (shen-incinfs)
1382
+ (bind V784
1383
+ (cons
1384
+ (cons (shen-lazyderef X V785)
1385
+ (cons :
1386
+ (cons (shen-lazyderef A V785)
1387
+ ())))
1388
+ (cons
1389
+ (cons (shen-lazyderef Y V785)
1390
+ (cons :
1391
+ (cons
1392
+ (cons list
1393
+ (cons (shen-lazyderef A V785)
1394
+ ()))
1395
+ ())))
1396
+ (shen-lazyderef Hyp V785)))
1397
+ V785 V786)))
1398
+ (if (shen-pvar? V564)
1399
+ (do (shen-bindv V564 () V785)
1400
+ (let Result
1401
+ (let Hyp (tl V549)
1402
+ (do (shen-incinfs)
1403
+ (bind V784
1404
+ (cons
1405
+ (cons (shen-lazyderef X V785)
1406
+ (cons :
1407
+ (cons (shen-lazyderef A V785)
1408
+ ())))
1409
+ (cons
1410
+ (cons (shen-lazyderef Y V785)
1411
+ (cons :
1412
+ (cons
1413
+ (cons list
1414
+ (cons (shen-lazyderef A V785)
1415
+ ()))
1416
+ ())))
1417
+ (shen-lazyderef Hyp V785)))
1418
+ V785 V786)))
1419
+ (do (shen-unbindv V564 V785) Result)))
1420
+ false)))
1421
+ (do (shen-unbindv V562 V785) Result)))
1422
+ false))))
1423
+ (if (shen-pvar? V561)
1424
+ (let A (shen-newpv V785)
1425
+ (do (shen-bindv V561 (cons A ()) V785)
1426
+ (let Result
1427
+ (let V565 (shen-lazyderef (tl V558) V785)
1428
+ (if (= () V565)
1429
+ (let Hyp (tl V549)
1430
+ (do (shen-incinfs)
1431
+ (bind V784
1432
+ (cons
1433
+ (cons (shen-lazyderef X V785)
1434
+ (cons :
1435
+ (cons (shen-lazyderef A V785) ())))
1436
+ (cons
1437
+ (cons (shen-lazyderef Y V785)
1438
+ (cons :
1439
+ (cons
1440
+ (cons list
1441
+ (cons (shen-lazyderef A V785)
1442
+ ()))
1443
+ ())))
1444
+ (shen-lazyderef Hyp V785)))
1445
+ V785 V786)))
1446
+ (if (shen-pvar? V565)
1447
+ (do (shen-bindv V565 () V785)
1448
+ (let Result
1449
+ (let Hyp (tl V549)
1450
+ (do (shen-incinfs)
1451
+ (bind V784
1452
+ (cons
1453
+ (cons (shen-lazyderef X V785)
1454
+ (cons :
1455
+ (cons (shen-lazyderef A V785)
1456
+ ())))
1457
+ (cons
1458
+ (cons (shen-lazyderef Y V785)
1459
+ (cons :
1460
+ (cons
1461
+ (cons list
1462
+ (cons (shen-lazyderef A V785)
1463
+ ()))
1464
+ ())))
1465
+ (shen-lazyderef Hyp V785)))
1466
+ V785 V786)))
1467
+ (do (shen-unbindv V565 V785) Result)))
1468
+ false)))
1469
+ (do (shen-unbindv V561 V785) Result))))
1470
+ false)))
1471
+ (if (shen-pvar? V560)
1472
+ (do (shen-bindv V560 list V785)
1473
+ (let Result
1474
+ (let V566 (shen-lazyderef (tl V559) V785)
1475
+ (if (cons? V566)
1476
+ (let A (hd V566)
1477
+ (let V567 (shen-lazyderef (tl V566) V785)
1478
+ (if (= () V567)
1479
+ (let V568 (shen-lazyderef (tl V558) V785)
1480
+ (if (= () V568)
1481
+ (let Hyp (tl V549)
1482
+ (do (shen-incinfs)
1483
+ (bind V784
1484
+ (cons
1485
+ (cons (shen-lazyderef X V785)
1486
+ (cons :
1487
+ (cons (shen-lazyderef A V785)
1488
+ ())))
1489
+ (cons
1490
+ (cons (shen-lazyderef Y V785)
1491
+ (cons :
1492
+ (cons
1493
+ (cons list
1494
+ (cons (shen-lazyderef A V785)
1495
+ ()))
1496
+ ())))
1497
+ (shen-lazyderef Hyp V785)))
1498
+ V785 V786)))
1499
+ (if (shen-pvar? V568)
1500
+ (do (shen-bindv V568 () V785)
1501
+ (let Result
1502
+ (let Hyp (tl V549)
1503
+ (do (shen-incinfs)
1504
+ (bind V784
1505
+ (cons
1506
+ (cons (shen-lazyderef X V785)
1507
+ (cons :
1508
+ (cons (shen-lazyderef A V785)
1509
+ ())))
1510
+ (cons
1511
+ (cons (shen-lazyderef Y V785)
1512
+ (cons :
1513
+ (cons
1514
+ (cons list
1515
+ (cons (shen-lazyderef A V785)
1516
+ ()))
1517
+ ())))
1518
+ (shen-lazyderef Hyp V785)))
1519
+ V785 V786)))
1520
+ (do (shen-unbindv V568 V785) Result)))
1521
+ false)))
1522
+ (if (shen-pvar? V567)
1523
+ (do (shen-bindv V567 () V785)
1524
+ (let Result
1525
+ (let V569
1526
+ (shen-lazyderef (tl V558) V785)
1527
+ (if (= () V569)
1528
+ (let Hyp (tl V549)
1529
+ (do (shen-incinfs)
1530
+ (bind V784
1531
+ (cons
1532
+ (cons (shen-lazyderef X V785)
1533
+ (cons :
1534
+ (cons (shen-lazyderef A V785)
1535
+ ())))
1536
+ (cons
1537
+ (cons (shen-lazyderef Y V785)
1538
+ (cons :
1539
+ (cons
1540
+ (cons list
1541
+ (cons (shen-lazyderef A V785)
1542
+ ()))
1543
+ ())))
1544
+ (shen-lazyderef Hyp V785)))
1545
+ V785 V786)))
1546
+ (if (shen-pvar? V569)
1547
+ (do (shen-bindv V569 () V785)
1548
+ (let Result
1549
+ (let Hyp (tl V549)
1550
+ (do (shen-incinfs)
1551
+ (bind V784
1552
+ (cons
1553
+ (cons (shen-lazyderef X V785)
1554
+ (cons :
1555
+ (cons (shen-lazyderef A V785)
1556
+ ())))
1557
+ (cons
1558
+ (cons (shen-lazyderef Y V785)
1559
+ (cons :
1560
+ (cons
1561
+ (cons list
1562
+ (cons
1563
+ (shen-lazyderef A V785)
1564
+ ()))
1565
+ ())))
1566
+ (shen-lazyderef Hyp V785)))
1567
+ V785 V786)))
1568
+ (do (shen-unbindv V569 V785)
1569
+ Result)))
1570
+ false)))
1571
+ (do (shen-unbindv V567 V785) Result)))
1572
+ false))))
1573
+ (if (shen-pvar? V566)
1574
+ (let A (shen-newpv V785)
1575
+ (do (shen-bindv V566 (cons A ()) V785)
1576
+ (let Result
1577
+ (let V570 (shen-lazyderef (tl V558) V785)
1578
+ (if (= () V570)
1579
+ (let Hyp (tl V549)
1580
+ (do (shen-incinfs)
1581
+ (bind V784
1582
+ (cons
1583
+ (cons (shen-lazyderef X V785)
1584
+ (cons :
1585
+ (cons (shen-lazyderef A V785)
1586
+ ())))
1587
+ (cons
1588
+ (cons (shen-lazyderef Y V785)
1589
+ (cons :
1590
+ (cons
1591
+ (cons list
1592
+ (cons (shen-lazyderef A V785)
1593
+ ()))
1594
+ ())))
1595
+ (shen-lazyderef Hyp V785)))
1596
+ V785 V786)))
1597
+ (if (shen-pvar? V570)
1598
+ (do (shen-bindv V570 () V785)
1599
+ (let Result
1600
+ (let Hyp (tl V549)
1601
+ (do (shen-incinfs)
1602
+ (bind V784
1603
+ (cons
1604
+ (cons (shen-lazyderef X V785)
1605
+ (cons :
1606
+ (cons (shen-lazyderef A V785)
1607
+ ())))
1608
+ (cons
1609
+ (cons (shen-lazyderef Y V785)
1610
+ (cons :
1611
+ (cons
1612
+ (cons list
1613
+ (cons
1614
+ (shen-lazyderef A V785)
1615
+ ()))
1616
+ ())))
1617
+ (shen-lazyderef Hyp V785)))
1618
+ V785 V786)))
1619
+ (do (shen-unbindv V570 V785)
1620
+ Result)))
1621
+ false)))
1622
+ (do (shen-unbindv V566 V785) Result))))
1623
+ false)))
1624
+ (do (shen-unbindv V560 V785) Result)))
1625
+ false)))
1626
+ (if (shen-pvar? V559)
1627
+ (let A (shen-newpv V785)
1628
+ (do (shen-bindv V559 (cons list (cons A ())) V785)
1629
+ (let Result
1630
+ (let V571 (shen-lazyderef (tl V558) V785)
1631
+ (if (= () V571)
1632
+ (let Hyp (tl V549)
1633
+ (do (shen-incinfs)
1634
+ (bind V784
1635
+ (cons
1636
+ (cons (shen-lazyderef X V785)
1637
+ (cons :
1638
+ (cons (shen-lazyderef A V785) ())))
1639
+ (cons
1640
+ (cons (shen-lazyderef Y V785)
1641
+ (cons :
1642
+ (cons
1643
+ (cons list
1644
+ (cons (shen-lazyderef A V785) ()))
1645
+ ())))
1646
+ (shen-lazyderef Hyp V785)))
1647
+ V785 V786)))
1648
+ (if (shen-pvar? V571)
1649
+ (do (shen-bindv V571 () V785)
1650
+ (let Result
1651
+ (let Hyp (tl V549)
1652
+ (do (shen-incinfs)
1653
+ (bind V784
1654
+ (cons
1655
+ (cons (shen-lazyderef X V785)
1656
+ (cons :
1657
+ (cons (shen-lazyderef A V785) ())))
1658
+ (cons
1659
+ (cons (shen-lazyderef Y V785)
1660
+ (cons :
1661
+ (cons
1662
+ (cons list
1663
+ (cons (shen-lazyderef A V785) ()))
1664
+ ())))
1665
+ (shen-lazyderef Hyp V785)))
1666
+ V785 V786)))
1667
+ (do (shen-unbindv V571 V785) Result)))
1668
+ false)))
1669
+ (do (shen-unbindv V559 V785) Result))))
1670
+ false)))
1671
+ false))
1672
+ false))
1673
+ false))
1674
+ false)))
1675
+ false)))
1676
+ false))
1677
+ false))
1678
+ false))
1679
+ false))
1680
+ false))
1681
+ (if (= Case false)
1682
+ (let Case
1683
+ (let V572 (shen-lazyderef V783 V785)
1684
+ (if (cons? V572)
1685
+ (let V573 (shen-lazyderef (hd V572) V785)
1686
+ (if (cons? V573)
1687
+ (let V574 (shen-lazyderef (hd V573) V785)
1688
+ (if (cons? V574)
1689
+ (let V575 (shen-lazyderef (hd V574) V785)
1690
+ (if (= @p V575)
1691
+ (let V576 (shen-lazyderef (tl V574) V785)
1692
+ (if (cons? V576)
1693
+ (let X (hd V576)
1694
+ (let V577 (shen-lazyderef (tl V576) V785)
1695
+ (if (cons? V577)
1696
+ (let Y (hd V577)
1697
+ (let V578 (shen-lazyderef (tl V577) V785)
1698
+ (if (= () V578)
1699
+ (let V579 (shen-lazyderef (tl V573) V785)
1700
+ (if (cons? V579)
1701
+ (let V580 (shen-lazyderef (hd V579) V785)
1702
+ (if (= : V580)
1703
+ (let V581 (shen-lazyderef (tl V579) V785)
1704
+ (if (cons? V581)
1705
+ (let V582 (shen-lazyderef (hd V581) V785)
1706
+ (if (cons? V582)
1707
+ (let A (hd V582)
1708
+ (let V583 (shen-lazyderef (tl V582) V785)
1709
+ (if (cons? V583)
1710
+ (let V584 (shen-lazyderef (hd V583) V785)
1711
+ (if (= * V584)
1712
+ (let V585 (shen-lazyderef (tl V583) V785)
1713
+ (if (cons? V585)
1714
+ (let B (hd V585)
1715
+ (let V586 (shen-lazyderef (tl V585) V785)
1716
+ (if (= () V586)
1717
+ (let V587 (shen-lazyderef (tl V581) V785)
1718
+ (if (= () V587)
1719
+ (let Hyp (tl V572)
1720
+ (do (shen-incinfs)
1721
+ (bind V784
1722
+ (cons
1723
+ (cons (shen-lazyderef X V785)
1724
+ (cons :
1725
+ (cons (shen-lazyderef A V785)
1726
+ ())))
1727
+ (cons
1728
+ (cons (shen-lazyderef Y V785)
1729
+ (cons :
1730
+ (cons (shen-lazyderef B V785)
1731
+ ())))
1732
+ (shen-lazyderef Hyp V785)))
1733
+ V785 V786)))
1734
+ (if (shen-pvar? V587)
1735
+ (do (shen-bindv V587 () V785)
1736
+ (let Result
1737
+ (let Hyp (tl V572)
1738
+ (do (shen-incinfs)
1739
+ (bind V784
1740
+ (cons
1741
+ (cons (shen-lazyderef X V785)
1742
+ (cons :
1743
+ (cons (shen-lazyderef A V785)
1744
+ ())))
1745
+ (cons
1746
+ (cons (shen-lazyderef Y V785)
1747
+ (cons :
1748
+ (cons (shen-lazyderef B V785)
1749
+ ())))
1750
+ (shen-lazyderef Hyp V785)))
1751
+ V785 V786)))
1752
+ (do (shen-unbindv V587 V785)
1753
+ Result)))
1754
+ false)))
1755
+ (if (shen-pvar? V586)
1756
+ (do (shen-bindv V586 () V785)
1757
+ (let Result
1758
+ (let V588
1759
+ (shen-lazyderef (tl V581) V785)
1760
+ (if (= () V588)
1761
+ (let Hyp (tl V572)
1762
+ (do (shen-incinfs)
1763
+ (bind V784
1764
+ (cons
1765
+ (cons (shen-lazyderef X V785)
1766
+ (cons :
1767
+ (cons (shen-lazyderef A V785)
1768
+ ())))
1769
+ (cons
1770
+ (cons (shen-lazyderef Y V785)
1771
+ (cons :
1772
+ (cons (shen-lazyderef B V785)
1773
+ ())))
1774
+ (shen-lazyderef Hyp V785)))
1775
+ V785 V786)))
1776
+ (if (shen-pvar? V588)
1777
+ (do (shen-bindv V588 () V785)
1778
+ (let Result
1779
+ (let Hyp (tl V572)
1780
+ (do (shen-incinfs)
1781
+ (bind V784
1782
+ (cons
1783
+ (cons (shen-lazyderef X V785)
1784
+ (cons :
1785
+ (cons
1786
+ (shen-lazyderef A V785)
1787
+ ())))
1788
+ (cons
1789
+ (cons
1790
+ (shen-lazyderef Y V785)
1791
+ (cons :
1792
+ (cons
1793
+ (shen-lazyderef B V785)
1794
+ ())))
1795
+ (shen-lazyderef Hyp V785)))
1796
+ V785 V786)))
1797
+ (do (shen-unbindv V588 V785)
1798
+ Result)))
1799
+ false)))
1800
+ (do (shen-unbindv V586 V785) Result)))
1801
+ false))))
1802
+ (if (shen-pvar? V585)
1803
+ (let B (shen-newpv V785)
1804
+ (do (shen-bindv V585 (cons B ()) V785)
1805
+ (let Result
1806
+ (let V589
1807
+ (shen-lazyderef (tl V581) V785)
1808
+ (if (= () V589)
1809
+ (let Hyp (tl V572)
1810
+ (do (shen-incinfs)
1811
+ (bind V784
1812
+ (cons
1813
+ (cons (shen-lazyderef X V785)
1814
+ (cons :
1815
+ (cons (shen-lazyderef A V785)
1816
+ ())))
1817
+ (cons
1818
+ (cons (shen-lazyderef Y V785)
1819
+ (cons :
1820
+ (cons (shen-lazyderef B V785)
1821
+ ())))
1822
+ (shen-lazyderef Hyp V785)))
1823
+ V785 V786)))
1824
+ (if (shen-pvar? V589)
1825
+ (do (shen-bindv V589 () V785)
1826
+ (let Result
1827
+ (let Hyp (tl V572)
1828
+ (do (shen-incinfs)
1829
+ (bind V784
1830
+ (cons
1831
+ (cons (shen-lazyderef X V785)
1832
+ (cons :
1833
+ (cons (shen-lazyderef A V785)
1834
+ ())))
1835
+ (cons
1836
+ (cons (shen-lazyderef Y V785)
1837
+ (cons :
1838
+ (cons
1839
+ (shen-lazyderef B V785)
1840
+ ())))
1841
+ (shen-lazyderef Hyp V785)))
1842
+ V785 V786)))
1843
+ (do (shen-unbindv V589 V785)
1844
+ Result)))
1845
+ false)))
1846
+ (do (shen-unbindv V585 V785) Result))))
1847
+ false)))
1848
+ (if (shen-pvar? V584)
1849
+ (do (shen-bindv V584 * V785)
1850
+ (let Result
1851
+ (let V590 (shen-lazyderef (tl V583) V785)
1852
+ (if (cons? V590)
1853
+ (let B (hd V590)
1854
+ (let V591
1855
+ (shen-lazyderef (tl V590) V785)
1856
+ (if (= () V591)
1857
+ (let V592
1858
+ (shen-lazyderef (tl V581) V785)
1859
+ (if (= () V592)
1860
+ (let Hyp (tl V572)
1861
+ (do (shen-incinfs)
1862
+ (bind V784
1863
+ (cons
1864
+ (cons (shen-lazyderef X V785)
1865
+ (cons :
1866
+ (cons (shen-lazyderef A V785)
1867
+ ())))
1868
+ (cons
1869
+ (cons (shen-lazyderef Y V785)
1870
+ (cons :
1871
+ (cons (shen-lazyderef B V785)
1872
+ ())))
1873
+ (shen-lazyderef Hyp V785)))
1874
+ V785 V786)))
1875
+ (if (shen-pvar? V592)
1876
+ (do (shen-bindv V592 () V785)
1877
+ (let Result
1878
+ (let Hyp (tl V572)
1879
+ (do (shen-incinfs)
1880
+ (bind V784
1881
+ (cons
1882
+ (cons (shen-lazyderef X V785)
1883
+ (cons :
1884
+ (cons
1885
+ (shen-lazyderef A V785)
1886
+ ())))
1887
+ (cons
1888
+ (cons
1889
+ (shen-lazyderef Y V785)
1890
+ (cons :
1891
+ (cons
1892
+ (shen-lazyderef B V785)
1893
+ ())))
1894
+ (shen-lazyderef Hyp V785)))
1895
+ V785 V786)))
1896
+ (do (shen-unbindv V592 V785)
1897
+ Result)))
1898
+ false)))
1899
+ (if (shen-pvar? V591)
1900
+ (do (shen-bindv V591 () V785)
1901
+ (let Result
1902
+ (let V593
1903
+ (shen-lazyderef (tl V581) V785)
1904
+ (if (= () V593)
1905
+ (let Hyp (tl V572)
1906
+ (do (shen-incinfs)
1907
+ (bind V784
1908
+ (cons
1909
+ (cons (shen-lazyderef X V785)
1910
+ (cons :
1911
+ (cons
1912
+ (shen-lazyderef A V785)
1913
+ ())))
1914
+ (cons
1915
+ (cons
1916
+ (shen-lazyderef Y V785)
1917
+ (cons :
1918
+ (cons
1919
+ (shen-lazyderef B V785)
1920
+ ())))
1921
+ (shen-lazyderef Hyp V785)))
1922
+ V785 V786)))
1923
+ (if (shen-pvar? V593)
1924
+ (do (shen-bindv V593 () V785)
1925
+ (let Result
1926
+ (let Hyp (tl V572)
1927
+ (do (shen-incinfs)
1928
+ (bind V784
1929
+ (cons
1930
+ (cons
1931
+ (shen-lazyderef X V785)
1932
+ (cons :
1933
+ (cons
1934
+ (shen-lazyderef A V785)
1935
+ ())))
1936
+ (cons
1937
+ (cons
1938
+ (shen-lazyderef Y V785)
1939
+ (cons :
1940
+ (cons
1941
+ (shen-lazyderef B
1942
+ V785)
1943
+ ())))
1944
+ (shen-lazyderef Hyp
1945
+ V785)))
1946
+ V785 V786)))
1947
+ (do (shen-unbindv V593 V785)
1948
+ Result)))
1949
+ false)))
1950
+ (do (shen-unbindv V591 V785)
1951
+ Result)))
1952
+ false))))
1953
+ (if (shen-pvar? V590)
1954
+ (let B (shen-newpv V785)
1955
+ (do (shen-bindv V590 (cons B ()) V785)
1956
+ (let Result
1957
+ (let V594
1958
+ (shen-lazyderef (tl V581) V785)
1959
+ (if (= () V594)
1960
+ (let Hyp (tl V572)
1961
+ (do (shen-incinfs)
1962
+ (bind V784
1963
+ (cons
1964
+ (cons (shen-lazyderef X V785)
1965
+ (cons :
1966
+ (cons (shen-lazyderef A V785)
1967
+ ())))
1968
+ (cons
1969
+ (cons (shen-lazyderef Y V785)
1970
+ (cons :
1971
+ (cons
1972
+ (shen-lazyderef B V785)
1973
+ ())))
1974
+ (shen-lazyderef Hyp V785)))
1975
+ V785 V786)))
1976
+ (if (shen-pvar? V594)
1977
+ (do (shen-bindv V594 () V785)
1978
+ (let Result
1979
+ (let Hyp (tl V572)
1980
+ (do (shen-incinfs)
1981
+ (bind V784
1982
+ (cons
1983
+ (cons
1984
+ (shen-lazyderef X V785)
1985
+ (cons :
1986
+ (cons
1987
+ (shen-lazyderef A V785)
1988
+ ())))
1989
+ (cons
1990
+ (cons
1991
+ (shen-lazyderef Y V785)
1992
+ (cons :
1993
+ (cons
1994
+ (shen-lazyderef B V785)
1995
+ ())))
1996
+ (shen-lazyderef Hyp V785)))
1997
+ V785 V786)))
1998
+ (do (shen-unbindv V594 V785)
1999
+ Result)))
2000
+ false)))
2001
+ (do (shen-unbindv V590 V785)
2002
+ Result))))
2003
+ false)))
2004
+ (do (shen-unbindv V584 V785) Result)))
2005
+ false)))
2006
+ (if (shen-pvar? V583)
2007
+ (let B (shen-newpv V785)
2008
+ (do
2009
+ (shen-bindv V583 (cons * (cons B ())) V785)
2010
+ (let Result
2011
+ (let V595 (shen-lazyderef (tl V581) V785)
2012
+ (if (= () V595)
2013
+ (let Hyp (tl V572)
2014
+ (do (shen-incinfs)
2015
+ (bind V784
2016
+ (cons
2017
+ (cons (shen-lazyderef X V785)
2018
+ (cons :
2019
+ (cons (shen-lazyderef A V785) ())))
2020
+ (cons
2021
+ (cons (shen-lazyderef Y V785)
2022
+ (cons :
2023
+ (cons (shen-lazyderef B V785)
2024
+ ())))
2025
+ (shen-lazyderef Hyp V785)))
2026
+ V785 V786)))
2027
+ (if (shen-pvar? V595)
2028
+ (do (shen-bindv V595 () V785)
2029
+ (let Result
2030
+ (let Hyp (tl V572)
2031
+ (do (shen-incinfs)
2032
+ (bind V784
2033
+ (cons
2034
+ (cons (shen-lazyderef X V785)
2035
+ (cons :
2036
+ (cons (shen-lazyderef A V785)
2037
+ ())))
2038
+ (cons
2039
+ (cons (shen-lazyderef Y V785)
2040
+ (cons :
2041
+ (cons (shen-lazyderef B V785)
2042
+ ())))
2043
+ (shen-lazyderef Hyp V785)))
2044
+ V785 V786)))
2045
+ (do (shen-unbindv V595 V785) Result)))
2046
+ false)))
2047
+ (do (shen-unbindv V583 V785) Result))))
2048
+ false))))
2049
+ (if (shen-pvar? V582)
2050
+ (let A (shen-newpv V785)
2051
+ (let B (shen-newpv V785)
2052
+ (do
2053
+ (shen-bindv V582 (cons A (cons * (cons B ())))
2054
+ V785)
2055
+ (let Result
2056
+ (let V596 (shen-lazyderef (tl V581) V785)
2057
+ (if (= () V596)
2058
+ (let Hyp (tl V572)
2059
+ (do (shen-incinfs)
2060
+ (bind V784
2061
+ (cons
2062
+ (cons (shen-lazyderef X V785)
2063
+ (cons :
2064
+ (cons (shen-lazyderef A V785) ())))
2065
+ (cons
2066
+ (cons (shen-lazyderef Y V785)
2067
+ (cons :
2068
+ (cons (shen-lazyderef B V785) ())))
2069
+ (shen-lazyderef Hyp V785)))
2070
+ V785 V786)))
2071
+ (if (shen-pvar? V596)
2072
+ (do (shen-bindv V596 () V785)
2073
+ (let Result
2074
+ (let Hyp (tl V572)
2075
+ (do (shen-incinfs)
2076
+ (bind V784
2077
+ (cons
2078
+ (cons (shen-lazyderef X V785)
2079
+ (cons :
2080
+ (cons (shen-lazyderef A V785)
2081
+ ())))
2082
+ (cons
2083
+ (cons (shen-lazyderef Y V785)
2084
+ (cons :
2085
+ (cons (shen-lazyderef B V785)
2086
+ ())))
2087
+ (shen-lazyderef Hyp V785)))
2088
+ V785 V786)))
2089
+ (do (shen-unbindv V596 V785) Result)))
2090
+ false)))
2091
+ (do (shen-unbindv V582 V785) Result)))))
2092
+ false)))
2093
+ false))
2094
+ false))
2095
+ false))
2096
+ false)))
2097
+ false)))
2098
+ false))
2099
+ false))
2100
+ false))
2101
+ false))
2102
+ false))
2103
+ (if (= Case false)
2104
+ (let Case
2105
+ (let V597 (shen-lazyderef V783 V785)
2106
+ (if (cons? V597)
2107
+ (let V598 (shen-lazyderef (hd V597) V785)
2108
+ (if (cons? V598)
2109
+ (let V599 (shen-lazyderef (hd V598) V785)
2110
+ (if (cons? V599)
2111
+ (let V600 (shen-lazyderef (hd V599) V785)
2112
+ (if (= @v V600)
2113
+ (let V601 (shen-lazyderef (tl V599) V785)
2114
+ (if (cons? V601)
2115
+ (let X (hd V601)
2116
+ (let V602 (shen-lazyderef (tl V601) V785)
2117
+ (if (cons? V602)
2118
+ (let Y (hd V602)
2119
+ (let V603 (shen-lazyderef (tl V602) V785)
2120
+ (if (= () V603)
2121
+ (let V604 (shen-lazyderef (tl V598) V785)
2122
+ (if (cons? V604)
2123
+ (let V605 (shen-lazyderef (hd V604) V785)
2124
+ (if (= : V605)
2125
+ (let V606 (shen-lazyderef (tl V604) V785)
2126
+ (if (cons? V606)
2127
+ (let V607 (shen-lazyderef (hd V606) V785)
2128
+ (if (cons? V607)
2129
+ (let V608 (shen-lazyderef (hd V607) V785)
2130
+ (if (= vector V608)
2131
+ (let V609 (shen-lazyderef (tl V607) V785)
2132
+ (if (cons? V609)
2133
+ (let A (hd V609)
2134
+ (let V610 (shen-lazyderef (tl V609) V785)
2135
+ (if (= () V610)
2136
+ (let V611 (shen-lazyderef (tl V606) V785)
2137
+ (if (= () V611)
2138
+ (let Hyp (tl V597)
2139
+ (do (shen-incinfs)
2140
+ (bind V784
2141
+ (cons
2142
+ (cons (shen-lazyderef X V785)
2143
+ (cons :
2144
+ (cons (shen-lazyderef A V785)
2145
+ ())))
2146
+ (cons
2147
+ (cons (shen-lazyderef Y V785)
2148
+ (cons :
2149
+ (cons
2150
+ (cons vector
2151
+ (cons (shen-lazyderef A V785)
2152
+ ()))
2153
+ ())))
2154
+ (shen-lazyderef Hyp V785)))
2155
+ V785 V786)))
2156
+ (if (shen-pvar? V611)
2157
+ (do (shen-bindv V611 () V785)
2158
+ (let Result
2159
+ (let Hyp (tl V597)
2160
+ (do (shen-incinfs)
2161
+ (bind V784
2162
+ (cons
2163
+ (cons (shen-lazyderef X V785)
2164
+ (cons :
2165
+ (cons (shen-lazyderef A V785)
2166
+ ())))
2167
+ (cons
2168
+ (cons (shen-lazyderef Y V785)
2169
+ (cons :
2170
+ (cons
2171
+ (cons vector
2172
+ (cons
2173
+ (shen-lazyderef A V785)
2174
+ ()))
2175
+ ())))
2176
+ (shen-lazyderef Hyp V785)))
2177
+ V785 V786)))
2178
+ (do (shen-unbindv V611 V785)
2179
+ Result)))
2180
+ false)))
2181
+ (if (shen-pvar? V610)
2182
+ (do (shen-bindv V610 () V785)
2183
+ (let Result
2184
+ (let V612
2185
+ (shen-lazyderef (tl V606) V785)
2186
+ (if (= () V612)
2187
+ (let Hyp (tl V597)
2188
+ (do (shen-incinfs)
2189
+ (bind V784
2190
+ (cons
2191
+ (cons (shen-lazyderef X V785)
2192
+ (cons :
2193
+ (cons (shen-lazyderef A V785)
2194
+ ())))
2195
+ (cons
2196
+ (cons (shen-lazyderef Y V785)
2197
+ (cons :
2198
+ (cons
2199
+ (cons vector
2200
+ (cons
2201
+ (shen-lazyderef A V785)
2202
+ ()))
2203
+ ())))
2204
+ (shen-lazyderef Hyp V785)))
2205
+ V785 V786)))
2206
+ (if (shen-pvar? V612)
2207
+ (do (shen-bindv V612 () V785)
2208
+ (let Result
2209
+ (let Hyp (tl V597)
2210
+ (do (shen-incinfs)
2211
+ (bind V784
2212
+ (cons
2213
+ (cons (shen-lazyderef X V785)
2214
+ (cons :
2215
+ (cons
2216
+ (shen-lazyderef A V785)
2217
+ ())))
2218
+ (cons
2219
+ (cons (shen-lazyderef Y V785)
2220
+ (cons :
2221
+ (cons
2222
+ (cons vector
2223
+ (cons
2224
+ (shen-lazyderef A V785)
2225
+ ()))
2226
+ ())))
2227
+ (shen-lazyderef Hyp V785)))
2228
+ V785 V786)))
2229
+ (do (shen-unbindv V612 V785)
2230
+ Result)))
2231
+ false)))
2232
+ (do (shen-unbindv V610 V785) Result)))
2233
+ false))))
2234
+ (if (shen-pvar? V609)
2235
+ (let A (shen-newpv V785)
2236
+ (do (shen-bindv V609 (cons A ()) V785)
2237
+ (let Result
2238
+ (let V613 (shen-lazyderef (tl V606) V785)
2239
+ (if (= () V613)
2240
+ (let Hyp (tl V597)
2241
+ (do (shen-incinfs)
2242
+ (bind V784
2243
+ (cons
2244
+ (cons (shen-lazyderef X V785)
2245
+ (cons :
2246
+ (cons (shen-lazyderef A V785)
2247
+ ())))
2248
+ (cons
2249
+ (cons (shen-lazyderef Y V785)
2250
+ (cons :
2251
+ (cons
2252
+ (cons vector
2253
+ (cons (shen-lazyderef A V785)
2254
+ ()))
2255
+ ())))
2256
+ (shen-lazyderef Hyp V785)))
2257
+ V785 V786)))
2258
+ (if (shen-pvar? V613)
2259
+ (do (shen-bindv V613 () V785)
2260
+ (let Result
2261
+ (let Hyp (tl V597)
2262
+ (do (shen-incinfs)
2263
+ (bind V784
2264
+ (cons
2265
+ (cons (shen-lazyderef X V785)
2266
+ (cons :
2267
+ (cons (shen-lazyderef A V785)
2268
+ ())))
2269
+ (cons
2270
+ (cons (shen-lazyderef Y V785)
2271
+ (cons :
2272
+ (cons
2273
+ (cons vector
2274
+ (cons
2275
+ (shen-lazyderef A V785)
2276
+ ()))
2277
+ ())))
2278
+ (shen-lazyderef Hyp V785)))
2279
+ V785 V786)))
2280
+ (do (shen-unbindv V613 V785)
2281
+ Result)))
2282
+ false)))
2283
+ (do (shen-unbindv V609 V785) Result))))
2284
+ false)))
2285
+ (if (shen-pvar? V608)
2286
+ (do (shen-bindv V608 vector V785)
2287
+ (let Result
2288
+ (let V614 (shen-lazyderef (tl V607) V785)
2289
+ (if (cons? V614)
2290
+ (let A (hd V614)
2291
+ (let V615 (shen-lazyderef (tl V614) V785)
2292
+ (if (= () V615)
2293
+ (let V616
2294
+ (shen-lazyderef (tl V606) V785)
2295
+ (if (= () V616)
2296
+ (let Hyp (tl V597)
2297
+ (do (shen-incinfs)
2298
+ (bind V784
2299
+ (cons
2300
+ (cons (shen-lazyderef X V785)
2301
+ (cons :
2302
+ (cons (shen-lazyderef A V785)
2303
+ ())))
2304
+ (cons
2305
+ (cons (shen-lazyderef Y V785)
2306
+ (cons :
2307
+ (cons
2308
+ (cons vector
2309
+ (cons
2310
+ (shen-lazyderef A V785)
2311
+ ()))
2312
+ ())))
2313
+ (shen-lazyderef Hyp V785)))
2314
+ V785 V786)))
2315
+ (if (shen-pvar? V616)
2316
+ (do (shen-bindv V616 () V785)
2317
+ (let Result
2318
+ (let Hyp (tl V597)
2319
+ (do (shen-incinfs)
2320
+ (bind V784
2321
+ (cons
2322
+ (cons (shen-lazyderef X V785)
2323
+ (cons :
2324
+ (cons
2325
+ (shen-lazyderef A V785)
2326
+ ())))
2327
+ (cons
2328
+ (cons (shen-lazyderef Y V785)
2329
+ (cons :
2330
+ (cons
2331
+ (cons vector
2332
+ (cons
2333
+ (shen-lazyderef A V785)
2334
+ ()))
2335
+ ())))
2336
+ (shen-lazyderef Hyp V785)))
2337
+ V785 V786)))
2338
+ (do (shen-unbindv V616 V785)
2339
+ Result)))
2340
+ false)))
2341
+ (if (shen-pvar? V615)
2342
+ (do (shen-bindv V615 () V785)
2343
+ (let Result
2344
+ (let V617
2345
+ (shen-lazyderef (tl V606) V785)
2346
+ (if (= () V617)
2347
+ (let Hyp (tl V597)
2348
+ (do (shen-incinfs)
2349
+ (bind V784
2350
+ (cons
2351
+ (cons (shen-lazyderef X V785)
2352
+ (cons :
2353
+ (cons
2354
+ (shen-lazyderef A V785)
2355
+ ())))
2356
+ (cons
2357
+ (cons (shen-lazyderef Y V785)
2358
+ (cons :
2359
+ (cons
2360
+ (cons vector
2361
+ (cons
2362
+ (shen-lazyderef A V785)
2363
+ ()))
2364
+ ())))
2365
+ (shen-lazyderef Hyp V785)))
2366
+ V785 V786)))
2367
+ (if (shen-pvar? V617)
2368
+ (do (shen-bindv V617 () V785)
2369
+ (let Result
2370
+ (let Hyp (tl V597)
2371
+ (do (shen-incinfs)
2372
+ (bind V784
2373
+ (cons
2374
+ (cons
2375
+ (shen-lazyderef X V785)
2376
+ (cons :
2377
+ (cons
2378
+ (shen-lazyderef A V785)
2379
+ ())))
2380
+ (cons
2381
+ (cons
2382
+ (shen-lazyderef Y V785)
2383
+ (cons :
2384
+ (cons
2385
+ (cons vector
2386
+ (cons
2387
+ (shen-lazyderef A
2388
+ V785)
2389
+ ()))
2390
+ ())))
2391
+ (shen-lazyderef Hyp
2392
+ V785)))
2393
+ V785 V786)))
2394
+ (do (shen-unbindv V617 V785)
2395
+ Result)))
2396
+ false)))
2397
+ (do (shen-unbindv V615 V785)
2398
+ Result)))
2399
+ false))))
2400
+ (if (shen-pvar? V614)
2401
+ (let A (shen-newpv V785)
2402
+ (do (shen-bindv V614 (cons A ()) V785)
2403
+ (let Result
2404
+ (let V618
2405
+ (shen-lazyderef (tl V606) V785)
2406
+ (if (= () V618)
2407
+ (let Hyp (tl V597)
2408
+ (do (shen-incinfs)
2409
+ (bind V784
2410
+ (cons
2411
+ (cons (shen-lazyderef X V785)
2412
+ (cons :
2413
+ (cons (shen-lazyderef A V785)
2414
+ ())))
2415
+ (cons
2416
+ (cons (shen-lazyderef Y V785)
2417
+ (cons :
2418
+ (cons
2419
+ (cons vector
2420
+ (cons
2421
+ (shen-lazyderef A V785)
2422
+ ()))
2423
+ ())))
2424
+ (shen-lazyderef Hyp V785)))
2425
+ V785 V786)))
2426
+ (if (shen-pvar? V618)
2427
+ (do (shen-bindv V618 () V785)
2428
+ (let Result
2429
+ (let Hyp (tl V597)
2430
+ (do (shen-incinfs)
2431
+ (bind V784
2432
+ (cons
2433
+ (cons (shen-lazyderef X V785)
2434
+ (cons :
2435
+ (cons
2436
+ (shen-lazyderef A V785)
2437
+ ())))
2438
+ (cons
2439
+ (cons
2440
+ (shen-lazyderef Y V785)
2441
+ (cons :
2442
+ (cons
2443
+ (cons vector
2444
+ (cons
2445
+ (shen-lazyderef A V785)
2446
+ ()))
2447
+ ())))
2448
+ (shen-lazyderef Hyp V785)))
2449
+ V785 V786)))
2450
+ (do (shen-unbindv V618 V785)
2451
+ Result)))
2452
+ false)))
2453
+ (do (shen-unbindv V614 V785)
2454
+ Result))))
2455
+ false)))
2456
+ (do (shen-unbindv V608 V785) Result)))
2457
+ false)))
2458
+ (if (shen-pvar? V607)
2459
+ (let A (shen-newpv V785)
2460
+ (do
2461
+ (shen-bindv V607 (cons vector (cons A ()))
2462
+ V785)
2463
+ (let Result
2464
+ (let V619 (shen-lazyderef (tl V606) V785)
2465
+ (if (= () V619)
2466
+ (let Hyp (tl V597)
2467
+ (do (shen-incinfs)
2468
+ (bind V784
2469
+ (cons
2470
+ (cons (shen-lazyderef X V785)
2471
+ (cons :
2472
+ (cons (shen-lazyderef A V785) ())))
2473
+ (cons
2474
+ (cons (shen-lazyderef Y V785)
2475
+ (cons :
2476
+ (cons
2477
+ (cons vector
2478
+ (cons (shen-lazyderef A V785)
2479
+ ()))
2480
+ ())))
2481
+ (shen-lazyderef Hyp V785)))
2482
+ V785 V786)))
2483
+ (if (shen-pvar? V619)
2484
+ (do (shen-bindv V619 () V785)
2485
+ (let Result
2486
+ (let Hyp (tl V597)
2487
+ (do (shen-incinfs)
2488
+ (bind V784
2489
+ (cons
2490
+ (cons (shen-lazyderef X V785)
2491
+ (cons :
2492
+ (cons (shen-lazyderef A V785)
2493
+ ())))
2494
+ (cons
2495
+ (cons (shen-lazyderef Y V785)
2496
+ (cons :
2497
+ (cons
2498
+ (cons vector
2499
+ (cons (shen-lazyderef A V785)
2500
+ ()))
2501
+ ())))
2502
+ (shen-lazyderef Hyp V785)))
2503
+ V785 V786)))
2504
+ (do (shen-unbindv V619 V785) Result)))
2505
+ false)))
2506
+ (do (shen-unbindv V607 V785) Result))))
2507
+ false)))
2508
+ false))
2509
+ false))
2510
+ false))
2511
+ false)))
2512
+ false)))
2513
+ false))
2514
+ false))
2515
+ false))
2516
+ false))
2517
+ false))
2518
+ (if (= Case false)
2519
+ (let Case
2520
+ (let V620 (shen-lazyderef V783 V785)
2521
+ (if (cons? V620)
2522
+ (let V621 (shen-lazyderef (hd V620) V785)
2523
+ (if (cons? V621)
2524
+ (let V622 (shen-lazyderef (hd V621) V785)
2525
+ (if (cons? V622)
2526
+ (let V623 (shen-lazyderef (hd V622) V785)
2527
+ (if (= @s V623)
2528
+ (let V624 (shen-lazyderef (tl V622) V785)
2529
+ (if (cons? V624)
2530
+ (let X (hd V624)
2531
+ (let V625 (shen-lazyderef (tl V624) V785)
2532
+ (if (cons? V625)
2533
+ (let Y (hd V625)
2534
+ (let V626 (shen-lazyderef (tl V625) V785)
2535
+ (if (= () V626)
2536
+ (let V627 (shen-lazyderef (tl V621) V785)
2537
+ (if (cons? V627)
2538
+ (let V628 (shen-lazyderef (hd V627) V785)
2539
+ (if (= : V628)
2540
+ (let V629 (shen-lazyderef (tl V627) V785)
2541
+ (if (cons? V629)
2542
+ (let V630 (shen-lazyderef (hd V629) V785)
2543
+ (if (= string V630)
2544
+ (let V631 (shen-lazyderef (tl V629) V785)
2545
+ (if (= () V631)
2546
+ (let Hyp (tl V620)
2547
+ (do (shen-incinfs)
2548
+ (bind V784
2549
+ (cons
2550
+ (cons (shen-lazyderef X V785)
2551
+ (cons : (cons string ())))
2552
+ (cons
2553
+ (cons (shen-lazyderef Y V785)
2554
+ (cons : (cons string ())))
2555
+ (shen-lazyderef Hyp V785)))
2556
+ V785 V786)))
2557
+ (if (shen-pvar? V631)
2558
+ (do (shen-bindv V631 () V785)
2559
+ (let Result
2560
+ (let Hyp (tl V620)
2561
+ (do (shen-incinfs)
2562
+ (bind V784
2563
+ (cons
2564
+ (cons (shen-lazyderef X V785)
2565
+ (cons : (cons string ())))
2566
+ (cons
2567
+ (cons (shen-lazyderef Y V785)
2568
+ (cons : (cons string ())))
2569
+ (shen-lazyderef Hyp V785)))
2570
+ V785 V786)))
2571
+ (do (shen-unbindv V631 V785) Result)))
2572
+ false)))
2573
+ (if (shen-pvar? V630)
2574
+ (do (shen-bindv V630 string V785)
2575
+ (let Result
2576
+ (let V632 (shen-lazyderef (tl V629) V785)
2577
+ (if (= () V632)
2578
+ (let Hyp (tl V620)
2579
+ (do (shen-incinfs)
2580
+ (bind V784
2581
+ (cons
2582
+ (cons (shen-lazyderef X V785)
2583
+ (cons : (cons string ())))
2584
+ (cons
2585
+ (cons (shen-lazyderef Y V785)
2586
+ (cons : (cons string ())))
2587
+ (shen-lazyderef Hyp V785)))
2588
+ V785 V786)))
2589
+ (if (shen-pvar? V632)
2590
+ (do (shen-bindv V632 () V785)
2591
+ (let Result
2592
+ (let Hyp (tl V620)
2593
+ (do (shen-incinfs)
2594
+ (bind V784
2595
+ (cons
2596
+ (cons (shen-lazyderef X V785)
2597
+ (cons : (cons string ())))
2598
+ (cons
2599
+ (cons (shen-lazyderef Y V785)
2600
+ (cons : (cons string ())))
2601
+ (shen-lazyderef Hyp V785)))
2602
+ V785 V786)))
2603
+ (do (shen-unbindv V632 V785) Result)))
2604
+ false)))
2605
+ (do (shen-unbindv V630 V785) Result)))
2606
+ false)))
2607
+ false))
2608
+ false))
2609
+ false))
2610
+ false)))
2611
+ false)))
2612
+ false))
2613
+ false))
2614
+ false))
2615
+ false))
2616
+ false))
2617
+ (if (= Case false)
2618
+ (let V633 (shen-lazyderef V783 V785)
2619
+ (if (cons? V633)
2620
+ (let X (hd V633)
2621
+ (let Hyp (tl V633)
2622
+ (let NewHyps (shen-newpv V785)
2623
+ (do (shen-incinfs)
2624
+ (bind V784
2625
+ (cons (shen-lazyderef X V785) (shen-lazyderef NewHyps V785))
2626
+ V785 (freeze (shen-t*-hyps Hyp NewHyps V785 V786)))))))
2627
+ false))
2628
+ Case))
2629
+ Case))
2630
+ Case))
2631
+ Case)))
2632
+
2633
+ (defun shen-show (V799 V800 V801 V802)
2634
+ (cond
2635
+ ((value shen-*spy*)
2636
+ (do (shen-line)
2637
+ (do (shen-show-p (shen-deref V799 V801))
2638
+ (do (nl 1)
2639
+ (do (nl 1)
2640
+ (do (shen-show-assumptions (shen-deref V800 V801) 1)
2641
+ (do (intoutput "~%> " ())
2642
+ (do (shen-pause-for-user (value *language*)) (thaw V802)))))))))
2643
+ (true (thaw V802))))
2644
+
2645
+ (defun shen-line ()
2646
+ (let Infs (inferences _)
2647
+ (intoutput
2648
+ "____________________________________________________________ ~A inference~A ~%?- "
2649
+ (@p Infs (@p (if (= 1 Infs) "" "s") ())))))
2650
+
2651
+ (defun shen-show-p (V803)
2652
+ (cond
2653
+ ((and (cons? V803)
2654
+ (and (cons? (tl V803))
2655
+ (and (= : (hd (tl V803)))
2656
+ (and (cons? (tl (tl V803))) (= () (tl (tl (tl V803))))))))
2657
+ (intoutput "~R : ~R" (@p (hd V803) (@p (hd (tl (tl V803))) ()))))
2658
+ (true (intoutput "~R" (@p V803 ())))))
2659
+
2660
+ (defun shen-show-assumptions (V806 V807)
2661
+ (cond ((= () V806) shen-skip)
2662
+ ((cons? V806)
2663
+ (do (intoutput "~A. " (@p V807 ()))
2664
+ (do (shen-show-p (hd V806))
2665
+ (do (nl 1) (shen-show-assumptions (tl V806) (+ V807 1))))))
2666
+ (true (shen-f_error shen-show-assumptions))))
2667
+
2668
+ (defun shen-pause-for-user (V812)
2669
+ (cond
2670
+ ((= "Common Lisp" V812)
2671
+ (let I (FORMAT () "~C" (READ-CHAR))
2672
+ (if (= I "a") (interror "input aborted~%" ()) (nl 1))))
2673
+ (true
2674
+ (let I (shen-read-char)
2675
+ (if (= I "a") (interror "input aborted~%" ()) (nl 1))))))
2676
+
2677
+ (defun shen-read-char () (shen-read-char-h (read-byte (stinput 0)) 0))
2678
+
2679
+ (defun shen-read-char-h (V815 V816)
2680
+ (cond
2681
+ ((and (= -1 V815) (= 0 V816)) (shen-read-char-h (read-byte (stinput 0)) 1))
2682
+ ((= 0 V816) (shen-read-char-h (read-byte (stinput 0)) 0))
2683
+ ((and (= -1 V815) (= 1 V816)) (shen-read-char-h (read-byte (stinput 0)) 1))
2684
+ ((= 1 V816) (byte->string V815)) (true (shen-f_error shen-read-char-h))))
2685
+
2686
+ (defun shen-typedf? (V817) (element? V817 (value shen-*signedfuncs*)))
2687
+
2688
+ (defun shen-sigf (V818) (concat shen-type-signature-of- V818))
2689
+
2690
+ (defun shen-placeholder () (gensym &&))
2691
+
2692
+ (defun shen-base (V819 V820 V821 V822)
2693
+ (let Case
2694
+ (let V536 (shen-lazyderef V820 V821)
2695
+ (if (= number V536)
2696
+ (do (shen-incinfs) (fwhen (number? (shen-lazyderef V819 V821)) V821 V822))
2697
+ (if (shen-pvar? V536)
2698
+ (do (shen-bindv V536 number V821)
2699
+ (let Result
2700
+ (do (shen-incinfs)
2701
+ (fwhen (number? (shen-lazyderef V819 V821)) V821 V822))
2702
+ (do (shen-unbindv V536 V821) Result)))
2703
+ false)))
2704
+ (if (= Case false)
2705
+ (let Case
2706
+ (let V537 (shen-lazyderef V820 V821)
2707
+ (if (= boolean V537)
2708
+ (do (shen-incinfs)
2709
+ (fwhen (boolean? (shen-lazyderef V819 V821)) V821 V822))
2710
+ (if (shen-pvar? V537)
2711
+ (do (shen-bindv V537 boolean V821)
2712
+ (let Result
2713
+ (do (shen-incinfs)
2714
+ (fwhen (boolean? (shen-lazyderef V819 V821)) V821 V822))
2715
+ (do (shen-unbindv V537 V821) Result)))
2716
+ false)))
2717
+ (if (= Case false)
2718
+ (let Case
2719
+ (let V538 (shen-lazyderef V820 V821)
2720
+ (if (= string V538)
2721
+ (do (shen-incinfs)
2722
+ (fwhen (string? (shen-lazyderef V819 V821)) V821 V822))
2723
+ (if (shen-pvar? V538)
2724
+ (do (shen-bindv V538 string V821)
2725
+ (let Result
2726
+ (do (shen-incinfs)
2727
+ (fwhen (string? (shen-lazyderef V819 V821)) V821 V822))
2728
+ (do (shen-unbindv V538 V821) Result)))
2729
+ false)))
2730
+ (if (= Case false)
2731
+ (let Case
2732
+ (let V539 (shen-lazyderef V820 V821)
2733
+ (if (= symbol V539)
2734
+ (do (shen-incinfs)
2735
+ (fwhen (symbol? (shen-lazyderef V819 V821)) V821
2736
+ (freeze
2737
+ (fwhen (not (shen-placeholder? (shen-lazyderef V819 V821))) V821
2738
+ V822))))
2739
+ (if (shen-pvar? V539)
2740
+ (do (shen-bindv V539 symbol V821)
2741
+ (let Result
2742
+ (do (shen-incinfs)
2743
+ (fwhen (symbol? (shen-lazyderef V819 V821)) V821
2744
+ (freeze
2745
+ (fwhen (not (shen-placeholder? (shen-lazyderef V819 V821)))
2746
+ V821 V822))))
2747
+ (do (shen-unbindv V539 V821) Result)))
2748
+ false)))
2749
+ (if (= Case false)
2750
+ (let V540 (shen-lazyderef V819 V821)
2751
+ (if (= () V540)
2752
+ (let V541 (shen-lazyderef V820 V821)
2753
+ (if (cons? V541)
2754
+ (let V542 (shen-lazyderef (hd V541) V821)
2755
+ (if (= list V542)
2756
+ (let V543 (shen-lazyderef (tl V541) V821)
2757
+ (if (cons? V543)
2758
+ (let A (hd V543)
2759
+ (let V544 (shen-lazyderef (tl V543) V821)
2760
+ (if (= () V544) (do (shen-incinfs) (thaw V822))
2761
+ (if (shen-pvar? V544)
2762
+ (do (shen-bindv V544 () V821)
2763
+ (let Result (do (shen-incinfs) (thaw V822))
2764
+ (do (shen-unbindv V544 V821) Result)))
2765
+ false))))
2766
+ (if (shen-pvar? V543)
2767
+ (let A (shen-newpv V821)
2768
+ (do (shen-bindv V543 (cons A ()) V821)
2769
+ (let Result (do (shen-incinfs) (thaw V822))
2770
+ (do (shen-unbindv V543 V821) Result))))
2771
+ false)))
2772
+ (if (shen-pvar? V542)
2773
+ (do (shen-bindv V542 list V821)
2774
+ (let Result
2775
+ (let V545 (shen-lazyderef (tl V541) V821)
2776
+ (if (cons? V545)
2777
+ (let A (hd V545)
2778
+ (let V546 (shen-lazyderef (tl V545) V821)
2779
+ (if (= () V546) (do (shen-incinfs) (thaw V822))
2780
+ (if (shen-pvar? V546)
2781
+ (do (shen-bindv V546 () V821)
2782
+ (let Result (do (shen-incinfs) (thaw V822))
2783
+ (do (shen-unbindv V546 V821) Result)))
2784
+ false))))
2785
+ (if (shen-pvar? V545)
2786
+ (let A (shen-newpv V821)
2787
+ (do (shen-bindv V545 (cons A ()) V821)
2788
+ (let Result (do (shen-incinfs) (thaw V822))
2789
+ (do (shen-unbindv V545 V821) Result))))
2790
+ false)))
2791
+ (do (shen-unbindv V542 V821) Result)))
2792
+ false)))
2793
+ (if (shen-pvar? V541)
2794
+ (let A (shen-newpv V821)
2795
+ (do (shen-bindv V541 (cons list (cons A ())) V821)
2796
+ (let Result (do (shen-incinfs) (thaw V822))
2797
+ (do (shen-unbindv V541 V821) Result))))
2798
+ false)))
2799
+ false))
2800
+ Case))
2801
+ Case))
2802
+ Case))
2803
+ Case)))
2804
+
2805
+ (defun shen-placeholder? (V823)
2806
+ (and (symbol? V823) (shen-placeholder-help? (str V823))))
2807
+
2808
+ (defun shen-placeholder-help? (V830)
2809
+ (cond
2810
+ ((and (shen-+string? V830)
2811
+ (and (= "&" (pos V830 0))
2812
+ (and (shen-+string? (tlstr V830)) (= "&" (pos (tlstr V830) 0)))))
2813
+ true)
2814
+ (true false)))
2815
+
2816
+ (defun shen-by_hypothesis (V831 V832 V833 V834 V835)
2817
+ (let Case
2818
+ (let V527 (shen-lazyderef V833 V834)
2819
+ (if (cons? V527)
2820
+ (let V528 (shen-lazyderef (hd V527) V834)
2821
+ (if (cons? V528)
2822
+ (let Y (hd V528)
2823
+ (let V529 (shen-lazyderef (tl V528) V834)
2824
+ (if (cons? V529)
2825
+ (let V530 (shen-lazyderef (hd V529) V834)
2826
+ (if (= : V530)
2827
+ (let V531 (shen-lazyderef (tl V529) V834)
2828
+ (if (cons? V531)
2829
+ (let B (hd V531)
2830
+ (let V532 (shen-lazyderef (tl V531) V834)
2831
+ (if (= () V532)
2832
+ (do (shen-incinfs)
2833
+ (identical V831 Y V834 (freeze (unify! V832 B V834 V835))))
2834
+ false)))
2835
+ false))
2836
+ false))
2837
+ false)))
2838
+ false))
2839
+ false))
2840
+ (if (= Case false)
2841
+ (let V533 (shen-lazyderef V833 V834)
2842
+ (if (cons? V533)
2843
+ (let Hyp (tl V533)
2844
+ (do (shen-incinfs) (shen-by_hypothesis V831 V832 Hyp V834 V835)))
2845
+ false))
2846
+ Case)))
2847
+
2848
+ (defun shen-t*-def (V836 V837 V838 V839 V840)
2849
+ (let Throwcontrol (shen-catchpoint)
2850
+ (shen-cutpoint Throwcontrol
2851
+ (let V521 (shen-lazyderef V836 V839)
2852
+ (if (cons? V521)
2853
+ (let V522 (shen-lazyderef (hd V521) V839)
2854
+ (if (= define V522)
2855
+ (let V523 (shen-lazyderef (tl V521) V839)
2856
+ (if (cons? V523)
2857
+ (let F (hd V523)
2858
+ (let X (tl V523)
2859
+ (let Error (shen-newpv V839)
2860
+ (let Sig+Rules (shen-newpv V839)
2861
+ (let Vars (shen-newpv V839)
2862
+ (let Rules (shen-newpv V839)
2863
+ (let Sig&& (shen-newpv V839)
2864
+ (let Declare (shen-newpv V839)
2865
+ (let Sig (shen-newpv V839)
2866
+ (do (shen-incinfs)
2867
+ (bind Sig+Rules
2868
+ (compile (lambda X (shen-<sig+rules> X))
2869
+ (shen-lazyderef X V839) ())
2870
+ V839
2871
+ (freeze
2872
+ (bind Error
2873
+ (if (= (shen-lazyderef Sig+Rules V839) (fail))
2874
+ (shen-errordef (shen-lazyderef F V839)) shen-skip)
2875
+ V839
2876
+ (freeze
2877
+ (bind Sig (hd (shen-lazyderef Sig+Rules V839)) V839
2878
+ (freeze
2879
+ (bind Rules (tl (shen-lazyderef Sig+Rules V839)) V839
2880
+ (freeze
2881
+ (bind Vars
2882
+ (shen-extract_vars (shen-lazyderef Sig V839)) V839
2883
+ (freeze
2884
+ (bind Sig&&
2885
+ (shen-placeholders (shen-lazyderef Sig V839)
2886
+ (shen-lazyderef Vars V839))
2887
+ V839
2888
+ (freeze
2889
+ (cut Throwcontrol V839
2890
+ (freeze
2891
+ (shen-t*-rules Rules Sig&& 1 F
2892
+ (cons (cons F (cons : (cons Sig&& ())))
2893
+ V838)
2894
+ V839
2895
+ (freeze
2896
+ (bind Declare
2897
+ (declare (shen-lazyderef F V839)
2898
+ (shen-lazyderef Sig V839))
2899
+ V839
2900
+ (freeze
2901
+ (unify! V837 Sig V839
2902
+ V840)))))))))))))))))))))))))))))
2903
+ false))
2904
+ false))
2905
+ false)))))
2906
+
2907
+ (defun shen-<sig+rules> (V845)
2908
+ (let Result
2909
+ (let Parse_<signature> (shen-<signature> V845)
2910
+ (if (not (= (fail) Parse_<signature>))
2911
+ (let Parse_<trules> (shen-<trules> Parse_<signature>)
2912
+ (if (not (= (fail) Parse_<trules>))
2913
+ (shen-reassemble (fst Parse_<trules>)
2914
+ (cons (snd Parse_<signature>) (snd Parse_<trules>)))
2915
+ (fail)))
2916
+ (fail)))
2917
+ (if (= Result (fail)) (fail) Result)))
2918
+
2919
+ (defun shen-placeholders (V850 V851)
2920
+ (cond ((cons? V850) (map (lambda Z (shen-placeholders Z V851)) V850))
2921
+ ((element? V850 V851) (concat && V850)) (true V850)))
2922
+
2923
+ (defun shen-<trules> (V856)
2924
+ (let Result
2925
+ (let Parse_<trule> (shen-<trule> V856)
2926
+ (if (not (= (fail) Parse_<trule>))
2927
+ (let Parse_<trules> (shen-<trules> Parse_<trule>)
2928
+ (if (not (= (fail) Parse_<trules>))
2929
+ (shen-reassemble (fst Parse_<trules>)
2930
+ (cons (snd Parse_<trule>) (snd Parse_<trules>)))
2931
+ (fail)))
2932
+ (fail)))
2933
+ (if (= Result (fail))
2934
+ (let Result
2935
+ (let Parse_<trule> (shen-<trule> V856)
2936
+ (if (not (= (fail) Parse_<trule>))
2937
+ (shen-reassemble (fst Parse_<trule>) (cons (snd Parse_<trule>) ()))
2938
+ (fail)))
2939
+ (if (= Result (fail)) (fail) Result))
2940
+ Result)))
2941
+
2942
+ (defun shen-<trule> (V861)
2943
+ (let Result
2944
+ (let Parse_<patterns> (shen-<patterns> V861)
2945
+ (if (not (= (fail) Parse_<patterns>))
2946
+ (let Parse_<arrow> (shen-<arrow> Parse_<patterns>)
2947
+ (if (not (= (fail) Parse_<arrow>))
2948
+ (let Parse_<action> (shen-<action> Parse_<arrow>)
2949
+ (if (not (= (fail) Parse_<action>))
2950
+ (let Parse_<guard?> (shen-<guard?> Parse_<action>)
2951
+ (if (not (= (fail) Parse_<guard?>))
2952
+ (shen-reassemble (fst Parse_<guard?>)
2953
+ (let Vars (shen-extract_vars (snd Parse_<patterns>))
2954
+ (let Patterns (shen-placeholders (snd Parse_<patterns>) Vars)
2955
+ (let Action
2956
+ (shen-placeholders (shen-curry (snd Parse_<action>)) Vars)
2957
+ (let Guard
2958
+ (shen-placeholders (shen-curry (snd Parse_<guard?>)) Vars)
2959
+ (shen-form-rule Patterns (snd Parse_<arrow>) Action Guard))))))
2960
+ (fail)))
2961
+ (fail)))
2962
+ (fail)))
2963
+ (fail)))
2964
+ (if (= Result (fail)) (fail) Result)))
2965
+
2966
+ (defun shen-form-rule (V862 V863 V864 V865)
2967
+ (cond
2968
+ ((= shen-forward V863)
2969
+ (cons V862
2970
+ (cons (if (= V865 shen-skip) V864 (cons where (cons V865 (cons V864 ()))))
2971
+ ())))
2972
+ ((and (= shen-backward V863)
2973
+ (and (cons? V864)
2974
+ (and (cons? (hd V864))
2975
+ (and (= fail-if (hd (hd V864)))
2976
+ (and (cons? (tl (hd V864)))
2977
+ (and (= () (tl (tl (hd V864))))
2978
+ (and (cons? (tl V864)) (= () (tl (tl V864))))))))))
2979
+ (cons V862
2980
+ (cons
2981
+ (if (= V865 shen-skip)
2982
+ (cons where
2983
+ (cons (cons not (cons (cons (hd (tl (hd V864))) (tl V864)) ()))
2984
+ (tl V864)))
2985
+ (cons where
2986
+ (cons
2987
+ (cons (cons and (cons V865 ()))
2988
+ (cons (cons not (cons (cons (hd (tl (hd V864))) (tl V864)) ())) ()))
2989
+ (tl V864))))
2990
+ ())))
2991
+ ((= shen-backward V863)
2992
+ (cons V862
2993
+ (cons
2994
+ (if (= V865 shen-skip)
2995
+ (cons where
2996
+ (cons
2997
+ (cons not
2998
+ (cons (cons (cons == (cons V864 ())) (cons (cons fail ()) ()))
2999
+ ()))
3000
+ (cons V864 ())))
3001
+ (cons where
3002
+ (cons
3003
+ (cons (cons and (cons V865 ()))
3004
+ (cons
3005
+ (cons not
3006
+ (cons (cons (cons == (cons V864 ())) (cons (cons fail ()) ()))
3007
+ ()))
3008
+ ()))
3009
+ (cons V864 ()))))
3010
+ ())))
3011
+ (true (shen-f_error shen-form-rule))))
3012
+
3013
+ (defun shen-<guard?> (V870)
3014
+ (let Result
3015
+ (if (and (cons? (fst V870)) (= where (hd (fst V870))))
3016
+ (let Parse_<guard>
3017
+ (shen-<guard> (shen-reassemble (tl (fst V870)) (snd V870)))
3018
+ (if (not (= (fail) Parse_<guard>))
3019
+ (shen-reassemble (fst Parse_<guard>) (snd Parse_<guard>)) (fail)))
3020
+ (fail))
3021
+ (if (= Result (fail))
3022
+ (let Result
3023
+ (let Parse_<e> (<e> V870)
3024
+ (if (not (= (fail) Parse_<e>)) (shen-reassemble (fst Parse_<e>) shen-skip)
3025
+ (fail)))
3026
+ (if (= Result (fail)) (fail) Result))
3027
+ Result)))
3028
+
3029
+ (defun shen-<arrow> (V875)
3030
+ (let Result
3031
+ (if (and (cons? (fst V875)) (= -> (hd (fst V875))))
3032
+ (shen-reassemble (fst (shen-reassemble (tl (fst V875)) (snd V875)))
3033
+ shen-forward)
3034
+ (fail))
3035
+ (if (= Result (fail))
3036
+ (let Result
3037
+ (if (and (cons? (fst V875)) (= <- (hd (fst V875))))
3038
+ (shen-reassemble (fst (shen-reassemble (tl (fst V875)) (snd V875)))
3039
+ shen-backward)
3040
+ (fail))
3041
+ (if (= Result (fail)) (fail) Result))
3042
+ Result)))
3043
+
3044
+ (defun shen-errordef (V876) (interror "syntax error in ~A~%" (@p V876 ())))
3045
+
3046
+ (defun shen-t*-rules (V877 V878 V879 V880 V881 V882 V883)
3047
+ (let Throwcontrol (shen-catchpoint)
3048
+ (shen-cutpoint Throwcontrol
3049
+ (let Case
3050
+ (let V516 (shen-lazyderef V877 V882)
3051
+ (if (= () V516) (do (shen-incinfs) (thaw V883)) false))
3052
+ (if (= Case false)
3053
+ (let V517 (shen-lazyderef V877 V882)
3054
+ (if (cons? V517)
3055
+ (let Rule (hd V517)
3056
+ (let Rules (tl V517)
3057
+ (let M (shen-newpv V882)
3058
+ (do (shen-incinfs)
3059
+ (shen-t*-rule Rule V878 V879 V880 V881 V882
3060
+ (freeze
3061
+ (cut Throwcontrol V882
3062
+ (freeze
3063
+ (bind M (+ (shen-lazyderef V879 V882) 1) V882
3064
+ (freeze
3065
+ (shen-t*-rules Rules V878 M V880 V881 V882 V883)))))))))))
3066
+ false))
3067
+ Case)))))
3068
+
3069
+ (defun shen-t*-rule (V884 V885 V886 V887 V888 V889 V890)
3070
+ (let Case (do (shen-incinfs) (shen-t*-ruleh V884 V885 V888 V889 V890))
3071
+ (if (= Case false)
3072
+ (let Error (shen-newpv V889)
3073
+ (do (shen-incinfs)
3074
+ (bind Error
3075
+ (shen-type-insecure-rule-error-message (shen-lazyderef V886 V889)
3076
+ (shen-lazyderef V887 V889))
3077
+ V889 V890)))
3078
+ Case)))
3079
+
3080
+ (defun shen-t*-ruleh (V891 V892 V893 V894 V895)
3081
+ (let Throwcontrol (shen-catchpoint)
3082
+ (shen-cutpoint Throwcontrol
3083
+ (let V503 (shen-lazyderef V891 V894)
3084
+ (if (cons? V503)
3085
+ (let Patterns (hd V503)
3086
+ (let V504 (shen-lazyderef (tl V503) V894)
3087
+ (if (cons? V504)
3088
+ (let Result (hd V504)
3089
+ (let V505 (shen-lazyderef (tl V504) V894)
3090
+ (if (= () V505)
3091
+ (let NewHyp (shen-newpv V894)
3092
+ (let B (shen-newpv V894)
3093
+ (let AllHyp (shen-newpv V894)
3094
+ (do (shen-incinfs)
3095
+ (shen-t*-patterns Patterns V892 NewHyp B V894
3096
+ (freeze
3097
+ (cut Throwcontrol V894
3098
+ (freeze
3099
+ (shen-conc NewHyp V893 AllHyp V894
3100
+ (freeze
3101
+ (cut Throwcontrol V894
3102
+ (freeze (shen-th* Result B AllHyp V894 V895)))))))))))))
3103
+ false)))
3104
+ false)))
3105
+ false)))))
3106
+
3107
+ (defun shen-type-insecure-rule-error-message (V896 V897)
3108
+ (interror "type error in rule ~A of ~A~%" (@p V896 (@p V897 ()))))
3109
+
3110
+ (defun shen-t*-patterns (V898 V899 V900 V901 V902 V903)
3111
+ (let Throwcontrol (shen-catchpoint)
3112
+ (shen-cutpoint Throwcontrol
3113
+ (let Case
3114
+ (let V484 (shen-lazyderef V898 V902)
3115
+ (if (= () V484)
3116
+ (let V485 (shen-lazyderef V900 V902)
3117
+ (if (= () V485) (do (shen-incinfs) (unify! V901 V899 V902 V903))
3118
+ (if (shen-pvar? V485)
3119
+ (do (shen-bindv V485 () V902)
3120
+ (let Result (do (shen-incinfs) (unify! V901 V899 V902 V903))
3121
+ (do (shen-unbindv V485 V902) Result)))
3122
+ false)))
3123
+ false))
3124
+ (if (= Case false)
3125
+ (let V486 (shen-lazyderef V898 V902)
3126
+ (if (cons? V486)
3127
+ (let Pattern478 (hd V486)
3128
+ (let Patterns (tl V486)
3129
+ (let V487 (shen-lazyderef V899 V902)
3130
+ (if (cons? V487)
3131
+ (let A479 (hd V487)
3132
+ (let V488 (shen-lazyderef (tl V487) V902)
3133
+ (if (cons? V488)
3134
+ (let V489 (shen-lazyderef (hd V488) V902)
3135
+ (if (= --> V489)
3136
+ (let V490 (shen-lazyderef (tl V488) V902)
3137
+ (if (cons? V490)
3138
+ (let B (hd V490)
3139
+ (let V491 (shen-lazyderef (tl V490) V902)
3140
+ (if (= () V491)
3141
+ (let V492 (shen-lazyderef V900 V902)
3142
+ (if (cons? V492)
3143
+ (let V493 (shen-lazyderef (hd V492) V902)
3144
+ (if (cons? V493)
3145
+ (let Pattern (hd V493)
3146
+ (let V494 (shen-lazyderef (tl V493) V902)
3147
+ (if (cons? V494)
3148
+ (let V495 (shen-lazyderef (hd V494) V902)
3149
+ (if (= : V495)
3150
+ (let V496 (shen-lazyderef (tl V494) V902)
3151
+ (if (cons? V496)
3152
+ (let A (hd V496)
3153
+ (let V497 (shen-lazyderef (tl V496) V902)
3154
+ (if (= () V497)
3155
+ (let Hyp (tl V492)
3156
+ (let Assume (shen-newpv V902)
3157
+ (do (shen-incinfs)
3158
+ (unify! A A479 V902
3159
+ (freeze
3160
+ (unify! Pattern Pattern478 V902
3161
+ (freeze
3162
+ (shen-t*-assume Pattern Assume V902
3163
+ (freeze
3164
+ (cut Throwcontrol V902
3165
+ (freeze
3166
+ (shen-th* Pattern A Assume V902
3167
+ (freeze
3168
+ (cut Throwcontrol V902
3169
+ (freeze
3170
+ (shen-t*-patterns Patterns B
3171
+ Hyp V901 V902
3172
+ V903))))))))))))))))
3173
+ (if (shen-pvar? V497)
3174
+ (do (shen-bindv V497 () V902)
3175
+ (let Result
3176
+ (let Hyp (tl V492)
3177
+ (let Assume (shen-newpv V902)
3178
+ (do (shen-incinfs)
3179
+ (unify! A A479 V902
3180
+ (freeze
3181
+ (unify! Pattern Pattern478 V902
3182
+ (freeze
3183
+ (shen-t*-assume Pattern Assume
3184
+ V902
3185
+ (freeze
3186
+ (cut Throwcontrol V902
3187
+ (freeze
3188
+ (shen-th* Pattern A Assume
3189
+ V902
3190
+ (freeze
3191
+ (cut Throwcontrol V902
3192
+ (freeze
3193
+ (shen-t*-patterns Patterns
3194
+ B Hyp V901 V902
3195
+ V903))))))))))))))))
3196
+ (do (shen-unbindv V497 V902) Result)))
3197
+ false))))
3198
+ (if (shen-pvar? V496)
3199
+ (let A (shen-newpv V902)
3200
+ (do (shen-bindv V496 (cons A ()) V902)
3201
+ (let Result
3202
+ (let Hyp (tl V492)
3203
+ (let Assume (shen-newpv V902)
3204
+ (do (shen-incinfs)
3205
+ (unify! A A479 V902
3206
+ (freeze
3207
+ (unify! Pattern Pattern478 V902
3208
+ (freeze
3209
+ (shen-t*-assume Pattern Assume V902
3210
+ (freeze
3211
+ (cut Throwcontrol V902
3212
+ (freeze
3213
+ (shen-th* Pattern A Assume V902
3214
+ (freeze
3215
+ (cut Throwcontrol V902
3216
+ (freeze
3217
+ (shen-t*-patterns Patterns B
3218
+ Hyp V901 V902
3219
+ V903))))))))))))))))
3220
+ (do (shen-unbindv V496 V902) Result))))
3221
+ false)))
3222
+ (if (shen-pvar? V495)
3223
+ (do (shen-bindv V495 : V902)
3224
+ (let Result
3225
+ (let V498 (shen-lazyderef (tl V494) V902)
3226
+ (if (cons? V498)
3227
+ (let A (hd V498)
3228
+ (let V499 (shen-lazyderef (tl V498) V902)
3229
+ (if (= () V499)
3230
+ (let Hyp (tl V492)
3231
+ (let Assume (shen-newpv V902)
3232
+ (do (shen-incinfs)
3233
+ (unify! A A479 V902
3234
+ (freeze
3235
+ (unify! Pattern Pattern478 V902
3236
+ (freeze
3237
+ (shen-t*-assume Pattern Assume
3238
+ V902
3239
+ (freeze
3240
+ (cut Throwcontrol V902
3241
+ (freeze
3242
+ (shen-th* Pattern A Assume
3243
+ V902
3244
+ (freeze
3245
+ (cut Throwcontrol V902
3246
+ (freeze
3247
+ (shen-t*-patterns Patterns
3248
+ B Hyp V901 V902
3249
+ V903))))))))))))))))
3250
+ (if (shen-pvar? V499)
3251
+ (do (shen-bindv V499 () V902)
3252
+ (let Result
3253
+ (let Hyp (tl V492)
3254
+ (let Assume (shen-newpv V902)
3255
+ (do (shen-incinfs)
3256
+ (unify! A A479 V902
3257
+ (freeze
3258
+ (unify! Pattern Pattern478 V902
3259
+ (freeze
3260
+ (shen-t*-assume Pattern Assume
3261
+ V902
3262
+ (freeze
3263
+ (cut Throwcontrol V902
3264
+ (freeze
3265
+ (shen-th* Pattern A Assume
3266
+ V902
3267
+ (freeze
3268
+ (cut Throwcontrol V902
3269
+ (freeze
3270
+ (shen-t*-patterns
3271
+ Patterns B Hyp V901
3272
+ V902
3273
+ V903))))))))))))))))
3274
+ (do (shen-unbindv V499 V902) Result)))
3275
+ false))))
3276
+ (if (shen-pvar? V498)
3277
+ (let A (shen-newpv V902)
3278
+ (do (shen-bindv V498 (cons A ()) V902)
3279
+ (let Result
3280
+ (let Hyp (tl V492)
3281
+ (let Assume (shen-newpv V902)
3282
+ (do (shen-incinfs)
3283
+ (unify! A A479 V902
3284
+ (freeze
3285
+ (unify! Pattern Pattern478 V902
3286
+ (freeze
3287
+ (shen-t*-assume Pattern Assume
3288
+ V902
3289
+ (freeze
3290
+ (cut Throwcontrol V902
3291
+ (freeze
3292
+ (shen-th* Pattern A Assume
3293
+ V902
3294
+ (freeze
3295
+ (cut Throwcontrol V902
3296
+ (freeze
3297
+ (shen-t*-patterns
3298
+ Patterns B Hyp V901 V902
3299
+ V903))))))))))))))))
3300
+ (do (shen-unbindv V498 V902) Result))))
3301
+ false)))
3302
+ (do (shen-unbindv V495 V902) Result)))
3303
+ false)))
3304
+ (if (shen-pvar? V494)
3305
+ (let A (shen-newpv V902)
3306
+ (do
3307
+ (shen-bindv V494 (cons : (cons A ())) V902)
3308
+ (let Result
3309
+ (let Hyp (tl V492)
3310
+ (let Assume (shen-newpv V902)
3311
+ (do (shen-incinfs)
3312
+ (unify! A A479 V902
3313
+ (freeze
3314
+ (unify! Pattern Pattern478 V902
3315
+ (freeze
3316
+ (shen-t*-assume Pattern Assume V902
3317
+ (freeze
3318
+ (cut Throwcontrol V902
3319
+ (freeze
3320
+ (shen-th* Pattern A Assume V902
3321
+ (freeze
3322
+ (cut Throwcontrol V902
3323
+ (freeze
3324
+ (shen-t*-patterns Patterns B Hyp
3325
+ V901 V902 V903))))))))))))))))
3326
+ (do (shen-unbindv V494 V902) Result))))
3327
+ false))))
3328
+ (if (shen-pvar? V493)
3329
+ (let Pattern (shen-newpv V902)
3330
+ (let A (shen-newpv V902)
3331
+ (do
3332
+ (shen-bindv V493
3333
+ (cons Pattern (cons : (cons A ()))) V902)
3334
+ (let Result
3335
+ (let Hyp (tl V492)
3336
+ (let Assume (shen-newpv V902)
3337
+ (do (shen-incinfs)
3338
+ (unify! A A479 V902
3339
+ (freeze
3340
+ (unify! Pattern Pattern478 V902
3341
+ (freeze
3342
+ (shen-t*-assume Pattern Assume V902
3343
+ (freeze
3344
+ (cut Throwcontrol V902
3345
+ (freeze
3346
+ (shen-th* Pattern A Assume V902
3347
+ (freeze
3348
+ (cut Throwcontrol V902
3349
+ (freeze
3350
+ (shen-t*-patterns Patterns B Hyp
3351
+ V901 V902 V903))))))))))))))))
3352
+ (do (shen-unbindv V493 V902) Result)))))
3353
+ false)))
3354
+ (if (shen-pvar? V492)
3355
+ (let Pattern (shen-newpv V902)
3356
+ (let A (shen-newpv V902)
3357
+ (let Hyp (shen-newpv V902)
3358
+ (do
3359
+ (shen-bindv V492
3360
+ (cons (cons Pattern (cons : (cons A ()))) Hyp)
3361
+ V902)
3362
+ (let Result
3363
+ (let Assume (shen-newpv V902)
3364
+ (do (shen-incinfs)
3365
+ (unify! A A479 V902
3366
+ (freeze
3367
+ (unify! Pattern Pattern478 V902
3368
+ (freeze
3369
+ (shen-t*-assume Pattern Assume V902
3370
+ (freeze
3371
+ (cut Throwcontrol V902
3372
+ (freeze
3373
+ (shen-th* Pattern A Assume V902
3374
+ (freeze
3375
+ (cut Throwcontrol V902
3376
+ (freeze
3377
+ (shen-t*-patterns Patterns B Hyp
3378
+ V901 V902 V903)))))))))))))))
3379
+ (do (shen-unbindv V492 V902) Result))))))
3380
+ false)))
3381
+ false)))
3382
+ false))
3383
+ false))
3384
+ false)))
3385
+ false))))
3386
+ false))
3387
+ Case)))))
3388
+
3389
+ (defun shen-t*-assume (V904 V905 V906 V907)
3390
+ (let Throwcontrol (shen-catchpoint)
3391
+ (shen-cutpoint Throwcontrol
3392
+ (let Case
3393
+ (let V475 (shen-lazyderef V904 V906)
3394
+ (if (cons? V475)
3395
+ (let X (hd V475)
3396
+ (let Y (tl V475)
3397
+ (let A1 (shen-newpv V906)
3398
+ (let A2 (shen-newpv V906)
3399
+ (do (shen-incinfs)
3400
+ (cut Throwcontrol V906
3401
+ (freeze
3402
+ (shen-t*-assume X A1 V906
3403
+ (freeze
3404
+ (shen-t*-assume Y A2 V906
3405
+ (freeze
3406
+ (bind V905
3407
+ (append (shen-lazyderef A1 V906) (shen-lazyderef A2 V906))
3408
+ V906 V907))))))))))))
3409
+ false))
3410
+ (if (= Case false)
3411
+ (let Case
3412
+ (let A (shen-newpv V906)
3413
+ (do (shen-incinfs)
3414
+ (fwhen (shen-placeholder? (shen-lazyderef V904 V906)) V906
3415
+ (freeze
3416
+ (bind V905
3417
+ (cons
3418
+ (cons (shen-lazyderef V904 V906)
3419
+ (cons : (cons (shen-lazyderef A V906) ())))
3420
+ ())
3421
+ V906 V907)))))
3422
+ (if (= Case false)
3423
+ (let V476 (shen-lazyderef V905 V906)
3424
+ (if (= () V476) (do (shen-incinfs) (thaw V907))
3425
+ (if (shen-pvar? V476)
3426
+ (do (shen-bindv V476 () V906)
3427
+ (let Result (do (shen-incinfs) (thaw V907))
3428
+ (do (shen-unbindv V476 V906) Result)))
3429
+ false)))
3430
+ Case))
3431
+ Case)))))
3432
+
3433
+ (defun shen-conc (V908 V909 V910 V911 V912)
3434
+ (let Case
3435
+ (let V471 (shen-lazyderef V908 V911)
3436
+ (if (= () V471)
3437
+ (do (shen-incinfs) (bind V910 (shen-lazyderef V909 V911) V911 V912))
3438
+ false))
3439
+ (if (= Case false)
3440
+ (let V472 (shen-lazyderef V908 V911)
3441
+ (if (cons? V472)
3442
+ (let X (hd V472)
3443
+ (let Y (tl V472)
3444
+ (let Z (shen-newpv V911)
3445
+ (do (shen-incinfs)
3446
+ (bind V910 (cons (shen-lazyderef X V911) (shen-lazyderef Z V911)) V911
3447
+ (freeze (shen-conc Y V909 Z V911 V912)))))))
3448
+ false))
3449
+ Case)))
3450
+
3451
+ (defun shen-findallhelp (V913 V914 V915 V916 V917 V918)
3452
+ (let Case
3453
+ (do (shen-incinfs)
3454
+ (call V914 V917
3455
+ (freeze (shen-remember V916 V913 V917 (freeze (fwhen false V917 V918))))))
3456
+ (if (= Case false)
3457
+ (do (shen-incinfs) (bind V915 (value (shen-lazyderef V916 V917)) V917 V918))
3458
+ Case)))
3459
+
3460
+ (defun shen-remember (V919 V920 V921 V922)
3461
+ (let B (shen-newpv V921)
3462
+ (do (shen-incinfs)
3463
+ (bind B
3464
+ (set (shen-deref V919 V921)
3465
+ (cons (shen-deref V920 V921) (value (shen-deref V919 V921))))
3466
+ V921 V922))))
3467
+
3468
+ (defun findall (V923 V924 V925 V926 V927)
3469
+ (let B (shen-newpv V926)
3470
+ (let A (shen-newpv V926)
3471
+ (do (shen-incinfs)
3472
+ (bind A (gensym a) V926
3473
+ (freeze
3474
+ (bind B (set (shen-lazyderef A V926) ()) V926
3475
+ (freeze (shen-findallhelp V923 V924 V925 A V926 V927)))))))))
3476
+
3477
+ (defun shen-findallhelp (V913 V914 V915 V916 V917 V918)
3478
+ (let Case
3479
+ (do (shen-incinfs)
3480
+ (call V914 V917
3481
+ (freeze (shen-remember V916 V913 V917 (freeze (fwhen false V917 V918))))))
3482
+ (if (= Case false)
3483
+ (do (shen-incinfs) (bind V915 (value (shen-lazyderef V916 V917)) V917 V918))
3484
+ Case)))
3485
+
3486
+ (defun shen-remember (V919 V920 V921 V922)
3487
+ (let B (shen-newpv V921)
3488
+ (do (shen-incinfs)
3489
+ (bind B
3490
+ (set (shen-deref V919 V921)
3491
+ (cons (shen-deref V920 V921) (value (shen-deref V919 V921))))
3492
+ V921 V922))))
3493
+