shen-ruby 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,206 +47,206 @@
47
47
  * explains this license in full. *
48
48
  * *
49
49
  *****************************************************************************************
50
- "(defun shen.<defprolog> (V913) (let Result (let Parse_shen.<predicate*> (shen.<predicate*> V913) (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))) (if (= Result (fail)) (fail) Result)))
50
+ "(defun shen.<defprolog> (V937) (let Result (let Parse_shen.<predicate*> (shen.<predicate*> V937) (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))) (if (= Result (fail)) (fail) Result)))
51
51
 
52
- (defun shen.prolog-error (V920 V921) (cond ((and (cons? V921) (and (cons? (tl V921)) (= () (tl (tl V921))))) (simple-error (cn "prolog syntax error in " (shen.app V920 (cn " here:
52
+ (defun shen.prolog-error (V944 V945) (cond ((and (cons? V945) (and (cons? (tl V945)) (= () (tl (tl V945))))) (simple-error (cn "prolog syntax error in " (shen.app V944 (cn " here:
53
53
 
54
- " (shen.app (shen.next-50 50 (hd V921)) "
55
- " shen.a)) shen.a)))) (true (simple-error (cn "prolog syntax error in " (shen.app V920 "
54
+ " (shen.app (shen.next-50 50 (hd V945)) "
55
+ " shen.a)) shen.a)))) (true (simple-error (cn "prolog syntax error in " (shen.app V944 "
56
56
  " shen.a))))))
57
57
 
58
- (defun shen.next-50 (V926 V927) (cond ((= () V927) "") ((= 0 V926) "") ((cons? V927) (cn (shen.decons-string (hd V927)) (shen.next-50 (- V926 1) (tl V927)))) (true (shen.sys-error shen.next-50))))
58
+ (defun shen.next-50 (V950 V951) (cond ((= () V951) "") ((= 0 V950) "") ((cons? V951) (cn (shen.decons-string (hd V951)) (shen.next-50 (- V950 1) (tl V951)))) (true (shen.sys-error shen.next-50))))
59
59
 
60
- (defun shen.decons-string (V928) (cond ((and (cons? V928) (and (= cons (hd V928)) (and (cons? (tl V928)) (and (cons? (tl (tl V928))) (= () (tl (tl (tl V928)))))))) (shen.app (shen.eval-cons V928) " " shen.s)) (true (shen.app V928 " " shen.r))))
60
+ (defun shen.decons-string (V952) (cond ((and (cons? V952) (and (= cons (hd V952)) (and (cons? (tl V952)) (and (cons? (tl (tl V952))) (= () (tl (tl (tl V952)))))))) (shen.app (shen.eval-cons V952) " " shen.s)) (true (shen.app V952 " " shen.r))))
61
61
 
62
- (defun shen.insert-predicate (V929 V930) (cond ((and (cons? V930) (and (cons? (tl V930)) (= () (tl (tl V930))))) (cons (cons V929 (hd V930)) (cons :- (tl V930)))) (true (shen.sys-error shen.insert-predicate))))
62
+ (defun shen.insert-predicate (V953 V954) (cond ((and (cons? V954) (and (cons? (tl V954)) (= () (tl (tl V954))))) (cons (cons V953 (hd V954)) (cons :- (tl V954)))) (true (shen.sys-error shen.insert-predicate))))
63
63
 
64
- (defun shen.<predicate*> (V935) (let Result (if (cons? (hd V935)) (let Parse_X (hd (hd V935)) (shen.pair (hd (shen.pair (tl (hd V935)) (shen.hdtl V935))) Parse_X)) (fail)) (if (= Result (fail)) (fail) Result)))
64
+ (defun shen.<predicate*> (V959) (let Result (if (cons? (hd V959)) (let Parse_X (hd (hd V959)) (shen.pair (hd (shen.pair (tl (hd V959)) (shen.hdtl V959))) Parse_X)) (fail)) (if (= Result (fail)) (fail) Result)))
65
65
 
66
- (defun shen.<clauses*> (V940) (let Result (let Parse_shen.<clause*> (shen.<clause*> V940) (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 (= Result (fail)) (let Result (let Parse_<e> (<e> V940) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) (append (shen.hdtl Parse_<e>) ())) (fail))) (if (= Result (fail)) (fail) Result)) Result)))
66
+ (defun shen.<clauses*> (V964) (let Result (let Parse_shen.<clause*> (shen.<clause*> V964) (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 (= Result (fail)) (let Result (let Parse_<e> (<e> V964) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) (append (shen.hdtl Parse_<e>) ())) (fail))) (if (= Result (fail)) (fail) Result)) Result)))
67
67
 
68
- (defun shen.<clause*> (V945) (let Result (let Parse_shen.<head*> (shen.<head*> V945) (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))) (if (= Result (fail)) (fail) Result)))
68
+ (defun shen.<clause*> (V969) (let Result (let Parse_shen.<head*> (shen.<head*> V969) (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))) (if (= Result (fail)) (fail) Result)))
69
69
 
70
- (defun shen.<head*> (V950) (let Result (let Parse_shen.<term*> (shen.<term*> V950) (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 (= Result (fail)) (let Result (let Parse_<e> (<e> V950) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) (append (shen.hdtl Parse_<e>) ())) (fail))) (if (= Result (fail)) (fail) Result)) Result)))
70
+ (defun shen.<head*> (V974) (let Result (let Parse_shen.<term*> (shen.<term*> V974) (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 (= Result (fail)) (let Result (let Parse_<e> (<e> V974) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) (append (shen.hdtl Parse_<e>) ())) (fail))) (if (= Result (fail)) (fail) Result)) Result)))
71
71
 
72
- (defun shen.<term*> (V955) (let Result (if (cons? (hd V955)) (let Parse_X (hd (hd V955)) (if (and (not (= <-- Parse_X)) (shen.legitimate-term? Parse_X)) (shen.pair (hd (shen.pair (tl (hd V955)) (shen.hdtl V955))) (shen.eval-cons Parse_X)) (fail))) (fail)) (if (= Result (fail)) (fail) Result)))
72
+ (defun shen.<term*> (V979) (let Result (if (cons? (hd V979)) (let Parse_X (hd (hd V979)) (if (and (not (= <-- Parse_X)) (shen.legitimate-term? Parse_X)) (shen.pair (hd (shen.pair (tl (hd V979)) (shen.hdtl V979))) (shen.eval-cons Parse_X)) (fail))) (fail)) (if (= Result (fail)) (fail) Result)))
73
73
 
74
- (defun shen.legitimate-term? (V960) (cond ((and (cons? V960) (and (= cons (hd V960)) (and (cons? (tl V960)) (and (cons? (tl (tl V960))) (= () (tl (tl (tl V960)))))))) (and (shen.legitimate-term? (hd (tl V960))) (shen.legitimate-term? (hd (tl (tl V960)))))) ((and (cons? V960) (and (= mode (hd V960)) (and (cons? (tl V960)) (and (cons? (tl (tl V960))) (and (= + (hd (tl (tl V960)))) (= () (tl (tl (tl V960))))))))) (shen.legitimate-term? (hd (tl V960)))) ((and (cons? V960) (and (= mode (hd V960)) (and (cons? (tl V960)) (and (cons? (tl (tl V960))) (and (= - (hd (tl (tl V960)))) (= () (tl (tl (tl V960))))))))) (shen.legitimate-term? (hd (tl V960)))) ((cons? V960) false) (true true)))
74
+ (defun shen.legitimate-term? (V984) (cond ((and (cons? V984) (and (= cons (hd V984)) (and (cons? (tl V984)) (and (cons? (tl (tl V984))) (= () (tl (tl (tl V984)))))))) (and (shen.legitimate-term? (hd (tl V984))) (shen.legitimate-term? (hd (tl (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.legitimate-term? (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.legitimate-term? (hd (tl V984)))) ((cons? V984) false) (true true)))
75
75
 
76
- (defun shen.eval-cons (V961) (cond ((and (cons? V961) (and (= cons (hd V961)) (and (cons? (tl V961)) (and (cons? (tl (tl V961))) (= () (tl (tl (tl V961)))))))) (cons (shen.eval-cons (hd (tl V961))) (shen.eval-cons (hd (tl (tl V961)))))) ((and (cons? V961) (and (= mode (hd V961)) (and (cons? (tl V961)) (and (cons? (tl (tl V961))) (= () (tl (tl (tl V961)))))))) (cons mode (cons (shen.eval-cons (hd (tl V961))) (tl (tl V961))))) (true V961)))
76
+ (defun shen.eval-cons (V985) (cond ((and (cons? V985) (and (= cons (hd V985)) (and (cons? (tl V985)) (and (cons? (tl (tl V985))) (= () (tl (tl (tl V985)))))))) (cons (shen.eval-cons (hd (tl V985))) (shen.eval-cons (hd (tl (tl V985)))))) ((and (cons? V985) (and (= mode (hd V985)) (and (cons? (tl V985)) (and (cons? (tl (tl V985))) (= () (tl (tl (tl V985)))))))) (cons mode (cons (shen.eval-cons (hd (tl V985))) (tl (tl V985))))) (true V985)))
77
77
 
78
- (defun shen.<body*> (V966) (let Result (let Parse_shen.<literal*> (shen.<literal*> V966) (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 (= Result (fail)) (let Result (let Parse_<e> (<e> V966) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) (append (shen.hdtl Parse_<e>) ())) (fail))) (if (= Result (fail)) (fail) Result)) Result)))
78
+ (defun shen.<body*> (V990) (let Result (let Parse_shen.<literal*> (shen.<literal*> V990) (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 (= Result (fail)) (let Result (let Parse_<e> (<e> V990) (if (not (= (fail) Parse_<e>)) (shen.pair (hd Parse_<e>) (append (shen.hdtl Parse_<e>) ())) (fail))) (if (= Result (fail)) (fail) Result)) Result)))
79
79
 
80
- (defun shen.<literal*> (V971) (let Result (if (and (cons? (hd V971)) (= ! (hd (hd V971)))) (shen.pair (hd (shen.pair (tl (hd V971)) (shen.hdtl V971))) (cons cut (cons (intern "Throwcontrol") ()))) (fail)) (if (= Result (fail)) (let Result (if (cons? (hd V971)) (let Parse_X (hd (hd V971)) (if (cons? Parse_X) (shen.pair (hd (shen.pair (tl (hd V971)) (shen.hdtl V971))) Parse_X) (fail))) (fail)) (if (= Result (fail)) (fail) Result)) Result)))
80
+ (defun shen.<literal*> (V995) (let Result (if (and (cons? (hd V995)) (= ! (hd (hd V995)))) (shen.pair (hd (shen.pair (tl (hd V995)) (shen.hdtl V995))) (cons cut (cons (intern "Throwcontrol") ()))) (fail)) (if (= Result (fail)) (let Result (if (cons? (hd V995)) (let Parse_X (hd (hd V995)) (if (cons? Parse_X) (shen.pair (hd (shen.pair (tl (hd V995)) (shen.hdtl V995))) Parse_X) (fail))) (fail)) (if (= Result (fail)) (fail) Result)) Result)))
81
81
 
82
- (defun shen.<end*> (V976) (let Result (if (cons? (hd V976)) (let Parse_X (hd (hd V976)) (if (= Parse_X ;) (shen.pair (hd (shen.pair (tl (hd V976)) (shen.hdtl V976))) Parse_X) (fail))) (fail)) (if (= Result (fail)) (fail) Result)))
82
+ (defun shen.<end*> (V1000) (let Result (if (cons? (hd V1000)) (let Parse_X (hd (hd V1000)) (if (= Parse_X ;) (shen.pair (hd (shen.pair (tl (hd V1000)) (shen.hdtl V1000))) Parse_X) (fail))) (fail)) (if (= Result (fail)) (fail) Result)))
83
83
 
84
- (defun cut (V977 V978 V979) (let Result (thaw V979) (if (= Result false) V977 Result)))
84
+ (defun cut (V1001 V1002 V1003) (let Result (thaw V1003) (if (= Result false) V1001 Result)))
85
85
 
86
- (defun shen.insert_modes (V980) (cond ((and (cons? V980) (and (= mode (hd V980)) (and (cons? (tl V980)) (and (cons? (tl (tl V980))) (= () (tl (tl (tl V980)))))))) V980) ((= () V980) ()) ((cons? V980) (cons (cons mode (cons (hd V980) (cons + ()))) (cons mode (cons (shen.insert_modes (tl V980)) (cons - ()))))) (true V980)))
86
+ (defun shen.insert_modes (V1004) (cond ((and (cons? V1004) (and (= mode (hd V1004)) (and (cons? (tl V1004)) (and (cons? (tl (tl V1004))) (= () (tl (tl (tl V1004)))))))) V1004) ((= () V1004) ()) ((cons? V1004) (cons (cons mode (cons (hd V1004) (cons + ()))) (cons mode (cons (shen.insert_modes (tl V1004)) (cons - ()))))) (true V1004)))
87
87
 
88
- (defun shen.s-prolog (V981) (map (lambda V907 (eval V907)) (shen.prolog->shen V981)))
88
+ (defun shen.s-prolog (V1005) (map (lambda X922 (eval X922)) (shen.prolog->shen V1005)))
89
89
 
90
- (defun shen.prolog->shen (V982) (map shen.compile_prolog_procedure (shen.group_clauses (map shen.s-prolog_clause (mapcan shen.head_abstraction V982)))))
90
+ (defun shen.prolog->shen (V1006) (map (lambda X923 (shen.compile_prolog_procedure X923)) (shen.group_clauses (map (lambda X924 (shen.s-prolog_clause X924)) (mapcan (lambda X925 (shen.head_abstraction X925)) V1006)))))
91
91
 
92
- (defun shen.s-prolog_clause (V983) (cond ((and (cons? V983) (and (cons? (tl V983)) (and (= :- (hd (tl V983))) (and (cons? (tl (tl V983))) (= () (tl (tl (tl V983)))))))) (cons (hd V983) (cons :- (cons (map shen.s-prolog_literal (hd (tl (tl V983)))) ())))) (true (shen.sys-error shen.s-prolog_clause))))
92
+ (defun shen.s-prolog_clause (V1007) (cond ((and (cons? V1007) (and (cons? (tl V1007)) (and (= :- (hd (tl V1007))) (and (cons? (tl (tl V1007))) (= () (tl (tl (tl V1007)))))))) (cons (hd V1007) (cons :- (cons (map (lambda X926 (shen.s-prolog_literal X926)) (hd (tl (tl V1007)))) ())))) (true (shen.sys-error shen.s-prolog_clause))))
93
93
 
94
- (defun shen.head_abstraction (V984) (cond ((and (cons? V984) (and (cons? (tl V984)) (and (= :- (hd (tl V984))) (and (cons? (tl (tl V984))) (and (= () (tl (tl (tl V984)))) (< (shen.complexity_head (hd V984)) (value shen.*maxcomplexity*))))))) (cons V984 ())) ((and (cons? V984) (and (cons? (hd V984)) (and (cons? (tl V984)) (and (= :- (hd (tl V984))) (and (cons? (tl (tl V984))) (= () (tl (tl (tl V984))))))))) (let Terms (map (lambda Y (gensym V)) (tl (hd V984))) (let XTerms (shen.rcons_form (shen.remove_modes (tl (hd V984)))) (let Literal (cons unify (cons (shen.cons_form Terms) (cons XTerms ()))) (let Clause (cons (cons (hd (hd V984)) Terms) (cons :- (cons (cons Literal (hd (tl (tl V984)))) ()))) (cons Clause ())))))) (true (shen.sys-error shen.head_abstraction))))
94
+ (defun shen.head_abstraction (V1008) (cond ((and (cons? V1008) (and (cons? (tl V1008)) (and (= :- (hd (tl V1008))) (and (cons? (tl (tl V1008))) (and (= () (tl (tl (tl V1008)))) (< (shen.complexity_head (hd V1008)) (value shen.*maxcomplexity*))))))) (cons V1008 ())) ((and (cons? V1008) (and (cons? (hd V1008)) (and (cons? (tl V1008)) (and (= :- (hd (tl V1008))) (and (cons? (tl (tl V1008))) (= () (tl (tl (tl V1008))))))))) (let Terms (map (lambda Y (gensym V)) (tl (hd V1008))) (let XTerms (shen.rcons_form (shen.remove_modes (tl (hd V1008)))) (let Literal (cons unify (cons (shen.cons_form Terms) (cons XTerms ()))) (let Clause (cons (cons (hd (hd V1008)) Terms) (cons :- (cons (cons Literal (hd (tl (tl V1008)))) ()))) (cons Clause ())))))) (true (shen.sys-error shen.head_abstraction))))
95
95
 
96
- (defun shen.complexity_head (V989) (cond ((cons? V989) (shen.product (map shen.complexity (tl V989)))) (true (shen.sys-error shen.complexity_head))))
96
+ (defun shen.complexity_head (V1013) (cond ((cons? V1013) (shen.product (map (lambda X927 (shen.complexity X927)) (tl V1013)))) (true (shen.sys-error shen.complexity_head))))
97
97
 
98
- (defun shen.complexity (V997) (cond ((and (cons? V997) (and (= mode (hd V997)) (and (cons? (tl V997)) (and (cons? (hd (tl V997))) (and (= mode (hd (hd (tl V997)))) (and (cons? (tl (hd (tl V997)))) (and (cons? (tl (tl (hd (tl V997))))) (and (= () (tl (tl (tl (hd (tl V997)))))) (and (cons? (tl (tl V997))) (= () (tl (tl (tl V997))))))))))))) (shen.complexity (hd (tl V997)))) ((and (cons? V997) (and (= mode (hd V997)) (and (cons? (tl V997)) (and (cons? (hd (tl V997))) (and (cons? (tl (tl V997))) (and (= + (hd (tl (tl V997)))) (= () (tl (tl (tl V997)))))))))) (* 2 (* (shen.complexity (cons mode (cons (hd (hd (tl V997))) (tl (tl V997))))) (shen.complexity (cons mode (cons (tl (hd (tl V997))) (tl (tl V997)))))))) ((and (cons? V997) (and (= mode (hd V997)) (and (cons? (tl V997)) (and (cons? (hd (tl V997))) (and (cons? (tl (tl V997))) (and (= - (hd (tl (tl V997)))) (= () (tl (tl (tl V997)))))))))) (* (shen.complexity (cons mode (cons (hd (hd (tl V997))) (tl (tl V997))))) (shen.complexity (cons mode (cons (tl (hd (tl V997))) (tl (tl V997))))))) ((and (cons? V997) (and (= mode (hd V997)) (and (cons? (tl V997)) (and (cons? (tl (tl V997))) (and (= () (tl (tl (tl V997)))) (variable? (hd (tl V997)))))))) 1) ((and (cons? V997) (and (= mode (hd V997)) (and (cons? (tl V997)) (and (cons? (tl (tl V997))) (and (= + (hd (tl (tl V997)))) (= () (tl (tl (tl V997))))))))) 2) ((and (cons? V997) (and (= mode (hd V997)) (and (cons? (tl V997)) (and (cons? (tl (tl V997))) (and (= - (hd (tl (tl V997)))) (= () (tl (tl (tl V997))))))))) 1) (true (shen.complexity (cons mode (cons V997 (cons + ())))))))
98
+ (defun shen.complexity (V1021) (cond ((and (cons? V1021) (and (= mode (hd V1021)) (and (cons? (tl V1021)) (and (cons? (hd (tl V1021))) (and (= mode (hd (hd (tl V1021)))) (and (cons? (tl (hd (tl V1021)))) (and (cons? (tl (tl (hd (tl V1021))))) (and (= () (tl (tl (tl (hd (tl V1021)))))) (and (cons? (tl (tl V1021))) (= () (tl (tl (tl V1021))))))))))))) (shen.complexity (hd (tl V1021)))) ((and (cons? V1021) (and (= mode (hd V1021)) (and (cons? (tl V1021)) (and (cons? (hd (tl V1021))) (and (cons? (tl (tl V1021))) (and (= + (hd (tl (tl V1021)))) (= () (tl (tl (tl V1021)))))))))) (* 2 (* (shen.complexity (cons mode (cons (hd (hd (tl V1021))) (tl (tl V1021))))) (shen.complexity (cons mode (cons (tl (hd (tl V1021))) (tl (tl V1021)))))))) ((and (cons? V1021) (and (= mode (hd V1021)) (and (cons? (tl V1021)) (and (cons? (hd (tl V1021))) (and (cons? (tl (tl V1021))) (and (= - (hd (tl (tl V1021)))) (= () (tl (tl (tl V1021)))))))))) (* (shen.complexity (cons mode (cons (hd (hd (tl V1021))) (tl (tl V1021))))) (shen.complexity (cons mode (cons (tl (hd (tl V1021))) (tl (tl V1021))))))) ((and (cons? V1021) (and (= mode (hd V1021)) (and (cons? (tl V1021)) (and (cons? (tl (tl V1021))) (and (= () (tl (tl (tl V1021)))) (variable? (hd (tl V1021)))))))) 1) ((and (cons? V1021) (and (= mode (hd V1021)) (and (cons? (tl V1021)) (and (cons? (tl (tl V1021))) (and (= + (hd (tl (tl V1021)))) (= () (tl (tl (tl V1021))))))))) 2) ((and (cons? V1021) (and (= mode (hd V1021)) (and (cons? (tl V1021)) (and (cons? (tl (tl V1021))) (and (= - (hd (tl (tl V1021)))) (= () (tl (tl (tl V1021))))))))) 1) (true (shen.complexity (cons mode (cons V1021 (cons + ())))))))
99
99
 
100
- (defun shen.product (V998) (cond ((= () V998) 1) ((cons? V998) (* (hd V998) (shen.product (tl V998)))) (true (shen.sys-error shen.product))))
100
+ (defun shen.product (V1022) (cond ((= () V1022) 1) ((cons? V1022) (* (hd V1022) (shen.product (tl V1022)))) (true (shen.sys-error shen.product))))
101
101
 
102
- (defun shen.s-prolog_literal (V999) (cond ((and (cons? V999) (and (= is (hd V999)) (and (cons? (tl V999)) (and (cons? (tl (tl V999))) (= () (tl (tl (tl V999)))))))) (cons bind (cons (hd (tl V999)) (cons (shen.insert_deref (hd (tl (tl V999)))) ())))) ((and (cons? V999) (and (= when (hd V999)) (and (cons? (tl V999)) (= () (tl (tl V999)))))) (cons fwhen (cons (shen.insert_deref (hd (tl V999))) ()))) ((and (cons? V999) (and (= bind (hd V999)) (and (cons? (tl V999)) (and (cons? (tl (tl V999))) (= () (tl (tl (tl V999)))))))) (cons bind (cons (hd (tl V999)) (cons (shen.insert_lazyderef (hd (tl (tl V999)))) ())))) ((and (cons? V999) (and (= fwhen (hd V999)) (and (cons? (tl V999)) (= () (tl (tl V999)))))) (cons fwhen (cons (shen.insert_lazyderef (hd (tl V999))) ()))) ((cons? V999) (cons (shen.m_prolog_to_s-prolog_predicate (hd V999)) (tl V999))) (true (shen.sys-error shen.s-prolog_literal))))
102
+ (defun shen.s-prolog_literal (V1023) (cond ((and (cons? V1023) (and (= is (hd V1023)) (and (cons? (tl V1023)) (and (cons? (tl (tl V1023))) (= () (tl (tl (tl V1023)))))))) (cons bind (cons (hd (tl V1023)) (cons (shen.insert_deref (hd (tl (tl V1023)))) ())))) ((and (cons? V1023) (and (= when (hd V1023)) (and (cons? (tl V1023)) (= () (tl (tl V1023)))))) (cons fwhen (cons (shen.insert_deref (hd (tl V1023))) ()))) ((and (cons? V1023) (and (= bind (hd V1023)) (and (cons? (tl V1023)) (and (cons? (tl (tl V1023))) (= () (tl (tl (tl V1023)))))))) (cons bind (cons (hd (tl V1023)) (cons (shen.insert_lazyderef (hd (tl (tl V1023)))) ())))) ((and (cons? V1023) (and (= fwhen (hd V1023)) (and (cons? (tl V1023)) (= () (tl (tl V1023)))))) (cons fwhen (cons (shen.insert_lazyderef (hd (tl V1023))) ()))) ((cons? V1023) (cons (shen.m_prolog_to_s-prolog_predicate (hd V1023)) (tl V1023))) (true (shen.sys-error shen.s-prolog_literal))))
103
103
 
104
- (defun shen.insert_deref (V1000) (cond ((variable? V1000) (cons shen.deref (cons V1000 (cons ProcessN ())))) ((cons? V1000) (cons (shen.insert_deref (hd V1000)) (shen.insert_deref (tl V1000)))) (true V1000)))
104
+ (defun shen.insert_deref (V1024) (cond ((variable? V1024) (cons shen.deref (cons V1024 (cons ProcessN ())))) ((cons? V1024) (cons (shen.insert_deref (hd V1024)) (shen.insert_deref (tl V1024)))) (true V1024)))
105
105
 
106
- (defun shen.insert_lazyderef (V1001) (cond ((variable? V1001) (cons shen.lazyderef (cons V1001 (cons ProcessN ())))) ((cons? V1001) (cons (shen.insert_lazyderef (hd V1001)) (shen.insert_lazyderef (tl V1001)))) (true V1001)))
106
+ (defun shen.insert_lazyderef (V1025) (cond ((variable? V1025) (cons shen.lazyderef (cons V1025 (cons ProcessN ())))) ((cons? V1025) (cons (shen.insert_lazyderef (hd V1025)) (shen.insert_lazyderef (tl V1025)))) (true V1025)))
107
107
 
108
- (defun shen.m_prolog_to_s-prolog_predicate (V1002) (cond ((= = V1002) unify) ((= =! V1002) unify!) ((= == V1002) identical) (true V1002)))
108
+ (defun shen.m_prolog_to_s-prolog_predicate (V1026) (cond ((= = V1026) unify) ((= =! V1026) unify!) ((= == V1026) identical) (true V1026)))
109
109
 
110
- (defun shen.group_clauses (V1003) (cond ((= () V1003) ()) ((cons? V1003) (let Group (shen.collect (lambda X (shen.same_predicate? (hd V1003) X)) V1003) (let Rest (difference V1003 Group) (cons Group (shen.group_clauses Rest))))) (true (shen.sys-error shen.group_clauses))))
110
+ (defun shen.group_clauses (V1027) (cond ((= () V1027) ()) ((cons? V1027) (let Group (shen.collect (lambda X (shen.same_predicate? (hd V1027) X)) V1027) (let Rest (difference V1027 Group) (cons Group (shen.group_clauses Rest))))) (true (shen.sys-error shen.group_clauses))))
111
111
 
112
- (defun shen.collect (V1006 V1007) (cond ((= () V1007) ()) ((cons? V1007) (if (V1006 (hd V1007)) (cons (hd V1007) (shen.collect V1006 (tl V1007))) (shen.collect V1006 (tl V1007)))) (true (shen.sys-error shen.collect))))
112
+ (defun shen.collect (V1030 V1031) (cond ((= () V1031) ()) ((cons? V1031) (if (V1030 (hd V1031)) (cons (hd V1031) (shen.collect V1030 (tl V1031))) (shen.collect V1030 (tl V1031)))) (true (shen.sys-error shen.collect))))
113
113
 
114
- (defun shen.same_predicate? (V1024 V1025) (cond ((and (cons? V1024) (and (cons? (hd V1024)) (and (cons? V1025) (cons? (hd V1025))))) (= (hd (hd V1024)) (hd (hd V1025)))) (true (shen.sys-error shen.same_predicate?))))
114
+ (defun shen.same_predicate? (V1048 V1049) (cond ((and (cons? V1048) (and (cons? (hd V1048)) (and (cons? V1049) (cons? (hd V1049))))) (= (hd (hd V1048)) (hd (hd V1049)))) (true (shen.sys-error shen.same_predicate?))))
115
115
 
116
- (defun shen.compile_prolog_procedure (V1026) (let F (shen.procedure_name V1026) (let Shen (shen.clauses-to-shen F V1026) Shen)))
116
+ (defun shen.compile_prolog_procedure (V1050) (let F (shen.procedure_name V1050) (let Shen (shen.clauses-to-shen F V1050) Shen)))
117
117
 
118
- (defun shen.procedure_name (V1039) (cond ((and (cons? V1039) (and (cons? (hd V1039)) (cons? (hd (hd V1039))))) (hd (hd (hd V1039)))) (true (shen.sys-error shen.procedure_name))))
118
+ (defun shen.procedure_name (V1063) (cond ((and (cons? V1063) (and (cons? (hd V1063)) (cons? (hd (hd V1063))))) (hd (hd (hd V1063)))) (true (shen.sys-error shen.procedure_name))))
119
119
 
120
- (defun shen.clauses-to-shen (V1040 V1041) (let Linear (map shen.linearise-clause V1041) (let Arity (shen.prolog-aritycheck V1040 (map (lambda V908 (head V908)) V1041)) (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 shen.aum_to_shen AUM_instructions))) (let ShenDef (cons define (cons V1040 (append Parameters (append (cons ProcessN (cons Continuation ())) (cons -> (cons Code ())))))) ShenDef)))))))
120
+ (defun shen.clauses-to-shen (V1064 V1065) (let Linear (map (lambda X928 (shen.linearise-clause X928)) V1065) (let Arity (shen.prolog-aritycheck V1064 (map (lambda X929 (head X929)) V1065)) (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 X930 (shen.aum_to_shen X930)) AUM_instructions))) (let ShenDef (cons define (cons V1064 (append Parameters (append (cons ProcessN (cons Continuation ())) (cons -> (cons Code ())))))) ShenDef)))))))
121
121
 
122
- (defun shen.catch-cut (V1042) (cond ((not (shen.occurs? cut V1042)) V1042) (true (cons let (cons Throwcontrol (cons (cons shen.catchpoint ()) (cons (cons shen.cutpoint (cons Throwcontrol (cons V1042 ()))) ())))))))
122
+ (defun shen.catch-cut (V1066) (cond ((not (shen.occurs? cut V1066)) V1066) (true (cons let (cons Throwcontrol (cons (cons shen.catchpoint ()) (cons (cons shen.cutpoint (cons Throwcontrol (cons V1066 ()))) ())))))))
123
123
 
124
124
  (defun shen.catchpoint () (set shen.*catch* (+ 1 (value shen.*catch*))))
125
125
 
126
- (defun shen.cutpoint (V1047 V1048) (cond ((= V1048 V1047) false) (true V1048)))
126
+ (defun shen.cutpoint (V1071 V1072) (cond ((= V1072 V1071) false) (true V1072)))
127
127
 
128
- (defun shen.nest-disjunct (V1050) (cond ((and (cons? V1050) (= () (tl V1050))) (hd V1050)) ((cons? V1050) (shen.lisp-or (hd V1050) (shen.nest-disjunct (tl V1050)))) (true (shen.sys-error shen.nest-disjunct))))
128
+ (defun shen.nest-disjunct (V1074) (cond ((and (cons? V1074) (= () (tl V1074))) (hd V1074)) ((cons? V1074) (shen.lisp-or (hd V1074) (shen.nest-disjunct (tl V1074)))) (true (shen.sys-error shen.nest-disjunct))))
129
129
 
130
- (defun shen.lisp-or (V1051 V1052) (cons let (cons Case (cons V1051 (cons (cons if (cons (cons = (cons Case (cons false ()))) (cons V1052 (cons Case ())))) ())))))
130
+ (defun shen.lisp-or (V1075 V1076) (cons let (cons Case (cons V1075 (cons (cons if (cons (cons = (cons Case (cons false ()))) (cons V1076 (cons Case ())))) ())))))
131
131
 
132
- (defun shen.prolog-aritycheck (V1055 V1056) (cond ((and (cons? V1056) (= () (tl V1056))) (- (length (hd V1056)) 1)) ((and (cons? V1056) (cons? (tl V1056))) (if (= (length (hd V1056)) (length (hd (tl V1056)))) (shen.prolog-aritycheck V1055 (tl V1056)) (simple-error (cn "arity error in prolog procedure " (shen.app (cons V1055 ()) "
132
+ (defun shen.prolog-aritycheck (V1079 V1080) (cond ((and (cons? V1080) (= () (tl V1080))) (- (length (hd V1080)) 1)) ((and (cons? V1080) (cons? (tl V1080))) (if (= (length (hd V1080)) (length (hd (tl V1080)))) (shen.prolog-aritycheck V1079 (tl V1080)) (simple-error (cn "arity error in prolog procedure " (shen.app (cons V1079 ()) "
133
133
  " shen.a))))) (true (shen.sys-error shen.prolog-aritycheck))))
134
134
 
135
- (defun shen.linearise-clause (V1057) (cond ((and (cons? V1057) (and (cons? (tl V1057)) (and (= :- (hd (tl V1057))) (and (cons? (tl (tl V1057))) (= () (tl (tl (tl V1057)))))))) (let Linear (shen.linearise (cons (hd V1057) (tl (tl V1057)))) (shen.clause_form Linear))) (true (shen.sys-error shen.linearise-clause))))
135
+ (defun shen.linearise-clause (V1081) (cond ((and (cons? V1081) (and (cons? (tl V1081)) (and (= :- (hd (tl V1081))) (and (cons? (tl (tl V1081))) (= () (tl (tl (tl V1081)))))))) (let Linear (shen.linearise (cons (hd V1081) (tl (tl V1081)))) (shen.clause_form Linear))) (true (shen.sys-error shen.linearise-clause))))
136
136
 
137
- (defun shen.clause_form (V1058) (cond ((and (cons? V1058) (and (cons? (tl V1058)) (= () (tl (tl V1058))))) (cons (shen.explicit_modes (hd V1058)) (cons :- (cons (shen.cf_help (hd (tl V1058))) ())))) (true (shen.sys-error shen.clause_form))))
137
+ (defun shen.clause_form (V1082) (cond ((and (cons? V1082) (and (cons? (tl V1082)) (= () (tl (tl V1082))))) (cons (shen.explicit_modes (hd V1082)) (cons :- (cons (shen.cf_help (hd (tl V1082))) ())))) (true (shen.sys-error shen.clause_form))))
138
138
 
139
- (defun shen.explicit_modes (V1059) (cond ((cons? V1059) (cons (hd V1059) (map shen.em_help (tl V1059)))) (true (shen.sys-error shen.explicit_modes))))
139
+ (defun shen.explicit_modes (V1083) (cond ((cons? V1083) (cons (hd V1083) (map (lambda X931 (shen.em_help X931)) (tl V1083)))) (true (shen.sys-error shen.explicit_modes))))
140
140
 
141
- (defun shen.em_help (V1060) (cond ((and (cons? V1060) (and (= mode (hd V1060)) (and (cons? (tl V1060)) (and (cons? (tl (tl V1060))) (= () (tl (tl (tl V1060)))))))) V1060) (true (cons mode (cons V1060 (cons + ()))))))
141
+ (defun shen.em_help (V1084) (cond ((and (cons? V1084) (and (= mode (hd V1084)) (and (cons? (tl V1084)) (and (cons? (tl (tl V1084))) (= () (tl (tl (tl V1084)))))))) V1084) (true (cons mode (cons V1084 (cons + ()))))))
142
142
 
143
- (defun shen.cf_help (V1061) (cond ((and (cons? V1061) (and (= where (hd V1061)) (and (cons? (tl V1061)) (and (cons? (hd (tl V1061))) (and (= = (hd (hd (tl V1061)))) (and (cons? (tl (hd (tl V1061)))) (and (cons? (tl (tl (hd (tl V1061))))) (and (= () (tl (tl (tl (hd (tl V1061)))))) (and (cons? (tl (tl V1061))) (= () (tl (tl (tl V1061))))))))))))) (cons (cons (if (value shen.*occurs*) unify! unify) (tl (hd (tl V1061)))) (shen.cf_help (hd (tl (tl V1061)))))) (true V1061)))
143
+ (defun shen.cf_help (V1085) (cond ((and (cons? V1085) (and (= where (hd V1085)) (and (cons? (tl V1085)) (and (cons? (hd (tl V1085))) (and (= = (hd (hd (tl V1085)))) (and (cons? (tl (hd (tl V1085)))) (and (cons? (tl (tl (hd (tl V1085))))) (and (= () (tl (tl (tl (hd (tl V1085)))))) (and (cons? (tl (tl V1085))) (= () (tl (tl (tl V1085))))))))))))) (cons (cons (if (value shen.*occurs*) unify! unify) (tl (hd (tl V1085)))) (shen.cf_help (hd (tl (tl V1085)))))) (true V1085)))
144
144
 
145
- (defun occurs-check (V1066) (cond ((= + V1066) (set shen.*occurs* true)) ((= - V1066) (set shen.*occurs* false)) (true (simple-error "occurs-check expects + or -
145
+ (defun occurs-check (V1090) (cond ((= + V1090) (set shen.*occurs* true)) ((= - V1090) (set shen.*occurs* false)) (true (simple-error "occurs-check expects + or -
146
146
  "))))
147
147
 
148
- (defun shen.aum (V1067 V1068) (cond ((and (cons? V1067) (and (cons? (hd V1067)) (and (cons? (tl V1067)) (and (= :- (hd (tl V1067))) (and (cons? (tl (tl V1067))) (= () (tl (tl (tl V1067))))))))) (let MuApplication (shen.make_mu_application (cons shen.mu (cons (tl (hd V1067)) (cons (shen.continuation_call (tl (hd V1067)) (hd (tl (tl V1067)))) ()))) V1068) (shen.mu_reduction MuApplication +))) (true (shen.sys-error shen.aum))))
148
+ (defun shen.aum (V1091 V1092) (cond ((and (cons? V1091) (and (cons? (hd V1091)) (and (cons? (tl V1091)) (and (= :- (hd (tl V1091))) (and (cons? (tl (tl V1091))) (= () (tl (tl (tl V1091))))))))) (let MuApplication (shen.make_mu_application (cons shen.mu (cons (tl (hd V1091)) (cons (shen.continuation_call (tl (hd V1091)) (hd (tl (tl V1091)))) ()))) V1092) (shen.mu_reduction MuApplication +))) (true (shen.sys-error shen.aum))))
149
149
 
150
- (defun shen.continuation_call (V1069 V1070) (let VTerms (cons ProcessN (shen.extract_vars V1069)) (let VBody (shen.extract_vars V1070) (let Free (remove Throwcontrol (difference VBody VTerms)) (shen.cc_help Free V1070)))))
150
+ (defun shen.continuation_call (V1093 V1094) (let VTerms (cons ProcessN (shen.extract_vars V1093)) (let VBody (shen.extract_vars V1094) (let Free (remove Throwcontrol (difference VBody VTerms)) (shen.cc_help Free V1094)))))
151
151
 
152
- (defun remove (V1071 V1072) (shen.remove-h V1071 V1072 ()))
152
+ (defun remove (V1095 V1096) (shen.remove-h V1095 V1096 ()))
153
153
 
154
- (defun shen.remove-h (V1075 V1076 V1077) (cond ((= () V1076) (reverse V1077)) ((and (cons? V1076) (= (hd V1076) V1075)) (shen.remove-h (hd V1076) (tl V1076) V1077)) ((cons? V1076) (shen.remove-h V1075 (tl V1076) (cons (hd V1076) V1077))) (true (shen.sys-error shen.remove-h))))
154
+ (defun shen.remove-h (V1099 V1100 V1101) (cond ((= () V1100) (reverse V1101)) ((and (cons? V1100) (= (hd V1100) V1099)) (shen.remove-h (hd V1100) (tl V1100) V1101)) ((cons? V1100) (shen.remove-h V1099 (tl V1100) (cons (hd V1100) V1101))) (true (shen.sys-error shen.remove-h))))
155
155
 
156
- (defun shen.cc_help (V1079 V1080) (cond ((and (= () V1079) (= () V1080)) (cons shen.pop (cons shen.the (cons shen.stack ())))) ((= () V1080) (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons V1079 (cons and (cons shen.then (cons (cons shen.pop (cons shen.the (cons shen.stack ()))) ()))))))))) ((= () V1079) (cons call (cons shen.the (cons shen.continuation (cons V1080 ()))))) (true (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons V1079 (cons and (cons shen.then (cons (cons call (cons shen.the (cons shen.continuation (cons V1080 ())))) ())))))))))))
156
+ (defun shen.cc_help (V1103 V1104) (cond ((and (= () V1103) (= () V1104)) (cons shen.pop (cons shen.the (cons shen.stack ())))) ((= () V1104) (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons V1103 (cons and (cons shen.then (cons (cons shen.pop (cons shen.the (cons shen.stack ()))) ()))))))))) ((= () V1103) (cons call (cons shen.the (cons shen.continuation (cons V1104 ()))))) (true (cons shen.rename (cons shen.the (cons shen.variables (cons in (cons V1103 (cons and (cons shen.then (cons (cons call (cons shen.the (cons shen.continuation (cons V1104 ())))) ())))))))))))
157
157
 
158
- (defun shen.make_mu_application (V1081 V1082) (cond ((and (cons? V1081) (and (= shen.mu (hd V1081)) (and (cons? (tl V1081)) (and (= () (hd (tl V1081))) (and (cons? (tl (tl V1081))) (and (= () (tl (tl (tl V1081)))) (= () V1082))))))) (hd (tl (tl V1081)))) ((and (cons? V1081) (and (= shen.mu (hd V1081)) (and (cons? (tl V1081)) (and (cons? (hd (tl V1081))) (and (cons? (tl (tl V1081))) (and (= () (tl (tl (tl V1081)))) (cons? V1082))))))) (cons (cons shen.mu (cons (hd (hd (tl V1081))) (cons (shen.make_mu_application (cons shen.mu (cons (tl (hd (tl V1081))) (tl (tl V1081)))) (tl V1082)) ()))) (cons (hd V1082) ()))) (true (shen.sys-error shen.make_mu_application))))
158
+ (defun shen.make_mu_application (V1105 V1106) (cond ((and (cons? V1105) (and (= shen.mu (hd V1105)) (and (cons? (tl V1105)) (and (= () (hd (tl V1105))) (and (cons? (tl (tl V1105))) (and (= () (tl (tl (tl V1105)))) (= () V1106))))))) (hd (tl (tl V1105)))) ((and (cons? V1105) (and (= shen.mu (hd V1105)) (and (cons? (tl V1105)) (and (cons? (hd (tl V1105))) (and (cons? (tl (tl V1105))) (and (= () (tl (tl (tl V1105)))) (cons? V1106))))))) (cons (cons shen.mu (cons (hd (hd (tl V1105))) (cons (shen.make_mu_application (cons shen.mu (cons (tl (hd (tl V1105))) (tl (tl V1105)))) (tl V1106)) ()))) (cons (hd V1106) ()))) (true (shen.sys-error shen.make_mu_application))))
159
159
 
160
- (defun shen.mu_reduction (V1089 V1090) (cond ((and (cons? V1089) (and (cons? (hd V1089)) (and (= shen.mu (hd (hd V1089))) (and (cons? (tl (hd V1089))) (and (cons? (hd (tl (hd V1089)))) (and (= mode (hd (hd (tl (hd V1089))))) (and (cons? (tl (hd (tl (hd V1089))))) (and (cons? (tl (tl (hd (tl (hd V1089)))))) (and (= () (tl (tl (tl (hd (tl (hd V1089))))))) (and (cons? (tl (tl (hd V1089)))) (and (= () (tl (tl (tl (hd V1089))))) (and (cons? (tl V1089)) (= () (tl (tl V1089))))))))))))))) (shen.mu_reduction (cons (cons shen.mu (cons (hd (tl (hd (tl (hd V1089))))) (tl (tl (hd V1089))))) (tl V1089)) (hd (tl (tl (hd (tl (hd V1089)))))))) ((and (cons? V1089) (and (cons? (hd V1089)) (and (= shen.mu (hd (hd V1089))) (and (cons? (tl (hd V1089))) (and (cons? (tl (tl (hd V1089)))) (and (= () (tl (tl (tl (hd V1089))))) (and (cons? (tl V1089)) (and (= () (tl (tl V1089))) (= _ (hd (tl (hd V1089)))))))))))) (shen.mu_reduction (hd (tl (tl (hd V1089)))) V1090)) ((and (cons? V1089) (and (cons? (hd V1089)) (and (= shen.mu (hd (hd V1089))) (and (cons? (tl (hd V1089))) (and (cons? (tl (tl (hd V1089)))) (and (= () (tl (tl (tl (hd V1089))))) (and (cons? (tl V1089)) (and (= () (tl (tl V1089))) (shen.ephemeral_variable? (hd (tl (hd V1089))) (hd (tl V1089))))))))))) (subst (hd (tl V1089)) (hd (tl (hd V1089))) (shen.mu_reduction (hd (tl (tl (hd V1089)))) V1090))) ((and (cons? V1089) (and (cons? (hd V1089)) (and (= shen.mu (hd (hd V1089))) (and (cons? (tl (hd V1089))) (and (cons? (tl (tl (hd V1089)))) (and (= () (tl (tl (tl (hd V1089))))) (and (cons? (tl V1089)) (and (= () (tl (tl V1089))) (variable? (hd (tl (hd V1089)))))))))))) (cons let (cons (hd (tl (hd V1089))) (cons shen.be (cons (hd (tl V1089)) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V1089)))) V1090) ()))))))) ((and (cons? V1089) (and (cons? (hd V1089)) (and (= shen.mu (hd (hd V1089))) (and (cons? (tl (hd V1089))) (and (cons? (tl (tl (hd V1089)))) (and (= () (tl (tl (tl (hd V1089))))) (and (cons? (tl V1089)) (and (= () (tl (tl V1089))) (and (= - V1090) (shen.prolog_constant? (hd (tl (hd V1089))))))))))))) (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 V1089))))) (cons in (cons (cons if (cons (cons Z (cons is (cons identical (cons shen.to (cons (hd (tl (hd V1089))) ()))))) (cons shen.then (cons (shen.mu_reduction (hd (tl (tl (hd V1089)))) -) (cons shen.else (cons shen.failed! ())))))) ())))))))) ((and (cons? V1089) (and (cons? (hd V1089)) (and (= shen.mu (hd (hd V1089))) (and (cons? (tl (hd V1089))) (and (cons? (tl (tl (hd V1089)))) (and (= () (tl (tl (tl (hd V1089))))) (and (cons? (tl V1089)) (and (= () (tl (tl V1089))) (and (= + V1090) (shen.prolog_constant? (hd (tl (hd V1089))))))))))))) (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 V1089))))) (cons in (cons (cons if (cons (cons Z (cons is (cons identical (cons shen.to (cons (hd (tl (hd V1089))) ()))))) (cons shen.then (cons (shen.mu_reduction (hd (tl (tl (hd V1089)))) +) (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 V1089))) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V1089)))) +) ())))))) (cons shen.else (cons shen.failed! ())))))) ())))))) ())))))))) ((and (cons? V1089) (and (cons? (hd V1089)) (and (= shen.mu (hd (hd V1089))) (and (cons? (tl (hd V1089))) (and (cons? (hd (tl (hd V1089)))) (and (cons? (tl (tl (hd V1089)))) (and (= () (tl (tl (tl (hd V1089))))) (and (cons? (tl V1089)) (and (= () (tl (tl V1089))) (= - V1090)))))))))) (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 V1089))))) (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 V1089)))) (cons (cons (cons shen.mu (cons (tl (hd (tl (hd V1089)))) (tl (tl (hd V1089))))) (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? V1089) (and (cons? (hd V1089)) (and (= shen.mu (hd (hd V1089))) (and (cons? (tl (hd V1089))) (and (cons? (hd (tl (hd V1089)))) (and (cons? (tl (tl (hd V1089)))) (and (= () (tl (tl (tl (hd V1089))))) (and (cons? (tl V1089)) (and (= () (tl (tl V1089))) (= + V1090)))))))))) (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 V1089))))) (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 V1089)))) (cons (cons (cons shen.mu (cons (tl (hd (tl (hd V1089)))) (tl (tl (hd V1089))))) (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 V1089)))) (cons and (cons shen.then (cons (cons bind (cons Z (cons shen.to (cons (shen.rcons_form (shen.remove_modes (hd (tl (hd V1089))))) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V1089)))) +) ())))))) ())))))))) (cons shen.else (cons shen.failed! ())))))) ())))))) ())))))))) (true V1089)))
160
+ (defun shen.mu_reduction (V1113 V1114) (cond ((and (cons? V1113) (and (cons? (hd V1113)) (and (= shen.mu (hd (hd V1113))) (and (cons? (tl (hd V1113))) (and (cons? (hd (tl (hd V1113)))) (and (= mode (hd (hd (tl (hd V1113))))) (and (cons? (tl (hd (tl (hd V1113))))) (and (cons? (tl (tl (hd (tl (hd V1113)))))) (and (= () (tl (tl (tl (hd (tl (hd V1113))))))) (and (cons? (tl (tl (hd V1113)))) (and (= () (tl (tl (tl (hd V1113))))) (and (cons? (tl V1113)) (= () (tl (tl V1113))))))))))))))) (shen.mu_reduction (cons (cons shen.mu (cons (hd (tl (hd (tl (hd V1113))))) (tl (tl (hd V1113))))) (tl V1113)) (hd (tl (tl (hd (tl (hd V1113)))))))) ((and (cons? V1113) (and (cons? (hd V1113)) (and (= shen.mu (hd (hd V1113))) (and (cons? (tl (hd V1113))) (and (cons? (tl (tl (hd V1113)))) (and (= () (tl (tl (tl (hd V1113))))) (and (cons? (tl V1113)) (and (= () (tl (tl V1113))) (= _ (hd (tl (hd V1113)))))))))))) (shen.mu_reduction (hd (tl (tl (hd V1113)))) V1114)) ((and (cons? V1113) (and (cons? (hd V1113)) (and (= shen.mu (hd (hd V1113))) (and (cons? (tl (hd V1113))) (and (cons? (tl (tl (hd V1113)))) (and (= () (tl (tl (tl (hd V1113))))) (and (cons? (tl V1113)) (and (= () (tl (tl V1113))) (shen.ephemeral_variable? (hd (tl (hd V1113))) (hd (tl V1113))))))))))) (subst (hd (tl V1113)) (hd (tl (hd V1113))) (shen.mu_reduction (hd (tl (tl (hd V1113)))) V1114))) ((and (cons? V1113) (and (cons? (hd V1113)) (and (= shen.mu (hd (hd V1113))) (and (cons? (tl (hd V1113))) (and (cons? (tl (tl (hd V1113)))) (and (= () (tl (tl (tl (hd V1113))))) (and (cons? (tl V1113)) (and (= () (tl (tl V1113))) (variable? (hd (tl (hd V1113)))))))))))) (cons let (cons (hd (tl (hd V1113))) (cons shen.be (cons (hd (tl V1113)) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V1113)))) V1114) ()))))))) ((and (cons? V1113) (and (cons? (hd V1113)) (and (= shen.mu (hd (hd V1113))) (and (cons? (tl (hd V1113))) (and (cons? (tl (tl (hd V1113)))) (and (= () (tl (tl (tl (hd V1113))))) (and (cons? (tl V1113)) (and (= () (tl (tl V1113))) (and (= - V1114) (shen.prolog_constant? (hd (tl (hd V1113))))))))))))) (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 V1113))))) (cons in (cons (cons if (cons (cons Z (cons is (cons identical (cons shen.to (cons (hd (tl (hd V1113))) ()))))) (cons shen.then (cons (shen.mu_reduction (hd (tl (tl (hd V1113)))) -) (cons shen.else (cons shen.failed! ())))))) ())))))))) ((and (cons? V1113) (and (cons? (hd V1113)) (and (= shen.mu (hd (hd V1113))) (and (cons? (tl (hd V1113))) (and (cons? (tl (tl (hd V1113)))) (and (= () (tl (tl (tl (hd V1113))))) (and (cons? (tl V1113)) (and (= () (tl (tl V1113))) (and (= + V1114) (shen.prolog_constant? (hd (tl (hd V1113))))))))))))) (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 V1113))))) (cons in (cons (cons if (cons (cons Z (cons is (cons identical (cons shen.to (cons (hd (tl (hd V1113))) ()))))) (cons shen.then (cons (shen.mu_reduction (hd (tl (tl (hd V1113)))) +) (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 V1113))) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V1113)))) +) ())))))) (cons shen.else (cons shen.failed! ())))))) ())))))) ())))))))) ((and (cons? V1113) (and (cons? (hd V1113)) (and (= shen.mu (hd (hd V1113))) (and (cons? (tl (hd V1113))) (and (cons? (hd (tl (hd V1113)))) (and (cons? (tl (tl (hd V1113)))) (and (= () (tl (tl (tl (hd V1113))))) (and (cons? (tl V1113)) (and (= () (tl (tl V1113))) (= - V1114)))))))))) (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 V1113))))) (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 V1113)))) (cons (cons (cons shen.mu (cons (tl (hd (tl (hd V1113)))) (tl (tl (hd V1113))))) (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? V1113) (and (cons? (hd V1113)) (and (= shen.mu (hd (hd V1113))) (and (cons? (tl (hd V1113))) (and (cons? (hd (tl (hd V1113)))) (and (cons? (tl (tl (hd V1113)))) (and (= () (tl (tl (tl (hd V1113))))) (and (cons? (tl V1113)) (and (= () (tl (tl V1113))) (= + V1114)))))))))) (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 V1113))))) (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 V1113)))) (cons (cons (cons shen.mu (cons (tl (hd (tl (hd V1113)))) (tl (tl (hd V1113))))) (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 V1113)))) (cons and (cons shen.then (cons (cons bind (cons Z (cons shen.to (cons (shen.rcons_form (shen.remove_modes (hd (tl (hd V1113))))) (cons in (cons (shen.mu_reduction (hd (tl (tl (hd V1113)))) +) ())))))) ())))))))) (cons shen.else (cons shen.failed! ())))))) ())))))) ())))))))) (true V1113)))
161
161
 
162
- (defun shen.rcons_form (V1091) (cond ((cons? V1091) (cons cons (cons (shen.rcons_form (hd V1091)) (cons (shen.rcons_form (tl V1091)) ())))) (true V1091)))
162
+ (defun shen.rcons_form (V1115) (cond ((cons? V1115) (cons cons (cons (shen.rcons_form (hd V1115)) (cons (shen.rcons_form (tl V1115)) ())))) (true V1115)))
163
163
 
164
- (defun shen.remove_modes (V1092) (cond ((and (cons? V1092) (and (= mode (hd V1092)) (and (cons? (tl V1092)) (and (cons? (tl (tl V1092))) (and (= + (hd (tl (tl V1092)))) (= () (tl (tl (tl V1092))))))))) (shen.remove_modes (hd (tl V1092)))) ((and (cons? V1092) (and (= mode (hd V1092)) (and (cons? (tl V1092)) (and (cons? (tl (tl V1092))) (and (= - (hd (tl (tl V1092)))) (= () (tl (tl (tl V1092))))))))) (shen.remove_modes (hd (tl V1092)))) ((cons? V1092) (cons (shen.remove_modes (hd V1092)) (shen.remove_modes (tl V1092)))) (true V1092)))
164
+ (defun shen.remove_modes (V1116) (cond ((and (cons? V1116) (and (= mode (hd V1116)) (and (cons? (tl V1116)) (and (cons? (tl (tl V1116))) (and (= + (hd (tl (tl V1116)))) (= () (tl (tl (tl V1116))))))))) (shen.remove_modes (hd (tl V1116)))) ((and (cons? V1116) (and (= mode (hd V1116)) (and (cons? (tl V1116)) (and (cons? (tl (tl V1116))) (and (= - (hd (tl (tl V1116)))) (= () (tl (tl (tl V1116))))))))) (shen.remove_modes (hd (tl V1116)))) ((cons? V1116) (cons (shen.remove_modes (hd V1116)) (shen.remove_modes (tl V1116)))) (true V1116)))
165
165
 
166
- (defun shen.ephemeral_variable? (V1093 V1094) (and (variable? V1093) (variable? V1094)))
166
+ (defun shen.ephemeral_variable? (V1117 V1118) (and (variable? V1117) (variable? V1118)))
167
167
 
168
- (defun shen.prolog_constant? (V1103) (cond ((cons? V1103) false) (true true)))
168
+ (defun shen.prolog_constant? (V1127) (cond ((cons? V1127) false) (true true)))
169
169
 
170
- (defun shen.aum_to_shen (V1104) (cond ((and (cons? V1104) (and (= let (hd V1104)) (and (cons? (tl V1104)) (and (cons? (tl (tl V1104))) (and (= shen.be (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (cons? (tl (tl (tl (tl V1104))))) (and (= in (hd (tl (tl (tl (tl V1104)))))) (and (cons? (tl (tl (tl (tl (tl V1104)))))) (= () (tl (tl (tl (tl (tl (tl V1104)))))))))))))))) (cons let (cons (hd (tl V1104)) (cons (shen.aum_to_shen (hd (tl (tl (tl V1104))))) (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V1104))))))) ()))))) ((and (cons? V1104) (and (= shen.the (hd V1104)) (and (cons? (tl V1104)) (and (= shen.result (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.of (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (= shen.dereferencing (hd (tl (tl (tl V1104))))) (and (cons? (tl (tl (tl (tl V1104))))) (= () (tl (tl (tl (tl (tl V1104))))))))))))))) (cons shen.lazyderef (cons (shen.aum_to_shen (hd (tl (tl (tl (tl V1104)))))) (cons ProcessN ())))) ((and (cons? V1104) (and (= if (hd V1104)) (and (cons? (tl V1104)) (and (cons? (tl (tl V1104))) (and (= shen.then (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (cons? (tl (tl (tl (tl V1104))))) (and (= shen.else (hd (tl (tl (tl (tl V1104)))))) (and (cons? (tl (tl (tl (tl (tl V1104)))))) (= () (tl (tl (tl (tl (tl (tl V1104)))))))))))))))) (cons if (cons (shen.aum_to_shen (hd (tl V1104))) (cons (shen.aum_to_shen (hd (tl (tl (tl V1104))))) (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V1104))))))) ()))))) ((and (cons? V1104) (and (cons? (tl V1104)) (and (= is (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.a (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (= shen.variable (hd (tl (tl (tl V1104))))) (= () (tl (tl (tl (tl V1104)))))))))))) (cons shen.pvar? (cons (hd V1104) ()))) ((and (cons? V1104) (and (cons? (tl V1104)) (and (= is (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.a (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (= shen.non-empty (hd (tl (tl (tl V1104))))) (and (cons? (tl (tl (tl (tl V1104))))) (and (= list (hd (tl (tl (tl (tl V1104)))))) (= () (tl (tl (tl (tl (tl V1104))))))))))))))) (cons cons? (cons (hd V1104) ()))) ((and (cons? V1104) (and (= shen.rename (hd V1104)) (and (cons? (tl V1104)) (and (= shen.the (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.variables (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (= in (hd (tl (tl (tl V1104))))) (and (cons? (tl (tl (tl (tl V1104))))) (and (= () (hd (tl (tl (tl (tl V1104)))))) (and (cons? (tl (tl (tl (tl (tl V1104)))))) (and (= and (hd (tl (tl (tl (tl (tl V1104))))))) (and (cons? (tl (tl (tl (tl (tl (tl V1104))))))) (and (= shen.then (hd (tl (tl (tl (tl (tl (tl V1104)))))))) (and (cons? (tl (tl (tl (tl (tl (tl (tl V1104)))))))) (= () (tl (tl (tl (tl (tl (tl (tl (tl V1104)))))))))))))))))))))))) (shen.aum_to_shen (hd (tl (tl (tl (tl (tl (tl (tl V1104)))))))))) ((and (cons? V1104) (and (= shen.rename (hd V1104)) (and (cons? (tl V1104)) (and (= shen.the (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.variables (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (= in (hd (tl (tl (tl V1104))))) (and (cons? (tl (tl (tl (tl V1104))))) (and (cons? (hd (tl (tl (tl (tl V1104)))))) (and (cons? (tl (tl (tl (tl (tl V1104)))))) (and (= and (hd (tl (tl (tl (tl (tl V1104))))))) (and (cons? (tl (tl (tl (tl (tl (tl V1104))))))) (and (= shen.then (hd (tl (tl (tl (tl (tl (tl V1104)))))))) (and (cons? (tl (tl (tl (tl (tl (tl (tl V1104)))))))) (= () (tl (tl (tl (tl (tl (tl (tl (tl V1104)))))))))))))))))))))))) (cons let (cons (hd (hd (tl (tl (tl (tl V1104)))))) (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 V1104)))))) (tl (tl (tl (tl (tl V1104))))))))))) ()))))) ((and (cons? V1104) (and (= bind (hd V1104)) (and (cons? (tl V1104)) (and (cons? (tl (tl V1104))) (and (= shen.to (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (cons? (tl (tl (tl (tl V1104))))) (and (= in (hd (tl (tl (tl (tl V1104)))))) (and (cons? (tl (tl (tl (tl (tl V1104)))))) (= () (tl (tl (tl (tl (tl (tl V1104)))))))))))))))) (cons do (cons (cons shen.bindv (cons (hd (tl V1104)) (cons (shen.chwild (hd (tl (tl (tl V1104))))) (cons ProcessN ())))) (cons (cons let (cons Result (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V1104))))))) (cons (cons do (cons (cons shen.unbindv (cons (hd (tl V1104)) (cons ProcessN ()))) (cons Result ()))) ())))) ())))) ((and (cons? V1104) (and (cons? (tl V1104)) (and (= is (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= identical (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (and (= shen.to (hd (tl (tl (tl V1104))))) (and (cons? (tl (tl (tl (tl V1104))))) (= () (tl (tl (tl (tl (tl V1104)))))))))))))) (cons = (cons (hd (tl (tl (tl (tl V1104))))) (cons (hd V1104) ())))) ((= shen.failed! V1104) false) ((and (cons? V1104) (and (= shen.the (hd V1104)) (and (cons? (tl V1104)) (and (= head (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.of (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (= () (tl (tl (tl (tl V1104)))))))))))) (cons hd (tl (tl (tl V1104))))) ((and (cons? V1104) (and (= shen.the (hd V1104)) (and (cons? (tl V1104)) (and (= tail (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.of (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (= () (tl (tl (tl (tl V1104)))))))))))) (cons tl (tl (tl (tl V1104))))) ((and (cons? V1104) (and (= shen.pop (hd V1104)) (and (cons? (tl V1104)) (and (= shen.the (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.stack (hd (tl (tl V1104)))) (= () (tl (tl (tl V1104)))))))))) (cons do (cons (cons shen.incinfs ()) (cons (cons thaw (cons Continuation ())) ())))) ((and (cons? V1104) (and (= call (hd V1104)) (and (cons? (tl V1104)) (and (= shen.the (hd (tl V1104))) (and (cons? (tl (tl V1104))) (and (= shen.continuation (hd (tl (tl V1104)))) (and (cons? (tl (tl (tl V1104)))) (= () (tl (tl (tl (tl V1104)))))))))))) (cons do (cons (cons shen.incinfs ()) (cons (shen.call_the_continuation (shen.chwild (hd (tl (tl (tl V1104))))) ProcessN Continuation) ())))) (true V1104)))
170
+ (defun shen.aum_to_shen (V1128) (cond ((and (cons? V1128) (and (= let (hd V1128)) (and (cons? (tl V1128)) (and (cons? (tl (tl V1128))) (and (= shen.be (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (cons? (tl (tl (tl (tl V1128))))) (and (= in (hd (tl (tl (tl (tl V1128)))))) (and (cons? (tl (tl (tl (tl (tl V1128)))))) (= () (tl (tl (tl (tl (tl (tl V1128)))))))))))))))) (cons let (cons (hd (tl V1128)) (cons (shen.aum_to_shen (hd (tl (tl (tl V1128))))) (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V1128))))))) ()))))) ((and (cons? V1128) (and (= shen.the (hd V1128)) (and (cons? (tl V1128)) (and (= shen.result (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.of (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (= shen.dereferencing (hd (tl (tl (tl V1128))))) (and (cons? (tl (tl (tl (tl V1128))))) (= () (tl (tl (tl (tl (tl V1128))))))))))))))) (cons shen.lazyderef (cons (shen.aum_to_shen (hd (tl (tl (tl (tl V1128)))))) (cons ProcessN ())))) ((and (cons? V1128) (and (= if (hd V1128)) (and (cons? (tl V1128)) (and (cons? (tl (tl V1128))) (and (= shen.then (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (cons? (tl (tl (tl (tl V1128))))) (and (= shen.else (hd (tl (tl (tl (tl V1128)))))) (and (cons? (tl (tl (tl (tl (tl V1128)))))) (= () (tl (tl (tl (tl (tl (tl V1128)))))))))))))))) (cons if (cons (shen.aum_to_shen (hd (tl V1128))) (cons (shen.aum_to_shen (hd (tl (tl (tl V1128))))) (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V1128))))))) ()))))) ((and (cons? V1128) (and (cons? (tl V1128)) (and (= is (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.a (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (= shen.variable (hd (tl (tl (tl V1128))))) (= () (tl (tl (tl (tl V1128)))))))))))) (cons shen.pvar? (cons (hd V1128) ()))) ((and (cons? V1128) (and (cons? (tl V1128)) (and (= is (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.a (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (= shen.non-empty (hd (tl (tl (tl V1128))))) (and (cons? (tl (tl (tl (tl V1128))))) (and (= list (hd (tl (tl (tl (tl V1128)))))) (= () (tl (tl (tl (tl (tl V1128))))))))))))))) (cons cons? (cons (hd V1128) ()))) ((and (cons? V1128) (and (= shen.rename (hd V1128)) (and (cons? (tl V1128)) (and (= shen.the (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.variables (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (= in (hd (tl (tl (tl V1128))))) (and (cons? (tl (tl (tl (tl V1128))))) (and (= () (hd (tl (tl (tl (tl V1128)))))) (and (cons? (tl (tl (tl (tl (tl V1128)))))) (and (= and (hd (tl (tl (tl (tl (tl V1128))))))) (and (cons? (tl (tl (tl (tl (tl (tl V1128))))))) (and (= shen.then (hd (tl (tl (tl (tl (tl (tl V1128)))))))) (and (cons? (tl (tl (tl (tl (tl (tl (tl V1128)))))))) (= () (tl (tl (tl (tl (tl (tl (tl (tl V1128)))))))))))))))))))))))) (shen.aum_to_shen (hd (tl (tl (tl (tl (tl (tl (tl V1128)))))))))) ((and (cons? V1128) (and (= shen.rename (hd V1128)) (and (cons? (tl V1128)) (and (= shen.the (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.variables (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (= in (hd (tl (tl (tl V1128))))) (and (cons? (tl (tl (tl (tl V1128))))) (and (cons? (hd (tl (tl (tl (tl V1128)))))) (and (cons? (tl (tl (tl (tl (tl V1128)))))) (and (= and (hd (tl (tl (tl (tl (tl V1128))))))) (and (cons? (tl (tl (tl (tl (tl (tl V1128))))))) (and (= shen.then (hd (tl (tl (tl (tl (tl (tl V1128)))))))) (and (cons? (tl (tl (tl (tl (tl (tl (tl V1128)))))))) (= () (tl (tl (tl (tl (tl (tl (tl (tl V1128)))))))))))))))))))))))) (cons let (cons (hd (hd (tl (tl (tl (tl V1128)))))) (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 V1128)))))) (tl (tl (tl (tl (tl V1128))))))))))) ()))))) ((and (cons? V1128) (and (= bind (hd V1128)) (and (cons? (tl V1128)) (and (cons? (tl (tl V1128))) (and (= shen.to (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (cons? (tl (tl (tl (tl V1128))))) (and (= in (hd (tl (tl (tl (tl V1128)))))) (and (cons? (tl (tl (tl (tl (tl V1128)))))) (= () (tl (tl (tl (tl (tl (tl V1128)))))))))))))))) (cons do (cons (cons shen.bindv (cons (hd (tl V1128)) (cons (shen.chwild (hd (tl (tl (tl V1128))))) (cons ProcessN ())))) (cons (cons let (cons Result (cons (shen.aum_to_shen (hd (tl (tl (tl (tl (tl V1128))))))) (cons (cons do (cons (cons shen.unbindv (cons (hd (tl V1128)) (cons ProcessN ()))) (cons Result ()))) ())))) ())))) ((and (cons? V1128) (and (cons? (tl V1128)) (and (= is (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= identical (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (and (= shen.to (hd (tl (tl (tl V1128))))) (and (cons? (tl (tl (tl (tl V1128))))) (= () (tl (tl (tl (tl (tl V1128)))))))))))))) (cons = (cons (hd (tl (tl (tl (tl V1128))))) (cons (hd V1128) ())))) ((= shen.failed! V1128) false) ((and (cons? V1128) (and (= shen.the (hd V1128)) (and (cons? (tl V1128)) (and (= head (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.of (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (= () (tl (tl (tl (tl V1128)))))))))))) (cons hd (tl (tl (tl V1128))))) ((and (cons? V1128) (and (= shen.the (hd V1128)) (and (cons? (tl V1128)) (and (= tail (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.of (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (= () (tl (tl (tl (tl V1128)))))))))))) (cons tl (tl (tl (tl V1128))))) ((and (cons? V1128) (and (= shen.pop (hd V1128)) (and (cons? (tl V1128)) (and (= shen.the (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.stack (hd (tl (tl V1128)))) (= () (tl (tl (tl V1128)))))))))) (cons do (cons (cons shen.incinfs ()) (cons (cons thaw (cons Continuation ())) ())))) ((and (cons? V1128) (and (= call (hd V1128)) (and (cons? (tl V1128)) (and (= shen.the (hd (tl V1128))) (and (cons? (tl (tl V1128))) (and (= shen.continuation (hd (tl (tl V1128)))) (and (cons? (tl (tl (tl V1128)))) (= () (tl (tl (tl (tl V1128)))))))))))) (cons do (cons (cons shen.incinfs ()) (cons (shen.call_the_continuation (shen.chwild (hd (tl (tl (tl V1128))))) ProcessN Continuation) ())))) (true V1128)))
171
171
 
172
- (defun shen.chwild (V1105) (cond ((= V1105 _) (cons shen.newpv (cons ProcessN ()))) ((cons? V1105) (map shen.chwild V1105)) (true V1105)))
172
+ (defun shen.chwild (V1129) (cond ((= V1129 _) (cons shen.newpv (cons ProcessN ()))) ((cons? V1129) (map (lambda X932 (shen.chwild X932)) V1129)) (true V1129)))
173
173
 
174
- (defun shen.newpv (V1106) (let Count+1 (+ (<-address (value shen.*varcounter*) V1106) 1) (let IncVar (address-> (value shen.*varcounter*) V1106 Count+1) (let Vector (<-address (value shen.*prologvectors*) V1106) (let ResizeVectorIfNeeded (if (= Count+1 (limit Vector)) (shen.resizeprocessvector V1106 Count+1) shen.skip) (shen.mk-pvar Count+1))))))
174
+ (defun shen.newpv (V1130) (let Count+1 (+ (<-address (value shen.*varcounter*) V1130) 1) (let IncVar (address-> (value shen.*varcounter*) V1130 Count+1) (let Vector (<-address (value shen.*prologvectors*) V1130) (let ResizeVectorIfNeeded (if (= Count+1 (limit Vector)) (shen.resizeprocessvector V1130 Count+1) shen.skip) (shen.mk-pvar Count+1))))))
175
175
 
176
- (defun shen.resizeprocessvector (V1107 V1108) (let Vector (<-address (value shen.*prologvectors*) V1107) (let BigVector (shen.resize-vector Vector (+ V1108 V1108) shen.-null-) (address-> (value shen.*prologvectors*) V1107 BigVector))))
176
+ (defun shen.resizeprocessvector (V1131 V1132) (let Vector (<-address (value shen.*prologvectors*) V1131) (let BigVector (shen.resize-vector Vector (+ V1132 V1132) shen.-null-) (address-> (value shen.*prologvectors*) V1131 BigVector))))
177
177
 
178
- (defun shen.resize-vector (V1109 V1110 V1111) (let BigVector (address-> (absvector (+ 1 V1110)) 0 V1110) (shen.copy-vector V1109 BigVector (limit V1109) V1110 V1111)))
178
+ (defun shen.resize-vector (V1133 V1134 V1135) (let BigVector (address-> (absvector (+ 1 V1134)) 0 V1134) (shen.copy-vector V1133 BigVector (limit V1133) V1134 V1135)))
179
179
 
180
- (defun shen.copy-vector (V1112 V1113 V1114 V1115 V1116) (shen.copy-vector-stage-2 (+ 1 V1114) (+ V1115 1) V1116 (shen.copy-vector-stage-1 1 V1112 V1113 (+ 1 V1114))))
180
+ (defun shen.copy-vector (V1136 V1137 V1138 V1139 V1140) (shen.copy-vector-stage-2 (+ 1 V1138) (+ V1139 1) V1140 (shen.copy-vector-stage-1 1 V1136 V1137 (+ 1 V1138))))
181
181
 
182
- (defun shen.copy-vector-stage-1 (V1119 V1120 V1121 V1122) (cond ((= V1122 V1119) V1121) (true (shen.copy-vector-stage-1 (+ 1 V1119) V1120 (address-> V1121 V1119 (<-address V1120 V1119)) V1122))))
182
+ (defun shen.copy-vector-stage-1 (V1143 V1144 V1145 V1146) (cond ((= V1146 V1143) V1145) (true (shen.copy-vector-stage-1 (+ 1 V1143) V1144 (address-> V1145 V1143 (<-address V1144 V1143)) V1146))))
183
183
 
184
- (defun shen.copy-vector-stage-2 (V1126 V1127 V1128 V1129) (cond ((= V1127 V1126) V1129) (true (shen.copy-vector-stage-2 (+ V1126 1) V1127 V1128 (address-> V1129 V1126 V1128)))))
184
+ (defun shen.copy-vector-stage-2 (V1150 V1151 V1152 V1153) (cond ((= V1151 V1150) V1153) (true (shen.copy-vector-stage-2 (+ V1150 1) V1151 V1152 (address-> V1153 V1150 V1152)))))
185
185
 
186
- (defun shen.mk-pvar (V1131) (address-> (address-> (absvector 2) 0 shen.pvar) 1 V1131))
186
+ (defun shen.mk-pvar (V1155) (address-> (address-> (absvector 2) 0 shen.pvar) 1 V1155))
187
187
 
188
- (defun shen.pvar? (V1132) (and (absvector? V1132) (= (<-address V1132 0) shen.pvar)))
188
+ (defun shen.pvar? (V1156) (and (absvector? V1156) (= (<-address V1156 0) shen.pvar)))
189
189
 
190
- (defun shen.bindv (V1133 V1134 V1135) (let Vector (<-address (value shen.*prologvectors*) V1135) (address-> Vector (<-address V1133 1) V1134)))
190
+ (defun shen.bindv (V1157 V1158 V1159) (let Vector (<-address (value shen.*prologvectors*) V1159) (address-> Vector (<-address V1157 1) V1158)))
191
191
 
192
- (defun shen.unbindv (V1136 V1137) (let Vector (<-address (value shen.*prologvectors*) V1137) (address-> Vector (<-address V1136 1) shen.-null-)))
192
+ (defun shen.unbindv (V1160 V1161) (let Vector (<-address (value shen.*prologvectors*) V1161) (address-> Vector (<-address V1160 1) shen.-null-)))
193
193
 
194
194
  (defun shen.incinfs () (set shen.*infs* (+ 1 (value shen.*infs*))))
195
195
 
196
- (defun shen.call_the_continuation (V1138 V1139 V1140) (cond ((and (cons? V1138) (and (cons? (hd V1138)) (= () (tl V1138)))) (cons (hd (hd V1138)) (append (tl (hd V1138)) (cons V1139 (cons V1140 ()))))) ((and (cons? V1138) (cons? (hd V1138))) (let NewContinuation (shen.newcontinuation (tl V1138) V1139 V1140) (cons (hd (hd V1138)) (append (tl (hd V1138)) (cons V1139 (cons NewContinuation ())))))) (true (shen.sys-error shen.call_the_continuation))))
196
+ (defun shen.call_the_continuation (V1162 V1163 V1164) (cond ((and (cons? V1162) (and (cons? (hd V1162)) (= () (tl V1162)))) (cons (hd (hd V1162)) (append (tl (hd V1162)) (cons V1163 (cons V1164 ()))))) ((and (cons? V1162) (cons? (hd V1162))) (let NewContinuation (shen.newcontinuation (tl V1162) V1163 V1164) (cons (hd (hd V1162)) (append (tl (hd V1162)) (cons V1163 (cons NewContinuation ())))))) (true (shen.sys-error shen.call_the_continuation))))
197
197
 
198
- (defun shen.newcontinuation (V1141 V1142 V1143) (cond ((= () V1141) V1143) ((and (cons? V1141) (cons? (hd V1141))) (cons freeze (cons (cons (hd (hd V1141)) (append (tl (hd V1141)) (cons V1142 (cons (shen.newcontinuation (tl V1141) V1142 V1143) ())))) ()))) (true (shen.sys-error shen.newcontinuation))))
198
+ (defun shen.newcontinuation (V1165 V1166 V1167) (cond ((= () V1165) V1167) ((and (cons? V1165) (cons? (hd V1165))) (cons freeze (cons (cons (hd (hd V1165)) (append (tl (hd V1165)) (cons V1166 (cons (shen.newcontinuation (tl V1165) V1166 V1167) ())))) ()))) (true (shen.sys-error shen.newcontinuation))))
199
199
 
200
- (defun return (V1148 V1149 V1150) (shen.deref V1148 V1149))
200
+ (defun return (V1172 V1173 V1174) (shen.deref V1172 V1173))
201
201
 
202
- (defun shen.measure&return (V1155 V1156 V1157) (do (shen.prhush (shen.app (value shen.*infs*) " inferences
203
- " shen.a) (stoutput)) (shen.deref V1155 V1156)))
202
+ (defun shen.measure&return (V1179 V1180 V1181) (do (shen.prhush (shen.app (value shen.*infs*) " inferences
203
+ " shen.a) (stoutput)) (shen.deref V1179 V1180)))
204
204
 
205
- (defun unify (V1158 V1159 V1160 V1161) (shen.lzy= (shen.lazyderef V1158 V1160) (shen.lazyderef V1159 V1160) V1160 V1161))
205
+ (defun unify (V1182 V1183 V1184 V1185) (shen.lzy= (shen.lazyderef V1182 V1184) (shen.lazyderef V1183 V1184) V1184 V1185))
206
206
 
207
- (defun shen.lzy= (V1178 V1179 V1180 V1181) (cond ((= V1179 V1178) (thaw V1181)) ((shen.pvar? V1178) (bind V1178 V1179 V1180 V1181)) ((shen.pvar? V1179) (bind V1179 V1178 V1180 V1181)) ((and (cons? V1178) (cons? V1179)) (shen.lzy= (shen.lazyderef (hd V1178) V1180) (shen.lazyderef (hd V1179) V1180) V1180 (freeze (shen.lzy= (shen.lazyderef (tl V1178) V1180) (shen.lazyderef (tl V1179) V1180) V1180 V1181)))) (true false)))
207
+ (defun shen.lzy= (V1202 V1203 V1204 V1205) (cond ((= V1203 V1202) (thaw V1205)) ((shen.pvar? V1202) (bind V1202 V1203 V1204 V1205)) ((shen.pvar? V1203) (bind V1203 V1202 V1204 V1205)) ((and (cons? V1202) (cons? V1203)) (shen.lzy= (shen.lazyderef (hd V1202) V1204) (shen.lazyderef (hd V1203) V1204) V1204 (freeze (shen.lzy= (shen.lazyderef (tl V1202) V1204) (shen.lazyderef (tl V1203) V1204) V1204 V1205)))) (true false)))
208
208
 
209
- (defun shen.deref (V1183 V1184) (cond ((cons? V1183) (cons (shen.deref (hd V1183) V1184) (shen.deref (tl V1183) V1184))) (true (if (shen.pvar? V1183) (let Value (shen.valvector V1183 V1184) (if (= Value shen.-null-) V1183 (shen.deref Value V1184))) V1183))))
209
+ (defun shen.deref (V1207 V1208) (cond ((cons? V1207) (cons (shen.deref (hd V1207) V1208) (shen.deref (tl V1207) V1208))) (true (if (shen.pvar? V1207) (let Value (shen.valvector V1207 V1208) (if (= Value shen.-null-) V1207 (shen.deref Value V1208))) V1207))))
210
210
 
211
- (defun shen.lazyderef (V1185 V1186) (if (shen.pvar? V1185) (let Value (shen.valvector V1185 V1186) (if (= Value shen.-null-) V1185 (shen.lazyderef Value V1186))) V1185))
211
+ (defun shen.lazyderef (V1209 V1210) (if (shen.pvar? V1209) (let Value (shen.valvector V1209 V1210) (if (= Value shen.-null-) V1209 (shen.lazyderef Value V1210))) V1209))
212
212
 
213
- (defun shen.valvector (V1187 V1188) (<-address (<-address (value shen.*prologvectors*) V1188) (<-address V1187 1)))
213
+ (defun shen.valvector (V1211 V1212) (<-address (<-address (value shen.*prologvectors*) V1212) (<-address V1211 1)))
214
214
 
215
- (defun unify! (V1189 V1190 V1191 V1192) (shen.lzy=! (shen.lazyderef V1189 V1191) (shen.lazyderef V1190 V1191) V1191 V1192))
215
+ (defun unify! (V1213 V1214 V1215 V1216) (shen.lzy=! (shen.lazyderef V1213 V1215) (shen.lazyderef V1214 V1215) V1215 V1216))
216
216
 
217
- (defun shen.lzy=! (V1209 V1210 V1211 V1212) (cond ((= V1210 V1209) (thaw V1212)) ((and (shen.pvar? V1209) (not (shen.occurs? V1209 (shen.deref V1210 V1211)))) (bind V1209 V1210 V1211 V1212)) ((and (shen.pvar? V1210) (not (shen.occurs? V1210 (shen.deref V1209 V1211)))) (bind V1210 V1209 V1211 V1212)) ((and (cons? V1209) (cons? V1210)) (shen.lzy=! (shen.lazyderef (hd V1209) V1211) (shen.lazyderef (hd V1210) V1211) V1211 (freeze (shen.lzy=! (shen.lazyderef (tl V1209) V1211) (shen.lazyderef (tl V1210) V1211) V1211 V1212)))) (true false)))
217
+ (defun shen.lzy=! (V1233 V1234 V1235 V1236) (cond ((= V1234 V1233) (thaw V1236)) ((and (shen.pvar? V1233) (not (shen.occurs? V1233 (shen.deref V1234 V1235)))) (bind V1233 V1234 V1235 V1236)) ((and (shen.pvar? V1234) (not (shen.occurs? V1234 (shen.deref V1233 V1235)))) (bind V1234 V1233 V1235 V1236)) ((and (cons? V1233) (cons? V1234)) (shen.lzy=! (shen.lazyderef (hd V1233) V1235) (shen.lazyderef (hd V1234) V1235) V1235 (freeze (shen.lzy=! (shen.lazyderef (tl V1233) V1235) (shen.lazyderef (tl V1234) V1235) V1235 V1236)))) (true false)))
218
218
 
219
- (defun shen.occurs? (V1222 V1223) (cond ((= V1223 V1222) true) ((cons? V1223) (or (shen.occurs? V1222 (hd V1223)) (shen.occurs? V1222 (tl V1223)))) (true false)))
219
+ (defun shen.occurs? (V1246 V1247) (cond ((= V1247 V1246) true) ((cons? V1247) (or (shen.occurs? V1246 (hd V1247)) (shen.occurs? V1246 (tl V1247)))) (true false)))
220
220
 
221
- (defun identical (V1225 V1226 V1227 V1228) (shen.lzy== (shen.lazyderef V1225 V1227) (shen.lazyderef V1226 V1227) V1227 V1228))
221
+ (defun identical (V1249 V1250 V1251 V1252) (shen.lzy== (shen.lazyderef V1249 V1251) (shen.lazyderef V1250 V1251) V1251 V1252))
222
222
 
223
- (defun shen.lzy== (V1245 V1246 V1247 V1248) (cond ((= V1246 V1245) (thaw V1248)) ((and (cons? V1245) (cons? V1246)) (shen.lzy== (shen.lazyderef (hd V1245) V1247) (shen.lazyderef (hd V1246) V1247) V1247 (freeze (shen.lzy== (tl V1245) (tl V1246) V1247 V1248)))) (true false)))
223
+ (defun shen.lzy== (V1269 V1270 V1271 V1272) (cond ((= V1270 V1269) (thaw V1272)) ((and (cons? V1269) (cons? V1270)) (shen.lzy== (shen.lazyderef (hd V1269) V1271) (shen.lazyderef (hd V1270) V1271) V1271 (freeze (shen.lzy== (tl V1269) (tl V1270) V1271 V1272)))) (true false)))
224
224
 
225
- (defun shen.pvar (V1250) (cn "Var" (shen.app (<-address V1250 1) "" shen.a)))
225
+ (defun shen.pvar (V1274) (cn "Var" (shen.app (<-address V1274 1) "" shen.a)))
226
226
 
227
- (defun bind (V1251 V1252 V1253 V1254) (do (shen.bindv V1251 V1252 V1253) (let Result (thaw V1254) (do (shen.unbindv V1251 V1253) Result))))
227
+ (defun bind (V1275 V1276 V1277 V1278) (do (shen.bindv V1275 V1276 V1277) (let Result (thaw V1278) (do (shen.unbindv V1275 V1277) Result))))
228
228
 
229
- (defun fwhen (V1269 V1270 V1271) (cond ((= true V1269) (thaw V1271)) ((= false V1269) false) (true (simple-error (cn "fwhen expects a boolean: not " (shen.app V1269 "%" shen.s))))))
229
+ (defun fwhen (V1293 V1294 V1295) (cond ((= true V1293) (thaw V1295)) ((= false V1293) false) (true (simple-error (cn "fwhen expects a boolean: not " (shen.app V1293 "%" shen.s))))))
230
230
 
231
- (defun call (V1284 V1285 V1286) (cond ((cons? V1284) (shen.call-help (shen.m_prolog_to_s-prolog_predicate (shen.lazyderef (hd V1284) V1285)) (tl V1284) V1285 V1286)) (true false)))
231
+ (defun call (V1308 V1309 V1310) (cond ((cons? V1308) (shen.call-help (shen.m_prolog_to_s-prolog_predicate (shen.lazyderef (hd V1308) V1309)) (tl V1308) V1309 V1310)) (true false)))
232
232
 
233
- (defun shen.call-help (V1287 V1288 V1289 V1290) (cond ((= () V1288) (V1287 V1289 V1290)) ((cons? V1288) (shen.call-help (V1287 (hd V1288)) (tl V1288) V1289 V1290)) (true (shen.sys-error shen.call-help))))
233
+ (defun shen.call-help (V1311 V1312 V1313 V1314) (cond ((= () V1312) (V1311 V1313 V1314)) ((cons? V1312) (shen.call-help (V1311 (hd V1312)) (tl V1312) V1313 V1314)) (true (shen.sys-error shen.call-help))))
234
234
 
235
- (defun shen.intprolog (V1291) (cond ((and (cons? V1291) (cons? (hd V1291))) (let ProcessN (shen.start-new-prolog-process) (shen.intprolog-help (hd (hd V1291)) (shen.insert-prolog-variables (cons (tl (hd V1291)) (cons (tl V1291) ())) ProcessN) ProcessN))) (true (shen.sys-error shen.intprolog))))
235
+ (defun shen.intprolog (V1315) (cond ((and (cons? V1315) (cons? (hd V1315))) (let ProcessN (shen.start-new-prolog-process) (shen.intprolog-help (hd (hd V1315)) (shen.insert-prolog-variables (cons (tl (hd V1315)) (cons (tl V1315) ())) ProcessN) ProcessN))) (true (shen.sys-error shen.intprolog))))
236
236
 
237
- (defun shen.intprolog-help (V1292 V1293 V1294) (cond ((and (cons? V1293) (and (cons? (tl V1293)) (= () (tl (tl V1293))))) (shen.intprolog-help-help V1292 (hd V1293) (hd (tl V1293)) V1294)) (true (shen.sys-error shen.intprolog-help))))
237
+ (defun shen.intprolog-help (V1316 V1317 V1318) (cond ((and (cons? V1317) (and (cons? (tl V1317)) (= () (tl (tl V1317))))) (shen.intprolog-help-help V1316 (hd V1317) (hd (tl V1317)) V1318)) (true (shen.sys-error shen.intprolog-help))))
238
238
 
239
- (defun shen.intprolog-help-help (V1295 V1296 V1297 V1298) (cond ((= () V1296) (V1295 V1298 (freeze (shen.call-rest V1297 V1298)))) ((cons? V1296) (shen.intprolog-help-help (V1295 (hd V1296)) (tl V1296) V1297 V1298)) (true (shen.sys-error shen.intprolog-help-help))))
239
+ (defun shen.intprolog-help-help (V1319 V1320 V1321 V1322) (cond ((= () V1320) (V1319 V1322 (freeze (shen.call-rest V1321 V1322)))) ((cons? V1320) (shen.intprolog-help-help (V1319 (hd V1320)) (tl V1320) V1321 V1322)) (true (shen.sys-error shen.intprolog-help-help))))
240
240
 
241
- (defun shen.call-rest (V1301 V1302) (cond ((= () V1301) true) ((and (cons? V1301) (and (cons? (hd V1301)) (cons? (tl (hd V1301))))) (shen.call-rest (cons (cons ((hd (hd V1301)) (hd (tl (hd V1301)))) (tl (tl (hd V1301)))) (tl V1301)) V1302)) ((and (cons? V1301) (and (cons? (hd V1301)) (= () (tl (hd V1301))))) ((hd (hd V1301)) V1302 (freeze (shen.call-rest (tl V1301) V1302)))) (true (shen.sys-error shen.call-rest))))
241
+ (defun shen.call-rest (V1325 V1326) (cond ((= () V1325) true) ((and (cons? V1325) (and (cons? (hd V1325)) (cons? (tl (hd V1325))))) (shen.call-rest (cons (cons ((hd (hd V1325)) (hd (tl (hd V1325)))) (tl (tl (hd V1325)))) (tl V1325)) V1326)) ((and (cons? V1325) (and (cons? (hd V1325)) (= () (tl (hd V1325))))) ((hd (hd V1325)) V1326 (freeze (shen.call-rest (tl V1325) V1326)))) (true (shen.sys-error shen.call-rest))))
242
242
 
243
243
  (defun shen.start-new-prolog-process () (let IncrementProcessCounter (set shen.*process-counter* (+ 1 (value shen.*process-counter*))) (shen.initialise-prolog IncrementProcessCounter)))
244
244
 
245
- (defun shen.insert-prolog-variables (V1303 V1304) (shen.insert-prolog-variables-help V1303 (shen.flatten V1303) V1304))
245
+ (defun shen.insert-prolog-variables (V1327 V1328) (shen.insert-prolog-variables-help V1327 (shen.flatten V1327) V1328))
246
246
 
247
- (defun shen.insert-prolog-variables-help (V1309 V1310 V1311) (cond ((= () V1310) V1309) ((and (cons? V1310) (variable? (hd V1310))) (let V (shen.newpv V1311) (let XV/Y (subst V (hd V1310) V1309) (let Z-Y (remove (hd V1310) (tl V1310)) (shen.insert-prolog-variables-help XV/Y Z-Y V1311))))) ((cons? V1310) (shen.insert-prolog-variables-help V1309 (tl V1310) V1311)) (true (shen.sys-error shen.insert-prolog-variables-help))))
247
+ (defun shen.insert-prolog-variables-help (V1333 V1334 V1335) (cond ((= () V1334) V1333) ((and (cons? V1334) (variable? (hd V1334))) (let V (shen.newpv V1335) (let XV/Y (subst V (hd V1334) V1333) (let Z-Y (remove (hd V1334) (tl V1334)) (shen.insert-prolog-variables-help XV/Y Z-Y V1335))))) ((cons? V1334) (shen.insert-prolog-variables-help V1333 (tl V1334) V1335)) (true (shen.sys-error shen.insert-prolog-variables-help))))
248
248
 
249
- (defun shen.initialise-prolog (V1312) (let Vector (address-> (value shen.*prologvectors*) V1312 (shen.fillvector (vector 10) 1 10 shen.-null-)) (let Counter (address-> (value shen.*varcounter*) V1312 1) V1312)))
249
+ (defun shen.initialise-prolog (V1336) (let Vector (address-> (value shen.*prologvectors*) V1336 (shen.fillvector (vector 10) 1 10 shen.-null-)) (let Counter (address-> (value shen.*varcounter*) V1336 1) V1336)))
250
250
 
251
251
 
252
252