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.
@@ -23,206 +23,204 @@ 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.<defprolog> (V837) (let Parse_shen.<predicate*> (shen.<predicate*> V837) (if (not (= (fail) Parse_shen.<predicate*>)) (let Parse_shen.<clauses*> (shen.<clauses*> Parse_shen.<predicate*>) (if (not (= (fail) Parse_shen.<clauses*>)) (shen.pair (hd Parse_shen.<clauses*>) (hd (shen.prolog->shen (map (lambda Parse_X (shen.insert-predicate (shen.hdtl Parse_shen.<predicate*>) Parse_X)) (shen.hdtl Parse_shen.<clauses*>))))) (fail))) (fail))))
26
+ (defun shen.<defprolog> (V16383) (let Parse_shen.<predicate*> (shen.<predicate*> V16383) (if (not (= (fail) Parse_shen.<predicate*>)) (let Parse_shen.<clauses*> (shen.<clauses*> Parse_shen.<predicate*>) (if (not (= (fail) Parse_shen.<clauses*>)) (shen.pair (hd Parse_shen.<clauses*>) (hd (shen.prolog->shen (map (lambda Parse_X (shen.insert-predicate (shen.hdtl Parse_shen.<predicate*>) Parse_X)) (shen.hdtl Parse_shen.<clauses*>))))) (fail))) (fail))))
27
27
 
28
- (defun shen.prolog-error (V844 V845) (cond ((and (cons? V845) (and (cons? (tl V845)) (= () (tl (tl V845))))) (simple-error (cn "prolog syntax error in " (shen.app V844 (cn " here:
28
+ (defun shen.prolog-error (V16392 V16393) (cond ((and (cons? V16393) (and (cons? (tl V16393)) (= () (tl (tl V16393))))) (simple-error (cn "prolog syntax error in " (shen.app V16392 (cn " here:
29
29
 
30
- " (shen.app (shen.next-50 50 (hd V845)) "
31
- " shen.a)) shen.a)))) (true (simple-error (cn "prolog syntax error in " (shen.app V844 "
30
+ " (shen.app (shen.next-50 50 (hd V16393)) "
31
+ " shen.a)) shen.a)))) (true (simple-error (cn "prolog syntax error in " (shen.app V16392 "
32
32
  " shen.a))))))
33
33
 
34
- (defun shen.next-50 (V850 V851) (cond ((= () V851) "") ((= 0 V850) "") ((cons? V851) (cn (shen.decons-string (hd V851)) (shen.next-50 (- V850 1) (tl V851)))) (true (shen.f_error shen.next-50))))
34
+ (defun shen.next-50 (V16400 V16401) (cond ((= () V16401) "") ((= 0 V16400) "") ((cons? V16401) (cn (shen.decons-string (hd V16401)) (shen.next-50 (- V16400 1) (tl V16401)))) (true (shen.f_error shen.next-50))))
35
35
 
36
- (defun shen.decons-string (V852) (cond ((and (cons? V852) (and (= cons (hd V852)) (and (cons? (tl V852)) (and (cons? (tl (tl V852))) (= () (tl (tl (tl V852)))))))) (shen.app (shen.eval-cons V852) " " shen.s)) (true (shen.app V852 " " shen.r))))
36
+ (defun shen.decons-string (V16403) (cond ((and (cons? V16403) (and (= cons (hd V16403)) (and (cons? (tl V16403)) (and (cons? (tl (tl V16403))) (= () (tl (tl (tl V16403)))))))) (shen.app (shen.eval-cons V16403) " " shen.s)) (true (shen.app V16403 " " shen.r))))
37
37
 
38
- (defun shen.insert-predicate (V853 V854) (cond ((and (cons? V854) (and (cons? (tl V854)) (= () (tl (tl V854))))) (cons (cons V853 (hd V854)) (cons :- (tl V854)))) (true (shen.f_error shen.insert-predicate))))
38
+ (defun shen.insert-predicate (V16406 V16407) (cond ((and (cons? V16407) (and (cons? (tl V16407)) (= () (tl (tl V16407))))) (cons (cons V16406 (hd V16407)) (cons :- (tl V16407)))) (true (shen.f_error shen.insert-predicate))))
39
39
 
40
- (defun shen.<predicate*> (V855) (if (cons? (hd V855)) (let Parse_X (hd (hd V855)) (shen.pair (hd (shen.pair (tl (hd V855)) (shen.hdtl V855))) Parse_X)) (fail)))
40
+ (defun shen.<predicate*> (V16409) (if (cons? (hd V16409)) (let Parse_X (hd (hd V16409)) (shen.pair (hd (shen.pair (tl (hd V16409)) (shen.hdtl V16409))) Parse_X)) (fail)))
41
41
 
42
- (defun shen.<clauses*> (V856) (let YaccParse (let Parse_shen.<clause*> (shen.<clause*> V856) (if (not (= (fail) Parse_shen.<clause*>)) (let Parse_shen.<clauses*> (shen.<clauses*> Parse_shen.<clause*>) (if (not (= (fail) Parse_shen.<clauses*>)) (shen.pair (hd Parse_shen.<clauses*>) (cons (shen.hdtl Parse_shen.<clause*>) (shen.hdtl Parse_shen.<clauses*>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_<e> (<e> V856) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
42
+ (defun shen.<clauses*> (V16411) (let YaccParse (let Parse_shen.<clause*> (shen.<clause*> V16411) (if (not (= (fail) Parse_shen.<clause*>)) (let Parse_shen.<clauses*> (shen.<clauses*> Parse_shen.<clause*>) (if (not (= (fail) Parse_shen.<clauses*>)) (shen.pair (hd Parse_shen.<clauses*>) (cons (shen.hdtl Parse_shen.<clause*>) (shen.hdtl Parse_shen.<clauses*>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_<e> (<e> V16411) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
43
43
 
44
- (defun shen.<clause*> (V857) (let Parse_shen.<head*> (shen.<head*> V857) (if (not (= (fail) Parse_shen.<head*>)) (if (and (cons? (hd Parse_shen.<head*>)) (= <-- (hd (hd Parse_shen.<head*>)))) (let Parse_shen.<body*> (shen.<body*> (shen.pair (tl (hd Parse_shen.<head*>)) (shen.hdtl Parse_shen.<head*>))) (if (not (= (fail) Parse_shen.<body*>)) (let Parse_shen.<end*> (shen.<end*> Parse_shen.<body*>) (if (not (= (fail) Parse_shen.<end*>)) (shen.pair (hd Parse_shen.<end*>) (cons (shen.hdtl Parse_shen.<head*>) (cons (shen.hdtl Parse_shen.<body*>) ()))) (fail))) (fail))) (fail)) (fail))))
44
+ (defun shen.<clause*> (V16413) (let Parse_shen.<head*> (shen.<head*> V16413) (if (not (= (fail) Parse_shen.<head*>)) (if (and (cons? (hd Parse_shen.<head*>)) (= <-- (hd (hd Parse_shen.<head*>)))) (let Parse_shen.<body*> (shen.<body*> (shen.pair (tl (hd Parse_shen.<head*>)) (shen.hdtl Parse_shen.<head*>))) (if (not (= (fail) Parse_shen.<body*>)) (let Parse_shen.<end*> (shen.<end*> Parse_shen.<body*>) (if (not (= (fail) Parse_shen.<end*>)) (shen.pair (hd Parse_shen.<end*>) (cons (shen.hdtl Parse_shen.<head*>) (cons (shen.hdtl Parse_shen.<body*>) ()))) (fail))) (fail))) (fail)) (fail))))
45
45
 
46
- (defun shen.<head*> (V858) (let YaccParse (let Parse_shen.<term*> (shen.<term*> V858) (if (not (= (fail) Parse_shen.<term*>)) (let Parse_shen.<head*> (shen.<head*> Parse_shen.<term*>) (if (not (= (fail) Parse_shen.<head*>)) (shen.pair (hd Parse_shen.<head*>) (cons (shen.hdtl Parse_shen.<term*>) (shen.hdtl Parse_shen.<head*>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_<e> (<e> V858) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
46
+ (defun shen.<head*> (V16415) (let YaccParse (let Parse_shen.<term*> (shen.<term*> V16415) (if (not (= (fail) Parse_shen.<term*>)) (let Parse_shen.<head*> (shen.<head*> Parse_shen.<term*>) (if (not (= (fail) Parse_shen.<head*>)) (shen.pair (hd Parse_shen.<head*>) (cons (shen.hdtl Parse_shen.<term*>) (shen.hdtl Parse_shen.<head*>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_<e> (<e> V16415) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
47
47
 
48
- (defun shen.<term*> (V859) (if (cons? (hd V859)) (let Parse_X (hd (hd V859)) (if (and (not (= <-- Parse_X)) (shen.legitimate-term? Parse_X)) (shen.pair (hd (shen.pair (tl (hd V859)) (shen.hdtl V859))) (shen.eval-cons Parse_X)) (fail))) (fail)))
48
+ (defun shen.<term*> (V16417) (if (cons? (hd V16417)) (let Parse_X (hd (hd V16417)) (if (and (not (= <-- Parse_X)) (shen.legitimate-term? Parse_X)) (shen.pair (hd (shen.pair (tl (hd V16417)) (shen.hdtl V16417))) (shen.eval-cons Parse_X)) (fail))) (fail)))
49
49
 
50
- (defun shen.legitimate-term? (V864) (cond ((and (cons? V864) (and (= cons (hd V864)) (and (cons? (tl V864)) (and (cons? (tl (tl V864))) (= () (tl (tl (tl V864)))))))) (and (shen.legitimate-term? (hd (tl V864))) (shen.legitimate-term? (hd (tl (tl V864)))))) ((and (cons? V864) (and (= mode (hd V864)) (and (cons? (tl V864)) (and (cons? (tl (tl V864))) (and (= + (hd (tl (tl V864)))) (= () (tl (tl (tl V864))))))))) (shen.legitimate-term? (hd (tl V864)))) ((and (cons? V864) (and (= mode (hd V864)) (and (cons? (tl V864)) (and (cons? (tl (tl V864))) (and (= - (hd (tl (tl V864)))) (= () (tl (tl (tl V864))))))))) (shen.legitimate-term? (hd (tl V864)))) ((cons? V864) false) (true true)))
50
+ (defun shen.legitimate-term? (V16423) (cond ((and (cons? V16423) (and (= cons (hd V16423)) (and (cons? (tl V16423)) (and (cons? (tl (tl V16423))) (= () (tl (tl (tl V16423)))))))) (and (shen.legitimate-term? (hd (tl V16423))) (shen.legitimate-term? (hd (tl (tl V16423)))))) ((and (cons? V16423) (and (= mode (hd V16423)) (and (cons? (tl V16423)) (and (cons? (tl (tl V16423))) (and (= + (hd (tl (tl V16423)))) (= () (tl (tl (tl V16423))))))))) (shen.legitimate-term? (hd (tl V16423)))) ((and (cons? V16423) (and (= mode (hd V16423)) (and (cons? (tl V16423)) (and (cons? (tl (tl V16423))) (and (= - (hd (tl (tl V16423)))) (= () (tl (tl (tl V16423))))))))) (shen.legitimate-term? (hd (tl V16423)))) ((cons? V16423) false) (true true)))
51
51
 
52
- (defun shen.eval-cons (V865) (cond ((and (cons? V865) (and (= cons (hd V865)) (and (cons? (tl V865)) (and (cons? (tl (tl V865))) (= () (tl (tl (tl V865)))))))) (cons (shen.eval-cons (hd (tl V865))) (shen.eval-cons (hd (tl (tl V865)))))) ((and (cons? V865) (and (= mode (hd V865)) (and (cons? (tl V865)) (and (cons? (tl (tl V865))) (= () (tl (tl (tl V865)))))))) (cons mode (cons (shen.eval-cons (hd (tl V865))) (tl (tl V865))))) (true V865)))
52
+ (defun shen.eval-cons (V16425) (cond ((and (cons? V16425) (and (= cons (hd V16425)) (and (cons? (tl V16425)) (and (cons? (tl (tl V16425))) (= () (tl (tl (tl V16425)))))))) (cons (shen.eval-cons (hd (tl V16425))) (shen.eval-cons (hd (tl (tl V16425)))))) ((and (cons? V16425) (and (= mode (hd V16425)) (and (cons? (tl V16425)) (and (cons? (tl (tl V16425))) (= () (tl (tl (tl V16425)))))))) (cons mode (cons (shen.eval-cons (hd (tl V16425))) (tl (tl V16425))))) (true V16425)))
53
53
 
54
- (defun shen.<body*> (V866) (let YaccParse (let Parse_shen.<literal*> (shen.<literal*> V866) (if (not (= (fail) Parse_shen.<literal*>)) (let Parse_shen.<body*> (shen.<body*> Parse_shen.<literal*>) (if (not (= (fail) Parse_shen.<body*>)) (shen.pair (hd Parse_shen.<body*>) (cons (shen.hdtl Parse_shen.<literal*>) (shen.hdtl Parse_shen.<body*>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_<e> (<e> V866) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
54
+ (defun shen.<body*> (V16427) (let YaccParse (let Parse_shen.<literal*> (shen.<literal*> V16427) (if (not (= (fail) Parse_shen.<literal*>)) (let Parse_shen.<body*> (shen.<body*> Parse_shen.<literal*>) (if (not (= (fail) Parse_shen.<body*>)) (shen.pair (hd Parse_shen.<body*>) (cons (shen.hdtl Parse_shen.<literal*>) (shen.hdtl Parse_shen.<body*>))) (fail))) (fail))) (if (= YaccParse (fail)) (let Parse_<e> (<e> V16427) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) ()) (fail))) YaccParse)))
55
55
 
56
- (defun shen.<literal*> (V867) (let YaccParse (if (and (cons? (hd V867)) (= ! (hd (hd V867)))) (shen.pair (hd (shen.pair (tl (hd V867)) (shen.hdtl V867))) (cons cut (cons (intern "Throwcontrol") ()))) (fail)) (if (= YaccParse (fail)) (if (cons? (hd V867)) (let Parse_X (hd (hd V867)) (if (cons? Parse_X) (shen.pair (hd (shen.pair (tl (hd V867)) (shen.hdtl V867))) Parse_X) (fail))) (fail)) YaccParse)))
56
+ (defun shen.<literal*> (V16429) (let YaccParse (if (and (cons? (hd V16429)) (= ! (hd (hd V16429)))) (shen.pair (hd (shen.pair (tl (hd V16429)) (shen.hdtl V16429))) (cons cut (cons (intern "Throwcontrol") ()))) (fail)) (if (= YaccParse (fail)) (if (cons? (hd V16429)) (let Parse_X (hd (hd V16429)) (if (cons? Parse_X) (shen.pair (hd (shen.pair (tl (hd V16429)) (shen.hdtl V16429))) Parse_X) (fail))) (fail)) YaccParse)))
57
57
 
58
- (defun shen.<end*> (V868) (if (cons? (hd V868)) (let Parse_X (hd (hd V868)) (if (= Parse_X ;) (shen.pair (hd (shen.pair (tl (hd V868)) (shen.hdtl V868))) Parse_X) (fail))) (fail)))
58
+ (defun shen.<end*> (V16431) (if (cons? (hd V16431)) (let Parse_X (hd (hd V16431)) (if (= Parse_X ;) (shen.pair (hd (shen.pair (tl (hd V16431)) (shen.hdtl V16431))) Parse_X) (fail))) (fail)))
59
59
 
60
- (defun cut (V869 V870 V871) (let Result (thaw V871) (if (= Result false) V869 Result)))
60
+ (defun cut (V16435 V16436 V16437) (let Result (thaw V16437) (if (= Result false) V16435 Result)))
61
61
 
62
- (defun shen.insert_modes (V872) (cond ((and (cons? V872) (and (= mode (hd V872)) (and (cons? (tl V872)) (and (cons? (tl (tl V872))) (= () (tl (tl (tl V872)))))))) V872) ((= () V872) ()) ((cons? V872) (cons (cons mode (cons (hd V872) (cons + ()))) (cons mode (cons (shen.insert_modes (tl V872)) (cons - ()))))) (true V872)))
62
+ (defun shen.insert_modes (V16439) (cond ((and (cons? V16439) (and (= mode (hd V16439)) (and (cons? (tl V16439)) (and (cons? (tl (tl V16439))) (= () (tl (tl (tl V16439)))))))) V16439) ((= () V16439) ()) ((cons? V16439) (cons (cons mode (cons (hd V16439) (cons + ()))) (cons mode (cons (shen.insert_modes (tl V16439)) (cons - ()))))) (true V16439)))
63
63
 
64
- (defun shen.s-prolog (V873) (map (lambda V826 (eval V826)) (shen.prolog->shen V873)))
64
+ (defun shen.s-prolog (V16441) (map (lambda X (eval X)) (shen.prolog->shen V16441)))
65
65
 
66
- (defun shen.prolog->shen (V874) (map (lambda V829 (shen.compile_prolog_procedure V829)) (shen.group_clauses (map (lambda V828 (shen.s-prolog_clause V828)) (mapcan (lambda V827 (shen.head_abstraction V827)) V874)))))
66
+ (defun shen.prolog->shen (V16443) (map (lambda X (shen.compile_prolog_procedure X)) (shen.group_clauses (map (lambda X (shen.s-prolog_clause X)) (mapcan (lambda X (shen.head_abstraction X)) V16443)))))
67
67
 
68
- (defun shen.s-prolog_clause (V875) (cond ((and (cons? V875) (and (cons? (tl V875)) (and (= :- (hd (tl V875))) (and (cons? (tl (tl V875))) (= () (tl (tl (tl V875)))))))) (cons (hd V875) (cons :- (cons (map (lambda V830 (shen.s-prolog_literal V830)) (hd (tl (tl V875)))) ())))) (true (shen.f_error shen.s-prolog_clause))))
68
+ (defun shen.s-prolog_clause (V16445) (cond ((and (cons? V16445) (and (cons? (tl V16445)) (and (= :- (hd (tl V16445))) (and (cons? (tl (tl V16445))) (= () (tl (tl (tl V16445)))))))) (cons (hd V16445) (cons :- (cons (map (lambda X (shen.s-prolog_literal X)) (hd (tl (tl V16445)))) ())))) (true (shen.f_error shen.s-prolog_clause))))
69
69
 
70
- (defun shen.head_abstraction (V876) (cond ((and (cons? V876) (and (cons? (tl V876)) (and (= :- (hd (tl V876))) (and (cons? (tl (tl V876))) (and (= () (tl (tl (tl V876)))) (< (shen.complexity_head (hd V876)) (value shen.*maxcomplexity*))))))) (cons V876 ())) ((and (cons? V876) (and (cons? (hd V876)) (and (cons? (tl V876)) (and (= :- (hd (tl V876))) (and (cons? (tl (tl V876))) (= () (tl (tl (tl V876))))))))) (let Terms (map (lambda Y (gensym V)) (tl (hd V876))) (let XTerms (shen.rcons_form (shen.remove_modes (tl (hd V876)))) (let Literal (cons unify (cons (shen.cons_form Terms) (cons XTerms ()))) (let Clause (cons (cons (hd (hd V876)) Terms) (cons :- (cons (cons Literal (hd (tl (tl V876)))) ()))) (cons Clause ())))))) (true (shen.f_error shen.head_abstraction))))
70
+ (defun shen.head_abstraction (V16447) (cond ((and (cons? V16447) (and (cons? (tl V16447)) (and (= :- (hd (tl V16447))) (and (cons? (tl (tl V16447))) (and (= () (tl (tl (tl V16447)))) (< (shen.complexity_head (hd V16447)) (value shen.*maxcomplexity*))))))) (cons V16447 ())) ((and (cons? V16447) (and (cons? (hd V16447)) (and (cons? (tl V16447)) (and (= :- (hd (tl V16447))) (and (cons? (tl (tl V16447))) (= () (tl (tl (tl V16447))))))))) (let Terms (map (lambda Y (gensym V)) (tl (hd V16447))) (let XTerms (shen.rcons_form (shen.remove_modes (tl (hd V16447)))) (let Literal (cons unify (cons (shen.cons_form Terms) (cons XTerms ()))) (let Clause (cons (cons (hd (hd V16447)) Terms) (cons :- (cons (cons Literal (hd (tl (tl V16447)))) ()))) (cons Clause ())))))) (true (shen.f_error shen.head_abstraction))))
71
71
 
72
- (defun shen.complexity_head (V881) (cond ((cons? V881) (shen.product (map (lambda V831 (shen.complexity V831)) (tl V881)))) (true (shen.f_error shen.complexity_head))))
72
+ (defun shen.complexity_head (V16453) (cond ((cons? V16453) (shen.product (map (lambda X (shen.complexity X)) (tl V16453)))) (true (shen.f_error shen.complexity_head))))
73
73
 
74
- (defun shen.complexity (V889) (cond ((and (cons? V889) (and (= mode (hd V889)) (and (cons? (tl V889)) (and (cons? (hd (tl V889))) (and (= mode (hd (hd (tl V889)))) (and (cons? (tl (hd (tl V889)))) (and (cons? (tl (tl (hd (tl V889))))) (and (= () (tl (tl (tl (hd (tl V889)))))) (and (cons? (tl (tl V889))) (= () (tl (tl (tl V889))))))))))))) (shen.complexity (hd (tl V889)))) ((and (cons? V889) (and (= mode (hd V889)) (and (cons? (tl V889)) (and (cons? (hd (tl V889))) (and (cons? (tl (tl V889))) (and (= + (hd (tl (tl V889)))) (= () (tl (tl (tl V889)))))))))) (* 2 (* (shen.complexity (cons mode (cons (hd (hd (tl V889))) (tl (tl V889))))) (shen.complexity (cons mode (cons (tl (hd (tl V889))) (tl (tl V889)))))))) ((and (cons? V889) (and (= mode (hd V889)) (and (cons? (tl V889)) (and (cons? (hd (tl V889))) (and (cons? (tl (tl V889))) (and (= - (hd (tl (tl V889)))) (= () (tl (tl (tl V889)))))))))) (* (shen.complexity (cons mode (cons (hd (hd (tl V889))) (tl (tl V889))))) (shen.complexity (cons mode (cons (tl (hd (tl V889))) (tl (tl V889))))))) ((and (cons? V889) (and (= mode (hd V889)) (and (cons? (tl V889)) (and (cons? (tl (tl V889))) (and (= () (tl (tl (tl V889)))) (variable? (hd (tl V889)))))))) 1) ((and (cons? V889) (and (= mode (hd V889)) (and (cons? (tl V889)) (and (cons? (tl (tl V889))) (and (= + (hd (tl (tl V889)))) (= () (tl (tl (tl V889))))))))) 2) ((and (cons? V889) (and (= mode (hd V889)) (and (cons? (tl V889)) (and (cons? (tl (tl V889))) (and (= - (hd (tl (tl V889)))) (= () (tl (tl (tl V889))))))))) 1) (true (shen.complexity (cons mode (cons V889 (cons + ())))))))
74
+ (defun shen.complexity (V16462) (cond ((and (cons? V16462) (and (= mode (hd V16462)) (and (cons? (tl V16462)) (and (cons? (hd (tl V16462))) (and (= mode (hd (hd (tl V16462)))) (and (cons? (tl (hd (tl V16462)))) (and (cons? (tl (tl (hd (tl V16462))))) (and (= () (tl (tl (tl (hd (tl V16462)))))) (and (cons? (tl (tl V16462))) (= () (tl (tl (tl V16462))))))))))))) (shen.complexity (hd (tl V16462)))) ((and (cons? V16462) (and (= mode (hd V16462)) (and (cons? (tl V16462)) (and (cons? (hd (tl V16462))) (and (cons? (tl (tl V16462))) (and (= + (hd (tl (tl V16462)))) (= () (tl (tl (tl V16462)))))))))) (* 2 (* (shen.complexity (cons mode (cons (hd (hd (tl V16462))) (tl (tl V16462))))) (shen.complexity (cons mode (cons (tl (hd (tl V16462))) (tl (tl V16462)))))))) ((and (cons? V16462) (and (= mode (hd V16462)) (and (cons? (tl V16462)) (and (cons? (hd (tl V16462))) (and (cons? (tl (tl V16462))) (and (= - (hd (tl (tl V16462)))) (= () (tl (tl (tl V16462)))))))))) (* (shen.complexity (cons mode (cons (hd (hd (tl V16462))) (tl (tl V16462))))) (shen.complexity (cons mode (cons (tl (hd (tl V16462))) (tl (tl V16462))))))) ((and (cons? V16462) (and (= mode (hd V16462)) (and (cons? (tl V16462)) (and (cons? (tl (tl V16462))) (and (= () (tl (tl (tl V16462)))) (variable? (hd (tl V16462)))))))) 1) ((and (cons? V16462) (and (= mode (hd V16462)) (and (cons? (tl V16462)) (and (cons? (tl (tl V16462))) (and (= + (hd (tl (tl V16462)))) (= () (tl (tl (tl V16462))))))))) 2) ((and (cons? V16462) (and (= mode (hd V16462)) (and (cons? (tl V16462)) (and (cons? (tl (tl V16462))) (and (= - (hd (tl (tl V16462)))) (= () (tl (tl (tl V16462))))))))) 1) (true (shen.complexity (cons mode (cons V16462 (cons + ())))))))
75
75
 
76
- (defun shen.product (V890) (cond ((= () V890) 1) ((cons? V890) (* (hd V890) (shen.product (tl V890)))) (true (shen.f_error shen.product))))
76
+ (defun shen.product (V16464) (cond ((= () V16464) 1) ((cons? V16464) (* (hd V16464) (shen.product (tl V16464)))) (true (shen.f_error shen.product))))
77
77
 
78
- (defun shen.s-prolog_literal (V891) (cond ((and (cons? V891) (and (= is (hd V891)) (and (cons? (tl V891)) (and (cons? (tl (tl V891))) (= () (tl (tl (tl V891)))))))) (cons bind (cons (hd (tl V891)) (cons (shen.insert_deref (hd (tl (tl V891)))) ())))) ((and (cons? V891) (and (= when (hd V891)) (and (cons? (tl V891)) (= () (tl (tl V891)))))) (cons fwhen (cons (shen.insert_deref (hd (tl V891))) ()))) ((and (cons? V891) (and (= bind (hd V891)) (and (cons? (tl V891)) (and (cons? (tl (tl V891))) (= () (tl (tl (tl V891)))))))) (cons bind (cons (hd (tl V891)) (cons (shen.insert_lazyderef (hd (tl (tl V891)))) ())))) ((and (cons? V891) (and (= fwhen (hd V891)) (and (cons? (tl V891)) (= () (tl (tl V891)))))) (cons fwhen (cons (shen.insert_lazyderef (hd (tl V891))) ()))) ((cons? V891) V891) (true (shen.f_error shen.s-prolog_literal))))
78
+ (defun shen.s-prolog_literal (V16466) (cond ((and (cons? V16466) (and (= is (hd V16466)) (and (cons? (tl V16466)) (and (cons? (tl (tl V16466))) (= () (tl (tl (tl V16466)))))))) (cons bind (cons (hd (tl V16466)) (cons (shen.insert_deref (hd (tl (tl V16466)))) ())))) ((and (cons? V16466) (and (= when (hd V16466)) (and (cons? (tl V16466)) (= () (tl (tl V16466)))))) (cons fwhen (cons (shen.insert_deref (hd (tl V16466))) ()))) ((and (cons? V16466) (and (= bind (hd V16466)) (and (cons? (tl V16466)) (and (cons? (tl (tl V16466))) (= () (tl (tl (tl V16466)))))))) (cons bind (cons (hd (tl V16466)) (cons (shen.insert_lazyderef (hd (tl (tl V16466)))) ())))) ((and (cons? V16466) (and (= fwhen (hd V16466)) (and (cons? (tl V16466)) (= () (tl (tl V16466)))))) (cons fwhen (cons (shen.insert_lazyderef (hd (tl V16466))) ()))) ((cons? V16466) V16466) (true (shen.f_error shen.s-prolog_literal))))
79
79
 
80
- (defun shen.insert_deref (V892) (cond ((variable? V892) (cons shen.deref (cons V892 (cons ProcessN ())))) ((cons? V892) (cons (shen.insert_deref (hd V892)) (shen.insert_deref (tl V892)))) (true V892)))
80
+ (defun shen.insert_deref (V16468) (cond ((variable? V16468) (cons shen.deref (cons V16468 (cons ProcessN ())))) ((cons? V16468) (cons (shen.insert_deref (hd V16468)) (shen.insert_deref (tl V16468)))) (true V16468)))
81
81
 
82
- (defun shen.insert_lazyderef (V893) (cond ((variable? V893) (cons shen.lazyderef (cons V893 (cons ProcessN ())))) ((cons? V893) (cons (shen.insert_lazyderef (hd V893)) (shen.insert_lazyderef (tl V893)))) (true V893)))
82
+ (defun shen.insert_lazyderef (V16470) (cond ((variable? V16470) (cons shen.lazyderef (cons V16470 (cons ProcessN ())))) ((cons? V16470) (cons (shen.insert_lazyderef (hd V16470)) (shen.insert_lazyderef (tl V16470)))) (true V16470)))
83
83
 
84
- (defun shen.m_prolog_to_s-prolog_predicate (V894) (cond ((= = V894) unify) ((= =! V894) unify!) ((= == V894) identical) (true V894)))
84
+ (defun shen.group_clauses (V16472) (cond ((= () V16472) ()) ((cons? V16472) (let Group (shen.collect (lambda X (shen.same_predicate? (hd V16472) X)) V16472) (let Rest (difference V16472 Group) (cons Group (shen.group_clauses Rest))))) (true (shen.f_error shen.group_clauses))))
85
85
 
86
- (defun shen.group_clauses (V895) (cond ((= () V895) ()) ((cons? V895) (let Group (shen.collect (lambda X (shen.same_predicate? (hd V895) X)) V895) (let Rest (difference V895 Group) (cons Group (shen.group_clauses Rest))))) (true (shen.f_error shen.group_clauses))))
86
+ (defun shen.collect (V16477 V16478) (cond ((= () V16478) ()) ((cons? V16478) (if (V16477 (hd V16478)) (cons (hd V16478) (shen.collect V16477 (tl V16478))) (shen.collect V16477 (tl V16478)))) (true (shen.f_error shen.collect))))
87
87
 
88
- (defun shen.collect (V898 V899) (cond ((= () V899) ()) ((cons? V899) (if (V898 (hd V899)) (cons (hd V899) (shen.collect V898 (tl V899))) (shen.collect V898 (tl V899)))) (true (shen.f_error shen.collect))))
88
+ (defun shen.same_predicate? (V16497 V16498) (cond ((and (cons? V16497) (and (cons? (hd V16497)) (and (cons? V16498) (cons? (hd V16498))))) (= (hd (hd V16497)) (hd (hd V16498)))) (true (shen.f_error shen.same_predicate?))))
89
89
 
90
- (defun shen.same_predicate? (V916 V917) (cond ((and (cons? V916) (and (cons? (hd V916)) (and (cons? V917) (cons? (hd V917))))) (= (hd (hd V916)) (hd (hd V917)))) (true (shen.f_error shen.same_predicate?))))
90
+ (defun shen.compile_prolog_procedure (V16500) (let F (shen.procedure_name V16500) (let Shen (shen.clauses-to-shen F V16500) Shen)))
91
91
 
92
- (defun shen.compile_prolog_procedure (V918) (let F (shen.procedure_name V918) (let Shen (shen.clauses-to-shen F V918) Shen)))
92
+ (defun shen.procedure_name (V16514) (cond ((and (cons? V16514) (and (cons? (hd V16514)) (cons? (hd (hd V16514))))) (hd (hd (hd V16514)))) (true (shen.f_error shen.procedure_name))))
93
93
 
94
- (defun shen.procedure_name (V931) (cond ((and (cons? V931) (and (cons? (hd V931)) (cons? (hd (hd V931))))) (hd (hd (hd V931)))) (true (shen.f_error shen.procedure_name))))
94
+ (defun shen.clauses-to-shen (V16517 V16518) (let Linear (map (lambda X (shen.linearise-clause X)) V16518) (let Arity (shen.prolog-aritycheck V16517 (map (lambda X (head X)) V16518)) (let Parameters (shen.parameters Arity) (let AUM_instructions (map (lambda X (shen.aum X Parameters)) Linear) (let Code (shen.catch-cut (shen.nest-disjunct (map (lambda X (shen.aum_to_shen X)) AUM_instructions))) (let ShenDef (cons define (cons V16517 (append Parameters (append (cons ProcessN (cons Continuation ())) (cons -> (cons Code ())))))) ShenDef)))))))
95
95
 
96
- (defun shen.clauses-to-shen (V932 V933) (let Linear (map (lambda V832 (shen.linearise-clause V832)) V933) (let Arity (shen.prolog-aritycheck V932 (map (lambda V833 (head V833)) V933)) (let Parameters (shen.parameters Arity) (let AUM_instructions (map (lambda X (shen.aum X Parameters)) Linear) (let Code (shen.catch-cut (shen.nest-disjunct (map (lambda V834 (shen.aum_to_shen V834)) AUM_instructions))) (let ShenDef (cons define (cons V932 (append Parameters (append (cons ProcessN (cons Continuation ())) (cons -> (cons Code ())))))) ShenDef)))))))
97
-
98
- (defun shen.catch-cut (V934) (cond ((not (shen.occurs? cut V934)) V934) (true (cons let (cons Throwcontrol (cons (cons shen.catchpoint ()) (cons (cons shen.cutpoint (cons Throwcontrol (cons V934 ()))) ())))))))
96
+ (defun shen.catch-cut (V16520) (cond ((not (shen.occurs? cut V16520)) V16520) (true (cons let (cons Throwcontrol (cons (cons shen.catchpoint ()) (cons (cons shen.cutpoint (cons Throwcontrol (cons V16520 ()))) ())))))))
99
97
 
100
98
  (defun shen.catchpoint () (set shen.*catch* (+ 1 (value shen.*catch*))))
101
99
 
102
- (defun shen.cutpoint (V940 V941) (cond ((= V941 V940) false) (true V941)))
100
+ (defun shen.cutpoint (V16528 V16529) (cond ((= V16529 V16528) false) (true V16529)))
103
101
 
104
- (defun shen.nest-disjunct (V942) (cond ((and (cons? V942) (= () (tl V942))) (hd V942)) ((cons? V942) (shen.lisp-or (hd V942) (shen.nest-disjunct (tl V942)))) (true (shen.f_error shen.nest-disjunct))))
102
+ (defun shen.nest-disjunct (V16531) (cond ((and (cons? V16531) (= () (tl V16531))) (hd V16531)) ((cons? V16531) (shen.lisp-or (hd V16531) (shen.nest-disjunct (tl V16531)))) (true (shen.f_error shen.nest-disjunct))))
105
103
 
106
- (defun shen.lisp-or (V943 V944) (cons let (cons Case (cons V943 (cons (cons if (cons (cons = (cons Case (cons false ()))) (cons V944 (cons Case ())))) ())))))
104
+ (defun shen.lisp-or (V16534 V16535) (cons let (cons Case (cons V16534 (cons (cons if (cons (cons = (cons Case (cons false ()))) (cons V16535 (cons Case ())))) ())))))
107
105
 
108
- (defun shen.prolog-aritycheck (V947 V948) (cond ((and (cons? V948) (= () (tl V948))) (- (length (hd V948)) 1)) ((and (cons? V948) (cons? (tl V948))) (if (= (length (hd V948)) (length (hd (tl V948)))) (shen.prolog-aritycheck V947 (tl V948)) (simple-error (cn "arity error in prolog procedure " (shen.app (cons V947 ()) "
106
+ (defun shen.prolog-aritycheck (V16540 V16541) (cond ((and (cons? V16541) (= () (tl V16541))) (- (length (hd V16541)) 1)) ((and (cons? V16541) (cons? (tl V16541))) (if (= (length (hd V16541)) (length (hd (tl V16541)))) (shen.prolog-aritycheck V16540 (tl V16541)) (simple-error (cn "arity error in prolog procedure " (shen.app (cons V16540 ()) "
109
107
  " shen.a))))) (true (shen.f_error shen.prolog-aritycheck))))
110
108
 
111
- (defun shen.linearise-clause (V949) (cond ((and (cons? V949) (and (cons? (tl V949)) (and (= :- (hd (tl V949))) (and (cons? (tl (tl V949))) (= () (tl (tl (tl V949)))))))) (let Linear (shen.linearise (cons (hd V949) (tl (tl V949)))) (shen.clause_form Linear))) (true (shen.f_error shen.linearise-clause))))
109
+ (defun shen.linearise-clause (V16543) (cond ((and (cons? V16543) (and (cons? (tl V16543)) (and (= :- (hd (tl V16543))) (and (cons? (tl (tl V16543))) (= () (tl (tl (tl V16543)))))))) (let Linear (shen.linearise (cons (hd V16543) (tl (tl V16543)))) (shen.clause_form Linear))) (true (shen.f_error shen.linearise-clause))))
112
110
 
113
- (defun shen.clause_form (V950) (cond ((and (cons? V950) (and (cons? (tl V950)) (= () (tl (tl V950))))) (cons (shen.explicit_modes (hd V950)) (cons :- (cons (shen.cf_help (hd (tl V950))) ())))) (true (shen.f_error shen.clause_form))))
111
+ (defun shen.clause_form (V16545) (cond ((and (cons? V16545) (and (cons? (tl V16545)) (= () (tl (tl V16545))))) (cons (shen.explicit_modes (hd V16545)) (cons :- (cons (shen.cf_help (hd (tl V16545))) ())))) (true (shen.f_error shen.clause_form))))
114
112
 
115
- (defun shen.explicit_modes (V951) (cond ((cons? V951) (cons (hd V951) (map (lambda V835 (shen.em_help V835)) (tl V951)))) (true (shen.f_error shen.explicit_modes))))
113
+ (defun shen.explicit_modes (V16547) (cond ((cons? V16547) (cons (hd V16547) (map (lambda X (shen.em_help X)) (tl V16547)))) (true (shen.f_error shen.explicit_modes))))
116
114
 
117
- (defun shen.em_help (V952) (cond ((and (cons? V952) (and (= mode (hd V952)) (and (cons? (tl V952)) (and (cons? (tl (tl V952))) (= () (tl (tl (tl V952)))))))) V952) (true (cons mode (cons V952 (cons + ()))))))
115
+ (defun shen.em_help (V16549) (cond ((and (cons? V16549) (and (= mode (hd V16549)) (and (cons? (tl V16549)) (and (cons? (tl (tl V16549))) (= () (tl (tl (tl V16549)))))))) V16549) (true (cons mode (cons V16549 (cons + ()))))))
118
116
 
119
- (defun shen.cf_help (V953) (cond ((and (cons? V953) (and (= where (hd V953)) (and (cons? (tl V953)) (and (cons? (hd (tl V953))) (and (= = (hd (hd (tl V953)))) (and (cons? (tl (hd (tl V953)))) (and (cons? (tl (tl (hd (tl V953))))) (and (= () (tl (tl (tl (hd (tl V953)))))) (and (cons? (tl (tl V953))) (= () (tl (tl (tl V953))))))))))))) (cons (cons (if (value shen.*occurs*) unify! unify) (tl (hd (tl V953)))) (shen.cf_help (hd (tl (tl V953)))))) (true V953)))
117
+ (defun shen.cf_help (V16551) (cond ((and (cons? V16551) (and (= where (hd V16551)) (and (cons? (tl V16551)) (and (cons? (hd (tl V16551))) (and (= = (hd (hd (tl V16551)))) (and (cons? (tl (hd (tl V16551)))) (and (cons? (tl (tl (hd (tl V16551))))) (and (= () (tl (tl (tl (hd (tl V16551)))))) (and (cons? (tl (tl V16551))) (= () (tl (tl (tl V16551))))))))))))) (cons (cons (if (value shen.*occurs*) unify! unify) (tl (hd (tl V16551)))) (shen.cf_help (hd (tl (tl V16551)))))) (true V16551)))
120
118
 
121
- (defun occurs-check (V958) (cond ((= + V958) (set shen.*occurs* true)) ((= - V958) (set shen.*occurs* false)) (true (simple-error "occurs-check expects + or -
119
+ (defun occurs-check (V16557) (cond ((= + V16557) (set shen.*occurs* true)) ((= - V16557) (set shen.*occurs* false)) (true (simple-error "occurs-check expects + or -
122
120
  "))))
123
121
 
124
- (defun shen.aum (V959 V960) (cond ((and (cons? V959) (and (cons? (hd V959)) (and (cons? (tl V959)) (and (= :- (hd (tl V959))) (and (cons? (tl (tl V959))) (= () (tl (tl (tl V959))))))))) (let MuApplication (shen.make_mu_application (cons shen.mu (cons (tl (hd V959)) (cons (shen.continuation_call (tl (hd V959)) (hd (tl (tl V959)))) ()))) V960) (shen.mu_reduction MuApplication +))) (true (shen.f_error shen.aum))))
122
+ (defun shen.aum (V16560 V16561) (cond ((and (cons? V16560) (and (cons? (hd V16560)) (and (cons? (tl V16560)) (and (= :- (hd (tl V16560))) (and (cons? (tl (tl V16560))) (= () (tl (tl (tl V16560))))))))) (let MuApplication (shen.make_mu_application (cons shen.mu (cons (tl (hd V16560)) (cons (shen.continuation_call (tl (hd V16560)) (hd (tl (tl V16560)))) ()))) V16561) (shen.mu_reduction MuApplication +))) (true (shen.f_error shen.aum))))
125
123
 
126
- (defun shen.continuation_call (V961 V962) (let VTerms (cons ProcessN (shen.extract_vars V961)) (let VBody (shen.extract_vars V962) (let Free (remove Throwcontrol (difference VBody VTerms)) (shen.cc_help Free V962)))))
124
+ (defun shen.continuation_call (V16564 V16565) (let VTerms (cons ProcessN (shen.extract_vars V16564)) (let VBody (shen.extract_vars V16565) (let Free (remove Throwcontrol (difference VBody VTerms)) (shen.cc_help Free V16565)))))
127
125
 
128
- (defun remove (V963 V964) (shen.remove-h V963 V964 ()))
126
+ (defun remove (V16568 V16569) (shen.remove-h V16568 V16569 ()))
129
127
 
130
- (defun shen.remove-h (V968 V969 V970) (cond ((= () V969) (reverse V970)) ((and (cons? V969) (= (hd V969) V968)) (shen.remove-h (hd V969) (tl V969) V970)) ((cons? V969) (shen.remove-h V968 (tl V969) (cons (hd V969) V970))) (true (shen.f_error shen.remove-h))))
128
+ (defun shen.remove-h (V16576 V16577 V16578) (cond ((= () V16577) (reverse V16578)) ((and (cons? V16577) (= (hd V16577) V16576)) (shen.remove-h (hd V16577) (tl V16577) V16578)) ((cons? V16577) (shen.remove-h V16576 (tl V16577) (cons (hd V16577) V16578))) (true (shen.f_error shen.remove-h))))
131
129
 
132
- (defun shen.cc_help (V971 V972) (cond ((and (= () V971) (= () V972)) (cons shen.pop (cons shen.the (cons shen.stack ())))) ((= () V972) (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons V971 (cons and (cons shen.then (cons (cons shen.pop (cons shen.the (cons shen.stack ()))) ()))))))))) ((= () V971) (cons call (cons shen.the (cons shen.continuation (cons V972 ()))))) (true (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons V971 (cons and (cons shen.then (cons (cons call (cons shen.the (cons shen.continuation (cons V972 ())))) ())))))))))))
130
+ (defun shen.cc_help (V16581 V16582) (cond ((and (= () V16581) (= () V16582)) (cons shen.pop (cons shen.the (cons shen.stack ())))) ((= () V16582) (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons V16581 (cons and (cons shen.then (cons (cons shen.pop (cons shen.the (cons shen.stack ()))) ()))))))))) ((= () V16581) (cons call (cons shen.the (cons shen.continuation (cons V16582 ()))))) (true (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons V16581 (cons and (cons shen.then (cons (cons call (cons shen.the (cons shen.continuation (cons V16582 ())))) ())))))))))))
133
131
 
134
- (defun shen.make_mu_application (V973 V974) (cond ((and (cons? V973) (and (= shen.mu (hd V973)) (and (cons? (tl V973)) (and (= () (hd (tl V973))) (and (cons? (tl (tl V973))) (and (= () (tl (tl (tl V973)))) (= () V974))))))) (hd (tl (tl V973)))) ((and (cons? V973) (and (= shen.mu (hd V973)) (and (cons? (tl V973)) (and (cons? (hd (tl V973))) (and (cons? (tl (tl V973))) (and (= () (tl (tl (tl V973)))) (cons? V974))))))) (cons (cons shen.mu (cons (hd (hd (tl V973))) (cons (shen.make_mu_application (cons shen.mu (cons (tl (hd (tl V973))) (tl (tl V973)))) (tl V974)) ()))) (cons (hd V974) ()))) (true (shen.f_error shen.make_mu_application))))
132
+ (defun shen.make_mu_application (V16585 V16586) (cond ((and (cons? V16585) (and (= shen.mu (hd V16585)) (and (cons? (tl V16585)) (and (= () (hd (tl V16585))) (and (cons? (tl (tl V16585))) (and (= () (tl (tl (tl V16585)))) (= () V16586))))))) (hd (tl (tl V16585)))) ((and (cons? V16585) (and (= shen.mu (hd V16585)) (and (cons? (tl V16585)) (and (cons? (hd (tl V16585))) (and (cons? (tl (tl V16585))) (and (= () (tl (tl (tl V16585)))) (cons? V16586))))))) (cons (cons shen.mu (cons (hd (hd (tl V16585))) (cons (shen.make_mu_application (cons shen.mu (cons (tl (hd (tl V16585))) (tl (tl V16585)))) (tl V16586)) ()))) (cons (hd V16586) ()))) (true (shen.f_error shen.make_mu_application))))
135
133
 
136
- (defun shen.mu_reduction (V981 V982) (cond ((and (cons? V981) (and (cons? (hd V981)) (and (= shen.mu (hd (hd V981))) (and (cons? (tl (hd V981))) (and (cons? (hd (tl (hd V981)))) (and (= mode (hd (hd (tl (hd V981))))) (and (cons? (tl (hd (tl (hd V981))))) (and (cons? (tl (tl (hd (tl (hd V981)))))) (and (= () (tl (tl (tl (hd (tl (hd V981))))))) (and (cons? (tl (tl (hd V981)))) (and (= () (tl (tl (tl (hd V981))))) (and (cons? (tl V981)) (= () (tl (tl V981))))))))))))))) (shen.mu_reduction (cons (cons shen.mu (cons (hd (tl (hd (tl (hd V981))))) (tl (tl (hd V981))))) (tl V981)) (hd (tl (tl (hd (tl (hd V981)))))))) ((and (cons? V981) (and (cons? (hd V981)) (and (= shen.mu (hd (hd V981))) (and (cons? (tl (hd V981))) (and (cons? (tl (tl (hd V981)))) (and (= () (tl (tl (tl (hd V981))))) (and (cons? (tl V981)) (and (= () (tl (tl V981))) (= _ (hd (tl (hd V981)))))))))))) (shen.mu_reduction (hd (tl (tl (hd V981)))) V982)) ((and (cons? V981) (and (cons? (hd V981)) (and (= shen.mu (hd (hd V981))) (and (cons? (tl (hd V981))) (and (cons? (tl (tl (hd V981)))) (and (= () (tl (tl (tl (hd V981))))) (and (cons? (tl V981)) (and (= () (tl (tl V981))) (shen.ephemeral_variable? (hd (tl (hd V981))) (hd (tl V981))))))))))) (subst (hd (tl V981)) (hd (tl (hd V981))) (shen.mu_reduction (hd (tl (tl (hd V981)))) V982))) ((and (cons? V981) (and (cons? (hd V981)) (and (= shen.mu (hd (hd V981))) (and (cons? (tl (hd V981))) (and (cons? (tl (tl (hd V981)))) (and (= () (tl (tl (tl (hd V981))))) (and (cons? (tl V981)) (and (= () (tl (tl V981))) (variable? (hd (tl (hd V981)))))))))))) (cons let (cons (hd (tl (hd V981))) (cons shen.be (cons (hd (tl V981)) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V981)))) V982) ()))))))) ((and (cons? V981) (and (cons? (hd V981)) (and (= shen.mu (hd (hd V981))) (and (cons? (tl (hd V981))) (and (cons? (tl (tl (hd V981)))) (and (= () (tl (tl (tl (hd V981))))) (and (cons? (tl V981)) (and (= () (tl (tl V981))) (and (= - V982) (shen.prolog_constant? (hd (tl (hd V981))))))))))))) (let Z (gensym V) (cons let (cons Z (cons shen.be (cons (cons shen.the (cons shen.result (cons shen.of (cons shen.dereferencing (tl V981))))) (cons in (cons (cons if (cons (cons Z (cons is (cons identical (cons shen.to (cons (hd (tl (hd V981))) ()))))) (cons shen.then (cons (shen.mu_reduction (hd (tl (tl (hd V981)))) -) (cons shen.else (cons shen.failed! ())))))) ())))))))) ((and (cons? V981) (and (cons? (hd V981)) (and (= shen.mu (hd (hd V981))) (and (cons? (tl (hd V981))) (and (cons? (tl (tl (hd V981)))) (and (= () (tl (tl (tl (hd V981))))) (and (cons? (tl V981)) (and (= () (tl (tl V981))) (and (= + V982) (shen.prolog_constant? (hd (tl (hd V981))))))))))))) (let Z (gensym V) (cons let (cons Z (cons shen.be (cons (cons shen.the (cons shen.result (cons shen.of (cons shen.dereferencing (tl V981))))) (cons in (cons (cons if (cons (cons Z (cons is (cons identical (cons shen.to (cons (hd (tl (hd V981))) ()))))) (cons shen.then (cons (shen.mu_reduction (hd (tl (tl (hd V981)))) +) (cons shen.else (cons (cons if (cons (cons Z (cons is (cons shen.a (cons shen.variable ())))) (cons shen.then (cons (cons bind (cons Z (cons shen.to (cons (hd (tl (hd V981))) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V981)))) +) ())))))) (cons shen.else (cons shen.failed! ())))))) ())))))) ())))))))) ((and (cons? V981) (and (cons? (hd V981)) (and (= shen.mu (hd (hd V981))) (and (cons? (tl (hd V981))) (and (cons? (hd (tl (hd V981)))) (and (cons? (tl (tl (hd V981)))) (and (= () (tl (tl (tl (hd V981))))) (and (cons? (tl V981)) (and (= () (tl (tl V981))) (= - V982)))))))))) (let Z (gensym V) (cons let (cons Z (cons shen.be (cons (cons shen.the (cons shen.result (cons shen.of (cons shen.dereferencing (tl V981))))) (cons in (cons (cons if (cons (cons Z (cons is (cons shen.a (cons shen.non-empty (cons list ()))))) (cons shen.then (cons (shen.mu_reduction (cons (cons shen.mu (cons (hd (hd (tl (hd V981)))) (cons (cons (cons shen.mu (cons (tl (hd (tl (hd V981)))) (tl (tl (hd V981))))) (cons (cons shen.the (cons tail (cons shen.of (cons Z ())))) ())) ()))) (cons (cons shen.the (cons head (cons shen.of (cons Z ())))) ())) -) (cons shen.else (cons shen.failed! ())))))) ())))))))) ((and (cons? V981) (and (cons? (hd V981)) (and (= shen.mu (hd (hd V981))) (and (cons? (tl (hd V981))) (and (cons? (hd (tl (hd V981)))) (and (cons? (tl (tl (hd V981)))) (and (= () (tl (tl (tl (hd V981))))) (and (cons? (tl V981)) (and (= () (tl (tl V981))) (= + V982)))))))))) (let Z (gensym V) (cons let (cons Z (cons shen.be (cons (cons shen.the (cons shen.result (cons shen.of (cons shen.dereferencing (tl V981))))) (cons in (cons (cons if (cons (cons Z (cons is (cons shen.a (cons shen.non-empty (cons list ()))))) (cons shen.then (cons (shen.mu_reduction (cons (cons shen.mu (cons (hd (hd (tl (hd V981)))) (cons (cons (cons shen.mu (cons (tl (hd (tl (hd V981)))) (tl (tl (hd V981))))) (cons (cons shen.the (cons tail (cons shen.of (cons Z ())))) ())) ()))) (cons (cons shen.the (cons head (cons shen.of (cons Z ())))) ())) +) (cons shen.else (cons (cons if (cons (cons Z (cons is (cons shen.a (cons shen.variable ())))) (cons shen.then (cons (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons (shen.extract_vars (hd (tl (hd V981)))) (cons and (cons shen.then (cons (cons bind (cons Z (cons shen.to (cons (shen.rcons_form (shen.remove_modes (hd (tl (hd V981))))) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V981)))) +) ())))))) ())))))))) (cons shen.else (cons shen.failed! ())))))) ())))))) ())))))))) (true V981)))
134
+ (defun shen.mu_reduction (V16595 V16596) (cond ((and (cons? V16595) (and (cons? (hd V16595)) (and (= shen.mu (hd (hd V16595))) (and (cons? (tl (hd V16595))) (and (cons? (hd (tl (hd V16595)))) (and (= mode (hd (hd (tl (hd V16595))))) (and (cons? (tl (hd (tl (hd V16595))))) (and (cons? (tl (tl (hd (tl (hd V16595)))))) (and (= () (tl (tl (tl (hd (tl (hd V16595))))))) (and (cons? (tl (tl (hd V16595)))) (and (= () (tl (tl (tl (hd V16595))))) (and (cons? (tl V16595)) (= () (tl (tl V16595))))))))))))))) (shen.mu_reduction (cons (cons shen.mu (cons (hd (tl (hd (tl (hd V16595))))) (tl (tl (hd V16595))))) (tl V16595)) (hd (tl (tl (hd (tl (hd V16595)))))))) ((and (cons? V16595) (and (cons? (hd V16595)) (and (= shen.mu (hd (hd V16595))) (and (cons? (tl (hd V16595))) (and (cons? (tl (tl (hd V16595)))) (and (= () (tl (tl (tl (hd V16595))))) (and (cons? (tl V16595)) (and (= () (tl (tl V16595))) (= _ (hd (tl (hd V16595)))))))))))) (shen.mu_reduction (hd (tl (tl (hd V16595)))) V16596)) ((and (cons? V16595) (and (cons? (hd V16595)) (and (= shen.mu (hd (hd V16595))) (and (cons? (tl (hd V16595))) (and (cons? (tl (tl (hd V16595)))) (and (= () (tl (tl (tl (hd V16595))))) (and (cons? (tl V16595)) (and (= () (tl (tl V16595))) (shen.ephemeral_variable? (hd (tl (hd V16595))) (hd (tl V16595))))))))))) (subst (hd (tl V16595)) (hd (tl (hd V16595))) (shen.mu_reduction (hd (tl (tl (hd V16595)))) V16596))) ((and (cons? V16595) (and (cons? (hd V16595)) (and (= shen.mu (hd (hd V16595))) (and (cons? (tl (hd V16595))) (and (cons? (tl (tl (hd V16595)))) (and (= () (tl (tl (tl (hd V16595))))) (and (cons? (tl V16595)) (and (= () (tl (tl V16595))) (variable? (hd (tl (hd V16595)))))))))))) (cons let (cons (hd (tl (hd V16595))) (cons shen.be (cons (hd (tl V16595)) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V16595)))) V16596) ()))))))) ((and (cons? V16595) (and (cons? (hd V16595)) (and (= shen.mu (hd (hd V16595))) (and (cons? (tl (hd V16595))) (and (cons? (tl (tl (hd V16595)))) (and (= () (tl (tl (tl (hd V16595))))) (and (cons? (tl V16595)) (and (= () (tl (tl V16595))) (and (= - V16596) (shen.prolog_constant? (hd (tl (hd V16595))))))))))))) (let Z (gensym V) (cons let (cons Z (cons shen.be (cons (cons shen.the (cons shen.result (cons shen.of (cons shen.dereferencing (tl V16595))))) (cons in (cons (cons if (cons (cons Z (cons is (cons identical (cons shen.to (cons (hd (tl (hd V16595))) ()))))) (cons shen.then (cons (shen.mu_reduction (hd (tl (tl (hd V16595)))) -) (cons shen.else (cons shen.failed! ())))))) ())))))))) ((and (cons? V16595) (and (cons? (hd V16595)) (and (= shen.mu (hd (hd V16595))) (and (cons? (tl (hd V16595))) (and (cons? (tl (tl (hd V16595)))) (and (= () (tl (tl (tl (hd V16595))))) (and (cons? (tl V16595)) (and (= () (tl (tl V16595))) (and (= + V16596) (shen.prolog_constant? (hd (tl (hd V16595))))))))))))) (let Z (gensym V) (cons let (cons Z (cons shen.be (cons (cons shen.the (cons shen.result (cons shen.of (cons shen.dereferencing (tl V16595))))) (cons in (cons (cons if (cons (cons Z (cons is (cons identical (cons shen.to (cons (hd (tl (hd V16595))) ()))))) (cons shen.then (cons (shen.mu_reduction (hd (tl (tl (hd V16595)))) +) (cons shen.else (cons (cons if (cons (cons Z (cons is (cons shen.a (cons shen.variable ())))) (cons shen.then (cons (cons bind (cons Z (cons shen.to (cons (hd (tl (hd V16595))) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V16595)))) +) ())))))) (cons shen.else (cons shen.failed! ())))))) ())))))) ())))))))) ((and (cons? V16595) (and (cons? (hd V16595)) (and (= shen.mu (hd (hd V16595))) (and (cons? (tl (hd V16595))) (and (cons? (hd (tl (hd V16595)))) (and (cons? (tl (tl (hd V16595)))) (and (= () (tl (tl (tl (hd V16595))))) (and (cons? (tl V16595)) (and (= () (tl (tl V16595))) (= - V16596)))))))))) (let Z (gensym V) (cons let (cons Z (cons shen.be (cons (cons shen.the (cons shen.result (cons shen.of (cons shen.dereferencing (tl V16595))))) (cons in (cons (cons if (cons (cons Z (cons is (cons shen.a (cons shen.non-empty (cons list ()))))) (cons shen.then (cons (shen.mu_reduction (cons (cons shen.mu (cons (hd (hd (tl (hd V16595)))) (cons (cons (cons shen.mu (cons (tl (hd (tl (hd V16595)))) (tl (tl (hd V16595))))) (cons (cons shen.the (cons tail (cons shen.of (cons Z ())))) ())) ()))) (cons (cons shen.the (cons head (cons shen.of (cons Z ())))) ())) -) (cons shen.else (cons shen.failed! ())))))) ())))))))) ((and (cons? V16595) (and (cons? (hd V16595)) (and (= shen.mu (hd (hd V16595))) (and (cons? (tl (hd V16595))) (and (cons? (hd (tl (hd V16595)))) (and (cons? (tl (tl (hd V16595)))) (and (= () (tl (tl (tl (hd V16595))))) (and (cons? (tl V16595)) (and (= () (tl (tl V16595))) (= + V16596)))))))))) (let Z (gensym V) (cons let (cons Z (cons shen.be (cons (cons shen.the (cons shen.result (cons shen.of (cons shen.dereferencing (tl V16595))))) (cons in (cons (cons if (cons (cons Z (cons is (cons shen.a (cons shen.non-empty (cons list ()))))) (cons shen.then (cons (shen.mu_reduction (cons (cons shen.mu (cons (hd (hd (tl (hd V16595)))) (cons (cons (cons shen.mu (cons (tl (hd (tl (hd V16595)))) (tl (tl (hd V16595))))) (cons (cons shen.the (cons tail (cons shen.of (cons Z ())))) ())) ()))) (cons (cons shen.the (cons head (cons shen.of (cons Z ())))) ())) +) (cons shen.else (cons (cons if (cons (cons Z (cons is (cons shen.a (cons shen.variable ())))) (cons shen.then (cons (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons (shen.extract_vars (hd (tl (hd V16595)))) (cons and (cons shen.then (cons (cons bind (cons Z (cons shen.to (cons (shen.rcons_form (shen.remove_modes (hd (tl (hd V16595))))) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V16595)))) +) ())))))) ())))))))) (cons shen.else (cons shen.failed! ())))))) ())))))) ())))))))) (true V16595)))
137
135
 
138
- (defun shen.rcons_form (V983) (cond ((cons? V983) (cons cons (cons (shen.rcons_form (hd V983)) (cons (shen.rcons_form (tl V983)) ())))) (true V983)))
136
+ (defun shen.rcons_form (V16598) (cond ((cons? V16598) (cons cons (cons (shen.rcons_form (hd V16598)) (cons (shen.rcons_form (tl V16598)) ())))) (true V16598)))
139
137
 
140
- (defun shen.remove_modes (V984) (cond ((and (cons? V984) (and (= mode (hd V984)) (and (cons? (tl V984)) (and (cons? (tl (tl V984))) (and (= + (hd (tl (tl V984)))) (= () (tl (tl (tl V984))))))))) (shen.remove_modes (hd (tl V984)))) ((and (cons? V984) (and (= mode (hd V984)) (and (cons? (tl V984)) (and (cons? (tl (tl V984))) (and (= - (hd (tl (tl V984)))) (= () (tl (tl (tl V984))))))))) (shen.remove_modes (hd (tl V984)))) ((cons? V984) (cons (shen.remove_modes (hd V984)) (shen.remove_modes (tl V984)))) (true V984)))
138
+ (defun shen.remove_modes (V16600) (cond ((and (cons? V16600) (and (= mode (hd V16600)) (and (cons? (tl V16600)) (and (cons? (tl (tl V16600))) (and (= + (hd (tl (tl V16600)))) (= () (tl (tl (tl V16600))))))))) (shen.remove_modes (hd (tl V16600)))) ((and (cons? V16600) (and (= mode (hd V16600)) (and (cons? (tl V16600)) (and (cons? (tl (tl V16600))) (and (= - (hd (tl (tl V16600)))) (= () (tl (tl (tl V16600))))))))) (shen.remove_modes (hd (tl V16600)))) ((cons? V16600) (cons (shen.remove_modes (hd V16600)) (shen.remove_modes (tl V16600)))) (true V16600)))
141
139
 
142
- (defun shen.ephemeral_variable? (V985 V986) (and (variable? V985) (variable? V986)))
140
+ (defun shen.ephemeral_variable? (V16603 V16604) (and (variable? V16603) (variable? V16604)))
143
141
 
144
- (defun shen.prolog_constant? (V995) (cond ((cons? V995) false) (true true)))
142
+ (defun shen.prolog_constant? (V16614) (cond ((cons? V16614) false) (true true)))
145
143
 
146
- (defun shen.aum_to_shen (V996) (cond ((and (cons? V996) (and (= let (hd V996)) (and (cons? (tl V996)) (and (cons? (tl (tl V996))) (and (= shen.be (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (cons? (tl (tl (tl (tl V996))))) (and (= in (hd (tl (tl (tl (tl V996)))))) (and (cons? (tl (tl (tl (tl (tl V996)))))) (= () (tl (tl (tl (tl (tl (tl V996)))))))))))))))) (cons let (cons (hd (tl V996)) (cons (shen.aum_to_shen (hd (tl (tl (tl V996))))) (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V996))))))) ()))))) ((and (cons? V996) (and (= shen.the (hd V996)) (and (cons? (tl V996)) (and (= shen.result (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.of (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (= shen.dereferencing (hd (tl (tl (tl V996))))) (and (cons? (tl (tl (tl (tl V996))))) (= () (tl (tl (tl (tl (tl V996))))))))))))))) (cons shen.lazyderef (cons (shen.aum_to_shen (hd (tl (tl (tl (tl V996)))))) (cons ProcessN ())))) ((and (cons? V996) (and (= if (hd V996)) (and (cons? (tl V996)) (and (cons? (tl (tl V996))) (and (= shen.then (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (cons? (tl (tl (tl (tl V996))))) (and (= shen.else (hd (tl (tl (tl (tl V996)))))) (and (cons? (tl (tl (tl (tl (tl V996)))))) (= () (tl (tl (tl (tl (tl (tl V996)))))))))))))))) (cons if (cons (shen.aum_to_shen (hd (tl V996))) (cons (shen.aum_to_shen (hd (tl (tl (tl V996))))) (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V996))))))) ()))))) ((and (cons? V996) (and (cons? (tl V996)) (and (= is (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.a (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (= shen.variable (hd (tl (tl (tl V996))))) (= () (tl (tl (tl (tl V996)))))))))))) (cons shen.pvar? (cons (hd V996) ()))) ((and (cons? V996) (and (cons? (tl V996)) (and (= is (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.a (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (= shen.non-empty (hd (tl (tl (tl V996))))) (and (cons? (tl (tl (tl (tl V996))))) (and (= list (hd (tl (tl (tl (tl V996)))))) (= () (tl (tl (tl (tl (tl V996))))))))))))))) (cons cons? (cons (hd V996) ()))) ((and (cons? V996) (and (= shen.rename (hd V996)) (and (cons? (tl V996)) (and (= shen.the (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.variables (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (= in (hd (tl (tl (tl V996))))) (and (cons? (tl (tl (tl (tl V996))))) (and (= () (hd (tl (tl (tl (tl V996)))))) (and (cons? (tl (tl (tl (tl (tl V996)))))) (and (= and (hd (tl (tl (tl (tl (tl V996))))))) (and (cons? (tl (tl (tl (tl (tl (tl V996))))))) (and (= shen.then (hd (tl (tl (tl (tl (tl (tl V996)))))))) (and (cons? (tl (tl (tl (tl (tl (tl (tl V996)))))))) (= () (tl (tl (tl (tl (tl (tl (tl (tl V996)))))))))))))))))))))))) (shen.aum_to_shen (hd (tl (tl (tl (tl (tl (tl (tl V996)))))))))) ((and (cons? V996) (and (= shen.rename (hd V996)) (and (cons? (tl V996)) (and (= shen.the (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.variables (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (= in (hd (tl (tl (tl V996))))) (and (cons? (tl (tl (tl (tl V996))))) (and (cons? (hd (tl (tl (tl (tl V996)))))) (and (cons? (tl (tl (tl (tl (tl V996)))))) (and (= and (hd (tl (tl (tl (tl (tl V996))))))) (and (cons? (tl (tl (tl (tl (tl (tl V996))))))) (and (= shen.then (hd (tl (tl (tl (tl (tl (tl V996)))))))) (and (cons? (tl (tl (tl (tl (tl (tl (tl V996)))))))) (= () (tl (tl (tl (tl (tl (tl (tl (tl V996)))))))))))))))))))))))) (cons let (cons (hd (hd (tl (tl (tl (tl V996)))))) (cons (cons shen.newpv (cons ProcessN ())) (cons (shen.aum_to_shen (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons (tl (hd (tl (tl (tl (tl V996)))))) (tl (tl (tl (tl (tl V996))))))))))) ()))))) ((and (cons? V996) (and (= bind (hd V996)) (and (cons? (tl V996)) (and (cons? (tl (tl V996))) (and (= shen.to (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (cons? (tl (tl (tl (tl V996))))) (and (= in (hd (tl (tl (tl (tl V996)))))) (and (cons? (tl (tl (tl (tl (tl V996)))))) (= () (tl (tl (tl (tl (tl (tl V996)))))))))))))))) (cons do (cons (cons shen.bindv (cons (hd (tl V996)) (cons (shen.chwild (hd (tl (tl (tl V996))))) (cons ProcessN ())))) (cons (cons let (cons Result (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V996))))))) (cons (cons do (cons (cons shen.unbindv (cons (hd (tl V996)) (cons ProcessN ()))) (cons Result ()))) ())))) ())))) ((and (cons? V996) (and (cons? (tl V996)) (and (= is (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= identical (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (and (= shen.to (hd (tl (tl (tl V996))))) (and (cons? (tl (tl (tl (tl V996))))) (= () (tl (tl (tl (tl (tl V996)))))))))))))) (cons = (cons (hd (tl (tl (tl (tl V996))))) (cons (hd V996) ())))) ((= shen.failed! V996) false) ((and (cons? V996) (and (= shen.the (hd V996)) (and (cons? (tl V996)) (and (= head (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.of (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (= () (tl (tl (tl (tl V996)))))))))))) (cons hd (tl (tl (tl V996))))) ((and (cons? V996) (and (= shen.the (hd V996)) (and (cons? (tl V996)) (and (= tail (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.of (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (= () (tl (tl (tl (tl V996)))))))))))) (cons tl (tl (tl (tl V996))))) ((and (cons? V996) (and (= shen.pop (hd V996)) (and (cons? (tl V996)) (and (= shen.the (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.stack (hd (tl (tl V996)))) (= () (tl (tl (tl V996)))))))))) (cons do (cons (cons shen.incinfs ()) (cons (cons thaw (cons Continuation ())) ())))) ((and (cons? V996) (and (= call (hd V996)) (and (cons? (tl V996)) (and (= shen.the (hd (tl V996))) (and (cons? (tl (tl V996))) (and (= shen.continuation (hd (tl (tl V996)))) (and (cons? (tl (tl (tl V996)))) (= () (tl (tl (tl (tl V996)))))))))))) (cons do (cons (cons shen.incinfs ()) (cons (shen.call_the_continuation (shen.chwild (hd (tl (tl (tl V996))))) ProcessN Continuation) ())))) (true V996)))
144
+ (defun shen.aum_to_shen (V16616) (cond ((and (cons? V16616) (and (= let (hd V16616)) (and (cons? (tl V16616)) (and (cons? (tl (tl V16616))) (and (= shen.be (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (cons? (tl (tl (tl (tl V16616))))) (and (= in (hd (tl (tl (tl (tl V16616)))))) (and (cons? (tl (tl (tl (tl (tl V16616)))))) (= () (tl (tl (tl (tl (tl (tl V16616)))))))))))))))) (cons let (cons (hd (tl V16616)) (cons (shen.aum_to_shen (hd (tl (tl (tl V16616))))) (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V16616))))))) ()))))) ((and (cons? V16616) (and (= shen.the (hd V16616)) (and (cons? (tl V16616)) (and (= shen.result (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.of (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (= shen.dereferencing (hd (tl (tl (tl V16616))))) (and (cons? (tl (tl (tl (tl V16616))))) (= () (tl (tl (tl (tl (tl V16616))))))))))))))) (cons shen.lazyderef (cons (shen.aum_to_shen (hd (tl (tl (tl (tl V16616)))))) (cons ProcessN ())))) ((and (cons? V16616) (and (= if (hd V16616)) (and (cons? (tl V16616)) (and (cons? (tl (tl V16616))) (and (= shen.then (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (cons? (tl (tl (tl (tl V16616))))) (and (= shen.else (hd (tl (tl (tl (tl V16616)))))) (and (cons? (tl (tl (tl (tl (tl V16616)))))) (= () (tl (tl (tl (tl (tl (tl V16616)))))))))))))))) (cons if (cons (shen.aum_to_shen (hd (tl V16616))) (cons (shen.aum_to_shen (hd (tl (tl (tl V16616))))) (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V16616))))))) ()))))) ((and (cons? V16616) (and (cons? (tl V16616)) (and (= is (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.a (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (= shen.variable (hd (tl (tl (tl V16616))))) (= () (tl (tl (tl (tl V16616)))))))))))) (cons shen.pvar? (cons (hd V16616) ()))) ((and (cons? V16616) (and (cons? (tl V16616)) (and (= is (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.a (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (= shen.non-empty (hd (tl (tl (tl V16616))))) (and (cons? (tl (tl (tl (tl V16616))))) (and (= list (hd (tl (tl (tl (tl V16616)))))) (= () (tl (tl (tl (tl (tl V16616))))))))))))))) (cons cons? (cons (hd V16616) ()))) ((and (cons? V16616) (and (= shen.rename (hd V16616)) (and (cons? (tl V16616)) (and (= shen.the (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.variables (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (= in (hd (tl (tl (tl V16616))))) (and (cons? (tl (tl (tl (tl V16616))))) (and (= () (hd (tl (tl (tl (tl V16616)))))) (and (cons? (tl (tl (tl (tl (tl V16616)))))) (and (= and (hd (tl (tl (tl (tl (tl V16616))))))) (and (cons? (tl (tl (tl (tl (tl (tl V16616))))))) (and (= shen.then (hd (tl (tl (tl (tl (tl (tl V16616)))))))) (and (cons? (tl (tl (tl (tl (tl (tl (tl V16616)))))))) (= () (tl (tl (tl (tl (tl (tl (tl (tl V16616)))))))))))))))))))))))) (shen.aum_to_shen (hd (tl (tl (tl (tl (tl (tl (tl V16616)))))))))) ((and (cons? V16616) (and (= shen.rename (hd V16616)) (and (cons? (tl V16616)) (and (= shen.the (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.variables (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (= in (hd (tl (tl (tl V16616))))) (and (cons? (tl (tl (tl (tl V16616))))) (and (cons? (hd (tl (tl (tl (tl V16616)))))) (and (cons? (tl (tl (tl (tl (tl V16616)))))) (and (= and (hd (tl (tl (tl (tl (tl V16616))))))) (and (cons? (tl (tl (tl (tl (tl (tl V16616))))))) (and (= shen.then (hd (tl (tl (tl (tl (tl (tl V16616)))))))) (and (cons? (tl (tl (tl (tl (tl (tl (tl V16616)))))))) (= () (tl (tl (tl (tl (tl (tl (tl (tl V16616)))))))))))))))))))))))) (cons let (cons (hd (hd (tl (tl (tl (tl V16616)))))) (cons (cons shen.newpv (cons ProcessN ())) (cons (shen.aum_to_shen (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons (tl (hd (tl (tl (tl (tl V16616)))))) (tl (tl (tl (tl (tl V16616))))))))))) ()))))) ((and (cons? V16616) (and (= bind (hd V16616)) (and (cons? (tl V16616)) (and (cons? (tl (tl V16616))) (and (= shen.to (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (cons? (tl (tl (tl (tl V16616))))) (and (= in (hd (tl (tl (tl (tl V16616)))))) (and (cons? (tl (tl (tl (tl (tl V16616)))))) (= () (tl (tl (tl (tl (tl (tl V16616)))))))))))))))) (cons do (cons (cons shen.bindv (cons (hd (tl V16616)) (cons (shen.chwild (hd (tl (tl (tl V16616))))) (cons ProcessN ())))) (cons (cons let (cons Result (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V16616))))))) (cons (cons do (cons (cons shen.unbindv (cons (hd (tl V16616)) (cons ProcessN ()))) (cons Result ()))) ())))) ())))) ((and (cons? V16616) (and (cons? (tl V16616)) (and (= is (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= identical (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (and (= shen.to (hd (tl (tl (tl V16616))))) (and (cons? (tl (tl (tl (tl V16616))))) (= () (tl (tl (tl (tl (tl V16616)))))))))))))) (cons = (cons (hd (tl (tl (tl (tl V16616))))) (cons (hd V16616) ())))) ((= shen.failed! V16616) false) ((and (cons? V16616) (and (= shen.the (hd V16616)) (and (cons? (tl V16616)) (and (= head (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.of (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (= () (tl (tl (tl (tl V16616)))))))))))) (cons hd (tl (tl (tl V16616))))) ((and (cons? V16616) (and (= shen.the (hd V16616)) (and (cons? (tl V16616)) (and (= tail (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.of (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (= () (tl (tl (tl (tl V16616)))))))))))) (cons tl (tl (tl (tl V16616))))) ((and (cons? V16616) (and (= shen.pop (hd V16616)) (and (cons? (tl V16616)) (and (= shen.the (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.stack (hd (tl (tl V16616)))) (= () (tl (tl (tl V16616)))))))))) (cons do (cons (cons shen.incinfs ()) (cons (cons thaw (cons Continuation ())) ())))) ((and (cons? V16616) (and (= call (hd V16616)) (and (cons? (tl V16616)) (and (= shen.the (hd (tl V16616))) (and (cons? (tl (tl V16616))) (and (= shen.continuation (hd (tl (tl V16616)))) (and (cons? (tl (tl (tl V16616)))) (= () (tl (tl (tl (tl V16616)))))))))))) (cons do (cons (cons shen.incinfs ()) (cons (shen.call_the_continuation (shen.chwild (hd (tl (tl (tl V16616))))) ProcessN Continuation) ())))) (true V16616)))
147
145
 
148
- (defun shen.chwild (V997) (cond ((= V997 _) (cons shen.newpv (cons ProcessN ()))) ((cons? V997) (map (lambda V836 (shen.chwild V836)) V997)) (true V997)))
146
+ (defun shen.chwild (V16618) (cond ((= V16618 _) (cons shen.newpv (cons ProcessN ()))) ((cons? V16618) (map (lambda Z (shen.chwild Z)) V16618)) (true V16618)))
149
147
 
150
- (defun shen.newpv (V998) (let Count+1 (+ (<-address (value shen.*varcounter*) V998) 1) (let IncVar (address-> (value shen.*varcounter*) V998 Count+1) (let Vector (<-address (value shen.*prologvectors*) V998) (let ResizeVectorIfNeeded (if (= Count+1 (limit Vector)) (shen.resizeprocessvector V998 Count+1) shen.skip) (shen.mk-pvar Count+1))))))
148
+ (defun shen.newpv (V16620) (let Count+1 (+ (<-address (value shen.*varcounter*) V16620) 1) (let IncVar (address-> (value shen.*varcounter*) V16620 Count+1) (let Vector (<-address (value shen.*prologvectors*) V16620) (let ResizeVectorIfNeeded (if (= Count+1 (limit Vector)) (shen.resizeprocessvector V16620 Count+1) shen.skip) (shen.mk-pvar Count+1))))))
151
149
 
152
- (defun shen.resizeprocessvector (V999 V1000) (let Vector (<-address (value shen.*prologvectors*) V999) (let BigVector (shen.resize-vector Vector (+ V1000 V1000) shen.-null-) (address-> (value shen.*prologvectors*) V999 BigVector))))
150
+ (defun shen.resizeprocessvector (V16623 V16624) (let Vector (<-address (value shen.*prologvectors*) V16623) (let BigVector (shen.resize-vector Vector (+ V16624 V16624) shen.-null-) (address-> (value shen.*prologvectors*) V16623 BigVector))))
153
151
 
154
- (defun shen.resize-vector (V1001 V1002 V1003) (let BigVector (address-> (absvector (+ 1 V1002)) 0 V1002) (shen.copy-vector V1001 BigVector (limit V1001) V1002 V1003)))
152
+ (defun shen.resize-vector (V16628 V16629 V16630) (let BigVector (address-> (absvector (+ 1 V16629)) 0 V16629) (shen.copy-vector V16628 BigVector (limit V16628) V16629 V16630)))
155
153
 
156
- (defun shen.copy-vector (V1004 V1005 V1006 V1007 V1008) (shen.copy-vector-stage-2 (+ 1 V1006) (+ V1007 1) V1008 (shen.copy-vector-stage-1 1 V1004 V1005 (+ 1 V1006))))
154
+ (defun shen.copy-vector (V16636 V16637 V16638 V16639 V16640) (shen.copy-vector-stage-2 (+ 1 V16638) (+ V16639 1) V16640 (shen.copy-vector-stage-1 1 V16636 V16637 (+ 1 V16638))))
157
155
 
158
- (defun shen.copy-vector-stage-1 (V1012 V1013 V1014 V1015) (cond ((= V1015 V1012) V1014) (true (shen.copy-vector-stage-1 (+ 1 V1012) V1013 (address-> V1014 V1012 (<-address V1013 V1012)) V1015))))
156
+ (defun shen.copy-vector-stage-1 (V16648 V16649 V16650 V16651) (cond ((= V16651 V16648) V16650) (true (shen.copy-vector-stage-1 (+ 1 V16648) V16649 (address-> V16650 V16648 (<-address V16649 V16648)) V16651))))
159
157
 
160
- (defun shen.copy-vector-stage-2 (V1019 V1020 V1021 V1022) (cond ((= V1020 V1019) V1022) (true (shen.copy-vector-stage-2 (+ V1019 1) V1020 V1021 (address-> V1022 V1019 V1021)))))
158
+ (defun shen.copy-vector-stage-2 (V16659 V16660 V16661 V16662) (cond ((= V16660 V16659) V16662) (true (shen.copy-vector-stage-2 (+ V16659 1) V16660 V16661 (address-> V16662 V16659 V16661)))))
161
159
 
162
- (defun shen.mk-pvar (V1023) (address-> (address-> (absvector 2) 0 shen.pvar) 1 V1023))
160
+ (defun shen.mk-pvar (V16664) (address-> (address-> (absvector 2) 0 shen.pvar) 1 V16664))
163
161
 
164
- (defun shen.pvar? (V1024) (trap-error (and (absvector? V1024) (= (<-address V1024 0) shen.pvar)) (lambda E false)))
162
+ (defun shen.pvar? (V16666) (trap-error (and (absvector? V16666) (= (<-address V16666 0) shen.pvar)) (lambda E false)))
165
163
 
166
- (defun shen.bindv (V1025 V1026 V1027) (let Vector (<-address (value shen.*prologvectors*) V1027) (address-> Vector (<-address V1025 1) V1026)))
164
+ (defun shen.bindv (V16670 V16671 V16672) (let Vector (<-address (value shen.*prologvectors*) V16672) (address-> Vector (<-address V16670 1) V16671)))
167
165
 
168
- (defun shen.unbindv (V1028 V1029) (let Vector (<-address (value shen.*prologvectors*) V1029) (address-> Vector (<-address V1028 1) shen.-null-)))
166
+ (defun shen.unbindv (V16675 V16676) (let Vector (<-address (value shen.*prologvectors*) V16676) (address-> Vector (<-address V16675 1) shen.-null-)))
169
167
 
170
168
  (defun shen.incinfs () (set shen.*infs* (+ 1 (value shen.*infs*))))
171
169
 
172
- (defun shen.call_the_continuation (V1030 V1031 V1032) (cond ((and (cons? V1030) (and (cons? (hd V1030)) (= () (tl V1030)))) (cons (hd (hd V1030)) (append (tl (hd V1030)) (cons V1031 (cons V1032 ()))))) ((and (cons? V1030) (cons? (hd V1030))) (let NewContinuation (shen.newcontinuation (tl V1030) V1031 V1032) (cons (hd (hd V1030)) (append (tl (hd V1030)) (cons V1031 (cons NewContinuation ())))))) (true (shen.f_error shen.call_the_continuation))))
170
+ (defun shen.call_the_continuation (V16680 V16681 V16682) (cond ((and (cons? V16680) (and (cons? (hd V16680)) (= () (tl V16680)))) (cons (hd (hd V16680)) (append (tl (hd V16680)) (cons V16681 (cons V16682 ()))))) ((and (cons? V16680) (cons? (hd V16680))) (let NewContinuation (shen.newcontinuation (tl V16680) V16681 V16682) (cons (hd (hd V16680)) (append (tl (hd V16680)) (cons V16681 (cons NewContinuation ())))))) (true (shen.f_error shen.call_the_continuation))))
173
171
 
174
- (defun shen.newcontinuation (V1033 V1034 V1035) (cond ((= () V1033) V1035) ((and (cons? V1033) (cons? (hd V1033))) (cons freeze (cons (cons (hd (hd V1033)) (append (tl (hd V1033)) (cons V1034 (cons (shen.newcontinuation (tl V1033) V1034 V1035) ())))) ()))) (true (shen.f_error shen.newcontinuation))))
172
+ (defun shen.newcontinuation (V16686 V16687 V16688) (cond ((= () V16686) V16688) ((and (cons? V16686) (cons? (hd V16686))) (cons freeze (cons (cons (hd (hd V16686)) (append (tl (hd V16686)) (cons V16687 (cons (shen.newcontinuation (tl V16686) V16687 V16688) ())))) ()))) (true (shen.f_error shen.newcontinuation))))
175
173
 
176
- (defun return (V1040 V1041 V1042) (shen.deref V1040 V1041))
174
+ (defun return (V16696 V16697 V16698) (shen.deref V16696 V16697))
177
175
 
178
- (defun shen.measure&return (V1047 V1048 V1049) (do (shen.prhush (shen.app (value shen.*infs*) " inferences
179
- " shen.a) (stoutput)) (shen.deref V1047 V1048)))
176
+ (defun shen.measure&return (V16706 V16707 V16708) (do (shen.prhush (shen.app (value shen.*infs*) " inferences
177
+ " shen.a) (stoutput)) (shen.deref V16706 V16707)))
180
178
 
181
- (defun unify (V1050 V1051 V1052 V1053) (shen.lzy= (shen.lazyderef V1050 V1052) (shen.lazyderef V1051 V1052) V1052 V1053))
179
+ (defun unify (V16713 V16714 V16715 V16716) (shen.lzy= (shen.lazyderef V16713 V16715) (shen.lazyderef V16714 V16715) V16715 V16716))
182
180
 
183
- (defun shen.lzy= (V1071 V1072 V1073 V1074) (cond ((= V1072 V1071) (thaw V1074)) ((shen.pvar? V1071) (bind V1071 V1072 V1073 V1074)) ((shen.pvar? V1072) (bind V1072 V1071 V1073 V1074)) ((and (cons? V1071) (cons? V1072)) (shen.lzy= (shen.lazyderef (hd V1071) V1073) (shen.lazyderef (hd V1072) V1073) V1073 (freeze (shen.lzy= (shen.lazyderef (tl V1071) V1073) (shen.lazyderef (tl V1072) V1073) V1073 V1074)))) (true false)))
181
+ (defun shen.lzy= (V16738 V16739 V16740 V16741) (cond ((= V16739 V16738) (thaw V16741)) ((shen.pvar? V16738) (bind V16738 V16739 V16740 V16741)) ((shen.pvar? V16739) (bind V16739 V16738 V16740 V16741)) ((and (cons? V16738) (cons? V16739)) (shen.lzy= (shen.lazyderef (hd V16738) V16740) (shen.lazyderef (hd V16739) V16740) V16740 (freeze (shen.lzy= (shen.lazyderef (tl V16738) V16740) (shen.lazyderef (tl V16739) V16740) V16740 V16741)))) (true false)))
184
182
 
185
- (defun shen.deref (V1075 V1076) (cond ((cons? V1075) (cons (shen.deref (hd V1075) V1076) (shen.deref (tl V1075) V1076))) (true (if (shen.pvar? V1075) (let Value (shen.valvector V1075 V1076) (if (= Value shen.-null-) V1075 (shen.deref Value V1076))) V1075))))
183
+ (defun shen.deref (V16744 V16745) (cond ((cons? V16744) (cons (shen.deref (hd V16744) V16745) (shen.deref (tl V16744) V16745))) (true (if (shen.pvar? V16744) (let Value (shen.valvector V16744 V16745) (if (= Value shen.-null-) V16744 (shen.deref Value V16745))) V16744))))
186
184
 
187
- (defun shen.lazyderef (V1077 V1078) (if (shen.pvar? V1077) (let Value (shen.valvector V1077 V1078) (if (= Value shen.-null-) V1077 (shen.lazyderef Value V1078))) V1077))
185
+ (defun shen.lazyderef (V16748 V16749) (if (shen.pvar? V16748) (let Value (shen.valvector V16748 V16749) (if (= Value shen.-null-) V16748 (shen.lazyderef Value V16749))) V16748))
188
186
 
189
- (defun shen.valvector (V1079 V1080) (<-address (<-address (value shen.*prologvectors*) V1080) (<-address V1079 1)))
187
+ (defun shen.valvector (V16752 V16753) (<-address (<-address (value shen.*prologvectors*) V16753) (<-address V16752 1)))
190
188
 
191
- (defun unify! (V1081 V1082 V1083 V1084) (shen.lzy=! (shen.lazyderef V1081 V1083) (shen.lazyderef V1082 V1083) V1083 V1084))
189
+ (defun unify! (V16758 V16759 V16760 V16761) (shen.lzy=! (shen.lazyderef V16758 V16760) (shen.lazyderef V16759 V16760) V16760 V16761))
192
190
 
193
- (defun shen.lzy=! (V1102 V1103 V1104 V1105) (cond ((= V1103 V1102) (thaw V1105)) ((and (shen.pvar? V1102) (not (shen.occurs? V1102 (shen.deref V1103 V1104)))) (bind V1102 V1103 V1104 V1105)) ((and (shen.pvar? V1103) (not (shen.occurs? V1103 (shen.deref V1102 V1104)))) (bind V1103 V1102 V1104 V1105)) ((and (cons? V1102) (cons? V1103)) (shen.lzy=! (shen.lazyderef (hd V1102) V1104) (shen.lazyderef (hd V1103) V1104) V1104 (freeze (shen.lzy=! (shen.lazyderef (tl V1102) V1104) (shen.lazyderef (tl V1103) V1104) V1104 V1105)))) (true false)))
191
+ (defun shen.lzy=! (V16783 V16784 V16785 V16786) (cond ((= V16784 V16783) (thaw V16786)) ((and (shen.pvar? V16783) (not (shen.occurs? V16783 (shen.deref V16784 V16785)))) (bind V16783 V16784 V16785 V16786)) ((and (shen.pvar? V16784) (not (shen.occurs? V16784 (shen.deref V16783 V16785)))) (bind V16784 V16783 V16785 V16786)) ((and (cons? V16783) (cons? V16784)) (shen.lzy=! (shen.lazyderef (hd V16783) V16785) (shen.lazyderef (hd V16784) V16785) V16785 (freeze (shen.lzy=! (shen.lazyderef (tl V16783) V16785) (shen.lazyderef (tl V16784) V16785) V16785 V16786)))) (true false)))
194
192
 
195
- (defun shen.occurs? (V1115 V1116) (cond ((= V1116 V1115) true) ((cons? V1116) (or (shen.occurs? V1115 (hd V1116)) (shen.occurs? V1115 (tl V1116)))) (true false)))
193
+ (defun shen.occurs? (V16798 V16799) (cond ((= V16799 V16798) true) ((cons? V16799) (or (shen.occurs? V16798 (hd V16799)) (shen.occurs? V16798 (tl V16799)))) (true false)))
196
194
 
197
- (defun identical (V1117 V1118 V1119 V1120) (shen.lzy== (shen.lazyderef V1117 V1119) (shen.lazyderef V1118 V1119) V1119 V1120))
195
+ (defun identical (V16804 V16805 V16806 V16807) (shen.lzy== (shen.lazyderef V16804 V16806) (shen.lazyderef V16805 V16806) V16806 V16807))
198
196
 
199
- (defun shen.lzy== (V1138 V1139 V1140 V1141) (cond ((= V1139 V1138) (thaw V1141)) ((and (cons? V1138) (cons? V1139)) (shen.lzy== (shen.lazyderef (hd V1138) V1140) (shen.lazyderef (hd V1139) V1140) V1140 (freeze (shen.lzy== (tl V1138) (tl V1139) V1140 V1141)))) (true false)))
197
+ (defun shen.lzy== (V16829 V16830 V16831 V16832) (cond ((= V16830 V16829) (thaw V16832)) ((and (cons? V16829) (cons? V16830)) (shen.lzy== (shen.lazyderef (hd V16829) V16831) (shen.lazyderef (hd V16830) V16831) V16831 (freeze (shen.lzy== (tl V16829) (tl V16830) V16831 V16832)))) (true false)))
200
198
 
201
- (defun shen.pvar (V1142) (cn "Var" (shen.app (<-address V1142 1) "" shen.a)))
199
+ (defun shen.pvar (V16834) (cn "Var" (shen.app (<-address V16834 1) "" shen.a)))
202
200
 
203
- (defun bind (V1143 V1144 V1145 V1146) (do (shen.bindv V1143 V1144 V1145) (let Result (thaw V1146) (do (shen.unbindv V1143 V1145) Result))))
201
+ (defun bind (V16839 V16840 V16841 V16842) (do (shen.bindv V16839 V16840 V16841) (let Result (thaw V16842) (do (shen.unbindv V16839 V16841) Result))))
204
202
 
205
- (defun fwhen (V1161 V1162 V1163) (cond ((= true V1161) (thaw V1163)) ((= false V1161) false) (true (simple-error (cn "fwhen expects a boolean: not " (shen.app V1161 "%" shen.s))))))
203
+ (defun fwhen (V16860 V16861 V16862) (cond ((= true V16860) (thaw V16862)) ((= false V16860) false) (true (simple-error (cn "fwhen expects a boolean: not " (shen.app V16860 "%" shen.s))))))
206
204
 
207
- (defun call (V1176 V1177 V1178) (cond ((cons? V1176) (shen.call-help (shen.m_prolog_to_s-prolog_predicate (shen.lazyderef (hd V1176) V1177)) (tl V1176) V1177 V1178)) (true false)))
205
+ (defun call (V16878 V16879 V16880) (cond ((cons? V16878) (shen.call-help (function (shen.lazyderef (hd V16878) V16879)) (tl V16878) V16879 V16880)) (true false)))
208
206
 
209
- (defun shen.call-help (V1179 V1180 V1181 V1182) (cond ((= () V1180) (V1179 V1181 V1182)) ((cons? V1180) (shen.call-help (V1179 (hd V1180)) (tl V1180) V1181 V1182)) (true (shen.f_error shen.call-help))))
207
+ (defun shen.call-help (V16885 V16886 V16887 V16888) (cond ((= () V16886) (V16885 V16887 V16888)) ((cons? V16886) (shen.call-help (V16885 (hd V16886)) (tl V16886) V16887 V16888)) (true (shen.f_error shen.call-help))))
210
208
 
211
- (defun shen.intprolog (V1183) (cond ((and (cons? V1183) (cons? (hd V1183))) (let ProcessN (shen.start-new-prolog-process) (shen.intprolog-help (hd (hd V1183)) (shen.insert-prolog-variables (cons (tl (hd V1183)) (cons (tl V1183) ())) ProcessN) ProcessN))) (true (shen.f_error shen.intprolog))))
209
+ (defun shen.intprolog (V16890) (cond ((and (cons? V16890) (cons? (hd V16890))) (let ProcessN (shen.start-new-prolog-process) (shen.intprolog-help (hd (hd V16890)) (shen.insert-prolog-variables (cons (tl (hd V16890)) (cons (tl V16890) ())) ProcessN) ProcessN))) (true (shen.f_error shen.intprolog))))
212
210
 
213
- (defun shen.intprolog-help (V1184 V1185 V1186) (cond ((and (cons? V1185) (and (cons? (tl V1185)) (= () (tl (tl V1185))))) (shen.intprolog-help-help V1184 (hd V1185) (hd (tl V1185)) V1186)) (true (shen.f_error shen.intprolog-help))))
211
+ (defun shen.intprolog-help (V16894 V16895 V16896) (cond ((and (cons? V16895) (and (cons? (tl V16895)) (= () (tl (tl V16895))))) (shen.intprolog-help-help V16894 (hd V16895) (hd (tl V16895)) V16896)) (true (shen.f_error shen.intprolog-help))))
214
212
 
215
- (defun shen.intprolog-help-help (V1187 V1188 V1189 V1190) (cond ((= () V1188) (V1187 V1190 (freeze (shen.call-rest V1189 V1190)))) ((cons? V1188) (shen.intprolog-help-help (V1187 (hd V1188)) (tl V1188) V1189 V1190)) (true (shen.f_error shen.intprolog-help-help))))
213
+ (defun shen.intprolog-help-help (V16901 V16902 V16903 V16904) (cond ((= () V16902) (V16901 V16904 (freeze (shen.call-rest V16903 V16904)))) ((cons? V16902) (shen.intprolog-help-help (V16901 (hd V16902)) (tl V16902) V16903 V16904)) (true (shen.f_error shen.intprolog-help-help))))
216
214
 
217
- (defun shen.call-rest (V1193 V1194) (cond ((= () V1193) true) ((and (cons? V1193) (and (cons? (hd V1193)) (cons? (tl (hd V1193))))) (shen.call-rest (cons (cons ((hd (hd V1193)) (hd (tl (hd V1193)))) (tl (tl (hd V1193)))) (tl V1193)) V1194)) ((and (cons? V1193) (and (cons? (hd V1193)) (= () (tl (hd V1193))))) ((hd (hd V1193)) V1194 (freeze (shen.call-rest (tl V1193) V1194)))) (true (shen.f_error shen.call-rest))))
215
+ (defun shen.call-rest (V16909 V16910) (cond ((= () V16909) true) ((and (cons? V16909) (and (cons? (hd V16909)) (cons? (tl (hd V16909))))) (shen.call-rest (cons (cons ((hd (hd V16909)) (hd (tl (hd V16909)))) (tl (tl (hd V16909)))) (tl V16909)) V16910)) ((and (cons? V16909) (and (cons? (hd V16909)) (= () (tl (hd V16909))))) ((hd (hd V16909)) V16910 (freeze (shen.call-rest (tl V16909) V16910)))) (true (shen.f_error shen.call-rest))))
218
216
 
219
217
  (defun shen.start-new-prolog-process () (let IncrementProcessCounter (set shen.*process-counter* (+ 1 (value shen.*process-counter*))) (shen.initialise-prolog IncrementProcessCounter)))
220
218
 
221
- (defun shen.insert-prolog-variables (V1195 V1196) (shen.insert-prolog-variables-help V1195 (shen.flatten V1195) V1196))
219
+ (defun shen.insert-prolog-variables (V16913 V16914) (shen.insert-prolog-variables-help V16913 (shen.flatten V16913) V16914))
222
220
 
223
- (defun shen.insert-prolog-variables-help (V1201 V1202 V1203) (cond ((= () V1202) V1201) ((and (cons? V1202) (variable? (hd V1202))) (let V (shen.newpv V1203) (let XV/Y (subst V (hd V1202) V1201) (let Z-Y (remove (hd V1202) (tl V1202)) (shen.insert-prolog-variables-help XV/Y Z-Y V1203))))) ((cons? V1202) (shen.insert-prolog-variables-help V1201 (tl V1202) V1203)) (true (shen.f_error shen.insert-prolog-variables-help))))
221
+ (defun shen.insert-prolog-variables-help (V16922 V16923 V16924) (cond ((= () V16923) V16922) ((and (cons? V16923) (variable? (hd V16923))) (let V (shen.newpv V16924) (let XV/Y (subst V (hd V16923) V16922) (let Z-Y (remove (hd V16923) (tl V16923)) (shen.insert-prolog-variables-help XV/Y Z-Y V16924))))) ((cons? V16923) (shen.insert-prolog-variables-help V16922 (tl V16923) V16924)) (true (shen.f_error shen.insert-prolog-variables-help))))
224
222
 
225
- (defun shen.initialise-prolog (V1204) (let Vector (address-> (value shen.*prologvectors*) V1204 (shen.fillvector (vector 10) 1 10 shen.-null-)) (let Counter (address-> (value shen.*varcounter*) V1204 1) V1204)))
223
+ (defun shen.initialise-prolog (V16926) (let Vector (address-> (value shen.*prologvectors*) V16926 (shen.fillvector (vector 10) 1 10 shen.-null-)) (let Counter (address-> (value shen.*varcounter*) V16926 1) V16926)))
226
224
 
227
225
 
228
226