Skip to content

Instantly share code, notes, and snippets.

@otabat
Created April 18, 2017 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otabat/3b91d715ed47ddfaef26f602bc0f6614 to your computer and use it in GitHub Desktop.
Save otabat/3b91d715ed47ddfaef26f602bc0f6614 to your computer and use it in GitHub Desktop.
Shen-C test result
$ make repl
bin/shen-c
Shen, copyright (C) 2010-2015 Mark Tarver
www.shenlanguage.org, Shen 19.3.1
running under C, implementation: C
port 0.1 ported by Tatsuya Tsuda
(0-) (cd "test/shen")
"test/shen/"
(1-) (load "README.shen")
reset
test-harness.exec-macro
test-harness.rcons
passed
failed
test-harness.err
test-harness.report-results-macro
test-harness.create-tests
test-harness.results
run time: 4.005225 secs
loaded
(2-) (load "tests.shen")
10000000000
prolog-tests: (load "prolog.shen") = loadedf
g
mem
app
rev
enjoys
enjoys
fads
fads
prop
prop
proph
consistent
app
mem
mapit
consit
different
~
likes
tall
pretty
run time: 12.106592 secs
run time: 12.106988 secs
passed
prolog-tests: (shen.f1255 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.000222999999998308 secs
passed
prolog-tests: (shen.f1250 (shen.start-new-prolog-process) (freeze true)) = false
run time: 0.000247000000001663 secs
passed
prolog-tests: (shen.f1245 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.000261999999999318 secs
passed
prolog-tests: (shen.f1240 (shen.start-new-prolog-process) (freeze true)) = 1
run time: 0.000373000000003287 secs
passed
prolog-tests: (shen.f1235 (shen.start-new-prolog-process) (freeze true)) = [2 1]
run time: 0.00107200000000063 secs
passed
prolog-tests: (load "einstein.shen") = loadedeinsteins_riddle
einstein
member
next_to
iright
run time: 3.761922 secs
run time: 3.76227799999999 secs
passed
prolog-tests: (shen.f1230 (shen.start-new-prolog-process) (freeze true)) = german
run time: 50.835 secs
passed
prolog-tests: (shen.f1225 (shen.start-new-prolog-process) (freeze true)) = chocolate
run time: 0.000480999999993514 secs
passed
prolog-tests: (shen.f1220 (shen.start-new-prolog-process) (freeze true)) = chocolate
run time: 0.000490999999996689 secs
passed
prolog-tests: (shen.f1215 (shen.start-new-prolog-process) (freeze true)) = [tea chocolate]
run time: 0.0015160000000094 secs
passed
prolog-tests: (shen.f1210 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.00491700000000606 secs
passed
prolog-tests: (shen.f1205 (shen.start-new-prolog-process) (freeze true)) = [[1 1] [1 2] [1 3]]
run time: 0.00216199999999844 secs
passed
prolog-tests: (shen.f1200 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.00234399999999368 secs
passed
prolog-tests: (shen.f1195 (shen.start-new-prolog-process) (freeze true)) = false
run time: 0.00229799999999614 secs
passed
prolog-tests: (shen.f1190 (shen.start-new-prolog-process) (freeze true)) = mary
run time: 0.000383999999996831 secs
passed
prolog-tests: (load "parse.prl") = loadedpparse
parsing
member
run time: 2.689865 secs
run time: 2.690217 secs
passed
prolog-tests: (shen.f1185 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.0415030000000058 secs
passed
passed ... 18
failed ...0
pass rate ...100%
ok
FPQi chapter 4: (load "cartprod.shen") = loadedcartesian-product
all-pairs-using-X
run time: 0.234179000000012 secs
run time: 0.2346 secs
passed
FPQi chapter 4: (cartesian-product (cons 1 (cons 2 (cons 3 ()))) (cons 1 (cons 2 (cons 3 ())))) = [[1 1] [1 2] [1 3] [2 1] [2 2] [2 3] [3 1] [3 2] [3 3]]
run time: 0.000191999999998416 secs
passed
FPQi chapter 4: (load "powerset.shen") = loadedpowerset
cons-X-to-each-set
run time: 0.250749999999996 secs
run time: 0.251191999999989 secs
passed
FPQi chapter 4: (powerset (cons 1 (cons 2 (cons 3 ())))) = [[1 2 3] [1 2] [1 3] [1] [2 3] [2] [3] []]
run time: 0.000169999999997117 secs
passed
passed ... 22
failed ...0
pass rate ...100%
ok
0
FPQi chapter 5: (load "bubble version 1.shen") = loadedbubble-sort
bubble
bubble-again-perhaps
run time: 0.344547000000006 secs
run time: 0.344998000000004 secs
passed
FPQi chapter 5: (bubble-sort (cons 1 (cons 2 (cons 3 ())))) = [3 2 1]
run time: 0.000208000000000652 secs
passed
FPQi chapter 5: (load "bubble version 2.shen") = loadedbubble-sort
bubble
run time: 0.215428000000003 secs
run time: 0.215877000000006 secs
passed
FPQi chapter 5: (bubble-sort (cons 1 (cons 2 (cons 3 ())))) = [3 2 1]
run time: 0.000158000000013203 secs
passed
FPQi chapter 5: (load "spreadsheet.shen") = loadedassess-spreadsheet
assign-fixed-values
assign-cell-value
fixed-value?
get'
get-row
get-cell
run time: 1.57204 secs
run time: 1.572418 secs
passed
FPQi chapter 5: (assess-spreadsheet (cons (cons jim (cons (cons wages (cons (lambda Spreadsheet (get' frank wages Spreadsheet)) ())) (cons (cons tax (cons (lambda Spreadsheet (* (get' frank tax Spreadsheet) 0.8)) ())) ()))) (cons (cons frank (cons (cons wages (cons 20000 ())) (cons (cons tax (cons (lambda Spreadsheet (* 0.25 (get' frank wages Spreadsheet))) ())) ()))) ()))) = [[jim [wages 20000] [tax 4000.0]] [frank [wages 20000] [tax 5000.0]]]
run time: 0.0178899999999942 secs
passed
passed ... 28
failed ...0
pass rate ...100%
ok
FPQi chapter 3: (load "prime.shen") = loadedprime?
prime*
run time: 0.214612000000002 secs
run time: 0.215097 secs
passed
FPQi chapter 3: (prime? 1000003) = true
run time: 48.388361 secs
passed
FPQi chapter 3: (load "mutual.shen") = loadedeven?
odd?
run time: 0.135438999999991 secs
run time: 0.135889999999989 secs
passed
FPQi chapter 3: (even? 56) = true
run time: 0.000217999999989615 secs
passed
FPQi chapter 3: (odd? 77) = true
run time: 0.000309999999984711 secs
passed
FPQi chapter 3: (load "change.shen") = loadedcount-change
count-change*
next-denom
run time: 0.462835999999982 secs
run time: 0.463216999999986 secs
passed
FPQi chapter 3: (count-change 100) = 4563
run time: 3.38090800000001 secs
passed
passed ... 35
failed ...0
pass rate ...100%
ok
FPQi chapter 6: (load "semantic net.shen") = loadedquery
belongs?
spread-activation
accessible-from
is_links
type_links
assert
get-prop
clear
run time: 0.973582000000022 secs
run time: 0.974028000000004 secs
passed
FPQi chapter 6: (clear Mark_Tarver) = []
run time: 0.00110100000000557 secs
passed
FPQi chapter 6: (clear man) = []
run time: 0.000499000000019123 secs
passed
FPQi chapter 6: (assert (cons Mark_Tarver (cons is_a (cons man ())))) = [man]
run time: 0.000943000000006577 secs
passed
FPQi chapter 6: (assert (cons man (cons type_of (cons human ())))) = [human]
run time: 0.000421000000017102 secs
passed
FPQi chapter 6: (query (cons is (cons Mark_Tarver (cons human ())))) = yes
run time: 0.00456299999999032 secs
passed
passed ... 41
failed ...0
pass rate ...100%
ok
FPQi chapter 7: (load "proplog version 1.shen") = loadedbackchain
backchain*
run time: 0.679889000000003 secs
run time: 0.68032199999999 secs
passed
FPQi chapter 7: (backchain q (cons (cons q (cons <= (cons p ()))) (cons (cons q (cons <= (cons r ()))) (cons (cons r (cons <= ())) ())))) = proved
run time: 0.000312999999977137 secs
passed
FPQi chapter 7: (backchain q (cons (cons q (cons <= (cons p ()))) (cons (cons q (cons <= (cons r ()))) ()))) = ...
run time: 0.000247999999999138 secs
passed
FPQi chapter 7: (load "proplog version 2.shen") = loadedbackchain
backchain*
run time: 0.685827999999987 secs
run time: 0.686260000000004 secs
passed
FPQi chapter 7: (backchain q (cons (cons q (cons <= (cons p ()))) (cons (cons q (cons <= (cons r ()))) (cons r ())))) = true
run time: 0.000312999999977137 secs
passed
FPQi chapter 7: (backchain q (cons (cons q (cons <= (cons p ()))) (cons (cons q (cons <= (cons r ()))) ()))) = false
run time: 0.000275999999985288 secs
passed
passed ... 47
failed ...0
pass rate ...100%
ok
FPQi chapter 8: (load "metaprog.shen") = loadedparse
parsed?
output_parse
generate_parser
parenthesise_rules
parenthesise_rules1
group_rules
group_rules1
place_in_group
belongs-in?
compile_rules
lex?
generate_code_for_nonlex
mapapp
get_characteristic_non_terminal
gcfn_help
apply_expansion
ae_help
generate_code_for_lex
gcfl_help
run time: 2.92177600000002 secs
run time: 2.92221600000002 secs
passed
FPQi chapter 8: (generate_parser (cons sent (cons --> (cons np (cons vp (cons np (cons --> (cons name (cons np (cons --> (cons det (cons n (cons name (cons --> (cons "John" (cons name (cons --> (cons "Bill" (cons name (cons --> (cons "Tom" (cons det (cons --> (cons "the" (cons det (cons --> (cons "a" (cons det (cons --> (cons "that" (cons det (cons --> (cons "this" (cons n (cons --> (cons "girl" (cons n (cons --> (cons "ball" (cons vp (cons --> (cons vtrans (cons np (cons vp (cons --> (cons vintrans (cons vtrans (cons --> (cons "kicks" (cons vtrans (cons --> (cons "likes" (cons vintrans (cons --> (cons "jumps" (cons vintrans (cons --> (cons "flies" ())))))))))))))))))))))))))))))))))))))))))))))))))))))))))) = [sent np name det n vp vtrans vintrans]
run time: 0.910590999999982 secs
passed
passed ... 49
failed ...0
pass rate ...100%
ok
chapter 11: (load "binary.shen") = loadedtype#binary
complement
run time: 6.49839 secs
run time: 6.49873199999999 secs
passed
chapter 11: (complement (cons 1 (cons 0 ()))) = [0 1]
run time: 3.79999999893244e-05 secs
passed
chapter 11: (load "streams.shen") = loadedtype#progression
delay
force
end?
run time: 8.03263699999999 secs
run time: 8.03304799999998 secs
passed
chapter 11: (fst (delay (@p 0 (@p (+ 1) (lambda X false))))) = 1
run time: 0.000109000000009019 secs
passed
passed ... 53
failed ...0
pass rate ...100%
ok
strings: (load "strings.shen") = loadedsubst-string
subst-string'
rwilli
strlen
trim-string-left
trim-string-right
trim-string
reverse-string
alldigits?
digit?
run time: 1.88071100000002 secs
run time: 1.88112900000002 secs
passed
strings: (subst-string "a" "b" "cba") = "caa"
run time: 0.000108000000011543 secs
passed
strings: (strlen "123") = 3
run time: 3.90000000152213e-05 secs
passed
strings: (trim-string-left (cons " " ()) " hi ") = "hi "
run time: 6.00000000190448e-05 secs
passed
strings: (trim-string-right (cons " " ()) " hi ") = " hi"
run time: 0.000149999999990769 secs
passed
strings: (trim-string (cons " " ()) " hi ") = "hi"
run time: 0.000168000000002166 secs
passed
strings: (reverse-string "abc") = "cba"
run time: 4.9999999987449e-05 secs
passed
strings: (alldigits? "123") = true
run time: 0.000158999999996468 secs
passed
passed ... 61
failed ...0
pass rate ...100%
ok
calculator.shen - chapter 11: (load "calculator.shen") = loadedtype#arith-expr
do-calculation
run time: 10.488282 secs
run time: 10.488643 secs
passed
calculator.shen - chapter 11: (do-calculation (cons (cons num (cons 12 ())) (cons + (cons (cons (cons num (cons 7 ())) (cons * (cons (cons num (cons 4 ())) ()))) ())))) = 40
run time: 0.000182999999992717 secs
passed
passed ... 63
failed ...0
pass rate ...100%
ok
structures 1 - chapter 12: (load "structures-untyped.shen") = loadeddefstruct
selectors
selector
constructor
params
make-association-list
recognisor
run time: 1.41408000000001 secs
run time: 1.41455000000002 secs
passed
structures 1 - chapter 12: (defstruct ship (cons length (cons name ()))) = ship
run time: 0.328916000000021 secs
passed
structures 1 - chapter 12: (make-ship 200 "Mary Rose") = [[structure | ship] [length | 200] [name | "Mary Rose"]]
run time: 2.39999999962492e-05 secs
passed
structures 1 - chapter 12: (ship-length (make-ship 200 "Mary Rose")) = 200
run time: 7.39999999836982e-05 secs
passed
structures 1 - chapter 12: (ship-name (make-ship 200 "Mary Rose")) = "Mary Rose"
run time: 6.5000000006421e-05 secs
passed
passed ... 68
failed ...0
pass rate ...100%
ok
structures 2 - chapter 12: (load "structures-typed.shen") = loadeddefstruct
selector-types
recognisor-type
constructor-type
assemble-type
defstruct
selectors
selector
constructor
params
make-association-list
recognisor
run time: 2.821978 secs
run time: 2.82236999999998 secs
passed
structures 2 - chapter 12: (defstruct ship (cons (@p length number) (cons (@p name string) ()))) = ship
run time: 0.955816999999996 secs
passed
structures 2 - chapter 12: (make-ship 200 "Mary Rose") = [[structure | ship] [length | 200] [name | "Mary Rose"]]
run time: 3.70000000202708e-05 secs
passed
structures 2 - chapter 12: (ship-length (make-ship 200 "Mary Rose")) = 200
run time: 5.89999999931479e-05 secs
passed
structures 2 - chapter 12: (ship-name (make-ship 200 "Mary Rose")) = "Mary Rose"
run time: 7.39999999836982e-05 secs
passed
passed ... 73
failed ...0
pass rate ...100%
ok
classes 1 - chapter 12: (load "classes-untyped.shen") = loadeddefclass
make-instance
get-value
get-value-test
has-value?
has-value-test
has-attribute?
change-value
instance-of
run time: 1.97108299999999 secs
run time: 1.97154699999999 secs
passed
classes 1 - chapter 12: (defclass ship (cons length (cons name ()))) = ship
run time: 0.000304999999997335 secs
passed
classes 1 - chapter 12: (set s (make-instance ship)) = [[class | ship] [length | fail] [name | fail]]
run time: 0.00025200000001746 secs
passed
classes 1 - chapter 12: (has-value? length (value s)) = false
run time: 5.10000000133459e-05 secs
passed
classes 1 - chapter 12: (set s (change-value (value s) length 100)) = [[class | ship] [length | 100] [name | fail]]
run time: 5.00000000158707e-05 secs
passed
classes 1 - chapter 12: (get-value length (value s)) = 100
run time: 5.29999999798747e-05 secs
passed
passed ... 79
failed ...0
pass rate ...100%
ok
classes 2 - chapter 12: (load "classes-typed.shen") = loadeddefclass
defclass
axiom
record-attribute-types
make-instance
make-instance
get-value
get-value
get-value-test
has-value?
has-value?
has-value-test
has-attribute?
has-attribute?
change-value
change-value
instance-of
instance-of
run time: 4.10705200000001 secs
run time: 4.107484 secs
passed
classes 2 - chapter 12: (defclass ship (cons (@p length number) (cons (@p name string) ()))) = ship
run time: 2.98982699999999 secs
passed
classes 2 - chapter 12: (has-value? length (make-instance ship)) = false
run time: 0.000292000000001735 secs
passed
classes 2 - chapter 12: (change-value (make-instance ship) length 100) = [[class | ship] [length | 100] [name | fail]]
run time: 0.000286999999985937 secs
passed
classes 2 - chapter 12: (get-value length (change-value (make-instance ship) length 100)) = 100
run time: 0.000338999999996759 secs
passed
passed ... 84
failed ...0
pass rate ...100%
ok
abstract datatypes - chapter 12: (load "stack.shen") = loadedempty-stack
push
top
pop
empty-stack
push
top
pop
run time: 1.17276700000002 secs
run time: 1.17316599999998 secs
passed
abstract datatypes - chapter 12: (top (push 0 (empty-stack _))) = 0
run time: 2.90000000120472e-05 secs
passed
passed ... 86
failed ...0
pass rate ...100%
ok
yacc: (load "yacc.shen") = loadedwarning: <np> <vp> has no semantics.
<sent>
warning: the has no semantics.
warning: a has no semantics.
<det>
warning: <det> <n> has no semantics.
warning: <name1> has no semantics.
<np>
warning: cat has no semantics.
warning: dog has no semantics.
<n>
<name1>
warning: <vtrans> <np> has no semantics.
<vp>
warning: likes has no semantics.
warning: chases has no semantics.
<vtrans>
<des>
warning: d <ds> has no semantics.
warning: d has no semantics.
<ds>
warning: e <es> has no semantics.
warning: e has no semantics.
<es>
<sent'>
question
<as->bs>
<find-digit>
warning: X <morestuff> has no semantics.
warning: X has no semantics.
<morestuff>
warning: 0 has no semantics.
warning: 1 has no semantics.
warning: 2 has no semantics.
warning: 3 has no semantics.
warning: 4 has no semantics.
warning: 5 has no semantics.
warning: 6 has no semantics.
warning: 7 has no semantics.
warning: 8 has no semantics.
warning: 9 has no semantics.
<digit>
warning: <digit> <morestuff> has no semantics.
<find-digit'>
warning: <as> <bs> <cs> has no semantics.
<asbscs>
warning: a <as> has no semantics.
warning: a has no semantics.
<as>
warning: b <bs> has no semantics.
warning: b has no semantics.
warning: <e> has no semantics.
<bs>
warning: c <cs> has no semantics.
warning: c has no semantics.
<cs>
warning: <as> <bs'> <cs> has no semantics.
<asbs'cs>
warning: b <bs'> has no semantics.
warning: b has no semantics.
warning: <e> has no semantics.
<bs'>
<find-digit''>
<digit''>
<anbncn>
warning: a <as> has no semantics.
warning: a has no semantics.
<as>
warning: b <bs> has no semantics.
warning: b has no semantics.
<bs>
warning: c <cs> has no semantics.
warning: c has no semantics.
<cs>
equal-length?
appendall
<a*s>
warning: [cons b []] b has no semantics.
<b*>
warning: c has no semantics.
<c*>
<d*>
run time: 7.25741600000001 secs
run time: 7.25783200000001 secs
passed
yacc: (compile (function <sent>) (cons the (cons cat (cons likes (cons the (cons dog ()))))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [the cat likes the dog]
run time: 0.000692999999984067 secs
passed
yacc: (compile (function <sent>) (cons the (cons cat (cons likes (cons the (cons canary ()))))) (lambda E (fail))) = ...
run time: 0.000417999999996255 secs
passed
yacc: (compile (function <asbscs>) (cons a (cons a (cons a (cons b (cons b (cons c ())))))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [a a a b b c]
run time: 0.00560100000001285 secs
passed
yacc: (compile (function <find-digit>) (cons a (cons v (cons f (cons g (cons 6 (cons y (cons u ()))))))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [6]
run time: 0.00621200000000499 secs
passed
yacc: (compile (function <vp>) (cons chases (cons the (cons cat ()))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [chases the cat]
run time: 0.00518099999999322 secs
passed
yacc: (compile (function <des>) (cons (cons d ()) (cons (cons e (cons e ())) ())) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [d e e]
run time: 0.00519500000001472 secs
passed
yacc: (compile (function <sent'>) (cons the (cons cat (cons likes (cons the (cons dog ()))))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [is it true that your father likes the dog ?]
run time: 0.000551999999998998 secs
passed
yacc: (compile (function <as>) (cons a (cons a (cons a ()))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [a a a]
run time: 0.000245000000006712 secs
passed
yacc: (compile (function <find-digit'>) (cons a (cons v (cons f (cons g (cons 6 (cons y (cons u ()))))))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [6 y u]
run time: 0.0015329999999949 secs
passed
yacc: (compile (function <asbs'cs>) (cons a (cons v (cons f (cons g (cons 6 (cons y (cons u ()))))))) (lambda E (fail))) = ...
run time: 0.00537899999997649 secs
passed
yacc: (compile (function <find-digit''>) (cons a (cons v (cons f (cons g (cons 6 (cons y (cons u ()))))))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = 6
run time: 0.00638499999999453 secs
passed
yacc: (compile (function <anbncn>) (cons a (cons a (cons a (cons b (cons b (cons b (cons c (cons c (cons c ()))))))))) (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
" shen.s))) (simple-error "parse error
")))) = [a a a b b b c c c]
run time: 0.00550000000001205 secs
passed
passed ... 99
failed ...0
pass rate ...100%
ok
[]
true
N Queens: (preclude-all-but ()) = []
run time: 0.000106999999985646 secs
passed
N Queens: (tc +) = true
run time: 1.49999999905504e-05 secs
passed
N Queens: (load "n queens.shen") = loaded
n-queens : (number --> (list (list number)))
initialise : (number --> (list number))
n-queens-loop : (number --> ((list number) --> (list (list number))))
all_Ns? : (number --> ((list number) --> boolean))
next_n : (number --> ((list number) --> (list number)))
ok_row? : ((list number) --> boolean)
ok_diag? : ((list number) --> boolean)
ok_diag_N? : (number --> (number --> ((list number) --> boolean)))
run time: 5.78322199999999 secs
typechecked in 115553 inferences
run time: 5.78404499999999 secs
passed
N Queens: (n-queens 5) = [[4 2 5 3 1] [3 5 2 4 1] [5 3 1 4 2] [4 1 3 5 2] [5 2 4 1 3] [1 4 2 5 3] [2 5 3 1 4] [1 3 5 2 4] [3 1 4 2 5] [2 4 1 3 5]]
run time: 0.349588000000011 secs
passed
N Queens: (tc -) = false
run time: 1.60000000164473e-05 secs
passed
passed ... 104
failed ...0
pass rate ...100%
ok
search: (tc +) = true
run time: 2.10000000038235e-05 secs
passed
search: (load "search.shen") = loaded
breadth-first : (state --> ((state --> (list state)) --> ((state --> boolean) --> boolean)))
b* : ((state --> (list state)) --> ((state --> boolean) --> ((list state) --> boolean)))
some : ((A --> boolean) --> ((list A) --> boolean))
depth : (state --> ((state --> (list state)) --> ((state --> boolean) --> boolean)))
d* : ((state --> (list state)) --> ((state --> boolean) --> ((list state) --> boolean)))
hill : ((state --> number) --> (state --> ((state --> (list state)) --> ((state --> boolean) --> boolean))))
h* : ((state --> number) --> ((state --> (list state)) --> ((state --> boolean) --> ((list state) --> boolean))))
order_states : ((state --> number) --> ((list state) --> (list state)))
sort : ((A --> (A --> boolean)) --> ((list A) --> (list A)))
sort* : ((A --> (A --> boolean)) --> ((list A) --> (list A)))
run time: 9.94184700000002 secs
typechecked in 119559 inferences
run time: 9.94275199999998 secs
passed
search: (tc -) = false
run time: 1.69999999855008e-05 secs
passed
passed ... 107
failed ...0
pass rate ...100%
ok
whist - chapter 11: (tc +) = true
run time: 1.69999999855008e-05 secs
passed
whist - chapter 11: (load "whist.shen") = loaded
type#rank : symbol
type#suit : symbol
type#lead : symbol
whist : (lead --> string)
deck : (A --> (list (rank * suit)))
cartprod : ((list A) --> ((list B) --> (list (A * B))))
deal-whist : (number --> ((list (rank * suit)) --> (((list (rank * suit)) * (list (rank * suit))) --> ((list (rank * suit)) * (list (rank * suit))))))
deal-card : ((list (rank * suit)) --> (rank * suit))
random : (A --> A)
whist-loop : (((list (rank * suit)) * (list (rank * suit))) --> (number --> (number --> (lead --> string))))
determine-legal : ((rank * suit) --> ((rank * suit) --> ((list (rank * suit)) --> (rank * suit))))
legal? : ((rank * suit) --> ((rank * suit) --> ((list (rank * suit)) --> boolean)))
void-of-suit? : (suit --> ((list (rank * suit)) --> boolean))
same-suit : ((list (rank * suit)) --> (suit --> (list (rank * suit))))
determine-winner : ((rank * suit) --> ((rank * suit) --> (lead --> lead)))
return-winner : (lead --> lead)
game-over? : (((list (rank * suit)) * (list (rank * suit))) --> boolean)
play-computer-lead : ((list (rank * suit)) --> (rank * suit))
computer-shows : ((rank * suit) --> (rank * suit))
map-rank : (rank --> string)
map-suit : (suit --> string)
select-highest : ((list (rank * suit)) --> (rank * suit))
select-highest-help : ((rank * suit) --> ((list (rank * suit)) --> (rank * suit)))
higher? : ((rank * suit) --> ((rank * suit) --> boolean))
play-computer-follow : ((list (rank * suit)) --> ((rank * suit) --> (rank * suit)))
sort : ((A --> (A --> boolean)) --> ((list A) --> (list A)))
sort-help : ((A --> (A --> boolean)) --> ((list A) --> (list A)))
select-higher : ((rank * suit) --> ((list (rank * suit)) --> (rank * suit)))
select-lowest : ((list (rank * suit)) --> (rank * suit))
select-lowest-help : ((rank * suit) --> ((list (rank * suit)) --> (rank * suit)))
lower? : ((rank * suit) --> ((rank * suit) --> boolean))
play-player : ((list (rank * suit)) --> (rank * suit))
show-cards : (number --> ((list (rank * suit)) --> string))
in-range? : (number --> ((list (rank * suit)) --> boolean))
run time: 35.363438 secs
typechecked in 132016 inferences
run time: 35.364314 secs
passed
whist - chapter 11: (tc -) = false
run time: 1.9000000008873e-05 secs
passed
passed ... 110
failed ...0
pass rate ...100%
ok
Qi interpreter - chapter 13: (tc +) = true
run time: 1.80000000113978e-05 secs
passed
Qi interpreter - chapter 13: (load "interpreter.shen") = loaded
type#num : symbol
type#primitive_object : symbol
type#pattern : symbol
type#l_formula : symbol
l_interpreter : (A --> B)
read_eval_print_loop : (string --> A)
normal_form : (l_formula --> l_formula)
==>> : (l_formula --> l_formula)
eval_error? : (l_formula --> boolean)
successor : (A --> l_formula)
predecessor : (A --> l_formula)
sub : ((list (pattern * l_formula)) --> (l_formula --> l_formula))
match : (pattern --> (l_formula --> (list (pattern * l_formula))))
no_match? : ((list (pattern * l_formula)) --> boolean)
replace : (pattern --> (l_formula --> (l_formula --> l_formula)))
free? : (pattern --> (pattern --> boolean))
run time: 341.35488 secs
typechecked in 428034 inferences
run time: 341.355681 secs
passed
Qi interpreter - chapter 13: (tc -) = false
run time: 1.79999999545544e-05 secs
passed
passed ... 113
failed ...0
pass rate ...100%
ok
proof assistant - chapter 15: (tc +) = true
run time: 1.89999999520296e-05 secs
passed
proof assistant - chapter 15: (load "proof assistant.shen") = loaded
type#globals : symbol
proof-assistant : (A --> symbol)
input-assumptions : (number --> (list wff))
input-conclusion : (A --> wff)
proof-loop : ((list ((list wff) * wff)) --> ((list ((list ((list wff) * wff)) * ((list ((list wff) * wff)) --> (list ((list wff) * wff))))) --> (list ((list ((list wff) * wff)) * ((list ((list wff) * wff)) --> (list ((list wff) * wff)))))))
show-proof : (string --> symbol)
show-proof-help : ((list ((list ((list wff) * wff)) * ((list ((list wff) * wff)) --> (list ((list wff) * wff))))) --> (number --> symbol))
show-sequent : ((list ((list wff) * wff)) --> (number --> symbol))
enumerate : ((list A) --> (number --> symbol))
user-directive : (A --> ((list ((list wff) * wff)) --> (list ((list wff) * wff))))
back : ((list ((list wff) * wff)) --> (list ((list wff) * wff)))
go-back : ((list ((list ((list wff) * wff)) * ((list ((list wff) * wff)) --> (list ((list wff) * wff))))) --> (list ((list wff) * wff)))
run time: 10.414336 secs
typechecked in 432369 inferences
run time: 10.415113 secs
passed
proof assistant - chapter 15: (tc -) = false
run time: 1.7000000070766e-05 secs
passed
passed ... 116
failed ...0
pass rate ...100%
ok
quantifier machine: (tc +) = true
run time: 2.50000000505679e-05 secs
passed
quantifier machine: (load "qmachine.shen") = loadedwarning: changing the type of push may create errors
type#progression : symbol
force : ((progression A) --> A)
delay : ((progression A) --> (progression A))
end? : ((progression A) --> boolean)
push : (A --> ((progression A) --> (progression A)))
forall : ((progression A) --> ((A --> boolean) --> boolean))
exists : ((progression A) --> ((A --> boolean) --> boolean))
super : ((progression A) --> ((A --> B) --> ((B --> (C --> C)) --> (C --> C))))
forall : ((progression A) --> ((A --> boolean) --> boolean))
exists : ((progression A) --> ((A --> boolean) --> boolean))
for : ((progression A) --> ((A --> B) --> number))
progn : (A --> (B --> B))
filter : ((progression A) --> ((A --> boolean) --> (list A)))
next-prime : (number --> number)
prime? : (number --> boolean)
prime-help : (number --> (number --> (number --> boolean)))
run time: 20.9685030000001 secs
typechecked in 436256 inferences
run time: 20.969464 secs
passed
quantifier machine: (exists (cons 1 (cons (+ 1) (cons (= 100) ()))) (> 50)) = true
run time: 0.00287200000002485 secs
passed
quantifier machine: (tc -) = false
run time: 1.89999999520296e-05 secs
passed
passed ... 120
failed ...0
pass rate ...100%
ok
depth first search: (tc +) = true
run time: 3.40000000278451e-05 secs
passed
depth first search: (load "depth'.shen") = loaded
depth' : (A --> ((A --> (list A)) --> ((A --> boolean) --> ((A --> boolean) --> (list A)))))
depth-help' : ((list A) --> ((A --> (list A)) --> ((A --> boolean) --> ((A --> boolean) --> ((list A) --> (list A))))))
run time: 3.59009100000003 secs
typechecked in 437909 inferences
run time: 3.59099399999991 secs
passed
depth first search: (depth' 4 (lambda X (cons (+ X 3) (cons (+ X 4) (cons (+ X 5) ())))) (lambda X (= X 27)) (lambda X (> X 27))) = [4 7 10 13 16 19 22 27]
run time: 0.000480000000038672 secs
passed
depth first search: (depth' 4 (lambda X (cons (+ X 3) ())) (lambda X (= X 27)) (lambda X (> X 27))) = []
run time: 0.000435000000038599 secs
passed
depth first search: (tc -) = false
run time: 1.69999999570791e-05 secs
passed
passed ... 125
failed ...0
pass rate ...100%
ok
Lisp type checker: (load "TinyTypes.shen") = loadeddefun
lambda'
type#tiny_lisp_type_theory
mk_lambda
run time: 12.4365319999999 secs
run time: 12.436951 secs
passed
Lisp type checker: (tc +) = true
run time: 1.7000000070766e-05 secs
passed
Lisp type checker: (load "TinyLispFunctions.txt") = loaded
plus : (number --> (number --> number))
member : (A --> ((list A) --> (list A)))
join : ((list A) --> ((list A) --> (list A)))
run time: 1.41771700000004 secs
typechecked in 439264 inferences
run time: 1.41865799999994 secs
passed
Lisp type checker: (tc -) = false
run time: 1.79999999545544e-05 secs
passed
passed ... 129
failed ...0
pass rate ...100%
ok
0
run time: 646.696396 secs
loaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment