shen-ruby 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/.gitignore +2 -0
  2. data/.travis.yml +5 -0
  3. data/Gemfile +2 -2
  4. data/HISTORY.md +12 -0
  5. data/README.md +10 -7
  6. data/Rakefile +92 -0
  7. data/bin/srrepl +2 -2
  8. data/k_lambda_spec/primitives/arithmetic_spec.rb +175 -0
  9. data/k_lambda_spec/primitives/assignments_spec.rb +44 -0
  10. data/k_lambda_spec/primitives/generic_functions_spec.rb +115 -2
  11. data/k_lambda_spec/primitives/lists_spec.rb +40 -0
  12. data/k_lambda_spec/primitives/strings_spec.rb +77 -0
  13. data/k_lambda_spec/primitives/symbols_spec.rb +24 -0
  14. data/k_lambda_spec/primitives/vectors_spec.rb +92 -0
  15. data/k_lambda_spec/support/shared_examples.rb +93 -2
  16. data/k_lambda_spec/tail_recursion_spec.rb +30 -0
  17. data/lib/kl/compiler.rb +19 -33
  18. data/lib/kl/environment.rb +1 -0
  19. data/lib/kl/primitives/assignments.rb +1 -0
  20. data/lib/kl/primitives/generic_functions.rb +7 -0
  21. data/lib/kl/primitives/lists.rb +2 -0
  22. data/lib/kl/primitives/strings.rb +13 -5
  23. data/lib/kl/primitives/symbols.rb +1 -0
  24. data/lib/kl/primitives/vectors.rb +5 -0
  25. data/lib/shen_ruby/version.rb +1 -1
  26. data/shen-ruby.gemspec +1 -1
  27. data/shen/lib/shen_ruby/shen.rb +5 -6
  28. data/shen/release/benchmarks/benchmarks.shen +0 -4
  29. data/shen/release/benchmarks/interpreter.shen +2 -2
  30. data/shen/release/benchmarks/plato.jpg +0 -0
  31. data/shen/release/k_lambda/core.kl +171 -1000
  32. data/shen/release/k_lambda/declarations.kl +90 -992
  33. data/shen/release/k_lambda/load.kl +69 -81
  34. data/shen/release/k_lambda/macros.kl +113 -478
  35. data/shen/release/k_lambda/prolog.kl +250 -1307
  36. data/shen/release/k_lambda/reader.kl +115 -996
  37. data/shen/release/k_lambda/sequent.kl +154 -554
  38. data/shen/release/k_lambda/sys.kl +246 -562
  39. data/shen/release/k_lambda/t-star.kl +114 -3643
  40. data/shen/release/k_lambda/toplevel.kl +136 -221
  41. data/shen/release/k_lambda/track.kl +101 -206
  42. data/shen/release/k_lambda/types.kl +143 -298
  43. data/shen/release/k_lambda/writer.kl +93 -106
  44. data/shen/release/k_lambda/yacc.kl +77 -252
  45. data/shen/release/test_programs/README.shen +1 -1
  46. data/shen/release/test_programs/classes-typed.shen +1 -1
  47. data/shen/release/test_programs/interpreter.shen +2 -2
  48. data/shen/release/test_programs/metaprog.shen +2 -2
  49. data/shen/release/test_programs/prolog.shen +79 -0
  50. data/shen/release/test_programs/structures-typed.shen +2 -2
  51. data/shen/release/test_programs/tests.shen +19 -80
  52. data/shen/release/test_programs/yacc.shen +11 -15
  53. metadata +14 -6
  54. data/Gemfile.lock +0 -20
  55. data/shen/release/benchmarks/br.shen +0 -13
@@ -1,3703 +1,174 @@
1
- " The License
1
+ "**********************************************************************************
2
+ * The License *
3
+ * *
4
+ * The user is free to produce commercial applications with the software, to *
5
+ * distribute these applications in source or binary form, and to charge monies *
6
+ * for them as he sees fit and in concordance with the laws of the land subject *
7
+ * to the following license. *
8
+ * *
9
+ * 1. The license applies to all the software and all derived software and *
10
+ * must appear on such. *
11
+ * *
12
+ * 2. It is illegal to distribute the software without this license attached *
13
+ * to it and use of the software implies agreement with the license as such. *
14
+ * It is illegal for anyone who is not the copyright holder to tamper with *
15
+ * or change the license. *
16
+ * *
17
+ * 3. Neither the names of Lambda Associates or the copyright holder may be used *
18
+ * to endorse or promote products built using the software without specific *
19
+ * prior written permission from the copyright holder. *
20
+ * *
21
+ * 4. That possession of this license does not confer on the copyright holder *
22
+ * any special contractual obligation towards the user. That in no event *
23
+ * shall the copyright holder be liable for any direct, indirect, incidental, *
24
+ * special, exemplary or consequential damages (including but not limited *
25
+ * to procurement of substitute goods or services, loss of use, data, *
26
+ * interruption), however caused and on any theory of liability, whether in *
27
+ * contract, strict liability or tort (including negligence) arising in any *
28
+ * way out of the use of the software, even if advised of the possibility of *
29
+ * such damage. *
30
+ * *
31
+ * 5. It is permitted for the user to change the software, for the purpose of *
32
+ * improving performance, correcting an error, or porting to a new platform, *
33
+ * and distribute the derived version of Shen provided the resulting program *
34
+ * conforms in all respects to the Shen standard and is issued under that *
35
+ * title. The user must make it clear with his distribution that he/she is *
36
+ * the author of the changes and what these changes are and why. *
37
+ * *
38
+ * 6. Derived versions of this software in whatever form are subject to the same *
39
+ * restrictions. In particular it is not permitted to make derived copies of *
40
+ * this software which do not conform to the Shen standard or appear under a *
41
+ * different title. *
42
+ * *
43
+ * It is permitted to distribute versions of Shen which incorporate libraries, *
44
+ * graphics or other facilities which are not part of the Shen standard. *
45
+ * *
46
+ * For an explication of this license see www.shenlanguage.org/license.htm which *
47
+ * explains this license in full. *
48
+ * *
49
+ *****************************************************************************************
50
+ "(defun shen.typecheck (V2753 V2754) (let Curry (shen.curry V2753) (let ProcessN (shen.start-new-prolog-process) (let Type (shen.insert-prolog-variables (shen.normalise-type (shen.curry-type V2754)) ProcessN) (let Continuation (freeze (return Type ProcessN shen.void)) (shen.t* (cons Curry (cons : (cons Type ()))) () ProcessN Continuation))))))
2
51
 
3
-
52
+ (defun shen.curry (V2755) (cond ((and (cons? V2755) (shen.special? (hd V2755))) (cons (hd V2755) (map shen.curry (tl V2755)))) ((and (cons? V2755) (and (cons? (tl V2755)) (shen.extraspecial? (hd V2755)))) V2755) ((and (cons? V2755) (and (cons? (tl V2755)) (cons? (tl (tl V2755))))) (shen.curry (cons (cons (hd V2755) (cons (hd (tl V2755)) ())) (tl (tl V2755))))) ((and (cons? V2755) (and (cons? (tl V2755)) (= () (tl (tl V2755))))) (cons (shen.curry (hd V2755)) (cons (shen.curry (hd (tl V2755))) ()))) (true V2755)))
4
53
 
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.
54
+ (defun shen.special? (V2756) (element? V2756 (value shen.*special*)))
6
55
 
7
-
56
+ (defun shen.extraspecial? (V2757) (element? V2757 (value shen.*extraspecial*)))
8
57
 
9
- 1. The license applies to all the software and all derived software and must appear on such.
58
+ (defun shen.t* (V2758 V2759 V2760 V2761) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let Error (shen.newpv V2760) (do (shen.incinfs) (fwhen (shen.maxinfexceeded?) V2760 (freeze (bind Error (shen.errormaxinfs) V2760 V2761))))) (if (= Case false) (let Case (let V2747 (shen.lazyderef V2758 V2760) (if (= fail V2747) (do (shen.incinfs) (cut Throwcontrol V2760 (freeze (shen.prolog-failure V2760 V2761)))) false)) (if (= Case false) (let Case (let V2748 (shen.lazyderef V2758 V2760) (if (cons? V2748) (let X (hd V2748) (let V2749 (shen.lazyderef (tl V2748) V2760) (if (cons? V2749) (let V2750 (shen.lazyderef (hd V2749) V2760) (if (= : V2750) (let V2751 (shen.lazyderef (tl V2749) V2760) (if (cons? V2751) (let A (hd V2751) (let V2752 (shen.lazyderef (tl V2751) V2760) (if (= () V2752) (do (shen.incinfs) (fwhen (shen.type-theory-enabled?) V2760 (freeze (cut Throwcontrol V2760 (freeze (shen.th* X A V2759 V2760 V2761)))))) false))) false)) false)) false))) false)) (if (= Case false) (let Datatypes (shen.newpv V2760) (do (shen.incinfs) (shen.show V2758 V2759 V2760 (freeze (bind Datatypes (value shen.*datatypes*) V2760 (freeze (shen.udefs* V2758 V2759 Datatypes V2760 V2761))))))) Case)) Case)) Case)))))
10
59
 
11
- 2. It is illegal to distribute the software without this license attached to it and use of the software implies agreement
60
+ (defun shen.type-theory-enabled? () (value shen.*shen-type-theory-enabled?*))
12
61
 
13
- with the license as such. It is illegal for anyone who is not the copyright holder to tamper with or change the license.
62
+ (defun enable-type-theory (V2766) (cond ((= + V2766) (set shen.*shen-type-theory-enabled?* true)) ((= - V2766) (set shen.*shen-type-theory-enabled?* false)) (true (simple-error "enable-type-theory expects a + or a -
63
+ "))))
14
64
 
15
- 3. Neither the names of Lambda Associates or the copyright holder may be used to endorse or promote products built using
65
+ (defun shen.prolog-failure (V2775 V2776) false)
16
66
 
17
- the software without specific prior written permission from the copyright holder.
67
+ (defun shen.maxinfexceeded? () (> (inferences) (value shen.*maxinferences*)))
18
68
 
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.
69
+ (defun shen.errormaxinfs () (simple-error "maximum inferences exceeded~%"))
20
70
 
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.
71
+ (defun shen.udefs* (V2777 V2778 V2779 V2780 V2781) (let Case (let V2743 (shen.lazyderef V2779 V2780) (if (cons? V2743) (let D (hd V2743) (do (shen.incinfs) (call (cons D (cons V2777 (cons V2778 ()))) V2780 V2781))) false)) (if (= Case false) (let V2744 (shen.lazyderef V2779 V2780) (if (cons? V2744) (let Ds (tl V2744) (do (shen.incinfs) (shen.udefs* V2777 V2778 Ds V2780 V2781))) false)) Case)))
22
72
 
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.
73
+ (defun shen.th* (V2782 V2783 V2784 V2785 V2786) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (do (shen.incinfs) (shen.show (cons V2782 (cons : (cons V2783 ()))) V2784 V2785 (freeze (fwhen false V2785 V2786)))) (if (= Case false) (let Case (let F (shen.newpv V2785) (do (shen.incinfs) (fwhen (shen.typedf? (shen.lazyderef V2782 V2785)) V2785 (freeze (bind F (shen.sigf (shen.lazyderef V2782 V2785)) V2785 (freeze (call (cons F (cons V2783 ())) V2785 V2786))))))) (if (= Case false) (let Case (do (shen.incinfs) (shen.base V2782 V2783 V2785 V2786)) (if (= Case false) (let Case (do (shen.incinfs) (shen.by_hypothesis V2782 V2783 V2784 V2785 V2786)) (if (= Case false) (let Case (let V2623 (shen.lazyderef V2782 V2785) (if (cons? V2623) (let F (hd V2623) (let V2624 (shen.lazyderef (tl V2623) V2785) (if (= () V2624) (do (shen.incinfs) (shen.th* F (cons --> (cons V2783 ())) V2784 V2785 V2786)) false))) false)) (if (= Case false) (let Case (let V2625 (shen.lazyderef V2782 V2785) (if (cons? V2625) (let F (hd V2625) (let V2626 (shen.lazyderef (tl V2625) V2785) (if (cons? V2626) (let X (hd V2626) (let V2627 (shen.lazyderef (tl V2626) V2785) (if (= () V2627) (let B (shen.newpv V2785) (do (shen.incinfs) (shen.th* F (cons B (cons --> (cons V2783 ()))) V2784 V2785 (freeze (shen.th* X B V2784 V2785 V2786))))) false))) false))) false)) (if (= Case false) (let Case (let V2628 (shen.lazyderef V2782 V2785) (if (cons? V2628) (let V2629 (shen.lazyderef (hd V2628) V2785) (if (= cons V2629) (let V2630 (shen.lazyderef (tl V2628) V2785) (if (cons? V2630) (let X (hd V2630) (let V2631 (shen.lazyderef (tl V2630) V2785) (if (cons? V2631) (let Y (hd V2631) (let V2632 (shen.lazyderef (tl V2631) V2785) (if (= () V2632) (let V2633 (shen.lazyderef V2783 V2785) (if (cons? V2633) (let V2634 (shen.lazyderef (hd V2633) V2785) (if (= list V2634) (let V2635 (shen.lazyderef (tl V2633) V2785) (if (cons? V2635) (let A (hd V2635) (let V2636 (shen.lazyderef (tl V2635) V2785) (if (= () V2636) (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons list (cons A ())) V2784 V2785 V2786)))) (if (shen.pvar? V2636) (do (shen.bindv V2636 () V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons list (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2636 V2785) Result))) false)))) (if (shen.pvar? V2635) (let A (shen.newpv V2785) (do (shen.bindv V2635 (cons A ()) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons list (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2635 V2785) Result)))) false))) (if (shen.pvar? V2634) (do (shen.bindv V2634 list V2785) (let Result (let V2637 (shen.lazyderef (tl V2633) V2785) (if (cons? V2637) (let A (hd V2637) (let V2638 (shen.lazyderef (tl V2637) V2785) (if (= () V2638) (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons list (cons A ())) V2784 V2785 V2786)))) (if (shen.pvar? V2638) (do (shen.bindv V2638 () V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons list (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2638 V2785) Result))) false)))) (if (shen.pvar? V2637) (let A (shen.newpv V2785) (do (shen.bindv V2637 (cons A ()) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons list (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2637 V2785) Result)))) false))) (do (shen.unbindv V2634 V2785) Result))) false))) (if (shen.pvar? V2633) (let A (shen.newpv V2785) (do (shen.bindv V2633 (cons list (cons A ())) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons list (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2633 V2785) Result)))) false))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2639 (shen.lazyderef V2782 V2785) (if (cons? V2639) (let V2640 (shen.lazyderef (hd V2639) V2785) (if (= @p V2640) (let V2641 (shen.lazyderef (tl V2639) V2785) (if (cons? V2641) (let X (hd V2641) (let V2642 (shen.lazyderef (tl V2641) V2785) (if (cons? V2642) (let Y (hd V2642) (let V2643 (shen.lazyderef (tl V2642) V2785) (if (= () V2643) (let V2644 (shen.lazyderef V2783 V2785) (if (cons? V2644) (let A (hd V2644) (let V2645 (shen.lazyderef (tl V2644) V2785) (if (cons? V2645) (let V2646 (shen.lazyderef (hd V2645) V2785) (if (= * V2646) (let V2647 (shen.lazyderef (tl V2645) V2785) (if (cons? V2647) (let B (hd V2647) (let V2648 (shen.lazyderef (tl V2647) V2785) (if (= () V2648) (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y B V2784 V2785 V2786)))) (if (shen.pvar? V2648) (do (shen.bindv V2648 () V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y B V2784 V2785 V2786)))) (do (shen.unbindv V2648 V2785) Result))) false)))) (if (shen.pvar? V2647) (let B (shen.newpv V2785) (do (shen.bindv V2647 (cons B ()) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y B V2784 V2785 V2786)))) (do (shen.unbindv V2647 V2785) Result)))) false))) (if (shen.pvar? V2646) (do (shen.bindv V2646 * V2785) (let Result (let V2649 (shen.lazyderef (tl V2645) V2785) (if (cons? V2649) (let B (hd V2649) (let V2650 (shen.lazyderef (tl V2649) V2785) (if (= () V2650) (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y B V2784 V2785 V2786)))) (if (shen.pvar? V2650) (do (shen.bindv V2650 () V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y B V2784 V2785 V2786)))) (do (shen.unbindv V2650 V2785) Result))) false)))) (if (shen.pvar? V2649) (let B (shen.newpv V2785) (do (shen.bindv V2649 (cons B ()) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y B V2784 V2785 V2786)))) (do (shen.unbindv V2649 V2785) Result)))) false))) (do (shen.unbindv V2646 V2785) Result))) false))) (if (shen.pvar? V2645) (let B (shen.newpv V2785) (do (shen.bindv V2645 (cons * (cons B ())) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y B V2784 V2785 V2786)))) (do (shen.unbindv V2645 V2785) Result)))) false)))) (if (shen.pvar? V2644) (let A (shen.newpv V2785) (let B (shen.newpv V2785) (do (shen.bindv V2644 (cons A (cons * (cons B ()))) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y B V2784 V2785 V2786)))) (do (shen.unbindv V2644 V2785) Result))))) false))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2651 (shen.lazyderef V2782 V2785) (if (cons? V2651) (let V2652 (shen.lazyderef (hd V2651) V2785) (if (= @v V2652) (let V2653 (shen.lazyderef (tl V2651) V2785) (if (cons? V2653) (let X (hd V2653) (let V2654 (shen.lazyderef (tl V2653) V2785) (if (cons? V2654) (let Y (hd V2654) (let V2655 (shen.lazyderef (tl V2654) V2785) (if (= () V2655) (let V2656 (shen.lazyderef V2783 V2785) (if (cons? V2656) (let V2657 (shen.lazyderef (hd V2656) V2785) (if (= vector V2657) (let V2658 (shen.lazyderef (tl V2656) V2785) (if (cons? V2658) (let A (hd V2658) (let V2659 (shen.lazyderef (tl V2658) V2785) (if (= () V2659) (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons vector (cons A ())) V2784 V2785 V2786)))) (if (shen.pvar? V2659) (do (shen.bindv V2659 () V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons vector (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2659 V2785) Result))) false)))) (if (shen.pvar? V2658) (let A (shen.newpv V2785) (do (shen.bindv V2658 (cons A ()) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons vector (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2658 V2785) Result)))) false))) (if (shen.pvar? V2657) (do (shen.bindv V2657 vector V2785) (let Result (let V2660 (shen.lazyderef (tl V2656) V2785) (if (cons? V2660) (let A (hd V2660) (let V2661 (shen.lazyderef (tl V2660) V2785) (if (= () V2661) (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons vector (cons A ())) V2784 V2785 V2786)))) (if (shen.pvar? V2661) (do (shen.bindv V2661 () V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons vector (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2661 V2785) Result))) false)))) (if (shen.pvar? V2660) (let A (shen.newpv V2785) (do (shen.bindv V2660 (cons A ()) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons vector (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2660 V2785) Result)))) false))) (do (shen.unbindv V2657 V2785) Result))) false))) (if (shen.pvar? V2656) (let A (shen.newpv V2785) (do (shen.bindv V2656 (cons vector (cons A ())) V2785) (let Result (do (shen.incinfs) (shen.th* X A V2784 V2785 (freeze (shen.th* Y (cons vector (cons A ())) V2784 V2785 V2786)))) (do (shen.unbindv V2656 V2785) Result)))) false))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2662 (shen.lazyderef V2782 V2785) (if (cons? V2662) (let V2663 (shen.lazyderef (hd V2662) V2785) (if (= @s V2663) (let V2664 (shen.lazyderef (tl V2662) V2785) (if (cons? V2664) (let X (hd V2664) (let V2665 (shen.lazyderef (tl V2664) V2785) (if (cons? V2665) (let Y (hd V2665) (let V2666 (shen.lazyderef (tl V2665) V2785) (if (= () V2666) (let V2667 (shen.lazyderef V2783 V2785) (if (= string V2667) (do (shen.incinfs) (shen.th* X string V2784 V2785 (freeze (shen.th* Y string V2784 V2785 V2786)))) (if (shen.pvar? V2667) (do (shen.bindv V2667 string V2785) (let Result (do (shen.incinfs) (shen.th* X string V2784 V2785 (freeze (shen.th* Y string V2784 V2785 V2786)))) (do (shen.unbindv V2667 V2785) Result))) false))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2668 (shen.lazyderef V2782 V2785) (if (cons? V2668) (let V2669 (shen.lazyderef (hd V2668) V2785) (if (= lambda V2669) (let V2670 (shen.lazyderef (tl V2668) V2785) (if (cons? V2670) (let X (hd V2670) (let V2671 (shen.lazyderef (tl V2670) V2785) (if (cons? V2671) (let Y (hd V2671) (let V2672 (shen.lazyderef (tl V2671) V2785) (if (= () V2672) (let V2673 (shen.lazyderef V2783 V2785) (if (cons? V2673) (let A (hd V2673) (let V2674 (shen.lazyderef (tl V2673) V2785) (if (cons? V2674) (let V2675 (shen.lazyderef (hd V2674) V2785) (if (= --> V2675) (let V2676 (shen.lazyderef (tl V2674) V2785) (if (cons? V2676) (let B (hd V2676) (let V2677 (shen.lazyderef (tl V2676) V2785) (if (= () V2677) (let Z (shen.newpv V2785) (let X&& (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind Z (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Y V2785)) V2785 (freeze (shen.th* Z B (cons (cons X&& (cons : (cons A ()))) V2784) V2785 V2786)))))))))) (if (shen.pvar? V2677) (do (shen.bindv V2677 () V2785) (let Result (let Z (shen.newpv V2785) (let X&& (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind Z (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Y V2785)) V2785 (freeze (shen.th* Z B (cons (cons X&& (cons : (cons A ()))) V2784) V2785 V2786)))))))))) (do (shen.unbindv V2677 V2785) Result))) false)))) (if (shen.pvar? V2676) (let B (shen.newpv V2785) (do (shen.bindv V2676 (cons B ()) V2785) (let Result (let Z (shen.newpv V2785) (let X&& (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind Z (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Y V2785)) V2785 (freeze (shen.th* Z B (cons (cons X&& (cons : (cons A ()))) V2784) V2785 V2786)))))))))) (do (shen.unbindv V2676 V2785) Result)))) false))) (if (shen.pvar? V2675) (do (shen.bindv V2675 --> V2785) (let Result (let V2678 (shen.lazyderef (tl V2674) V2785) (if (cons? V2678) (let B (hd V2678) (let V2679 (shen.lazyderef (tl V2678) V2785) (if (= () V2679) (let Z (shen.newpv V2785) (let X&& (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind Z (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Y V2785)) V2785 (freeze (shen.th* Z B (cons (cons X&& (cons : (cons A ()))) V2784) V2785 V2786)))))))))) (if (shen.pvar? V2679) (do (shen.bindv V2679 () V2785) (let Result (let Z (shen.newpv V2785) (let X&& (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind Z (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Y V2785)) V2785 (freeze (shen.th* Z B (cons (cons X&& (cons : (cons A ()))) V2784) V2785 V2786)))))))))) (do (shen.unbindv V2679 V2785) Result))) false)))) (if (shen.pvar? V2678) (let B (shen.newpv V2785) (do (shen.bindv V2678 (cons B ()) V2785) (let Result (let Z (shen.newpv V2785) (let X&& (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind Z (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Y V2785)) V2785 (freeze (shen.th* Z B (cons (cons X&& (cons : (cons A ()))) V2784) V2785 V2786)))))))))) (do (shen.unbindv V2678 V2785) Result)))) false))) (do (shen.unbindv V2675 V2785) Result))) false))) (if (shen.pvar? V2674) (let B (shen.newpv V2785) (do (shen.bindv V2674 (cons --> (cons B ())) V2785) (let Result (let Z (shen.newpv V2785) (let X&& (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind Z (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Y V2785)) V2785 (freeze (shen.th* Z B (cons (cons X&& (cons : (cons A ()))) V2784) V2785 V2786)))))))))) (do (shen.unbindv V2674 V2785) Result)))) false)))) (if (shen.pvar? V2673) (let A (shen.newpv V2785) (let B (shen.newpv V2785) (do (shen.bindv V2673 (cons A (cons --> (cons B ()))) V2785) (let Result (let Z (shen.newpv V2785) (let X&& (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind Z (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Y V2785)) V2785 (freeze (shen.th* Z B (cons (cons X&& (cons : (cons A ()))) V2784) V2785 V2786)))))))))) (do (shen.unbindv V2673 V2785) Result))))) false))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2680 (shen.lazyderef V2782 V2785) (if (cons? V2680) (let V2681 (shen.lazyderef (hd V2680) V2785) (if (= let V2681) (let V2682 (shen.lazyderef (tl V2680) V2785) (if (cons? V2682) (let X (hd V2682) (let V2683 (shen.lazyderef (tl V2682) V2785) (if (cons? V2683) (let Y (hd V2683) (let V2684 (shen.lazyderef (tl V2683) V2785) (if (cons? V2684) (let Z (hd V2684) (let V2685 (shen.lazyderef (tl V2684) V2785) (if (= () V2685) (let W (shen.newpv V2785) (let X&& (shen.newpv V2785) (let B (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (shen.th* Y B V2784 V2785 (freeze (bind X&& (shen.placeholder) V2785 (freeze (bind W (shen.ebr (shen.lazyderef X&& V2785) (shen.lazyderef X V2785) (shen.lazyderef Z V2785)) V2785 (freeze (shen.th* W V2783 (cons (cons X&& (cons : (cons B ()))) V2784) V2785 V2786))))))))))))) false))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2686 (shen.lazyderef V2782 V2785) (if (cons? V2686) (let V2687 (shen.lazyderef (hd V2686) V2785) (if (= open V2687) (let V2688 (shen.lazyderef (tl V2686) V2785) (if (cons? V2688) (let V2689 (shen.lazyderef (hd V2688) V2785) (if (= file V2689) (let V2690 (shen.lazyderef (tl V2688) V2785) (if (cons? V2690) (let FileName (hd V2690) (let V2691 (shen.lazyderef (tl V2690) V2785) (if (cons? V2691) (let Direction2619 (hd V2691) (let V2692 (shen.lazyderef (tl V2691) V2785) (if (= () V2692) (let V2693 (shen.lazyderef V2783 V2785) (if (cons? V2693) (let V2694 (shen.lazyderef (hd V2693) V2785) (if (= stream V2694) (let V2695 (shen.lazyderef (tl V2693) V2785) (if (cons? V2695) (let Direction (hd V2695) (let V2696 (shen.lazyderef (tl V2695) V2785) (if (= () V2696) (do (shen.incinfs) (unify! Direction Direction2619 V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* FileName string V2784 V2785 V2786)))))) (if (shen.pvar? V2696) (do (shen.bindv V2696 () V2785) (let Result (do (shen.incinfs) (unify! Direction Direction2619 V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* FileName string V2784 V2785 V2786)))))) (do (shen.unbindv V2696 V2785) Result))) false)))) (if (shen.pvar? V2695) (let Direction (shen.newpv V2785) (do (shen.bindv V2695 (cons Direction ()) V2785) (let Result (do (shen.incinfs) (unify! Direction Direction2619 V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* FileName string V2784 V2785 V2786)))))) (do (shen.unbindv V2695 V2785) Result)))) false))) (if (shen.pvar? V2694) (do (shen.bindv V2694 stream V2785) (let Result (let V2697 (shen.lazyderef (tl V2693) V2785) (if (cons? V2697) (let Direction (hd V2697) (let V2698 (shen.lazyderef (tl V2697) V2785) (if (= () V2698) (do (shen.incinfs) (unify! Direction Direction2619 V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* FileName string V2784 V2785 V2786)))))) (if (shen.pvar? V2698) (do (shen.bindv V2698 () V2785) (let Result (do (shen.incinfs) (unify! Direction Direction2619 V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* FileName string V2784 V2785 V2786)))))) (do (shen.unbindv V2698 V2785) Result))) false)))) (if (shen.pvar? V2697) (let Direction (shen.newpv V2785) (do (shen.bindv V2697 (cons Direction ()) V2785) (let Result (do (shen.incinfs) (unify! Direction Direction2619 V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* FileName string V2784 V2785 V2786)))))) (do (shen.unbindv V2697 V2785) Result)))) false))) (do (shen.unbindv V2694 V2785) Result))) false))) (if (shen.pvar? V2693) (let Direction (shen.newpv V2785) (do (shen.bindv V2693 (cons stream (cons Direction ())) V2785) (let Result (do (shen.incinfs) (unify! Direction Direction2619 V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* FileName string V2784 V2785 V2786)))))) (do (shen.unbindv V2693 V2785) Result)))) false))) false))) false))) false)) false)) false)) false)) false)) (if (= Case false) (let Case (let V2699 (shen.lazyderef V2782 V2785) (if (cons? V2699) (let V2700 (shen.lazyderef (hd V2699) V2785) (if (= type V2700) (let V2701 (shen.lazyderef (tl V2699) V2785) (if (cons? V2701) (let X (hd V2701) (let V2702 (shen.lazyderef (tl V2701) V2785) (if (cons? V2702) (let A (hd V2702) (let V2703 (shen.lazyderef (tl V2702) V2785) (if (= () V2703) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (unify A V2783 V2785 (freeze (shen.th* X A V2784 V2785 V2786)))))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2704 (shen.lazyderef V2782 V2785) (if (cons? V2704) (let V2705 (shen.lazyderef (hd V2704) V2785) (if (= input+ V2705) (let V2706 (shen.lazyderef (tl V2704) V2785) (if (cons? V2706) (let V2707 (shen.lazyderef (hd V2706) V2785) (if (= : V2707) (let V2708 (shen.lazyderef (tl V2706) V2785) (if (cons? V2708) (let A (hd V2708) (let V2709 (shen.lazyderef (tl V2708) V2785) (if (= () V2709) (let C (shen.newpv V2785) (do (shen.incinfs) (bind C (shen.normalise-type (shen.lazyderef A V2785)) V2785 (freeze (unify V2783 C V2785 V2786))))) false))) false)) false)) false)) false)) false)) (if (= Case false) (let Case (let V2710 (shen.lazyderef V2782 V2785) (if (cons? V2710) (let V2711 (shen.lazyderef (hd V2710) V2785) (if (= where V2711) (let V2712 (shen.lazyderef (tl V2710) V2785) (if (cons? V2712) (let P (hd V2712) (let V2713 (shen.lazyderef (tl V2712) V2785) (if (cons? V2713) (let X (hd V2713) (let V2714 (shen.lazyderef (tl V2713) V2785) (if (= () V2714) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (shen.th* P boolean V2784 V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* X V2783 (cons (cons P (cons : (cons verified ()))) V2784) V2785 V2786)))))))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2715 (shen.lazyderef V2782 V2785) (if (cons? V2715) (let V2716 (shen.lazyderef (hd V2715) V2785) (if (= set V2716) (let V2717 (shen.lazyderef (tl V2715) V2785) (if (cons? V2717) (let Var (hd V2717) (let V2718 (shen.lazyderef (tl V2717) V2785) (if (cons? V2718) (let Val (hd V2718) (let V2719 (shen.lazyderef (tl V2718) V2785) (if (= () V2719) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (shen.th* (cons value (cons Var ())) V2783 V2784 V2785 (freeze (shen.th* Val V2783 V2784 V2785 V2786)))))) false))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2720 (shen.lazyderef V2782 V2785) (if (cons? V2720) (let V2721 (shen.lazyderef (hd V2720) V2785) (if (= shen.<-sem V2721) (let V2722 (shen.lazyderef (tl V2720) V2785) (if (cons? V2722) (let F (hd V2722) (let V2723 (shen.lazyderef (tl V2722) V2785) (if (= () V2723) (let A (shen.newpv V2785) (let F&& (shen.newpv V2785) (let B (shen.newpv V2785) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (shen.th* F (cons A (cons ==> (cons B ()))) V2784 V2785 (freeze (cut Throwcontrol V2785 (freeze (bind F&& (concat && (shen.lazyderef F V2785)) V2785 (freeze (cut Throwcontrol V2785 (freeze (shen.th* F&& V2783 (cons (cons F&& (cons : (cons B ()))) V2784) V2785 V2786))))))))))))))) false))) false)) false)) false)) (if (= Case false) (let Case (let V2724 (shen.lazyderef V2782 V2785) (if (cons? V2724) (let V2725 (shen.lazyderef (hd V2724) V2785) (if (= fail V2725) (let V2726 (shen.lazyderef (tl V2724) V2785) (if (= () V2726) (let V2727 (shen.lazyderef V2783 V2785) (if (= symbol V2727) (do (shen.incinfs) (thaw V2786)) (if (shen.pvar? V2727) (do (shen.bindv V2727 symbol V2785) (let Result (do (shen.incinfs) (thaw V2786)) (do (shen.unbindv V2727 V2785) Result))) false))) false)) false)) false)) (if (= Case false) (let Case (let NewHyp (shen.newpv V2785) (do (shen.incinfs) (shen.t*-hyps V2784 NewHyp V2785 (freeze (shen.th* V2782 V2783 NewHyp V2785 V2786))))) (if (= Case false) (let Case (let V2728 (shen.lazyderef V2782 V2785) (if (cons? V2728) (let V2729 (shen.lazyderef (hd V2728) V2785) (if (= define V2729) (let V2730 (shen.lazyderef (tl V2728) V2785) (if (cons? V2730) (let F (hd V2730) (let X (tl V2730) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (shen.t*-def (cons define (cons F X)) V2783 V2784 V2785 V2786)))))) false)) false)) false)) (if (= Case false) (let Case (let V2731 (shen.lazyderef V2782 V2785) (if (cons? V2731) (let V2732 (shen.lazyderef (hd V2731) V2785) (if (= defcc V2732) (let V2733 (shen.lazyderef (tl V2731) V2785) (if (cons? V2733) (let F (hd V2733) (let X (tl V2733) (do (shen.incinfs) (cut Throwcontrol V2785 (freeze (shen.t*-defcc (cons defcc (cons F X)) V2783 V2784 V2785 V2786)))))) false)) false)) false)) (if (= Case false) (let Case (let V2734 (shen.lazyderef V2782 V2785) (if (cons? V2734) (let V2735 (shen.lazyderef (hd V2734) V2785) (if (= shen.process-datatype V2735) (let V2736 (shen.lazyderef V2783 V2785) (if (= symbol V2736) (do (shen.incinfs) (thaw V2786)) (if (shen.pvar? V2736) (do (shen.bindv V2736 symbol V2785) (let Result (do (shen.incinfs) (thaw V2786)) (do (shen.unbindv V2736 V2785) Result))) false))) false)) false)) (if (= Case false) (let Case (let V2737 (shen.lazyderef V2782 V2785) (if (cons? V2737) (let V2738 (shen.lazyderef (hd V2737) V2785) (if (= shen.synonyms-help V2738) (let V2739 (shen.lazyderef V2783 V2785) (if (= symbol V2739) (do (shen.incinfs) (thaw V2786)) (if (shen.pvar? V2739) (do (shen.bindv V2739 symbol V2785) (let Result (do (shen.incinfs) (thaw V2786)) (do (shen.unbindv V2739 V2785) Result))) false))) false)) false)) (if (= Case false) (let Datatypes (shen.newpv V2785) (do (shen.incinfs) (bind Datatypes (value shen.*datatypes*) V2785 (freeze (shen.udefs* (cons V2782 (cons : (cons V2783 ()))) V2784 Datatypes V2785 V2786))))) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)) Case)))))
24
74
 
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.
75
+ (defun shen.t*-hyps (V2787 V2788 V2789 V2790) (let Case (let V2534 (shen.lazyderef V2787 V2789) (if (cons? V2534) (let V2535 (shen.lazyderef (hd V2534) V2789) (if (cons? V2535) (let V2536 (shen.lazyderef (hd V2535) V2789) (if (cons? V2536) (let V2537 (shen.lazyderef (hd V2536) V2789) (if (= cons V2537) (let V2538 (shen.lazyderef (tl V2536) V2789) (if (cons? V2538) (let X (hd V2538) (let V2539 (shen.lazyderef (tl V2538) V2789) (if (cons? V2539) (let Y (hd V2539) (let V2540 (shen.lazyderef (tl V2539) V2789) (if (= () V2540) (let V2541 (shen.lazyderef (tl V2535) V2789) (if (cons? V2541) (let V2542 (shen.lazyderef (hd V2541) V2789) (if (= : V2542) (let V2543 (shen.lazyderef (tl V2541) V2789) (if (cons? V2543) (let V2544 (shen.lazyderef (hd V2543) V2789) (if (cons? V2544) (let V2545 (shen.lazyderef (hd V2544) V2789) (if (= list V2545) (let V2546 (shen.lazyderef (tl V2544) V2789) (if (cons? V2546) (let A (hd V2546) (let V2547 (shen.lazyderef (tl V2546) V2789) (if (= () V2547) (let V2548 (shen.lazyderef (tl V2543) V2789) (if (= () V2548) (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2548) (do (shen.bindv V2548 () V2789) (let Result (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2548 V2789) Result))) false))) (if (shen.pvar? V2547) (do (shen.bindv V2547 () V2789) (let Result (let V2549 (shen.lazyderef (tl V2543) V2789) (if (= () V2549) (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2549) (do (shen.bindv V2549 () V2789) (let Result (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2549 V2789) Result))) false))) (do (shen.unbindv V2547 V2789) Result))) false)))) (if (shen.pvar? V2546) (let A (shen.newpv V2789) (do (shen.bindv V2546 (cons A ()) V2789) (let Result (let V2550 (shen.lazyderef (tl V2543) V2789) (if (= () V2550) (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2550) (do (shen.bindv V2550 () V2789) (let Result (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2550 V2789) Result))) false))) (do (shen.unbindv V2546 V2789) Result)))) false))) (if (shen.pvar? V2545) (do (shen.bindv V2545 list V2789) (let Result (let V2551 (shen.lazyderef (tl V2544) V2789) (if (cons? V2551) (let A (hd V2551) (let V2552 (shen.lazyderef (tl V2551) V2789) (if (= () V2552) (let V2553 (shen.lazyderef (tl V2543) V2789) (if (= () V2553) (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2553) (do (shen.bindv V2553 () V2789) (let Result (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2553 V2789) Result))) false))) (if (shen.pvar? V2552) (do (shen.bindv V2552 () V2789) (let Result (let V2554 (shen.lazyderef (tl V2543) V2789) (if (= () V2554) (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2554) (do (shen.bindv V2554 () V2789) (let Result (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2554 V2789) Result))) false))) (do (shen.unbindv V2552 V2789) Result))) false)))) (if (shen.pvar? V2551) (let A (shen.newpv V2789) (do (shen.bindv V2551 (cons A ()) V2789) (let Result (let V2555 (shen.lazyderef (tl V2543) V2789) (if (= () V2555) (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2555) (do (shen.bindv V2555 () V2789) (let Result (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2555 V2789) Result))) false))) (do (shen.unbindv V2551 V2789) Result)))) false))) (do (shen.unbindv V2545 V2789) Result))) false))) (if (shen.pvar? V2544) (let A (shen.newpv V2789) (do (shen.bindv V2544 (cons list (cons A ())) V2789) (let Result (let V2556 (shen.lazyderef (tl V2543) V2789) (if (= () V2556) (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2556) (do (shen.bindv V2556 () V2789) (let Result (let Hyp (tl V2534) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons list (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2556 V2789) Result))) false))) (do (shen.unbindv V2544 V2789) Result)))) false))) false)) false)) false)) false))) false))) false)) false)) false)) false)) false)) (if (= Case false) (let Case (let V2557 (shen.lazyderef V2787 V2789) (if (cons? V2557) (let V2558 (shen.lazyderef (hd V2557) V2789) (if (cons? V2558) (let V2559 (shen.lazyderef (hd V2558) V2789) (if (cons? V2559) (let V2560 (shen.lazyderef (hd V2559) V2789) (if (= @p V2560) (let V2561 (shen.lazyderef (tl V2559) V2789) (if (cons? V2561) (let X (hd V2561) (let V2562 (shen.lazyderef (tl V2561) V2789) (if (cons? V2562) (let Y (hd V2562) (let V2563 (shen.lazyderef (tl V2562) V2789) (if (= () V2563) (let V2564 (shen.lazyderef (tl V2558) V2789) (if (cons? V2564) (let V2565 (shen.lazyderef (hd V2564) V2789) (if (= : V2565) (let V2566 (shen.lazyderef (tl V2564) V2789) (if (cons? V2566) (let V2567 (shen.lazyderef (hd V2566) V2789) (if (cons? V2567) (let A (hd V2567) (let V2568 (shen.lazyderef (tl V2567) V2789) (if (cons? V2568) (let V2569 (shen.lazyderef (hd V2568) V2789) (if (= * V2569) (let V2570 (shen.lazyderef (tl V2568) V2789) (if (cons? V2570) (let B (hd V2570) (let V2571 (shen.lazyderef (tl V2570) V2789) (if (= () V2571) (let V2572 (shen.lazyderef (tl V2566) V2789) (if (= () V2572) (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2572) (do (shen.bindv V2572 () V2789) (let Result (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2572 V2789) Result))) false))) (if (shen.pvar? V2571) (do (shen.bindv V2571 () V2789) (let Result (let V2573 (shen.lazyderef (tl V2566) V2789) (if (= () V2573) (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2573) (do (shen.bindv V2573 () V2789) (let Result (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2573 V2789) Result))) false))) (do (shen.unbindv V2571 V2789) Result))) false)))) (if (shen.pvar? V2570) (let B (shen.newpv V2789) (do (shen.bindv V2570 (cons B ()) V2789) (let Result (let V2574 (shen.lazyderef (tl V2566) V2789) (if (= () V2574) (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2574) (do (shen.bindv V2574 () V2789) (let Result (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2574 V2789) Result))) false))) (do (shen.unbindv V2570 V2789) Result)))) false))) (if (shen.pvar? V2569) (do (shen.bindv V2569 * V2789) (let Result (let V2575 (shen.lazyderef (tl V2568) V2789) (if (cons? V2575) (let B (hd V2575) (let V2576 (shen.lazyderef (tl V2575) V2789) (if (= () V2576) (let V2577 (shen.lazyderef (tl V2566) V2789) (if (= () V2577) (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2577) (do (shen.bindv V2577 () V2789) (let Result (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2577 V2789) Result))) false))) (if (shen.pvar? V2576) (do (shen.bindv V2576 () V2789) (let Result (let V2578 (shen.lazyderef (tl V2566) V2789) (if (= () V2578) (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2578) (do (shen.bindv V2578 () V2789) (let Result (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2578 V2789) Result))) false))) (do (shen.unbindv V2576 V2789) Result))) false)))) (if (shen.pvar? V2575) (let B (shen.newpv V2789) (do (shen.bindv V2575 (cons B ()) V2789) (let Result (let V2579 (shen.lazyderef (tl V2566) V2789) (if (= () V2579) (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2579) (do (shen.bindv V2579 () V2789) (let Result (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2579 V2789) Result))) false))) (do (shen.unbindv V2575 V2789) Result)))) false))) (do (shen.unbindv V2569 V2789) Result))) false))) (if (shen.pvar? V2568) (let B (shen.newpv V2789) (do (shen.bindv V2568 (cons * (cons B ())) V2789) (let Result (let V2580 (shen.lazyderef (tl V2566) V2789) (if (= () V2580) (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2580) (do (shen.bindv V2580 () V2789) (let Result (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2580 V2789) Result))) false))) (do (shen.unbindv V2568 V2789) Result)))) false)))) (if (shen.pvar? V2567) (let A (shen.newpv V2789) (let B (shen.newpv V2789) (do (shen.bindv V2567 (cons A (cons * (cons B ()))) V2789) (let Result (let V2581 (shen.lazyderef (tl V2566) V2789) (if (= () V2581) (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2581) (do (shen.bindv V2581 () V2789) (let Result (let Hyp (tl V2557) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (shen.lazyderef B V2789) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2581 V2789) Result))) false))) (do (shen.unbindv V2567 V2789) Result))))) false))) false)) false)) false)) false))) false))) false)) false)) false)) false)) false)) (if (= Case false) (let Case (let V2582 (shen.lazyderef V2787 V2789) (if (cons? V2582) (let V2583 (shen.lazyderef (hd V2582) V2789) (if (cons? V2583) (let V2584 (shen.lazyderef (hd V2583) V2789) (if (cons? V2584) (let V2585 (shen.lazyderef (hd V2584) V2789) (if (= @v V2585) (let V2586 (shen.lazyderef (tl V2584) V2789) (if (cons? V2586) (let X (hd V2586) (let V2587 (shen.lazyderef (tl V2586) V2789) (if (cons? V2587) (let Y (hd V2587) (let V2588 (shen.lazyderef (tl V2587) V2789) (if (= () V2588) (let V2589 (shen.lazyderef (tl V2583) V2789) (if (cons? V2589) (let V2590 (shen.lazyderef (hd V2589) V2789) (if (= : V2590) (let V2591 (shen.lazyderef (tl V2589) V2789) (if (cons? V2591) (let V2592 (shen.lazyderef (hd V2591) V2789) (if (cons? V2592) (let V2593 (shen.lazyderef (hd V2592) V2789) (if (= vector V2593) (let V2594 (shen.lazyderef (tl V2592) V2789) (if (cons? V2594) (let A (hd V2594) (let V2595 (shen.lazyderef (tl V2594) V2789) (if (= () V2595) (let V2596 (shen.lazyderef (tl V2591) V2789) (if (= () V2596) (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2596) (do (shen.bindv V2596 () V2789) (let Result (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2596 V2789) Result))) false))) (if (shen.pvar? V2595) (do (shen.bindv V2595 () V2789) (let Result (let V2597 (shen.lazyderef (tl V2591) V2789) (if (= () V2597) (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2597) (do (shen.bindv V2597 () V2789) (let Result (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2597 V2789) Result))) false))) (do (shen.unbindv V2595 V2789) Result))) false)))) (if (shen.pvar? V2594) (let A (shen.newpv V2789) (do (shen.bindv V2594 (cons A ()) V2789) (let Result (let V2598 (shen.lazyderef (tl V2591) V2789) (if (= () V2598) (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2598) (do (shen.bindv V2598 () V2789) (let Result (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2598 V2789) Result))) false))) (do (shen.unbindv V2594 V2789) Result)))) false))) (if (shen.pvar? V2593) (do (shen.bindv V2593 vector V2789) (let Result (let V2599 (shen.lazyderef (tl V2592) V2789) (if (cons? V2599) (let A (hd V2599) (let V2600 (shen.lazyderef (tl V2599) V2789) (if (= () V2600) (let V2601 (shen.lazyderef (tl V2591) V2789) (if (= () V2601) (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2601) (do (shen.bindv V2601 () V2789) (let Result (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2601 V2789) Result))) false))) (if (shen.pvar? V2600) (do (shen.bindv V2600 () V2789) (let Result (let V2602 (shen.lazyderef (tl V2591) V2789) (if (= () V2602) (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2602) (do (shen.bindv V2602 () V2789) (let Result (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2602 V2789) Result))) false))) (do (shen.unbindv V2600 V2789) Result))) false)))) (if (shen.pvar? V2599) (let A (shen.newpv V2789) (do (shen.bindv V2599 (cons A ()) V2789) (let Result (let V2603 (shen.lazyderef (tl V2591) V2789) (if (= () V2603) (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2603) (do (shen.bindv V2603 () V2789) (let Result (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2603 V2789) Result))) false))) (do (shen.unbindv V2599 V2789) Result)))) false))) (do (shen.unbindv V2593 V2789) Result))) false))) (if (shen.pvar? V2592) (let A (shen.newpv V2789) (do (shen.bindv V2592 (cons vector (cons A ())) V2789) (let Result (let V2604 (shen.lazyderef (tl V2591) V2789) (if (= () V2604) (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2604) (do (shen.bindv V2604 () V2789) (let Result (let Hyp (tl V2582) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons (shen.lazyderef A V2789) ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons (cons vector (cons (shen.lazyderef A V2789) ())) ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2604 V2789) Result))) false))) (do (shen.unbindv V2592 V2789) Result)))) false))) false)) false)) false)) false))) false))) false)) false)) false)) false)) false)) (if (= Case false) (let Case (let V2605 (shen.lazyderef V2787 V2789) (if (cons? V2605) (let V2606 (shen.lazyderef (hd V2605) V2789) (if (cons? V2606) (let V2607 (shen.lazyderef (hd V2606) V2789) (if (cons? V2607) (let V2608 (shen.lazyderef (hd V2607) V2789) (if (= @s V2608) (let V2609 (shen.lazyderef (tl V2607) V2789) (if (cons? V2609) (let X (hd V2609) (let V2610 (shen.lazyderef (tl V2609) V2789) (if (cons? V2610) (let Y (hd V2610) (let V2611 (shen.lazyderef (tl V2610) V2789) (if (= () V2611) (let V2612 (shen.lazyderef (tl V2606) V2789) (if (cons? V2612) (let V2613 (shen.lazyderef (hd V2612) V2789) (if (= : V2613) (let V2614 (shen.lazyderef (tl V2612) V2789) (if (cons? V2614) (let V2615 (shen.lazyderef (hd V2614) V2789) (if (= string V2615) (let V2616 (shen.lazyderef (tl V2614) V2789) (if (= () V2616) (let Hyp (tl V2605) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons string ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons string ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2616) (do (shen.bindv V2616 () V2789) (let Result (let Hyp (tl V2605) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons string ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons string ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2616 V2789) Result))) false))) (if (shen.pvar? V2615) (do (shen.bindv V2615 string V2789) (let Result (let V2617 (shen.lazyderef (tl V2614) V2789) (if (= () V2617) (let Hyp (tl V2605) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons string ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons string ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (if (shen.pvar? V2617) (do (shen.bindv V2617 () V2789) (let Result (let Hyp (tl V2605) (do (shen.incinfs) (bind V2788 (cons (cons (shen.lazyderef X V2789) (cons : (cons string ()))) (cons (cons (shen.lazyderef Y V2789) (cons : (cons string ()))) (shen.lazyderef Hyp V2789))) V2789 V2790))) (do (shen.unbindv V2617 V2789) Result))) false))) (do (shen.unbindv V2615 V2789) Result))) false))) false)) false)) false)) false))) false))) false)) false)) false)) false)) false)) (if (= Case false) (let V2618 (shen.lazyderef V2787 V2789) (if (cons? V2618) (let X (hd V2618) (let Hyp (tl V2618) (let NewHyps (shen.newpv V2789) (do (shen.incinfs) (bind V2788 (cons (shen.lazyderef X V2789) (shen.lazyderef NewHyps V2789)) V2789 (freeze (shen.t*-hyps Hyp NewHyps V2789 V2790))))))) false)) Case)) Case)) Case)) Case)))
26
76
 
77
+ (defun shen.show (V2803 V2804 V2805 V2806) (cond ((value shen.*spy*) (do (shen.line) (do (shen.show-p (shen.deref V2803 V2805)) (do (nl 1) (do (nl 1) (do (shen.show-assumptions (shen.deref V2804 V2805) 1) (do (pr "
78
+ > " (stoutput)) (do (shen.pause-for-user (value *language*)) (thaw V2806))))))))) (true (thaw V2806))))
27
79
 
80
+ (defun shen.line () (let Infs (inferences) (pr (cn "____________________________________________________________ " (shen.app Infs (cn " inference" (shen.app (if (= 1 Infs) "" "s") "
81
+ ?- " shen.a)) shen.a)) (stoutput))))
28
82
 
29
- For an explication of this license see http://www.lambdassociates.org/News/june11/license.htm which explains this license in full."
83
+ (defun shen.show-p (V2807) (cond ((and (cons? V2807) (and (cons? (tl V2807)) (and (= : (hd (tl V2807))) (and (cons? (tl (tl V2807))) (= () (tl (tl (tl V2807)))))))) (pr (shen.app (hd V2807) (cn " : " (shen.app (hd (tl (tl V2807))) "" shen.r)) shen.r) (stoutput))) (true (pr (shen.app V2807 "" shen.r) (stoutput)))))
30
84
 
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))))))
85
+ (defun shen.show-assumptions (V2810 V2811) (cond ((= () V2810) shen.skip) ((cons? V2810) (do (pr (shen.app V2811 ". " shen.a) (stoutput)) (do (shen.show-p (hd V2810)) (do (nl 1) (shen.show-assumptions (tl V2810) (+ V2811 1)))))) (true (shen.sys-error shen.show-assumptions))))
39
86
 
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)))
87
+ (defun shen.pause-for-user (V2816) (cond ((= "Common Lisp" V2816) (let I (FORMAT () "~C" (READ-CHAR)) (if (= I "a") (simple-error "input aborted
88
+ ") (nl 1)))) (true (let I (shen.read-char) (if (= I "a") (simple-error "input aborted
89
+ ") (nl 1))))))
52
90
 
53
- (defun shen-special? (V764) (element? V764 (value shen-*special*)))
91
+ (defun shen.read-char () (shen.read-char-h (read-byte (stinput)) 0))
54
92
 
55
- (defun shen-extraspecial? (V765) (element? V765 (value shen-*extraspecial*)))
93
+ (defun shen.read-char-h (V2819 V2820) (cond ((and (= -1 V2819) (= 0 V2820)) (shen.read-char-h (read-byte (stinput)) 1)) ((= 0 V2820) (shen.read-char-h (read-byte (stinput)) 0)) ((and (= -1 V2819) (= 1 V2820)) (shen.read-char-h (read-byte (stinput)) 1)) ((= 1 V2820) (n->string V2819)) (true (shen.sys-error shen.read-char-h))))
56
94
 
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)))))
95
+ (defun shen.typedf? (V2821) (element? V2821 (value shen.*signedfuncs*)))
106
96
 
107
- (defun shen-type-theory-enabled? ()
108
- (value shen-*shen-type-theory-enabled?*))
97
+ (defun shen.sigf (V2822) (concat shen.type-signature-of- V2822))
109
98
 
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 -~%" ()))))
99
+ (defun shen.placeholder () (gensym &&))
114
100
 
115
- (defun shen-prolog-failure (V584 V585) false)
101
+ (defun shen.base (V2823 V2824 V2825 V2826) (let Case (let V2521 (shen.lazyderef V2824 V2825) (if (= number V2521) (do (shen.incinfs) (fwhen (number? (shen.lazyderef V2823 V2825)) V2825 V2826)) (if (shen.pvar? V2521) (do (shen.bindv V2521 number V2825) (let Result (do (shen.incinfs) (fwhen (number? (shen.lazyderef V2823 V2825)) V2825 V2826)) (do (shen.unbindv V2521 V2825) Result))) false))) (if (= Case false) (let Case (let V2522 (shen.lazyderef V2824 V2825) (if (= boolean V2522) (do (shen.incinfs) (fwhen (boolean? (shen.lazyderef V2823 V2825)) V2825 V2826)) (if (shen.pvar? V2522) (do (shen.bindv V2522 boolean V2825) (let Result (do (shen.incinfs) (fwhen (boolean? (shen.lazyderef V2823 V2825)) V2825 V2826)) (do (shen.unbindv V2522 V2825) Result))) false))) (if (= Case false) (let Case (let V2523 (shen.lazyderef V2824 V2825) (if (= string V2523) (do (shen.incinfs) (fwhen (string? (shen.lazyderef V2823 V2825)) V2825 V2826)) (if (shen.pvar? V2523) (do (shen.bindv V2523 string V2825) (let Result (do (shen.incinfs) (fwhen (string? (shen.lazyderef V2823 V2825)) V2825 V2826)) (do (shen.unbindv V2523 V2825) Result))) false))) (if (= Case false) (let Case (let V2524 (shen.lazyderef V2824 V2825) (if (= symbol V2524) (do (shen.incinfs) (fwhen (symbol? (shen.lazyderef V2823 V2825)) V2825 (freeze (fwhen (not (shen.placeholder? (shen.lazyderef V2823 V2825))) V2825 V2826)))) (if (shen.pvar? V2524) (do (shen.bindv V2524 symbol V2825) (let Result (do (shen.incinfs) (fwhen (symbol? (shen.lazyderef V2823 V2825)) V2825 (freeze (fwhen (not (shen.placeholder? (shen.lazyderef V2823 V2825))) V2825 V2826)))) (do (shen.unbindv V2524 V2825) Result))) false))) (if (= Case false) (let V2525 (shen.lazyderef V2823 V2825) (if (= () V2525) (let V2526 (shen.lazyderef V2824 V2825) (if (cons? V2526) (let V2527 (shen.lazyderef (hd V2526) V2825) (if (= list V2527) (let V2528 (shen.lazyderef (tl V2526) V2825) (if (cons? V2528) (let A (hd V2528) (let V2529 (shen.lazyderef (tl V2528) V2825) (if (= () V2529) (do (shen.incinfs) (thaw V2826)) (if (shen.pvar? V2529) (do (shen.bindv V2529 () V2825) (let Result (do (shen.incinfs) (thaw V2826)) (do (shen.unbindv V2529 V2825) Result))) false)))) (if (shen.pvar? V2528) (let A (shen.newpv V2825) (do (shen.bindv V2528 (cons A ()) V2825) (let Result (do (shen.incinfs) (thaw V2826)) (do (shen.unbindv V2528 V2825) Result)))) false))) (if (shen.pvar? V2527) (do (shen.bindv V2527 list V2825) (let Result (let V2530 (shen.lazyderef (tl V2526) V2825) (if (cons? V2530) (let A (hd V2530) (let V2531 (shen.lazyderef (tl V2530) V2825) (if (= () V2531) (do (shen.incinfs) (thaw V2826)) (if (shen.pvar? V2531) (do (shen.bindv V2531 () V2825) (let Result (do (shen.incinfs) (thaw V2826)) (do (shen.unbindv V2531 V2825) Result))) false)))) (if (shen.pvar? V2530) (let A (shen.newpv V2825) (do (shen.bindv V2530 (cons A ()) V2825) (let Result (do (shen.incinfs) (thaw V2826)) (do (shen.unbindv V2530 V2825) Result)))) false))) (do (shen.unbindv V2527 V2825) Result))) false))) (if (shen.pvar? V2526) (let A (shen.newpv V2825) (do (shen.bindv V2526 (cons list (cons A ())) V2825) (let Result (do (shen.incinfs) (thaw V2826)) (do (shen.unbindv V2526 V2825) Result)))) false))) false)) Case)) Case)) Case)) Case)))
116
102
 
117
- (defun shen-maxinfexceeded? ()
118
- (> (inferences shen-skip) (value shen-*maxinferences*)))
103
+ (defun shen.placeholder? (V2827) (and (symbol? V2827) (shen.placeholder-help? (str V2827))))
119
104
 
120
- (defun shen-errormaxinfs () (simple-error "maximum inferences exceeded~%"))
105
+ (defun shen.placeholder-help? (V2834) (cond ((and (shen.+string? V2834) (and (= "&" (pos V2834 0)) (and (shen.+string? (tlstr V2834)) (= "&" (pos (tlstr V2834) 0))))) true) (true false)))
121
106
 
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)))
107
+ (defun shen.by_hypothesis (V2835 V2836 V2837 V2838 V2839) (let Case (let V2512 (shen.lazyderef V2837 V2838) (if (cons? V2512) (let V2513 (shen.lazyderef (hd V2512) V2838) (if (cons? V2513) (let Y (hd V2513) (let V2514 (shen.lazyderef (tl V2513) V2838) (if (cons? V2514) (let V2515 (shen.lazyderef (hd V2514) V2838) (if (= : V2515) (let V2516 (shen.lazyderef (tl V2514) V2838) (if (cons? V2516) (let B (hd V2516) (let V2517 (shen.lazyderef (tl V2516) V2838) (if (= () V2517) (do (shen.incinfs) (identical V2835 Y V2838 (freeze (unify! V2836 B V2838 V2839)))) false))) false)) false)) false))) false)) false)) (if (= Case false) (let V2518 (shen.lazyderef V2837 V2838) (if (cons? V2518) (let Hyp (tl V2518) (do (shen.incinfs) (shen.by_hypothesis V2835 V2836 Hyp V2838 V2839))) false)) Case)))
136
108
 
137
- (defun shen-th* (V1507 V1508 V1509 V1510 V1511)
138
- (let Throwcontrol (shen-catchpoint)
139
- (shen-cutpoint Throwcontrol
140
- (let Case
141
- (do (shen-incinfs)
142
- (shen-show (cons V1507 (cons : (cons V1508 ()))) V1509 V1510
143
- (freeze (fwhen false V1510 V1511))))
144
- (if (= Case false)
145
- (let Case
146
- (let F (shen-newpv V1510)
147
- (do (shen-incinfs)
148
- (fwhen (shen-typedf? (shen-lazyderef V1507 V1510)) V1510
149
- (freeze
150
- (bind F (shen-sigf (shen-lazyderef V1507 V1510)) V1510
151
- (freeze (call (cons F (cons V1508 ())) V1510 V1511)))))))
152
- (if (= Case false)
153
- (let Case (do (shen-incinfs) (shen-base V1507 V1508 V1510 V1511))
154
- (if (= Case false)
155
- (let Case
156
- (do (shen-incinfs)
157
- (shen-by_hypothesis V1507 V1508 V1509 V1510 V1511))
158
- (if (= Case false)
159
- (let Case
160
- (let V1397 (shen-lazyderef V1507 V1510)
161
- (if (cons? V1397)
162
- (let F (hd V1397)
163
- (let V1398 (shen-lazyderef (tl V1397) V1510)
164
- (if (= () V1398)
165
- (do (shen-incinfs)
166
- (shen-th* F (cons --> (cons V1508 ())) V1509 V1510 V1511))
167
- false)))
168
- false))
169
- (if (= Case false)
170
- (let Case
171
- (let V1399 (shen-lazyderef V1507 V1510)
172
- (if (cons? V1399)
173
- (let F (hd V1399)
174
- (let V1400 (shen-lazyderef (tl V1399) V1510)
175
- (if (cons? V1400)
176
- (let X (hd V1400)
177
- (let V1401 (shen-lazyderef (tl V1400) V1510)
178
- (if (= () V1401)
179
- (let B (shen-newpv V1510)
180
- (do (shen-incinfs)
181
- (shen-th* F (cons B (cons --> (cons V1508 ()))) V1509
182
- V1510 (freeze (shen-th* X B V1509 V1510 V1511)))))
183
- false)))
184
- false)))
185
- false))
186
- (if (= Case false)
187
- (let Case
188
- (let V1402 (shen-lazyderef V1507 V1510)
189
- (if (cons? V1402)
190
- (let V1403 (shen-lazyderef (hd V1402) V1510)
191
- (if (= cons V1403)
192
- (let V1404 (shen-lazyderef (tl V1402) V1510)
193
- (if (cons? V1404)
194
- (let X (hd V1404)
195
- (let V1405 (shen-lazyderef (tl V1404) V1510)
196
- (if (cons? V1405)
197
- (let Y (hd V1405)
198
- (let V1406 (shen-lazyderef (tl V1405) V1510)
199
- (if (= () V1406)
200
- (let V1407 (shen-lazyderef V1508 V1510)
201
- (if (cons? V1407)
202
- (let V1408 (shen-lazyderef (hd V1407) V1510)
203
- (if (= list V1408)
204
- (let V1409 (shen-lazyderef (tl V1407) V1510)
205
- (if (cons? V1409)
206
- (let A (hd V1409)
207
- (let V1410 (shen-lazyderef (tl V1409) V1510)
208
- (if (= () V1410)
209
- (do (shen-incinfs)
210
- (shen-th* X A V1509 V1510
211
- (freeze
212
- (shen-th* Y (cons list (cons A ()))
213
- V1509 V1510 V1511))))
214
- (if (shen-pvar? V1410)
215
- (do (shen-bindv V1410 () V1510)
216
- (let Result
217
- (do (shen-incinfs)
218
- (shen-th* X A V1509 V1510
219
- (freeze
220
- (shen-th* Y (cons list (cons A ()))
221
- V1509 V1510 V1511))))
222
- (do (shen-unbindv V1410 V1510)
223
- Result)))
224
- false))))
225
- (if (shen-pvar? V1409)
226
- (let A (shen-newpv V1510)
227
- (do (shen-bindv V1409 (cons A ()) V1510)
228
- (let Result
229
- (do (shen-incinfs)
230
- (shen-th* X A V1509 V1510
231
- (freeze
232
- (shen-th* Y (cons list (cons A ()))
233
- V1509 V1510 V1511))))
234
- (do (shen-unbindv V1409 V1510) Result))))
235
- false)))
236
- (if (shen-pvar? V1408)
237
- (do (shen-bindv V1408 list V1510)
238
- (let Result
239
- (let V1411 (shen-lazyderef (tl V1407) V1510)
240
- (if (cons? V1411)
241
- (let A (hd V1411)
242
- (let V1412
243
- (shen-lazyderef (tl V1411) V1510)
244
- (if (= () V1412)
245
- (do (shen-incinfs)
246
- (shen-th* X A V1509 V1510
247
- (freeze
248
- (shen-th* Y (cons list (cons A ()))
249
- V1509 V1510 V1511))))
250
- (if (shen-pvar? V1412)
251
- (do (shen-bindv V1412 () V1510)
252
- (let Result
253
- (do (shen-incinfs)
254
- (shen-th* X A V1509 V1510
255
- (freeze
256
- (shen-th* Y
257
- (cons list (cons A ())) V1509
258
- V1510 V1511))))
259
- (do (shen-unbindv V1412 V1510)
260
- Result)))
261
- false))))
262
- (if (shen-pvar? V1411)
263
- (let A (shen-newpv V1510)
264
- (do
265
- (shen-bindv V1411 (cons A ()) V1510)
266
- (let Result
267
- (do (shen-incinfs)
268
- (shen-th* X A V1509 V1510
269
- (freeze
270
- (shen-th* Y
271
- (cons list (cons A ())) V1509
272
- V1510 V1511))))
273
- (do (shen-unbindv V1411 V1510)
274
- Result))))
275
- false)))
276
- (do (shen-unbindv V1408 V1510) Result)))
277
- false)))
278
- (if (shen-pvar? V1407)
279
- (let A (shen-newpv V1510)
280
- (do
281
- (shen-bindv V1407 (cons list (cons A ()))
282
- V1510)
283
- (let Result
284
- (do (shen-incinfs)
285
- (shen-th* X A V1509 V1510
286
- (freeze
287
- (shen-th* Y (cons list (cons A ())) V1509
288
- V1510 V1511))))
289
- (do (shen-unbindv V1407 V1510) Result))))
290
- false)))
291
- false)))
292
- false)))
293
- false))
294
- false))
295
- false))
296
- (if (= Case false)
297
- (let Case
298
- (let V1413 (shen-lazyderef V1507 V1510)
299
- (if (cons? V1413)
300
- (let V1414 (shen-lazyderef (hd V1413) V1510)
301
- (if (= @p V1414)
302
- (let V1415 (shen-lazyderef (tl V1413) V1510)
303
- (if (cons? V1415)
304
- (let X (hd V1415)
305
- (let V1416 (shen-lazyderef (tl V1415) V1510)
306
- (if (cons? V1416)
307
- (let Y (hd V1416)
308
- (let V1417 (shen-lazyderef (tl V1416) V1510)
309
- (if (= () V1417)
310
- (let V1418 (shen-lazyderef V1508 V1510)
311
- (if (cons? V1418)
312
- (let A (hd V1418)
313
- (let V1419 (shen-lazyderef (tl V1418) V1510)
314
- (if (cons? V1419)
315
- (let V1420 (shen-lazyderef (hd V1419) V1510)
316
- (if (= * V1420)
317
- (let V1421
318
- (shen-lazyderef (tl V1419) V1510)
319
- (if (cons? V1421)
320
- (let B (hd V1421)
321
- (let V1422
322
- (shen-lazyderef (tl V1421) V1510)
323
- (if (= () V1422)
324
- (do (shen-incinfs)
325
- (shen-th* X A V1509 V1510
326
- (freeze
327
- (shen-th* Y B V1509 V1510
328
- V1511))))
329
- (if (shen-pvar? V1422)
330
- (do (shen-bindv V1422 () V1510)
331
- (let Result
332
- (do (shen-incinfs)
333
- (shen-th* X A V1509 V1510
334
- (freeze
335
- (shen-th* Y B V1509 V1510
336
- V1511))))
337
- (do (shen-unbindv V1422 V1510)
338
- Result)))
339
- false))))
340
- (if (shen-pvar? V1421)
341
- (let B (shen-newpv V1510)
342
- (do
343
- (shen-bindv V1421 (cons B ()) V1510)
344
- (let Result
345
- (do (shen-incinfs)
346
- (shen-th* X A V1509 V1510
347
- (freeze
348
- (shen-th* Y B V1509 V1510
349
- V1511))))
350
- (do (shen-unbindv V1421 V1510)
351
- Result))))
352
- false)))
353
- (if (shen-pvar? V1420)
354
- (do (shen-bindv V1420 * V1510)
355
- (let Result
356
- (let V1423
357
- (shen-lazyderef (tl V1419) V1510)
358
- (if (cons? V1423)
359
- (let B (hd V1423)
360
- (let V1424
361
- (shen-lazyderef (tl V1423) V1510)
362
- (if (= () V1424)
363
- (do (shen-incinfs)
364
- (shen-th* X A V1509 V1510
365
- (freeze
366
- (shen-th* Y B V1509 V1510
367
- V1511))))
368
- (if (shen-pvar? V1424)
369
- (do (shen-bindv V1424 () V1510)
370
- (let Result
371
- (do (shen-incinfs)
372
- (shen-th* X A V1509 V1510
373
- (freeze
374
- (shen-th* Y B V1509 V1510
375
- V1511))))
376
- (do (shen-unbindv V1424 V1510)
377
- Result)))
378
- false))))
379
- (if (shen-pvar? V1423)
380
- (let B (shen-newpv V1510)
381
- (do
382
- (shen-bindv V1423 (cons B ())
383
- V1510)
384
- (let Result
385
- (do (shen-incinfs)
386
- (shen-th* X A V1509 V1510
387
- (freeze
388
- (shen-th* Y B V1509 V1510
389
- V1511))))
390
- (do (shen-unbindv V1423 V1510)
391
- Result))))
392
- false)))
393
- (do (shen-unbindv V1420 V1510)
394
- Result)))
395
- false)))
396
- (if (shen-pvar? V1419)
397
- (let B (shen-newpv V1510)
398
- (do
399
- (shen-bindv V1419 (cons * (cons B ()))
400
- V1510)
401
- (let Result
402
- (do (shen-incinfs)
403
- (shen-th* X A V1509 V1510
404
- (freeze
405
- (shen-th* Y B V1509 V1510 V1511))))
406
- (do (shen-unbindv V1419 V1510)
407
- Result))))
408
- false))))
409
- (if (shen-pvar? V1418)
410
- (let A (shen-newpv V1510)
411
- (let B (shen-newpv V1510)
412
- (do
413
- (shen-bindv V1418
414
- (cons A (cons * (cons B ()))) V1510)
415
- (let Result
416
- (do (shen-incinfs)
417
- (shen-th* X A V1509 V1510
418
- (freeze
419
- (shen-th* Y B V1509 V1510 V1511))))
420
- (do (shen-unbindv V1418 V1510) Result)))))
421
- false)))
422
- false)))
423
- false)))
424
- false))
425
- false))
426
- false))
427
- (if (= Case false)
428
- (let Case
429
- (let V1425 (shen-lazyderef V1507 V1510)
430
- (if (cons? V1425)
431
- (let V1426 (shen-lazyderef (hd V1425) V1510)
432
- (if (= @v V1426)
433
- (let V1427 (shen-lazyderef (tl V1425) V1510)
434
- (if (cons? V1427)
435
- (let X (hd V1427)
436
- (let V1428 (shen-lazyderef (tl V1427) V1510)
437
- (if (cons? V1428)
438
- (let Y (hd V1428)
439
- (let V1429 (shen-lazyderef (tl V1428) V1510)
440
- (if (= () V1429)
441
- (let V1430 (shen-lazyderef V1508 V1510)
442
- (if (cons? V1430)
443
- (let V1431 (shen-lazyderef (hd V1430) V1510)
444
- (if (= vector V1431)
445
- (let V1432
446
- (shen-lazyderef (tl V1430) V1510)
447
- (if (cons? V1432)
448
- (let A (hd V1432)
449
- (let V1433
450
- (shen-lazyderef (tl V1432) V1510)
451
- (if (= () V1433)
452
- (do (shen-incinfs)
453
- (shen-th* X A V1509 V1510
454
- (freeze
455
- (shen-th* Y
456
- (cons vector (cons A ())) V1509
457
- V1510 V1511))))
458
- (if (shen-pvar? V1433)
459
- (do (shen-bindv V1433 () V1510)
460
- (let Result
461
- (do (shen-incinfs)
462
- (shen-th* X A V1509 V1510
463
- (freeze
464
- (shen-th* Y
465
- (cons vector (cons A ()))
466
- V1509 V1510 V1511))))
467
- (do (shen-unbindv V1433 V1510)
468
- Result)))
469
- false))))
470
- (if (shen-pvar? V1432)
471
- (let A (shen-newpv V1510)
472
- (do
473
- (shen-bindv V1432 (cons A ()) V1510)
474
- (let Result
475
- (do (shen-incinfs)
476
- (shen-th* X A V1509 V1510
477
- (freeze
478
- (shen-th* Y
479
- (cons vector (cons A ())) V1509
480
- V1510 V1511))))
481
- (do (shen-unbindv V1432 V1510)
482
- Result))))
483
- false)))
484
- (if (shen-pvar? V1431)
485
- (do (shen-bindv V1431 vector V1510)
486
- (let Result
487
- (let V1434
488
- (shen-lazyderef (tl V1430) V1510)
489
- (if (cons? V1434)
490
- (let A (hd V1434)
491
- (let V1435
492
- (shen-lazyderef (tl V1434) V1510)
493
- (if (= () V1435)
494
- (do (shen-incinfs)
495
- (shen-th* X A V1509 V1510
496
- (freeze
497
- (shen-th* Y
498
- (cons vector (cons A ()))
499
- V1509 V1510 V1511))))
500
- (if (shen-pvar? V1435)
501
- (do (shen-bindv V1435 () V1510)
502
- (let Result
503
- (do (shen-incinfs)
504
- (shen-th* X A V1509 V1510
505
- (freeze
506
- (shen-th* Y
507
- (cons vector (cons A ()))
508
- V1509 V1510 V1511))))
509
- (do (shen-unbindv V1435 V1510)
510
- Result)))
511
- false))))
512
- (if (shen-pvar? V1434)
513
- (let A (shen-newpv V1510)
514
- (do
515
- (shen-bindv V1434 (cons A ())
516
- V1510)
517
- (let Result
518
- (do (shen-incinfs)
519
- (shen-th* X A V1509 V1510
520
- (freeze
521
- (shen-th* Y
522
- (cons vector (cons A ()))
523
- V1509 V1510 V1511))))
524
- (do (shen-unbindv V1434 V1510)
525
- Result))))
526
- false)))
527
- (do (shen-unbindv V1431 V1510) Result)))
528
- false)))
529
- (if (shen-pvar? V1430)
530
- (let A (shen-newpv V1510)
531
- (do
532
- (shen-bindv V1430
533
- (cons vector (cons A ())) V1510)
534
- (let Result
535
- (do (shen-incinfs)
536
- (shen-th* X A V1509 V1510
537
- (freeze
538
- (shen-th* Y (cons vector (cons A ()))
539
- V1509 V1510 V1511))))
540
- (do (shen-unbindv V1430 V1510) Result))))
541
- false)))
542
- false)))
543
- false)))
544
- false))
545
- false))
546
- false))
547
- (if (= Case false)
548
- (let Case
549
- (let V1436 (shen-lazyderef V1507 V1510)
550
- (if (cons? V1436)
551
- (let V1437 (shen-lazyderef (hd V1436) V1510)
552
- (if (= @s V1437)
553
- (let V1438 (shen-lazyderef (tl V1436) V1510)
554
- (if (cons? V1438)
555
- (let X (hd V1438)
556
- (let V1439 (shen-lazyderef (tl V1438) V1510)
557
- (if (cons? V1439)
558
- (let Y (hd V1439)
559
- (let V1440 (shen-lazyderef (tl V1439) V1510)
560
- (if (= () V1440)
561
- (let V1441 (shen-lazyderef V1508 V1510)
562
- (if (= string V1441)
563
- (do (shen-incinfs)
564
- (shen-th* X string V1509 V1510
565
- (freeze
566
- (shen-th* Y string V1509 V1510 V1511))))
567
- (if (shen-pvar? V1441)
568
- (do (shen-bindv V1441 string V1510)
569
- (let Result
570
- (do (shen-incinfs)
571
- (shen-th* X string V1509 V1510
572
- (freeze
573
- (shen-th* Y string V1509 V1510
574
- V1511))))
575
- (do (shen-unbindv V1441 V1510) Result)))
576
- false)))
577
- false)))
578
- false)))
579
- false))
580
- false))
581
- false))
582
- (if (= Case false)
583
- (let Case
584
- (let V1442 (shen-lazyderef V1507 V1510)
585
- (if (cons? V1442)
586
- (let V1443 (shen-lazyderef (hd V1442) V1510)
587
- (if (= lambda V1443)
588
- (let V1444 (shen-lazyderef (tl V1442) V1510)
589
- (if (cons? V1444)
590
- (let X (hd V1444)
591
- (let V1445 (shen-lazyderef (tl V1444) V1510)
592
- (if (cons? V1445)
593
- (let Y (hd V1445)
594
- (let V1446 (shen-lazyderef (tl V1445) V1510)
595
- (if (= () V1446)
596
- (let V1447 (shen-lazyderef V1508 V1510)
597
- (if (cons? V1447)
598
- (let A (hd V1447)
599
- (let V1448
600
- (shen-lazyderef (tl V1447) V1510)
601
- (if (cons? V1448)
602
- (let V1449
603
- (shen-lazyderef (hd V1448) V1510)
604
- (if (= --> V1449)
605
- (let V1450
606
- (shen-lazyderef (tl V1448) V1510)
607
- (if (cons? V1450)
608
- (let B (hd V1450)
609
- (let V1451
610
- (shen-lazyderef (tl V1450)
611
- V1510)
612
- (if (= () V1451)
613
- (let Z (shen-newpv V1510)
614
- (let X&& (shen-newpv V1510)
615
- (do (shen-incinfs)
616
- (cut Throwcontrol V1510
617
- (freeze
618
- (bind X&&
619
- (shen-placeholder) V1510
620
- (freeze
621
- (bind Z
622
- (shen-ebr
623
- (shen-lazyderef X&&
624
- V1510)
625
- (shen-lazyderef X
626
- V1510)
627
- (shen-lazyderef Y
628
- V1510))
629
- V1510
630
- (freeze
631
- (shen-th* Z B
632
- (cons
633
- (cons X&&
634
- (cons :
635
- (cons A ())))
636
- V1509)
637
- V1510 V1511))))))))))
638
- (if (shen-pvar? V1451)
639
- (do
640
- (shen-bindv V1451 () V1510)
641
- (let Result
642
- (let Z (shen-newpv V1510)
643
- (let X&& (shen-newpv V1510)
644
- (do (shen-incinfs)
645
- (cut Throwcontrol V1510
646
- (freeze
647
- (bind X&&
648
- (shen-placeholder)
649
- V1510
650
- (freeze
651
- (bind Z
652
- (shen-ebr
653
- (shen-lazyderef X&&
654
- V1510)
655
- (shen-lazyderef X
656
- V1510)
657
- (shen-lazyderef Y
658
- V1510))
659
- V1510
660
- (freeze
661
- (shen-th* Z B
662
- (cons
663
- (cons X&&
664
- (cons :
665
- (cons A ())))
666
- V1509)
667
- V1510
668
- V1511))))))))))
669
- (do
670
- (shen-unbindv V1451 V1510)
671
- Result)))
672
- false))))
673
- (if (shen-pvar? V1450)
674
- (let B (shen-newpv V1510)
675
- (do
676
- (shen-bindv V1450 (cons B ())
677
- V1510)
678
- (let Result
679
- (let Z (shen-newpv V1510)
680
- (let X&& (shen-newpv V1510)
681
- (do (shen-incinfs)
682
- (cut Throwcontrol V1510
683
- (freeze
684
- (bind X&&
685
- (shen-placeholder) V1510
686
- (freeze
687
- (bind Z
688
- (shen-ebr
689
- (shen-lazyderef X&&
690
- V1510)
691
- (shen-lazyderef X
692
- V1510)
693
- (shen-lazyderef Y
694
- V1510))
695
- V1510
696
- (freeze
697
- (shen-th* Z B
698
- (cons
699
- (cons X&&
700
- (cons :
701
- (cons A ())))
702
- V1509)
703
- V1510
704
- V1511))))))))))
705
- (do (shen-unbindv V1450 V1510)
706
- Result))))
707
- false)))
708
- (if (shen-pvar? V1449)
709
- (do (shen-bindv V1449 --> V1510)
710
- (let Result
711
- (let V1452
712
- (shen-lazyderef (tl V1448)
713
- V1510)
714
- (if (cons? V1452)
715
- (let B (hd V1452)
716
- (let V1453
717
- (shen-lazyderef (tl V1452)
718
- V1510)
719
- (if (= () V1453)
720
- (let Z (shen-newpv V1510)
721
- (let X&& (shen-newpv V1510)
722
- (do (shen-incinfs)
723
- (cut Throwcontrol V1510
724
- (freeze
725
- (bind X&&
726
- (shen-placeholder)
727
- V1510
728
- (freeze
729
- (bind Z
730
- (shen-ebr
731
- (shen-lazyderef X&&
732
- V1510)
733
- (shen-lazyderef X
734
- V1510)
735
- (shen-lazyderef Y
736
- V1510))
737
- V1510
738
- (freeze
739
- (shen-th* Z B
740
- (cons
741
- (cons X&&
742
- (cons :
743
- (cons A ())))
744
- V1509)
745
- V1510
746
- V1511))))))))))
747
- (if (shen-pvar? V1453)
748
- (do
749
- (shen-bindv V1453 ()
750
- V1510)
751
- (let Result
752
- (let Z (shen-newpv V1510)
753
- (let X&&
754
- (shen-newpv V1510)
755
- (do (shen-incinfs)
756
- (cut Throwcontrol
757
- V1510
758
- (freeze
759
- (bind X&&
760
- (shen-placeholder)
761
- V1510
762
- (freeze
763
- (bind Z
764
- (shen-ebr
765
- (shen-lazyderef
766
- X&& V1510)
767
- (shen-lazyderef
768
- X V1510)
769
- (shen-lazyderef
770
- Y V1510))
771
- V1510
772
- (freeze
773
- (shen-th* Z B
774
- (cons
775
- (cons X&&
776
- (cons :
777
- (cons A
778
- ())))
779
- V1509)
780
- V1510
781
- V1511))))))))))
782
- (do
783
- (shen-unbindv V1453
784
- V1510)
785
- Result)))
786
- false))))
787
- (if (shen-pvar? V1452)
788
- (let B (shen-newpv V1510)
789
- (do
790
- (shen-bindv V1452
791
- (cons B ()) V1510)
792
- (let Result
793
- (let Z (shen-newpv V1510)
794
- (let X&&
795
- (shen-newpv V1510)
796
- (do (shen-incinfs)
797
- (cut Throwcontrol V1510
798
- (freeze
799
- (bind X&&
800
- (shen-placeholder)
801
- V1510
802
- (freeze
803
- (bind Z
804
- (shen-ebr
805
- (shen-lazyderef
806
- X&& V1510)
807
- (shen-lazyderef X
808
- V1510)
809
- (shen-lazyderef Y
810
- V1510))
811
- V1510
812
- (freeze
813
- (shen-th* Z B
814
- (cons
815
- (cons X&&
816
- (cons :
817
- (cons A ())))
818
- V1509)
819
- V1510
820
- V1511))))))))))
821
- (do
822
- (shen-unbindv V1452 V1510)
823
- Result))))
824
- false)))
825
- (do (shen-unbindv V1449 V1510)
826
- Result)))
827
- false)))
828
- (if (shen-pvar? V1448)
829
- (let B (shen-newpv V1510)
830
- (do
831
- (shen-bindv V1448
832
- (cons --> (cons B ())) V1510)
833
- (let Result
834
- (let Z (shen-newpv V1510)
835
- (let X&& (shen-newpv V1510)
836
- (do (shen-incinfs)
837
- (cut Throwcontrol V1510
838
- (freeze
839
- (bind X&& (shen-placeholder)
840
- V1510
841
- (freeze
842
- (bind Z
843
- (shen-ebr
844
- (shen-lazyderef X&&
845
- V1510)
846
- (shen-lazyderef X V1510)
847
- (shen-lazyderef Y V1510))
848
- V1510
849
- (freeze
850
- (shen-th* Z B
851
- (cons
852
- (cons X&&
853
- (cons :
854
- (cons A ())))
855
- V1509)
856
- V1510 V1511))))))))))
857
- (do (shen-unbindv V1448 V1510)
858
- Result))))
859
- false))))
860
- (if (shen-pvar? V1447)
861
- (let A (shen-newpv V1510)
862
- (let B (shen-newpv V1510)
863
- (do
864
- (shen-bindv V1447
865
- (cons A (cons --> (cons B ())))
866
- V1510)
867
- (let Result
868
- (let Z (shen-newpv V1510)
869
- (let X&& (shen-newpv V1510)
870
- (do (shen-incinfs)
871
- (cut Throwcontrol V1510
872
- (freeze
873
- (bind X&& (shen-placeholder)
874
- V1510
875
- (freeze
876
- (bind Z
877
- (shen-ebr
878
- (shen-lazyderef X&& V1510)
879
- (shen-lazyderef X V1510)
880
- (shen-lazyderef Y V1510))
881
- V1510
882
- (freeze
883
- (shen-th* Z B
884
- (cons
885
- (cons X&&
886
- (cons : (cons A ())))
887
- V1509)
888
- V1510 V1511))))))))))
889
- (do (shen-unbindv V1447 V1510)
890
- Result)))))
891
- false)))
892
- false)))
893
- false)))
894
- false))
895
- false))
896
- false))
897
- (if (= Case false)
898
- (let Case
899
- (let V1454 (shen-lazyderef V1507 V1510)
900
- (if (cons? V1454)
901
- (let V1455 (shen-lazyderef (hd V1454) V1510)
902
- (if (= let V1455)
903
- (let V1456 (shen-lazyderef (tl V1454) V1510)
904
- (if (cons? V1456)
905
- (let X (hd V1456)
906
- (let V1457 (shen-lazyderef (tl V1456) V1510)
907
- (if (cons? V1457)
908
- (let Y (hd V1457)
909
- (let V1458
910
- (shen-lazyderef (tl V1457) V1510)
911
- (if (cons? V1458)
912
- (let Z (hd V1458)
913
- (let V1459
914
- (shen-lazyderef (tl V1458) V1510)
915
- (if (= () V1459)
916
- (let W (shen-newpv V1510)
917
- (let X&& (shen-newpv V1510)
918
- (let B (shen-newpv V1510)
919
- (do (shen-incinfs)
920
- (cut Throwcontrol V1510
921
- (freeze
922
- (shen-th* Y B V1509 V1510
923
- (freeze
924
- (bind X&& (shen-placeholder)
925
- V1510
926
- (freeze
927
- (bind W
928
- (shen-ebr
929
- (shen-lazyderef X&& V1510)
930
- (shen-lazyderef X V1510)
931
- (shen-lazyderef Z V1510))
932
- V1510
933
- (freeze
934
- (shen-th* W V1508
935
- (cons
936
- (cons X&&
937
- (cons :
938
- (cons B ())))
939
- V1509)
940
- V1510 V1511)))))))))))))
941
- false)))
942
- false)))
943
- false)))
944
- false))
945
- false))
946
- false))
947
- (if (= Case false)
948
- (let Case
949
- (let V1460 (shen-lazyderef V1507 V1510)
950
- (if (cons? V1460)
951
- (let V1461 (shen-lazyderef (hd V1460) V1510)
952
- (if (= open V1461)
953
- (let V1462 (shen-lazyderef (tl V1460) V1510)
954
- (if (cons? V1462)
955
- (let V1463 (shen-lazyderef (hd V1462) V1510)
956
- (if (= file V1463)
957
- (let V1464
958
- (shen-lazyderef (tl V1462) V1510)
959
- (if (cons? V1464)
960
- (let FileName (hd V1464)
961
- (let V1465
962
- (shen-lazyderef (tl V1464) V1510)
963
- (if (cons? V1465)
964
- (let Direction1393 (hd V1465)
965
- (let V1466
966
- (shen-lazyderef (tl V1465) V1510)
967
- (if (= () V1466)
968
- (let V1467
969
- (shen-lazyderef V1508 V1510)
970
- (if (cons? V1467)
971
- (let V1468
972
- (shen-lazyderef (hd V1467)
973
- V1510)
974
- (if (= stream V1468)
975
- (let V1469
976
- (shen-lazyderef (tl V1467)
977
- V1510)
978
- (if (cons? V1469)
979
- (let Direction (hd V1469)
980
- (let V1470
981
- (shen-lazyderef (tl V1469)
982
- V1510)
983
- (if (= () V1470)
984
- (do (shen-incinfs)
985
- (unify! Direction
986
- Direction1393 V1510
987
- (freeze
988
- (cut Throwcontrol V1510
989
- (freeze
990
- (shen-th* FileName
991
- string V1509 V1510
992
- V1511))))))
993
- (if (shen-pvar? V1470)
994
- (do
995
- (shen-bindv V1470 ()
996
- V1510)
997
- (let Result
998
- (do (shen-incinfs)
999
- (unify! Direction
1000
- Direction1393 V1510
1001
- (freeze
1002
- (cut Throwcontrol
1003
- V1510
1004
- (freeze
1005
- (shen-th* FileName
1006
- string V1509
1007
- V1510 V1511))))))
1008
- (do
1009
- (shen-unbindv V1470
1010
- V1510)
1011
- Result)))
1012
- false))))
1013
- (if (shen-pvar? V1469)
1014
- (let Direction
1015
- (shen-newpv V1510)
1016
- (do
1017
- (shen-bindv V1469
1018
- (cons Direction ())
1019
- V1510)
1020
- (let Result
1021
- (do (shen-incinfs)
1022
- (unify! Direction
1023
- Direction1393 V1510
1024
- (freeze
1025
- (cut Throwcontrol
1026
- V1510
1027
- (freeze
1028
- (shen-th* FileName
1029
- string V1509 V1510
1030
- V1511))))))
1031
- (do
1032
- (shen-unbindv V1469
1033
- V1510)
1034
- Result))))
1035
- false)))
1036
- (if (shen-pvar? V1468)
1037
- (do
1038
- (shen-bindv V1468 stream
1039
- V1510)
1040
- (let Result
1041
- (let V1471
1042
- (shen-lazyderef (tl V1467)
1043
- V1510)
1044
- (if (cons? V1471)
1045
- (let Direction (hd V1471)
1046
- (let V1472
1047
- (shen-lazyderef
1048
- (tl V1471) V1510)
1049
- (if (= () V1472)
1050
- (do (shen-incinfs)
1051
- (unify! Direction
1052
- Direction1393 V1510
1053
- (freeze
1054
- (cut Throwcontrol
1055
- V1510
1056
- (freeze
1057
- (shen-th* FileName
1058
- string V1509
1059
- V1510 V1511))))))
1060
- (if (shen-pvar? V1472)
1061
- (do
1062
- (shen-bindv V1472 ()
1063
- V1510)
1064
- (let Result
1065
- (do (shen-incinfs)
1066
- (unify! Direction
1067
- Direction1393
1068
- V1510
1069
- (freeze
1070
- (cut Throwcontrol
1071
- V1510
1072
- (freeze
1073
- (shen-th*
1074
- FileName
1075
- string V1509
1076
- V1510
1077
- V1511))))))
1078
- (do
1079
- (shen-unbindv V1472
1080
- V1510)
1081
- Result)))
1082
- false))))
1083
- (if (shen-pvar? V1471)
1084
- (let Direction
1085
- (shen-newpv V1510)
1086
- (do
1087
- (shen-bindv V1471
1088
- (cons Direction ())
1089
- V1510)
1090
- (let Result
1091
- (do (shen-incinfs)
1092
- (unify! Direction
1093
- Direction1393 V1510
1094
- (freeze
1095
- (cut Throwcontrol
1096
- V1510
1097
- (freeze
1098
- (shen-th*
1099
- FileName string
1100
- V1509 V1510
1101
- V1511))))))
1102
- (do
1103
- (shen-unbindv V1471
1104
- V1510)
1105
- Result))))
1106
- false)))
1107
- (do
1108
- (shen-unbindv V1468 V1510)
1109
- Result)))
1110
- false)))
1111
- (if (shen-pvar? V1467)
1112
- (let Direction
1113
- (shen-newpv V1510)
1114
- (do
1115
- (shen-bindv V1467
1116
- (cons stream
1117
- (cons Direction ()))
1118
- V1510)
1119
- (let Result
1120
- (do (shen-incinfs)
1121
- (unify! Direction
1122
- Direction1393 V1510
1123
- (freeze
1124
- (cut Throwcontrol V1510
1125
- (freeze
1126
- (shen-th* FileName
1127
- string V1509 V1510
1128
- V1511))))))
1129
- (do
1130
- (shen-unbindv V1467 V1510)
1131
- Result))))
1132
- false)))
1133
- false)))
1134
- false)))
1135
- false))
1136
- false))
1137
- false))
1138
- false))
1139
- false))
1140
- (if (= Case false)
1141
- (let Case
1142
- (let V1473 (shen-lazyderef V1507 V1510)
1143
- (if (cons? V1473)
1144
- (let V1474 (shen-lazyderef (hd V1473) V1510)
1145
- (if (= type V1474)
1146
- (let V1475 (shen-lazyderef (tl V1473) V1510)
1147
- (if (cons? V1475)
1148
- (let X (hd V1475)
1149
- (let V1476
1150
- (shen-lazyderef (tl V1475) V1510)
1151
- (if (cons? V1476)
1152
- (let A (hd V1476)
1153
- (let V1477
1154
- (shen-lazyderef (tl V1476) V1510)
1155
- (if (= () V1477)
1156
- (do (shen-incinfs)
1157
- (cut Throwcontrol V1510
1158
- (freeze
1159
- (unify A V1508 V1510
1160
- (freeze
1161
- (shen-th* X A V1509 V1510
1162
- V1511))))))
1163
- false)))
1164
- false)))
1165
- false))
1166
- false))
1167
- false))
1168
- (if (= Case false)
1169
- (let Case
1170
- (let V1478 (shen-lazyderef V1507 V1510)
1171
- (if (cons? V1478)
1172
- (let V1479 (shen-lazyderef (hd V1478) V1510)
1173
- (if (= input+ V1479)
1174
- (let V1480
1175
- (shen-lazyderef (tl V1478) V1510)
1176
- (if (cons? V1480)
1177
- (let V1481
1178
- (shen-lazyderef (hd V1480) V1510)
1179
- (if (= : V1481)
1180
- (let V1482
1181
- (shen-lazyderef (tl V1480) V1510)
1182
- (if (cons? V1482)
1183
- (let A (hd V1482)
1184
- (let V1483
1185
- (shen-lazyderef (tl V1482) V1510)
1186
- (if (= () V1483)
1187
- (let C (shen-newpv V1510)
1188
- (do (shen-incinfs)
1189
- (bind C
1190
- (shen-normalise-type
1191
- (shen-lazyderef A V1510))
1192
- V1510
1193
- (freeze
1194
- (unify V1508 C V1510
1195
- V1511)))))
1196
- false)))
1197
- false))
1198
- false))
1199
- false))
1200
- false))
1201
- false))
1202
- (if (= Case false)
1203
- (let Case
1204
- (let V1484 (shen-lazyderef V1507 V1510)
1205
- (if (cons? V1484)
1206
- (let V1485
1207
- (shen-lazyderef (hd V1484) V1510)
1208
- (if (= where V1485)
1209
- (let V1486
1210
- (shen-lazyderef (tl V1484) V1510)
1211
- (if (cons? V1486)
1212
- (let P (hd V1486)
1213
- (let V1487
1214
- (shen-lazyderef (tl V1486) V1510)
1215
- (if (cons? V1487)
1216
- (let X (hd V1487)
1217
- (let V1488
1218
- (shen-lazyderef (tl V1487) V1510)
1219
- (if (= () V1488)
1220
- (do (shen-incinfs)
1221
- (cut Throwcontrol V1510
1222
- (freeze
1223
- (shen-th* P boolean V1509
1224
- V1510
1225
- (freeze
1226
- (cut Throwcontrol V1510
1227
- (freeze
1228
- (shen-th* X V1508
1229
- (cons
1230
- (cons P
1231
- (cons :
1232
- (cons verified ())))
1233
- V1509)
1234
- V1510 V1511))))))))
1235
- false)))
1236
- false)))
1237
- false))
1238
- false))
1239
- false))
1240
- (if (= Case false)
1241
- (let Case
1242
- (let V1489 (shen-lazyderef V1507 V1510)
1243
- (if (cons? V1489)
1244
- (let V1490
1245
- (shen-lazyderef (hd V1489) V1510)
1246
- (if (= set V1490)
1247
- (let V1491
1248
- (shen-lazyderef (tl V1489) V1510)
1249
- (if (cons? V1491)
1250
- (let Var (hd V1491)
1251
- (let V1492
1252
- (shen-lazyderef (tl V1491) V1510)
1253
- (if (cons? V1492)
1254
- (let Val (hd V1492)
1255
- (let V1493
1256
- (shen-lazyderef (tl V1492)
1257
- V1510)
1258
- (if (= () V1493)
1259
- (do (shen-incinfs)
1260
- (cut Throwcontrol V1510
1261
- (freeze
1262
- (shen-th*
1263
- (cons value (cons Var ()))
1264
- V1508 V1509 V1510
1265
- (freeze
1266
- (shen-th* Val V1508 V1509
1267
- V1510 V1511))))))
1268
- false)))
1269
- false)))
1270
- false))
1271
- false))
1272
- false))
1273
- (if (= Case false)
1274
- (let Case
1275
- (let V1494 (shen-lazyderef V1507 V1510)
1276
- (if (cons? V1494)
1277
- (let V1495
1278
- (shen-lazyderef (hd V1494) V1510)
1279
- (if (= fail V1495)
1280
- (let V1496
1281
- (shen-lazyderef (tl V1494) V1510)
1282
- (if (= () V1496)
1283
- (let V1497
1284
- (shen-lazyderef V1508 V1510)
1285
- (if (= symbol V1497)
1286
- (do (shen-incinfs) (thaw V1511))
1287
- (if (shen-pvar? V1497)
1288
- (do
1289
- (shen-bindv V1497 symbol V1510)
1290
- (let Result
1291
- (do (shen-incinfs)
1292
- (thaw V1511))
1293
- (do (shen-unbindv V1497 V1510)
1294
- Result)))
1295
- false)))
1296
- false))
1297
- false))
1298
- false))
1299
- (if (= Case false)
1300
- (let Case
1301
- (let NewHyp (shen-newpv V1510)
1302
- (do (shen-incinfs)
1303
- (shen-t*-hyps V1509 NewHyp V1510
1304
- (freeze
1305
- (shen-th* V1507 V1508 NewHyp V1510
1306
- V1511)))))
1307
- (if (= Case false)
1308
- (let Case
1309
- (let V1498
1310
- (shen-lazyderef V1507 V1510)
1311
- (if (cons? V1498)
1312
- (let V1499
1313
- (shen-lazyderef (hd V1498) V1510)
1314
- (if (= define V1499)
1315
- (let V1500
1316
- (shen-lazyderef (tl V1498)
1317
- V1510)
1318
- (if (cons? V1500)
1319
- (let F (hd V1500)
1320
- (let X (tl V1500)
1321
- (do (shen-incinfs)
1322
- (cut Throwcontrol V1510
1323
- (freeze
1324
- (shen-t*-def
1325
- (cons define (cons F X))
1326
- V1508 V1509 V1510
1327
- V1511))))))
1328
- false))
1329
- false))
1330
- false))
1331
- (if (= Case false)
1332
- (let Case
1333
- (let V1501
1334
- (shen-lazyderef V1507 V1510)
1335
- (if (cons? V1501)
1336
- (let V1502
1337
- (shen-lazyderef (hd V1501)
1338
- V1510)
1339
- (if
1340
- (= shen-process-datatype V1502)
1341
- (let V1503
1342
- (shen-lazyderef V1508 V1510)
1343
- (if (= symbol V1503)
1344
- (do (shen-incinfs)
1345
- (thaw V1511))
1346
- (if (shen-pvar? V1503)
1347
- (do
1348
- (shen-bindv V1503 symbol
1349
- V1510)
1350
- (let Result
1351
- (do (shen-incinfs)
1352
- (thaw V1511))
1353
- (do
1354
- (shen-unbindv V1503
1355
- V1510)
1356
- Result)))
1357
- false)))
1358
- false))
1359
- false))
1360
- (if (= Case false)
1361
- (let Case
1362
- (let V1504
1363
- (shen-lazyderef V1507 V1510)
1364
- (if (cons? V1504)
1365
- (let V1505
1366
- (shen-lazyderef (hd V1504)
1367
- V1510)
1368
- (if
1369
- (= shen-synonyms-help V1505)
1370
- (let V1506
1371
- (shen-lazyderef V1508 V1510)
1372
- (if (= symbol V1506)
1373
- (do (shen-incinfs)
1374
- (thaw V1511))
1375
- (if (shen-pvar? V1506)
1376
- (do
1377
- (shen-bindv V1506 symbol
1378
- V1510)
1379
- (let Result
1380
- (do (shen-incinfs)
1381
- (thaw V1511))
1382
- (do
1383
- (shen-unbindv V1506
1384
- V1510)
1385
- Result)))
1386
- false)))
1387
- false))
1388
- false))
1389
- (if (= Case false)
1390
- (let Datatypes
1391
- (shen-newpv V1510)
1392
- (do (shen-incinfs)
1393
- (bind Datatypes
1394
- (value shen-*datatypes*)
1395
- V1510
1396
- (freeze
1397
- (shen-udefs*
1398
- (cons V1507
1399
- (cons :
1400
- (cons V1508 ())))
1401
- V1509 Datatypes V1510
1402
- V1511)))))
1403
- Case))
1404
- Case))
1405
- Case))
1406
- Case))
1407
- Case))
1408
- Case))
1409
- Case))
1410
- Case))
1411
- Case))
1412
- Case))
1413
- Case))
1414
- Case))
1415
- Case))
1416
- Case))
1417
- Case))
1418
- Case))
1419
- Case))
1420
- Case))
1421
- Case))
1422
- Case))
1423
- Case))
1424
- Case)))))
109
+ (defun shen.t*-def (V2840 V2841 V2842 V2843 V2844) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let V2506 (shen.lazyderef V2840 V2843) (if (cons? V2506) (let V2507 (shen.lazyderef (hd V2506) V2843) (if (= define V2507) (let V2508 (shen.lazyderef (tl V2506) V2843) (if (cons? V2508) (let F (hd V2508) (let X (tl V2508) (let Error (shen.newpv V2843) (let Sig+Rules (shen.newpv V2843) (let Vars (shen.newpv V2843) (let Rules (shen.newpv V2843) (let Sig&& (shen.newpv V2843) (let Declare (shen.newpv V2843) (let Sig (shen.newpv V2843) (do (shen.incinfs) (bind Sig+Rules (compile shen.<sig+rules> (shen.lazyderef X V2843) ()) V2843 (freeze (bind Error (if (= (shen.lazyderef Sig+Rules V2843) (fail)) (shen.errordef (shen.lazyderef F V2843)) shen.skip) V2843 (freeze (bind Sig (hd (shen.lazyderef Sig+Rules V2843)) V2843 (freeze (bind Rules (tl (shen.lazyderef Sig+Rules V2843)) V2843 (freeze (bind Vars (shen.extract_vars (shen.lazyderef Sig V2843)) V2843 (freeze (bind Sig&& (shen.placeholders (shen.lazyderef Sig V2843) (shen.lazyderef Vars V2843)) V2843 (freeze (cut Throwcontrol V2843 (freeze (shen.t*-rules Rules Sig&& 1 F (cons (cons F (cons : (cons Sig&& ()))) V2842) V2843 (freeze (bind Declare (declare (shen.lazyderef F V2843) (shen.lazyderef Sig V2843)) V2843 (freeze (unify! V2841 Sig V2843 V2844))))))))))))))))))))))))))))) false)) false)) false)))))
1425
110
 
1426
- (defun shen-t*-hyps (V783 V784 V785 V786)
1427
- (let Case
1428
- (let V549 (shen-lazyderef V783 V785)
1429
- (if (cons? V549)
1430
- (let V550 (shen-lazyderef (hd V549) V785)
1431
- (if (cons? V550)
1432
- (let V551 (shen-lazyderef (hd V550) V785)
1433
- (if (cons? V551)
1434
- (let V552 (shen-lazyderef (hd V551) V785)
1435
- (if (= cons V552)
1436
- (let V553 (shen-lazyderef (tl V551) V785)
1437
- (if (cons? V553)
1438
- (let X (hd V553)
1439
- (let V554 (shen-lazyderef (tl V553) V785)
1440
- (if (cons? V554)
1441
- (let Y (hd V554)
1442
- (let V555 (shen-lazyderef (tl V554) V785)
1443
- (if (= () V555)
1444
- (let V556 (shen-lazyderef (tl V550) V785)
1445
- (if (cons? V556)
1446
- (let V557 (shen-lazyderef (hd V556) V785)
1447
- (if (= : V557)
1448
- (let V558 (shen-lazyderef (tl V556) V785)
1449
- (if (cons? V558)
1450
- (let V559 (shen-lazyderef (hd V558) V785)
1451
- (if (cons? V559)
1452
- (let V560 (shen-lazyderef (hd V559) V785)
1453
- (if (= list V560)
1454
- (let V561 (shen-lazyderef (tl V559) V785)
1455
- (if (cons? V561)
1456
- (let A (hd V561)
1457
- (let V562 (shen-lazyderef (tl V561) V785)
1458
- (if (= () V562)
1459
- (let V563 (shen-lazyderef (tl V558) V785)
1460
- (if (= () V563)
1461
- (let Hyp (tl V549)
1462
- (do (shen-incinfs)
1463
- (bind V784
1464
- (cons
1465
- (cons (shen-lazyderef X V785)
1466
- (cons :
1467
- (cons (shen-lazyderef A V785) ())))
1468
- (cons
1469
- (cons (shen-lazyderef Y V785)
1470
- (cons :
1471
- (cons
1472
- (cons list
1473
- (cons (shen-lazyderef A V785) ()))
1474
- ())))
1475
- (shen-lazyderef Hyp V785)))
1476
- V785 V786)))
1477
- (if (shen-pvar? V563)
1478
- (do (shen-bindv V563 () V785)
1479
- (let Result
1480
- (let Hyp (tl V549)
1481
- (do (shen-incinfs)
1482
- (bind V784
1483
- (cons
1484
- (cons (shen-lazyderef X V785)
1485
- (cons :
1486
- (cons (shen-lazyderef A V785)
1487
- ())))
1488
- (cons
1489
- (cons (shen-lazyderef Y V785)
1490
- (cons :
1491
- (cons
1492
- (cons list
1493
- (cons (shen-lazyderef A V785)
1494
- ()))
1495
- ())))
1496
- (shen-lazyderef Hyp V785)))
1497
- V785 V786)))
1498
- (do (shen-unbindv V563 V785) Result)))
1499
- false)))
1500
- (if (shen-pvar? V562)
1501
- (do (shen-bindv V562 () V785)
1502
- (let Result
1503
- (let V564 (shen-lazyderef (tl V558) V785)
1504
- (if (= () V564)
1505
- (let Hyp (tl V549)
1506
- (do (shen-incinfs)
1507
- (bind V784
1508
- (cons
1509
- (cons (shen-lazyderef X V785)
1510
- (cons :
1511
- (cons (shen-lazyderef A V785)
1512
- ())))
1513
- (cons
1514
- (cons (shen-lazyderef Y V785)
1515
- (cons :
1516
- (cons
1517
- (cons list
1518
- (cons (shen-lazyderef A V785)
1519
- ()))
1520
- ())))
1521
- (shen-lazyderef Hyp V785)))
1522
- V785 V786)))
1523
- (if (shen-pvar? V564)
1524
- (do (shen-bindv V564 () V785)
1525
- (let Result
1526
- (let Hyp (tl V549)
1527
- (do (shen-incinfs)
1528
- (bind V784
1529
- (cons
1530
- (cons (shen-lazyderef X V785)
1531
- (cons :
1532
- (cons (shen-lazyderef A V785)
1533
- ())))
1534
- (cons
1535
- (cons (shen-lazyderef Y V785)
1536
- (cons :
1537
- (cons
1538
- (cons list
1539
- (cons (shen-lazyderef A V785)
1540
- ()))
1541
- ())))
1542
- (shen-lazyderef Hyp V785)))
1543
- V785 V786)))
1544
- (do (shen-unbindv V564 V785) Result)))
1545
- false)))
1546
- (do (shen-unbindv V562 V785) Result)))
1547
- false))))
1548
- (if (shen-pvar? V561)
1549
- (let A (shen-newpv V785)
1550
- (do (shen-bindv V561 (cons A ()) V785)
1551
- (let Result
1552
- (let V565 (shen-lazyderef (tl V558) V785)
1553
- (if (= () V565)
1554
- (let Hyp (tl V549)
1555
- (do (shen-incinfs)
1556
- (bind V784
1557
- (cons
1558
- (cons (shen-lazyderef X V785)
1559
- (cons :
1560
- (cons (shen-lazyderef A V785) ())))
1561
- (cons
1562
- (cons (shen-lazyderef Y V785)
1563
- (cons :
1564
- (cons
1565
- (cons list
1566
- (cons (shen-lazyderef A V785)
1567
- ()))
1568
- ())))
1569
- (shen-lazyderef Hyp V785)))
1570
- V785 V786)))
1571
- (if (shen-pvar? V565)
1572
- (do (shen-bindv V565 () V785)
1573
- (let Result
1574
- (let Hyp (tl V549)
1575
- (do (shen-incinfs)
1576
- (bind V784
1577
- (cons
1578
- (cons (shen-lazyderef X V785)
1579
- (cons :
1580
- (cons (shen-lazyderef A V785)
1581
- ())))
1582
- (cons
1583
- (cons (shen-lazyderef Y V785)
1584
- (cons :
1585
- (cons
1586
- (cons list
1587
- (cons (shen-lazyderef A V785)
1588
- ()))
1589
- ())))
1590
- (shen-lazyderef Hyp V785)))
1591
- V785 V786)))
1592
- (do (shen-unbindv V565 V785) Result)))
1593
- false)))
1594
- (do (shen-unbindv V561 V785) Result))))
1595
- false)))
1596
- (if (shen-pvar? V560)
1597
- (do (shen-bindv V560 list V785)
1598
- (let Result
1599
- (let V566 (shen-lazyderef (tl V559) V785)
1600
- (if (cons? V566)
1601
- (let A (hd V566)
1602
- (let V567 (shen-lazyderef (tl V566) V785)
1603
- (if (= () V567)
1604
- (let V568 (shen-lazyderef (tl V558) V785)
1605
- (if (= () V568)
1606
- (let Hyp (tl V549)
1607
- (do (shen-incinfs)
1608
- (bind V784
1609
- (cons
1610
- (cons (shen-lazyderef X V785)
1611
- (cons :
1612
- (cons (shen-lazyderef A V785)
1613
- ())))
1614
- (cons
1615
- (cons (shen-lazyderef Y V785)
1616
- (cons :
1617
- (cons
1618
- (cons list
1619
- (cons (shen-lazyderef A V785)
1620
- ()))
1621
- ())))
1622
- (shen-lazyderef Hyp V785)))
1623
- V785 V786)))
1624
- (if (shen-pvar? V568)
1625
- (do (shen-bindv V568 () V785)
1626
- (let Result
1627
- (let Hyp (tl V549)
1628
- (do (shen-incinfs)
1629
- (bind V784
1630
- (cons
1631
- (cons (shen-lazyderef X V785)
1632
- (cons :
1633
- (cons (shen-lazyderef A V785)
1634
- ())))
1635
- (cons
1636
- (cons (shen-lazyderef Y V785)
1637
- (cons :
1638
- (cons
1639
- (cons list
1640
- (cons (shen-lazyderef A V785)
1641
- ()))
1642
- ())))
1643
- (shen-lazyderef Hyp V785)))
1644
- V785 V786)))
1645
- (do (shen-unbindv V568 V785) Result)))
1646
- false)))
1647
- (if (shen-pvar? V567)
1648
- (do (shen-bindv V567 () V785)
1649
- (let Result
1650
- (let V569
1651
- (shen-lazyderef (tl V558) V785)
1652
- (if (= () V569)
1653
- (let Hyp (tl V549)
1654
- (do (shen-incinfs)
1655
- (bind V784
1656
- (cons
1657
- (cons (shen-lazyderef X V785)
1658
- (cons :
1659
- (cons (shen-lazyderef A V785)
1660
- ())))
1661
- (cons
1662
- (cons (shen-lazyderef Y V785)
1663
- (cons :
1664
- (cons
1665
- (cons list
1666
- (cons (shen-lazyderef A V785)
1667
- ()))
1668
- ())))
1669
- (shen-lazyderef Hyp V785)))
1670
- V785 V786)))
1671
- (if (shen-pvar? V569)
1672
- (do (shen-bindv V569 () V785)
1673
- (let Result
1674
- (let Hyp (tl V549)
1675
- (do (shen-incinfs)
1676
- (bind V784
1677
- (cons
1678
- (cons (shen-lazyderef X V785)
1679
- (cons :
1680
- (cons (shen-lazyderef A V785)
1681
- ())))
1682
- (cons
1683
- (cons (shen-lazyderef Y V785)
1684
- (cons :
1685
- (cons
1686
- (cons list
1687
- (cons
1688
- (shen-lazyderef A V785)
1689
- ()))
1690
- ())))
1691
- (shen-lazyderef Hyp V785)))
1692
- V785 V786)))
1693
- (do (shen-unbindv V569 V785)
1694
- Result)))
1695
- false)))
1696
- (do (shen-unbindv V567 V785) Result)))
1697
- false))))
1698
- (if (shen-pvar? V566)
1699
- (let A (shen-newpv V785)
1700
- (do (shen-bindv V566 (cons A ()) V785)
1701
- (let Result
1702
- (let V570 (shen-lazyderef (tl V558) V785)
1703
- (if (= () V570)
1704
- (let Hyp (tl V549)
1705
- (do (shen-incinfs)
1706
- (bind V784
1707
- (cons
1708
- (cons (shen-lazyderef X V785)
1709
- (cons :
1710
- (cons (shen-lazyderef A V785)
1711
- ())))
1712
- (cons
1713
- (cons (shen-lazyderef Y V785)
1714
- (cons :
1715
- (cons
1716
- (cons list
1717
- (cons (shen-lazyderef A V785)
1718
- ()))
1719
- ())))
1720
- (shen-lazyderef Hyp V785)))
1721
- V785 V786)))
1722
- (if (shen-pvar? V570)
1723
- (do (shen-bindv V570 () V785)
1724
- (let Result
1725
- (let Hyp (tl V549)
1726
- (do (shen-incinfs)
1727
- (bind V784
1728
- (cons
1729
- (cons (shen-lazyderef X V785)
1730
- (cons :
1731
- (cons (shen-lazyderef A V785)
1732
- ())))
1733
- (cons
1734
- (cons (shen-lazyderef Y V785)
1735
- (cons :
1736
- (cons
1737
- (cons list
1738
- (cons
1739
- (shen-lazyderef A V785)
1740
- ()))
1741
- ())))
1742
- (shen-lazyderef Hyp V785)))
1743
- V785 V786)))
1744
- (do (shen-unbindv V570 V785)
1745
- Result)))
1746
- false)))
1747
- (do (shen-unbindv V566 V785) Result))))
1748
- false)))
1749
- (do (shen-unbindv V560 V785) Result)))
1750
- false)))
1751
- (if (shen-pvar? V559)
1752
- (let A (shen-newpv V785)
1753
- (do (shen-bindv V559 (cons list (cons A ())) V785)
1754
- (let Result
1755
- (let V571 (shen-lazyderef (tl V558) V785)
1756
- (if (= () V571)
1757
- (let Hyp (tl V549)
1758
- (do (shen-incinfs)
1759
- (bind V784
1760
- (cons
1761
- (cons (shen-lazyderef X V785)
1762
- (cons :
1763
- (cons (shen-lazyderef A V785) ())))
1764
- (cons
1765
- (cons (shen-lazyderef Y V785)
1766
- (cons :
1767
- (cons
1768
- (cons list
1769
- (cons (shen-lazyderef A V785) ()))
1770
- ())))
1771
- (shen-lazyderef Hyp V785)))
1772
- V785 V786)))
1773
- (if (shen-pvar? V571)
1774
- (do (shen-bindv V571 () V785)
1775
- (let Result
1776
- (let Hyp (tl V549)
1777
- (do (shen-incinfs)
1778
- (bind V784
1779
- (cons
1780
- (cons (shen-lazyderef X V785)
1781
- (cons :
1782
- (cons (shen-lazyderef A V785) ())))
1783
- (cons
1784
- (cons (shen-lazyderef Y V785)
1785
- (cons :
1786
- (cons
1787
- (cons list
1788
- (cons (shen-lazyderef A V785) ()))
1789
- ())))
1790
- (shen-lazyderef Hyp V785)))
1791
- V785 V786)))
1792
- (do (shen-unbindv V571 V785) Result)))
1793
- false)))
1794
- (do (shen-unbindv V559 V785) Result))))
1795
- false)))
1796
- false))
1797
- false))
1798
- false))
1799
- false)))
1800
- false)))
1801
- false))
1802
- false))
1803
- false))
1804
- false))
1805
- false))
1806
- (if (= Case false)
1807
- (let Case
1808
- (let V572 (shen-lazyderef V783 V785)
1809
- (if (cons? V572)
1810
- (let V573 (shen-lazyderef (hd V572) V785)
1811
- (if (cons? V573)
1812
- (let V574 (shen-lazyderef (hd V573) V785)
1813
- (if (cons? V574)
1814
- (let V575 (shen-lazyderef (hd V574) V785)
1815
- (if (= @p V575)
1816
- (let V576 (shen-lazyderef (tl V574) V785)
1817
- (if (cons? V576)
1818
- (let X (hd V576)
1819
- (let V577 (shen-lazyderef (tl V576) V785)
1820
- (if (cons? V577)
1821
- (let Y (hd V577)
1822
- (let V578 (shen-lazyderef (tl V577) V785)
1823
- (if (= () V578)
1824
- (let V579 (shen-lazyderef (tl V573) V785)
1825
- (if (cons? V579)
1826
- (let V580 (shen-lazyderef (hd V579) V785)
1827
- (if (= : V580)
1828
- (let V581 (shen-lazyderef (tl V579) V785)
1829
- (if (cons? V581)
1830
- (let V582 (shen-lazyderef (hd V581) V785)
1831
- (if (cons? V582)
1832
- (let A (hd V582)
1833
- (let V583 (shen-lazyderef (tl V582) V785)
1834
- (if (cons? V583)
1835
- (let V584 (shen-lazyderef (hd V583) V785)
1836
- (if (= * V584)
1837
- (let V585 (shen-lazyderef (tl V583) V785)
1838
- (if (cons? V585)
1839
- (let B (hd V585)
1840
- (let V586 (shen-lazyderef (tl V585) V785)
1841
- (if (= () V586)
1842
- (let V587 (shen-lazyderef (tl V581) V785)
1843
- (if (= () V587)
1844
- (let Hyp (tl V572)
1845
- (do (shen-incinfs)
1846
- (bind V784
1847
- (cons
1848
- (cons (shen-lazyderef X V785)
1849
- (cons :
1850
- (cons (shen-lazyderef A V785)
1851
- ())))
1852
- (cons
1853
- (cons (shen-lazyderef Y V785)
1854
- (cons :
1855
- (cons (shen-lazyderef B V785)
1856
- ())))
1857
- (shen-lazyderef Hyp V785)))
1858
- V785 V786)))
1859
- (if (shen-pvar? V587)
1860
- (do (shen-bindv V587 () V785)
1861
- (let Result
1862
- (let Hyp (tl V572)
1863
- (do (shen-incinfs)
1864
- (bind V784
1865
- (cons
1866
- (cons (shen-lazyderef X V785)
1867
- (cons :
1868
- (cons (shen-lazyderef A V785)
1869
- ())))
1870
- (cons
1871
- (cons (shen-lazyderef Y V785)
1872
- (cons :
1873
- (cons (shen-lazyderef B V785)
1874
- ())))
1875
- (shen-lazyderef Hyp V785)))
1876
- V785 V786)))
1877
- (do (shen-unbindv V587 V785)
1878
- Result)))
1879
- false)))
1880
- (if (shen-pvar? V586)
1881
- (do (shen-bindv V586 () V785)
1882
- (let Result
1883
- (let V588
1884
- (shen-lazyderef (tl V581) V785)
1885
- (if (= () V588)
1886
- (let Hyp (tl V572)
1887
- (do (shen-incinfs)
1888
- (bind V784
1889
- (cons
1890
- (cons (shen-lazyderef X V785)
1891
- (cons :
1892
- (cons (shen-lazyderef A V785)
1893
- ())))
1894
- (cons
1895
- (cons (shen-lazyderef Y V785)
1896
- (cons :
1897
- (cons (shen-lazyderef B V785)
1898
- ())))
1899
- (shen-lazyderef Hyp V785)))
1900
- V785 V786)))
1901
- (if (shen-pvar? V588)
1902
- (do (shen-bindv V588 () V785)
1903
- (let Result
1904
- (let Hyp (tl V572)
1905
- (do (shen-incinfs)
1906
- (bind V784
1907
- (cons
1908
- (cons (shen-lazyderef X V785)
1909
- (cons :
1910
- (cons
1911
- (shen-lazyderef A V785)
1912
- ())))
1913
- (cons
1914
- (cons
1915
- (shen-lazyderef Y V785)
1916
- (cons :
1917
- (cons
1918
- (shen-lazyderef B V785)
1919
- ())))
1920
- (shen-lazyderef Hyp V785)))
1921
- V785 V786)))
1922
- (do (shen-unbindv V588 V785)
1923
- Result)))
1924
- false)))
1925
- (do (shen-unbindv V586 V785) Result)))
1926
- false))))
1927
- (if (shen-pvar? V585)
1928
- (let B (shen-newpv V785)
1929
- (do (shen-bindv V585 (cons B ()) V785)
1930
- (let Result
1931
- (let V589
1932
- (shen-lazyderef (tl V581) V785)
1933
- (if (= () V589)
1934
- (let Hyp (tl V572)
1935
- (do (shen-incinfs)
1936
- (bind V784
1937
- (cons
1938
- (cons (shen-lazyderef X V785)
1939
- (cons :
1940
- (cons (shen-lazyderef A V785)
1941
- ())))
1942
- (cons
1943
- (cons (shen-lazyderef Y V785)
1944
- (cons :
1945
- (cons (shen-lazyderef B V785)
1946
- ())))
1947
- (shen-lazyderef Hyp V785)))
1948
- V785 V786)))
1949
- (if (shen-pvar? V589)
1950
- (do (shen-bindv V589 () V785)
1951
- (let Result
1952
- (let Hyp (tl V572)
1953
- (do (shen-incinfs)
1954
- (bind V784
1955
- (cons
1956
- (cons (shen-lazyderef X V785)
1957
- (cons :
1958
- (cons (shen-lazyderef A V785)
1959
- ())))
1960
- (cons
1961
- (cons (shen-lazyderef Y V785)
1962
- (cons :
1963
- (cons
1964
- (shen-lazyderef B V785)
1965
- ())))
1966
- (shen-lazyderef Hyp V785)))
1967
- V785 V786)))
1968
- (do (shen-unbindv V589 V785)
1969
- Result)))
1970
- false)))
1971
- (do (shen-unbindv V585 V785) Result))))
1972
- false)))
1973
- (if (shen-pvar? V584)
1974
- (do (shen-bindv V584 * V785)
1975
- (let Result
1976
- (let V590 (shen-lazyderef (tl V583) V785)
1977
- (if (cons? V590)
1978
- (let B (hd V590)
1979
- (let V591
1980
- (shen-lazyderef (tl V590) V785)
1981
- (if (= () V591)
1982
- (let V592
1983
- (shen-lazyderef (tl V581) V785)
1984
- (if (= () V592)
1985
- (let Hyp (tl V572)
1986
- (do (shen-incinfs)
1987
- (bind V784
1988
- (cons
1989
- (cons (shen-lazyderef X V785)
1990
- (cons :
1991
- (cons (shen-lazyderef A V785)
1992
- ())))
1993
- (cons
1994
- (cons (shen-lazyderef Y V785)
1995
- (cons :
1996
- (cons (shen-lazyderef B V785)
1997
- ())))
1998
- (shen-lazyderef Hyp V785)))
1999
- V785 V786)))
2000
- (if (shen-pvar? V592)
2001
- (do (shen-bindv V592 () V785)
2002
- (let Result
2003
- (let Hyp (tl V572)
2004
- (do (shen-incinfs)
2005
- (bind V784
2006
- (cons
2007
- (cons (shen-lazyderef X V785)
2008
- (cons :
2009
- (cons
2010
- (shen-lazyderef A V785)
2011
- ())))
2012
- (cons
2013
- (cons
2014
- (shen-lazyderef Y V785)
2015
- (cons :
2016
- (cons
2017
- (shen-lazyderef B V785)
2018
- ())))
2019
- (shen-lazyderef Hyp V785)))
2020
- V785 V786)))
2021
- (do (shen-unbindv V592 V785)
2022
- Result)))
2023
- false)))
2024
- (if (shen-pvar? V591)
2025
- (do (shen-bindv V591 () V785)
2026
- (let Result
2027
- (let V593
2028
- (shen-lazyderef (tl V581) V785)
2029
- (if (= () V593)
2030
- (let Hyp (tl V572)
2031
- (do (shen-incinfs)
2032
- (bind V784
2033
- (cons
2034
- (cons (shen-lazyderef X V785)
2035
- (cons :
2036
- (cons
2037
- (shen-lazyderef A V785)
2038
- ())))
2039
- (cons
2040
- (cons
2041
- (shen-lazyderef Y V785)
2042
- (cons :
2043
- (cons
2044
- (shen-lazyderef B V785)
2045
- ())))
2046
- (shen-lazyderef Hyp V785)))
2047
- V785 V786)))
2048
- (if (shen-pvar? V593)
2049
- (do (shen-bindv V593 () V785)
2050
- (let Result
2051
- (let Hyp (tl V572)
2052
- (do (shen-incinfs)
2053
- (bind V784
2054
- (cons
2055
- (cons
2056
- (shen-lazyderef X V785)
2057
- (cons :
2058
- (cons
2059
- (shen-lazyderef A V785)
2060
- ())))
2061
- (cons
2062
- (cons
2063
- (shen-lazyderef Y V785)
2064
- (cons :
2065
- (cons
2066
- (shen-lazyderef B
2067
- V785)
2068
- ())))
2069
- (shen-lazyderef Hyp
2070
- V785)))
2071
- V785 V786)))
2072
- (do (shen-unbindv V593 V785)
2073
- Result)))
2074
- false)))
2075
- (do (shen-unbindv V591 V785)
2076
- Result)))
2077
- false))))
2078
- (if (shen-pvar? V590)
2079
- (let B (shen-newpv V785)
2080
- (do (shen-bindv V590 (cons B ()) V785)
2081
- (let Result
2082
- (let V594
2083
- (shen-lazyderef (tl V581) V785)
2084
- (if (= () V594)
2085
- (let Hyp (tl V572)
2086
- (do (shen-incinfs)
2087
- (bind V784
2088
- (cons
2089
- (cons (shen-lazyderef X V785)
2090
- (cons :
2091
- (cons (shen-lazyderef A V785)
2092
- ())))
2093
- (cons
2094
- (cons (shen-lazyderef Y V785)
2095
- (cons :
2096
- (cons
2097
- (shen-lazyderef B V785)
2098
- ())))
2099
- (shen-lazyderef Hyp V785)))
2100
- V785 V786)))
2101
- (if (shen-pvar? V594)
2102
- (do (shen-bindv V594 () V785)
2103
- (let Result
2104
- (let Hyp (tl V572)
2105
- (do (shen-incinfs)
2106
- (bind V784
2107
- (cons
2108
- (cons
2109
- (shen-lazyderef X V785)
2110
- (cons :
2111
- (cons
2112
- (shen-lazyderef A V785)
2113
- ())))
2114
- (cons
2115
- (cons
2116
- (shen-lazyderef Y V785)
2117
- (cons :
2118
- (cons
2119
- (shen-lazyderef B V785)
2120
- ())))
2121
- (shen-lazyderef Hyp V785)))
2122
- V785 V786)))
2123
- (do (shen-unbindv V594 V785)
2124
- Result)))
2125
- false)))
2126
- (do (shen-unbindv V590 V785)
2127
- Result))))
2128
- false)))
2129
- (do (shen-unbindv V584 V785) Result)))
2130
- false)))
2131
- (if (shen-pvar? V583)
2132
- (let B (shen-newpv V785)
2133
- (do
2134
- (shen-bindv V583 (cons * (cons B ())) V785)
2135
- (let Result
2136
- (let V595 (shen-lazyderef (tl V581) V785)
2137
- (if (= () V595)
2138
- (let Hyp (tl V572)
2139
- (do (shen-incinfs)
2140
- (bind V784
2141
- (cons
2142
- (cons (shen-lazyderef X V785)
2143
- (cons :
2144
- (cons (shen-lazyderef A V785) ())))
2145
- (cons
2146
- (cons (shen-lazyderef Y V785)
2147
- (cons :
2148
- (cons (shen-lazyderef B V785)
2149
- ())))
2150
- (shen-lazyderef Hyp V785)))
2151
- V785 V786)))
2152
- (if (shen-pvar? V595)
2153
- (do (shen-bindv V595 () V785)
2154
- (let Result
2155
- (let Hyp (tl V572)
2156
- (do (shen-incinfs)
2157
- (bind V784
2158
- (cons
2159
- (cons (shen-lazyderef X V785)
2160
- (cons :
2161
- (cons (shen-lazyderef A V785)
2162
- ())))
2163
- (cons
2164
- (cons (shen-lazyderef Y V785)
2165
- (cons :
2166
- (cons (shen-lazyderef B V785)
2167
- ())))
2168
- (shen-lazyderef Hyp V785)))
2169
- V785 V786)))
2170
- (do (shen-unbindv V595 V785) Result)))
2171
- false)))
2172
- (do (shen-unbindv V583 V785) Result))))
2173
- false))))
2174
- (if (shen-pvar? V582)
2175
- (let A (shen-newpv V785)
2176
- (let B (shen-newpv V785)
2177
- (do
2178
- (shen-bindv V582 (cons A (cons * (cons B ())))
2179
- V785)
2180
- (let Result
2181
- (let V596 (shen-lazyderef (tl V581) V785)
2182
- (if (= () V596)
2183
- (let Hyp (tl V572)
2184
- (do (shen-incinfs)
2185
- (bind V784
2186
- (cons
2187
- (cons (shen-lazyderef X V785)
2188
- (cons :
2189
- (cons (shen-lazyderef A V785) ())))
2190
- (cons
2191
- (cons (shen-lazyderef Y V785)
2192
- (cons :
2193
- (cons (shen-lazyderef B V785) ())))
2194
- (shen-lazyderef Hyp V785)))
2195
- V785 V786)))
2196
- (if (shen-pvar? V596)
2197
- (do (shen-bindv V596 () V785)
2198
- (let Result
2199
- (let Hyp (tl V572)
2200
- (do (shen-incinfs)
2201
- (bind V784
2202
- (cons
2203
- (cons (shen-lazyderef X V785)
2204
- (cons :
2205
- (cons (shen-lazyderef A V785)
2206
- ())))
2207
- (cons
2208
- (cons (shen-lazyderef Y V785)
2209
- (cons :
2210
- (cons (shen-lazyderef B V785)
2211
- ())))
2212
- (shen-lazyderef Hyp V785)))
2213
- V785 V786)))
2214
- (do (shen-unbindv V596 V785) Result)))
2215
- false)))
2216
- (do (shen-unbindv V582 V785) Result)))))
2217
- false)))
2218
- false))
2219
- false))
2220
- false))
2221
- false)))
2222
- false)))
2223
- false))
2224
- false))
2225
- false))
2226
- false))
2227
- false))
2228
- (if (= Case false)
2229
- (let Case
2230
- (let V597 (shen-lazyderef V783 V785)
2231
- (if (cons? V597)
2232
- (let V598 (shen-lazyderef (hd V597) V785)
2233
- (if (cons? V598)
2234
- (let V599 (shen-lazyderef (hd V598) V785)
2235
- (if (cons? V599)
2236
- (let V600 (shen-lazyderef (hd V599) V785)
2237
- (if (= @v V600)
2238
- (let V601 (shen-lazyderef (tl V599) V785)
2239
- (if (cons? V601)
2240
- (let X (hd V601)
2241
- (let V602 (shen-lazyderef (tl V601) V785)
2242
- (if (cons? V602)
2243
- (let Y (hd V602)
2244
- (let V603 (shen-lazyderef (tl V602) V785)
2245
- (if (= () V603)
2246
- (let V604 (shen-lazyderef (tl V598) V785)
2247
- (if (cons? V604)
2248
- (let V605 (shen-lazyderef (hd V604) V785)
2249
- (if (= : V605)
2250
- (let V606 (shen-lazyderef (tl V604) V785)
2251
- (if (cons? V606)
2252
- (let V607 (shen-lazyderef (hd V606) V785)
2253
- (if (cons? V607)
2254
- (let V608 (shen-lazyderef (hd V607) V785)
2255
- (if (= vector V608)
2256
- (let V609 (shen-lazyderef (tl V607) V785)
2257
- (if (cons? V609)
2258
- (let A (hd V609)
2259
- (let V610 (shen-lazyderef (tl V609) V785)
2260
- (if (= () V610)
2261
- (let V611 (shen-lazyderef (tl V606) V785)
2262
- (if (= () V611)
2263
- (let Hyp (tl V597)
2264
- (do (shen-incinfs)
2265
- (bind V784
2266
- (cons
2267
- (cons (shen-lazyderef X V785)
2268
- (cons :
2269
- (cons (shen-lazyderef A V785)
2270
- ())))
2271
- (cons
2272
- (cons (shen-lazyderef Y V785)
2273
- (cons :
2274
- (cons
2275
- (cons vector
2276
- (cons (shen-lazyderef A V785)
2277
- ()))
2278
- ())))
2279
- (shen-lazyderef Hyp V785)))
2280
- V785 V786)))
2281
- (if (shen-pvar? V611)
2282
- (do (shen-bindv V611 () V785)
2283
- (let Result
2284
- (let Hyp (tl V597)
2285
- (do (shen-incinfs)
2286
- (bind V784
2287
- (cons
2288
- (cons (shen-lazyderef X V785)
2289
- (cons :
2290
- (cons (shen-lazyderef A V785)
2291
- ())))
2292
- (cons
2293
- (cons (shen-lazyderef Y V785)
2294
- (cons :
2295
- (cons
2296
- (cons vector
2297
- (cons
2298
- (shen-lazyderef A V785)
2299
- ()))
2300
- ())))
2301
- (shen-lazyderef Hyp V785)))
2302
- V785 V786)))
2303
- (do (shen-unbindv V611 V785)
2304
- Result)))
2305
- false)))
2306
- (if (shen-pvar? V610)
2307
- (do (shen-bindv V610 () V785)
2308
- (let Result
2309
- (let V612
2310
- (shen-lazyderef (tl V606) V785)
2311
- (if (= () V612)
2312
- (let Hyp (tl V597)
2313
- (do (shen-incinfs)
2314
- (bind V784
2315
- (cons
2316
- (cons (shen-lazyderef X V785)
2317
- (cons :
2318
- (cons (shen-lazyderef A V785)
2319
- ())))
2320
- (cons
2321
- (cons (shen-lazyderef Y V785)
2322
- (cons :
2323
- (cons
2324
- (cons vector
2325
- (cons
2326
- (shen-lazyderef A V785)
2327
- ()))
2328
- ())))
2329
- (shen-lazyderef Hyp V785)))
2330
- V785 V786)))
2331
- (if (shen-pvar? V612)
2332
- (do (shen-bindv V612 () V785)
2333
- (let Result
2334
- (let Hyp (tl V597)
2335
- (do (shen-incinfs)
2336
- (bind V784
2337
- (cons
2338
- (cons (shen-lazyderef X V785)
2339
- (cons :
2340
- (cons
2341
- (shen-lazyderef A V785)
2342
- ())))
2343
- (cons
2344
- (cons (shen-lazyderef Y V785)
2345
- (cons :
2346
- (cons
2347
- (cons vector
2348
- (cons
2349
- (shen-lazyderef A V785)
2350
- ()))
2351
- ())))
2352
- (shen-lazyderef Hyp V785)))
2353
- V785 V786)))
2354
- (do (shen-unbindv V612 V785)
2355
- Result)))
2356
- false)))
2357
- (do (shen-unbindv V610 V785) Result)))
2358
- false))))
2359
- (if (shen-pvar? V609)
2360
- (let A (shen-newpv V785)
2361
- (do (shen-bindv V609 (cons A ()) V785)
2362
- (let Result
2363
- (let V613 (shen-lazyderef (tl V606) V785)
2364
- (if (= () V613)
2365
- (let Hyp (tl V597)
2366
- (do (shen-incinfs)
2367
- (bind V784
2368
- (cons
2369
- (cons (shen-lazyderef X V785)
2370
- (cons :
2371
- (cons (shen-lazyderef A V785)
2372
- ())))
2373
- (cons
2374
- (cons (shen-lazyderef Y V785)
2375
- (cons :
2376
- (cons
2377
- (cons vector
2378
- (cons (shen-lazyderef A V785)
2379
- ()))
2380
- ())))
2381
- (shen-lazyderef Hyp V785)))
2382
- V785 V786)))
2383
- (if (shen-pvar? V613)
2384
- (do (shen-bindv V613 () V785)
2385
- (let Result
2386
- (let Hyp (tl V597)
2387
- (do (shen-incinfs)
2388
- (bind V784
2389
- (cons
2390
- (cons (shen-lazyderef X V785)
2391
- (cons :
2392
- (cons (shen-lazyderef A V785)
2393
- ())))
2394
- (cons
2395
- (cons (shen-lazyderef Y V785)
2396
- (cons :
2397
- (cons
2398
- (cons vector
2399
- (cons
2400
- (shen-lazyderef A V785)
2401
- ()))
2402
- ())))
2403
- (shen-lazyderef Hyp V785)))
2404
- V785 V786)))
2405
- (do (shen-unbindv V613 V785)
2406
- Result)))
2407
- false)))
2408
- (do (shen-unbindv V609 V785) Result))))
2409
- false)))
2410
- (if (shen-pvar? V608)
2411
- (do (shen-bindv V608 vector V785)
2412
- (let Result
2413
- (let V614 (shen-lazyderef (tl V607) V785)
2414
- (if (cons? V614)
2415
- (let A (hd V614)
2416
- (let V615 (shen-lazyderef (tl V614) V785)
2417
- (if (= () V615)
2418
- (let V616
2419
- (shen-lazyderef (tl V606) V785)
2420
- (if (= () V616)
2421
- (let Hyp (tl V597)
2422
- (do (shen-incinfs)
2423
- (bind V784
2424
- (cons
2425
- (cons (shen-lazyderef X V785)
2426
- (cons :
2427
- (cons (shen-lazyderef A V785)
2428
- ())))
2429
- (cons
2430
- (cons (shen-lazyderef Y V785)
2431
- (cons :
2432
- (cons
2433
- (cons vector
2434
- (cons
2435
- (shen-lazyderef A V785)
2436
- ()))
2437
- ())))
2438
- (shen-lazyderef Hyp V785)))
2439
- V785 V786)))
2440
- (if (shen-pvar? V616)
2441
- (do (shen-bindv V616 () V785)
2442
- (let Result
2443
- (let Hyp (tl V597)
2444
- (do (shen-incinfs)
2445
- (bind V784
2446
- (cons
2447
- (cons (shen-lazyderef X V785)
2448
- (cons :
2449
- (cons
2450
- (shen-lazyderef A V785)
2451
- ())))
2452
- (cons
2453
- (cons (shen-lazyderef Y V785)
2454
- (cons :
2455
- (cons
2456
- (cons vector
2457
- (cons
2458
- (shen-lazyderef A V785)
2459
- ()))
2460
- ())))
2461
- (shen-lazyderef Hyp V785)))
2462
- V785 V786)))
2463
- (do (shen-unbindv V616 V785)
2464
- Result)))
2465
- false)))
2466
- (if (shen-pvar? V615)
2467
- (do (shen-bindv V615 () V785)
2468
- (let Result
2469
- (let V617
2470
- (shen-lazyderef (tl V606) V785)
2471
- (if (= () V617)
2472
- (let Hyp (tl V597)
2473
- (do (shen-incinfs)
2474
- (bind V784
2475
- (cons
2476
- (cons (shen-lazyderef X V785)
2477
- (cons :
2478
- (cons
2479
- (shen-lazyderef A V785)
2480
- ())))
2481
- (cons
2482
- (cons (shen-lazyderef Y V785)
2483
- (cons :
2484
- (cons
2485
- (cons vector
2486
- (cons
2487
- (shen-lazyderef A V785)
2488
- ()))
2489
- ())))
2490
- (shen-lazyderef Hyp V785)))
2491
- V785 V786)))
2492
- (if (shen-pvar? V617)
2493
- (do (shen-bindv V617 () V785)
2494
- (let Result
2495
- (let Hyp (tl V597)
2496
- (do (shen-incinfs)
2497
- (bind V784
2498
- (cons
2499
- (cons
2500
- (shen-lazyderef X V785)
2501
- (cons :
2502
- (cons
2503
- (shen-lazyderef A V785)
2504
- ())))
2505
- (cons
2506
- (cons
2507
- (shen-lazyderef Y V785)
2508
- (cons :
2509
- (cons
2510
- (cons vector
2511
- (cons
2512
- (shen-lazyderef A
2513
- V785)
2514
- ()))
2515
- ())))
2516
- (shen-lazyderef Hyp
2517
- V785)))
2518
- V785 V786)))
2519
- (do (shen-unbindv V617 V785)
2520
- Result)))
2521
- false)))
2522
- (do (shen-unbindv V615 V785)
2523
- Result)))
2524
- false))))
2525
- (if (shen-pvar? V614)
2526
- (let A (shen-newpv V785)
2527
- (do (shen-bindv V614 (cons A ()) V785)
2528
- (let Result
2529
- (let V618
2530
- (shen-lazyderef (tl V606) V785)
2531
- (if (= () V618)
2532
- (let Hyp (tl V597)
2533
- (do (shen-incinfs)
2534
- (bind V784
2535
- (cons
2536
- (cons (shen-lazyderef X V785)
2537
- (cons :
2538
- (cons (shen-lazyderef A V785)
2539
- ())))
2540
- (cons
2541
- (cons (shen-lazyderef Y V785)
2542
- (cons :
2543
- (cons
2544
- (cons vector
2545
- (cons
2546
- (shen-lazyderef A V785)
2547
- ()))
2548
- ())))
2549
- (shen-lazyderef Hyp V785)))
2550
- V785 V786)))
2551
- (if (shen-pvar? V618)
2552
- (do (shen-bindv V618 () V785)
2553
- (let Result
2554
- (let Hyp (tl V597)
2555
- (do (shen-incinfs)
2556
- (bind V784
2557
- (cons
2558
- (cons (shen-lazyderef X V785)
2559
- (cons :
2560
- (cons
2561
- (shen-lazyderef A V785)
2562
- ())))
2563
- (cons
2564
- (cons
2565
- (shen-lazyderef Y V785)
2566
- (cons :
2567
- (cons
2568
- (cons vector
2569
- (cons
2570
- (shen-lazyderef A V785)
2571
- ()))
2572
- ())))
2573
- (shen-lazyderef Hyp V785)))
2574
- V785 V786)))
2575
- (do (shen-unbindv V618 V785)
2576
- Result)))
2577
- false)))
2578
- (do (shen-unbindv V614 V785)
2579
- Result))))
2580
- false)))
2581
- (do (shen-unbindv V608 V785) Result)))
2582
- false)))
2583
- (if (shen-pvar? V607)
2584
- (let A (shen-newpv V785)
2585
- (do
2586
- (shen-bindv V607 (cons vector (cons A ()))
2587
- V785)
2588
- (let Result
2589
- (let V619 (shen-lazyderef (tl V606) V785)
2590
- (if (= () V619)
2591
- (let Hyp (tl V597)
2592
- (do (shen-incinfs)
2593
- (bind V784
2594
- (cons
2595
- (cons (shen-lazyderef X V785)
2596
- (cons :
2597
- (cons (shen-lazyderef A V785) ())))
2598
- (cons
2599
- (cons (shen-lazyderef Y V785)
2600
- (cons :
2601
- (cons
2602
- (cons vector
2603
- (cons (shen-lazyderef A V785)
2604
- ()))
2605
- ())))
2606
- (shen-lazyderef Hyp V785)))
2607
- V785 V786)))
2608
- (if (shen-pvar? V619)
2609
- (do (shen-bindv V619 () V785)
2610
- (let Result
2611
- (let Hyp (tl V597)
2612
- (do (shen-incinfs)
2613
- (bind V784
2614
- (cons
2615
- (cons (shen-lazyderef X V785)
2616
- (cons :
2617
- (cons (shen-lazyderef A V785)
2618
- ())))
2619
- (cons
2620
- (cons (shen-lazyderef Y V785)
2621
- (cons :
2622
- (cons
2623
- (cons vector
2624
- (cons (shen-lazyderef A V785)
2625
- ()))
2626
- ())))
2627
- (shen-lazyderef Hyp V785)))
2628
- V785 V786)))
2629
- (do (shen-unbindv V619 V785) Result)))
2630
- false)))
2631
- (do (shen-unbindv V607 V785) Result))))
2632
- false)))
2633
- false))
2634
- false))
2635
- false))
2636
- false)))
2637
- false)))
2638
- false))
2639
- false))
2640
- false))
2641
- false))
2642
- false))
2643
- (if (= Case false)
2644
- (let Case
2645
- (let V620 (shen-lazyderef V783 V785)
2646
- (if (cons? V620)
2647
- (let V621 (shen-lazyderef (hd V620) V785)
2648
- (if (cons? V621)
2649
- (let V622 (shen-lazyderef (hd V621) V785)
2650
- (if (cons? V622)
2651
- (let V623 (shen-lazyderef (hd V622) V785)
2652
- (if (= @s V623)
2653
- (let V624 (shen-lazyderef (tl V622) V785)
2654
- (if (cons? V624)
2655
- (let X (hd V624)
2656
- (let V625 (shen-lazyderef (tl V624) V785)
2657
- (if (cons? V625)
2658
- (let Y (hd V625)
2659
- (let V626 (shen-lazyderef (tl V625) V785)
2660
- (if (= () V626)
2661
- (let V627 (shen-lazyderef (tl V621) V785)
2662
- (if (cons? V627)
2663
- (let V628 (shen-lazyderef (hd V627) V785)
2664
- (if (= : V628)
2665
- (let V629 (shen-lazyderef (tl V627) V785)
2666
- (if (cons? V629)
2667
- (let V630 (shen-lazyderef (hd V629) V785)
2668
- (if (= string V630)
2669
- (let V631 (shen-lazyderef (tl V629) V785)
2670
- (if (= () V631)
2671
- (let Hyp (tl V620)
2672
- (do (shen-incinfs)
2673
- (bind V784
2674
- (cons
2675
- (cons (shen-lazyderef X V785)
2676
- (cons : (cons string ())))
2677
- (cons
2678
- (cons (shen-lazyderef Y V785)
2679
- (cons : (cons string ())))
2680
- (shen-lazyderef Hyp V785)))
2681
- V785 V786)))
2682
- (if (shen-pvar? V631)
2683
- (do (shen-bindv V631 () V785)
2684
- (let Result
2685
- (let Hyp (tl V620)
2686
- (do (shen-incinfs)
2687
- (bind V784
2688
- (cons
2689
- (cons (shen-lazyderef X V785)
2690
- (cons : (cons string ())))
2691
- (cons
2692
- (cons (shen-lazyderef Y V785)
2693
- (cons : (cons string ())))
2694
- (shen-lazyderef Hyp V785)))
2695
- V785 V786)))
2696
- (do (shen-unbindv V631 V785) Result)))
2697
- false)))
2698
- (if (shen-pvar? V630)
2699
- (do (shen-bindv V630 string V785)
2700
- (let Result
2701
- (let V632 (shen-lazyderef (tl V629) V785)
2702
- (if (= () V632)
2703
- (let Hyp (tl V620)
2704
- (do (shen-incinfs)
2705
- (bind V784
2706
- (cons
2707
- (cons (shen-lazyderef X V785)
2708
- (cons : (cons string ())))
2709
- (cons
2710
- (cons (shen-lazyderef Y V785)
2711
- (cons : (cons string ())))
2712
- (shen-lazyderef Hyp V785)))
2713
- V785 V786)))
2714
- (if (shen-pvar? V632)
2715
- (do (shen-bindv V632 () V785)
2716
- (let Result
2717
- (let Hyp (tl V620)
2718
- (do (shen-incinfs)
2719
- (bind V784
2720
- (cons
2721
- (cons (shen-lazyderef X V785)
2722
- (cons : (cons string ())))
2723
- (cons
2724
- (cons (shen-lazyderef Y V785)
2725
- (cons : (cons string ())))
2726
- (shen-lazyderef Hyp V785)))
2727
- V785 V786)))
2728
- (do (shen-unbindv V632 V785) Result)))
2729
- false)))
2730
- (do (shen-unbindv V630 V785) Result)))
2731
- false)))
2732
- false))
2733
- false))
2734
- false))
2735
- false)))
2736
- false)))
2737
- false))
2738
- false))
2739
- false))
2740
- false))
2741
- false))
2742
- (if (= Case false)
2743
- (let V633 (shen-lazyderef V783 V785)
2744
- (if (cons? V633)
2745
- (let X (hd V633)
2746
- (let Hyp (tl V633)
2747
- (let NewHyps (shen-newpv V785)
2748
- (do (shen-incinfs)
2749
- (bind V784
2750
- (cons (shen-lazyderef X V785) (shen-lazyderef NewHyps V785))
2751
- V785 (freeze (shen-t*-hyps Hyp NewHyps V785 V786)))))))
2752
- false))
2753
- Case))
2754
- Case))
2755
- Case))
2756
- Case)))
111
+ (defun shen.<sig+rules> (V2849) (let Result (let Parse_shen.<signature> (shen.<signature> V2849) (if (not (= (fail) Parse_shen.<signature>)) (let Parse_shen.<trules> (shen.<trules> Parse_shen.<signature>) (if (not (= (fail) Parse_shen.<trules>)) (shen.pair (hd Parse_shen.<trules>) (cons (shen.hdtl Parse_shen.<signature>) (shen.hdtl Parse_shen.<trules>))) (fail))) (fail))) (if (= Result (fail)) (fail) Result)))
2757
112
 
2758
- (defun shen-show (V799 V800 V801 V802)
2759
- (cond
2760
- ((value shen-*spy*)
2761
- (do (shen-line)
2762
- (do (shen-show-p (shen-deref V799 V801))
2763
- (do (nl 1)
2764
- (do (nl 1)
2765
- (do (shen-show-assumptions (shen-deref V800 V801) 1)
2766
- (do (intoutput "~%> " ())
2767
- (do (shen-pause-for-user (value *language*)) (thaw V802)))))))))
2768
- (true (thaw V802))))
113
+ (defun shen.placeholders (V2854 V2855) (cond ((cons? V2854) (map (lambda Z (shen.placeholders Z V2855)) V2854)) ((element? V2854 V2855) (concat && V2854)) (true V2854)))
2769
114
 
2770
- (defun shen-line ()
2771
- (let Infs (inferences _)
2772
- (intoutput
2773
- "____________________________________________________________ ~A inference~A ~%?- "
2774
- (@p Infs (@p (if (= 1 Infs) "" "s") ())))))
115
+ (defun shen.<trules> (V2860) (let Result (let Parse_shen.<trule> (shen.<trule> V2860) (if (not (= (fail) Parse_shen.<trule>)) (let Parse_shen.<trules> (shen.<trules> Parse_shen.<trule>) (if (not (= (fail) Parse_shen.<trules>)) (shen.pair (hd Parse_shen.<trules>) (cons (shen.hdtl Parse_shen.<trule>) (shen.hdtl Parse_shen.<trules>))) (fail))) (fail))) (if (= Result (fail)) (let Result (let Parse_shen.<trule> (shen.<trule> V2860) (if (not (= (fail) Parse_shen.<trule>)) (shen.pair (hd Parse_shen.<trule>) (cons (shen.hdtl Parse_shen.<trule>) ())) (fail))) (if (= Result (fail)) (fail) Result)) Result)))
2775
116
 
2776
- (defun shen-show-p (V803)
2777
- (cond
2778
- ((and (cons? V803)
2779
- (and (cons? (tl V803))
2780
- (and (= : (hd (tl V803)))
2781
- (and (cons? (tl (tl V803))) (= () (tl (tl (tl V803))))))))
2782
- (intoutput "~R : ~R" (@p (hd V803) (@p (hd (tl (tl V803))) ()))))
2783
- (true (intoutput "~R" (@p V803 ())))))
117
+ (defun shen.<trule> (V2865) (let Result (let Parse_shen.<patterns> (shen.<patterns> V2865) (if (not (= (fail) Parse_shen.<patterns>)) (let Parse_shen.<arrow> (shen.<arrow> Parse_shen.<patterns>) (if (not (= (fail) Parse_shen.<arrow>)) (let Parse_shen.<action> (shen.<action> Parse_shen.<arrow>) (if (not (= (fail) Parse_shen.<action>)) (let Parse_shen.<guard?> (shen.<guard?> Parse_shen.<action>) (if (not (= (fail) Parse_shen.<guard?>)) (shen.pair (hd Parse_shen.<guard?>) (let Parse_Vars (shen.extract_vars (shen.hdtl Parse_shen.<patterns>)) (let Parse_Patterns (shen.placeholders (shen.hdtl Parse_shen.<patterns>) Parse_Vars) (let Parse_Action (shen.placeholders (shen.curry (shen.hdtl Parse_shen.<action>)) Parse_Vars) (let Parse_Guard (shen.placeholders (shen.curry (shen.hdtl Parse_shen.<guard?>)) Parse_Vars) (shen.form-rule Parse_Patterns (shen.hdtl Parse_shen.<arrow>) Parse_Action Parse_Guard)))))) (fail))) (fail))) (fail))) (fail))) (if (= Result (fail)) (fail) Result)))
2784
118
 
2785
- (defun shen-show-assumptions (V806 V807)
2786
- (cond ((= () V806) shen-skip)
2787
- ((cons? V806)
2788
- (do (intoutput "~A. " (@p V807 ()))
2789
- (do (shen-show-p (hd V806))
2790
- (do (nl 1) (shen-show-assumptions (tl V806) (+ V807 1))))))
2791
- (true (shen-f_error shen-show-assumptions))))
119
+ (defun shen.form-rule (V2866 V2867 V2868 V2869) (cond ((= shen.forward V2867) (cons V2866 (cons (if (= V2869 shen.skip) V2868 (cons where (cons V2869 (cons V2868 ())))) ()))) ((and (= shen.backward V2867) (and (cons? V2868) (and (cons? (hd V2868)) (and (= fail-if (hd (hd V2868))) (and (cons? (tl (hd V2868))) (and (= () (tl (tl (hd V2868)))) (and (cons? (tl V2868)) (= () (tl (tl V2868)))))))))) (cons V2866 (cons (if (= V2869 shen.skip) (cons where (cons (cons not (cons (cons (hd (tl (hd V2868))) (tl V2868)) ())) (tl V2868))) (cons where (cons (cons (cons and (cons V2869 ())) (cons (cons not (cons (cons (hd (tl (hd V2868))) (tl V2868)) ())) ())) (tl V2868)))) ()))) ((= shen.backward V2867) (cons V2866 (cons (if (= V2869 shen.skip) (cons where (cons (cons not (cons (cons (cons == (cons V2868 ())) (cons (cons fail ()) ())) ())) (cons V2868 ()))) (cons where (cons (cons (cons and (cons V2869 ())) (cons (cons not (cons (cons (cons == (cons V2868 ())) (cons (cons fail ()) ())) ())) ())) (cons V2868 ())))) ()))) (true (shen.sys-error shen.form-rule))))
2792
120
 
2793
- (defun shen-pause-for-user (V812)
2794
- (cond
2795
- ((= "Common Lisp" V812)
2796
- (let I (FORMAT () "~C" (READ-CHAR))
2797
- (if (= I "a") (interror "input aborted~%" ()) (nl 1))))
2798
- (true
2799
- (let I (shen-read-char)
2800
- (if (= I "a") (interror "input aborted~%" ()) (nl 1))))))
121
+ (defun shen.<guard?> (V2874) (let Result (if (and (cons? (hd V2874)) (= where (hd (hd V2874)))) (let Parse_shen.<guard> (shen.<guard> (shen.pair (tl (hd V2874)) (shen.hdtl V2874))) (if (not (= (fail) Parse_shen.<guard>)) (shen.pair (hd Parse_shen.<guard>) (shen.hdtl Parse_shen.<guard>)) (fail))) (fail)) (if (= Result (fail)) (let Result (let Parse_<e> (<e> V2874) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) shen.skip) (fail))) (if (= Result (fail)) (fail) Result)) Result)))
2801
122
 
2802
- (defun shen-read-char () (shen-read-char-h (read-byte (stinput 0)) 0))
123
+ (defun shen.<arrow> (V2879) (let Result (if (and (cons? (hd V2879)) (= -> (hd (hd V2879)))) (shen.pair (hd (shen.pair (tl (hd V2879)) (shen.hdtl V2879))) shen.forward) (fail)) (if (= Result (fail)) (let Result (if (and (cons? (hd V2879)) (= <- (hd (hd V2879)))) (shen.pair (hd (shen.pair (tl (hd V2879)) (shen.hdtl V2879))) shen.backward) (fail)) (if (= Result (fail)) (fail) Result)) Result)))
2803
124
 
2804
- (defun shen-read-char-h (V815 V816)
2805
- (cond
2806
- ((and (= -1 V815) (= 0 V816)) (shen-read-char-h (read-byte (stinput 0)) 1))
2807
- ((= 0 V816) (shen-read-char-h (read-byte (stinput 0)) 0))
2808
- ((and (= -1 V815) (= 1 V816)) (shen-read-char-h (read-byte (stinput 0)) 1))
2809
- ((= 1 V816) (byte->string V815)) (true (shen-f_error shen-read-char-h))))
125
+ (defun shen.errordef (V2880) (simple-error (cn "syntax error in " (shen.app V2880 "
126
+ " shen.a))))
2810
127
 
2811
- (defun shen-typedf? (V817) (element? V817 (value shen-*signedfuncs*)))
128
+ (defun shen.t*-rules (V2881 V2882 V2883 V2884 V2885 V2886 V2887) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2501 (shen.lazyderef V2881 V2886) (if (= () V2501) (do (shen.incinfs) (thaw V2887)) false)) (if (= Case false) (let V2502 (shen.lazyderef V2881 V2886) (if (cons? V2502) (let Rule (hd V2502) (let Rules (tl V2502) (let M (shen.newpv V2886) (do (shen.incinfs) (shen.t*-rule Rule V2882 V2883 V2884 V2885 V2886 (freeze (cut Throwcontrol V2886 (freeze (bind M (+ (shen.lazyderef V2883 V2886) 1) V2886 (freeze (shen.t*-rules Rules V2882 M V2884 V2885 V2886 V2887))))))))))) false)) Case)))))
2812
129
 
2813
- (defun shen-sigf (V818) (concat shen-type-signature-of- V818))
130
+ (defun shen.t*-rule (V2888 V2889 V2890 V2891 V2892 V2893 V2894) (let Case (do (shen.incinfs) (shen.t*-ruleh V2888 V2889 V2892 V2893 V2894)) (if (= Case false) (let Error (shen.newpv V2893) (do (shen.incinfs) (bind Error (shen.type-insecure-rule-error-message (shen.lazyderef V2890 V2893) (shen.lazyderef V2891 V2893)) V2893 V2894))) Case)))
2814
131
 
2815
- (defun shen-placeholder () (gensym &&))
132
+ (defun shen.t*-ruleh (V2895 V2896 V2897 V2898 V2899) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2478 (shen.lazyderef V2895 V2898) (if (cons? V2478) (let V2479 (shen.lazyderef (hd V2478) V2898) (if (= () V2479) (let V2480 (shen.lazyderef (tl V2478) V2898) (if (cons? V2480) (let Result (hd V2480) (let V2481 (shen.lazyderef (tl V2480) V2898) (if (= () V2481) (let V2482 (shen.lazyderef V2896 V2898) (if (cons? V2482) (let V2483 (shen.lazyderef (hd V2482) V2898) (if (= --> V2483) (let V2484 (shen.lazyderef (tl V2482) V2898) (if (cons? V2484) (let A (hd V2484) (let V2485 (shen.lazyderef (tl V2484) V2898) (if (= () V2485) (do (shen.incinfs) (cut Throwcontrol V2898 (freeze (shen.th* Result A V2897 V2898 V2899)))) (if (shen.pvar? V2485) (do (shen.bindv V2485 () V2898) (let Result (do (shen.incinfs) (cut Throwcontrol V2898 (freeze (shen.th* Result A V2897 V2898 V2899)))) (do (shen.unbindv V2485 V2898) Result))) false)))) (if (shen.pvar? V2484) (let A (shen.newpv V2898) (do (shen.bindv V2484 (cons A ()) V2898) (let Result (do (shen.incinfs) (cut Throwcontrol V2898 (freeze (shen.th* Result A V2897 V2898 V2899)))) (do (shen.unbindv V2484 V2898) Result)))) false))) (if (shen.pvar? V2483) (do (shen.bindv V2483 --> V2898) (let Result (let V2486 (shen.lazyderef (tl V2482) V2898) (if (cons? V2486) (let A (hd V2486) (let V2487 (shen.lazyderef (tl V2486) V2898) (if (= () V2487) (do (shen.incinfs) (cut Throwcontrol V2898 (freeze (shen.th* Result A V2897 V2898 V2899)))) (if (shen.pvar? V2487) (do (shen.bindv V2487 () V2898) (let Result (do (shen.incinfs) (cut Throwcontrol V2898 (freeze (shen.th* Result A V2897 V2898 V2899)))) (do (shen.unbindv V2487 V2898) Result))) false)))) (if (shen.pvar? V2486) (let A (shen.newpv V2898) (do (shen.bindv V2486 (cons A ()) V2898) (let Result (do (shen.incinfs) (cut Throwcontrol V2898 (freeze (shen.th* Result A V2897 V2898 V2899)))) (do (shen.unbindv V2486 V2898) Result)))) false))) (do (shen.unbindv V2483 V2898) Result))) false))) (if (shen.pvar? V2482) (let A (shen.newpv V2898) (do (shen.bindv V2482 (cons --> (cons A ())) V2898) (let Result (do (shen.incinfs) (cut Throwcontrol V2898 (freeze (shen.th* Result A V2897 V2898 V2899)))) (do (shen.unbindv V2482 V2898) Result)))) false))) false))) false)) false)) false)) (if (= Case false) (let V2488 (shen.lazyderef V2895 V2898) (if (cons? V2488) (let Patterns (hd V2488) (let V2489 (shen.lazyderef (tl V2488) V2898) (if (cons? V2489) (let Result (hd V2489) (let V2490 (shen.lazyderef (tl V2489) V2898) (if (= () V2490) (let NewHyp (shen.newpv V2898) (let B (shen.newpv V2898) (let AllHyp (shen.newpv V2898) (do (shen.incinfs) (shen.t*-patterns Patterns V2896 NewHyp B V2898 (freeze (cut Throwcontrol V2898 (freeze (shen.conc NewHyp V2897 AllHyp V2898 (freeze (cut Throwcontrol V2898 (freeze (shen.th* Result B AllHyp V2898 V2899))))))))))))) false))) false))) false)) Case)))))
2816
133
 
2817
- (defun shen-base (V819 V820 V821 V822)
2818
- (let Case
2819
- (let V536 (shen-lazyderef V820 V821)
2820
- (if (= number V536)
2821
- (do (shen-incinfs) (fwhen (number? (shen-lazyderef V819 V821)) V821 V822))
2822
- (if (shen-pvar? V536)
2823
- (do (shen-bindv V536 number V821)
2824
- (let Result
2825
- (do (shen-incinfs)
2826
- (fwhen (number? (shen-lazyderef V819 V821)) V821 V822))
2827
- (do (shen-unbindv V536 V821) Result)))
2828
- false)))
2829
- (if (= Case false)
2830
- (let Case
2831
- (let V537 (shen-lazyderef V820 V821)
2832
- (if (= boolean V537)
2833
- (do (shen-incinfs)
2834
- (fwhen (boolean? (shen-lazyderef V819 V821)) V821 V822))
2835
- (if (shen-pvar? V537)
2836
- (do (shen-bindv V537 boolean V821)
2837
- (let Result
2838
- (do (shen-incinfs)
2839
- (fwhen (boolean? (shen-lazyderef V819 V821)) V821 V822))
2840
- (do (shen-unbindv V537 V821) Result)))
2841
- false)))
2842
- (if (= Case false)
2843
- (let Case
2844
- (let V538 (shen-lazyderef V820 V821)
2845
- (if (= string V538)
2846
- (do (shen-incinfs)
2847
- (fwhen (string? (shen-lazyderef V819 V821)) V821 V822))
2848
- (if (shen-pvar? V538)
2849
- (do (shen-bindv V538 string V821)
2850
- (let Result
2851
- (do (shen-incinfs)
2852
- (fwhen (string? (shen-lazyderef V819 V821)) V821 V822))
2853
- (do (shen-unbindv V538 V821) Result)))
2854
- false)))
2855
- (if (= Case false)
2856
- (let Case
2857
- (let V539 (shen-lazyderef V820 V821)
2858
- (if (= symbol V539)
2859
- (do (shen-incinfs)
2860
- (fwhen (symbol? (shen-lazyderef V819 V821)) V821
2861
- (freeze
2862
- (fwhen (not (shen-placeholder? (shen-lazyderef V819 V821))) V821
2863
- V822))))
2864
- (if (shen-pvar? V539)
2865
- (do (shen-bindv V539 symbol V821)
2866
- (let Result
2867
- (do (shen-incinfs)
2868
- (fwhen (symbol? (shen-lazyderef V819 V821)) V821
2869
- (freeze
2870
- (fwhen (not (shen-placeholder? (shen-lazyderef V819 V821)))
2871
- V821 V822))))
2872
- (do (shen-unbindv V539 V821) Result)))
2873
- false)))
2874
- (if (= Case false)
2875
- (let V540 (shen-lazyderef V819 V821)
2876
- (if (= () V540)
2877
- (let V541 (shen-lazyderef V820 V821)
2878
- (if (cons? V541)
2879
- (let V542 (shen-lazyderef (hd V541) V821)
2880
- (if (= list V542)
2881
- (let V543 (shen-lazyderef (tl V541) V821)
2882
- (if (cons? V543)
2883
- (let A (hd V543)
2884
- (let V544 (shen-lazyderef (tl V543) V821)
2885
- (if (= () V544) (do (shen-incinfs) (thaw V822))
2886
- (if (shen-pvar? V544)
2887
- (do (shen-bindv V544 () V821)
2888
- (let Result (do (shen-incinfs) (thaw V822))
2889
- (do (shen-unbindv V544 V821) Result)))
2890
- false))))
2891
- (if (shen-pvar? V543)
2892
- (let A (shen-newpv V821)
2893
- (do (shen-bindv V543 (cons A ()) V821)
2894
- (let Result (do (shen-incinfs) (thaw V822))
2895
- (do (shen-unbindv V543 V821) Result))))
2896
- false)))
2897
- (if (shen-pvar? V542)
2898
- (do (shen-bindv V542 list V821)
2899
- (let Result
2900
- (let V545 (shen-lazyderef (tl V541) V821)
2901
- (if (cons? V545)
2902
- (let A (hd V545)
2903
- (let V546 (shen-lazyderef (tl V545) V821)
2904
- (if (= () V546) (do (shen-incinfs) (thaw V822))
2905
- (if (shen-pvar? V546)
2906
- (do (shen-bindv V546 () V821)
2907
- (let Result (do (shen-incinfs) (thaw V822))
2908
- (do (shen-unbindv V546 V821) Result)))
2909
- false))))
2910
- (if (shen-pvar? V545)
2911
- (let A (shen-newpv V821)
2912
- (do (shen-bindv V545 (cons A ()) V821)
2913
- (let Result (do (shen-incinfs) (thaw V822))
2914
- (do (shen-unbindv V545 V821) Result))))
2915
- false)))
2916
- (do (shen-unbindv V542 V821) Result)))
2917
- false)))
2918
- (if (shen-pvar? V541)
2919
- (let A (shen-newpv V821)
2920
- (do (shen-bindv V541 (cons list (cons A ())) V821)
2921
- (let Result (do (shen-incinfs) (thaw V822))
2922
- (do (shen-unbindv V541 V821) Result))))
2923
- false)))
2924
- false))
2925
- Case))
2926
- Case))
2927
- Case))
2928
- Case)))
134
+ (defun shen.type-insecure-rule-error-message (V2900 V2901) (simple-error (cn "type error in rule " (shen.app V2900 (cn " of " (shen.app V2901 "
135
+ " shen.a)) shen.a))))
2929
136
 
2930
- (defun shen-placeholder? (V823)
2931
- (and (symbol? V823) (shen-placeholder-help? (str V823))))
137
+ (defun shen.t*-patterns (V2902 V2903 V2904 V2905 V2906 V2907) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2459 (shen.lazyderef V2902 V2906) (if (= () V2459) (let V2460 (shen.lazyderef V2904 V2906) (if (= () V2460) (do (shen.incinfs) (unify! V2905 V2903 V2906 V2907)) (if (shen.pvar? V2460) (do (shen.bindv V2460 () V2906) (let Result (do (shen.incinfs) (unify! V2905 V2903 V2906 V2907)) (do (shen.unbindv V2460 V2906) Result))) false))) false)) (if (= Case false) (let V2461 (shen.lazyderef V2902 V2906) (if (cons? V2461) (let Pattern2453 (hd V2461) (let Patterns (tl V2461) (let V2462 (shen.lazyderef V2903 V2906) (if (cons? V2462) (let A2454 (hd V2462) (let V2463 (shen.lazyderef (tl V2462) V2906) (if (cons? V2463) (let V2464 (shen.lazyderef (hd V2463) V2906) (if (= --> V2464) (let V2465 (shen.lazyderef (tl V2463) V2906) (if (cons? V2465) (let B (hd V2465) (let V2466 (shen.lazyderef (tl V2465) V2906) (if (= () V2466) (let V2467 (shen.lazyderef V2904 V2906) (if (cons? V2467) (let V2468 (shen.lazyderef (hd V2467) V2906) (if (cons? V2468) (let Pattern (hd V2468) (let V2469 (shen.lazyderef (tl V2468) V2906) (if (cons? V2469) (let V2470 (shen.lazyderef (hd V2469) V2906) (if (= : V2470) (let V2471 (shen.lazyderef (tl V2469) V2906) (if (cons? V2471) (let A (hd V2471) (let V2472 (shen.lazyderef (tl V2471) V2906) (if (= () V2472) (let Hyp (tl V2467) (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907)))))))))))))))) (if (shen.pvar? V2472) (do (shen.bindv V2472 () V2906) (let Result (let Hyp (tl V2467) (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907)))))))))))))))) (do (shen.unbindv V2472 V2906) Result))) false)))) (if (shen.pvar? V2471) (let A (shen.newpv V2906) (do (shen.bindv V2471 (cons A ()) V2906) (let Result (let Hyp (tl V2467) (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907)))))))))))))))) (do (shen.unbindv V2471 V2906) Result)))) false))) (if (shen.pvar? V2470) (do (shen.bindv V2470 : V2906) (let Result (let V2473 (shen.lazyderef (tl V2469) V2906) (if (cons? V2473) (let A (hd V2473) (let V2474 (shen.lazyderef (tl V2473) V2906) (if (= () V2474) (let Hyp (tl V2467) (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907)))))))))))))))) (if (shen.pvar? V2474) (do (shen.bindv V2474 () V2906) (let Result (let Hyp (tl V2467) (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907)))))))))))))))) (do (shen.unbindv V2474 V2906) Result))) false)))) (if (shen.pvar? V2473) (let A (shen.newpv V2906) (do (shen.bindv V2473 (cons A ()) V2906) (let Result (let Hyp (tl V2467) (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907)))))))))))))))) (do (shen.unbindv V2473 V2906) Result)))) false))) (do (shen.unbindv V2470 V2906) Result))) false))) (if (shen.pvar? V2469) (let A (shen.newpv V2906) (do (shen.bindv V2469 (cons : (cons A ())) V2906) (let Result (let Hyp (tl V2467) (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907)))))))))))))))) (do (shen.unbindv V2469 V2906) Result)))) false)))) (if (shen.pvar? V2468) (let Pattern (shen.newpv V2906) (let A (shen.newpv V2906) (do (shen.bindv V2468 (cons Pattern (cons : (cons A ()))) V2906) (let Result (let Hyp (tl V2467) (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907)))))))))))))))) (do (shen.unbindv V2468 V2906) Result))))) false))) (if (shen.pvar? V2467) (let Pattern (shen.newpv V2906) (let A (shen.newpv V2906) (let Hyp (shen.newpv V2906) (do (shen.bindv V2467 (cons (cons Pattern (cons : (cons A ()))) Hyp) V2906) (let Result (let Assume (shen.newpv V2906) (do (shen.incinfs) (unify! A A2454 V2906 (freeze (unify! Pattern Pattern2453 V2906 (freeze (shen.t*-assume Pattern Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.th* Pattern A Assume V2906 (freeze (cut Throwcontrol V2906 (freeze (shen.t*-patterns Patterns B Hyp V2905 V2906 V2907))))))))))))))) (do (shen.unbindv V2467 V2906) Result)))))) false))) false))) false)) false)) false))) false)))) false)) Case)))))
2932
138
 
2933
- (defun shen-placeholder-help? (V830)
2934
- (cond
2935
- ((and (shen-+string? V830)
2936
- (and (= "&" (pos V830 0))
2937
- (and (shen-+string? (tlstr V830)) (= "&" (pos (tlstr V830) 0)))))
2938
- true)
2939
- (true false)))
139
+ (defun shen.t*-assume (V2908 V2909 V2910 V2911) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2450 (shen.lazyderef V2908 V2910) (if (cons? V2450) (let X (hd V2450) (let Y (tl V2450) (let A1 (shen.newpv V2910) (let A2 (shen.newpv V2910) (do (shen.incinfs) (cut Throwcontrol V2910 (freeze (shen.t*-assume X A1 V2910 (freeze (shen.t*-assume Y A2 V2910 (freeze (bind V2909 (append (shen.lazyderef A1 V2910) (shen.lazyderef A2 V2910)) V2910 V2911)))))))))))) false)) (if (= Case false) (let Case (let A (shen.newpv V2910) (do (shen.incinfs) (fwhen (shen.placeholder? (shen.lazyderef V2908 V2910)) V2910 (freeze (bind V2909 (cons (cons (shen.lazyderef V2908 V2910) (cons : (cons (shen.lazyderef A V2910) ()))) ()) V2910 V2911))))) (if (= Case false) (let V2451 (shen.lazyderef V2909 V2910) (if (= () V2451) (do (shen.incinfs) (thaw V2911)) (if (shen.pvar? V2451) (do (shen.bindv V2451 () V2910) (let Result (do (shen.incinfs) (thaw V2911)) (do (shen.unbindv V2451 V2910) Result))) false))) Case)) Case)))))
2940
140
 
2941
- (defun shen-by_hypothesis (V831 V832 V833 V834 V835)
2942
- (let Case
2943
- (let V527 (shen-lazyderef V833 V834)
2944
- (if (cons? V527)
2945
- (let V528 (shen-lazyderef (hd V527) V834)
2946
- (if (cons? V528)
2947
- (let Y (hd V528)
2948
- (let V529 (shen-lazyderef (tl V528) V834)
2949
- (if (cons? V529)
2950
- (let V530 (shen-lazyderef (hd V529) V834)
2951
- (if (= : V530)
2952
- (let V531 (shen-lazyderef (tl V529) V834)
2953
- (if (cons? V531)
2954
- (let B (hd V531)
2955
- (let V532 (shen-lazyderef (tl V531) V834)
2956
- (if (= () V532)
2957
- (do (shen-incinfs)
2958
- (identical V831 Y V834 (freeze (unify! V832 B V834 V835))))
2959
- false)))
2960
- false))
2961
- false))
2962
- false)))
2963
- false))
2964
- false))
2965
- (if (= Case false)
2966
- (let V533 (shen-lazyderef V833 V834)
2967
- (if (cons? V533)
2968
- (let Hyp (tl V533)
2969
- (do (shen-incinfs) (shen-by_hypothesis V831 V832 Hyp V834 V835)))
2970
- false))
2971
- Case)))
141
+ (defun shen.conc (V2912 V2913 V2914 V2915 V2916) (let Case (let V2446 (shen.lazyderef V2912 V2915) (if (= () V2446) (do (shen.incinfs) (bind V2914 (shen.lazyderef V2913 V2915) V2915 V2916)) false)) (if (= Case false) (let V2447 (shen.lazyderef V2912 V2915) (if (cons? V2447) (let X (hd V2447) (let Y (tl V2447) (let Z (shen.newpv V2915) (do (shen.incinfs) (bind V2914 (cons (shen.lazyderef X V2915) (shen.lazyderef Z V2915)) V2915 (freeze (shen.conc Y V2913 Z V2915 V2916))))))) false)) Case)))
2972
142
 
2973
- (defun shen-t*-def (V836 V837 V838 V839 V840)
2974
- (let Throwcontrol (shen-catchpoint)
2975
- (shen-cutpoint Throwcontrol
2976
- (let V521 (shen-lazyderef V836 V839)
2977
- (if (cons? V521)
2978
- (let V522 (shen-lazyderef (hd V521) V839)
2979
- (if (= define V522)
2980
- (let V523 (shen-lazyderef (tl V521) V839)
2981
- (if (cons? V523)
2982
- (let F (hd V523)
2983
- (let X (tl V523)
2984
- (let Error (shen-newpv V839)
2985
- (let Sig+Rules (shen-newpv V839)
2986
- (let Vars (shen-newpv V839)
2987
- (let Rules (shen-newpv V839)
2988
- (let Sig&& (shen-newpv V839)
2989
- (let Declare (shen-newpv V839)
2990
- (let Sig (shen-newpv V839)
2991
- (do (shen-incinfs)
2992
- (bind Sig+Rules
2993
- (compile (lambda X (shen-<sig+rules> X))
2994
- (shen-lazyderef X V839) ())
2995
- V839
2996
- (freeze
2997
- (bind Error
2998
- (if (= (shen-lazyderef Sig+Rules V839) (fail))
2999
- (shen-errordef (shen-lazyderef F V839)) shen-skip)
3000
- V839
3001
- (freeze
3002
- (bind Sig (hd (shen-lazyderef Sig+Rules V839)) V839
3003
- (freeze
3004
- (bind Rules (tl (shen-lazyderef Sig+Rules V839)) V839
3005
- (freeze
3006
- (bind Vars
3007
- (shen-extract_vars (shen-lazyderef Sig V839)) V839
3008
- (freeze
3009
- (bind Sig&&
3010
- (shen-placeholders (shen-lazyderef Sig V839)
3011
- (shen-lazyderef Vars V839))
3012
- V839
3013
- (freeze
3014
- (cut Throwcontrol V839
3015
- (freeze
3016
- (shen-t*-rules Rules Sig&& 1 F
3017
- (cons (cons F (cons : (cons Sig&& ())))
3018
- V838)
3019
- V839
3020
- (freeze
3021
- (bind Declare
3022
- (declare (shen-lazyderef F V839)
3023
- (shen-lazyderef Sig V839))
3024
- V839
3025
- (freeze
3026
- (unify! V837 Sig V839
3027
- V840)))))))))))))))))))))))))))))
3028
- false))
3029
- false))
3030
- false)))))
143
+ (defun shen.findallhelp (V2917 V2918 V2919 V2920 V2921 V2922) (let Case (do (shen.incinfs) (call V2918 V2921 (freeze (shen.remember V2920 V2917 V2921 (freeze (fwhen false V2921 V2922)))))) (if (= Case false) (do (shen.incinfs) (bind V2919 (value (shen.lazyderef V2920 V2921)) V2921 V2922)) Case)))
3031
144
 
3032
- (defun shen-<sig+rules> (V845)
3033
- (let Result
3034
- (let Parse_<signature> (shen-<signature> V845)
3035
- (if (not (= (fail) Parse_<signature>))
3036
- (let Parse_<trules> (shen-<trules> Parse_<signature>)
3037
- (if (not (= (fail) Parse_<trules>))
3038
- (shen-reassemble (fst Parse_<trules>)
3039
- (cons (snd Parse_<signature>) (snd Parse_<trules>)))
3040
- (fail)))
3041
- (fail)))
3042
- (if (= Result (fail)) (fail) Result)))
145
+ (defun shen.remember (V2923 V2924 V2925 V2926) (let B (shen.newpv V2925) (do (shen.incinfs) (bind B (set (shen.deref V2923 V2925) (cons (shen.deref V2924 V2925) (value (shen.deref V2923 V2925)))) V2925 V2926))))
3043
146
 
3044
- (defun shen-placeholders (V850 V851)
3045
- (cond ((cons? V850) (map (lambda Z (shen-placeholders Z V851)) V850))
3046
- ((element? V850 V851) (concat && V850)) (true V850)))
147
+ (defun findall (V2927 V2928 V2929 V2930 V2931) (let B (shen.newpv V2930) (let A (shen.newpv V2930) (do (shen.incinfs) (bind A (gensym shen.a) V2930 (freeze (bind B (set (shen.lazyderef A V2930) ()) V2930 (freeze (shen.findallhelp V2927 V2928 V2929 A V2930 V2931)))))))))
3047
148
 
3048
- (defun shen-<trules> (V856)
3049
- (let Result
3050
- (let Parse_<trule> (shen-<trule> V856)
3051
- (if (not (= (fail) Parse_<trule>))
3052
- (let Parse_<trules> (shen-<trules> Parse_<trule>)
3053
- (if (not (= (fail) Parse_<trules>))
3054
- (shen-reassemble (fst Parse_<trules>)
3055
- (cons (snd Parse_<trule>) (snd Parse_<trules>)))
3056
- (fail)))
3057
- (fail)))
3058
- (if (= Result (fail))
3059
- (let Result
3060
- (let Parse_<trule> (shen-<trule> V856)
3061
- (if (not (= (fail) Parse_<trule>))
3062
- (shen-reassemble (fst Parse_<trule>) (cons (snd Parse_<trule>) ()))
3063
- (fail)))
3064
- (if (= Result (fail)) (fail) Result))
3065
- Result)))
149
+ (defun shen.t*-defcc (V2932 V2933 V2934 V2935 V2936) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let V2419 (shen.lazyderef V2932 V2935) (if (cons? V2419) (let V2420 (shen.lazyderef (hd V2419) V2935) (if (= defcc V2420) (let V2421 (shen.lazyderef (tl V2419) V2935) (if (cons? V2421) (let F (hd V2421) (let V2422 (shen.lazyderef (tl V2421) V2935) (if (cons? V2422) (let V2423 (shen.lazyderef (hd V2422) V2935) (if (= { V2423) (let V2424 (shen.lazyderef (tl V2422) V2935) (if (cons? V2424) (let V2425 (shen.lazyderef (hd V2424) V2935) (if (cons? V2425) (let V2426 (shen.lazyderef (hd V2425) V2935) (if (= list V2426) (let V2427 (shen.lazyderef (tl V2425) V2935) (if (cons? V2427) (let A (hd V2427) (let V2428 (shen.lazyderef (tl V2427) V2935) (if (= () V2428) (let V2429 (shen.lazyderef (tl V2424) V2935) (if (cons? V2429) (let V2430 (shen.lazyderef (hd V2429) V2935) (if (= ==> V2430) (let V2431 (shen.lazyderef (tl V2429) V2935) (if (cons? V2431) (let B (hd V2431) (let V2432 (shen.lazyderef (tl V2431) V2935) (if (cons? V2432) (let V2433 (shen.lazyderef (hd V2432) V2935) (if (= } V2433) (let Rest (tl V2432) (let Rest& (shen.newpv V2935) (let Rest&& (shen.newpv V2935) (let Rules (shen.newpv V2935) (let ListA&& (shen.newpv V2935) (let B&& (shen.newpv V2935) (let Sig (shen.newpv V2935) (let Declare (shen.newpv V2935) (do (shen.incinfs) (bind Sig (shen.placeholders (cons (cons list (cons (shen.lazyderef A V2935) ())) (cons ==> (cons (shen.lazyderef B V2935) ()))) (shen.extract_vars (cons (cons list (cons (shen.lazyderef A V2935) ())) (cons ==> (cons (shen.lazyderef B V2935) ()))))) V2935 (freeze (bind ListA&& (hd (shen.lazyderef Sig V2935)) V2935 (freeze (bind B&& (hd (tl (tl (shen.lazyderef Sig V2935)))) V2935 (freeze (bind Rest& (shen.plug-wildcards (shen.lazyderef Rest V2935)) V2935 (freeze (bind Rest&& (shen.placeholders (shen.lazyderef Rest& V2935) (shen.extract_vars (shen.lazyderef Rest& V2935))) V2935 (freeze (shen.get-rules Rules Rest&& V2935 (freeze (cut Throwcontrol V2935 (freeze (shen.tc-rules F Rules ListA&& B&& (cons (cons F (cons : (cons Sig ()))) V2934) 1 V2935 (freeze (unify V2933 (cons (cons list (cons A ())) (cons ==> (cons B ()))) V2935 (freeze (bind Declare (declare (shen.lazyderef F V2935) (cons (cons list (cons (shen.lazyderef A V2935) ())) (cons ==> (cons (shen.lazyderef B V2935) ())))) V2935 V2936)))))))))))))))))))))))))))) false)) false))) false)) false)) false)) false))) false)) false)) false)) false)) false)) false))) false)) false)) false)))))
3066
150
 
3067
- (defun shen-<trule> (V861)
3068
- (let Result
3069
- (let Parse_<patterns> (shen-<patterns> V861)
3070
- (if (not (= (fail) Parse_<patterns>))
3071
- (let Parse_<arrow> (shen-<arrow> Parse_<patterns>)
3072
- (if (not (= (fail) Parse_<arrow>))
3073
- (let Parse_<action> (shen-<action> Parse_<arrow>)
3074
- (if (not (= (fail) Parse_<action>))
3075
- (let Parse_<guard?> (shen-<guard?> Parse_<action>)
3076
- (if (not (= (fail) Parse_<guard?>))
3077
- (shen-reassemble (fst Parse_<guard?>)
3078
- (let Vars (shen-extract_vars (snd Parse_<patterns>))
3079
- (let Patterns (shen-placeholders (snd Parse_<patterns>) Vars)
3080
- (let Action
3081
- (shen-placeholders (shen-curry (snd Parse_<action>)) Vars)
3082
- (let Guard
3083
- (shen-placeholders (shen-curry (snd Parse_<guard?>)) Vars)
3084
- (shen-form-rule Patterns (snd Parse_<arrow>) Action Guard))))))
3085
- (fail)))
3086
- (fail)))
3087
- (fail)))
3088
- (fail)))
3089
- (if (= Result (fail)) (fail) Result)))
151
+ (defun shen.plug-wildcards (V2937) (cond ((cons? V2937) (map shen.plug-wildcards V2937)) ((= V2937 _) (gensym (intern "X"))) (true V2937)))
3090
152
 
3091
- (defun shen-form-rule (V862 V863 V864 V865)
3092
- (cond
3093
- ((= shen-forward V863)
3094
- (cons V862
3095
- (cons (if (= V865 shen-skip) V864 (cons where (cons V865 (cons V864 ()))))
3096
- ())))
3097
- ((and (= shen-backward V863)
3098
- (and (cons? V864)
3099
- (and (cons? (hd V864))
3100
- (and (= fail-if (hd (hd V864)))
3101
- (and (cons? (tl (hd V864)))
3102
- (and (= () (tl (tl (hd V864))))
3103
- (and (cons? (tl V864)) (= () (tl (tl V864))))))))))
3104
- (cons V862
3105
- (cons
3106
- (if (= V865 shen-skip)
3107
- (cons where
3108
- (cons (cons not (cons (cons (hd (tl (hd V864))) (tl V864)) ()))
3109
- (tl V864)))
3110
- (cons where
3111
- (cons
3112
- (cons (cons and (cons V865 ()))
3113
- (cons (cons not (cons (cons (hd (tl (hd V864))) (tl V864)) ())) ()))
3114
- (tl V864))))
3115
- ())))
3116
- ((= shen-backward V863)
3117
- (cons V862
3118
- (cons
3119
- (if (= V865 shen-skip)
3120
- (cons where
3121
- (cons
3122
- (cons not
3123
- (cons (cons (cons == (cons V864 ())) (cons (cons fail ()) ()))
3124
- ()))
3125
- (cons V864 ())))
3126
- (cons where
3127
- (cons
3128
- (cons (cons and (cons V865 ()))
3129
- (cons
3130
- (cons not
3131
- (cons (cons (cons == (cons V864 ())) (cons (cons fail ()) ()))
3132
- ()))
3133
- ()))
3134
- (cons V864 ()))))
3135
- ())))
3136
- (true (shen-f_error shen-form-rule))))
153
+ (defun shen.get-rules (V2938 V2939 V2940 V2941) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2412 (shen.lazyderef V2938 V2940) (if (= () V2412) (let V2413 (shen.lazyderef V2939 V2940) (if (= () V2413) (do (shen.incinfs) (cut Throwcontrol V2940 V2941)) false)) (if (shen.pvar? V2412) (do (shen.bindv V2412 () V2940) (let Result (let V2414 (shen.lazyderef V2939 V2940) (if (= () V2414) (do (shen.incinfs) (cut Throwcontrol V2940 V2941)) false)) (do (shen.unbindv V2412 V2940) Result))) false))) (if (= Case false) (let V2415 (shen.lazyderef V2938 V2940) (if (cons? V2415) (let Rule (hd V2415) (let Rules (tl V2415) (let Other (shen.newpv V2940) (do (shen.incinfs) (shen.first-rule V2939 Rule Other V2940 (freeze (cut Throwcontrol V2940 (freeze (shen.get-rules Rules Other V2940 V2941))))))))) (if (shen.pvar? V2415) (let Rule (shen.newpv V2940) (let Rules (shen.newpv V2940) (do (shen.bindv V2415 (cons Rule Rules) V2940) (let Result (let Other (shen.newpv V2940) (do (shen.incinfs) (shen.first-rule V2939 Rule Other V2940 (freeze (cut Throwcontrol V2940 (freeze (shen.get-rules Rules Other V2940 V2941))))))) (do (shen.unbindv V2415 V2940) Result))))) false))) Case)))))
3137
154
 
3138
- (defun shen-<guard?> (V870)
3139
- (let Result
3140
- (if (and (cons? (fst V870)) (= where (hd (fst V870))))
3141
- (let Parse_<guard>
3142
- (shen-<guard> (shen-reassemble (tl (fst V870)) (snd V870)))
3143
- (if (not (= (fail) Parse_<guard>))
3144
- (shen-reassemble (fst Parse_<guard>) (snd Parse_<guard>)) (fail)))
3145
- (fail))
3146
- (if (= Result (fail))
3147
- (let Result
3148
- (let Parse_<e> (<e> V870)
3149
- (if (not (= (fail) Parse_<e>)) (shen-reassemble (fst Parse_<e>) shen-skip)
3150
- (fail)))
3151
- (if (= Result (fail)) (fail) Result))
3152
- Result)))
155
+ (defun shen.first-rule (V2942 V2943 V2944 V2945 V2946) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2405 (shen.lazyderef V2942 V2945) (if (cons? V2405) (let V2406 (shen.lazyderef (hd V2405) V2945) (if (= ; V2406) (let Other2400 (tl V2405) (let V2407 (shen.lazyderef V2943 V2945) (if (= () V2407) (do (shen.incinfs) (unify! V2944 Other2400 V2945 (freeze (cut Throwcontrol V2945 V2946)))) (if (shen.pvar? V2407) (do (shen.bindv V2407 () V2945) (let Result (do (shen.incinfs) (unify! V2944 Other2400 V2945 (freeze (cut Throwcontrol V2945 V2946)))) (do (shen.unbindv V2407 V2945) Result))) false)))) false)) false)) (if (= Case false) (let V2408 (shen.lazyderef V2942 V2945) (if (cons? V2408) (let X2401 (hd V2408) (let Rest (tl V2408) (let V2409 (shen.lazyderef V2943 V2945) (if (cons? V2409) (let X (hd V2409) (let Rule (tl V2409) (do (shen.incinfs) (unify! X X2401 V2945 (freeze (shen.first-rule Rest Rule V2944 V2945 V2946)))))) (if (shen.pvar? V2409) (let X (shen.newpv V2945) (let Rule (shen.newpv V2945) (do (shen.bindv V2409 (cons X Rule) V2945) (let Result (do (shen.incinfs) (unify! X X2401 V2945 (freeze (shen.first-rule Rest Rule V2944 V2945 V2946)))) (do (shen.unbindv V2409 V2945) Result))))) false))))) false)) Case)))))
3153
156
 
3154
- (defun shen-<arrow> (V875)
3155
- (let Result
3156
- (if (and (cons? (fst V875)) (= -> (hd (fst V875))))
3157
- (shen-reassemble (fst (shen-reassemble (tl (fst V875)) (snd V875)))
3158
- shen-forward)
3159
- (fail))
3160
- (if (= Result (fail))
3161
- (let Result
3162
- (if (and (cons? (fst V875)) (= <- (hd (fst V875))))
3163
- (shen-reassemble (fst (shen-reassemble (tl (fst V875)) (snd V875)))
3164
- shen-backward)
3165
- (fail))
3166
- (if (= Result (fail)) (fail) Result))
3167
- Result)))
157
+ (defun shen.tc-rules (V2947 V2948 V2949 V2950 V2951 V2952 V2953 V2954) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2394 (shen.lazyderef V2948 V2953) (if (= () V2394) (do (shen.incinfs) (thaw V2954)) false)) (if (= Case false) (let V2395 (shen.lazyderef V2948 V2953) (if (cons? V2395) (let Rule (hd V2395) (let Rules (tl V2395) (let V2396 (shen.lazyderef V2949 V2953) (if (cons? V2396) (let V2397 (shen.lazyderef (hd V2396) V2953) (if (= list V2397) (let V2398 (shen.lazyderef (tl V2396) V2953) (if (cons? V2398) (let A (hd V2398) (let V2399 (shen.lazyderef (tl V2398) V2953) (if (= () V2399) (let M (shen.newpv V2953) (do (shen.incinfs) (shen.tc-rule V2947 Rule A V2950 V2951 V2952 V2953 (freeze (bind M (+ (shen.deref V2952 V2953) 1) V2953 (freeze (cut Throwcontrol V2953 (freeze (shen.tc-rules V2947 Rules (cons list (cons A ())) V2950 V2951 M V2953 V2954))))))))) false))) false)) false)) false)))) false)) Case)))))
3168
158
 
3169
- (defun shen-errordef (V876) (interror "syntax error in ~A~%" (@p V876 ())))
159
+ (defun shen.tc-rule (V2955 V2956 V2957 V2958 V2959 V2960 V2961 V2962) (let Case (do (shen.incinfs) (shen.check-defcc-rule V2956 V2957 V2958 V2959 V2961 V2962)) (if (= Case false) (let Err (shen.newpv V2961) (do (shen.incinfs) (bind Err (simple-error (cn "type error in rule " (shen.app (shen.lazyderef V2960 V2961) (cn " of " (shen.app (shen.lazyderef V2955 V2961) "" shen.a)) shen.a))) V2961 V2962))) Case)))
3170
160
 
3171
- (defun shen-t*-rules (V877 V878 V879 V880 V881 V882 V883)
3172
- (let Throwcontrol (shen-catchpoint)
3173
- (shen-cutpoint Throwcontrol
3174
- (let Case
3175
- (let V516 (shen-lazyderef V877 V882)
3176
- (if (= () V516) (do (shen-incinfs) (thaw V883)) false))
3177
- (if (= Case false)
3178
- (let V517 (shen-lazyderef V877 V882)
3179
- (if (cons? V517)
3180
- (let Rule (hd V517)
3181
- (let Rules (tl V517)
3182
- (let M (shen-newpv V882)
3183
- (do (shen-incinfs)
3184
- (shen-t*-rule Rule V878 V879 V880 V881 V882
3185
- (freeze
3186
- (cut Throwcontrol V882
3187
- (freeze
3188
- (bind M (+ (shen-lazyderef V879 V882) 1) V882
3189
- (freeze
3190
- (shen-t*-rules Rules V878 M V880 V881 V882 V883)))))))))))
3191
- false))
3192
- Case)))))
161
+ (defun shen.check-defcc-rule (V2963 V2964 V2965 V2966 V2967 V2968) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Syntax (shen.newpv V2967) (let Semantics (shen.newpv V2967) (let SynHyps (shen.newpv V2967) (do (shen.incinfs) (shen.get-syntax+semantics Syntax Semantics V2963 V2967 (freeze (cut Throwcontrol V2967 (freeze (shen.syntax-hyps Syntax V2966 SynHyps V2964 V2967 (freeze (cut Throwcontrol V2967 (freeze (shen.syntax-check Syntax V2964 SynHyps V2967 (freeze (cut Throwcontrol V2967 (freeze (shen.semantics-check Semantics V2965 SynHyps V2967 V2968))))))))))))))))))))
3193
162
 
3194
- (defun shen-t*-rule (V884 V885 V886 V887 V888 V889 V890)
3195
- (let Case (do (shen-incinfs) (shen-t*-ruleh V884 V885 V888 V889 V890))
3196
- (if (= Case false)
3197
- (let Error (shen-newpv V889)
3198
- (do (shen-incinfs)
3199
- (bind Error
3200
- (shen-type-insecure-rule-error-message (shen-lazyderef V886 V889)
3201
- (shen-lazyderef V887 V889))
3202
- V889 V890)))
3203
- Case)))
163
+ (defun shen.syntax-hyps (V2969 V2970 V2971 V2972 V2973 V2974) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2365 (shen.lazyderef V2969 V2973) (if (= () V2365) (do (shen.incinfs) (unify! V2971 V2970 V2973 V2974)) false)) (if (= Case false) (let Case (let V2366 (shen.lazyderef V2969 V2973) (if (cons? V2366) (let V2367 (shen.lazyderef (hd V2366) V2973) (if (cons? V2367) (let X (hd V2367) (let Y (tl V2367) (let Z (tl V2366) (let W (shen.newpv V2973) (do (shen.incinfs) (cut Throwcontrol V2973 (freeze (shen.conc (cons X Y) Z W V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps W V2970 V2971 V2972 V2973 V2974)))))))))))) false)) false)) (if (= Case false) (let Case (let V2368 (shen.lazyderef V2969 V2973) (if (cons? V2368) (let X2359 (hd V2368) (let Y (tl V2368) (let V2369 (shen.lazyderef V2971 V2973) (if (cons? V2369) (let V2370 (shen.lazyderef (hd V2369) V2973) (if (cons? V2370) (let X (hd V2370) (let V2371 (shen.lazyderef (tl V2370) V2973) (if (cons? V2371) (let V2372 (shen.lazyderef (hd V2371) V2973) (if (= : V2372) (let V2373 (shen.lazyderef (tl V2371) V2973) (if (cons? V2373) (let A2360 (hd V2373) (let V2374 (shen.lazyderef (tl V2373) V2973) (if (= () V2374) (let SynHyps (tl V2369) (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974))))))))))) (if (shen.pvar? V2374) (do (shen.bindv V2374 () V2973) (let Result (let SynHyps (tl V2369) (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974))))))))))) (do (shen.unbindv V2374 V2973) Result))) false)))) (if (shen.pvar? V2373) (let A2360 (shen.newpv V2973) (do (shen.bindv V2373 (cons A2360 ()) V2973) (let Result (let SynHyps (tl V2369) (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974))))))))))) (do (shen.unbindv V2373 V2973) Result)))) false))) (if (shen.pvar? V2372) (do (shen.bindv V2372 : V2973) (let Result (let V2375 (shen.lazyderef (tl V2371) V2973) (if (cons? V2375) (let A2360 (hd V2375) (let V2376 (shen.lazyderef (tl V2375) V2973) (if (= () V2376) (let SynHyps (tl V2369) (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974))))))))))) (if (shen.pvar? V2376) (do (shen.bindv V2376 () V2973) (let Result (let SynHyps (tl V2369) (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974))))))))))) (do (shen.unbindv V2376 V2973) Result))) false)))) (if (shen.pvar? V2375) (let A2360 (shen.newpv V2973) (do (shen.bindv V2375 (cons A2360 ()) V2973) (let Result (let SynHyps (tl V2369) (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974))))))))))) (do (shen.unbindv V2375 V2973) Result)))) false))) (do (shen.unbindv V2372 V2973) Result))) false))) (if (shen.pvar? V2371) (let A2360 (shen.newpv V2973) (do (shen.bindv V2371 (cons : (cons A2360 ())) V2973) (let Result (let SynHyps (tl V2369) (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974))))))))))) (do (shen.unbindv V2371 V2973) Result)))) false)))) (if (shen.pvar? V2370) (let X (shen.newpv V2973) (let A2360 (shen.newpv V2973) (do (shen.bindv V2370 (cons X (cons : (cons A2360 ()))) V2973) (let Result (let SynHyps (tl V2369) (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974))))))))))) (do (shen.unbindv V2370 V2973) Result))))) false))) (if (shen.pvar? V2369) (let X (shen.newpv V2973) (let A2360 (shen.newpv V2973) (let SynHyps (shen.newpv V2973) (do (shen.bindv V2369 (cons (cons X (cons : (cons A2360 ()))) SynHyps) V2973) (let Result (do (shen.incinfs) (unify! V2972 A2360 V2973 (freeze (unify! X X2359 V2973 (freeze (fwhen (shen.placeholder? (shen.deref X V2973)) V2973 (freeze (cut Throwcontrol V2973 (freeze (shen.syntax-hyps Y V2970 SynHyps V2972 V2973 V2974)))))))))) (do (shen.unbindv V2369 V2973) Result)))))) false))))) false)) (if (= Case false) (let V2377 (shen.lazyderef V2969 V2973) (if (cons? V2377) (let Y (tl V2377) (do (shen.incinfs) (shen.syntax-hyps Y V2970 V2971 V2972 V2973 V2974))) false)) Case)) Case)) Case)))))
3204
164
 
3205
- (defun shen-t*-ruleh (V1512 V1513 V1514 V1515 V1516)
3206
- (let Throwcontrol (shen-catchpoint)
3207
- (shen-cutpoint Throwcontrol
3208
- (let Case
3209
- (let V1380 (shen-lazyderef V1512 V1515)
3210
- (if (cons? V1380)
3211
- (let V1381 (shen-lazyderef (hd V1380) V1515)
3212
- (if (= () V1381)
3213
- (let V1382 (shen-lazyderef (tl V1380) V1515)
3214
- (if (cons? V1382)
3215
- (let Result (hd V1382)
3216
- (let V1383 (shen-lazyderef (tl V1382) V1515)
3217
- (if (= () V1383)
3218
- (let V1384 (shen-lazyderef V1513 V1515)
3219
- (if (cons? V1384)
3220
- (let V1385 (shen-lazyderef (hd V1384) V1515)
3221
- (if (= --> V1385)
3222
- (let V1386 (shen-lazyderef (tl V1384) V1515)
3223
- (if (cons? V1386)
3224
- (let A (hd V1386)
3225
- (let V1387 (shen-lazyderef (tl V1386) V1515)
3226
- (if (= () V1387)
3227
- (do (shen-incinfs)
3228
- (cut Throwcontrol V1515
3229
- (freeze (shen-th* Result A V1514 V1515 V1516))))
3230
- (if (shen-pvar? V1387)
3231
- (do (shen-bindv V1387 () V1515)
3232
- (let Result
3233
- (do (shen-incinfs)
3234
- (cut Throwcontrol V1515
3235
- (freeze (shen-th* Result A V1514 V1515 V1516))))
3236
- (do (shen-unbindv V1387 V1515) Result)))
3237
- false))))
3238
- (if (shen-pvar? V1386)
3239
- (let A (shen-newpv V1515)
3240
- (do (shen-bindv V1386 (cons A ()) V1515)
3241
- (let Result
3242
- (do (shen-incinfs)
3243
- (cut Throwcontrol V1515
3244
- (freeze (shen-th* Result A V1514 V1515 V1516))))
3245
- (do (shen-unbindv V1386 V1515) Result))))
3246
- false)))
3247
- (if (shen-pvar? V1385)
3248
- (do (shen-bindv V1385 --> V1515)
3249
- (let Result
3250
- (let V1388 (shen-lazyderef (tl V1384) V1515)
3251
- (if (cons? V1388)
3252
- (let A (hd V1388)
3253
- (let V1389 (shen-lazyderef (tl V1388) V1515)
3254
- (if (= () V1389)
3255
- (do (shen-incinfs)
3256
- (cut Throwcontrol V1515
3257
- (freeze (shen-th* Result A V1514 V1515 V1516))))
3258
- (if (shen-pvar? V1389)
3259
- (do (shen-bindv V1389 () V1515)
3260
- (let Result
3261
- (do (shen-incinfs)
3262
- (cut Throwcontrol V1515
3263
- (freeze (shen-th* Result A V1514 V1515 V1516))))
3264
- (do (shen-unbindv V1389 V1515) Result)))
3265
- false))))
3266
- (if (shen-pvar? V1388)
3267
- (let A (shen-newpv V1515)
3268
- (do (shen-bindv V1388 (cons A ()) V1515)
3269
- (let Result
3270
- (do (shen-incinfs)
3271
- (cut Throwcontrol V1515
3272
- (freeze (shen-th* Result A V1514 V1515 V1516))))
3273
- (do (shen-unbindv V1388 V1515) Result))))
3274
- false)))
3275
- (do (shen-unbindv V1385 V1515) Result)))
3276
- false)))
3277
- (if (shen-pvar? V1384)
3278
- (let A (shen-newpv V1515)
3279
- (do (shen-bindv V1384 (cons --> (cons A ())) V1515)
3280
- (let Result
3281
- (do (shen-incinfs)
3282
- (cut Throwcontrol V1515
3283
- (freeze (shen-th* Result A V1514 V1515 V1516))))
3284
- (do (shen-unbindv V1384 V1515) Result))))
3285
- false)))
3286
- false)))
3287
- false))
3288
- false))
3289
- false))
3290
- (if (= Case false)
3291
- (let V1390 (shen-lazyderef V1512 V1515)
3292
- (if (cons? V1390)
3293
- (let Patterns (hd V1390)
3294
- (let V1391 (shen-lazyderef (tl V1390) V1515)
3295
- (if (cons? V1391)
3296
- (let Result (hd V1391)
3297
- (let V1392 (shen-lazyderef (tl V1391) V1515)
3298
- (if (= () V1392)
3299
- (let NewHyp (shen-newpv V1515)
3300
- (let B (shen-newpv V1515)
3301
- (let AllHyp (shen-newpv V1515)
3302
- (do (shen-incinfs)
3303
- (shen-t*-patterns Patterns V1513 NewHyp B V1515
3304
- (freeze
3305
- (cut Throwcontrol V1515
3306
- (freeze
3307
- (shen-conc NewHyp V1514 AllHyp V1515
3308
- (freeze
3309
- (cut Throwcontrol V1515
3310
- (freeze
3311
- (shen-th* Result B AllHyp V1515 V1516)))))))))))))
3312
- false)))
3313
- false)))
3314
- false))
3315
- Case)))))
165
+ (defun shen.get-syntax+semantics (V2975 V2976 V2977 V2978 V2979) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2331 (shen.lazyderef V2975 V2978) (if (= () V2331) (let V2332 (shen.lazyderef V2977 V2978) (if (cons? V2332) (let V2333 (shen.lazyderef (hd V2332) V2978) (if (= := V2333) (let V2334 (shen.lazyderef (tl V2332) V2978) (if (cons? V2334) (let Semantics (hd V2334) (let V2335 (shen.lazyderef (tl V2334) V2978) (if (= () V2335) (do (shen.incinfs) (cut Throwcontrol V2978 (freeze (bind V2976 (shen.lazyderef Semantics V2978) V2978 V2979)))) false))) false)) false)) false)) (if (shen.pvar? V2331) (do (shen.bindv V2331 () V2978) (let Result (let V2336 (shen.lazyderef V2977 V2978) (if (cons? V2336) (let V2337 (shen.lazyderef (hd V2336) V2978) (if (= := V2337) (let V2338 (shen.lazyderef (tl V2336) V2978) (if (cons? V2338) (let Semantics (hd V2338) (let V2339 (shen.lazyderef (tl V2338) V2978) (if (= () V2339) (do (shen.incinfs) (cut Throwcontrol V2978 (freeze (bind V2976 (shen.lazyderef Semantics V2978) V2978 V2979)))) false))) false)) false)) false)) (do (shen.unbindv V2331 V2978) Result))) false))) (if (= Case false) (let Case (let V2340 (shen.lazyderef V2975 V2978) (if (= () V2340) (let V2341 (shen.lazyderef V2977 V2978) (if (cons? V2341) (let V2342 (shen.lazyderef (hd V2341) V2978) (if (= := V2342) (let V2343 (shen.lazyderef (tl V2341) V2978) (if (cons? V2343) (let Semantics (hd V2343) (let V2344 (shen.lazyderef (tl V2343) V2978) (if (cons? V2344) (let V2345 (shen.lazyderef (hd V2344) V2978) (if (= where V2345) (let V2346 (shen.lazyderef (tl V2344) V2978) (if (cons? V2346) (let G (hd V2346) (let V2347 (shen.lazyderef (tl V2346) V2978) (if (= () V2347) (do (shen.incinfs) (cut Throwcontrol V2978 (freeze (bind V2976 (cons where (cons (shen.lazyderef G V2978) (cons (shen.lazyderef Semantics V2978) ()))) V2978 V2979)))) false))) false)) false)) false))) false)) false)) false)) (if (shen.pvar? V2340) (do (shen.bindv V2340 () V2978) (let Result (let V2348 (shen.lazyderef V2977 V2978) (if (cons? V2348) (let V2349 (shen.lazyderef (hd V2348) V2978) (if (= := V2349) (let V2350 (shen.lazyderef (tl V2348) V2978) (if (cons? V2350) (let Semantics (hd V2350) (let V2351 (shen.lazyderef (tl V2350) V2978) (if (cons? V2351) (let V2352 (shen.lazyderef (hd V2351) V2978) (if (= where V2352) (let V2353 (shen.lazyderef (tl V2351) V2978) (if (cons? V2353) (let G (hd V2353) (let V2354 (shen.lazyderef (tl V2353) V2978) (if (= () V2354) (do (shen.incinfs) (cut Throwcontrol V2978 (freeze (bind V2976 (cons where (cons (shen.lazyderef G V2978) (cons (shen.lazyderef Semantics V2978) ()))) V2978 V2979)))) false))) false)) false)) false))) false)) false)) false)) (do (shen.unbindv V2340 V2978) Result))) false))) (if (= Case false) (let V2355 (shen.lazyderef V2975 V2978) (if (cons? V2355) (let X2327 (hd V2355) (let Syntax (tl V2355) (let V2356 (shen.lazyderef V2977 V2978) (if (cons? V2356) (let X (hd V2356) (let Rule (tl V2356) (do (shen.incinfs) (unify! X X2327 V2978 (freeze (shen.get-syntax+semantics Syntax V2976 Rule V2978 V2979)))))) false)))) (if (shen.pvar? V2355) (let X2327 (shen.newpv V2978) (let Syntax (shen.newpv V2978) (do (shen.bindv V2355 (cons X2327 Syntax) V2978) (let Result (let V2357 (shen.lazyderef V2977 V2978) (if (cons? V2357) (let X (hd V2357) (let Rule (tl V2357) (do (shen.incinfs) (unify! X X2327 V2978 (freeze (shen.get-syntax+semantics Syntax V2976 Rule V2978 V2979)))))) false)) (do (shen.unbindv V2355 V2978) Result))))) false))) Case)) Case)))))
3316
166
 
3317
- (defun shen-type-insecure-rule-error-message (V896 V897)
3318
- (interror "type error in rule ~A of ~A~%" (@p V896 (@p V897 ()))))
167
+ (defun shen.syntax-check (V2980 V2981 V2982 V2983 V2984) (let Throwcontrol (shen.catchpoint) (shen.cutpoint Throwcontrol (let Case (let V2324 (shen.lazyderef V2980 V2983) (if (= () V2324) (do (shen.incinfs) (thaw V2984)) false)) (if (= Case false) (let Case (let V2325 (shen.lazyderef V2980 V2983) (if (cons? V2325) (let X (hd V2325) (let Syntax (tl V2325) (let C (shen.newpv V2983) (let X&& (shen.newpv V2983) (let B (shen.newpv V2983) (do (shen.incinfs) (fwhen (shen.grammar_symbol? (shen.lazyderef X V2983)) V2983 (freeze (cut Throwcontrol V2983 (freeze (shen.t* (cons X (cons : (cons (cons (cons list (cons B ())) (cons ==> (cons C ()))) ()))) V2982 V2983 (freeze (cut Throwcontrol V2983 (freeze (bind X&& (concat && (shen.lazyderef X V2983)) V2983 (freeze (cut Throwcontrol V2983 (freeze (shen.t* (cons X&& (cons : (cons (cons list (cons V2981 ())) ()))) (cons (cons X&& (cons : (cons (cons list (cons B ())) ()))) V2982) V2983 (freeze (cut Throwcontrol V2983 (freeze (shen.syntax-check Syntax V2981 V2982 V2983 V2984))))))))))))))))))))))) false)) (if (= Case false) (let V2326 (shen.lazyderef V2980 V2983) (if (cons? V2326) (let X (hd V2326) (let Syntax (tl V2326) (do (shen.incinfs) (shen.t* (cons X (cons : (cons V2981 ()))) V2982 V2983 (freeze (cut Throwcontrol V2983 (freeze (shen.syntax-check Syntax V2981 V2982 V2983 V2984)))))))) false)) Case)) Case)))))
3319
168
 
3320
- (defun shen-t*-patterns (V898 V899 V900 V901 V902 V903)
3321
- (let Throwcontrol (shen-catchpoint)
3322
- (shen-cutpoint Throwcontrol
3323
- (let Case
3324
- (let V484 (shen-lazyderef V898 V902)
3325
- (if (= () V484)
3326
- (let V485 (shen-lazyderef V900 V902)
3327
- (if (= () V485) (do (shen-incinfs) (unify! V901 V899 V902 V903))
3328
- (if (shen-pvar? V485)
3329
- (do (shen-bindv V485 () V902)
3330
- (let Result (do (shen-incinfs) (unify! V901 V899 V902 V903))
3331
- (do (shen-unbindv V485 V902) Result)))
3332
- false)))
3333
- false))
3334
- (if (= Case false)
3335
- (let V486 (shen-lazyderef V898 V902)
3336
- (if (cons? V486)
3337
- (let Pattern478 (hd V486)
3338
- (let Patterns (tl V486)
3339
- (let V487 (shen-lazyderef V899 V902)
3340
- (if (cons? V487)
3341
- (let A479 (hd V487)
3342
- (let V488 (shen-lazyderef (tl V487) V902)
3343
- (if (cons? V488)
3344
- (let V489 (shen-lazyderef (hd V488) V902)
3345
- (if (= --> V489)
3346
- (let V490 (shen-lazyderef (tl V488) V902)
3347
- (if (cons? V490)
3348
- (let B (hd V490)
3349
- (let V491 (shen-lazyderef (tl V490) V902)
3350
- (if (= () V491)
3351
- (let V492 (shen-lazyderef V900 V902)
3352
- (if (cons? V492)
3353
- (let V493 (shen-lazyderef (hd V492) V902)
3354
- (if (cons? V493)
3355
- (let Pattern (hd V493)
3356
- (let V494 (shen-lazyderef (tl V493) V902)
3357
- (if (cons? V494)
3358
- (let V495 (shen-lazyderef (hd V494) V902)
3359
- (if (= : V495)
3360
- (let V496 (shen-lazyderef (tl V494) V902)
3361
- (if (cons? V496)
3362
- (let A (hd V496)
3363
- (let V497 (shen-lazyderef (tl V496) V902)
3364
- (if (= () V497)
3365
- (let Hyp (tl V492)
3366
- (let Assume (shen-newpv V902)
3367
- (do (shen-incinfs)
3368
- (unify! A A479 V902
3369
- (freeze
3370
- (unify! Pattern Pattern478 V902
3371
- (freeze
3372
- (shen-t*-assume Pattern Assume V902
3373
- (freeze
3374
- (cut Throwcontrol V902
3375
- (freeze
3376
- (shen-th* Pattern A Assume V902
3377
- (freeze
3378
- (cut Throwcontrol V902
3379
- (freeze
3380
- (shen-t*-patterns Patterns B
3381
- Hyp V901 V902
3382
- V903))))))))))))))))
3383
- (if (shen-pvar? V497)
3384
- (do (shen-bindv V497 () V902)
3385
- (let Result
3386
- (let Hyp (tl V492)
3387
- (let Assume (shen-newpv V902)
3388
- (do (shen-incinfs)
3389
- (unify! A A479 V902
3390
- (freeze
3391
- (unify! Pattern Pattern478 V902
3392
- (freeze
3393
- (shen-t*-assume Pattern Assume
3394
- V902
3395
- (freeze
3396
- (cut Throwcontrol V902
3397
- (freeze
3398
- (shen-th* Pattern A Assume
3399
- V902
3400
- (freeze
3401
- (cut Throwcontrol V902
3402
- (freeze
3403
- (shen-t*-patterns Patterns
3404
- B Hyp V901 V902
3405
- V903))))))))))))))))
3406
- (do (shen-unbindv V497 V902) Result)))
3407
- false))))
3408
- (if (shen-pvar? V496)
3409
- (let A (shen-newpv V902)
3410
- (do (shen-bindv V496 (cons A ()) V902)
3411
- (let Result
3412
- (let Hyp (tl V492)
3413
- (let Assume (shen-newpv V902)
3414
- (do (shen-incinfs)
3415
- (unify! A A479 V902
3416
- (freeze
3417
- (unify! Pattern Pattern478 V902
3418
- (freeze
3419
- (shen-t*-assume Pattern Assume V902
3420
- (freeze
3421
- (cut Throwcontrol V902
3422
- (freeze
3423
- (shen-th* Pattern A Assume V902
3424
- (freeze
3425
- (cut Throwcontrol V902
3426
- (freeze
3427
- (shen-t*-patterns Patterns B
3428
- Hyp V901 V902
3429
- V903))))))))))))))))
3430
- (do (shen-unbindv V496 V902) Result))))
3431
- false)))
3432
- (if (shen-pvar? V495)
3433
- (do (shen-bindv V495 : V902)
3434
- (let Result
3435
- (let V498 (shen-lazyderef (tl V494) V902)
3436
- (if (cons? V498)
3437
- (let A (hd V498)
3438
- (let V499 (shen-lazyderef (tl V498) V902)
3439
- (if (= () V499)
3440
- (let Hyp (tl V492)
3441
- (let Assume (shen-newpv V902)
3442
- (do (shen-incinfs)
3443
- (unify! A A479 V902
3444
- (freeze
3445
- (unify! Pattern Pattern478 V902
3446
- (freeze
3447
- (shen-t*-assume Pattern Assume
3448
- V902
3449
- (freeze
3450
- (cut Throwcontrol V902
3451
- (freeze
3452
- (shen-th* Pattern A Assume
3453
- V902
3454
- (freeze
3455
- (cut Throwcontrol V902
3456
- (freeze
3457
- (shen-t*-patterns Patterns
3458
- B Hyp V901 V902
3459
- V903))))))))))))))))
3460
- (if (shen-pvar? V499)
3461
- (do (shen-bindv V499 () V902)
3462
- (let Result
3463
- (let Hyp (tl V492)
3464
- (let Assume (shen-newpv V902)
3465
- (do (shen-incinfs)
3466
- (unify! A A479 V902
3467
- (freeze
3468
- (unify! Pattern Pattern478 V902
3469
- (freeze
3470
- (shen-t*-assume Pattern Assume
3471
- V902
3472
- (freeze
3473
- (cut Throwcontrol V902
3474
- (freeze
3475
- (shen-th* Pattern A Assume
3476
- V902
3477
- (freeze
3478
- (cut Throwcontrol V902
3479
- (freeze
3480
- (shen-t*-patterns
3481
- Patterns B Hyp V901
3482
- V902
3483
- V903))))))))))))))))
3484
- (do (shen-unbindv V499 V902) Result)))
3485
- false))))
3486
- (if (shen-pvar? V498)
3487
- (let A (shen-newpv V902)
3488
- (do (shen-bindv V498 (cons A ()) V902)
3489
- (let Result
3490
- (let Hyp (tl V492)
3491
- (let Assume (shen-newpv V902)
3492
- (do (shen-incinfs)
3493
- (unify! A A479 V902
3494
- (freeze
3495
- (unify! Pattern Pattern478 V902
3496
- (freeze
3497
- (shen-t*-assume Pattern Assume
3498
- V902
3499
- (freeze
3500
- (cut Throwcontrol V902
3501
- (freeze
3502
- (shen-th* Pattern A Assume
3503
- V902
3504
- (freeze
3505
- (cut Throwcontrol V902
3506
- (freeze
3507
- (shen-t*-patterns
3508
- Patterns B Hyp V901 V902
3509
- V903))))))))))))))))
3510
- (do (shen-unbindv V498 V902) Result))))
3511
- false)))
3512
- (do (shen-unbindv V495 V902) Result)))
3513
- false)))
3514
- (if (shen-pvar? V494)
3515
- (let A (shen-newpv V902)
3516
- (do
3517
- (shen-bindv V494 (cons : (cons A ())) V902)
3518
- (let Result
3519
- (let Hyp (tl V492)
3520
- (let Assume (shen-newpv V902)
3521
- (do (shen-incinfs)
3522
- (unify! A A479 V902
3523
- (freeze
3524
- (unify! Pattern Pattern478 V902
3525
- (freeze
3526
- (shen-t*-assume Pattern Assume V902
3527
- (freeze
3528
- (cut Throwcontrol V902
3529
- (freeze
3530
- (shen-th* Pattern A Assume V902
3531
- (freeze
3532
- (cut Throwcontrol V902
3533
- (freeze
3534
- (shen-t*-patterns Patterns B Hyp
3535
- V901 V902 V903))))))))))))))))
3536
- (do (shen-unbindv V494 V902) Result))))
3537
- false))))
3538
- (if (shen-pvar? V493)
3539
- (let Pattern (shen-newpv V902)
3540
- (let A (shen-newpv V902)
3541
- (do
3542
- (shen-bindv V493
3543
- (cons Pattern (cons : (cons A ()))) V902)
3544
- (let Result
3545
- (let Hyp (tl V492)
3546
- (let Assume (shen-newpv V902)
3547
- (do (shen-incinfs)
3548
- (unify! A A479 V902
3549
- (freeze
3550
- (unify! Pattern Pattern478 V902
3551
- (freeze
3552
- (shen-t*-assume Pattern Assume V902
3553
- (freeze
3554
- (cut Throwcontrol V902
3555
- (freeze
3556
- (shen-th* Pattern A Assume V902
3557
- (freeze
3558
- (cut Throwcontrol V902
3559
- (freeze
3560
- (shen-t*-patterns Patterns B Hyp
3561
- V901 V902 V903))))))))))))))))
3562
- (do (shen-unbindv V493 V902) Result)))))
3563
- false)))
3564
- (if (shen-pvar? V492)
3565
- (let Pattern (shen-newpv V902)
3566
- (let A (shen-newpv V902)
3567
- (let Hyp (shen-newpv V902)
3568
- (do
3569
- (shen-bindv V492
3570
- (cons (cons Pattern (cons : (cons A ()))) Hyp)
3571
- V902)
3572
- (let Result
3573
- (let Assume (shen-newpv V902)
3574
- (do (shen-incinfs)
3575
- (unify! A A479 V902
3576
- (freeze
3577
- (unify! Pattern Pattern478 V902
3578
- (freeze
3579
- (shen-t*-assume Pattern Assume V902
3580
- (freeze
3581
- (cut Throwcontrol V902
3582
- (freeze
3583
- (shen-th* Pattern A Assume V902
3584
- (freeze
3585
- (cut Throwcontrol V902
3586
- (freeze
3587
- (shen-t*-patterns Patterns B Hyp
3588
- V901 V902 V903)))))))))))))))
3589
- (do (shen-unbindv V492 V902) Result))))))
3590
- false)))
3591
- false)))
3592
- false))
3593
- false))
3594
- false)))
3595
- false))))
3596
- false))
3597
- Case)))))
169
+ (defun shen.semantics-check (V2985 V2986 V2987 V2988 V2989) (let Semantics* (shen.newpv V2988) (do (shen.incinfs) (bind Semantics* (shen.curry (shen.rename-semantics (shen.deref V2985 V2988))) V2988 (freeze (shen.t* (cons Semantics* (cons : (cons V2986 ()))) V2987 V2988 V2989))))))
3598
170
 
3599
- (defun shen-t*-assume (V904 V905 V906 V907)
3600
- (let Throwcontrol (shen-catchpoint)
3601
- (shen-cutpoint Throwcontrol
3602
- (let Case
3603
- (let V475 (shen-lazyderef V904 V906)
3604
- (if (cons? V475)
3605
- (let X (hd V475)
3606
- (let Y (tl V475)
3607
- (let A1 (shen-newpv V906)
3608
- (let A2 (shen-newpv V906)
3609
- (do (shen-incinfs)
3610
- (cut Throwcontrol V906
3611
- (freeze
3612
- (shen-t*-assume X A1 V906
3613
- (freeze
3614
- (shen-t*-assume Y A2 V906
3615
- (freeze
3616
- (bind V905
3617
- (append (shen-lazyderef A1 V906) (shen-lazyderef A2 V906))
3618
- V906 V907))))))))))))
3619
- false))
3620
- (if (= Case false)
3621
- (let Case
3622
- (let A (shen-newpv V906)
3623
- (do (shen-incinfs)
3624
- (fwhen (shen-placeholder? (shen-lazyderef V904 V906)) V906
3625
- (freeze
3626
- (bind V905
3627
- (cons
3628
- (cons (shen-lazyderef V904 V906)
3629
- (cons : (cons (shen-lazyderef A V906) ())))
3630
- ())
3631
- V906 V907)))))
3632
- (if (= Case false)
3633
- (let V476 (shen-lazyderef V905 V906)
3634
- (if (= () V476) (do (shen-incinfs) (thaw V907))
3635
- (if (shen-pvar? V476)
3636
- (do (shen-bindv V476 () V906)
3637
- (let Result (do (shen-incinfs) (thaw V907))
3638
- (do (shen-unbindv V476 V906) Result)))
3639
- false)))
3640
- Case))
3641
- Case)))))
171
+ (defun shen.rename-semantics (V2990) (cond ((cons? V2990) (cons (shen.rename-semantics (hd V2990)) (shen.rename-semantics (tl V2990)))) ((shen.grammar_symbol? V2990) (cons shen.<-sem (cons V2990 ()))) (true V2990)))
3642
172
 
3643
- (defun shen-conc (V908 V909 V910 V911 V912)
3644
- (let Case
3645
- (let V471 (shen-lazyderef V908 V911)
3646
- (if (= () V471)
3647
- (do (shen-incinfs) (bind V910 (shen-lazyderef V909 V911) V911 V912))
3648
- false))
3649
- (if (= Case false)
3650
- (let V472 (shen-lazyderef V908 V911)
3651
- (if (cons? V472)
3652
- (let X (hd V472)
3653
- (let Y (tl V472)
3654
- (let Z (shen-newpv V911)
3655
- (do (shen-incinfs)
3656
- (bind V910 (cons (shen-lazyderef X V911) (shen-lazyderef Z V911)) V911
3657
- (freeze (shen-conc Y V909 Z V911 V912)))))))
3658
- false))
3659
- Case)))
3660
173
 
3661
- (defun shen-findallhelp (V913 V914 V915 V916 V917 V918)
3662
- (let Case
3663
- (do (shen-incinfs)
3664
- (call V914 V917
3665
- (freeze (shen-remember V916 V913 V917 (freeze (fwhen false V917 V918))))))
3666
- (if (= Case false)
3667
- (do (shen-incinfs) (bind V915 (value (shen-lazyderef V916 V917)) V917 V918))
3668
- Case)))
3669
-
3670
- (defun shen-remember (V919 V920 V921 V922)
3671
- (let B (shen-newpv V921)
3672
- (do (shen-incinfs)
3673
- (bind B
3674
- (set (shen-deref V919 V921)
3675
- (cons (shen-deref V920 V921) (value (shen-deref V919 V921))))
3676
- V921 V922))))
3677
-
3678
- (defun findall (V923 V924 V925 V926 V927)
3679
- (let B (shen-newpv V926)
3680
- (let A (shen-newpv V926)
3681
- (do (shen-incinfs)
3682
- (bind A (gensym a) V926
3683
- (freeze
3684
- (bind B (set (shen-lazyderef A V926) ()) V926
3685
- (freeze (shen-findallhelp V923 V924 V925 A V926 V927)))))))))
3686
-
3687
- (defun shen-findallhelp (V913 V914 V915 V916 V917 V918)
3688
- (let Case
3689
- (do (shen-incinfs)
3690
- (call V914 V917
3691
- (freeze (shen-remember V916 V913 V917 (freeze (fwhen false V917 V918))))))
3692
- (if (= Case false)
3693
- (do (shen-incinfs) (bind V915 (value (shen-lazyderef V916 V917)) V917 V918))
3694
- Case)))
3695
-
3696
- (defun shen-remember (V919 V920 V921 V922)
3697
- (let B (shen-newpv V921)
3698
- (do (shen-incinfs)
3699
- (bind B
3700
- (set (shen-deref V919 V921)
3701
- (cons (shen-deref V920 V921) (value (shen-deref V919 V921))))
3702
- V921 V922))))
3703
174