shen/release/k_lambda/track.kl in shen-ruby-0.9.0 vs shen/release/k_lambda/track.kl in shen-ruby-0.10.0
- old
+ new
@@ -45,59 +45,59 @@
* *
* For an explication of this license see www.shenlanguage.org/license.htm which *
* explains this license in full. *
* *
*****************************************************************************************
-"(defun shen.f_error (V2115) (do (shen.prhush (cn "partial function " (shen.app V2115 ";
-" shen.a)) (stoutput)) (do (if (and (not (shen.tracked? V2115)) (y-or-n? (cn "track " (shen.app V2115 "? " shen.a)))) (shen.track-function (ps V2115)) shen.ok) (simple-error "aborted"))))
+"(defun shen.f_error (V2122) (do (shen.prhush (cn "partial function " (shen.app V2122 ";
+" shen.a)) (stoutput)) (do (if (and (not (shen.tracked? V2122)) (y-or-n? (cn "track " (shen.app V2122 "? " shen.a)))) (shen.track-function (ps V2122)) shen.ok) (simple-error "aborted"))))
-(defun shen.tracked? (V2116) (element? V2116 (value shen.*tracking*)))
+(defun shen.tracked? (V2123) (element? V2123 (value shen.*tracking*)))
-(defun track (V2117) (let Source (ps V2117) (shen.track-function Source)))
+(defun track (V2124) (let Source (ps V2124) (shen.track-function Source)))
-(defun shen.track-function (V2118) (cond ((and (cons? V2118) (and (= defun (hd V2118)) (and (cons? (tl V2118)) (and (cons? (tl (tl V2118))) (and (cons? (tl (tl (tl V2118)))) (= () (tl (tl (tl (tl V2118)))))))))) (let KL (cons defun (cons (hd (tl V2118)) (cons (hd (tl (tl V2118))) (cons (shen.insert-tracking-code (hd (tl V2118)) (hd (tl (tl V2118))) (hd (tl (tl (tl V2118))))) ())))) (let Ob (eval KL) (let Tr (set shen.*tracking* (cons Ob (value shen.*tracking*))) Ob)))) (true (shen.sys-error shen.track-function))))
+(defun shen.track-function (V2125) (cond ((and (cons? V2125) (and (= defun (hd V2125)) (and (cons? (tl V2125)) (and (cons? (tl (tl V2125))) (and (cons? (tl (tl (tl V2125)))) (= () (tl (tl (tl (tl V2125)))))))))) (let KL (cons defun (cons (hd (tl V2125)) (cons (hd (tl (tl V2125))) (cons (shen.insert-tracking-code (hd (tl V2125)) (hd (tl (tl V2125))) (hd (tl (tl (tl V2125))))) ())))) (let Ob (eval-kl KL) (let Tr (set shen.*tracking* (cons Ob (value shen.*tracking*))) Ob)))) (true (shen.sys-error shen.track-function))))
-(defun shen.insert-tracking-code (V2119 V2120 V2121) (cons do (cons (cons set (cons shen.*call* (cons (cons + (cons (cons value (cons shen.*call* ())) (cons 1 ()))) ()))) (cons (cons do (cons (cons shen.input-track (cons (cons value (cons shen.*call* ())) (cons V2119 (cons (shen.cons_form V2120) ())))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons (cons let (cons Result (cons V2121 (cons (cons do (cons (cons shen.output-track (cons (cons value (cons shen.*call* ())) (cons V2119 (cons Result ())))) (cons (cons do (cons (cons set (cons shen.*call* (cons (cons - (cons (cons value (cons shen.*call* ())) (cons 1 ()))) ()))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons Result ()))) ()))) ()))) ())))) ()))) ()))) ()))))
+(defun shen.insert-tracking-code (V2126 V2127 V2128) (cons do (cons (cons set (cons shen.*call* (cons (cons + (cons (cons value (cons shen.*call* ())) (cons 1 ()))) ()))) (cons (cons do (cons (cons shen.input-track (cons (cons value (cons shen.*call* ())) (cons V2126 (cons (shen.cons_form V2127) ())))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons (cons let (cons Result (cons V2128 (cons (cons do (cons (cons shen.output-track (cons (cons value (cons shen.*call* ())) (cons V2126 (cons Result ())))) (cons (cons do (cons (cons set (cons shen.*call* (cons (cons - (cons (cons value (cons shen.*call* ())) (cons 1 ()))) ()))) (cons (cons do (cons (cons shen.terpri-or-read-char ()) (cons Result ()))) ()))) ()))) ())))) ()))) ()))) ()))))
(set shen.*step* false)
-(defun step (V2126) (cond ((= + V2126) (set shen.*step* true)) ((= - V2126) (set shen.*step* false)) (true (simple-error "step expects a + or a -.
+(defun step (V2133) (cond ((= + V2133) (set shen.*step* true)) ((= - V2133) (set shen.*step* false)) (true (simple-error "step expects a + or a -.
"))))
-(defun spy (V2131) (cond ((= + V2131) (set shen.*spy* true)) ((= - V2131) (set shen.*spy* false)) (true (simple-error "spy expects a + or a -.
+(defun spy (V2138) (cond ((= + V2138) (set shen.*spy* true)) ((= - V2138) (set shen.*spy* false)) (true (simple-error "spy expects a + or a -.
"))))
(defun shen.terpri-or-read-char () (if (value shen.*step*) (shen.check-byte (read-byte (value *stinput*))) (nl 1)))
-(defun shen.check-byte (V2136) (cond ((= V2136 (shen.hat)) (simple-error "aborted")) (true true)))
+(defun shen.check-byte (V2143) (cond ((= V2143 (shen.hat)) (simple-error "aborted")) (true true)))
-(defun shen.input-track (V2137 V2138 V2139) (do (shen.prhush (cn "
-" (shen.app (shen.spaces V2137) (cn "<" (shen.app V2137 (cn "> Inputs to " (shen.app V2138 (cn "
-" (shen.app (shen.spaces V2137) "" shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)) (shen.recursively-print V2139)))
+(defun shen.input-track (V2144 V2145 V2146) (do (shen.prhush (cn "
+" (shen.app (shen.spaces V2144) (cn "<" (shen.app V2144 (cn "> Inputs to " (shen.app V2145 (cn "
+" (shen.app (shen.spaces V2144) "" shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)) (shen.recursively-print V2146)))
-(defun shen.recursively-print (V2140) (cond ((= () V2140) (shen.prhush " ==>" (stoutput))) ((cons? V2140) (do (print (hd V2140)) (do (shen.prhush ", " (stoutput)) (shen.recursively-print (tl V2140))))) (true (shen.sys-error shen.recursively-print))))
+(defun shen.recursively-print (V2147) (cond ((= () V2147) (shen.prhush " ==>" (stoutput))) ((cons? V2147) (do (print (hd V2147)) (do (shen.prhush ", " (stoutput)) (shen.recursively-print (tl V2147))))) (true (shen.sys-error shen.recursively-print))))
-(defun shen.spaces (V2141) (cond ((= 0 V2141) "") (true (cn " " (shen.spaces (- V2141 1))))))
+(defun shen.spaces (V2148) (cond ((= 0 V2148) "") (true (cn " " (shen.spaces (- V2148 1))))))
-(defun shen.output-track (V2142 V2143 V2144) (shen.prhush (cn "
-" (shen.app (shen.spaces V2142) (cn "<" (shen.app V2142 (cn "> Output from " (shen.app V2143 (cn "
-" (shen.app (shen.spaces V2142) (cn "==> " (shen.app V2144 "" shen.s)) shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)))
+(defun shen.output-track (V2149 V2150 V2151) (shen.prhush (cn "
+" (shen.app (shen.spaces V2149) (cn "<" (shen.app V2149 (cn "> Output from " (shen.app V2150 (cn "
+" (shen.app (shen.spaces V2149) (cn "==> " (shen.app V2151 "" shen.s)) shen.a)) shen.a)) shen.a)) shen.a)) (stoutput)))
-(defun untrack (V2145) (eval (ps V2145)))
+(defun untrack (V2152) (eval (ps V2152)))
-(defun profile (V2146) (shen.profile-help (ps V2146)))
+(defun profile (V2153) (shen.profile-help (ps V2153)))
-(defun shen.profile-help (V2151) (cond ((and (cons? V2151) (and (= defun (hd V2151)) (and (cons? (tl V2151)) (and (cons? (tl (tl V2151))) (and (cons? (tl (tl (tl V2151)))) (= () (tl (tl (tl (tl V2151)))))))))) (let G (gensym shen.f) (let Profile (cons defun (cons (hd (tl V2151)) (cons (hd (tl (tl V2151))) (cons (shen.profile-func (hd (tl V2151)) (hd (tl (tl V2151))) (cons G (hd (tl (tl V2151))))) ())))) (let Def (cons defun (cons G (cons (hd (tl (tl V2151))) (cons (subst G (hd (tl V2151)) (hd (tl (tl (tl V2151))))) ())))) (let CompileProfile (shen.eval-without-macros Profile) (let CompileG (shen.eval-without-macros Def) (hd (tl V2151)))))))) (true (simple-error "Cannot profile.
+(defun shen.profile-help (V2158) (cond ((and (cons? V2158) (and (= defun (hd V2158)) (and (cons? (tl V2158)) (and (cons? (tl (tl V2158))) (and (cons? (tl (tl (tl V2158)))) (= () (tl (tl (tl (tl V2158)))))))))) (let G (gensym shen.f) (let Profile (cons defun (cons (hd (tl V2158)) (cons (hd (tl (tl V2158))) (cons (shen.profile-func (hd (tl V2158)) (hd (tl (tl V2158))) (cons G (hd (tl (tl V2158))))) ())))) (let Def (cons defun (cons G (cons (hd (tl (tl V2158))) (cons (subst G (hd (tl V2158)) (hd (tl (tl (tl V2158))))) ())))) (let CompileProfile (shen.eval-without-macros Profile) (let CompileG (shen.eval-without-macros Def) (hd (tl V2158)))))))) (true (simple-error "Cannot profile.
"))))
-(defun unprofile (V2152) (untrack V2152))
+(defun unprofile (V2159) (untrack V2159))
-(defun shen.profile-func (V2153 V2154 V2155) (cons let (cons Start (cons (cons get-time (cons run ())) (cons (cons let (cons Result (cons V2155 (cons (cons let (cons Finish (cons (cons - (cons (cons get-time (cons run ())) (cons Start ()))) (cons (cons let (cons Record (cons (cons shen.put-profile (cons V2153 (cons (cons + (cons (cons shen.get-profile (cons V2153 ())) (cons Finish ()))) ()))) (cons Result ())))) ())))) ())))) ())))))
+(defun shen.profile-func (V2160 V2161 V2162) (cons let (cons Start (cons (cons get-time (cons run ())) (cons (cons let (cons Result (cons V2162 (cons (cons let (cons Finish (cons (cons - (cons (cons get-time (cons run ())) (cons Start ()))) (cons (cons let (cons Record (cons (cons shen.put-profile (cons V2160 (cons (cons + (cons (cons shen.get-profile (cons V2160 ())) (cons Finish ()))) ()))) (cons Result ())))) ())))) ())))) ())))))
-(defun profile-results (V2156) (let Results (shen.get-profile V2156) (let Initialise (shen.put-profile V2156 0) (@p V2156 Results))))
+(defun profile-results (V2163) (let Results (shen.get-profile V2163) (let Initialise (shen.put-profile V2163 0) (@p V2163 Results))))
-(defun shen.get-profile (V2157) (trap-error (get V2157 profile (value *property-vector*)) (lambda E 0)))
+(defun shen.get-profile (V2164) (trap-error (get V2164 profile (value *property-vector*)) (lambda E 0)))
-(defun shen.put-profile (V2158 V2159) (put V2158 profile V2159 (value *property-vector*)))
+(defun shen.put-profile (V2165 V2166) (put V2165 profile V2166 (value *property-vector*)))