shen-ruby 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 684cbc1d3967aa688256276833561b637d06c2b3
4
- data.tar.gz: 9428d231f9a5385f3a6988136401ea514e61113d
3
+ metadata.gz: f381d80e5e8c9c146296ca0e845fb4a49ff27126
4
+ data.tar.gz: 437fe5e43da5ab851519ee279bb72a2128778060
5
5
  SHA512:
6
- metadata.gz: 425cad6583df00d8124eea52d70bfafc1a09fb4eadf227ef0ba5b945fb28cb47d35ac210e58ea4da9576745eaa3e833de4a408a4789d758ce42743d4b5d4fcee
7
- data.tar.gz: 59b65656bbb7fd70be508fa17597f4508091c85cbfc0702c18494f7f4e8f1fe100ff12d7cba38a8a31467052820d0e5639cc35baad7ea8b745f704113db47018
6
+ metadata.gz: a1ced5ed4e8fc01bf4ac200270b3f403a0698ce7e9947b2a5e8766291e3407684441a122dde8f6e1d79a956e0dc46c7b775e13a8ce8ba5e04a329e259e972786
7
+ data.tar.gz: 6edca0f42ba32be1ca4185f5c3472f403fb9a68ced4df92f4d5b86520887dd6eca03be4d23eda084c77290d7017b7043b7e9f768f3af82cf6feeea9f203d18d9
data/.travis.yml CHANGED
@@ -7,5 +7,5 @@ env: "RUBY_THREAD_VM_STACK_SIZE=2097152"
7
7
  script: "ruby bin/shen_test_suite.rb && rake"
8
8
  matrix:
9
9
  include:
10
- - rvm: jruby-1.7.17
10
+ - rvm: jruby-19mode
11
11
  script: "ruby -J-Xss32m bin/shen_test_suite.rb && rake"
data/HISTORY.md CHANGED
@@ -1,13 +1,16 @@
1
1
  # ShenRuby Release History
2
2
 
3
- ## Not Yet Released
3
+ ## 0.15.0 - March 31, 2015
4
4
  ### Features
5
- - Upgrade to Shen 17.2
5
+ - Added `shen-ruby` executable for running ShenRuby programs outside of REPL
6
+ - Including support for shebang scripts
7
+ - Upgrade to Shen 18.1
8
+ - Upgrade to Klam 0.0.9 for performance improvements
6
9
 
7
10
  ### Bug Fixes
8
11
  - Evaluating "c#13;" no longer triggers the message "warning: encountered \r in middle of line, treated as a mere space."
9
12
 
10
- ## 0.13.0 - February 3, 2013
13
+ ## 0.13.0 - February 3, 2015
11
14
  ### Features
12
15
  - Upgrade to Shen 17
13
16
  - Shen is now BSD-licenesed, making ShenRuby BSD/MIT licenesed
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ShenRuby
2
2
  ShenRuby is a Ruby port of the [Shen](http://shenlanguage.org/) programming language. Shen is a modern, functional Lisp that supports pattern matching, currying, and optional static type checking.
3
3
 
4
- ShenRuby supports Shen version 17.2, which was released in February, 2015.
4
+ ShenRuby supports Shen version 18.1, which was released in March, 2015.
5
5
 
6
6
  The ShenRuby project has two primary goals. The first is to be a low barrier-to-entry means for Rubyists to explore Shen. To someone with a working installation of Ruby 1.9.3 or greater, a Shen REPL is only a gem install away.
7
7
 
@@ -22,12 +22,13 @@ ShenRuby 0.14.0 is the current release. To install it as a gem, use the followin
22
22
 
23
23
  Once the gem has been installed, the Shen REPL can be launched via the `srrepl` (short for ShenRuby REPL) command. For example:
24
24
 
25
- Loading.... Completed in 2.01 seconds.
25
+ % srrepl
26
+ Loading.... Completed in 1.51 seconds.
26
27
 
27
28
  Shen, copyright (C) 2010-2015 Mark Tarver
28
- www.shenlanguage.org, Shen 17.2
29
- running under Ruby, implementation: ruby 2.2.0
30
- port 0.14.0 ported by Greg Spurrier
29
+ www.shenlanguage.org, Shen 18.1
30
+ running under Ruby, implementation: ruby 2.2.1
31
+ port 0.15.0 ported by Greg Spurrier
31
32
 
32
33
 
33
34
  (0-)
@@ -61,6 +62,9 @@ To exit the Shen REPL, execute the `quit` function:
61
62
  (4-) (quit)
62
63
  %
63
64
 
65
+ ## Running ShenRuby Programs Without a REPL
66
+ Then `shen-ruby` command (or `shen_ruby`, if you prefer) can be used to run ShenRuby programs without starting a REPL.
67
+
64
68
  ## Ruby<->Shen Interop
65
69
  Bidirectional interaction between Ruby and Shen is a primary goal of ShenRuby. The following sections describe the currently supported means of collaboration between Shen and Ruby.
66
70
 
@@ -164,7 +168,7 @@ In addition to normal arguments, Ruby methods may also accept blocks. A block ar
164
168
 
165
169
  For example, to print each character of a string on a separate line using Shen's `pr` and `nl` system functions:
166
170
 
167
- (rb.each_char "hello" &1 (/. X (do (pr X) (nl))))
171
+ (rb.each_char "hello" & (/. X (do (pr X) (nl))))
168
172
 
169
173
  Or, to sum the elements of a list using Ruby's `Enumerable#reduce`:
170
174
 
@@ -205,7 +209,6 @@ The following resources may be helpful for those wanting to learn more about the
205
209
 
206
210
  The following features and improvements are among those planned for ShenRuby as it approaches its 1.0 release:
207
211
 
208
- - Support for command-line Shen scripts that under ShenRuby
209
212
  - Support for Rubinius
210
213
  - Thread-safe `ShenRuby::Shen` instances
211
214
 
data/bin/shen-ruby ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'shen_ruby'
4
+
5
+ if ARGV.size > 0
6
+ infile = File.open(ARGV[0])
7
+ else
8
+ infile = STDIN
9
+ end
10
+
11
+ first_two = infile.read(2)
12
+ if first_two == '#!'
13
+ # Discard shebang line
14
+ infile.readline
15
+ else
16
+ infile.ungetc(first_two[1])
17
+ infile.ungetc(first_two[0])
18
+ end
19
+
20
+ shen = ShenRuby::Shen.new
21
+ shen.eval_string(infile.read)
data/bin/shen_ruby ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'shen_ruby'
4
+
5
+ if ARGV.size > 0
6
+ infile = File.open(ARGV[0])
7
+ else
8
+ infile = STDIN
9
+ end
10
+
11
+ first_two = infile.read(2)
12
+ if first_two == '#!'
13
+ # Discard shebang line
14
+ infile.readline
15
+ else
16
+ infile.ungetc(first_two[1])
17
+ infile.ungetc(first_two[0])
18
+ end
19
+
20
+ shen = ShenRuby::Shen.new
21
+ shen.eval_string(infile.read)
@@ -11,13 +11,11 @@ module ShenRuby
11
11
  end
12
12
 
13
13
  def array_to_vector(a)
14
- v = Klam::Absvector.new(a)
15
- v.unshift(a.size)
16
- v
14
+ Klam::Absvector.new(a)
17
15
  end
18
16
 
19
17
  def vector_to_array(v)
20
- Array.new(v.slice(1,v[0]))
18
+ v.to_a
21
19
  end
22
20
  end
23
21
  end
@@ -55,7 +55,7 @@ module ShenRuby
55
55
 
56
56
  def vector(n)
57
57
  v = ::Klam::Absvector.new(n + 1, :"shen.fail!")
58
- v[0] = n
58
+ v.store(0, n)
59
59
  v
60
60
  end
61
61
  end
@@ -1,3 +1,3 @@
1
1
  module ShenRuby
2
- VERSION = "0.14.0"
2
+ VERSION = "0.15.0"
3
3
  end
@@ -23,134 +23,138 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
23
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
24
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
25
25
 
26
- (defun shen.shen->kl (V560 V561) (compile (lambda V553 (shen.<define> V553)) (cons V560 V561) (lambda X (shen.shen-syntax-error V560 X))))
26
+ (defun shen.shen->kl (V15953 V15954) (compile (lambda X (shen.<define> X)) (cons V15953 V15954) (lambda X (shen.shen-syntax-error V15953 X))))
27
27
 
28
- (defun shen.shen-syntax-error (V562 V563) (simple-error (cn "syntax error in " (shen.app V562 (cn " here:
28
+ (defun shen.shen-syntax-error (V15957 V15958) (simple-error (cn "syntax error in " (shen.app V15957 (cn " here:
29
29
 
30
- " (shen.app (shen.next-50 50 V563) "
30
+ " (shen.app (shen.next-50 50 V15958) "
31
31
  " shen.a)) shen.a))))
32
32
 
33
- (defun shen.<define> (V564) (let YaccParse (let Parse_shen.<name> (shen.<name> V564) (if (not (= (fail) Parse_shen.<name>)) (let Parse_shen.<signature> (shen.<signature> Parse_shen.<name>) (if (not (= (fail) Parse_shen.<signature>)) (let Parse_shen.<rules> (shen.<rules> Parse_shen.<signature>) (if (not (= (fail) Parse_shen.<rules>)) (shen.pair (hd Parse_shen.<rules>) (shen.compile_to_machine_code (shen.hdtl Parse_shen.<name>) (shen.hdtl Parse_shen.<rules>))) (fail))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_shen.<name> (shen.<name> V564) (if (not (= (fail) Parse_shen.<name>)) (let Parse_shen.<rules> (shen.<rules> Parse_shen.<name>) (if (not (= (fail) Parse_shen.<rules>)) (shen.pair (hd Parse_shen.<rules>) (shen.compile_to_machine_code (shen.hdtl Parse_shen.<name>) (shen.hdtl Parse_shen.<rules>))) (fail))) (fail))) YaccParse)))
33
+ (defun shen.<define> (V15960) (let YaccParse (let Parse_shen.<name> (shen.<name> V15960) (if (not (= (fail) Parse_shen.<name>)) (let Parse_shen.<signature> (shen.<signature> Parse_shen.<name>) (if (not (= (fail) Parse_shen.<signature>)) (let Parse_shen.<rules> (shen.<rules> Parse_shen.<signature>) (if (not (= (fail) Parse_shen.<rules>)) (shen.pair (hd Parse_shen.<rules>) (shen.compile_to_machine_code (shen.hdtl Parse_shen.<name>) (shen.hdtl Parse_shen.<rules>))) (fail))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_shen.<name> (shen.<name> V15960) (if (not (= (fail) Parse_shen.<name>)) (let Parse_shen.<rules> (shen.<rules> Parse_shen.<name>) (if (not (= (fail) Parse_shen.<rules>)) (shen.pair (hd Parse_shen.<rules>) (shen.compile_to_machine_code (shen.hdtl Parse_shen.<name>) (shen.hdtl Parse_shen.<rules>))) (fail))) (fail))) YaccParse)))
34
34
 
35
- (defun shen.<name> (V565) (if (cons? (hd V565)) (let Parse_X (hd (hd V565)) (shen.pair (hd (shen.pair (tl (hd V565)) (shen.hdtl V565))) (if (and (symbol? Parse_X) (not (shen.sysfunc? Parse_X))) Parse_X (simple-error (shen.app Parse_X " is not a legitimate function name.
35
+ (defun shen.<name> (V15962) (if (cons? (hd V15962)) (let Parse_X (hd (hd V15962)) (shen.pair (hd (shen.pair (tl (hd V15962)) (shen.hdtl V15962))) (if (and (symbol? Parse_X) (not (shen.sysfunc? Parse_X))) Parse_X (simple-error (shen.app Parse_X " is not a legitimate function name.
36
36
  " shen.a))))) (fail)))
37
37
 
38
- (defun shen.sysfunc? (V566) (element? V566 (get (intern "shen") shen.external-symbols (value *property-vector*))))
38
+ (defun shen.sysfunc? (V15964) (element? V15964 (get (intern "shen") shen.external-symbols (value *property-vector*))))
39
39
 
40
- (defun shen.<signature> (V567) (if (and (cons? (hd V567)) (= { (hd (hd V567)))) (let Parse_shen.<signature-help> (shen.<signature-help> (shen.pair (tl (hd V567)) (shen.hdtl V567))) (if (not (= (fail) Parse_shen.<signature-help>)) (if (and (cons? (hd Parse_shen.<signature-help>)) (= } (hd (hd Parse_shen.<signature-help>)))) (shen.pair (hd (shen.pair (tl (hd Parse_shen.<signature-help>)) (shen.hdtl Parse_shen.<signature-help>))) (shen.demodulate (shen.curry-type (shen.hdtl Parse_shen.<signature-help>)))) (fail)) (fail))) (fail)))
40
+ (defun shen.<signature> (V15966) (if (and (cons? (hd V15966)) (= { (hd (hd V15966)))) (let Parse_shen.<signature-help> (shen.<signature-help> (shen.pair (tl (hd V15966)) (shen.hdtl V15966))) (if (not (= (fail) Parse_shen.<signature-help>)) (if (and (cons? (hd Parse_shen.<signature-help>)) (= } (hd (hd Parse_shen.<signature-help>)))) (shen.pair (hd (shen.pair (tl (hd Parse_shen.<signature-help>)) (shen.hdtl Parse_shen.<signature-help>))) (shen.demodulate (shen.curry-type (shen.hdtl Parse_shen.<signature-help>)))) (fail)) (fail))) (fail)))
41
41
 
42
- (defun shen.curry-type (V568) (cond ((and (cons? V568) (and (cons? (tl V568)) (and (= --> (hd (tl V568))) (and (cons? (tl (tl V568))) (and (cons? (tl (tl (tl V568)))) (= --> (hd (tl (tl (tl V568)))))))))) (shen.curry-type (cons (hd V568) (cons --> (cons (tl (tl V568)) ()))))) ((and (cons? V568) (and (cons? (tl V568)) (and (= * (hd (tl V568))) (and (cons? (tl (tl V568))) (and (cons? (tl (tl (tl V568)))) (= * (hd (tl (tl (tl V568)))))))))) (shen.curry-type (cons (hd V568) (cons * (cons (tl (tl V568)) ()))))) ((cons? V568) (map (lambda V554 (shen.curry-type V554)) V568)) (true V568)))
42
+ (defun shen.curry-type (V15968) (cond ((and (cons? V15968) (and (cons? (tl V15968)) (and (= --> (hd (tl V15968))) (and (cons? (tl (tl V15968))) (and (cons? (tl (tl (tl V15968)))) (= --> (hd (tl (tl (tl V15968)))))))))) (shen.curry-type (cons (hd V15968) (cons --> (cons (tl (tl V15968)) ()))))) ((and (cons? V15968) (and (cons? (tl V15968)) (and (= * (hd (tl V15968))) (and (cons? (tl (tl V15968))) (and (cons? (tl (tl (tl V15968)))) (= * (hd (tl (tl (tl V15968)))))))))) (shen.curry-type (cons (hd V15968) (cons * (cons (tl (tl V15968)) ()))))) ((cons? V15968) (map (lambda Z (shen.curry-type Z)) V15968)) (true V15968)))
43
43
 
44
- (defun shen.<signature-help> (V569) (let YaccParse (if (cons? (hd V569)) (let Parse_X (hd (hd V569)) (let Parse_shen.<signature-help> (shen.<signature-help> (shen.pair (tl (hd V569)) (shen.hdtl V569))) (if (not (= (fail) Parse_shen.<signature-help>)) (if (not (element? Parse_X (cons { (cons } ())))) (shen.pair (hd Parse_shen.<signature-help>) (cons Parse_X (shen.hdtl Parse_shen.<signature-help>))) (fail)) (fail)))) (fail)) (if (= YaccParse (fail)) (let Parse_<e> (<e> V569) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
44
+ (defun shen.<signature-help> (V15970) (let YaccParse (if (cons? (hd V15970)) (let Parse_X (hd (hd V15970)) (let Parse_shen.<signature-help> (shen.<signature-help> (shen.pair (tl (hd V15970)) (shen.hdtl V15970))) (if (not (= (fail) Parse_shen.<signature-help>)) (if (not (element? Parse_X (cons { (cons } ())))) (shen.pair (hd Parse_shen.<signature-help>) (cons Parse_X (shen.hdtl Parse_shen.<signature-help>))) (fail)) (fail)))) (fail)) (if (= YaccParse (fail)) (let Parse_<e> (<e> V15970) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
45
45
 
46
- (defun shen.<rules> (V570) (let YaccParse (let Parse_shen.<rule> (shen.<rule> V570) (if (not (= (fail) Parse_shen.<rule>)) (let Parse_shen.<rules> (shen.<rules> Parse_shen.<rule>) (if (not (= (fail) Parse_shen.<rules>)) (shen.pair (hd Parse_shen.<rules>) (cons (shen.linearise (shen.hdtl Parse_shen.<rule>)) (shen.hdtl Parse_shen.<rules>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_shen.<rule> (shen.<rule> V570) (if (not (= (fail) Parse_shen.<rule>)) (shen.pair (hd Parse_shen.<rule>) (cons (shen.linearise (shen.hdtl Parse_shen.<rule>)) ())) (fail))) YaccParse)))
46
+ (defun shen.<rules> (V15972) (let YaccParse (let Parse_shen.<rule> (shen.<rule> V15972) (if (not (= (fail) Parse_shen.<rule>)) (let Parse_shen.<rules> (shen.<rules> Parse_shen.<rule>) (if (not (= (fail) Parse_shen.<rules>)) (shen.pair (hd Parse_shen.<rules>) (cons (shen.linearise (shen.hdtl Parse_shen.<rule>)) (shen.hdtl Parse_shen.<rules>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_shen.<rule> (shen.<rule> V15972) (if (not (= (fail) Parse_shen.<rule>)) (shen.pair (hd Parse_shen.<rule>) (cons (shen.linearise (shen.hdtl Parse_shen.<rule>)) ())) (fail))) YaccParse)))
47
47
 
48
- (defun shen.<rule> (V571) (let YaccParse (let Parse_shen.<patterns> (shen.<patterns> V571) (if (not (= (fail) Parse_shen.<patterns>)) (if (and (cons? (hd Parse_shen.<patterns>)) (= -> (hd (hd Parse_shen.<patterns>)))) (let Parse_shen.<action> (shen.<action> (shen.pair (tl (hd Parse_shen.<patterns>)) (shen.hdtl Parse_shen.<patterns>))) (if (not (= (fail) Parse_shen.<action>)) (if (and (cons? (hd Parse_shen.<action>)) (= where (hd (hd Parse_shen.<action>)))) (let Parse_shen.<guard> (shen.<guard> (shen.pair (tl (hd Parse_shen.<action>)) (shen.hdtl Parse_shen.<action>))) (if (not (= (fail) Parse_shen.<guard>)) (shen.pair (hd Parse_shen.<guard>) (cons (shen.hdtl Parse_shen.<patterns>) (cons (cons where (cons (shen.hdtl Parse_shen.<guard>) (cons (shen.hdtl Parse_shen.<action>) ()))) ()))) (fail))) (fail)) (fail))) (fail)) (fail))) (if (= YaccParse (fail)) (let YaccParse (let Parse_shen.<patterns> (shen.<patterns> V571) (if (not (= (fail) Parse_shen.<patterns>)) (if (and (cons? (hd Parse_shen.<patterns>)) (= -> (hd (hd Parse_shen.<patterns>)))) (let Parse_shen.<action> (shen.<action> (shen.pair (tl (hd Parse_shen.<patterns>)) (shen.hdtl Parse_shen.<patterns>))) (if (not (= (fail) Parse_shen.<action>)) (shen.pair (hd Parse_shen.<action>) (cons (shen.hdtl Parse_shen.<patterns>) (cons (shen.hdtl Parse_shen.<action>) ()))) (fail))) (fail)) (fail))) (if (= YaccParse (fail)) (let YaccParse (let Parse_shen.<patterns> (shen.<patterns> V571) (if (not (= (fail) Parse_shen.<patterns>)) (if (and (cons? (hd Parse_shen.<patterns>)) (= <- (hd (hd Parse_shen.<patterns>)))) (let Parse_shen.<action> (shen.<action> (shen.pair (tl (hd Parse_shen.<patterns>)) (shen.hdtl Parse_shen.<patterns>))) (if (not (= (fail) Parse_shen.<action>)) (if (and (cons? (hd Parse_shen.<action>)) (= where (hd (hd Parse_shen.<action>)))) (let Parse_shen.<guard> (shen.<guard> (shen.pair (tl (hd Parse_shen.<action>)) (shen.hdtl Parse_shen.<action>))) (if (not (= (fail) Parse_shen.<guard>)) (shen.pair (hd Parse_shen.<guard>) (cons (shen.hdtl Parse_shen.<patterns>) (cons (cons where (cons (shen.hdtl Parse_shen.<guard>) (cons (cons shen.choicepoint! (cons (shen.hdtl Parse_shen.<action>) ())) ()))) ()))) (fail))) (fail)) (fail))) (fail)) (fail))) (if (= YaccParse (fail)) (let Parse_shen.<patterns> (shen.<patterns> V571) (if (not (= (fail) Parse_shen.<patterns>)) (if (and (cons? (hd Parse_shen.<patterns>)) (= <- (hd (hd Parse_shen.<patterns>)))) (let Parse_shen.<action> (shen.<action> (shen.pair (tl (hd Parse_shen.<patterns>)) (shen.hdtl Parse_shen.<patterns>))) (if (not (= (fail) Parse_shen.<action>)) (shen.pair (hd Parse_shen.<action>) (cons (shen.hdtl Parse_shen.<patterns>) (cons (cons shen.choicepoint! (cons (shen.hdtl Parse_shen.<action>) ())) ()))) (fail))) (fail)) (fail))) YaccParse)) YaccParse)) YaccParse)))
48
+ (defun shen.<rule> (V15974) (let YaccParse (let Parse_shen.<patterns> (shen.<patterns> V15974) (if (not (= (fail) Parse_shen.<patterns>)) (if (and (cons? (hd Parse_shen.<patterns>)) (= -> (hd (hd Parse_shen.<patterns>)))) (let Parse_shen.<action> (shen.<action> (shen.pair (tl (hd Parse_shen.<patterns>)) (shen.hdtl Parse_shen.<patterns>))) (if (not (= (fail) Parse_shen.<action>)) (if (and (cons? (hd Parse_shen.<action>)) (= where (hd (hd Parse_shen.<action>)))) (let Parse_shen.<guard> (shen.<guard> (shen.pair (tl (hd Parse_shen.<action>)) (shen.hdtl Parse_shen.<action>))) (if (not (= (fail) Parse_shen.<guard>)) (shen.pair (hd Parse_shen.<guard>) (cons (shen.hdtl Parse_shen.<patterns>) (cons (cons where (cons (shen.hdtl Parse_shen.<guard>) (cons (shen.hdtl Parse_shen.<action>) ()))) ()))) (fail))) (fail)) (fail))) (fail)) (fail))) (if (= YaccParse (fail)) (let YaccParse (let Parse_shen.<patterns> (shen.<patterns> V15974) (if (not (= (fail) Parse_shen.<patterns>)) (if (and (cons? (hd Parse_shen.<patterns>)) (= -> (hd (hd Parse_shen.<patterns>)))) (let Parse_shen.<action> (shen.<action> (shen.pair (tl (hd Parse_shen.<patterns>)) (shen.hdtl Parse_shen.<patterns>))) (if (not (= (fail) Parse_shen.<action>)) (shen.pair (hd Parse_shen.<action>) (cons (shen.hdtl Parse_shen.<patterns>) (cons (shen.hdtl Parse_shen.<action>) ()))) (fail))) (fail)) (fail))) (if (= YaccParse (fail)) (let YaccParse (let Parse_shen.<patterns> (shen.<patterns> V15974) (if (not (= (fail) Parse_shen.<patterns>)) (if (and (cons? (hd Parse_shen.<patterns>)) (= <- (hd (hd Parse_shen.<patterns>)))) (let Parse_shen.<action> (shen.<action> (shen.pair (tl (hd Parse_shen.<patterns>)) (shen.hdtl Parse_shen.<patterns>))) (if (not (= (fail) Parse_shen.<action>)) (if (and (cons? (hd Parse_shen.<action>)) (= where (hd (hd Parse_shen.<action>)))) (let Parse_shen.<guard> (shen.<guard> (shen.pair (tl (hd Parse_shen.<action>)) (shen.hdtl Parse_shen.<action>))) (if (not (= (fail) Parse_shen.<guard>)) (shen.pair (hd Parse_shen.<guard>) (cons (shen.hdtl Parse_shen.<patterns>) (cons (cons where (cons (shen.hdtl Parse_shen.<guard>) (cons (cons shen.choicepoint! (cons (shen.hdtl Parse_shen.<action>) ())) ()))) ()))) (fail))) (fail)) (fail))) (fail)) (fail))) (if (= YaccParse (fail)) (let Parse_shen.<patterns> (shen.<patterns> V15974) (if (not (= (fail) Parse_shen.<patterns>)) (if (and (cons? (hd Parse_shen.<patterns>)) (= <- (hd (hd Parse_shen.<patterns>)))) (let Parse_shen.<action> (shen.<action> (shen.pair (tl (hd Parse_shen.<patterns>)) (shen.hdtl Parse_shen.<patterns>))) (if (not (= (fail) Parse_shen.<action>)) (shen.pair (hd Parse_shen.<action>) (cons (shen.hdtl Parse_shen.<patterns>) (cons (cons shen.choicepoint! (cons (shen.hdtl Parse_shen.<action>) ())) ()))) (fail))) (fail)) (fail))) YaccParse)) YaccParse)) YaccParse)))
49
49
 
50
- (defun shen.fail_if (V572 V573) (if (V572 V573) (fail) V573))
50
+ (defun shen.fail_if (V15977 V15978) (if (V15977 V15978) (fail) V15978))
51
51
 
52
- (defun shen.succeeds? (V578) (cond ((= V578 (fail)) false) (true true)))
52
+ (defun shen.succeeds? (V15984) (cond ((= V15984 (fail)) false) (true true)))
53
53
 
54
- (defun shen.<patterns> (V579) (let YaccParse (let Parse_shen.<pattern> (shen.<pattern> V579) (if (not (= (fail) Parse_shen.<pattern>)) (let Parse_shen.<patterns> (shen.<patterns> Parse_shen.<pattern>) (if (not (= (fail) Parse_shen.<patterns>)) (shen.pair (hd Parse_shen.<patterns>) (cons (shen.hdtl Parse_shen.<pattern>) (shen.hdtl Parse_shen.<patterns>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_<e> (<e> V579) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
54
+ (defun shen.<patterns> (V15986) (let YaccParse (let Parse_shen.<pattern> (shen.<pattern> V15986) (if (not (= (fail) Parse_shen.<pattern>)) (let Parse_shen.<patterns> (shen.<patterns> Parse_shen.<pattern>) (if (not (= (fail) Parse_shen.<patterns>)) (shen.pair (hd Parse_shen.<patterns>) (cons (shen.hdtl Parse_shen.<pattern>) (shen.hdtl Parse_shen.<patterns>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_<e> (<e> V15986) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
55
55
 
56
- (defun shen.<pattern> (V585) (let YaccParse (if (and (cons? (hd V585)) (cons? (hd (hd V585)))) (if (and (cons? (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (= @p (hd (hd (shen.pair (hd (hd V585)) (hd (tl V585))))))) (let Parse_shen.<pattern1> (shen.<pattern1> (shen.pair (tl (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (shen.hdtl (shen.pair (hd (hd V585)) (hd (tl V585)))))) (if (not (= (fail) Parse_shen.<pattern1>)) (let Parse_shen.<pattern2> (shen.<pattern2> Parse_shen.<pattern1>) (if (not (= (fail) Parse_shen.<pattern2>)) (shen.pair (hd (shen.pair (tl (hd V585)) (hd (tl V585)))) (cons @p (cons (shen.hdtl Parse_shen.<pattern1>) (cons (shen.hdtl Parse_shen.<pattern2>) ())))) (fail))) (fail))) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (and (cons? (hd V585)) (cons? (hd (hd V585)))) (if (and (cons? (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (= cons (hd (hd (shen.pair (hd (hd V585)) (hd (tl V585))))))) (let Parse_shen.<pattern1> (shen.<pattern1> (shen.pair (tl (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (shen.hdtl (shen.pair (hd (hd V585)) (hd (tl V585)))))) (if (not (= (fail) Parse_shen.<pattern1>)) (let Parse_shen.<pattern2> (shen.<pattern2> Parse_shen.<pattern1>) (if (not (= (fail) Parse_shen.<pattern2>)) (shen.pair (hd (shen.pair (tl (hd V585)) (hd (tl V585)))) (cons cons (cons (shen.hdtl Parse_shen.<pattern1>) (cons (shen.hdtl Parse_shen.<pattern2>) ())))) (fail))) (fail))) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (and (cons? (hd V585)) (cons? (hd (hd V585)))) (if (and (cons? (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (= @v (hd (hd (shen.pair (hd (hd V585)) (hd (tl V585))))))) (let Parse_shen.<pattern1> (shen.<pattern1> (shen.pair (tl (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (shen.hdtl (shen.pair (hd (hd V585)) (hd (tl V585)))))) (if (not (= (fail) Parse_shen.<pattern1>)) (let Parse_shen.<pattern2> (shen.<pattern2> Parse_shen.<pattern1>) (if (not (= (fail) Parse_shen.<pattern2>)) (shen.pair (hd (shen.pair (tl (hd V585)) (hd (tl V585)))) (cons @v (cons (shen.hdtl Parse_shen.<pattern1>) (cons (shen.hdtl Parse_shen.<pattern2>) ())))) (fail))) (fail))) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (and (cons? (hd V585)) (cons? (hd (hd V585)))) (if (and (cons? (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (= @s (hd (hd (shen.pair (hd (hd V585)) (hd (tl V585))))))) (let Parse_shen.<pattern1> (shen.<pattern1> (shen.pair (tl (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (shen.hdtl (shen.pair (hd (hd V585)) (hd (tl V585)))))) (if (not (= (fail) Parse_shen.<pattern1>)) (let Parse_shen.<pattern2> (shen.<pattern2> Parse_shen.<pattern1>) (if (not (= (fail) Parse_shen.<pattern2>)) (shen.pair (hd (shen.pair (tl (hd V585)) (hd (tl V585)))) (cons @s (cons (shen.hdtl Parse_shen.<pattern1>) (cons (shen.hdtl Parse_shen.<pattern2>) ())))) (fail))) (fail))) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (and (cons? (hd V585)) (cons? (hd (hd V585)))) (if (and (cons? (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (= vector (hd (hd (shen.pair (hd (hd V585)) (hd (tl V585))))))) (if (and (cons? (hd (shen.pair (tl (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (shen.hdtl (shen.pair (hd (hd V585)) (hd (tl V585))))))) (= 0 (hd (hd (shen.pair (tl (hd (shen.pair (hd (hd V585)) (hd (tl V585))))) (shen.hdtl (shen.pair (hd (hd V585)) (hd (tl V585))))))))) (shen.pair (hd (shen.pair (tl (hd V585)) (hd (tl V585)))) (cons vector (cons 0 ()))) (fail)) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (cons? (hd V585)) (let Parse_X (hd (hd V585)) (if (cons? Parse_X) (shen.pair (hd (shen.pair (tl (hd V585)) (shen.hdtl V585))) (shen.constructor-error Parse_X)) (fail))) (fail)) (if (= YaccParse (fail)) (let Parse_shen.<simple_pattern> (shen.<simple_pattern> V585) (if (not (= (fail) Parse_shen.<simple_pattern>)) (shen.pair (hd Parse_shen.<simple_pattern>) (shen.hdtl Parse_shen.<simple_pattern>)) (fail))) YaccParse)) YaccParse)) YaccParse)) YaccParse)) YaccParse)) YaccParse)))
56
+ (defun shen.<pattern> (V15993) (let YaccParse (if (and (cons? (hd V15993)) (cons? (hd (hd V15993)))) (if (and (cons? (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (= @p (hd (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))))) (let Parse_shen.<pattern1> (shen.<pattern1> (shen.pair (tl (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (shen.hdtl (shen.pair (hd (hd V15993)) (hd (tl V15993)))))) (if (not (= (fail) Parse_shen.<pattern1>)) (let Parse_shen.<pattern2> (shen.<pattern2> Parse_shen.<pattern1>) (if (not (= (fail) Parse_shen.<pattern2>)) (shen.pair (hd (shen.pair (tl (hd V15993)) (hd (tl V15993)))) (cons @p (cons (shen.hdtl Parse_shen.<pattern1>) (cons (shen.hdtl Parse_shen.<pattern2>) ())))) (fail))) (fail))) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (and (cons? (hd V15993)) (cons? (hd (hd V15993)))) (if (and (cons? (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (= cons (hd (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))))) (let Parse_shen.<pattern1> (shen.<pattern1> (shen.pair (tl (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (shen.hdtl (shen.pair (hd (hd V15993)) (hd (tl V15993)))))) (if (not (= (fail) Parse_shen.<pattern1>)) (let Parse_shen.<pattern2> (shen.<pattern2> Parse_shen.<pattern1>) (if (not (= (fail) Parse_shen.<pattern2>)) (shen.pair (hd (shen.pair (tl (hd V15993)) (hd (tl V15993)))) (cons cons (cons (shen.hdtl Parse_shen.<pattern1>) (cons (shen.hdtl Parse_shen.<pattern2>) ())))) (fail))) (fail))) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (and (cons? (hd V15993)) (cons? (hd (hd V15993)))) (if (and (cons? (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (= @v (hd (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))))) (let Parse_shen.<pattern1> (shen.<pattern1> (shen.pair (tl (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (shen.hdtl (shen.pair (hd (hd V15993)) (hd (tl V15993)))))) (if (not (= (fail) Parse_shen.<pattern1>)) (let Parse_shen.<pattern2> (shen.<pattern2> Parse_shen.<pattern1>) (if (not (= (fail) Parse_shen.<pattern2>)) (shen.pair (hd (shen.pair (tl (hd V15993)) (hd (tl V15993)))) (cons @v (cons (shen.hdtl Parse_shen.<pattern1>) (cons (shen.hdtl Parse_shen.<pattern2>) ())))) (fail))) (fail))) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (and (cons? (hd V15993)) (cons? (hd (hd V15993)))) (if (and (cons? (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (= @s (hd (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))))) (let Parse_shen.<pattern1> (shen.<pattern1> (shen.pair (tl (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (shen.hdtl (shen.pair (hd (hd V15993)) (hd (tl V15993)))))) (if (not (= (fail) Parse_shen.<pattern1>)) (let Parse_shen.<pattern2> (shen.<pattern2> Parse_shen.<pattern1>) (if (not (= (fail) Parse_shen.<pattern2>)) (shen.pair (hd (shen.pair (tl (hd V15993)) (hd (tl V15993)))) (cons @s (cons (shen.hdtl Parse_shen.<pattern1>) (cons (shen.hdtl Parse_shen.<pattern2>) ())))) (fail))) (fail))) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (and (cons? (hd V15993)) (cons? (hd (hd V15993)))) (if (and (cons? (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (= vector (hd (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))))) (if (and (cons? (hd (shen.pair (tl (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (shen.hdtl (shen.pair (hd (hd V15993)) (hd (tl V15993))))))) (= 0 (hd (hd (shen.pair (tl (hd (shen.pair (hd (hd V15993)) (hd (tl V15993))))) (shen.hdtl (shen.pair (hd (hd V15993)) (hd (tl V15993))))))))) (shen.pair (hd (shen.pair (tl (hd V15993)) (hd (tl V15993)))) (cons vector (cons 0 ()))) (fail)) (fail)) (fail)) (if (= YaccParse (fail)) (let YaccParse (if (cons? (hd V15993)) (let Parse_X (hd (hd V15993)) (if (cons? Parse_X) (shen.pair (hd (shen.pair (tl (hd V15993)) (shen.hdtl V15993))) (shen.constructor-error Parse_X)) (fail))) (fail)) (if (= YaccParse (fail)) (let Parse_shen.<simple_pattern> (shen.<simple_pattern> V15993) (if (not (= (fail) Parse_shen.<simple_pattern>)) (shen.pair (hd Parse_shen.<simple_pattern>) (shen.hdtl Parse_shen.<simple_pattern>)) (fail))) YaccParse)) YaccParse)) YaccParse)) YaccParse)) YaccParse)) YaccParse)))
57
57
 
58
- (defun shen.constructor-error (V586) (simple-error (shen.app V586 " is not a legitimate constructor
58
+ (defun shen.constructor-error (V15995) (simple-error (shen.app V15995 " is not a legitimate constructor
59
59
  " shen.a)))
60
60
 
61
- (defun shen.<simple_pattern> (V587) (let YaccParse (if (cons? (hd V587)) (let Parse_X (hd (hd V587)) (if (= Parse_X _) (shen.pair (hd (shen.pair (tl (hd V587)) (shen.hdtl V587))) (gensym Parse_Y)) (fail))) (fail)) (if (= YaccParse (fail)) (if (cons? (hd V587)) (let Parse_X (hd (hd V587)) (if (not (element? Parse_X (cons -> (cons <- ())))) (shen.pair (hd (shen.pair (tl (hd V587)) (shen.hdtl V587))) Parse_X) (fail))) (fail)) YaccParse)))
61
+ (defun shen.<simple_pattern> (V15997) (let YaccParse (if (cons? (hd V15997)) (let Parse_X (hd (hd V15997)) (if (= Parse_X _) (shen.pair (hd (shen.pair (tl (hd V15997)) (shen.hdtl V15997))) (gensym Parse_Y)) (fail))) (fail)) (if (= YaccParse (fail)) (if (cons? (hd V15997)) (let Parse_X (hd (hd V15997)) (if (not (element? Parse_X (cons -> (cons <- ())))) (shen.pair (hd (shen.pair (tl (hd V15997)) (shen.hdtl V15997))) Parse_X) (fail))) (fail)) YaccParse)))
62
62
 
63
- (defun shen.<pattern1> (V588) (let Parse_shen.<pattern> (shen.<pattern> V588) (if (not (= (fail) Parse_shen.<pattern>)) (shen.pair (hd Parse_shen.<pattern>) (shen.hdtl Parse_shen.<pattern>)) (fail))))
63
+ (defun shen.<pattern1> (V15999) (let Parse_shen.<pattern> (shen.<pattern> V15999) (if (not (= (fail) Parse_shen.<pattern>)) (shen.pair (hd Parse_shen.<pattern>) (shen.hdtl Parse_shen.<pattern>)) (fail))))
64
64
 
65
- (defun shen.<pattern2> (V589) (let Parse_shen.<pattern> (shen.<pattern> V589) (if (not (= (fail) Parse_shen.<pattern>)) (shen.pair (hd Parse_shen.<pattern>) (shen.hdtl Parse_shen.<pattern>)) (fail))))
65
+ (defun shen.<pattern2> (V16001) (let Parse_shen.<pattern> (shen.<pattern> V16001) (if (not (= (fail) Parse_shen.<pattern>)) (shen.pair (hd Parse_shen.<pattern>) (shen.hdtl Parse_shen.<pattern>)) (fail))))
66
66
 
67
- (defun shen.<action> (V590) (if (cons? (hd V590)) (let Parse_X (hd (hd V590)) (shen.pair (hd (shen.pair (tl (hd V590)) (shen.hdtl V590))) Parse_X)) (fail)))
67
+ (defun shen.<action> (V16003) (if (cons? (hd V16003)) (let Parse_X (hd (hd V16003)) (shen.pair (hd (shen.pair (tl (hd V16003)) (shen.hdtl V16003))) Parse_X)) (fail)))
68
68
 
69
- (defun shen.<guard> (V591) (if (cons? (hd V591)) (let Parse_X (hd (hd V591)) (shen.pair (hd (shen.pair (tl (hd V591)) (shen.hdtl V591))) Parse_X)) (fail)))
69
+ (defun shen.<guard> (V16005) (if (cons? (hd V16005)) (let Parse_X (hd (hd V16005)) (shen.pair (hd (shen.pair (tl (hd V16005)) (shen.hdtl V16005))) Parse_X)) (fail)))
70
70
 
71
- (defun shen.compile_to_machine_code (V592 V593) (let Lambda+ (shen.compile_to_lambda+ V592 V593) (let KL (shen.compile_to_kl V592 Lambda+) (let Record (shen.record-source V592 KL) KL))))
71
+ (defun shen.compile_to_machine_code (V16008 V16009) (let Lambda+ (shen.compile_to_lambda+ V16008 V16009) (let KL (shen.compile_to_kl V16008 Lambda+) (let Record (shen.record-source V16008 KL) KL))))
72
72
 
73
- (defun shen.record-source (V596 V597) (cond ((value shen.*installing-kl*) shen.skip) (true (put V596 shen.source V597 (value *property-vector*)))))
73
+ (defun shen.record-source (V16014 V16015) (cond ((value shen.*installing-kl*) shen.skip) (true (put V16014 shen.source V16015 (value *property-vector*)))))
74
74
 
75
- (defun shen.compile_to_lambda+ (V598 V599) (let Arity (shen.aritycheck V598 V599) (let Free (map (lambda Rule (shen.free_variable_check V598 Rule)) V599) (let Variables (shen.parameters Arity) (let Strip (map (lambda V555 (shen.strip-protect V555)) V599) (let Abstractions (map (lambda V556 (shen.abstract_rule V556)) Strip) (let Applications (map (lambda X (shen.application_build Variables X)) Abstractions) (cons Variables (cons Applications ())))))))))
75
+ (defun shen.compile_to_lambda+ (V16018 V16019) (let Arity (shen.aritycheck V16018 V16019) (let UpDateSymbolTable (shen.update-symbol-table V16018 Arity) (let Free (map (lambda Rule (shen.free_variable_check V16018 Rule)) V16019) (let Variables (shen.parameters Arity) (let Strip (map (lambda X (shen.strip-protect X)) V16019) (let Abstractions (map (lambda X (shen.abstract_rule X)) Strip) (let Applications (map (lambda X (shen.application_build Variables X)) Abstractions) (cons Variables (cons Applications ()))))))))))
76
76
 
77
- (defun shen.free_variable_check (V600 V601) (cond ((and (cons? V601) (and (cons? (tl V601)) (= () (tl (tl V601))))) (let Bound (shen.extract_vars (hd V601)) (let Free (shen.extract_free_vars Bound (hd (tl V601))) (shen.free_variable_warnings V600 Free)))) (true (shen.f_error shen.free_variable_check))))
77
+ (defun shen.update-symbol-table (V16022 V16023) (set shen.*symbol-table* (shen.update-symbol-table-h V16022 V16023 (value shen.*symbol-table*) ())))
78
78
 
79
- (defun shen.extract_vars (V602) (cond ((variable? V602) (cons V602 ())) ((cons? V602) (union (shen.extract_vars (hd V602)) (shen.extract_vars (tl V602)))) (true ())))
79
+ (defun shen.update-symbol-table-h (V16031 V16032 V16033 V16034) (cond ((= () V16033) (let NewEntry (cons V16031 (eval-kl (shen.lambda-form V16031 V16032))) (cons NewEntry V16034))) ((and (cons? V16033) (and (cons? (hd V16033)) (= (hd (hd V16033)) V16031))) (let ChangedEntry (cons (hd (hd V16033)) (eval-kl (shen.lambda-form (hd (hd V16033)) V16032))) (append (tl V16033) (cons ChangedEntry V16034)))) ((cons? V16033) (shen.update-symbol-table-h V16031 V16032 (tl V16033) (cons (hd V16033) V16034))) (true (shen.f_error shen.update-symbol-table-h))))
80
80
 
81
- (defun shen.extract_free_vars (V612 V613) (cond ((and (cons? V613) (and (cons? (tl V613)) (and (= () (tl (tl V613))) (= (hd V613) protect)))) ()) ((and (variable? V613) (not (element? V613 V612))) (cons V613 ())) ((and (cons? V613) (and (= lambda (hd V613)) (and (cons? (tl V613)) (and (cons? (tl (tl V613))) (= () (tl (tl (tl V613)))))))) (shen.extract_free_vars (cons (hd (tl V613)) V612) (hd (tl (tl V613))))) ((and (cons? V613) (and (= let (hd V613)) (and (cons? (tl V613)) (and (cons? (tl (tl V613))) (and (cons? (tl (tl (tl V613)))) (= () (tl (tl (tl (tl V613)))))))))) (union (shen.extract_free_vars V612 (hd (tl (tl V613)))) (shen.extract_free_vars (cons (hd (tl V613)) V612) (hd (tl (tl (tl V613))))))) ((cons? V613) (union (shen.extract_free_vars V612 (hd V613)) (shen.extract_free_vars V612 (tl V613)))) (true ())))
81
+ (defun shen.free_variable_check (V16037 V16038) (cond ((and (cons? V16038) (and (cons? (tl V16038)) (= () (tl (tl V16038))))) (let Bound (shen.extract_vars (hd V16038)) (let Free (shen.extract_free_vars Bound (hd (tl V16038))) (shen.free_variable_warnings V16037 Free)))) (true (shen.f_error shen.free_variable_check))))
82
82
 
83
- (defun shen.free_variable_warnings (V616 V617) (cond ((= () V617) _) (true (simple-error (cn "error: the following variables are free in " (shen.app V616 (cn ": " (shen.app (shen.list_variables V617) "" shen.a)) shen.a))))))
83
+ (defun shen.extract_vars (V16040) (cond ((variable? V16040) (cons V16040 ())) ((cons? V16040) (union (shen.extract_vars (hd V16040)) (shen.extract_vars (tl V16040)))) (true ())))
84
84
 
85
- (defun shen.list_variables (V618) (cond ((and (cons? V618) (= () (tl V618))) (cn (str (hd V618)) ".")) ((cons? V618) (cn (str (hd V618)) (cn ", " (shen.list_variables (tl V618))))) (true (shen.f_error shen.list_variables))))
85
+ (defun shen.extract_free_vars (V16052 V16053) (cond ((and (cons? V16053) (and (cons? (tl V16053)) (and (= () (tl (tl V16053))) (= (hd V16053) protect)))) ()) ((and (variable? V16053) (not (element? V16053 V16052))) (cons V16053 ())) ((and (cons? V16053) (and (= lambda (hd V16053)) (and (cons? (tl V16053)) (and (cons? (tl (tl V16053))) (= () (tl (tl (tl V16053)))))))) (shen.extract_free_vars (cons (hd (tl V16053)) V16052) (hd (tl (tl V16053))))) ((and (cons? V16053) (and (= let (hd V16053)) (and (cons? (tl V16053)) (and (cons? (tl (tl V16053))) (and (cons? (tl (tl (tl V16053)))) (= () (tl (tl (tl (tl V16053)))))))))) (union (shen.extract_free_vars V16052 (hd (tl (tl V16053)))) (shen.extract_free_vars (cons (hd (tl V16053)) V16052) (hd (tl (tl (tl V16053))))))) ((cons? V16053) (union (shen.extract_free_vars V16052 (hd V16053)) (shen.extract_free_vars V16052 (tl V16053)))) (true ())))
86
86
 
87
- (defun shen.strip-protect (V619) (cond ((and (cons? V619) (and (cons? (tl V619)) (and (= () (tl (tl V619))) (= (hd V619) protect)))) (shen.strip-protect (hd (tl V619)))) ((cons? V619) (map (lambda V557 (shen.strip-protect V557)) V619)) (true V619)))
87
+ (defun shen.free_variable_warnings (V16058 V16059) (cond ((= () V16059) _) (true (simple-error (cn "error: the following variables are free in " (shen.app V16058 (cn ": " (shen.app (shen.list_variables V16059) "" shen.a)) shen.a))))))
88
88
 
89
- (defun shen.linearise (V620) (cond ((and (cons? V620) (and (cons? (tl V620)) (= () (tl (tl V620))))) (shen.linearise_help (shen.flatten (hd V620)) (hd V620) (hd (tl V620)))) (true (shen.f_error shen.linearise))))
89
+ (defun shen.list_variables (V16061) (cond ((and (cons? V16061) (= () (tl V16061))) (cn (str (hd V16061)) ".")) ((cons? V16061) (cn (str (hd V16061)) (cn ", " (shen.list_variables (tl V16061))))) (true (shen.f_error shen.list_variables))))
90
90
 
91
- (defun shen.flatten (V621) (cond ((= () V621) ()) ((cons? V621) (append (shen.flatten (hd V621)) (shen.flatten (tl V621)))) (true (cons V621 ()))))
91
+ (defun shen.strip-protect (V16063) (cond ((and (cons? V16063) (and (cons? (tl V16063)) (and (= () (tl (tl V16063))) (= (hd V16063) protect)))) (shen.strip-protect (hd (tl V16063)))) ((cons? V16063) (map (lambda Z (shen.strip-protect Z)) V16063)) (true V16063)))
92
92
 
93
- (defun shen.linearise_help (V622 V623 V624) (cond ((= () V622) (cons V623 (cons V624 ()))) ((cons? V622) (if (and (variable? (hd V622)) (element? (hd V622) (tl V622))) (let Var (gensym (hd V622)) (let NewAction (cons where (cons (cons = (cons (hd V622) (cons Var ()))) (cons V624 ()))) (let NewPatts (shen.linearise_X (hd V622) Var V623) (shen.linearise_help (tl V622) NewPatts NewAction)))) (shen.linearise_help (tl V622) V623 V624))) (true (shen.f_error shen.linearise_help))))
93
+ (defun shen.linearise (V16065) (cond ((and (cons? V16065) (and (cons? (tl V16065)) (= () (tl (tl V16065))))) (shen.linearise_help (shen.flatten (hd V16065)) (hd V16065) (hd (tl V16065)))) (true (shen.f_error shen.linearise))))
94
94
 
95
- (defun shen.linearise_X (V634 V635 V636) (cond ((= V636 V634) V635) ((cons? V636) (let L (shen.linearise_X V634 V635 (hd V636)) (if (= L (hd V636)) (cons (hd V636) (shen.linearise_X V634 V635 (tl V636))) (cons L (tl V636))))) (true V636)))
95
+ (defun shen.flatten (V16067) (cond ((= () V16067) ()) ((cons? V16067) (append (shen.flatten (hd V16067)) (shen.flatten (tl V16067)))) (true (cons V16067 ()))))
96
96
 
97
- (defun shen.aritycheck (V637 V638) (cond ((and (cons? V638) (and (cons? (hd V638)) (and (cons? (tl (hd V638))) (and (= () (tl (tl (hd V638)))) (= () (tl V638)))))) (do (shen.aritycheck-action (hd (tl (hd V638)))) (shen.aritycheck-name V637 (arity V637) (length (hd (hd V638)))))) ((and (cons? V638) (and (cons? (hd V638)) (and (cons? (tl (hd V638))) (and (= () (tl (tl (hd V638)))) (and (cons? (tl V638)) (and (cons? (hd (tl V638))) (and (cons? (tl (hd (tl V638)))) (= () (tl (tl (hd (tl V638)))))))))))) (if (= (length (hd (hd V638))) (length (hd (hd (tl V638))))) (do (shen.aritycheck-action (hd (tl (hd V638)))) (shen.aritycheck V637 (tl V638))) (simple-error (cn "arity error in " (shen.app V637 "
97
+ (defun shen.linearise_help (V16071 V16072 V16073) (cond ((= () V16071) (cons V16072 (cons V16073 ()))) ((cons? V16071) (if (and (variable? (hd V16071)) (element? (hd V16071) (tl V16071))) (let Var (gensym (hd V16071)) (let NewAction (cons where (cons (cons = (cons (hd V16071) (cons Var ()))) (cons V16073 ()))) (let NewPatts (shen.linearise_X (hd V16071) Var V16072) (shen.linearise_help (tl V16071) NewPatts NewAction)))) (shen.linearise_help (tl V16071) V16072 V16073))) (true (shen.f_error shen.linearise_help))))
98
+
99
+ (defun shen.linearise_X (V16086 V16087 V16088) (cond ((= V16088 V16086) V16087) ((cons? V16088) (let L (shen.linearise_X V16086 V16087 (hd V16088)) (if (= L (hd V16088)) (cons (hd V16088) (shen.linearise_X V16086 V16087 (tl V16088))) (cons L (tl V16088))))) (true V16088)))
100
+
101
+ (defun shen.aritycheck (V16091 V16092) (cond ((and (cons? V16092) (and (cons? (hd V16092)) (and (cons? (tl (hd V16092))) (and (= () (tl (tl (hd V16092)))) (= () (tl V16092)))))) (do (shen.aritycheck-action (hd (tl (hd V16092)))) (shen.aritycheck-name V16091 (arity V16091) (length (hd (hd V16092)))))) ((and (cons? V16092) (and (cons? (hd V16092)) (and (cons? (tl (hd V16092))) (and (= () (tl (tl (hd V16092)))) (and (cons? (tl V16092)) (and (cons? (hd (tl V16092))) (and (cons? (tl (hd (tl V16092)))) (= () (tl (tl (hd (tl V16092)))))))))))) (if (= (length (hd (hd V16092))) (length (hd (hd (tl V16092))))) (do (shen.aritycheck-action (hd (tl (hd V16092)))) (shen.aritycheck V16091 (tl V16092))) (simple-error (cn "arity error in " (shen.app V16091 "
98
102
  " shen.a))))) (true (shen.f_error shen.aritycheck))))
99
103
 
100
- (defun shen.aritycheck-name (V648 V649 V650) (cond ((= -1 V649) V650) ((= V650 V649) V650) (true (do (shen.prhush (cn "
101
- warning: changing the arity of " (shen.app V648 " can cause errors.
102
- " shen.a)) (stoutput)) V650))))
104
+ (defun shen.aritycheck-name (V16105 V16106 V16107) (cond ((= -1 V16106) V16107) ((= V16107 V16106) V16107) (true (do (shen.prhush (cn "
105
+ warning: changing the arity of " (shen.app V16105 " can cause errors.
106
+ " shen.a)) (stoutput)) V16107))))
103
107
 
104
- (defun shen.aritycheck-action (V655) (cond ((cons? V655) (do (shen.aah (hd V655) (tl V655)) (map (lambda V558 (shen.aritycheck-action V558)) V655))) (true shen.skip)))
108
+ (defun shen.aritycheck-action (V16113) (cond ((cons? V16113) (do (shen.aah (hd V16113) (tl V16113)) (map (lambda Y (shen.aritycheck-action Y)) V16113))) (true shen.skip)))
105
109
 
106
- (defun shen.aah (V656 V657) (let Arity (arity V656) (let Len (length V657) (if (and (> Arity -1) (> Len Arity)) (shen.prhush (cn "warning: " (shen.app V656 (cn " might not like " (shen.app Len (cn " argument" (shen.app (if (> Len 1) "s" "") ".
110
+ (defun shen.aah (V16116 V16117) (let Arity (arity V16116) (let Len (length V16117) (if (and (> Arity -1) (> Len Arity)) (shen.prhush (cn "warning: " (shen.app V16116 (cn " might not like " (shen.app Len (cn " argument" (shen.app (if (> Len 1) "s" "") ".
107
111
  " shen.a)) shen.a)) shen.a)) (stoutput)) shen.skip))))
108
112
 
109
- (defun shen.abstract_rule (V658) (cond ((and (cons? V658) (and (cons? (tl V658)) (= () (tl (tl V658))))) (shen.abstraction_build (hd V658) (hd (tl V658)))) (true (shen.f_error shen.abstract_rule))))
113
+ (defun shen.abstract_rule (V16119) (cond ((and (cons? V16119) (and (cons? (tl V16119)) (= () (tl (tl V16119))))) (shen.abstraction_build (hd V16119) (hd (tl V16119)))) (true (shen.f_error shen.abstract_rule))))
110
114
 
111
- (defun shen.abstraction_build (V659 V660) (cond ((= () V659) V660) ((cons? V659) (cons /. (cons (hd V659) (cons (shen.abstraction_build (tl V659) V660) ())))) (true (shen.f_error shen.abstraction_build))))
115
+ (defun shen.abstraction_build (V16122 V16123) (cond ((= () V16122) V16123) ((cons? V16122) (cons /. (cons (hd V16122) (cons (shen.abstraction_build (tl V16122) V16123) ())))) (true (shen.f_error shen.abstraction_build))))
112
116
 
113
- (defun shen.parameters (V661) (cond ((= 0 V661) ()) (true (cons (gensym V) (shen.parameters (- V661 1))))))
117
+ (defun shen.parameters (V16125) (cond ((= 0 V16125) ()) (true (cons (gensym V) (shen.parameters (- V16125 1))))))
114
118
 
115
- (defun shen.application_build (V662 V663) (cond ((= () V662) V663) ((cons? V662) (shen.application_build (tl V662) (cons V663 (cons (hd V662) ())))) (true (shen.f_error shen.application_build))))
119
+ (defun shen.application_build (V16128 V16129) (cond ((= () V16128) V16129) ((cons? V16128) (shen.application_build (tl V16128) (cons V16129 (cons (hd V16128) ())))) (true (shen.f_error shen.application_build))))
116
120
 
117
- (defun shen.compile_to_kl (V664 V665) (cond ((and (cons? V665) (and (cons? (tl V665)) (= () (tl (tl V665))))) (let Arity (shen.store-arity V664 (length (hd V665))) (let Reduce (map (lambda V559 (shen.reduce V559)) (hd (tl V665))) (let CondExpression (shen.cond-expression V664 (hd V665) Reduce) (let TypeTable (if (value shen.*optimise*) (shen.typextable (shen.get-type V664) (hd V665)) shen.skip) (let TypedCondExpression (if (value shen.*optimise*) (shen.assign-types (hd V665) TypeTable CondExpression) CondExpression) (let KL (cons defun (cons V664 (cons (hd V665) (cons TypedCondExpression ())))) KL))))))) (true (shen.f_error shen.compile_to_kl))))
121
+ (defun shen.compile_to_kl (V16132 V16133) (cond ((and (cons? V16133) (and (cons? (tl V16133)) (= () (tl (tl V16133))))) (let Arity (shen.store-arity V16132 (length (hd V16133))) (let Reduce (map (lambda X (shen.reduce X)) (hd (tl V16133))) (let CondExpression (shen.cond-expression V16132 (hd V16133) Reduce) (let TypeTable (if (value shen.*optimise*) (shen.typextable (shen.get-type V16132) (hd V16133)) shen.skip) (let TypedCondExpression (if (value shen.*optimise*) (shen.assign-types (hd V16133) TypeTable CondExpression) CondExpression) (let KL (cons defun (cons V16132 (cons (hd V16133) (cons TypedCondExpression ())))) KL))))))) (true (shen.f_error shen.compile_to_kl))))
118
122
 
119
- (defun shen.get-type (V670) (cond ((cons? V670) shen.skip) (true (let FType (assoc V670 (value shen.*signedfuncs*)) (if (empty? FType) shen.skip (tl FType))))))
123
+ (defun shen.get-type (V16139) (cond ((cons? V16139) shen.skip) (true (let FType (assoc V16139 (value shen.*signedfuncs*)) (if (empty? FType) shen.skip (tl FType))))))
120
124
 
121
- (defun shen.typextable (V679 V680) (cond ((and (cons? V679) (and (cons? (tl V679)) (and (= --> (hd (tl V679))) (and (cons? (tl (tl V679))) (and (= () (tl (tl (tl V679)))) (cons? V680)))))) (if (variable? (hd V679)) (shen.typextable (hd (tl (tl V679))) (tl V680)) (cons (cons (hd V680) (hd V679)) (shen.typextable (hd (tl (tl V679))) (tl V680))))) (true ())))
125
+ (defun shen.typextable (V16150 V16151) (cond ((and (cons? V16150) (and (cons? (tl V16150)) (and (= --> (hd (tl V16150))) (and (cons? (tl (tl V16150))) (and (= () (tl (tl (tl V16150)))) (cons? V16151)))))) (if (variable? (hd V16150)) (shen.typextable (hd (tl (tl V16150))) (tl V16151)) (cons (cons (hd V16151) (hd V16150)) (shen.typextable (hd (tl (tl V16150))) (tl V16151))))) (true ())))
122
126
 
123
- (defun shen.assign-types (V681 V682 V683) (cond ((and (cons? V683) (and (= let (hd V683)) (and (cons? (tl V683)) (and (cons? (tl (tl V683))) (and (cons? (tl (tl (tl V683)))) (= () (tl (tl (tl (tl V683)))))))))) (cons let (cons (hd (tl V683)) (cons (shen.assign-types V681 V682 (hd (tl (tl V683)))) (cons (shen.assign-types (cons (hd (tl V683)) V681) V682 (hd (tl (tl (tl V683))))) ()))))) ((and (cons? V683) (and (= lambda (hd V683)) (and (cons? (tl V683)) (and (cons? (tl (tl V683))) (= () (tl (tl (tl V683)))))))) (cons lambda (cons (hd (tl V683)) (cons (shen.assign-types (cons (hd (tl V683)) V681) V682 (hd (tl (tl V683)))) ())))) ((and (cons? V683) (= cond (hd V683))) (cons cond (map (lambda Y (cons (shen.assign-types V681 V682 (hd Y)) (cons (shen.assign-types V681 V682 (hd (tl Y))) ()))) (tl V683)))) ((cons? V683) (let NewTable (shen.typextable (shen.get-type (hd V683)) (tl V683)) (cons (hd V683) (map (lambda Y (shen.assign-types V681 (append V682 NewTable) Y)) (tl V683))))) (true (let AtomType (assoc V683 V682) (if (cons? AtomType) (cons type (cons V683 (cons (tl AtomType) ()))) (if (element? V683 V681) V683 (shen.atom-type V683)))))))
127
+ (defun shen.assign-types (V16155 V16156 V16157) (cond ((and (cons? V16157) (and (= let (hd V16157)) (and (cons? (tl V16157)) (and (cons? (tl (tl V16157))) (and (cons? (tl (tl (tl V16157)))) (= () (tl (tl (tl (tl V16157)))))))))) (cons let (cons (hd (tl V16157)) (cons (shen.assign-types V16155 V16156 (hd (tl (tl V16157)))) (cons (shen.assign-types (cons (hd (tl V16157)) V16155) V16156 (hd (tl (tl (tl V16157))))) ()))))) ((and (cons? V16157) (and (= lambda (hd V16157)) (and (cons? (tl V16157)) (and (cons? (tl (tl V16157))) (= () (tl (tl (tl V16157)))))))) (cons lambda (cons (hd (tl V16157)) (cons (shen.assign-types (cons (hd (tl V16157)) V16155) V16156 (hd (tl (tl V16157)))) ())))) ((and (cons? V16157) (= cond (hd V16157))) (cons cond (map (lambda Y (cons (shen.assign-types V16155 V16156 (hd Y)) (cons (shen.assign-types V16155 V16156 (hd (tl Y))) ()))) (tl V16157)))) ((cons? V16157) (let NewTable (shen.typextable (shen.get-type (hd V16157)) (tl V16157)) (cons (hd V16157) (map (lambda Y (shen.assign-types V16155 (append V16156 NewTable) Y)) (tl V16157))))) (true (let AtomType (assoc V16157 V16156) (if (cons? AtomType) (cons type (cons V16157 (cons (tl AtomType) ()))) (if (element? V16157 V16155) V16157 (shen.atom-type V16157)))))))
124
128
 
125
- (defun shen.atom-type (V684) (if (string? V684) (cons type (cons V684 (cons string ()))) (if (number? V684) (cons type (cons V684 (cons number ()))) (if (boolean? V684) (cons type (cons V684 (cons boolean ()))) (if (symbol? V684) (cons type (cons V684 (cons symbol ()))) V684)))))
129
+ (defun shen.atom-type (V16159) (if (string? V16159) (cons type (cons V16159 (cons string ()))) (if (number? V16159) (cons type (cons V16159 (cons number ()))) (if (boolean? V16159) (cons type (cons V16159 (cons boolean ()))) (if (symbol? V16159) (cons type (cons V16159 (cons symbol ()))) V16159)))))
126
130
 
127
- (defun shen.store-arity (V687 V688) (cond ((value shen.*installing-kl*) shen.skip) (true (put V687 arity V688 (value *property-vector*)))))
131
+ (defun shen.store-arity (V16164 V16165) (cond ((value shen.*installing-kl*) shen.skip) (true (put V16164 arity V16165 (value *property-vector*)))))
128
132
 
129
- (defun shen.reduce (V689) (do (set shen.*teststack* ()) (let Result (shen.reduce_help V689) (cons (cons : (cons shen.tests (reverse (value shen.*teststack*)))) (cons Result ())))))
133
+ (defun shen.reduce (V16167) (do (set shen.*teststack* ()) (let Result (shen.reduce_help V16167) (cons (cons : (cons shen.tests (reverse (value shen.*teststack*)))) (cons Result ())))))
130
134
 
131
- (defun shen.reduce_help (V690) (cond ((and (cons? V690) (and (cons? (hd V690)) (and (= /. (hd (hd V690))) (and (cons? (tl (hd V690))) (and (cons? (hd (tl (hd V690)))) (and (= cons (hd (hd (tl (hd V690))))) (and (cons? (tl (hd (tl (hd V690))))) (and (cons? (tl (tl (hd (tl (hd V690)))))) (and (= () (tl (tl (tl (hd (tl (hd V690))))))) (and (cons? (tl (tl (hd V690)))) (and (= () (tl (tl (tl (hd V690))))) (and (cons? (tl V690)) (= () (tl (tl V690))))))))))))))) (do (shen.add_test (cons cons? (tl V690))) (let Abstraction (cons /. (cons (hd (tl (hd (tl (hd V690))))) (cons (cons /. (cons (hd (tl (tl (hd (tl (hd V690)))))) (cons (shen.ebr (hd (tl V690)) (hd (tl (hd V690))) (hd (tl (tl (hd V690))))) ()))) ()))) (let Application (cons (cons Abstraction (cons (cons hd (tl V690)) ())) (cons (cons tl (tl V690)) ())) (shen.reduce_help Application))))) ((and (cons? V690) (and (cons? (hd V690)) (and (= /. (hd (hd V690))) (and (cons? (tl (hd V690))) (and (cons? (hd (tl (hd V690)))) (and (= @p (hd (hd (tl (hd V690))))) (and (cons? (tl (hd (tl (hd V690))))) (and (cons? (tl (tl (hd (tl (hd V690)))))) (and (= () (tl (tl (tl (hd (tl (hd V690))))))) (and (cons? (tl (tl (hd V690)))) (and (= () (tl (tl (tl (hd V690))))) (and (cons? (tl V690)) (= () (tl (tl V690))))))))))))))) (do (shen.add_test (cons tuple? (tl V690))) (let Abstraction (cons /. (cons (hd (tl (hd (tl (hd V690))))) (cons (cons /. (cons (hd (tl (tl (hd (tl (hd V690)))))) (cons (shen.ebr (hd (tl V690)) (hd (tl (hd V690))) (hd (tl (tl (hd V690))))) ()))) ()))) (let Application (cons (cons Abstraction (cons (cons fst (tl V690)) ())) (cons (cons snd (tl V690)) ())) (shen.reduce_help Application))))) ((and (cons? V690) (and (cons? (hd V690)) (and (= /. (hd (hd V690))) (and (cons? (tl (hd V690))) (and (cons? (hd (tl (hd V690)))) (and (= @v (hd (hd (tl (hd V690))))) (and (cons? (tl (hd (tl (hd V690))))) (and (cons? (tl (tl (hd (tl (hd V690)))))) (and (= () (tl (tl (tl (hd (tl (hd V690))))))) (and (cons? (tl (tl (hd V690)))) (and (= () (tl (tl (tl (hd V690))))) (and (cons? (tl V690)) (= () (tl (tl V690))))))))))))))) (do (shen.add_test (cons shen.+vector? (tl V690))) (let Abstraction (cons /. (cons (hd (tl (hd (tl (hd V690))))) (cons (cons /. (cons (hd (tl (tl (hd (tl (hd V690)))))) (cons (shen.ebr (hd (tl V690)) (hd (tl (hd V690))) (hd (tl (tl (hd V690))))) ()))) ()))) (let Application (cons (cons Abstraction (cons (cons hdv (tl V690)) ())) (cons (cons tlv (tl V690)) ())) (shen.reduce_help Application))))) ((and (cons? V690) (and (cons? (hd V690)) (and (= /. (hd (hd V690))) (and (cons? (tl (hd V690))) (and (cons? (hd (tl (hd V690)))) (and (= @s (hd (hd (tl (hd V690))))) (and (cons? (tl (hd (tl (hd V690))))) (and (cons? (tl (tl (hd (tl (hd V690)))))) (and (= () (tl (tl (tl (hd (tl (hd V690))))))) (and (cons? (tl (tl (hd V690)))) (and (= () (tl (tl (tl (hd V690))))) (and (cons? (tl V690)) (= () (tl (tl V690))))))))))))))) (do (shen.add_test (cons shen.+string? (tl V690))) (let Abstraction (cons /. (cons (hd (tl (hd (tl (hd V690))))) (cons (cons /. (cons (hd (tl (tl (hd (tl (hd V690)))))) (cons (shen.ebr (hd (tl V690)) (hd (tl (hd V690))) (hd (tl (tl (hd V690))))) ()))) ()))) (let Application (cons (cons Abstraction (cons (cons pos (cons (hd (tl V690)) (cons 0 ()))) ())) (cons (cons tlstr (tl V690)) ())) (shen.reduce_help Application))))) ((and (cons? V690) (and (cons? (hd V690)) (and (= /. (hd (hd V690))) (and (cons? (tl (hd V690))) (and (cons? (tl (tl (hd V690)))) (and (= () (tl (tl (tl (hd V690))))) (and (cons? (tl V690)) (and (= () (tl (tl V690))) (not (variable? (hd (tl (hd V690))))))))))))) (do (shen.add_test (cons = (cons (hd (tl (hd V690))) (tl V690)))) (shen.reduce_help (hd (tl (tl (hd V690))))))) ((and (cons? V690) (and (cons? (hd V690)) (and (= /. (hd (hd V690))) (and (cons? (tl (hd V690))) (and (cons? (tl (tl (hd V690)))) (and (= () (tl (tl (tl (hd V690))))) (and (cons? (tl V690)) (= () (tl (tl V690)))))))))) (shen.reduce_help (shen.ebr (hd (tl V690)) (hd (tl (hd V690))) (hd (tl (tl (hd V690))))))) ((and (cons? V690) (and (= where (hd V690)) (and (cons? (tl V690)) (and (cons? (tl (tl V690))) (= () (tl (tl (tl V690)))))))) (do (shen.add_test (hd (tl V690))) (shen.reduce_help (hd (tl (tl V690)))))) ((and (cons? V690) (and (cons? (tl V690)) (= () (tl (tl V690))))) (let Z (shen.reduce_help (hd V690)) (if (= (hd V690) Z) V690 (shen.reduce_help (cons Z (tl V690)))))) (true V690)))
135
+ (defun shen.reduce_help (V16169) (cond ((and (cons? V16169) (and (cons? (hd V16169)) (and (= /. (hd (hd V16169))) (and (cons? (tl (hd V16169))) (and (cons? (hd (tl (hd V16169)))) (and (= cons (hd (hd (tl (hd V16169))))) (and (cons? (tl (hd (tl (hd V16169))))) (and (cons? (tl (tl (hd (tl (hd V16169)))))) (and (= () (tl (tl (tl (hd (tl (hd V16169))))))) (and (cons? (tl (tl (hd V16169)))) (and (= () (tl (tl (tl (hd V16169))))) (and (cons? (tl V16169)) (= () (tl (tl V16169))))))))))))))) (do (shen.add_test (cons cons? (tl V16169))) (let Abstraction (cons /. (cons (hd (tl (hd (tl (hd V16169))))) (cons (cons /. (cons (hd (tl (tl (hd (tl (hd V16169)))))) (cons (shen.ebr (hd (tl V16169)) (hd (tl (hd V16169))) (hd (tl (tl (hd V16169))))) ()))) ()))) (let Application (cons (cons Abstraction (cons (cons hd (tl V16169)) ())) (cons (cons tl (tl V16169)) ())) (shen.reduce_help Application))))) ((and (cons? V16169) (and (cons? (hd V16169)) (and (= /. (hd (hd V16169))) (and (cons? (tl (hd V16169))) (and (cons? (hd (tl (hd V16169)))) (and (= @p (hd (hd (tl (hd V16169))))) (and (cons? (tl (hd (tl (hd V16169))))) (and (cons? (tl (tl (hd (tl (hd V16169)))))) (and (= () (tl (tl (tl (hd (tl (hd V16169))))))) (and (cons? (tl (tl (hd V16169)))) (and (= () (tl (tl (tl (hd V16169))))) (and (cons? (tl V16169)) (= () (tl (tl V16169))))))))))))))) (do (shen.add_test (cons tuple? (tl V16169))) (let Abstraction (cons /. (cons (hd (tl (hd (tl (hd V16169))))) (cons (cons /. (cons (hd (tl (tl (hd (tl (hd V16169)))))) (cons (shen.ebr (hd (tl V16169)) (hd (tl (hd V16169))) (hd (tl (tl (hd V16169))))) ()))) ()))) (let Application (cons (cons Abstraction (cons (cons fst (tl V16169)) ())) (cons (cons snd (tl V16169)) ())) (shen.reduce_help Application))))) ((and (cons? V16169) (and (cons? (hd V16169)) (and (= /. (hd (hd V16169))) (and (cons? (tl (hd V16169))) (and (cons? (hd (tl (hd V16169)))) (and (= @v (hd (hd (tl (hd V16169))))) (and (cons? (tl (hd (tl (hd V16169))))) (and (cons? (tl (tl (hd (tl (hd V16169)))))) (and (= () (tl (tl (tl (hd (tl (hd V16169))))))) (and (cons? (tl (tl (hd V16169)))) (and (= () (tl (tl (tl (hd V16169))))) (and (cons? (tl V16169)) (= () (tl (tl V16169))))))))))))))) (do (shen.add_test (cons shen.+vector? (tl V16169))) (let Abstraction (cons /. (cons (hd (tl (hd (tl (hd V16169))))) (cons (cons /. (cons (hd (tl (tl (hd (tl (hd V16169)))))) (cons (shen.ebr (hd (tl V16169)) (hd (tl (hd V16169))) (hd (tl (tl (hd V16169))))) ()))) ()))) (let Application (cons (cons Abstraction (cons (cons hdv (tl V16169)) ())) (cons (cons tlv (tl V16169)) ())) (shen.reduce_help Application))))) ((and (cons? V16169) (and (cons? (hd V16169)) (and (= /. (hd (hd V16169))) (and (cons? (tl (hd V16169))) (and (cons? (hd (tl (hd V16169)))) (and (= @s (hd (hd (tl (hd V16169))))) (and (cons? (tl (hd (tl (hd V16169))))) (and (cons? (tl (tl (hd (tl (hd V16169)))))) (and (= () (tl (tl (tl (hd (tl (hd V16169))))))) (and (cons? (tl (tl (hd V16169)))) (and (= () (tl (tl (tl (hd V16169))))) (and (cons? (tl V16169)) (= () (tl (tl V16169))))))))))))))) (do (shen.add_test (cons shen.+string? (tl V16169))) (let Abstraction (cons /. (cons (hd (tl (hd (tl (hd V16169))))) (cons (cons /. (cons (hd (tl (tl (hd (tl (hd V16169)))))) (cons (shen.ebr (hd (tl V16169)) (hd (tl (hd V16169))) (hd (tl (tl (hd V16169))))) ()))) ()))) (let Application (cons (cons Abstraction (cons (cons pos (cons (hd (tl V16169)) (cons 0 ()))) ())) (cons (cons tlstr (tl V16169)) ())) (shen.reduce_help Application))))) ((and (cons? V16169) (and (cons? (hd V16169)) (and (= /. (hd (hd V16169))) (and (cons? (tl (hd V16169))) (and (cons? (tl (tl (hd V16169)))) (and (= () (tl (tl (tl (hd V16169))))) (and (cons? (tl V16169)) (and (= () (tl (tl V16169))) (not (variable? (hd (tl (hd V16169))))))))))))) (do (shen.add_test (cons = (cons (hd (tl (hd V16169))) (tl V16169)))) (shen.reduce_help (hd (tl (tl (hd V16169))))))) ((and (cons? V16169) (and (cons? (hd V16169)) (and (= /. (hd (hd V16169))) (and (cons? (tl (hd V16169))) (and (cons? (tl (tl (hd V16169)))) (and (= () (tl (tl (tl (hd V16169))))) (and (cons? (tl V16169)) (= () (tl (tl V16169)))))))))) (shen.reduce_help (shen.ebr (hd (tl V16169)) (hd (tl (hd V16169))) (hd (tl (tl (hd V16169))))))) ((and (cons? V16169) (and (= where (hd V16169)) (and (cons? (tl V16169)) (and (cons? (tl (tl V16169))) (= () (tl (tl (tl V16169)))))))) (do (shen.add_test (hd (tl V16169))) (shen.reduce_help (hd (tl (tl V16169)))))) ((and (cons? V16169) (and (cons? (tl V16169)) (= () (tl (tl V16169))))) (let Z (shen.reduce_help (hd V16169)) (if (= (hd V16169) Z) V16169 (shen.reduce_help (cons Z (tl V16169)))))) (true V16169)))
132
136
 
133
- (defun shen.+string? (V691) (cond ((= "" V691) false) (true (string? V691))))
137
+ (defun shen.+string? (V16171) (cond ((= "" V16171) false) (true (string? V16171))))
134
138
 
135
- (defun shen.+vector (V692) (cond ((= V692 (vector 0)) false) (true (vector? V692))))
139
+ (defun shen.+vector (V16173) (cond ((= V16173 (vector 0)) false) (true (vector? V16173))))
136
140
 
137
- (defun shen.ebr (V703 V704 V705) (cond ((= V705 V704) V703) ((and (cons? V705) (and (= /. (hd V705)) (and (cons? (tl V705)) (and (cons? (tl (tl V705))) (and (= () (tl (tl (tl V705)))) (> (occurrences V704 (hd (tl V705))) 0)))))) V705) ((and (cons? V705) (and (= let (hd V705)) (and (cons? (tl V705)) (and (cons? (tl (tl V705))) (and (cons? (tl (tl (tl V705)))) (and (= () (tl (tl (tl (tl V705))))) (= (hd (tl V705)) V704))))))) (cons let (cons (hd (tl V705)) (cons (shen.ebr V703 (hd (tl V705)) (hd (tl (tl V705)))) (tl (tl (tl V705))))))) ((cons? V705) (cons (shen.ebr V703 V704 (hd V705)) (shen.ebr V703 V704 (tl V705)))) (true V705)))
141
+ (defun shen.ebr (V16187 V16188 V16189) (cond ((= V16189 V16188) V16187) ((and (cons? V16189) (and (= /. (hd V16189)) (and (cons? (tl V16189)) (and (cons? (tl (tl V16189))) (and (= () (tl (tl (tl V16189)))) (> (occurrences V16188 (hd (tl V16189))) 0)))))) V16189) ((and (cons? V16189) (and (= let (hd V16189)) (and (cons? (tl V16189)) (and (cons? (tl (tl V16189))) (and (cons? (tl (tl (tl V16189)))) (and (= () (tl (tl (tl (tl V16189))))) (= (hd (tl V16189)) V16188))))))) (cons let (cons (hd (tl V16189)) (cons (shen.ebr V16187 (hd (tl V16189)) (hd (tl (tl V16189)))) (tl (tl (tl V16189))))))) ((cons? V16189) (cons (shen.ebr V16187 V16188 (hd V16189)) (shen.ebr V16187 V16188 (tl V16189)))) (true V16189)))
138
142
 
139
- (defun shen.add_test (V706) (set shen.*teststack* (cons V706 (value shen.*teststack*))))
143
+ (defun shen.add_test (V16191) (set shen.*teststack* (cons V16191 (value shen.*teststack*))))
140
144
 
141
- (defun shen.cond-expression (V707 V708 V709) (let Err (shen.err-condition V707) (let Cases (shen.case-form V709 Err) (let EncodeChoices (shen.encode-choices Cases V707) (shen.cond-form EncodeChoices)))))
145
+ (defun shen.cond-expression (V16195 V16196 V16197) (let Err (shen.err-condition V16195) (let Cases (shen.case-form V16197 Err) (let EncodeChoices (shen.encode-choices Cases V16195) (shen.cond-form EncodeChoices)))))
142
146
 
143
- (defun shen.cond-form (V712) (cond ((and (cons? V712) (and (cons? (hd V712)) (and (= true (hd (hd V712))) (and (cons? (tl (hd V712))) (= () (tl (tl (hd V712)))))))) (hd (tl (hd V712)))) (true (cons cond V712))))
147
+ (defun shen.cond-form (V16201) (cond ((and (cons? V16201) (and (cons? (hd V16201)) (and (= true (hd (hd V16201))) (and (cons? (tl (hd V16201))) (= () (tl (tl (hd V16201)))))))) (hd (tl (hd V16201)))) (true (cons cond V16201))))
144
148
 
145
- (defun shen.encode-choices (V715 V716) (cond ((= () V715) ()) ((and (cons? V715) (and (cons? (hd V715)) (and (= true (hd (hd V715))) (and (cons? (tl (hd V715))) (and (cons? (hd (tl (hd V715)))) (and (= shen.choicepoint! (hd (hd (tl (hd V715))))) (and (cons? (tl (hd (tl (hd V715))))) (and (= () (tl (tl (hd (tl (hd V715)))))) (and (= () (tl (tl (hd V715)))) (= () (tl V715))))))))))) (cons (cons true (cons (cons let (cons Result (cons (hd (tl (hd (tl (hd V715))))) (cons (cons if (cons (cons = (cons Result (cons (cons fail ()) ()))) (cons (if (value shen.*installing-kl*) (cons shen.sys-error (cons V716 ())) (cons shen.f_error (cons V716 ()))) (cons Result ())))) ())))) ())) ())) ((and (cons? V715) (and (cons? (hd V715)) (and (= true (hd (hd V715))) (and (cons? (tl (hd V715))) (and (cons? (hd (tl (hd V715)))) (and (= shen.choicepoint! (hd (hd (tl (hd V715))))) (and (cons? (tl (hd (tl (hd V715))))) (and (= () (tl (tl (hd (tl (hd V715)))))) (= () (tl (tl (hd V715)))))))))))) (cons (cons true (cons (cons let (cons Result (cons (hd (tl (hd (tl (hd V715))))) (cons (cons if (cons (cons = (cons Result (cons (cons fail ()) ()))) (cons (shen.cond-form (shen.encode-choices (tl V715) V716)) (cons Result ())))) ())))) ())) ())) ((and (cons? V715) (and (cons? (hd V715)) (and (cons? (tl (hd V715))) (and (cons? (hd (tl (hd V715)))) (and (= shen.choicepoint! (hd (hd (tl (hd V715))))) (and (cons? (tl (hd (tl (hd V715))))) (and (= () (tl (tl (hd (tl (hd V715)))))) (= () (tl (tl (hd V715))))))))))) (cons (cons true (cons (cons let (cons Freeze (cons (cons freeze (cons (shen.cond-form (shen.encode-choices (tl V715) V716)) ())) (cons (cons if (cons (hd (hd V715)) (cons (cons let (cons Result (cons (hd (tl (hd (tl (hd V715))))) (cons (cons if (cons (cons = (cons Result (cons (cons fail ()) ()))) (cons (cons thaw (cons Freeze ())) (cons Result ())))) ())))) (cons (cons thaw (cons Freeze ())) ())))) ())))) ())) ())) ((and (cons? V715) (and (cons? (hd V715)) (and (cons? (tl (hd V715))) (= () (tl (tl (hd V715))))))) (cons (hd V715) (shen.encode-choices (tl V715) V716))) (true (shen.f_error shen.encode-choices))))
149
+ (defun shen.encode-choices (V16206 V16207) (cond ((= () V16206) ()) ((and (cons? V16206) (and (cons? (hd V16206)) (and (= true (hd (hd V16206))) (and (cons? (tl (hd V16206))) (and (cons? (hd (tl (hd V16206)))) (and (= shen.choicepoint! (hd (hd (tl (hd V16206))))) (and (cons? (tl (hd (tl (hd V16206))))) (and (= () (tl (tl (hd (tl (hd V16206)))))) (and (= () (tl (tl (hd V16206)))) (= () (tl V16206))))))))))) (cons (cons true (cons (cons let (cons Result (cons (hd (tl (hd (tl (hd V16206))))) (cons (cons if (cons (cons = (cons Result (cons (cons fail ()) ()))) (cons (if (value shen.*installing-kl*) (cons shen.sys-error (cons V16207 ())) (cons shen.f_error (cons V16207 ()))) (cons Result ())))) ())))) ())) ())) ((and (cons? V16206) (and (cons? (hd V16206)) (and (= true (hd (hd V16206))) (and (cons? (tl (hd V16206))) (and (cons? (hd (tl (hd V16206)))) (and (= shen.choicepoint! (hd (hd (tl (hd V16206))))) (and (cons? (tl (hd (tl (hd V16206))))) (and (= () (tl (tl (hd (tl (hd V16206)))))) (= () (tl (tl (hd V16206)))))))))))) (cons (cons true (cons (cons let (cons Result (cons (hd (tl (hd (tl (hd V16206))))) (cons (cons if (cons (cons = (cons Result (cons (cons fail ()) ()))) (cons (shen.cond-form (shen.encode-choices (tl V16206) V16207)) (cons Result ())))) ())))) ())) ())) ((and (cons? V16206) (and (cons? (hd V16206)) (and (cons? (tl (hd V16206))) (and (cons? (hd (tl (hd V16206)))) (and (= shen.choicepoint! (hd (hd (tl (hd V16206))))) (and (cons? (tl (hd (tl (hd V16206))))) (and (= () (tl (tl (hd (tl (hd V16206)))))) (= () (tl (tl (hd V16206))))))))))) (cons (cons true (cons (cons let (cons Freeze (cons (cons freeze (cons (shen.cond-form (shen.encode-choices (tl V16206) V16207)) ())) (cons (cons if (cons (hd (hd V16206)) (cons (cons let (cons Result (cons (hd (tl (hd (tl (hd V16206))))) (cons (cons if (cons (cons = (cons Result (cons (cons fail ()) ()))) (cons (cons thaw (cons Freeze ())) (cons Result ())))) ())))) (cons (cons thaw (cons Freeze ())) ())))) ())))) ())) ())) ((and (cons? V16206) (and (cons? (hd V16206)) (and (cons? (tl (hd V16206))) (= () (tl (tl (hd V16206))))))) (cons (hd V16206) (shen.encode-choices (tl V16206) V16207))) (true (shen.f_error shen.encode-choices))))
146
150
 
147
- (defun shen.case-form (V721 V722) (cond ((= () V721) (cons V722 ())) ((and (cons? V721) (and (cons? (hd V721)) (and (cons? (hd (hd V721))) (and (= : (hd (hd (hd V721)))) (and (cons? (tl (hd (hd V721)))) (and (= shen.tests (hd (tl (hd (hd V721))))) (and (= () (tl (tl (hd (hd V721))))) (and (cons? (tl (hd V721))) (and (cons? (hd (tl (hd V721)))) (and (= shen.choicepoint! (hd (hd (tl (hd V721))))) (and (cons? (tl (hd (tl (hd V721))))) (and (= () (tl (tl (hd (tl (hd V721)))))) (= () (tl (tl (hd V721)))))))))))))))) (cons (cons true (tl (hd V721))) (shen.case-form (tl V721) V722))) ((and (cons? V721) (and (cons? (hd V721)) (and (cons? (hd (hd V721))) (and (= : (hd (hd (hd V721)))) (and (cons? (tl (hd (hd V721)))) (and (= shen.tests (hd (tl (hd (hd V721))))) (and (= () (tl (tl (hd (hd V721))))) (and (cons? (tl (hd V721))) (= () (tl (tl (hd V721)))))))))))) (cons (cons true (tl (hd V721))) ())) ((and (cons? V721) (and (cons? (hd V721)) (and (cons? (hd (hd V721))) (and (= : (hd (hd (hd V721)))) (and (cons? (tl (hd (hd V721)))) (and (= shen.tests (hd (tl (hd (hd V721))))) (and (cons? (tl (hd V721))) (= () (tl (tl (hd V721))))))))))) (cons (cons (shen.embed-and (tl (tl (hd (hd V721))))) (tl (hd V721))) (shen.case-form (tl V721) V722))) (true (shen.f_error shen.case-form))))
151
+ (defun shen.case-form (V16214 V16215) (cond ((= () V16214) (cons V16215 ())) ((and (cons? V16214) (and (cons? (hd V16214)) (and (cons? (hd (hd V16214))) (and (= : (hd (hd (hd V16214)))) (and (cons? (tl (hd (hd V16214)))) (and (= shen.tests (hd (tl (hd (hd V16214))))) (and (= () (tl (tl (hd (hd V16214))))) (and (cons? (tl (hd V16214))) (and (cons? (hd (tl (hd V16214)))) (and (= shen.choicepoint! (hd (hd (tl (hd V16214))))) (and (cons? (tl (hd (tl (hd V16214))))) (and (= () (tl (tl (hd (tl (hd V16214)))))) (= () (tl (tl (hd V16214)))))))))))))))) (cons (cons true (tl (hd V16214))) (shen.case-form (tl V16214) V16215))) ((and (cons? V16214) (and (cons? (hd V16214)) (and (cons? (hd (hd V16214))) (and (= : (hd (hd (hd V16214)))) (and (cons? (tl (hd (hd V16214)))) (and (= shen.tests (hd (tl (hd (hd V16214))))) (and (= () (tl (tl (hd (hd V16214))))) (and (cons? (tl (hd V16214))) (= () (tl (tl (hd V16214)))))))))))) (cons (cons true (tl (hd V16214))) ())) ((and (cons? V16214) (and (cons? (hd V16214)) (and (cons? (hd (hd V16214))) (and (= : (hd (hd (hd V16214)))) (and (cons? (tl (hd (hd V16214)))) (and (= shen.tests (hd (tl (hd (hd V16214))))) (and (cons? (tl (hd V16214))) (= () (tl (tl (hd V16214))))))))))) (cons (cons (shen.embed-and (tl (tl (hd (hd V16214))))) (tl (hd V16214))) (shen.case-form (tl V16214) V16215))) (true (shen.f_error shen.case-form))))
148
152
 
149
- (defun shen.embed-and (V723) (cond ((and (cons? V723) (= () (tl V723))) (hd V723)) ((cons? V723) (cons and (cons (hd V723) (cons (shen.embed-and (tl V723)) ())))) (true (shen.f_error shen.embed-and))))
153
+ (defun shen.embed-and (V16217) (cond ((and (cons? V16217) (= () (tl V16217))) (hd V16217)) ((cons? V16217) (cons and (cons (hd V16217) (cons (shen.embed-and (tl V16217)) ())))) (true (shen.f_error shen.embed-and))))
150
154
 
151
- (defun shen.err-condition (V724) (cons true (cons (cons shen.f_error (cons V724 ())) ())))
155
+ (defun shen.err-condition (V16219) (cons true (cons (cons shen.f_error (cons V16219 ())) ())))
152
156
 
153
- (defun shen.sys-error (V725) (simple-error (cn "system function " (shen.app V725 ": unexpected argument
157
+ (defun shen.sys-error (V16221) (simple-error (cn "system function " (shen.app V16221 ": unexpected argument
154
158
  " shen.a))))
155
159
 
156
160