Skip to content

Instantly share code, notes, and snippets.

@ragnard
Created August 16, 2017 20:21
Show Gist options
  • Save ragnard/c9cddc732a3ebcb9b361239ae8c99a0c to your computer and use it in GitHub Desktop.
Save ragnard/c9cddc732a3ebcb9b361239ae8c99a0c to your computer and use it in GitHub Desktop.
shen-truffle
$ ./scripts/shen-truffle
Loading toplevel.kl
Loading core.kl
Loading sys.kl
Loading sequent.kl
Loading yacc.kl
Loading reader.kl
Loading prolog.kl
Loading track.kl
Loading load.kl
Loading writer.kl
Loading macros.kl
Loading declarations.kl
Loading types.kl
Loading t-star.kl
Shen, copyright (C) 2010-2015 Mark Tarver
www.shenlanguage.org, Shen 20.1
running under Java, implementation: Truffle / Graal Truffle Runtime
port 0.1 ported by Ragnar Dahlén
(0-) (cd "src/test/resources/test-programs")
"src/test/resources/test-programs/"
(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: 0.6289999485015869 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: 1.6679999828338623 secs
run time: 1.6689999103546143 secs
passed
prolog-tests: (shen.f1437 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.0 secs
passed
prolog-tests: (shen.f1432 (shen.start-new-prolog-process) (freeze true)) = false
run time: 0.0010001659393310547 secs
passed
prolog-tests: (shen.f1427 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.0 secs
passed
prolog-tests: (shen.f1422 (shen.start-new-prolog-process) (freeze true)) = 1
run time: 9.999275207519531E-4 secs
passed
prolog-tests: (shen.f1417 (shen.start-new-prolog-process) (freeze true)) = [2 1]
run time: 9.999275207519531E-4 secs
passed
prolog-tests: (load "einstein.shen") = loadedeinsteins_riddle
einstein
member
next_to
iright
run time: 0.4140000343322754 secs
run time: 0.41499996185302734 secs
passed
prolog-tests: (shen.f1412 (shen.start-new-prolog-process) (freeze true)) = german
run time: 5.962000131607056 secs
passed
prolog-tests: (shen.f1407 (shen.start-new-prolog-process) (freeze true)) = chocolate
run time: 9.999275207519531E-4 secs
passed
prolog-tests: (shen.f1402 (shen.start-new-prolog-process) (freeze true)) = chocolate
run time: 0.0 secs
passed
prolog-tests: (shen.f1397 (shen.start-new-prolog-process) (freeze true)) = [tea chocolate]
run time: 0.002000093460083008 secs
passed
prolog-tests: (shen.f1392 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.004999876022338867 secs
passed
prolog-tests: (shen.f1387 (shen.start-new-prolog-process) (freeze true)) = [[1 1] [1 2] [1 3]]
run time: 0.0019998550415039062 secs
passed
prolog-tests: (shen.f1382 (shen.start-new-prolog-process) (freeze true)) = true
run time: 9.999275207519531E-4 secs
passed
prolog-tests: (shen.f1377 (shen.start-new-prolog-process) (freeze true)) = false
run time: 9.999275207519531E-4 secs
passed
prolog-tests: (shen.f1372 (shen.start-new-prolog-process) (freeze true)) = mary
run time: 9.999275207519531E-4 secs
passed
prolog-tests: (load "parse.prl") = loadedpparse
parsing
member
run time: 0.4179999828338623 secs
run time: 0.41899991035461426 secs
passed
prolog-tests: (shen.f1367 (shen.start-new-prolog-process) (freeze true)) = true
run time: 0.015000104904174805 secs
passed
passed ... 18
failed ...0
pass rate ...100.0%
ok
FPQi chapter 4: (load "cartprod.shen") = loadedcartesian-product
all-pairs-using-X
run time: 0.031000137329101562 secs
run time: 0.032000064849853516 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.0 secs
passed
FPQi chapter 4: (load "powerset.shen") = loadedpowerset
cons-X-to-each-set
run time: 0.023000001907348633 secs
run time: 0.023000001907348633 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.0010001659393310547 secs
passed
passed ... 22
failed ...0
pass rate ...100.0%
ok
0
FPQi chapter 5: (load "bubble version 1.shen") = loadedbubble-sort
bubble
bubble-again-perhaps
run time: 0.04200005531311035 secs
run time: 0.04200005531311035 secs
passed
FPQi chapter 5: (bubble-sort (cons 1 (cons 2 (cons 3 ())))) = [3 2 1]
run time: 0.0 secs
passed
FPQi chapter 5: (load "bubble version 2.shen") = loadedbubble-sort
bubble
run time: 0.026999950408935547 secs
run time: 0.0279998779296875 secs
passed
FPQi chapter 5: (bubble-sort (cons 1 (cons 2 (cons 3 ())))) = [3 2 1]
run time: 9.999275207519531E-4 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: 0.12999987602233887 secs
run time: 0.13099980354309082 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.005000114440917969 secs
passed
passed ... 28
failed ...0
pass rate ...100.0%
ok
FPQi chapter 3: (load "prime.shen") = loadedprime?
prime*
run time: 0.03600001335144043 secs
run time: 0.03699994087219238 secs
passed
FPQi chapter 3: (prime? 1000003) = true
run time: 3.984999895095825 secs
passed
FPQi chapter 3: (load "mutual.shen") = loadedeven?
odd?
run time: 0.013000011444091797 secs
run time: 0.014000177383422852 secs
passed
FPQi chapter 3: (even? 56) = true
run time: 9.999275207519531E-4 secs
passed
FPQi chapter 3: (odd? 77) = true
run time: 0.0 secs
passed
FPQi chapter 3: (load "change.shen") = loadedcount-change
count-change*
next-denom
run time: 0.03399991989135742 secs
run time: 0.03500008583068848 secs
passed
FPQi chapter 3: (count-change 100) = 4563
run time: 0.7599999904632568 secs
passed
passed ... 35
failed ...0
pass rate ...100.0%
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.08299994468688965 secs
run time: 0.08299994468688965 secs
passed
FPQi chapter 6: (clear Mark_Tarver) = []
run time: 0.0 secs
passed
FPQi chapter 6: (clear man) = []
run time: 0.0 secs
passed
FPQi chapter 6: (assert (cons Mark_Tarver (cons is_a (cons man ())))) = [man]
run time: 9.999275207519531E-4 secs
passed
FPQi chapter 6: (assert (cons man (cons type_of (cons human ())))) = [human]
run time: 0.0 secs
passed
FPQi chapter 6: (query (cons is (cons Mark_Tarver (cons human ())))) = yes
run time: 0.004000186920166016 secs
passed
passed ... 41
failed ...0
pass rate ...100.0%
ok
FPQi chapter 7: (load "proplog version 1.shen") = loadedbackchain
backchain*
run time: 0.0690000057220459 secs
run time: 0.0690000057220459 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: 9.999275207519531E-4 secs
passed
FPQi chapter 7: (backchain q (cons (cons q (cons <= (cons p ()))) (cons (cons q (cons <= (cons r ()))) ()))) = ...
run time: 0.0010001659393310547 secs
passed
FPQi chapter 7: (load "proplog version 2.shen") = loadedbackchain
backchain*
run time: 0.06400012969970703 secs
run time: 0.06500005722045898 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.0 secs
passed
FPQi chapter 7: (backchain q (cons (cons q (cons <= (cons p ()))) (cons (cons q (cons <= (cons r ()))) ()))) = false
run time: 0.0 secs
passed
passed ... 47
failed ...0
pass rate ...100.0%
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: 0.24500012397766113 secs
run time: 0.24600005149841309 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.10100007057189941 secs
passed
passed ... 49
failed ...0
pass rate ...100.0%
ok
chapter 11: (load "binary.shen") = loadedtype#binary
complement
run time: 0.6540000438690186 secs
run time: 0.6549999713897705 secs
passed
chapter 11: (complement (cons 1 (cons 0 ()))) = [0 1]
run time: 0.0 secs
passed
chapter 11: (load "streams.shen") = loadedtype#progression
delay
force
end?
run time: 0.7719998359680176 secs
run time: 0.7719998359680176 secs
passed
chapter 11: (fst (delay (@p 0 (@p (+ 1) (lambda X false))))) = 1
run time: 0.0 secs
passed
passed ... 53
failed ...0
pass rate ...100.0%
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: 0.15899991989135742 secs
run time: 0.15899991989135742 secs
passed
strings: (subst-string "a" "b" "cba") = "caa"
run time: 0.0 secs
passed
strings: (strlen "123") = 3
run time: 0.0 secs
passed
strings: (trim-string-left (cons " " ()) " hi ") = "hi "
run time: 0.0 secs
passed
strings: (trim-string-right (cons " " ()) " hi ") = " hi"
run time: 0.0 secs
passed
strings: (trim-string (cons " " ()) " hi ") = "hi"
run time: 0.0 secs
passed
strings: (reverse-string "abc") = "cba"
run time: 0.0 secs
passed
strings: (alldigits? "123") = true
run time: 0.0 secs
passed
passed ... 61
failed ...0
pass rate ...100.0%
ok
calculator.shen - chapter 11: (load "calculator.shen") = loadedtype#arith-expr
do-calculation
run time: 0.9509999752044678 secs
run time: 0.9509999752044678 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: 9.999275207519531E-4 secs
passed
passed ... 63
failed ...0
pass rate ...100.0%
ok
structures 1 - chapter 12: (load "structures-untyped.shen") = loadeddefstruct
selectors
selector
constructor
params
make-association-list
recognisor
run time: 0.10299992561340332 secs
run time: 0.10299992561340332 secs
passed
structures 1 - chapter 12: (defstruct ship (cons length (cons name ()))) = ship
run time: 0.032000064849853516 secs
passed
structures 1 - chapter 12: (make-ship 200 "Mary Rose") = [[structure | ship] [length | 200] [name | "Mary Rose"]]
run time: 0.0 secs
passed
structures 1 - chapter 12: (ship-length (make-ship 200 "Mary Rose")) = 200
run time: 9.999275207519531E-4 secs
passed
structures 1 - chapter 12: (ship-name (make-ship 200 "Mary Rose")) = "Mary Rose"
run time: 0.0 secs
passed
passed ... 68
failed ...0
pass rate ...100.0%
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: 0.20799994468688965 secs
run time: 0.20799994468688965 secs
passed
structures 2 - chapter 12: (defstruct ship (cons (@p length number) (cons (@p name string) ()))) = ship
run time: 0.1119999885559082 secs
passed
structures 2 - chapter 12: (make-ship 200 "Mary Rose") = [[structure | ship] [length | 200] [name | "Mary Rose"]]
run time: 9.999275207519531E-4 secs
passed
structures 2 - chapter 12: (ship-length (make-ship 200 "Mary Rose")) = 200
run time: 0.0 secs
passed
structures 2 - chapter 12: (ship-name (make-ship 200 "Mary Rose")) = "Mary Rose"
run time: 0.0 secs
passed
passed ... 73
failed ...0
pass rate ...100.0%
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: 0.13199996948242188 secs
run time: 0.13199996948242188 secs
passed
classes 1 - chapter 12: (defclass ship (cons length (cons name ()))) = ship
run time: 9.999275207519531E-4 secs
passed
classes 1 - chapter 12: (set s (make-instance ship)) = [[class | ship] [length | fail] [name | fail]]
run time: 0.0 secs
passed
classes 1 - chapter 12: (has-value? length (value s)) = false
run time: 0.0 secs
passed
classes 1 - chapter 12: (set s (change-value (value s) length 100)) = [[class | ship] [length | 100] [name | fail]]
run time: 0.0 secs
passed
classes 1 - chapter 12: (get-value length (value s)) = 100
run time: 0.0 secs
passed
passed ... 79
failed ...0
pass rate ...100.0%
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: 0.2890000343322754 secs
run time: 0.29000020027160645 secs
passed
classes 2 - chapter 12: (defclass ship (cons (@p length number) (cons (@p name string) ()))) = ship
run time: 0.25799989700317383 secs
passed
classes 2 - chapter 12: (has-value? length (make-instance ship)) = false
run time: 0.0 secs
passed
classes 2 - chapter 12: (change-value (make-instance ship) length 100) = [[class | ship] [length | 100] [name | fail]]
run time: 0.0 secs
passed
classes 2 - chapter 12: (get-value length (change-value (make-instance ship) length 100)) = 100
run time: 0.0 secs
passed
passed ... 84
failed ...0
pass rate ...100.0%
ok
abstract datatypes - chapter 12: (load "stack.shen") = loadedempty-stack
push
top
pop
empty-stack
push
top
pop
run time: 0.09400010108947754 secs
run time: 0.09400010108947754 secs
passed
abstract datatypes - chapter 12: (top (push 0 (empty-stack _))) = 0
run time: 0.0 secs
passed
passed ... 86
failed ...0
pass rate ...100.0%
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: 0.7690000534057617 secs
run time: 0.7700002193450928 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.0 secs
passed
yacc: (compile (function <sent>) (cons the (cons cat (cons likes (cons the (cons canary ()))))) (lambda E (fail))) = ...
run time: 0.0 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.0010001659393310547 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: 9.999275207519531E-4 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.0 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.0010001659393310547 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.0 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: 9.999275207519531E-4 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.0 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.0 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: 9.999275207519531E-4 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: 9.999275207519531E-4 secs
passed
passed ... 99
failed ...0
pass rate ...100.0%
ok
[]
true
N Queens: (preclude-all-but ()) = []
run time: 0.0 secs
passed
N Queens: (tc +) = true
run time: 0.0 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: 0.6619999408721924 secs
typechecked in 115553 inferences
run time: 0.6630001068115234 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.07499980926513672 secs
passed
N Queens: (tc -) = false
run time: 0.0 secs
passed
passed ... 104
failed ...0
pass rate ...100.0%
ok
search: (tc +) = true
run time: 0.0 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: 1.184000015258789 secs
typechecked in 119559 inferences
run time: 1.184999942779541 secs
passed
search: (tc -) = false
run time: 0.0 secs
passed
passed ... 107
failed ...0
pass rate ...100.0%
ok
whist - chapter 11: (tc +) = true
run time: 0.0 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: 2.7990000247955322 secs
typechecked in 132016 inferences
run time: 2.799999952316284 secs
passed
whist - chapter 11: (tc -) = false
run time: 0.0 secs
passed
passed ... 110
failed ...0
pass rate ...100.0%
ok
Qi interpreter - chapter 13: (tc +) = true
run time: 0.0 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: 12.933000087738037 secs
typechecked in 428034 inferences
run time: 12.934000015258789 secs
passed
Qi interpreter - chapter 13: (tc -) = false
run time: 0.0 secs
passed
passed ... 113
failed ...0
pass rate ...100.0%
ok
proof assistant - chapter 15: (tc +) = true
run time: 0.0 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: 0.5859999656677246 secs
typechecked in 432369 inferences
run time: 0.5859999656677246 secs
passed
proof assistant - chapter 15: (tc -) = false
run time: 0.0 secs
passed
passed ... 116
failed ...0
pass rate ...100.0%
ok
quantifier machine: (tc +) = true
run time: 0.0 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))
pfilter : ((progression A) --> ((A --> boolean) --> (list A)))
next-prime : (number --> number)
prime? : (number --> boolean)
prime-help : (number --> (number --> (number --> boolean)))
run time: 0.8650000095367432 secs
typechecked in 436256 inferences
run time: 0.8659999370574951 secs
passed
quantifier machine: (exists (cons 1 (cons (+ 1) (cons (= 100) ()))) (> 50)) = true
run time: 9.999275207519531E-4 secs
passed
quantifier machine: (tc -) = false
run time: 0.0 secs
passed
passed ... 120
failed ...0
pass rate ...100.0%
ok
depth first search: (tc +) = true
run time: 0.0 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: 0.13400006294250488 secs
typechecked in 437909 inferences
run time: 0.13499999046325684 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: 9.999275207519531E-4 secs
passed
depth first search: (depth' 4 (lambda X (cons (+ X 3) ())) (lambda X (= X 27)) (lambda X (> X 27))) = []
run time: 0.0010001659393310547 secs
passed
depth first search: (tc -) = false
run time: 0.0 secs
passed
passed ... 125
failed ...0
pass rate ...100.0%
ok
Lisp type checker: (load "TinyTypes.shen") = loadeddefun
lambda'
type#tiny_lisp_type_theory
mk_lambda
run time: 0.6189999580383301 secs
run time: 0.6189999580383301 secs
passed
Lisp type checker: (tc +) = true
run time: 0.0 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: 0.04699993133544922 secs
typechecked in 439264 inferences
run time: 0.04799985885620117 secs
passed
Lisp type checker: (tc -) = false
run time: 0.0 secs
passed
passed ... 129
failed ...0
pass rate ...100.0%
ok
0
run time: 42.449000120162964 secs
loaded
(3-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment