blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
171
content_id
stringlengths
40
40
detected_licenses
listlengths
0
8
license_type
stringclasses
2 values
repo_name
stringlengths
6
82
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
13 values
visit_date
timestamp[ns]
revision_date
timestamp[ns]
committer_date
timestamp[ns]
github_id
int64
1.59k
594M
star_events_count
int64
0
77.1k
fork_events_count
int64
0
33.7k
gha_license_id
stringclasses
12 values
gha_event_created_at
timestamp[ns]
gha_created_at
timestamp[ns]
gha_language
stringclasses
46 values
src_encoding
stringclasses
14 values
language
stringclasses
2 values
is_vendor
bool
2 classes
is_generated
bool
1 class
length_bytes
int64
4
7.87M
extension
stringclasses
101 values
filename
stringlengths
2
149
content
stringlengths
4
7.87M
has_macro_def
bool
2 classes
4b6b89087d10a1d5e1a95e5eb23261a4e32817e6
92b8d8f6274941543cf41c19bc40d0a41be44fe6
/testsuite/exception2.scm
8edcfa8ea4b285cb0708fc80ec90a073f24bb9aa
[ "MIT" ]
permissive
spurious/kawa-mirror
02a869242ae6a4379a3298f10a7a8e610cf78529
6abc1995da0a01f724b823a64c846088059cd82a
refs/heads/master
2020-04-04T06:23:40.471010
2017-01-16T16:54:58
2017-01-16T16:54:58
51,633,398
6
0
null
null
null
null
UTF-8
Scheme
false
false
412
scm
exception2.scm
(try-catch (try-catch (primitive-throw (java.lang.Error "my-error")) (ex1 java.lang.Throwable (let ((cf (lambda (cv) (list ex1)))) (format #t "ex1:~w cf:~w~%~!" ex1 cf) (primitive-throw ex1)))) (ex2 java.lang.Throwable (format #t "caught ~w~%" ex2))) ;; Output: ex1:java.lang.Error: my-error cf:#<procedure cf> ;; Output: caught java.lang.Error: my-error
false
4394ab19eeeac8795e3cd81eaea1f1aadcf52ea8
0011048749c119b688ec878ec47dad7cd8dd00ec
/src/056/solution.scm
e6829d2d8614ff7f669b571bcb44b716d1b827d0
[ "0BSD" ]
permissive
turquoise-hexagon/euler
e1fb355a44d9d5f9aef168afdf6d7cd72bd5bfa5
852ae494770d1c70cd2621d51d6f1b8bd249413c
refs/heads/master
2023-08-08T21:01:01.408876
2023-07-28T21:30:54
2023-07-28T21:30:54
240,263,031
8
0
null
null
null
null
UTF-8
Scheme
false
false
208
scm
solution.scm
(import (euler)) (define (solve n) (apply max (map (lambda (pairs) (digitsum (apply expt pairs))) (power (range 1 n) 2)))) (let ((_ (solve 100))) (print _) (assert (= _ 972)))
false
11e18db1fd4d2ca5b35e70b4304bf5366f94dba5
5a05fab297275b592ccd554d3f086bf1ccf7956d
/back/experiment/testcase/for/5_sform.scm
1f84198a88cd631de54424d40f084fe7de4130fd
[]
no_license
mkiken/x-scala
643af77b7f9f31a32631007d56f5f1be796aed3e
daebc81d36d9f8a69393f02c3241a0c20ed0b864
refs/heads/master
2016-09-06T13:21:29.879990
2014-02-26T13:14:04
2014-02-26T13:14:04
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
63,266
scm
5_sform.scm
(begin (define-syntax FOR-Macro (syntax-rules () ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul) (begin (define-syntax FOR-Macro (syntax-rules (V-[object Object]) ((_ ("Scala" "Paren" V-i V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 0 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))) ((_ ("Scala" "Paren" V-i V-s V-e) V-block) (("Scala" "ForStatement" ("Scala" "Keyword" "(") ("Scala" "Keyword" ")") ("Scala" "Enumerators" ("Scala" "Generator" ("Scala" "InfixOperatorPattern" V-i #\nul #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-List ("Scala" "DesignatorPostfix" #\nul V-range ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-s #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-e #\nul) #\nul)))) #\nul)))) #\nul))) #\nul)))) #\nul) #\nul) #\nul) #\nul ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-block #\nul) #\nul)))) #\nul)))))) ("Scala" "TopStat" #\nul #\nul ("Scala" "ObjectTemplateDefinition" #\nul ("Scala" "ObjectDefinition" V-ForStmt ("Scala" "ClassTemplateOpt" #\nul ("Scala" "TemplateBody" (letrec* ((R-main- ((lambda () (function FunctionDefinition) (#\nul #\nul) ("Scala" "FunctionSignature" R-main- #\nul ("Scala" "ParamClauses" (("Scala" "ParamClause" ("Scala" "Params" (("Scala" "Param" #\nul R-args- ("Scala" "RepeatedParamType" ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Array-)) (("Scala" "TypeArgs" ("Scala" "Types" (("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-String-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul))))))) #\nul) #\nul #\nul) #\nul #\nul)) #\nul) #\nul))))) #\nul)) ("Scala" "Type" #\nul ("Scala" "InfixType" ("Scala" "CompoundType" ("Scala" "AnnotType" ("Scala" "SimpleType" ("Scala" "StableId" (R-Unit-)) #\nul) #\nul) #\nul #\nul) #\nul #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-a ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 3 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-a #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "TupleExpression" ("Scala" "Exprs" ((#\nul (FOR-Macro ("Scala" "Paren" V-o ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 10 #\nul) #\nul)))) #\nul) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "literalSimpleExpression" 24 #\nul) #\nul)))) #\nul)) ("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "BlockExpression" ("Scala" "Block" (letrec* () (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-println ("Scala" "FunctionApplicationPostfix" ("Scala" "ArgumentExpression" ("Scala" "Exprs" (("Scala" "PostfixExpression" ("Scala" "InfixExpression" (("Scala" "PrefixExpression" #\nul ("Scala" "SimpleExpression" ("Scala" "idSeqSimpleExpression" V-o #\nul) #\nul)))) #\nul)))) #\nul)) #\nul)))) #\nul)) #\nul)))))) #\nul)) #\nul))) #\nul) #\nul)))) #\nul)) #\nul)))))) #\nul))))) #\nul (#\nul #\nul))))))) #\nul)
true
ad83c0ff81c35a68151e52cc5afba37d69473410
5355071004ad420028a218457c14cb8f7aa52fe4
/5.5/e-5.33.scm
de448f5cd4878d1a35061c39c261cc88550bcbb9
[]
no_license
ivanjovanovic/sicp
edc8f114f9269a13298a76a544219d0188e3ad43
2694f5666c6a47300dadece631a9a21e6bc57496
refs/heads/master
2022-02-13T22:38:38.595205
2022-02-11T22:11:18
2022-02-11T22:11:18
2,471,121
376
90
null
2022-02-11T22:11:19
2011-09-27T22:11:25
Scheme
UTF-8
Scheme
false
false
1,923
scm
e-5.33.scm
; Exercise 5.33. ; ; Consider the following definition of a factorial ; procedure, which is slightly different from the one given above: (define (factorial-alt n) (if (= n 1) 1 (* n (factorial-alt (- n 1))))) ; Compile this procedure and compare the resulting code with that ; produced for factorial. Explain any differences you find. Does either ; program execute more efficiently than the other? ; ------------------------------------------------------------ (load "5.5.scm") (define object-code (compile '(define (factorial-alt n) (if (= n 1) 1 (* n (factorial-alt (- n 1))))) 'val 'next)) (format-object-code (instruction-list object-code)) ; Here I have generated formatted compilation result in order to compare it with the diff tool. ; First a bit of clarification. The order in which argument evaluation comes in the object code ; is in the inverse order (right-to-left) because our compiler is building the argl for the proc to be applied ; by consing evaluated arguments (cons arg argl). Therefore in order to have proper list of arguments ; we have to evaluate them inverselly. This can be seen as well here in the two examples we are comparing. ; ; In first example 5.5-factorial-compiled.scm we see that first we fetch value of n and then evaluate ; the recursive call. In order to do this we have to save argument list of the previous application so ; when we come back we have tproper state to continue our application from. ; ; In oder case, we first jump into the evaluation of recursive call and there we have no need to ; preserve the current state of argument list since we didn't build one yet. Therefore this implementation ; will be faster for one pair of stack operations for every recursive calls. ; ; Message of this exercise is that it matters to know the internals of the machine you are working with ; if fine tunings are to be made.
false
639d0f09b689e77d9bca4198a8f4fbf9068a03cf
2bcf33718a53f5a938fd82bd0d484a423ff308d3
/programming/sicp/ch4/ex-4.18.scm
f5c26e28bfd3c934df3e6ff0dc9ce9d25cb85a9f
[]
no_license
prurph/teach-yourself-cs
50e598a0c781d79ff294434db0430f7f2c12ff53
4ce98ebab5a905ea1808b8785949ecb52eee0736
refs/heads/main
2023-08-30T06:28:22.247659
2021-10-17T18:27:26
2021-10-17T18:27:26
345,412,092
0
0
null
null
null
null
UTF-8
Scheme
false
false
1,157
scm
ex-4.18.scm
#lang sicp ;; https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-26.html#%_thm_4.18 ;; Expanding the following with each definition scanning out strategy: ;; ;; (define (solve f y0 dt) ;; (define y (integral (delay dy) y0 dt)) ;; (define dy (stream-map f y)) ;; y) ;; ;; For the single let in the text: (lambda (f y0 dt) (let ((y '*unassigned*) (dy '*unassigned*)) (set! y (integral (delay dy) y0 dt)) (set! dy (stream-map f y)) y)) ;; This works properly, y and dy are both set and then y is returned. Even though y and dy are values and not procedures, as the evaluation of dy is delayed, when y is evaluated in the procedure body, dy will not be undefined. This is effectively wrapping dy in a lambda, and "converting" it into a procedure. When dy is set y is no longer undefined, so that part is fine. ;; For the nested let with renames: (lambda (f y0 dt) (let ((y '*unassigned*) (dy '*unassigned*)) (let ((a (integral (delay dy) y0 dt)) (b (stream-map f y))) (set! y a) (set! dy b)) y)) ;; This doesn't work, b is assigned to (stream-map f y), and at that point y is '*unassigned*.
false
4133c205d408635e76afff5fe5a21c9e4925d449
c55cc1a2f5c0816c47988434c03f50e04bbcfe7b
/cfgnorm-tests.scm
a494d0718d6934a7ed6952afeb134e4e7675139b
[]
no_license
webyrd/KeySchem-ture
d6c2bef9a9b132c628d2d8509f382ddbc8ae74a1
d0b7a1dc4f4fd22700cd7e7db51e9143c919a911
refs/heads/master
2020-06-06T03:35:18.602717
2013-03-03T11:16:35
2013-03-03T11:16:35
8,120,083
1
0
null
null
null
null
UTF-8
Scheme
false
false
14,571
scm
cfgnorm-tests.scm
;;; Test file for cfgnorm.scm ;;; run tests (load "my-dictionary.scm") (load "prelude.scm") (load "cfgnorm.scm") ;;; Tests for grammars using "new hotness" representation of bricks (as individual ;;; tagged lists instead of association lists). (define get-bricks-from-rules* (lambda (ls) ((get-foo-from-rules* brick?) ls))) (define get-symbols-from-rules* (lambda (ls) ((get-foo-from-rules* (lambda (x) (and (symbol? x) (not (eq? x '->))))) ls))) (define get-foo-from-rules* (lambda (pred) (letrec ([get-foo* (lambda (ls) (cond [(null? ls) '()] [(pred (car ls)) (union (list (car ls)) (get-foo* (cdr ls)))] [(and (pair? (car ls)) (not (brick? (car ls)))) (union (get-foo* (car ls)) (get-foo* (cdr ls)))] [else (get-foo* (cdr ls))]))]) get-foo*))) (test 'get-symbols-from-rules*-1 (let ([R `((,GenMinor -> ,GenMinor_var1) (,GenMinor_var1 -> Cm) (,GenMinor_var2 -> Cm7) (,GenDom -> ,GenDom_var1) (,GenDom_var1 -> G7) (,GenDom_var2 -> ,GenII G7))]) (get-symbols-from-rules* R)) '(Cm Cm7 G7)) (test 'get-bricks-from-rules*-1 (let ([R `((,GenMinor -> ,GenMinor_var1) (,GenMinor_var1 -> Cm) (,GenMinor_var2 -> Cm7) (,GenDom -> ,GenDom_var1) (,GenDom_var1 -> G7) (,GenDom_var2 -> ,GenII G7))]) (get-bricks-from-rules* R)) `(,GenMinor ,GenMinor_var1 ,GenMinor_var2 ,GenDom ,GenDom_var1 ,GenDom_var2 ,GenII)) (define new-hotness-cfg (let ([R `((,GenMinor -> ,GenMinor_var1) (,GenMinor_var1 -> Cm) (,GenMinor_var2 -> Cm7) (,GenDom -> ,GenDom_var1) (,GenDom_var1 -> G7) (,GenDom_var2 -> ,GenII G7))]) (let ([dummy-start 'S]) (let ([V (union (list dummy-start) (get-bricks-from-rules* R))] [Sigma (get-symbols-from-rules* R)]) (make-cfg ,V ,Sigma ,R ,dummy-start))))) (test 'normalize-new-hotness-cfg-1 (prettify-object (normalize new-hotness-cfg)) '(cfg-tag (U.4 S0 S GenMinor GenMinor_var1 GenMinor_var2 GenDom GenDom_var1 GenDom_var2 GenII) (Cm Cm7 G7) ((GenDom_var2 -> GenII U.4) (U.4 -> G7) (GenDom_var1 -> G7) (GenDom -> G7) (GenMinor_var2 -> Cm7) (GenMinor_var1 -> Cm) (GenMinor -> Cm)) S0)) ;;; Test Grammars (define G3 (let ([R '((S -> a S b) (S -> S S) (S -> epsilon))]) (make-cfg (S) (a b) ,R S))) (define G4 (let ([R (convert-rules ((EXPR -> (EXPR + TERM) (TERM)) (TERM -> (TERM x FACTOR) (FACTOR)) (FACTOR -> (< EXPR >) (a))))]) (make-cfg (EXPR TERM FACTOR) (a + x < >) ,R EXPR))) (define G6 (let ([R '((S -> A S A) (S -> a B) (A -> B) (A -> S) (B -> b) (B -> epsilon))]) (make-cfg (S A B) (a b) ,R S))) ;;; add-start tests (test 'add-start-1 (add-start G3) (make-cfg (S0 S) (a b) ((S0 -> S) (S -> a S b) (S -> S S) (S -> epsilon)) S0)) (test 'add-start-2 (add-start G6) (make-cfg (S0 S A B) (a b) ((S0 -> S) (S -> A S A) (S -> a B) (A -> B) (A -> S) (B -> b) (B -> epsilon)) S0)) ;;; remove-first-non-start-epsilon-rule tests (test 'remove-first-non-start-epsilon-rule-1 (let ([R '((S0 -> S) (S -> A S A) (S -> a B) (A -> B) (A -> S) (B -> b) (B -> epsilon))] [S 'S0]) (remove-first-non-start-epsilon-rule R S)) '(((S0 -> S) (S -> A S A) (S -> a B) (A -> B) (A -> S) (B -> b)) B)) (test 'remove-first-non-start-epsilon-rule-2 (let ([R '((S0 -> S) (S -> A S A) (S -> a B) (S -> a) (A -> B) (A -> S) (A -> epsilon) (B -> b))] [S 'S0]) (remove-first-non-start-epsilon-rule R S)) '(((S0 -> S) (S -> A S A) (S -> a B) (S -> a) (A -> B) (A -> S) (B -> b)) A)) (test 'remove-first-non-start-epsilon-rule-3 (let ([R '((S0 -> S) (S0 -> epsilon) (S -> A S A) (S -> a B) (S -> a) (A -> B) (A -> S) (A -> epsilon) (B -> b))] [S 'S0]) (remove-first-non-start-epsilon-rule R S)) '(((S0 -> S) (S0 -> epsilon) (S -> A S A) (S -> a B) (S -> a) (A -> B) (A -> S) (B -> b)) A)) (test 'remove-first-non-start-epsilon-rule-4 (let ([R '((S0 -> S) (S0 -> epsilon) (S -> A S A) (S -> a B) (S -> a) (A -> B) (A -> S) (B -> b))] [S 'S0]) (remove-first-non-start-epsilon-rule R S)) '(((S0 -> S) (S0 -> epsilon) (S -> A S A) (S -> a B) (S -> a) (A -> B) (A -> S) (B -> b)) #f)) ;;; generate-rules tests (test 'generate-rules-1 (generate-rules 'A 'R '(u A v A w)) '((R -> u v w) (R -> u A v w) (R -> u v A w) (R -> u A v A w))) (test 'generate-rules-2 (generate-rules 'A 'S '(A S A)) '((S -> S) (S -> A S) (S -> S A) (S -> A S A))) (test 'generate-rules-3 (generate-rules 'A 'D '(A)) '((D -> A))) (test 'generate-rules-4 (generate-rules 'A 'B '(A A)) '((B -> A) (B -> A) (B -> A A))) ;;; convert-rules tests (test 'convert-rules (convert-rules ((A -> (B) (epsilon) (B C)) (B -> (epsilon) (C D E)))) '((B -> epsilon) (B -> C D E) (A -> B) (A -> epsilon) (A -> B C))) ;;; add-rules tests (test 'add-rules-1 (add-rules '((Z -> w) (R -> u A v A w) (B -> C) (D -> E v F)) 'A '(A)) '((Z -> w) (R -> u A v A w) (R -> u v A w) (R -> u A v w) (R -> u v w) (B -> C) (D -> E v F))) (test 'add-rules-2 (add-rules '((Z -> w) (R -> u A v A w) (B -> C) (D -> E v F)) 'A '(C A F)) '((Z -> w) (R -> u A v A w) (R -> u v A w) (R -> u A v w) (R -> u v w) (B -> C) (D -> E v F))) (test 'add-rules-3 (add-rules '((Z -> w) (R -> u A v A w) (B -> C) (R -> A) (D -> E v F)) 'A '(A)) '((Z -> w) (R -> u A v A w) (R -> u v A w) (R -> u A v w) (R -> u v w) (B -> C) (R -> A) (R -> epsilon) (D -> E v F))) (test 'add-rules-4 (add-rules '((Z -> w) (R -> u A v A w) (B -> C) (R -> A) (D -> E v F)) 'A '(A R)) '((Z -> w) (R -> u A v A w) (R -> u v A w) (R -> u A v w) (R -> u v w) (B -> C) (R -> A) (D -> E v F))) (test 'add-rules-5 (add-rules '((S0 -> S) (S -> S S) (S -> a)) 'S '(S)) '((S0 -> S) (S0 -> epsilon) (S -> S S) (S -> S) (S -> a))) (test 'add-rules-6 (add-rules '((S0 -> S) (S -> A S A) (S -> a B) (A -> B) (A -> S) (B -> b)) 'B '(B)) '((S0 -> S) (S -> A S A) (S -> a B) (S -> a) (A -> B) (A -> epsilon) (A -> S) (B -> b))) (test 'add-rules-7 (add-rules '((S0 -> S) (S -> A S A) (S -> a B) (S -> a) (A -> B) (A -> S) (B -> b)) 'A '(A B)) '((S0 -> S) (S -> A S A) (S -> S A) (S -> A S) (S -> S) (S -> a B) (S -> a) (A -> B) (A -> S) (B -> b))) (test 'add-rules-8 (add-rules '((S0 -> S) (S -> A) (A -> B) (B -> A) (B -> S A)) 'A '(A)) '((S0 -> S) (S -> A) (S -> epsilon) (A -> B) (B -> A) (B -> epsilon) (B -> S A) (B -> S))) (test 'add-rules-9 (add-rules '((S0 -> S) (S -> A) (A -> B) (B -> A) (B -> epsilon) (B -> S A) (B -> S)) 'S '(S A)) '((S0 -> S) (S0 -> epsilon) (S -> A) (A -> B) (B -> A) (B -> epsilon) (B -> S A) (B -> S))) (test 'add-rules-10 (add-rules '((S0 -> S) (S0 -> epsilon) (S -> A) (A -> B) (B -> A) (B -> S A) (B -> S)) 'B '(B S A)) '((S0 -> S) (S0 -> epsilon) (S -> A) (A -> B) (B -> A) (B -> S A) (B -> S))) (test 'add-rules-11 (add-rules '((S0 -> S) (S -> S S) (S -> S S S) (S -> a)) 'S '(S)) '((S0 -> S) (S0 -> epsilon) (S -> S S) (S -> S) (S -> S S S) (S -> a))) (test 'add-rules-12 (add-rules '((S0 -> S) (S -> A) (S -> epsilon) (A -> B) (B -> A) (B -> epsilon) (B -> S A) (B -> S)) 'S '(S A)) '((S0 -> S) (S0 -> epsilon) (S -> A) (S -> epsilon) (A -> B) (B -> A) (B -> epsilon) (B -> S A) (B -> S))) (test 'add-rules-13 (add-rules '((S0 -> S) (S -> A) (S -> epsilon) (S -> epsilon) (A -> B) (B -> A) (B -> epsilon) (B -> S A) (B -> S)) 'S '(S A)) '((S0 -> S) (S0 -> epsilon) (S -> A) (S -> epsilon) (A -> B) (B -> A) (B -> epsilon) (B -> S A) (B -> S))) ;;; remove-first-unit-rule tests (test 'remove-first-unit-rule-1 (remove-first-unit-rule '((Z -> w) (R -> u A v A w) (R -> u v A w) (R -> u A v w) (R -> u v w) (B -> C) (R -> A) (D -> E v F)) '(A B C D E F R Z)) '(((Z -> w) (R -> u A v A w) (R -> u v A w) (R -> u A v w) (R -> u v w) (R -> A) (D -> E v F)) (B -> C))) ;;; substitute-unit-rule tests (test 'substitute-unit-rule-1 (substitute-unit-rule '((Z -> w) (R -> u A v A w) (R -> u v A w) (R -> u A v w) (R -> u v w) (R -> A) (C -> E v F)) '(B -> C) '()) '((Z -> w) (R -> u A v A w) (R -> u v A w) (R -> u A v w) (R -> u v w) (R -> A) (B -> E v F) (C -> E v F))) ;;; handle-unit-rules (test 'handle-unit-rules-1 (handle-unit-rules (make-cfg (S0 S A B) (u b c) ((S0 -> S) (S -> A) (A -> u B b) (B -> c)) S0)) (make-cfg (S0 S A B) (u b c) ((S0 -> u B b) (S -> u B b) (A -> u B b) (B -> c)) S0)) (test 'handle-mixed-rules-1 (handle-mixed-rules (make-cfg (A B E) (a c d) ((A -> a B c d E)) A)) (make-cfg (U.3 A.3 U.2 A.2 A.1 U.1 A B E) (a c d) ((A.3 -> U.3 E) (U.3 -> d) (A.2 -> U.2 A.3) (U.2 -> c) (A.1 -> B A.2) (A -> U.1 A.1) (U.1 -> a)) A)) (test 'normalize-G6 (normalize G6) (make-cfg (U.3 U.2 U.1 A.3 A.2 A.1 S0 S A B) (a b) ((B -> b) (A -> b) (S -> a) (A -> a) (S0 -> a) (S -> U.3 B) (U.3 -> a) (A -> U.2 B) (U.2 -> a) (S0 -> U.1 B) (U.1 -> a) (S -> A S) (A -> A S) (S0 -> A S) (S -> S A) (A -> S A) (S0 -> S A) (A.3 -> S A) (S -> A A.3) (A.2 -> S A) (A -> A A.2) (A.1 -> S A) (S0 -> A A.1)) S0)) (test 'normalize-two-constant-rule (let ([G (make-cfg (A) (c d) ((A -> c d)) A)]) (normalize G)) (make-cfg (U.2 U.3 U.0 U.1 S0 A) (c d) ((A -> U.2 U.3) (U.2 -> c) (U.3 -> d) (S0 -> U.0 U.1) (U.0 -> c) (U.1 -> d)) S0)) (test 'normalize-M7sus4-to-3 (let ([G (make-cfg (S M7sus4-to-3) (Bb7sus4 Bb7) ((S -> M7sus4-to-3) (M7sus4-to-3 -> Bb7sus4 Bb7)) S)]) (normalize G)) (make-cfg (U.4 U.5 U.2 U.3 U.0 U.1 S0 S M7sus4-to-3) (Bb7sus4 Bb7) ((M7sus4-to-3 -> U.4 U.5) (U.4 -> Bb7sus4) (U.5 -> Bb7) (S -> U.2 U.3) (U.2 -> Bb7sus4) (U.3 -> Bb7) (S0 -> U.0 U.1) (U.0 -> Bb7sus4) (U.1 -> Bb7)) S0)) (define l1a '((Autumn-Leaves-Opening_withoverrun -> (Straight-Approach -> (U.1832 -> Dm7) (U.1833 -> G7)) (A.229 -> (U.232 -> C) (A.231 -> (U.233 -> F) (Sad-Cadence -> (Sad-Approach -> (U.1714 -> Dm7b5) (U.1715 -> G7)) (U.1719 -> Cm))))))) (define l1b '((Autumn-Leaves-Opening_withoverrun -> (Straight-Approach -> (U.1832 -> Dm7) (U.1833 -> G7)) (A.229 -> (U.237 -> C) (A.231 -> (U.233 -> F) (Sad-Cadence -> (Sad-Approach -> (U.1714 -> Dm7b5) (U.1715 -> G7)) (U.1719 -> Cm))))))) ;;; not apha equivalent to l1a and l1b (define l2 '((Autumn-Leaves-Opening_withoverrun -> (Straight-Approach -> (U.1832 -> Dm7) (U.1833 -> G7)) (A.229 -> (U.233 -> C) (A.231 -> (U.233 -> F) (Sad-Cadence -> (Sad-Approach -> (U.1714 -> Dm7b5) (U.1715 -> G7)) (U.1719 -> Cm))))))) (define l3 '((Autumn-Leaves-Opening_withoverrun -> (Straight-Approach -> (U.1832 -> Dm7) (U.1833 -> G7)) (A.229 -> (U.233 -> D) (A.231 -> (U.233 -> F) (Sad-Cadence -> (Sad-Approach -> (U.1714 -> Dm7b5) (U.1715 -> G7)) (U.1719 -> Cm))))))) (test 'equal-modulo-genny-1 (and (equal-modulo-genny? l1a l1b) #t) #t) (test 'equal-modulo-genny-2 (and (equal-modulo-genny? l1a l2) #t) #f) (test 'equal-modulo-genny-3 (and (equal-modulo-genny? '(U.1 U.2) '(U.3 U.4)) #t) #t) (test 'equal-modulo-genny-4 (and (equal-modulo-genny? '(U.1 U.2) '(U.3 U.3)) #t) #f) (test 'equal-modulo-genny-5 (and (equal-modulo-genny? l1a l3) #t) #f) (test 'equal-modulo-genny-6 (and (equal-modulo-genny? '(U.3 U.3) '(U.1 U.2)) #t) #f)
false
c55e827674501a34668e23fb8c402a78b6516739
b49e6c2edc0c5323f326e045c2a9fc769ba74778
/1.16.ss
ea1249240152b2c8a93f07f0f6e2e88142ff8c1e
[]
no_license
plotgeek/SICP
73d0109d37ca5f9ac2e98d847ecf633acb371021
e773a8071ae2fae768846a2b295b5ed96b019f8d
refs/heads/master
2023-03-09T18:50:54.195426
2012-08-14T10:18:59
2012-08-14T10:18:59
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
141
ss
1.16.ss
(define (_expt b n) (expt-iter b 1 n)) (define (expt-iter a b count) (if (= count 0) b (expt-iter a (* a b) (- count 1))))
false
b900694e4fcf609f0fb9625b9b0f857515d24e16
7b2983fac7e5da6f579bb91f5da7165de4919b4d
/lib-base/implbase/lib/write-string-external.sls
21600d764cb161d05e1f55e1d41fee0c13f47274
[ "LicenseRef-scancode-other-permissive" ]
permissive
okuoku/r7rs-bridge
8fbb0a4a9d69389240119fe7c42a06ba24b28149
845ac2ef01e2d9626e453ec92fa9b0dcd41473c0
refs/heads/master
2020-05-18T11:34:47.643057
2011-11-30T19:35:55
2011-11-30T19:35:55
2,670,878
11
2
null
null
null
null
UTF-8
Scheme
false
false
259
sls
write-string-external.sls
;; FIXME: FAKE (library (implbase lib write-string-external) (export write-string-external) (import (only (rnrs) write) (scheme base)) (begin (define (write-string-external obj port) (write obj port)) ))
false
4c4f46744f4aca9f1ed74a9185244ef1c01a20f8
120324bbbf63c54de0b7f1ca48d5dcbbc5cfb193
/packages/slib/dbcom.scm
4bd63527ae69319d4bbe16a488c6b3942574153b
[ "MIT" ]
permissive
evilbinary/scheme-lib
a6d42c7c4f37e684c123bff574816544132cb957
690352c118748413f9730838b001a03be9a6f18e
refs/heads/master
2022-06-22T06:16:56.203827
2022-06-16T05:54:54
2022-06-16T05:54:54
76,329,726
609
71
MIT
2022-06-16T05:54:55
2016-12-13T06:27:36
Scheme
UTF-8
Scheme
false
false
7,484
scm
dbcom.scm
;;; "dbcom.scm" embed commands in relational-database ; Copyright 1994, 1995, 1997, 2000, 2001 Aubrey Jaffer ; ;Permission to copy this software, to modify it, to redistribute it, ;to distribute modified versions, and to use it for any purpose is ;granted, subject to the following restrictions and understandings. ; ;1. Any copy made of this software must include this copyright notice ;in full. ; ;2. I have made no warranty or representation that the operation of ;this software will be error-free, and I am under no obligation to ;provide any services, by way of maintenance, update, or otherwise. ; ;3. In conjunction with products arising from the use of this ;material, there shall be no use of my name in any advertising, ;promotional, or sales literature without prior written consent in ;each case. (require 'common-list-functions) ;for position (require 'relational-database) (require 'multiarg-apply) (require 'databases) ;@ (define (wrap-command-interface rdb) (let* ((rdms:commands ((rdb 'open-table) '*commands* #f)) (command:get (and rdms:commands (rdms:commands 'get 'procedure)))) (and command:get (letrec ((wdb (lambda (command) (let ((com (command:get command))) (if com ((slib:eval com) wdb) (rdb command)))))) (let ((init (wdb '*initialize*))) (if (procedure? init) init wdb)))))) ;@ (define (open-command-database! path . arg) (define bt (apply open-database! path arg)) (and bt (wrap-command-interface bt))) ;@ (define (open-command-database path . arg) (define bt (apply open-database path arg)) (and bt (wrap-command-interface bt))) ;@ (define (add-command-tables rdb) (define-tables rdb '(type ((name symbol)) () ((atom) (symbol) (string) (number) (money) (date-time) (boolean) (foreign-key) (expression) (virtual))) '(parameter-arity ((name symbol)) ((predicate? expression) (procedure expression)) ((single (lambda (a) (and (pair? a) (null? (cdr a)))) car) (optional (lambda (lambda (a) (or (null? a) (and (pair? a) (null? (cdr a)))))) identity) (boolean (lambda (a) (or (null? a) (and (pair? a) (null? (cdr a)) (boolean? (car a))))) (lambda (a) (if (null? a) #f (car a)))) (nary (lambda (a) #t) identity) (nary1 (lambda (a) (not (null? a))) identity)))) (for-each (((rdb 'open-table) '*domains-data* #t) 'row:insert) '((parameter-list *catalog-data* #f symbol 1) (parameter-name-translation *catalog-data* #f symbol 1) (parameter-arity parameter-arity #f symbol 1) (table *catalog-data* #f atom 1))) (define-tables rdb '(*parameter-columns* *columns* *columns* ((1 #t index #f ordinal) (2 #f name #f symbol) (3 #f arity #f parameter-arity) (4 #f domain #f domain) (5 #f defaulter #f expression) (6 #f expander #f expression) (7 #f documentation #f string))) '(no-parameters *parameter-columns* *parameter-columns* ()) '(no-parameter-names ((name string)) ((parameter-index ordinal)) ()) '(add-domain-params *parameter-columns* *parameter-columns* ((1 domain-name single atom #f #f "new domain name") (2 foreign-table optional table #f #f "if present, domain-name must be existing key into this table") (3 domain-integrity-rule optional expression #f #f "returns #t if single argument is good") (4 type-id single type #f #f "base type of new domain") (5 type-param optional expression #f #f "which (key) field of the foreign-table") )) '(add-domain-pnames ((name string)) ((parameter-index ordinal)) ;should be add-domain-params ( ("n" 1) ("name" 1) ("f" 2) ("foreign (key) table" 2) ("r" 3) ("domain integrity rule" 3) ("t" 4) ("type" 4) ("p" 5) ("type param" 5) )) '(del-domain-params *parameter-columns* *parameter-columns* ((1 domain-name single domain #f #f "domain name"))) '(del-domain-pnames ((name string)) ((parameter-index ordinal)) ;should be del-domain-params (("n" 1) ("name" 1))) '(*commands* ((name symbol)) ((parameters parameter-list) (parameter-names parameter-name-translation) (procedure expression) (documentation string)) ((domain-checker no-parameters no-parameter-names dbcom:check-domain "return procedure to check given domain name") (add-domain add-domain-params add-domain-pnames (lambda (rdb) (((rdb 'open-table) '*domains-data* #t) 'row:update)) "add a new domain") (delete-domain del-domain-params del-domain-pnames (lambda (rdb) (((rdb 'open-table) '*domains-data* #t) 'row:remove)) "delete a domain")))) (let* ((tab ((rdb 'open-table) '*domains-data* #t)) (row ((tab 'row:retrieve) 'type))) ((tab 'row:update) (cons 'type (cdr row)))) (wrap-command-interface rdb)) ;@ (define (define-*commands* rdb . cmd-defs) (define defcmd (((rdb 'open-table) '*commands* #t) 'row:update)) (for-each (lambda (def) (define procname (caar def)) (define args (cdar def)) (define body (cdr def)) (let ((comment (and (string? (car body)) (car body)))) (define nbody (if comment (cdr body) body)) (defcmd (list procname 'no-parameters 'no-parameter-names `(lambda ,args ,@nbody) (or comment ""))))) cmd-defs)) ;; Actually put into command table by add-command-tables (define (dbcom:check-domain rdb) (let* ((ro:domains ((rdb 'open-table) '*domains-data* #f)) (ro:get-dir (ro:domains 'get 'domain-integrity-rule)) (ro:for-tab (ro:domains 'get 'foreign-table))) (lambda (domain) (let ((fkname (ro:for-tab domain)) (dir (slib:eval (ro:get-dir domain)))) (if fkname (let* ((fktab ((rdb 'open-table) fkname #f)) (p? (fktab 'get 1))) (if dir (lambda (e) (and (dir e) (p? e))) p?)) dir))))) ;@ (define (make-command-server rdb command-table) (let* ((comtab ((rdb 'open-table) command-table #f)) (names (comtab 'column-names)) (row-ref (lambda (row name) (list-ref row (position name names)))) (comgetrow (comtab 'row:retrieve))) (lambda (comname command-callback) (cond ((not comname) (set! comname '*default*))) (cond ((not (comgetrow comname)) (slib:error 'command 'not 'known: comname))) (let* ((command:row (comgetrow comname)) (parameter-table ((rdb 'open-table) (row-ref command:row 'parameters) #f)) (parameter-names ((rdb 'open-table) (row-ref command:row 'parameter-names) #f)) (comval ((slib:eval (row-ref command:row 'procedure)) rdb)) (options ((parameter-table 'get* 'name))) (positions ((parameter-table 'get* 'index))) (arities ((parameter-table 'get* 'arity))) (defaulters (map slib:eval ((parameter-table 'get* 'defaulter)))) (domains ((parameter-table 'get* 'domain))) (types (map (((rdb 'open-table) '*domains-data* #f) 'get 'type-id) domains)) (dirs (map (or (rdb 'domain-checker) (lambda (domain) (lambda (domain) #t))) domains)) (aliases (map list ((parameter-names 'get* 'name)) (map (parameter-table 'get 'name) ((parameter-names 'get* 'parameter-index)))))) (command-callback comname comval options positions arities types defaulters dirs aliases)))))
false
048482d52cd37cba2d5f55e41fc7028231637082
bfff08ec416296ebf11ed9181789608f0836419c
/first-edition/chap4.scm
83a00231e6a5cd2c704c63794c3cfde8152ab7f5
[]
no_license
kesava/eopl
8c54bb024ee50478ce6f7835fa1f511236a64175
9c6cf32e9bdc6ff659ecb45feabaa38550e732a5
refs/heads/master
2022-01-24T15:21:30.826989
2021-12-27T02:23:36
2021-12-27T02:23:36
170,910,305
3
0
null
null
null
null
UTF-8
Scheme
false
false
13,153
scm
chap4.scm
#lang eopl ; Section 4.2 ; Exercise 4.2.1 - use beta-reductions ; 1 ; ((lambda (x) (x (y x))) ; z) ; => (z (y z)) ; 2 ; ((lambda (x) (x y)) ; (lambda (y) (x y))) ; => ; ((lambda (z1) (z1 y)) ; (lambda (z2) (x z2))) ; => ; ((lambda (z2) (x z2)) y) ; => ; (x y) ; 3 ; ((lambda (x) ; (lambda (y) ((x y) z))) ; (lambda (a) y)) ; => ; ((lambda (z1) ; (lambda (z2) ((z1 z2) z))) ; (lambda (a) y)) ; => ; ((lambda (z2) ((lambda (a) y) z2) z)) ; => ; ((lambda (a) y) z) ; => ; y ; 4 ; ((lambda (x) ; (lambda (y) ; ((lambda (x) (z x)) ; (lambda (y) (z y))))) ; (lambda (y) y)) ; => ; (lambda (y) ; ((lambda (z1) (z z1)) ; (lambda (z2) (z z2)))) ; Exercise 4.2.2 (define-datatype lc-exp lc-exp? (lit-exp (datum number?)) (var-exp (var symbol?)) (lambda-exp (formal symbol?) (body lc-exp?)) (app-exp (rator lc-exp?) (rand lc-exp?))) (define var-exp? (lambda (exp) (cases lc-exp exp (lit-exp (datum) #f) (var-exp (var) #t) (lambda-exp (formal body) #f) (app-exp (rator rand) #f) (else (eopl:error "lambda-exp?: error in syntax"))))) (define lambda-exp? (lambda (exp) (cases lc-exp exp (lit-exp (datum) #f) (var-exp (var) #f) (lambda-exp (formal body) #t) (app-exp (rator rand) #f) (else (eopl:error "lambda-exp?: error in syntax"))))) (define app-exp? (lambda (exp) (cases lc-exp exp (lit-exp (datum) #f) (var-exp (var) #f) (lambda-exp (formal body) #f) (app-exp (rator rand) #t) (else (eopl:error "lambda-exp?: error in syntax"))))) (define lambda-exp-formal (lambda (exp) (cases lc-exp exp (lit-exp (datum) #f) (var-exp (var) #f) (lambda-exp (formal body) formal) (app-exp (rator rand) #f) (else (eopl:error "lambda-exp-formal: error in syntax"))))) (define lambda-exp-body (lambda (exp) (cases lc-exp exp (lit-exp (datum) #f) (var-exp (var) #f) (lambda-exp (formal body) body) (app-exp (rator rand) #f) (else (eopl:error "lambda-exp-body: error in syntax"))))) (define parse (lambda (datum) (cond ((number? datum) (make-lit-exp datum)) ((symbol? datum) (make-var-exp datum)) ((pair? datum) (if (eq? (car datum) 'lambda) (make-lambda-exp (caadr datum) (parse (caddr datum))) (make-app-exp (parse (car datum)) (parse (cadr datum))))) (else (eopl:error "parse: invalid concrete syntax"))))) (define unparse (lambda (exp) (cases lc-exp exp (lit-exp (datum) datum) (var-exp (var) var) (lambda-exp (formal body) (list 'lambda (list formal) (unparse body))) (app-exp (rator rand) (list (unparse rator) (unparse rand))) (else (eopl:error "unparse: invalid abstract sybtax" exp))))) (define free? (lambda (var exp) (cases lc-exp exp (lit-exp (datum) #f) (var-exp (v) (eq? v var)) (lambda-exp (formal body) (if (eq? formal var) #f (free? var body))) (app-exp (rator rand) (or (free? var rator) (free? var rand)))))) (define beta-redex? (lambda (exp) (cases lc-exp exp (lit-exp (datum) #f) (var-exp (var) #f) (lambda-exp (formal body) #f) (app-exp (rator rand) (and (lambda-exp? rator) (lc-exp? rand))) (else (eopl:error "beta-redex?: invalid concrete syntax"))))) (beta-redex? (parse '(lambda (x) (y z)))) ; #f (beta-redex? (parse '((lambda (x) (y z)) z))) ; #t (beta-redex? (parse '(lambda (x) ((lambda (x) (y x)) z)))) ; #f (define beta-redex-lambda (lambda (r-exp) (cases lc-exp r-exp (lit-exp (datum) #f) (var-exp (var) #f) (lambda-exp (formal body) #f) (app-exp (rator rand) rator) (else (eopl:error "beta-redex-lambda: invalid concrete syntax"))))) (define beta-redex-var (lambda (r-exp) (cases lc-exp r-exp (lit-exp (datum) #f) (var-exp (var) #f) (lambda-exp (formal body) #f) (app-exp (rator rand) rand) (else (eopl:error "beta-redex-lambda: invalid concrete syntax"))))) (define gensym (let ([counter 1233]) (lambda ([x 'g0]) (if (number? x) (set! counter x) (begin (set! counter (+ counter 1)) (string->symbol (string-append (symbol->string x) (number->string counter)))))))) (define substitute (lambda (e m x) (cases lc-exp e (lit-exp (datum) datum) (var-exp (var) (if (equal? e (parse x)) m e)) (lambda-exp (formal body) (cond ((equal? formal (parse x)) e) ((not (free? x body)) e) ((not (free? formal m)) (make-lambda-exp formal (substitute body m x))) (else (let ((z (gensym))) (make-lambda-exp z (substitute (substitute body (parse z) formal) m x)))))) (app-exp (rator rand) (make-app-exp (substitute rator m x) (substitute rand m x))) (else (eopl:error "substitute: invalid concrete syntax"))))) (unparse (substitute (parse '(a b)) (parse 'c) 'b)) ; (a c) (unparse (substitute (parse '(lambda (a) (a b))) (parse 'a) 'b)) ; (lambda (g01234) (g01234 a)) ; Exercise 4.2.4 (define beta-reduce (lambda (r-exp) (if (beta-redex? r-exp) (let ((e (lambda-exp-body (beta-redex-lambda r-exp))) (m (beta-redex-var r-exp)) (x (lambda-exp-formal (beta-redex-lambda r-exp)))) (substitute e m x)) r-exp))) (unparse (beta-reduce (parse '((lambda (x) (y x)) z)))) ; (y z) (unparse (beta-reduce (parse '((lambda (x) (lambda (y) (x y))) (y w))))) ;(lambda (g01235) ((y w) g01235)) ; Exercise 4.2.5 (define eta-redex? (lambda (exp) (if (lambda-exp? exp) (free? (lambda-exp-formal exp) (lambda-exp-body exp)) #f))) (eta-redex? (parse '(lambda (x) (y x)))) ; #t (eta-redex? (parse '(lambda (x) ((lambda (y) y) x)))) ; #t (eta-redex? (parse '((lambda (x) (y x)) z))) ; #f (define answer? (lambda (exp) (not (app-exp? exp)))) (define reduce-once-appl (lambda (exp succeed fail) (cases lc-exp exp (lit-exp (datum) (fail)) (var-exp (var) (fail)) (lambda-exp (formal body) (fail)) (app-exp (rator rand) (if (and (beta-redex? exp) (answer? rand)) (succeed (beta-reduce exp)) (reduce-once-appl rator (lambda (reduced-rator) (succeed (make-app-exp reduced-rator rand))) (lambda () (reduce-once-appl rand (lambda (reduced-rand) (succeed (make-app-exp rator reduced-rand))) fail)))))))) ; Exercise 4.3.1 (define reduce-history (lambda (exp n) (if (eq? n 0) '() (reduce-once-appl (if (lc-exp? exp) exp (parse exp)) (lambda (e) (cons (unparse e) (reduce-history e (- n 1)))) (lambda () '()))))) (reduce-history '((lambda (x) (x ((lambda (x) y) z))) w) 5) ; ((w ((lambda (x) y) z)) (w y)) (reduce-history '((lambda (x) (x x)) (lambda (x) (x x))) 5) ; (((lambda (x) (x x)) (lambda (x) (x x))) ((lambda (x) (x x)) (lambda (x) (x x))) ((lambda (x) (x x)) (lambda (x) (x x))) ((lambda (x) (x x)) (lambda (x) (x x))) ((lambda (x) (x x)) (lambda (x) (x x)))) ; Exercise 4.3.2 (define reduce* (lambda (exp n) (let ((result (reduce-history exp n))) (if (eq? (length result) n) #f (car (reverse result)))))) (reduce* '((lambda (x) (x ((lambda (x) y) z))) w) 5) ; (w y) (reduce* '((lambda (x) (x x)) (lambda (x) (x x))) 5) ; #f ; Exercise 4.3.3 ; ribassoc ; Exercise 4.3.4 ; reduce-once-appl with + ; Exercise 4.3.5 (define reduce-once-leftmost (lambda (exp succeed fail) (cases lc-exp exp (lit-exp (datum) (fail)) (var-exp (var) (fail)) (lambda-exp (formal body) (if (beta-redex? body) (reduce-once-leftmost body (lambda (reduced-body) (succeed (make-lambda-exp formal reduced-body))) (fail)) (fail))) (app-exp (rator rand) (cond ((beta-redex? exp) (succeed (beta-reduce exp))) (else (reduce-once-leftmost rator (lambda (reduced-rator) (succeed (make-app-exp reduced-rator rand))) (lambda () (reduce-once-leftmost rand (lambda (reduced-rand) (succeed (make-app-exp rator reduced-rand))) fail))))))))) (define reduce-history-leftmost (lambda (exp n) (if (eq? n 0) '() (reduce-once-leftmost (if (lc-exp? exp) exp (parse exp)) (lambda (e) (cons (unparse e) (reduce-history-leftmost e (- n 1)))) (lambda () '()))))) (reduce-history-leftmost '((lambda (x) (x ((lambda (x) y) z))) w) 5) ; ((w ((lambda (x) y) z)) (w y)) (reduce-history-leftmost '((lambda (y) z) ((lambda (x) (x x)) (lambda (x) (x x)))) 5) ; (z) ; Exercise 4.4.2 ; Exercise 4.4.3 ; TODO: Need to get better at Y-combinator lambda calculus (define for-each (lambda (proc lst) (if (null? lst) 'done (begin (proc (car lst)) (for-each proc (cdr lst)))))) (define displayln (lambda lst (begin (for-each display lst) (newline)))) ; (displayln 2 "+" 2 "=" (+ 2 2)) ; 2+2=4 (define read-eval-print (lambda () (display "--> ") (write (eval (read))) (newline) (read-eval-print))) ; (read-eval-print) ; --> (+ 1 2) ; 3 ; --> (car (cons "foo" 'foo)) ; "foo" ; Exercise 4.5.1 (define reduce*-repl (lambda () (display "--> ") (write (reduce* (read) 5)) (newline) (reduce*-repl))) ; (reduce*-repl) ; '((lambda (x) (x ((lambda (x) y) z))) w) ; '(w y) ; Exercise 4.5.2 ; Doesnt mutate global value, works only in local scope (define set-cdr! (lambda (lst ncdr) (set! lst (cons (car lst) ncdr)))) (define reverse! (letrec ((loop (lambda (last ls) (let ((next (cdr ls))) (set-cdr! ls last) (if (null? next) ls (loop ls next)))))) (lambda (ls) (if (null? ls) ls (loop '() ls))))) ; Exercise 4.6.1 (define make-stack (lambda (size) (let ((stk (make-vector size)) (pos 0)) (lambda (message) (case message ((empty?) (lambda () (eq? pos 0))) ((push!) (lambda (x) (begin (vector-set! stk pos x) (set! pos (+ pos 1))))) ((pop!) (lambda () (if (eq? pos 0) (eopl:error "Stack empty") (begin (set! pos (- pos 1)) (vector-ref stk pos))))) ((top) (lambda () (if (eq? pos 0) (eopl:error "Stack empty") (vector-ref stk (- pos 1))))) (else (eopl:error "stack: invalid message -- " message))))))) (define s1 (make-stack 10)) ((s1 'push!) 7) ((s1 'push!) 4) ((s1 'push!) 2) ((s1 'top)) ; 2 ((s1 'pop!)) ; 2 ((s1 'top)) ; 4 ((s1 'pop!)) ; 4 ((s1 'pop!)) ; 7 ; Exercise 4.6.2 (define make-ff (lambda (current-env) (let ((env current-env)) (lambda (message) (case message ((empty?) (lambda () (null? env))) ((extend) (lambda (sym val) (begin (set! env (cons (list sym val) env)) (make-ff env)))) ((apply) (lambda (sym) (letrec ((findsym (lambda (envr) (if (null? envr) (eopl:error "No association for symbol: " sym) (if (eq? (caar envr) sym) (cadar envr) (findsym (cdr envr))))))) (findsym env)))) ((print) (lambda () (display env))) (else (eopl:error "Invalid message for make-ff"))))))) ; Exercise 4.6.3 (define next-symbol (let ((c 0)) (lambda () (set! c (+ c 1)) (string->symbol (string-append "g" (number->string c)))))) (eq? (next-symbol) 'g1) ; #t (eq? (next-symbol) 'g2) ; #t (eq? (next-symbol) (next-symbol)) ; #f ; Exercise 4.7.1 and 4.7.2 ; Streams ADT
false
530edd420875499c11091fd99d3a02128a33c37b
1dfe3abdff4803aee6413c33810f5570d0061783
/.chezscheme_libs/spells/foreign/frozen-bytes.sls
02374ea68516d49f6aeaabda0064bf3cf9b704ac
[]
no_license
Saigut/chezscheme-libs
73cb315ed146ce2be6ae016b3f86cf3652a657fc
1fd12abbcf6414e4d50ac8f61489a73bbfc07b9d
refs/heads/master
2020-06-12T14:56:35.208313
2016-12-11T08:51:15
2016-12-11T08:51:15
75,801,338
6
2
null
null
null
null
UTF-8
Scheme
false
false
1,759
sls
frozen-bytes.sls
#!r6rs ;;; frozen-bytes.sls --- ;; Copyright (C) 2009, 2011, 2015 Andreas Rottmann <[email protected]> ;; Author: Andreas Rottmann <[email protected]> ;; This program is free software, you can redistribute it and/or ;; modify it under the terms of the new-style BSD license. ;; You should have received a copy of the BSD license along with this ;; program. If not, see <http://www.debian.org/misc/bsd.license>. ;;; Commentary: ;;; Code: (library (spells foreign frozen-bytes) (export freeze-bytes unfreeze-bytes frozen-bytes-pointer) (import (rnrs base) (rnrs control) (rnrs bytevectors) (rnrs records syntactic) (spells foreign compat)) (define-record-type frozen-bytes (fields ptr bv start len)) (define freeze-bytes (case-lambda ((direction bv start end) (let ((len (- end start))) (case direction ((in) (memcpy (malloc len) 0 bv start len)) ((out) (make-frozen-bytes (malloc len) bv start len)) ((inout) (make-frozen-bytes (memcpy (malloc len) 0 bv start len) bv start len)) (else (error 'freeze-bytes "invalid direction" direction))))) ((direction bv start) (freeze-bytes direction bv start (bytevector-length bv))) ((direction bv) (freeze-bytes direction bv 0 (bytevector-length bv))))) (define (frozen-bytes-pointer x) (if (frozen-bytes? x) (frozen-bytes-ptr x) x)) (define (unfreeze-bytes x) (cond ((frozen-bytes? x) (memcpy (frozen-bytes-bv x) (frozen-bytes-start x) (frozen-bytes-ptr x) 0 (frozen-bytes-len x)) (free (frozen-bytes-ptr x))) (else (free x)))) )
false
8c545310f9e7ef8f12cb77e1c04e40688a0aa343
0ffe5235b0cdac3846e15237c2232d8b44995421
/src/scheme/Section_1.2/1.18.scm
ea9b175e916358092d17d4ff9c645060aba9d82e
[]
no_license
dawiedotcom/SICP
4d05014ac2b075b7de5906ff9a846e42298fa425
fa6ccac0dad8bdad0645aa01197098c296c470e0
refs/heads/master
2020-06-05T12:36:41.098263
2013-05-16T19:41:38
2013-05-16T19:41:38
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
286
scm
1.18.scm
; SICP Exercise 1.18 ; Dawie de Klerk ; 2012-08-06 (define (double a) (+ a a)) (define (half a) (/ a 2)) (define (mul a b) (define (mul-iter a b n) (cond ((zero? b) n) ((even? b) (mul-iter (double a) (half b) n)) (else (mul-iter a (- b 1) (+ n a))))) (mul-iter a b 0))
false
3ceacb271268ba020dc0e80549b6086e325c6b2c
2ff2fa5117000f0a5d0a755481e755133978c61c
/scenes/tower.scm
cb1b366960bd70f361609f0b11897298c77f8b5b
[]
no_license
ChrisBlom/dendrite
d9d2665b4d0ec933ff7b48a202aa83781974c621
a40ba97061020f04452da7ef640e2d81f00b9a55
refs/heads/master
2022-07-19T00:14:34.093545
2022-07-02T18:15:23
2022-07-02T18:17:00
180,216,617
0
0
null
null
null
null
UTF-8
Scheme
false
false
1,829
scm
tower.scm
(use (prefix chipmunk cp:) ringbuffer clojurian-syntax srfi-42 gl-math chipmunk-utils synth-utils scene) (define wsz 5) (define the-damping 0.5) (define (init-scene scene-node space) (set! (cp:space-gravity space) (cp:v 0 -9.8)) (define stiffness 50.) ;; walls (let ([wall-friction 1.0] [wall-elasticity 0.95] [right 20] [l -40] [r 40] [bottom -10] [top 60 ]) (cp:space-add-shapes space (doto (fixed-line-segment space (cp:v l bottom) (cp:v l top) radius: 0.4) (cp:shape-set-elasticity wall-elasticity) (cp:shape-set-friction wall-friction)) (doto (fixed-line-segment space (cp:v l top) (cp:v r top) radius: 0.4) (cp:shape-set-elasticity wall-elasticity) (cp:shape-set-friction wall-friction)) (doto (fixed-line-segment space (cp:v r top) (cp:v r bottom) radius: 0.4) (cp:shape-set-elasticity wall-elasticity) (cp:shape-set-friction wall-friction)) (doto (fixed-line-segment space (cp:v r bottom) (cp:v l bottom) radius: 0.4) (cp:shape-set-elasticity wall-elasticity) (cp:shape-set-friction wall-friction)) (doto (fixed-line-segment space (cp:v -2 bottom) (cp:v l (* 0.5 bottom)) radius: 0.4) (cp:shape-set-elasticity wall-elasticity) (cp:shape-set-friction wall-friction)))) (for-each (lambda (j) (list-ec (:range i 0 40) (box-node scene-node space (cp:v (+ (* 0.25 (% i 2)) (* j 0.51)) (+ -9 (* i 0.49))) #:mass 0.1))) (range -6 6)) ;; (poly-node scene-node space ;; #:postion (cp:v 0 0) ;; #:vertices ;; (list (cp:v -3 7) ;; (cp:v 3 7) ;; (cp:v 0.1 9) ;; (cp:v -0.1 9))) (list "tower" scene-node space)) (set-init init-scene)
false
959e8fc106b7f6b8e185429d3d9443937dafe478
b39668eccdb1b003b6f98ea6e7a92c7bb2b5e951
/phase-std-bundle.bak
4843c2586bc4a28c8a64f918ee718837452ee484
[]
no_license
angryzor/magic-the-gathering-project
d9c1f99bfbb38a8f9850427140d72db8c691297c
a58993eae9a7b0130353735b2d09ae6c8b07b006
refs/heads/master
2021-01-01T17:17:16.742759
2013-01-12T17:32:04
2013-01-12T17:32:04
7,578,284
0
1
null
null
null
null
UTF-8
Scheme
false
false
1,486
bak
phase-std-bundle.bak
#!r6rs (library (export phase-std-bundle) (import (rnrs base (6)) (rnrs magic objects) (rnrs magic phase-type)) (define (phase-std-bundle game . this) (define beginning-untap (phase-beginning-untap-state game)) (define beginning-upkeep (phase-beginning-upkeep-state)) (define beginning-draw (phase-beginning-draw-state)) (define first-main (phase-main-state)) (define combat-begin (phase-combat-begin-state)) (define combat-declare-attackers (phase-combat-declare-attackers-state)) (define combat-declare-blockers (phase-combat-declare-blockers-state)) (define combat-damage (phase-combat-damage-state)) (define combat-end (phase-combat-end-state)) (define second-main (phase-main-state)) (define end-end-of-turn (phase-end-end-of-turn-state)) (define end-cleanup (phase-end-cleanup-state)) (define (get-beginning-untap) beginning-untap) (define (get-beginning-upkeep) beginning-upkeep) (define (get-beginning-draw) beginning-draw) (define (get-first-main) first-main) (define (get-combat-begin) combat-begin) (define (get-combat-declare-attackers) combat-declare-attackers) (define (get-combat-declare-blockers) combat-declare-blockers) (define (get-combat-damage) combat-damage) (define (get-combat-end) combat-end) (define (get-second-main) second-main) (define (get-end-end-of-turn) end-end-of-turn) (define (get-end-cleanup) end-cleanup) (
false
7f8d64a2901dfe6e9e2695299b940b25786cda90
b0c1935baa1e3a0b29d1ff52a4676cda482d790e
/tests/t-case.scm
b20ba147702dd8d9f389495f3a90687246855eed
[ "MIT" ]
permissive
justinethier/husk-scheme
35ceb8f763a10fbf986340cb9b641cfb7c110509
1bf5880b2686731e0870e82eb60529a8dadfead1
refs/heads/master
2023-08-23T14:45:42.338605
2023-05-17T00:30:56
2023-05-17T00:30:56
687,620
239
28
MIT
2023-05-17T00:30:07
2010-05-26T17:02:56
Haskell
UTF-8
Scheme
false
false
1,411
scm
t-case.scm
;; ;; husk-scheme ;; http://github.com/justinethier/husk-scheme ;; ;; Written by Justin Ethier ;; ;; Test cases for case form ;; (unit-test-start "case") ; Tests from spec (assert/equal (case (* 2 3) ((2 3 5 7) 'prime) ((1 4 6 8 9) 'composite)) 'composite) (assert/equal (case (car '(c d)) ((a e i o u) 'vowel) ((w y) 'semivowel) (else 'consonant)) 'consonant) ; This is no longer a valid test case. ; Per R5RS the result is unspecified; in husk ; it is a value we cannot test for directly. ;(assert/equal (case (car '(c d)) ; ((a) 'a) ; ((b) 'b)) ; #f) ; Misc test cases (assert/equal (case (* 2 3) ((6) '(#t)) (else #f)) '(#t)) (assert/equal (case (* 2 3) ((6) '(#t)) (else #f)) '(#t)) (assert/equal (case (* 2 3) ((6) 6) (else #f)) 6) (assert/equal (case (* 2 3) ((8 9 10 2 3 4 5 1 3 6) #t) (else #f)) #t) (assert/equal (case (* 2 3) ((4) #f) (else '(#t))) '(#t)) (assert/equal (case (* 2 3) ((4 5 7 9 4 2 10) #f) (else '(#t))) '(#t)) (assert/equal (case (* 2 3) (else #t)) #t) ; First clause has no datums (assert/equal (case 1 (() 'test) (else 'pass)) 'pass) (assert/equal (case (car '(c d)) ((a e i o u) 'vowel) ((w y) 'semivowel) (else => (lambda (x) x))) 'c) (unit-test-handler-results)
false
7184af03bec5497ea5f6885786cadd4813196be8
657a95c82617af612da2a5fa410ac44a67a39feb
/sicp/01/1.36.ss
023863c3078cc589af2d9c54bca1cc611739b784
[]
no_license
wangjiezhe/sicp
ed16395576ac163f000b6dc59ef4928bfab3013f
635dad3bc6dacd07665c17eba2bbe4fcdbbb530f
refs/heads/master
2020-04-06T07:02:32.281885
2016-08-20T08:10:24
2016-08-20T08:10:24
57,348,685
0
0
null
null
null
null
UTF-8
Scheme
false
false
1,641
ss
1.36.ss
(load "../helper.ss") (define (fixed-point f first-guess) (define (close-enough? v1 v2) (< (abs (- v1 v2)) tolerance)) (define (try guess) (let ([next (f guess)]) (cond [(close-enough? guess next) (print guess next)] [else (print guess) (try next)]))) (try first-guess)) (define (find-root) (fixed-point (lambda (x) (/ (log 1000) (log x))) 2.0)) ;;; => ;; 2.0 ;; 9.965784284662087 ;; 3.004472209841214 ;; 6.279195757507157 ;; 3.759850702401539 ;; 5.215843784925895 ;; 4.182207192401397 ;; 4.8277650983445906 ;; 4.387593384662677 ;; 4.671250085763899 ;; 4.481403616895052 ;; 4.6053657460929 ;; 4.5230849678718865 ;; 4.577114682047341 ;; 4.541382480151454 ;; 4.564903245230833 ;; 4.549372679303342 ;; 4.559606491913287 ;; 4.552853875788271 ;; 4.557305529748263 ;; 4.554369064436181 ;; 4.556305311532999 ;; 4.555028263573554 ;; 4.555870396702851 ;; 4.555315001192079 ;; 4.5556812635433275 ;; 4.555439715736846 ;; 4.555599009998291 ;; 4.555493957531389 ;; 4.555563237292884 ;; 4.555517548417651 ;; 4.555547679306398 ;; 4.555527808516254 ;; 4.555540912917957 ;; 4.555532270803653 ;; 4.555537970114198 ;; 4.555534211524127 ;; 4.555536690243655 ;; 4.555535055574168 ;; 4.5555361336081 ;; 4.555535422664798 (define (find-root-damping) (fixed-point (lambda (x) (average x (/ (log 1000) (log x)))) 2.0)) ;;; => ;; 2.0 ;; 5.9828921423310435 ;; 4.922168721308343 ;; 4.628224318195455 ;; 4.568346513136242 ;; 4.5577305909237005 ;; 4.555909809045131 ;; 4.555599411610624 ;; 4.5555465521473675 ;; 4.555537551999825 ;; 4.555536019631145 ;; 4.555535758730802
false
3a00100a94be0706fe3ab655f1134c28165d63de
a8216d80b80e4cb429086f0f9ac62f91e09498d3
/lib/chibi/regexp.scm
0754f8e8bc3bf4ed22755b740d5a6f6c1656675a
[ "BSD-3-Clause" ]
permissive
ashinn/chibi-scheme
3e03ee86c0af611f081a38edb12902e4245fb102
67fdb283b667c8f340a5dc7259eaf44825bc90bc
refs/heads/master
2023-08-24T11:16:42.175821
2023-06-20T13:19:19
2023-06-20T13:19:19
32,322,244
1,290
223
NOASSERTION
2023-08-29T11:54:14
2015-03-16T12:05:57
Scheme
UTF-8
Scheme
false
false
47,764
scm
regexp.scm
;; regexp.scm -- simple non-bactracking NFA implementation ;; Copyright (c) 2013-2016 Alex Shinn. All rights reserved. ;; BSD-style license: http://synthcode.com/license.txt ;;; An rx represents a start state and meta-info such as the number ;;; and names of submatches. (define-record-type Rx (make-rx start-state num-matches num-save-indexes non-greedy-indexes match-rules match-names sre) regexp? (start-state rx-start-state rx-start-state-set!) (num-matches rx-num-matches rx-num-matches-set!) (num-save-indexes rx-num-save-indexes rx-num-save-indexes-set!) (non-greedy-indexes rx-non-greedy-indexes rx-non-greedy-indexes-set!) (match-rules rx-rules rx-rules-set!) (match-names rx-names rx-names-set!) (sre regexp->sre)) ;; Syntactic sugar. (define-syntax rx (syntax-rules () ((rx sre ...) (regexp `(: sre ...))))) ;;; A state is a single nfa state with transition rules. (define-record-type State (%make-state accept? chars match match-rule next1 next2 id) state? ;; A boolean indicating if this is an accepting state. (accept? state-accept? state-accept?-set!) ;; A char or char-set indicating when we can transition. ;; Alternately, #f indicates an epsilon transition, while a ;; procedure of the form (lambda (ch i matches) ...) is a predicate ;; which should return #t if the char matches. (chars state-chars state-chars-set!) ;; A single integer indicating the match position to record. (match state-match state-match-set!) ;; The rule for merging ambiguous matches. Can be any of: left, ;; right, (list i j). Posix semantics are equivalent to using left ;; for the beginning of a submatch and right for the end. List is ;; used to capture a list of submatch data in the current match. (match-rule state-match-rule state-match-rule-set!) ;; The destination if the char match succeeds. (next1 state-next1 state-next1-set!) ;; An optional additional transition used for forking to two states. (next2 state-next2 state-next2-set!) ;; A unique (per regexp) id for debugging. (id state-id)) (define (make-state accept? chars match match-rule next1 next2 id) (if (and next1 (not (state? next1))) (error "expected a state" next1)) (if (and next2 (not (state? next2))) (error "expected a state" next2)) (%make-state accept? chars match match-rule next1 next2 id)) (define ~none 0) (define ~ci? 1) (define ~ascii? 2) (define ~nocapture? 4) (define (flag-set? flags i) (= i (bitwise-and flags i))) (define (flag-join a b) (if b (bitwise-ior a b) a)) (define (flag-clear a b) (bitwise-and a (bitwise-not b))) (define (char-set-ci cset) (char-set-fold (lambda (ch res) (char-set-adjoin! (char-set-adjoin! res (char-upcase ch)) (char-downcase ch))) (char-set) cset)) (define (make-char-state ch flags next id) (if (flag-set? flags ~ci?) (let ((cset (cond ((char? ch) (char-set-ci (char-set ch))) ((char-set? ch) (char-set-ci ch)) (else ch)))) (make-state #f cset #f #f next #f id)) (make-state #f ch #f #f next #f id))) (define (make-fork-state next1 next2 id) (make-state #f #f #f #f next1 next2 id)) (define (make-epsilon-state next id) (make-fork-state next #f id)) (define (make-accept-state id) (make-state #t #f #f #f #f #f id)) ;; A record holding the current match data - essentially a wrapper ;; around a vector, plus a reference to the RX for meta-info. (define-record-type Regexp-Match (%make-regexp-match matches rx string) regexp-match? (matches regexp-match-matches regexp-match-matches-set!) (rx regexp-match-rx) (string regexp-match-string)) (define (regexp-match-rules md) (rx-rules (regexp-match-rx md))) (define (regexp-match-names md) (rx-names (regexp-match-rx md))) (define (make-regexp-match len rx str) (%make-regexp-match (make-vector len #f) rx str)) (define (make-regexp-match-for-rx rx str) (make-regexp-match (rx-num-save-indexes rx) rx str)) (define (regexp-match-count md) (- (quotient (vector-length (regexp-match-matches md)) 2) 1)) (define (regexp-match-name-offset md name) (let lp ((ls (regexp-match-names md)) (first #f)) (cond ((null? ls) (or first (error "unknown match name" md name))) ((eq? name (caar ls)) (if (regexp-match-submatch-start+end md (cdar ls)) (cdar ls) (lp (cdr ls) (or first (cdar ls))))) (else (lp (cdr ls) first))))) (define (regexp-match-ref md n) (vector-ref (regexp-match-matches md) (if (integer? n) n (regexp-match-name-offset md n)))) (define (regexp-match-set! md n val) (vector-set! (regexp-match-matches md) n val)) (define (copy-regexp-match md) (let* ((src (regexp-match-matches md)) (len (vector-length src)) (dst (make-vector len #f))) (do ((i 0 (+ i 1))) ((= i len) (%make-regexp-match dst (regexp-match-rx md) (regexp-match-string md))) (vector-set! dst i (vector-ref src i))))) ;;> Returns the matching result for the given named or indexed ;;> submatch \var{n}, possibly as a list for a submatch-list, or ;;> \scheme{#f} if not matched. (define (regexp-match-submatch/list md n) (let ((n (if (integer? n) n (regexp-match-name-offset md n)))) (cond ((>= n (vector-length (regexp-match-rules md))) #f) (else (let ((rule (vector-ref (regexp-match-rules md) n))) (cond ((pair? rule) (let ((start (regexp-match-ref md (car rule))) (end (regexp-match-ref md (cdr rule))) (str (regexp-match-string md))) (and start end (substring-cursor str start end)))) (else (let ((res (regexp-match-ref md rule))) (if (pair? res) (reverse res) res))))))))) ;;> Returns the matching substring for the given named or indexed ;;> submatch \var{n}, or \scheme{#f} if not matched. (define (regexp-match-submatch md n) (let ((res (regexp-match-submatch/list md n))) (if (pair? res) (car res) res))) (define (regexp-match-submatch-start+end md n) (let ((n (if (integer? n) n (regexp-match-name-offset md n)))) (and (< n (vector-length (regexp-match-rules md))) (let ((rule (vector-ref (regexp-match-rules md) n))) (if (pair? rule) (let ((start (regexp-match-ref md (car rule))) (end (regexp-match-ref md (cdr rule))) (str (regexp-match-string md))) (and start end (cons (string-cursor->index str start) (string-cursor->index str end)))) #f))))) ;;> Returns the start index for the given named or indexed submatch ;;> \var{n}, or \scheme{#f} if not matched. (define (regexp-match-submatch-start md n) (cond ((regexp-match-submatch-start+end md n) => car) (else #f))) ;;> Returns the end index for the given named or indexed submatch ;;> \var{n}, or \scheme{#f} if not matched. (define (regexp-match-submatch-end md n) (cond ((regexp-match-submatch-start+end md n) => cdr) (else #f))) (define (regexp-match-convert recurse? md str) (cond ((vector? md) (let lp ((i 0) (res '())) (cond ((>= i (vector-length md)) (reverse res)) ((string-cursor? (vector-ref md i)) (lp (+ i 2) (cons (substring-cursor str (vector-ref md i) (vector-ref md (+ i 1))) res))) (else (lp (+ i 1) (cons (regexp-match-convert recurse? (vector-ref md i) str) res)))))) ((list? md) (if recurse? (map (lambda (x) (regexp-match-convert recurse? x str)) (reverse md)) (regexp-match-convert recurse? (car md) str))) ((and (pair? md) (string-cursor? (car md)) (string-cursor? (cdr md))) (substring-cursor str (car md) (cdr md))) ((regexp-match? md) (regexp-match-convert recurse? (regexp-match-matches md) (regexp-match-string md))) (else md))) ;;> Convert an regexp-match result to a list of submatches, beginning ;;> with the full match, using \scheme{#f} for unmatched submatches. (define (regexp-match->list md) (regexp-match-convert #f md #f)) ;;> Convert an regexp-match result to a forest of submatches, beginning ;;> with the full match, using \scheme{#f} for unmatched submatches. (define (regexp-match->sexp md) (regexp-match-convert #t md #f)) ;; Collect results from a list match. (define (match-collect md spec) (define (match-extract md n) (let* ((vec (regexp-match-matches md)) (rules (regexp-match-rules md)) (n-rule (vector-ref rules n)) (rule (vector-ref rules n-rule))) (if (pair? rule) (let ((start (regexp-match-ref md (car rule))) (end (regexp-match-ref md (cdr rule)))) (and start end (cons start end))) (regexp-match-ref md rule)))) (let ((end (cadr spec)) (vec (regexp-match-matches md))) (let lp ((i (+ 1 (car spec))) (ls '())) (if (>= i end) (reverse ls) (lp (+ i 1) (cons (match-extract md i) ls)))))) ;; A searcher represents a single rx state and match information. (define-record-type Searcher (make-searcher state matches) searcher? (state searcher-state searcher-state-set!) (matches searcher-matches searcher-matches-set!)) ;; Merge two regexp-matches, preferring the leftmost-longest of their ;; matches, or shortest for non-greedy matches. (define (regexp-match>=? m1 m2) (let ((non-greedy-indexes (rx-non-greedy-indexes (regexp-match-rx m1))) (end (- (vector-length (regexp-match-matches m1)) 1))) (let lp ((i 0)) (cond ((>= i end) #t) ((and (eqv? (regexp-match-ref m1 i) (regexp-match-ref m2 i)) (eqv? (regexp-match-ref m1 (+ i 1)) (regexp-match-ref m2 (+ i 1)))) (lp (+ i 2))) (else (not (and (string-cursor? (regexp-match-ref m2 i)) (or (not (string-cursor? (regexp-match-ref m1 i))) (string-cursor<? (regexp-match-ref m2 i) (regexp-match-ref m1 i)) ;; sanity check for incompletely advanced epsilons (and (string-cursor? (regexp-match-ref m1 (+ i 1))) (string-cursor<? (regexp-match-ref m1 (+ i 1)) (regexp-match-ref m1 i))) ((if (memq (+ i 1) non-greedy-indexes) not values) (and (string-cursor=? (regexp-match-ref m2 i) (regexp-match-ref m1 i)) (or (not (string-cursor? (regexp-match-ref m2 (+ i 1)))) (and (string-cursor? (regexp-match-ref m1 (+ i 1))) (string-cursor>? (regexp-match-ref m2 (+ i 1)) (regexp-match-ref m1 (+ i 1))))))))))))))) (define (regexp-match-max m1 m2) (if (regexp-match>=? m1 m2) m1 m2)) ;; Merge match data from sr2 into sr1, preferring the leftmost-longest ;; match in the event of a conflict. (define (searcher-merge! sr1 sr2) (let ((m (regexp-match-max (searcher-matches sr1) (searcher-matches sr2)))) (if (not (eq? m (searcher-matches sr1))) (searcher-matches-set! sr1 (copy-regexp-match m))))) (define (searcher-max sr1 sr2) (if (or (not (searcher? sr2)) (regexp-match>=? (searcher-matches sr1) (searcher-matches sr2))) sr1 sr2)) (define (searcher-start-match sr) (regexp-match-ref (searcher-matches sr) 0)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; A posse is a group of searchers. (define (make-posse . o) (make-hash-table eq?)) (define posse? hash-table?) (define (posse-empty? posse) (zero? (hash-table-size posse))) (define (posse-ref posse sr) (hash-table-ref/default posse (searcher-state sr) #f)) (define (posse-add! posse sr) (hash-table-set! posse (searcher-state sr) sr)) (define (posse-clear! posse) (hash-table-walk posse (lambda (key val) (hash-table-delete! posse key)))) (define (posse-for-each proc posse) (hash-table-walk posse (lambda (key val) (proc val)))) (define (posse-every pred posse) (hash-table-fold posse (lambda (key val acc) (and acc (pred val))) #t)) (define (posse->list posse) (hash-table-values posse)) (define (list->posse ls) (let ((searchers (make-posse))) (for-each (lambda (sr) (posse-add! searchers sr)) ls) searchers)) (define (posse . args) (list->posse args)) (define (make-start-searcher rx str) (make-searcher (rx-start-state rx) (make-regexp-match-for-rx rx str))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Execution ;; A transition which doesn't advance the index. (define (epsilon-state? st) (or (not (state-chars st)) (procedure? (state-chars st)))) ;; Match the state against a char and index. (define (state-matches? st str i ch start end matches) (let ((matcher (state-chars st))) (cond ((char? matcher) (eqv? matcher ch)) ((char-set? matcher) (char-set-contains? matcher ch)) ((pair? matcher) (and (char<=? (car matcher) ch) (char<=? ch (cdr matcher)))) ((procedure? matcher) (matcher str i ch start end matches)) ((not matcher)) (else (error "unknown state matcher" (state-chars st)))))) ;; Advance epsilons together - if the State is newly added to the ;; group and is an epsilon state, recursively add the transition. (define (posse-advance! new seen accept sr str i start end) (let advance! ((sr sr)) (let ((st (searcher-state sr))) ;; Update match data. (cond ((state-match st) (let* ((index (state-match st)) (matches (searcher-matches sr)) (before (copy-regexp-match matches))) (cond ((pair? index) ;; Submatch list, accumulate and push. (let* ((prev (regexp-match-ref matches (car index))) (new (cons (match-collect matches (cdr index)) (if (pair? prev) prev '())))) (regexp-match-set! matches (car index) new))) ((not (and (eq? 'non-greedy-left (state-match-rule st)) (regexp-match-ref matches index) (string-cursor>=? (regexp-match-ref matches index) (regexp-match-ref matches (- index 1))))) (regexp-match-set! matches index i)))))) ;; Follow transitions. (cond ((state-accept? st) (set-cdr! accept (searcher-max sr (cdr accept)))) ((posse-ref seen sr) => (lambda (sr-prev) (searcher-merge! sr-prev sr))) ((epsilon-state? st) (let ((ch (and (string-cursor<? i end) (string-cursor-ref str i)))) ;; Epsilon transition. If there is a procedure matcher, ;; it's a guarded epsilon and needs to be checked. (cond ((state-matches? st str i ch start end (searcher-matches sr)) (posse-add! seen sr) (let* ((next1 (state-next1 st)) (next2 (state-next2 st)) (matches (and next2 (searcher-matches sr)))) (cond (next1 (searcher-state-set! sr next1) (advance! (make-searcher next1 (copy-regexp-match (searcher-matches sr)))))) (cond (next2 (let ((sr2 (make-searcher next2 (copy-regexp-match matches)))) (advance! sr2))))))))) ;; Non-special, non-epsilon searcher, add to posse. ((posse-ref new sr) ;; Merge regexp-match for existing searcher. => (lambda (sr-prev) (searcher-merge! sr-prev sr))) (else ;; Add new searcher. (posse-add! new sr)))))) ;; Run so long as there is more to match. (define (regexp-run-offsets search? rx str start end) (let ((rx (regexp rx)) (epsilons (posse)) (accept (list #f))) (let lp ((i start) (searchers1 (posse)) (searchers2 (posse))) ;; Advance initial epsilons once from the first index, or every ;; time when searching. (cond ((or search? (string-cursor=? i start)) (posse-advance! searchers1 epsilons accept (make-start-searcher rx str) str i start end) (posse-clear! epsilons))) (cond ((or (string-cursor>=? i end) (and search? (searcher? (cdr accept)) (let ((accept-start (searcher-start-match (cdr accept)))) (posse-every (lambda (searcher) (string-cursor>? (searcher-start-match searcher) accept-start)) searchers1))) (and (not search?) (posse-empty? searchers1))) ;; Terminate when the string is done or there are no more ;; searchers. If we terminate prematurely and are not ;; searching, return false. (and (searcher? (cdr accept)) (let ((matches (searcher-matches (cdr accept)))) (and (or search? (string-cursor>=? (regexp-match-ref matches 1) end)) (searcher-matches (cdr accept)))))) (else ;; Otherwise advance normally. (let ((ch (string-cursor-ref str i)) (i2 (string-cursor-next str i))) (posse-for-each ;; NOTE: non-deterministic from hash order (lambda (sr) (cond ((state-matches? (searcher-state sr) str i ch start end (searcher-matches sr)) (searcher-state-set! sr (state-next1 (searcher-state sr))) ;; Epsilons are considered at the next position. (posse-advance! searchers2 epsilons accept sr str i2 start end) (posse-clear! epsilons)))) searchers1) (posse-clear! searchers1) (lp i2 searchers2 searchers1))))))) ;; Wrapper to determine start and end offsets. (define (regexp-run search? rx str . o) (let ((start (string-start-arg str o)) (end (string-end-arg str (if (pair? o) (cdr o) o)))) (regexp-run-offsets search? rx str start end))) ;;> Match the given regexp or SRE against the entire string and return ;;> the match data on success. Returns \scheme{#f} on failure. (define (regexp-matches rx str . o) (apply regexp-run #f rx str o)) ;;> Match the given regexp or SRE against the entire string and return ;;> the \scheme{#t} on success. Returns \scheme{#f} on failure. (define (regexp-matches? rx str . o) (and (apply regexp-matches rx str o) #t)) ;;> Search for the given regexp or SRE within string and return ;;> the match data on success. Returns \scheme{#f} on failure. (define (regexp-search rx str . o) (apply regexp-run #t rx str o)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiling (define (parse-flags ls) (define (symbol->flag s) (case s ((i ci case-insensitive) ~ci?) (else ~none))) (let lp ((ls ls) (res ~none)) (if (not (pair? ls)) res (lp (cdr ls) (flag-join res (symbol->flag (car ls))))))) (define char-set:nonl (char-set-difference char-set:full (char-set #\newline))) (define char-set:control (ucs-range->char-set 0 32)) (define char-set:word-constituent (char-set-union char-set:letter char-set:digit (char-set #\_))) (define %char-set:word-constituent (char-set-union %char-set:letter %char-set:digit (char-set #\_))) (define (char-word-constituent? ch) (char-set-contains? char-set:word-constituent ch)) (define get-char-set:cased (let ((char-set:cased #f)) (lambda () (if (not char-set:cased) (set! char-set:cased (char-set-union char-set:upper-case char-set:lower-case char-set:title-case))) char-set:cased))) (define (match/bos str i ch start end matches) (string-cursor=? i start)) (define (match/eos str i ch start end matches) (string-cursor>=? i end)) (define (match/bol str i ch start end matches) (or (string-cursor=? i start) (eqv? #\newline (string-cursor-ref str (string-cursor-prev str i))))) (define (match/eol str i ch start end matches) (or (string-cursor>=? i end) (eqv? #\newline (string-cursor-ref str i)))) (define (match/bow str i ch start end matches) (and (string-cursor<? i end) (or (string-cursor=? i start) (not (char-word-constituent? (string-cursor-ref str (string-cursor-prev str i))))) (char-word-constituent? ch))) (define (match/eow str i ch start end matches) (and (or (string-cursor>=? i end) (not (char-word-constituent? ch))) (string-cursor>? i start) (char-word-constituent? (string-cursor-ref str (string-cursor-prev str i))))) (define (match/nwb str i ch start end matches) (and (not (match/bow str i ch start end matches)) (not (match/eow str i ch start end matches)))) (define (match/bog str i ch start end matches) (and (string-cursor<? i end) (or (string-cursor=? i start) (match/eog str (string-cursor-prev str i) ch start end matches)))) (define (match/eog str i ch start end matches) (and (string-cursor>? i start) (or (string-cursor>=? i end) (let* ((sci (string-cursor->index str i)) (sce (string-cursor->index str end)) (m (regexp-search re:grapheme str sci sce))) (and m (<= (regexp-match-submatch-end m 0) sci)))))) (define (lookup-char-set name flags) (cond ((flag-set? flags ~ascii?) (case name ((any) char-set:full) ((nonl) char-set:nonl) ((lower-case lower) (if (flag-set? flags ~ci?) %char-set:letter %char-set:lower-case)) ((upper-case upper) (if (flag-set? flags ~ci?) %char-set:letter %char-set:upper-case)) ((title-case title) (if (flag-set? flags ~ci?) %char-set:letter (char-set))) ((alphabetic alpha) %char-set:letter) ((numeric num digit) %char-set:digit) ((alphanumeric alphanum alnum) %char-set:letter+digit) ((punctuation punct) %char-set:punctuation) ((symbol) %char-set:symbol) ((graphic graph) %char-set:graphic) ((word-constituent) %char-set:word-constituent) ((whitespace white space) %char-set:whitespace) ((printing print) %char-set:printing) ((control cntrl) %char-set:iso-control) ((hex-digit xdigit hex) char-set:hex-digit) ((ascii) char-set:ascii) (else #f))) (else (case name ((any) char-set:full) ((nonl) char-set:nonl) ((lower-case lower) (if (flag-set? flags ~ci?) (get-char-set:cased) char-set:lower-case)) ((upper-case upper) (if (flag-set? flags ~ci?) (get-char-set:cased) char-set:upper-case)) ((title-case title) (if (flag-set? flags ~ci?) (get-char-set:cased) char-set:title-case)) ((alphabetic alpha) char-set:letter) ((numeric num digit) char-set:digit) ((alphanumeric alphanum alnum) char-set:letter+digit) ((punctuation punct) char-set:punctuation) ((symbol) char-set:symbol) ((graphic graph) char-set:graphic) ((word-constituent) char-set:word-constituent) ((whitespace white space) char-set:whitespace) ((printing print) char-set:printing) ((control cntrl) char-set:control) ((hex-digit xdigit hex) char-set:hex-digit) ((ascii) char-set:ascii) (else #f))))) (define (sre-flatten-ranges orig-ls) (let lp ((ls orig-ls) (res '())) (cond ((null? ls) (reverse res)) ((string? (car ls)) (lp (append (string->list (car ls)) (cdr ls)) res)) ((null? (cdr ls)) (error "unbalanced cset / range" orig-ls)) ((string? (cadr ls)) (lp (cons (car ls) (append (string->list (cadr ls)) (cddr ls))) res)) (else (lp (cddr ls) (cons (cons (car ls) (cadr ls)) res)))))) (define (every pred ls) (or (null? ls) (and (pred (car ls)) (every pred (cdr ls))))) (define (char-set-sre? sre) (or (char? sre) (and (string? sre) (= 1 (string-length sre))) (lookup-char-set sre ~none) (and (pair? sre) (or (string? (car sre)) (memq (car sre) '(char-set / char-range & and ~ complement - difference)) (and (memq (car sre) '(|\|| or w/case w/nocase w/unicode w/ascii)) (every char-set-sre? (cdr sre))))))) (define (non-greedy-sre? sre) (and (pair? sre) (or (memq (car sre) '(?? *? **? non-greedy-optional non-greedy-zero-or-more non-greedy-repeated)) (and (memq (car sre) '(: seq w/case w/nocase w/unicode w/ascii)) (non-greedy-sre? (car (reverse sre)))) (and (eq? (car sre) 'or) (any non-greedy-sre? (cdr sre)))))) (define (valid-sre? x) (guard (exn (else #f)) (regexp x) #t)) (define (sre->char-set sre . o) (let ((flags (if (pair? o) (car o) ~none))) (define (->cs sre) (sre->char-set sre flags)) (define (maybe-ci sre) (if (flag-set? flags ~ci?) (char-set-ci sre) sre)) (cond ((lookup-char-set sre flags)) ((char-set? sre) (maybe-ci sre)) ((char? sre) (maybe-ci (char-set sre))) ((string? sre) (if (= 1 (string-length sre)) (maybe-ci (string->char-set sre)) (error "only single char strings can be char-sets"))) ((pair? sre) (if (string? (car sre)) (maybe-ci (string->char-set (car sre))) (case (car sre) ((char-set) (if (null? (cddr sre)) (maybe-ci (string->char-set (cadr sre))) (error "(char-set) takes only one char-set" sre))) ((/ char-range) (->cs `(or ,@(map (lambda (x) (ucs-range->char-set (char->integer (car x)) (+ 1 (char->integer (cdr x))))) (sre-flatten-ranges (cdr sre)))))) ((& and) (apply char-set-intersection (map ->cs (cdr sre)))) ((|\|| or) (apply char-set-union (map ->cs (cdr sre)))) ((~ complement) (char-set-complement (->cs `(or ,@(cdr sre))))) ((- difference) (char-set-difference (->cs (cadr sre)) (->cs `(or ,@(cddr sre))))) ((w/case) (if (null? (cddr sre)) (sre->char-set (cadr sre) (flag-clear flags ~ci?)) (error "w/case takes only one char-set" sre))) ((w/nocase) (if (null? (cddr sre)) (sre->char-set (cadr sre) (flag-join flags ~ci?)) (error "w/nocase takes only one char-set" sre))) ((w/ascii) (if (null? (cddr sre)) (sre->char-set (cadr sre) (flag-join flags ~ascii?)) (error "w/ascii takes only one char-set" sre))) ((w/unicode) (if (null? (cddr sre)) (sre->char-set (cadr sre) (flag-clear flags ~ascii?)) (error "w/unicode takes only one char-set" sre))) (else (error "invalid sre char-set" sre))))) (else (error "invalid sre char-set" sre))))) (define (char-set->sre cset) (list (char-set->string cset))) (define (strip-submatches sre) (if (pair? sre) (case (car sre) (($ submatch) (strip-submatches (cons ': (cdr sre)))) ((-> => submatch-named) (strip-submatches (cons ': (cddr sre)))) (else (cons (strip-submatches (car sre)) (strip-submatches (cdr sre))))) sre)) (define (sre-expand-reps from to sre) (let ((sre0 (strip-submatches sre))) (let lp ((i 0) (res '(:))) (if (= i from) (cond ((not to) (reverse (cons `(* ,sre) res))) ((= from to) (reverse (cons sre (cdr res)))) (else (let lp ((i (+ i 1)) (res res)) (if (>= i to) (reverse (cons `(? ,sre) res)) (lp (+ i 1) (cons `(? ,sre0) res)))))) (lp (+ i 1) (cons sre0 res)))))) ;;> Compile an \var{sre} into a regexp. (define (regexp sre . o) (define current-index 2) (define current-match 0) (define current-id 0) (define match-names '()) (define match-rules (list (cons 0 1))) (define non-greedy-indexes '()) (define (next-id) (let ((res current-id)) (set! current-id (+ current-id 1)) res)) (define (make-submatch-state sre flags next index) (let* ((n3 (make-epsilon-state next (next-id))) (n2 (->rx sre flags n3)) (n1 (make-epsilon-state n2 (next-id))) (non-greedy? (non-greedy-sre? sre))) (state-match-set! n1 index) (state-match-rule-set! n1 'left) (state-match-set! n3 (+ index 1)) (state-match-rule-set! n3 (if non-greedy? 'non-greedy-left 'right)) (if non-greedy? (set! non-greedy-indexes (cons (+ index 1) non-greedy-indexes))) n1)) (define (->rx sre flags next) (cond ;; The base cases chars and strings match literally. ((char? sre) (make-char-state sre flags next (next-id))) ((char-set? sre) (make-char-state sre flags next (next-id))) ((string? sre) (->rx (cons 'seq (string->list sre)) flags next)) ((and (symbol? sre) (lookup-char-set sre flags)) => (lambda (cset) (make-char-state cset ~none next (next-id)))) ((symbol? sre) (case sre ((epsilon) next) ((bos) (make-char-state match/bos flags next (next-id))) ((eos) (make-char-state match/eos flags next (next-id))) ((bol) (make-char-state match/bol flags next (next-id))) ((eol) (make-char-state match/eol flags next (next-id))) ((bow) (make-char-state match/bow flags next (next-id))) ((eow) (make-char-state match/eow flags next (next-id))) ((nwb) (make-char-state match/nwb flags next (next-id))) ((bog) (make-char-state match/bog flags next (next-id))) ((eog) (make-char-state match/eog flags next (next-id))) ((grapheme) (->rx `(or (: (* ,char-set:hangul-l) (+ ,char-set:hangul-v) (* ,char-set:hangul-t)) (: (* ,char-set:hangul-l) ,char-set:hangul-v (* ,char-set:hangul-v) (* ,char-set:hangul-t)) (: (* ,char-set:hangul-l) ,char-set:hangul-lvt (* ,char-set:hangul-t)) (+ ,char-set:hangul-l) (+ ,char-set:hangul-t) (+ ,char-set:regional-indicator) (: "\r\n") (: (~ control ("\r\n")) (* ,char-set:extend-or-spacing-mark)) control) flags next)) ((word) (->rx '(word+ any) flags next)) (else (error "unknown sre" sre)))) ((pair? sre) (case (car sre) ((seq :) ;; Sequencing. An empty sequence jumps directly to next, ;; otherwise we join the first element to the sequence formed ;; of the remaining elements followed by next. (if (null? (cdr sre)) next ;; Make a dummy intermediate to join the states so that ;; we can generate n1 first, preserving the submatch order. (let* ((n2 (make-epsilon-state #f (next-id))) (n1 (->rx (cadr sre) flags n2)) (n3 (->rx (cons 'seq (cddr sre)) flags next))) (state-next1-set! n2 n3) n1))) ((or |\||) ;; Alternation. An empty alternation always fails. ;; Otherwise we fork between any of the alternations, each ;; continuing to next. (cond ((null? (cdr sre)) #f) ((char-set-sre? sre) (make-char-state (sre->char-set sre) flags next (next-id))) ((null? (cddr sre)) (->rx (cadr sre) flags next)) (else (let* ((n1 (->rx (cadr sre) flags next)) (n2 (->rx (cons 'or (cddr sre)) flags next))) (make-fork-state n1 n2 (next-id)))))) ((? optional ?? non-greedy-optional) ;; Optionality. Either match the body or fork to the next ;; state directly. (make-fork-state (->rx (cons 'seq (cdr sre)) flags next) next (next-id))) ((* zero-or-more *? non-greedy-zero-or-more) ;; Repetition. Introduce two fork states which can jump from ;; the end of the loop to the beginning and from the ;; beginning to the end (to skip the first iteration). (let* ((n2 (make-fork-state next #f (next-id))) (n1 (make-fork-state (->rx (cons 'seq (cdr sre)) flags n2) n2 (next-id)))) (state-next2-set! n2 n1) n1)) ((+ one-or-more) ;; One-or-more repetition. Same as above but the first ;; transition is required so the rx is simpler - we only ;; need one fork from the end of the loop to the beginning. (let* ((n2 (make-fork-state next #f (next-id))) (n1 (->rx (cons 'seq (cdr sre)) flags n2))) (state-next2-set! n2 n1) n1)) ((= exactly) ;; Exact repetition. (->rx (sre-expand-reps (cadr sre) (cadr sre) (cons 'seq (cddr sre))) flags next)) ((>= at-least) ;; n-or-more repetition. (->rx (sre-expand-reps (cadr sre) #f (cons 'seq (cddr sre))) flags next)) ((** repeated **? non-greedy-repeated) ;; n-to-m repetition. (->rx (sre-expand-reps (cadr sre) (car (cddr sre)) (cons 'seq (cdr (cddr sre)))) flags next)) ((-> => submatch-named) ;; Named submatches just record the name for the current ;; match and rewrite as a non-named submatch. (cond ((flag-set? flags ~nocapture?) (->rx (cons 'seq (cddr sre)) flags next)) (else (set! match-names (cons (cons (cadr sre) (+ 1 current-match)) match-names)) (->rx (cons 'submatch (cddr sre)) flags next)))) ((*-> *=> submatch-named-list) (cond ((flag-set? flags ~nocapture?) (->rx (cons 'seq (cddr sre)) flags next)) (else (set! match-names (cons (cons (cadr sre) current-match) match-names)) (->rx (cons 'submatch-list (cddr sre)) flags next)))) (($ submatch) ;; A submatch wraps next with an epsilon transition before ;; next, setting the start and end index on the result and ;; wrapped next respectively. (cond ((flag-set? flags ~nocapture?) (->rx (cons 'seq (cdr sre)) flags next)) (else (let ((num current-match) (index current-index)) (set! current-match (+ current-match 1)) (set! current-index (+ current-index 2)) (set! match-rules `((,index . ,(+ index 1)) ,@match-rules)) (make-submatch-state (cons 'seq (cdr sre)) flags next index))))) ((*$ submatch-list) ;; A submatch-list wraps a range of submatch results into a ;; single match value. (cond ((flag-set? flags ~nocapture?) (->rx (cons 'seq (cdr sre)) flags next)) (else (let* ((num current-match) (index current-index)) (set! current-match (+ current-match 1)) (set! current-index (+ current-index 1)) (set! match-rules `(,index ,@match-rules)) (let* ((n2 (make-epsilon-state next (next-id))) (n1 (->rx (cons 'submatch (cdr sre)) flags n2))) (state-match-set! n2 (list index num current-match)) (state-match-rule-set! n2 'list) n1))))) ((~ - & / complement difference and char-range char-set) (make-char-state (sre->char-set sre flags) ~none next (next-id))) ((word) (->rx `(: bow ,@(cdr sre) eow) flags next)) ((word+) (->rx `(word (+ ,(if (equal? '(any) (cdr sre)) 'word-constituent (char-set-intersection char-set:word-constituent (sre->char-set `(or ,@(cdr sre)) flags))))) flags next)) ((w/case) (->rx `(: ,@(cdr sre)) (flag-clear flags ~ci?) next)) ((w/nocase) (->rx `(: ,@(cdr sre)) (flag-join flags ~ci?) next)) ((w/unicode) (->rx `(: ,@(cdr sre)) (flag-clear flags ~ascii?) next)) ((w/ascii) (->rx `(: ,@(cdr sre)) (flag-join flags ~ascii?) next)) ((w/nocapture) (->rx `(: ,@(cdr sre)) (flag-join flags ~nocapture?) next)) (else (if (string? (car sre)) (make-char-state (sre->char-set sre flags) ~none next (next-id)) (error "unknown sre" sre))))))) (let ((flags (parse-flags (and (pair? o) (car o))))) (if (regexp? sre) sre (let ((start (make-submatch-state sre flags (make-accept-state (next-id)) 0))) ;; (define (state->list st) ;; (let ((seen (make-hash-table eq?)) ;; (count 0)) ;; (reverse ;; (let lp ((st st) (res '())) ;; (cond ;; ((not (state? st)) res) ;; ((hash-table-ref/default seen st #f) res) ;; (else ;; (hash-table-set! seen st count) ;; (let ((orig-count count)) ;; (set! count (+ count 1)) ;; (let* ((next1 (lp (state-next1 st) '())) ;; (next2 (lp (state-next2 st) '())) ;; (this (append ;; (list (state-id st) ;;orig-count ;; (cond ;; ((epsilon-state? st) ;; (if (state-chars st) '? '-)) ;; ((and (char-set? (state-chars st)) ;; (< (char-set-size (state-chars st)) 5)) ;; (char-set->string (state-chars st))) ;; ((char? (state-chars st)) ;; (string (state-chars st))) ;; (else '+)) ;; (cond ;; ((state-next1 st) => state-id) ;; (else #f))) ;; (if (state-next2 st) ;; (list (state-id (state-next2 st))) ;; '()) ;; (if (state-match st) ;; (list (list 'm (state-match st))) ;; '())))) ;; (append next2 next1 (cons this res)))))))))) ;;(for-each (lambda (x) (write x) (newline)) (state->list start)) (make-rx start current-match current-index non-greedy-indexes (list->vector (reverse match-rules)) match-names sre))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Utilities ;;> The fundamental regexp matching iterator. Repeatedly searches ;;> \var{str} for the regexp \var{re} so long as a match can be found. ;;> On each successful match, applies \scheme{(\var{kons} \var{i} ;;> \var{regexp-match} \var{str} \var{acc})} where \var{i} is the ;;> index since the last match (beginning with ;;> \var{start}),\var{regexp-match} is the resulting match, and ;;> \var{acc} is the result of the previous \var{kons} application, ;;> beginning with \var{knil}. When no more matches can be found, ;;> calls \var{finish} with the same arguments, except that ;;> \var{regexp-match} is \scheme{#f}. ;;> ;;> By default \var{finish} just returns \var{acc}. (define (regexp-fold rx kons knil str . o) (let* ((rx (regexp rx)) (finish (if (pair? o) (car o) (lambda (from md str acc) acc))) (o (if (pair? o) (cdr o) o)) (start (string-start-arg str o)) (end (string-end-arg str (if (pair? o) (cdr o) o)))) (let lp ((i start) (from start) (acc knil)) (cond ((and (string-cursor<? i end) (regexp-run-offsets #t rx str i end)) => (lambda (md) (let ((j (regexp-match-ref md 1))) (lp (if (and (string-cursor=? i j) (string-cursor<? j end)) (string-cursor-next str j) j) j (kons (string-cursor->index str from) md str acc))))) (else (finish (string-cursor->index str from) #f str acc)))))) ;;> Extracts all non-empty substrings of \var{str} which match ;;> \var{re} between \var{start} and \var{end} as a list of strings. (define (regexp-extract rx str . o) (apply regexp-fold rx (lambda (from md str a) (let ((s (regexp-match-submatch md 0))) (if (equal? s "") a (cons s a)))) '() str (lambda (from md str a) (reverse a)) o)) ;;> Splits \var{str} into a list of strings separated by matches of ;;> \var{re}. (define (regexp-split rx str . o) ;; start and end in indices passed to regexp-fold (let ((start (if (pair? o) (car o) 0)) (end (if (and (pair? o) (pair? (cdr o))) (cadr o) (string-length str)))) (regexp-fold rx (lambda (from md str a) (let ((i (regexp-match-submatch-start md 0)) (j (regexp-match-submatch-end md 0))) (if (eqv? i j) a (cons j (cons (substring str (car a) i) (cdr a)))))) (cons start '()) str (lambda (from md str a) (reverse (cons (substring str (car a) end) (cdr a)))) start end))) ;;> Partitions \var{str} into a list of non-empty strings ;;> matching \var{re}, interspersed with the unmatched portions ;;> of the string. The first and every odd element is an unmatched ;;> substring, which will be the empty string if \var{re} matches ;;> at the beginning of the string or end of the previous match. The ;;> second and every even element will be a substring matching ;;> \var{re}. If the final match ends at the end of the string, ;;> no trailing empty string will be included. Thus, in the ;;> degenerate case where \var{str} is the empty string, the ;;> result is \scheme{("")}. (define (regexp-partition rx str . o) (let ((start (if (pair? o) (car o) 0)) (end (if (and (pair? o) (pair? (cdr o))) (cadr o) (string-length str)))) (define (kons from md str a) (let ((i (regexp-match-submatch-start md 0)) (j (regexp-match-submatch-end md 0))) (if (eqv? i j) a (let ((left (substring str (car a) i))) (cons j (cons (regexp-match-submatch md 0) (cons left (cdr a)))))))) (define (final from md str a) (if (or (< from end) (null? (cdr a))) (cons (substring str (car a) end) (cdr a)) (cdr a))) (reverse (regexp-fold rx kons (cons start '()) str final start end)))) ;;> Returns a new string replacing the \var{count}th match of \var{re} ;;> in \var{str} the \var{subst}, where the zero-indexed \var{count} ;;> defaults to zero (i.e. the first match). If there are not ;;> \var{count} matches, returns the selected substring unmodified. ;;> \var{subst} can be a string, an integer or symbol indicating the ;;> contents of a numbered or named submatch of \var{re},\scheme{'pre} ;;> for the substring to the left of the match, or \scheme{'post} for ;;> the substring to the right of the match. ;;> The optional parameters \var{start} and \var{end} restrict both ;;> the matching and the substitution, to the given indices, such that ;;> the result is equivalent to omitting these parameters and ;;> replacing on \scheme{(substring str start end)}. As a convenience, ;;> a value of \scheme{#f} for \var{end} is equivalent to ;;> \scheme{(string-length str)}. (define (regexp-replace rx str subst . o) (let* ((start (if (and (pair? o) (car o)) (car o) 0)) (o (if (pair? o) (cdr o) '())) (end (if (and (pair? o) (car o)) (car o) (string-length str))) (o (if (pair? o) (cdr o) '())) (count (if (pair? o) (car o) 0))) (let lp ((i start) (count count)) (let ((m (regexp-search rx str i end))) (cond ((not m) str) ((positive? count) (lp (regexp-match-submatch-end m 0) (- count 1))) (else (string-concatenate (cons (substring str start (regexp-match-submatch-start m 0)) (append (reverse (regexp-apply-match m str subst start end)) (list (substring str (regexp-match-submatch-end m 0) end))))))))))) ;;> Equivalent to \var{regexp-replace}, but replaces all occurrences ;;> of \var{re} in \var{str}. (define (regexp-replace-all rx str subst . o) (let* ((start (if (and (pair? o) (car o)) (car o) 0)) (o (if (pair? o) (cdr o) '())) (end (if (and (pair? o) (car o)) (car o) (string-length str)))) (regexp-fold rx (lambda (i m str acc) (let ((m-start (regexp-match-submatch-start m 0))) (append (regexp-apply-match m str subst start end) (if (>= i m-start) acc (cons (substring str i m-start) acc))))) '() str (lambda (i m str acc) (let ((end (string-length str))) (string-concatenate-reverse (if (>= i end) acc (cons (substring str i end) acc))))) start end))) (define (regexp-apply-match m str ls start end) (let lp ((ls ls) (res '())) (cond ((null? ls) res) ((not (pair? ls)) (lp (list ls) res)) ((integer? (car ls)) (lp (cdr ls) (cons (or (regexp-match-submatch m (car ls)) "") res))) ((procedure? (car ls)) (lp (cdr ls) (cons ((car ls) m) res))) ((symbol? (car ls)) (case (car ls) ((pre) (lp (cdr ls) (cons (substring str start (regexp-match-submatch-start m 0)) res))) ((post) (lp (cdr ls) (cons (substring str (regexp-match-submatch-end m 0) end) res))) (else (cond ((assq (car ls) (regexp-match-names m)) => (lambda (x) (lp (cons (cdr x) (cdr ls)) res))) (else (error "unknown match replacement" (car ls))))))) (else (lp (cdr ls) (cons (car ls) res)))))) (define re:grapheme (regexp 'grapheme))
true
5ff3b04fc1e7b40cbc0f91c577ad1526c4279b34
000dbfe5d1df2f18e29a76ea7e2a9556cff5e866
/sitelib/srfi/%3a136/extensible-record-types.scm
508b4bc025f7e2dac9db54e5b9b0c36633e69673
[ "BSD-3-Clause", "LicenseRef-scancode-other-permissive", "MIT", "BSD-2-Clause" ]
permissive
ktakashi/sagittarius-scheme
0a6d23a9004e8775792ebe27a395366457daba81
285e84f7c48b65d6594ff4fbbe47a1b499c9fec0
refs/heads/master
2023-09-01T23:45:52.702741
2023-08-31T10:36:08
2023-08-31T10:36:08
41,153,733
48
7
NOASSERTION
2022-07-13T18:04:42
2015-08-21T12:07:54
Scheme
UTF-8
Scheme
false
false
8,171
scm
extensible-record-types.scm
;;; -*- mode:scheme; coding:utf-8; -*- ;;; ;;; srfi/%3a136/extensible-record-types.scm - Extensible record types ;;; ;;; Copyright (c) 2016 Takashi Kato <[email protected]> ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributions of source code must retain the above copyright ;;; notice, this list of conditions and the following disclaimer. ;;; ;;; 2. Redistributions in binary form must reproduce the above copyright ;;; notice, this list of conditions and the following disclaimer in the ;;; documentation and/or other materials provided with the distribution. ;;; ;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ;;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ;;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ;;; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ;;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ;;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED ;;; TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ;;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ;;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;; (library (srfi :136 extensible-record-types) (export record? record-type-descriptor? record-type-descriptor (rename (record-predicate record-type-predicate)) record-type-name record-type-parent record-type-fields make-record-type-descriptor make-record (rename (srfi:define-record-type define-record-type))) (import (rename (except (rnrs) make-record-type-descriptor) (record-type-descriptor r6:record-type-descriptor) (record-constructor-descriptor r6:record-constructor-descriptor)) (only (core record procedural) <record-type-descriptor>) (srfi :1) (clos user) (clos core) (sagittarius) ;; for <record-type-meta> (sagittarius clos) (sagittarius control)) (define (make-record-type-descriptor name fields :optional (parent #f)) (define (process-fields fields) ;; -> slot form (map (lambda (field) (if (pair? field) (let ((len (length field)) (name (cadr field))) (unless (= len 2) (assertion-violation 'make-record-type-descriptor "invalid field spec" field)) (list name :mutable (eq? (car field) 'mutable) :init-keyword (make-keyword name))) (list name :mutable #t :init-keyword field))) fields)) (define type (make <record-type-meta> :definition-name name :direct-supers (or (and parent (list (slot-ref parent 'class))) '()) :direct-slots (process-fields fields) :define-library (current-library))) (define (->field-vector fields) (list->vector (map (lambda (field) (if (symbol? field) `(mutable ,field) field)) fields))) (let ((rtd (make <record-type-descriptor> :name name :parent parent :uid #f :sealed? #f :opaque? #f :fields (->field-vector fields) :class type))) (slot-set! type 'rtd rtd) rtd)) (define (record-type-fields rtd) (define (make-field rtd k field) (list field (record-accessor rtd k) (if (record-field-mutable? rtd k) (record-mutator rtd k) #f))) (let ((fields (record-type-field-names rtd))) (do ((len (vector-length fields)) (i 0 (+ i 1)) (r '() (cons (make-field rtd i (vector-ref fields i)) r))) ((= i len) (reverse! r))))) (define (make-record rtd field-vector) (define type (slot-ref rtd 'class)) (let ((r (make type))) (for-each (lambda (acc obj) (slot-set-using-accessor! r acc obj)) (slot-ref type 'getters-n-setters) (vector->list field-vector)) r)) (define (record-type-descriptor record) (let ((class (class-of record))) (slot-ref class 'rtd))) (define-syntax %rcd (syntax-rules ())) (define-syntax srfi:define-record-type (lambda (x) (define (parse-type-spec spec) (syntax-case spec () ((type parent) (identifier? #'parent) (list #'type #'parent #'((parent-rtd (parent) (parent %rcd))))) ((type parent) (eq? #f #'parent) (list #'type #f '())) (type (identifier? #'type) (list #'type #f '())))) (define (make-ctr spec) (syntax-case spec () ((name args ...) #'name) (name (identifier? #'name) #'name) (name (eq? #f #'name) #'dummy))) (define (make-protocol parent? spec fields) (define (fill args fields) (define undef #'(undefined)) (let loop ((fields fields) (r '())) (syntax-case fields () (() (reverse! r)) (((f acc m ...) rest ...) (loop #'(rest ...) (cond ((memp (lambda (a) (bound-identifier=? a #'f)) args) (cons #'f r)) ((memp (lambda (a) (bound-identifier=? a #'acc)) args) (cons #'acc r)) (else (cons undef r)))))))) (define (split-args args fields) (let loop ((args args) (p '())) (syntax-case args () (() (list (reverse! p) '())) ((field rest ...) (if (memp (lambda (f) (bound-identifier=? (car f) #'field)) fields) (list (reverse! p) #'(field rest ...)) (loop #'(rest ...) (cons #'field p))))))) (define (fields->args fields) (syntax-case fields () (() #'()) (((f ignore ...) rest ...) (with-syntax (((args ...) (fields->args #'(rest ...))) ((t) (generate-temporaries '(t)))) #'(t args ...))) (_ (syntax-violation 'define-record-type "Invalid field spec" fields)))) (if parent? (syntax-case spec () ((name args ...) (with-syntax* ((((pargs ...) (targs ...)) (split-args #'(args ...) fields)) ((vars ...) (fill #'(targs ...) fields))) #'(lambda (n) (lambda (pargs ... targs ...) ((n pargs ...) vars ...))))) ;; this isn't efficient at all ... (_ (with-syntax ((ln (length fields))) #'(lambda (n) (lambda args (let-values (((p t) (split-at args (- (length args) ln)))) (apply (apply n p) t))))))) (syntax-case spec () ((name args ...) (with-syntax (((vars ...) (fill #'(args ...) fields))) #'(lambda (p) (lambda (args ...) (p vars ...))))) (_ (with-syntax (((args ...) (fields->args fields))) #'(lambda (p) (lambda (args ...) (p args ...)))))))) (define (convert-fields fields) (let loop ((fields fields) (r '())) (syntax-case fields () (() (reverse! r)) (((name a) rest ...) (with-syntax (((n) (if (identifier? #'name) #'(name) (generate-temporaries '(#t))))) (loop #'(rest ...) (cons #'(immutable n a) r)))) (((name a m) rest ...) (with-syntax (((n) (if (identifier? #'name) #'(name) (generate-temporaries '(#t))))) (loop #'(rest ...) (cons #'(mutable n a m) r))))))) (syntax-case x () ((_ type-spec ctr-spec pred-spec field-spec ...) (with-syntax* (((real dummy) (generate-temporaries '(#f #f))) ((type parent (parent-rtd ...)) (parse-type-spec #'type-spec)) (ctr (make-ctr #'ctr-spec)) (proto (make-protocol #'parent #'ctr-spec #'(field-spec ...))) (predicate (if (identifier? #'pred-spec) #'pred-spec (car (generate-temporaries '(#f))))) ((field ...) (convert-fields #'(field-spec ...)))) #'(begin (define-syntax type (syntax-rules (%rcd) ((_) (r6:record-type-descriptor real)) ((_ %rcd) (r6:record-constructor-descriptor real)) ((_ (keyword datum (... ...))) (keyword datum (... ...) parent field-spec ...)))) (define-record-type (real ctr predicate) parent-rtd ... ;; parent-rtd clause or '() (protocol proto) (fields field ...)) ;; given type must be a macro so overwrite the ;; name here. (define dummy (let ((rtd (r6:record-type-descriptor real))) (slot-set! rtd 'name 'type))))))))) )
true
15aeb8d05a322d8bf6fc2b7b70e4cdc9fb70cf3b
defeada37d39bca09ef76f66f38683754c0a6aa0
/System/system/text/regular-expressions/regex-runner-factory.sls
9701e6745b5895ea4e13f2acee9b2c63fa86d995
[]
no_license
futsuki/ironscheme-port
2dbac82c0bda4f4ff509208f7f00a5211d1f7cd5
4e7a81b0fbeac9a47440464988e53fb118286c54
refs/heads/master
2016-09-06T17:13:11.462593
2015-09-26T18:20:40
2015-09-26T18:20:40
42,757,369
0
0
null
null
null
null
UTF-8
Scheme
false
false
321
sls
regex-runner-factory.sls
(library (system text regular-expressions regex-runner-factory) (export is? regex-runner-factory?) (import (ironscheme-clr-port)) (define (is? a) (clr-is System.Text.RegularExpressions.RegexRunnerFactory a)) (define (regex-runner-factory? a) (clr-is System.Text.RegularExpressions.RegexRunnerFactory a)))
false
32a20fb35f41b42aa2711cf6c6db0a055664c480
74d2f4ec77852839450ab8563971a5e0f615c019
/chapter_03/chapter_3_1/exercise_3_8.scm
2de5c44e62881c98d7f2f345c06b48a10ef131e0
[]
no_license
wangoasis/sicp
b56960a0c3202ce987f176507b1043ed632ed6b3
07eaf8d46f7b8eae5a46d338a4608d8e993d4568
refs/heads/master
2021-01-21T13:03:11.520829
2016-04-22T13:52:15
2016-04-22T13:52:15
53,835,426
0
0
null
null
null
null
UTF-8
Scheme
false
false
161
scm
exercise_3_8.scm
( define f ( lambda ( x ) ( set! f ( lambda ( x ) 0 ) ) x ) ) ( define a1 ( + ( f 0 ) ( f 1 ) ) ) ( define a2 ( + ( f 1 ) ( f 0 ) ) )
false
e83c069f90a38402a71fcf124e5de6f8db38cc20
e92f708d2ca39757df4cf7e7d0d8f4ebb8bab0eb
/scheme-transforms-master/scheme-transforms-master/transforms/untag.ss
b2bfb7b82cd78fd30850eaa754b2b078e1998154
[]
no_license
orthometa/304final
503d67345820cb769abedbc49c7029e90874f5b9
114eb45edeaf1a876f4c0a55f6d24213a589f35e
refs/heads/master
2020-03-18T12:57:52.580186
2018-05-24T18:23:08
2018-05-24T18:23:08
134,753,121
0
0
null
null
null
null
UTF-8
Scheme
false
false
458
ss
untag.ss
#!r6rs ;; Untag Transform ;; Remove all tags ;; input language: ;; tag | * ;; output language: ;; * (library (transforms untag) (export untag-transform) (import (rnrs) (scheme-tools srfi-compat :1) (transforms common) (transforms syntax) (transforms utils)) (define (untag-transform e) (cond [(tag? e) (untag-transform (tag->expr e))] [(list? e) (map untag-transform e)] [else e])) )
false
ac52bb545bfe89ec0bee27ca9fbd6181b6c56060
3323fb4391e76b853464a9b2fa478cd7429e9592
/huffman.ss
700f878e12c5cc0425b401a7e23a0d8fdf7fcaec
[]
no_license
simpleliangsl/hello-scheme
ceb203933fb056523f5288ce716569096a71ad97
31434fb810475ee0e8ec2e6816995a0041c47f44
refs/heads/master
2023-06-16T12:07:28.744188
2021-07-15T06:39:32
2021-07-15T06:39:32
386,197,304
0
0
null
null
null
null
UTF-8
Scheme
false
false
4,330
ss
huffman.ss
(library (huffman) (export decode encode generate-huffman-tree) (import (rnrs)) (define (make-leaf symbol weight) (list 'leaf symbol weight) ) (define (leaf? object) (eq? (car object) 'leaf)) (define (leaf-symbol leaf) (cadr leaf)) (define (leaf-weight leaf) (caddr leaf)) (define (make-code-tree left right) (list left right (append (symbols left) (symbols right)) (+ (weight left) (weight right)) ) ) (define (left-branch tree) (car tree)) (define (right-branch tree) (cadr tree)) (define (symbols tree) (if (leaf? tree) (list (leaf-symbol tree)) (caddr tree) ) ) (define (weight tree) (if (leaf? tree) (leaf-weight tree) (cadddr tree) ) ) (define (decode bits tree) (define (decode-recur bits branch) (if (null? bits) '() (let ([next-branch (choose-branch (car bits) branch)]) (if (leaf? next-branch) (cons (leaf-symbol next-branch) (decode-recur (cdr bits) tree) ) (decode-recur (cdr bits) next-branch) ) ) ) ) (define (choose-branch bit branch) (cond [(= bit 0) (left-branch branch)] [(= bit 1) (right-branch branch)] [else (error #f "bad bit" bit)] ) ) (decode-recur bits tree) ) (define (encode message tree) (define (encode-symbol symbol tree) (cond [(leaf? tree) '()] [(find-in-branch? symbol (left-branch tree)) (cons 0 (encode-symbol symbol (left-branch tree)) ) ] [(find-in-branch? symbol (right-branch tree)) (cons 1 (encode-symbol symbol (right-branch tree)) ) ] [else (error #f "symbol not tree" symbol)] ) ) (define (find-in-branch? symbol branch) (find (lambda (element) (eq? symbol element)) (symbols branch) ) ) (if (null? message) '() (append (encode-symbol (car message) tree) (encode (cdr message) tree) ) ) ) (define (generate-huffman-tree pairs) (define (successive-merge node-set) (if (eq? '() node-set) '() (let ([first-node (car node-set)]) (if (eq? '() (cdr node-set)) first-node (let ([second-node (cadr node-set)]) (successive-merge (adjoin-set (make-code-tree first-node second-node) (cddr node-set)) ) ) ) ) ) ) (successive-merge (make-leaf-set pairs)) ) (define (make-leaf-set pairs) (define (make-leaf-set-iter pairs result-set) (if (null? pairs) result-set (let ([pair (car pairs)]) (make-leaf-set-iter (cdr pairs) (adjoin-set (make-leaf (car pair) ; symbol (cadr pair) ; frequency ) result-set ) ) ) ) ) (make-leaf-set-iter pairs '()) ) (define (adjoin-set node node-set) (if (null? node-set) (cons node node-set) (if (< (weight node) (weight (car node-set))) (cons node node-set) (cons (car node-set) (adjoin-set node (cdr node-set))) ) ) ) )
false
d33781e73d8e51f8fc29f1fe8edc58d86e0f696a
30bbbe0880f7fc6c7ab3e4ec61ae16f516c9749b
/lib/util.scm
4866605135ed6356802b735044330a4cfe3efad1
[]
no_license
VincentToups/kawa-lib
463d785b0b88e4f941e9cced77bf18995578494a
5759f6a1cbbbdbca3a01a898d6aaebc12c7cc695
refs/heads/main
2023-04-14T12:46:41.914489
2021-04-18T18:31:33
2021-04-18T18:31:33
344,167,037
1
0
null
null
null
null
UTF-8
Scheme
false
false
7,432
scm
util.scm
(define-library (lib util) (export .. all-satisfy? assert between-inclusive? chain dbg dsp empty? fland flor get-class-loader indexed-for-each interactive-select java-null? lambda-named list-empty? list-of-numbers? list-of-symbols? modulo=0 not-java-null? order-table pi plist-get plist-get-or-error print-tabulation random-float random-int repeat repeat-accumulate table table$ tabulate) (import (except (kawa base) match) (rnrs hashtables (6)) (rnrs sorting (6)) (only (srfi 1) fold) (lib shadchen) (class java.io IOException File) (class java.net URLClassLoader URL) (class java.lang.reflect Method) (class java.lang Thread)) (begin (define-syntax lambda-named (lambda (expr) (syntax-case expr () ((_ name (arg ...) body ...) (identifier? #'name) #'(begin (define (name arg ...) body ...) name))))) (define pi 3.1415926535) (define-syntax .. (lambda (expr) (syntax-case expr () ((_ e) #'e) ((_ e property-name rest ...) (identifier? #'property-name) #'(.. e:property-name rest ...)) ((_ e (method-name arg ...) rest ...) (identifier? #'method-name) #'(.. (e:method-name arg ...) rest ...))))) (define-syntax chain (lambda (expr) (syntax-case expr () ((_ id expr0 expr ...) (identifier? #'id) #'(let ((id expr0)) (set! id expr) ... id))))) (define (java-null? o) (eq? #!null o)) (define (not-java-null? o) (not (java-null? o))) (define (table . args) (let ((tbl (make-eq-hashtable))) (let loop ((args args)) (match args ((list) tbl) ((list _) (error "table" (format "table requires an even number of arguments but we had a trailing singlet: ~a" _) _)) ((list* key value rest) (hashtable-set! tbl key value) (loop rest)))))) (define (order-table . symbols) (let ((htbl (make-eq-hashtable))) (let loop ((i 0) (ss symbols)) (cond ((empty? ss) htbl) (else (hashtable-set! htbl (car ss) i) (loop (+ i 1) (cdr ss))))))) (define-syntax table$ (lambda (expr) (define (transform tbl-stx stx ac) (syntax-case stx () (() ac) ((id expr rest ...) (identifier? #'id) (transform tbl-stx #'(rest ...) (with-syntax ((tbl-stx- tbl-stx) ((ac0 ...) ac)) #'(ac0 ... (hashtable-set! tbl-stx- (quote id) expr))))) (other-syntax #'(error "table$" "Can't expand table$ syntax, which must be alternating symbols and values." 'other-syntax)))) (syntax-case expr () ((_ form ...) (with-syntax ((tbl-stx #'tbl)) (with-syntax (((setter-form ...) (transform #'tbl-stx #'(form ...) #'()))) #'(let ((tbl-stx (make-eq-hashtable))) setter-form ... tbl-stx))))))) (define-syntax assert (lambda (expr) (syntax-case expr () ((_ expr location message irritant ...) #'(let ((v expr)) (when (not v) (error location message (quote expr) v irritant ...)))) ((_ expr location) #'(assert expr location "Assertion failed."))))) (define a-random (java.util.Random)) (define (random-float) (a-random:nextDouble)) (define (random-int from to) (+ from (a-random:nextInt (+ to 1)))) (define (between-inclusive? n a b) (and (>= n a) (<= n b))) (define (modulo=0 n m) (= 0 (modulo n m))) (define (plist-get l s alt) (let ((sl (memq s l))) (if sl (cadr sl) alt))) (define (plist-get-or-error l s) (let* ((alt (list 'what)) (r (plist-get l s alt))) (if (eq? r alt) (error "plist-get-or-error" "Key not found." l s) r))) (define (empty? l) (cond ((vector? l) (= 0 (vector-length l))) ((list? l) (= 0 (length l))))) (define (all-satisfy? l p) (cond ((empty? l) #t) ((p (car l)) (all-satisfy? (cdr l) p)) (else #f))) (define (list-of-numbers? l) (all-satisfy? l number?)) (define (list-of-symbols? l) (all-satisfy? l symbol?)) (define (list-empty? l) (eq? l '())) (define (flor . functions) (lambda args (let loop ((fs functions)) (cond ((eq? fs '()) #f) (else (let ((r (apply (car fs) args))) (if r r (loop (cdr fs))))))))) (define (fland . functions) (lambda args (let loop ((fs functions)) (cond ((eq? fs '()) #t) (else (let ((r (apply (car fs) args))) (if (not r) r (loop (cdr fs))))))))) (define (dsp . args) (display (apply format args)) (newline)) (define (dbg . args) (match args ((list) 'done) ((list* name val rest) (display (format "~a ~a\n" name val)) (apply dbg rest)))) (define (print-tabulation tabulation fill-column) (let* ((total (fold (lambda (it ac) (+ (cadr it) ac)) 0 tabulation)) (max-key-length (fold (lambda (it ac) (let ((l (string-length (format "~a (~a)" (car it) (cadr it))))) (if (> l ac) l ac))) -1 tabulation)) (mk (lambda () (make-string max-key-length))) (padded-keys (map (lambda (k) (let ((ss (format "~a (~a)" (car k) (cadr k))) (i 0) (out (mk))) (string-for-each (lambda (c) (string-set! out i c) (set! i (+ i 1))) ss) out)) tabulation)) (count-reps (map (lambda (entry) (let ((normed (round (* fill-column (/ (cadr entry) total))))) (make-string normed #\*))) tabulation))) (for-each (lambda (pk cnt) (display (format "~a : ~a\n" pk cnt))) padded-keys count-reps))) (define (indexed-for-each f l) (let ((i 0)) (for-each (lambda (el) (f el i) (set! i (+ i 1))) l)) (if #f #t)) (define (tabulate lst) (if (vector? lst) (tabulate (vector->list lst)) (let ((tmp (make-hashtable equal-hash equal?)) (key-order (make-hashtable equal-hash equal?)) (index 0)) (for-each (lambda (el) (when (not (hashtable-contains? tmp el)) (hashtable-set! key-order el index) (set! index (+ 1 index))) (hashtable-update! tmp el (lambda (v) (+ v 1)) 0)) lst) (list-sort (lambda (a b) (< (hashtable-ref key-order (car a) 0) (hashtable-ref key-order (car b) 0))) (map (lambda (k) (list k (hashtable-ref tmp k 0))) (vector->list (hashtable-keys tmp))))))) (define (repeat-accumulate f n) (let ((out (make-vector n)) (i 0)) (repeat (lambda () (vector-set! out i (f)) (set! i (+ 1 i))) n) (vector->list out))) (define (get-class-loader . things) (let ((class-loader (.. Thread (currentThread) (getContextClassLoader)))) class-loader)) (define (repeat f n) (cond ((<= n 0) 'done) (else (f) (repeat f (- n 1))))) (define (interactive-select options) (cond ((eq? options '()) #f) ((eq? '() (cdr options)) (car options)) (else (display "Select One: ") (newline) (indexed-for-each (lambda (opt i) (display (format "~a : ~a\n" i opt))) options) (display ":: ") (let ((n (read))) (cond ((and (number? n) (between-inclusive? n 0 (- (length options) 1))) (list-ref options n)) (else (display "Bad choice!!") (newline) (interactive-select options)))))))))
true
4ada80b3b2fe4a881bb89ff5c7f615566a7cb859
dae624fc36a9d8f4df26f2f787ddce942b030139
/chapter-08/when-unless.scm
41b7536170ee46ed3810ec7a1b0c57e00cd88f06
[ "MIT" ]
permissive
hshiozawa/gauche-book
67dcd238c2edeeacb1032ce4b7345560b959b243
2f899be8a68aee64b6a9844f9cbe83eef324abb5
refs/heads/master
2020-05-30T20:58:40.752116
2019-10-01T08:11:59
2019-10-01T08:11:59
189,961,787
0
0
null
null
null
null
UTF-8
Scheme
false
false
79
scm
when-unless.scm
(when (= 0 1) (print "when")) (unless (= 0 1) (print "unless"))
false
3b6ba429ed9e0993b4ed7382180ff790e284665a
0b1826093fb47c0a7293573d80f03a28e859640f
/chapter-3/ex-3.66.scm
41a1361517c59e87f06aaed43799efeca8a4b91a
[ "MIT" ]
permissive
yysaki/sicp
253ef8ef52a330af6c2107ca7063773e63f1a4aa
36d2964c980c58ba13a2687e0af773a5e12d770d
refs/heads/master
2021-01-20T11:50:20.648783
2017-12-10T03:43:38
2017-12-10T08:08:18
56,677,496
0
0
null
null
null
null
UTF-8
Scheme
false
false
1,023
scm
ex-3.66.scm
(load "./3.5") (define (interleave s1 s2) (if (stream-null? s1) s2 (cons-stream (stream-car s1) (interleave s2 (stream-cdr s1))))) (define (pairs s t) (cons-stream (list (stream-car s) (stream-car t)) (interleave (stream-map (lambda (x) (list (stream-car s) x)) (stream-cdr t)) (pairs (stream-cdr s) (stream-cdr t))))) (display-stream (stream-take (pairs integers integers) 1000)) ; 例えば対(1, 100), 対(99, 100), 対(100, 100)の前に近似的に何個の対が来るか. (数学的な厳密な表現が出来れば大いによい. しかし分らなくなったら, 定性的な答を出すのでもよい.) ; (1, 100) (2, 50) (3, 25) (4, 12) (5, 6) (6, 3), (7, 2) (8, 1) ; 対(1, 100) = 198番目 ; 対(i, i) = 2^i-1 番目 ; 対(i, i+1) = 対(i, i+1) + 2^(i-1) 番目 ; よって ; 対(99,100) ; = 対(99,99) + 2^(99-1) ; = 2^(99)-1 + 2^(98) ; = 950737950171172051122527404031 ; 対(100,100) ; = 2^100-1 ; = 1267650600228229401496703205375
false
c539813c5bb5ad1a07f626229ae230123eabf475
17a42034153044d635a3585d9f0c9ea18c565eee
/Chapter-2/exercise-2.9.5.ss
f0e33bc38fbc12e606a89ab2788f56352c1a4434
[]
no_license
al002/my-tspl4-answers
2c15b0eb508553557fb0909fe1f46b5afa5b458e
4dac628055360fd9356ff32ec1b978b91942e895
refs/heads/master
2021-05-27T23:14:28.514102
2013-04-22T00:18:25
2013-04-22T00:18:25
9,439,289
1
0
null
null
null
null
UTF-8
Scheme
false
false
477
ss
exercise-2.9.5.ss
;; WRONG ANSWER, because make-queue initialize the new queue... (define emptyq? (lambda (q) (and (car q) (cdr q)))) ;; OFFICIAL ANSWER (define emptyq? (lambda (q) (eq? (car q) (cdr q)))) (define getq (lambda (q v) (if (emptyq? q) (assertion-violation 'getq "It's a empty queue!") (car (car q)) (define delq! (lambda (q) (if (emptyq? q) (assertion-violation 'delq! "It's a empty queue!") (set-car! q (cdr (car q)))))
false
4bd1d76e0be5295e77f8521b305944ea02394a07
16c3efe95879e2059a764ffc9206f2ad50c344fd
/regexp-demo.ss
6835be852b751b5f6c827a24e60019653522958a
[]
no_license
spall/not-a-box
4e8283946b13e4634c8dc7d98279fe9dc2e5e75b
b3af9d7701b2e6ca8bcf990c821784658a434176
refs/heads/master
2020-04-06T04:00:57.096084
2017-04-19T02:26:24
2017-04-19T02:26:24
83,073,129
0
0
null
2017-02-24T18:57:15
2017-02-24T18:57:15
null
UTF-8
Scheme
false
false
77
ss
regexp-demo.ss
(import (core) (regexp) (port)) (include "regexp-demo.scm")
false
679ba8f0aa7402b0b7e5bc7c6d1ee24653d810d8
f59b3ca0463fed14792de2445de7eaaf66138946
/section-4/4_16.scm
bbf36b4acec15732cbe92a90732c30d1474d8deb
[]
no_license
uryu1994/sicp
f903db275f6f8c2da0a6c0d9a90c0c1cf8b1e718
b14c728bc3351814ff99ace3b8312a651f788e6c
refs/heads/master
2020-04-12T01:34:28.289074
2018-06-26T15:17:06
2018-06-26T15:17:06
58,478,460
0
1
null
2018-06-20T11:32:33
2016-05-10T16:53:00
Scheme
UTF-8
Scheme
false
false
1,685
scm
4_16.scm
(define (lookup-variable-value var env) (define (env-loop env) (define (scan vars vals) (cond ((null? vars) (env-loop (enclosing-environment env))) ((eq? var (car vars)) (if (eq? (car vals) '*unassigned*) (error "variable is unassigned" var) (car vals))) (else (scan (cdr vars) (cdr vals))))) (if (eq? env the-empty-environment) (error "Unbound variable" var) (let ((frame (first-frame env))) (scan (frame-variables frame) (frame-values frame))))) (env-loop env)) ;; (lambda <vars> ;; (define u <e1>) ;; (define v <e2>) ;; <e3>) ;; (lambda <vars> ;; (let ((u '*unassigned*) ;; (v '*unassigned*)) ;; (set! u <e1>) ;; (set! v <e2>) ;; <e3>)) (define (scan-out-defines body) (define (unassigned-variables definitions) (map (lambda (x) (list (definition-variable x) ''*unassigned*)) definitions)) (define (set-values definitions) (map (lambda (x) (list 'set! (definition-variable x) (definition-value x))) definitions)) (let ((definitions (filter definition? body)) (rest-body (filter (lambda (x) (not (definition? x))) body))) (if (null? definitions) body (list (append (list 'let (unassigned-variables definitions)) (set-values definitions) rest-body))))) ;; make-procedure (define (make-procedure parameters body env) (list 'procedure parameters (scan-out-defines body) env)) ;; evalの前に呼び出される ;; procedure-body (define (procedure-body p) (scan-out-defines (cadddr p))) ;; user-printとapplyで呼び出される ;; 特にapplyは実行頻度が高いため効率がよくない (driver-loop)
false
3cba7a85aed0f9ffaa4a3c423895f9040729f69b
6b288a71553cf3d8701fe7179701d100c656a53c
/s/cpcommonize.ss
6fe04310250069b17c6263a9fe53ff8f8b669902
[ "Apache-2.0" ]
permissive
cisco/ChezScheme
03e2edb655f8f686630f31ba2574f47f29853b6f
c048ad8423791de4bf650fca00519d5c2059d66e
refs/heads/main
2023-08-26T16:11:15.338552
2023-08-25T14:17:54
2023-08-25T14:17:54
56,263,501
7,763
1,410
Apache-2.0
2023-08-28T22:45:52
2016-04-14T19:10:25
Scheme
UTF-8
Scheme
false
false
32,975
ss
cpcommonize.ss
;;; cpcommonize.ss ;;; Copyright 1984-2017 Cisco Systems, Inc. ;;; ;;; Licensed under the Apache License, Version 2.0 (the "License"); ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; http://www.apache.org/licenses/LICENSE-2.0 ;;; ;;; Unless required by applicable law or agreed to in writing, software ;;; distributed under the License is distributed on an "AS IS" BASIS, ;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;;; See the License for the specific language governing permissions and ;;; limitations under the License. (begin (define-who commonization-level ($make-thread-parameter 0 (lambda (x) (unless (and (fixnum? x) (<= 0 x 9)) ($oops who "invalid level ~s" x)) x))) (define $cpcommonize (let () (import (nanopass)) (include "base-lang.ss") (define-record-type binding (nongenerative) (sealed #t) (fields x (mutable e) size helper-box (mutable helper-b) (mutable helper-arg*)) (protocol (lambda (new) (lambda (x e size helper-box) (new x e size helper-box #f #f))))) (define-language Lcommonize1 (extends Lsrc) (terminals (+ (fixnum (size)))) (Expr (e body rtd-expr) (- (letrec ([x* e*] ...) body)) (+ (letrec ([x* e* size] ...) body)))) (define-language Lcommonize2 (extends Lcommonize1) (terminals (- (fixnum (size))) (+ (binding (b helper-b)))) (Expr (e body rtd-expr) (- (letrec ([x* e* size] ...) body)) (+ (letrec (helper-b* ...) (b* ...) body)))) (define-syntax iffalse (syntax-rules () [(_ e1 e2) e1 #;(or e1 (begin e2 #f))])) (define-syntax iftrue (syntax-rules () [(_ e1 e2) e1 #;(let ([t e1]) (and t (begin e2 t)))])) (define Lcommonize1-lambda? (lambda (e) (nanopass-case (Lcommonize1 Expr) e [(case-lambda ,preinfo ,cl* ...) #t] [else #f]))) (define-pass cpcommonize0 : Lsrc (ir) -> Lcommonize1 () (Expr : Expr (ir) -> Expr (1) [(set! ,maybe-src ,x ,[e size]) (values `(set! ,maybe-src ,x ,e) (fx+ 1 size))] [(seq ,[e1 size1] ,[e2 size2]) (values `(seq ,e1 ,e2) (fx+ size1 size2))] [(if ,[e1 size1] ,[e2 size2] ,[e3 size3]) (values `(if ,e1 ,e2 ,e3) (fx+ size1 size2 size3))] [(foreign (,conv* ...) ,name ,[e size] (,arg-type* ...) ,result-type) (values `(foreign (,conv* ...) ,name ,e (,arg-type* ...) ,result-type) (fx+ 1 size))] [(fcallable (,conv* ...) ,[e size] (,arg-type* ...) ,result-type) (values `(fcallable (,conv* ...) ,e (,arg-type* ...) ,result-type) (fx+ 1 size))] ; ($top-level-value 'x) adds just 1 to the size [(call ,preinfo ,pr (quote ,d)) (guard (eq? (primref-name pr) '$top-level-value)) (values `(call ,preinfo ,pr (quote ,d)) 1)] ; (let ([x* e*] ...) body) splits into letrec binding unassigned variables to lambdas plus a let for the remaining bindings [(call ,preinfo1 (case-lambda ,preinfo2 (clause (,x* ...) ,interface ,[body size])) ,[e* -> e* size*] ...) (guard (fx= (length e*) interface)) (define-record-type fudge (nongenerative) (sealed #t) (fields x e size)) (let-values ([(lb* ob*) (partition (lambda (b) (and (not (prelex-assigned (fudge-x b))) (Lcommonize1-lambda? (fudge-e b)))) (map make-fudge x* e* size*))]) (values (let ([body (if (null? ob*) body `(call ,preinfo1 (case-lambda ,preinfo2 (clause (,(map fudge-x ob*) ...) ,(length ob*) ,body)) ,(map fudge-e ob*) ...))]) (if (null? lb*) body `(letrec ([,(map fudge-x lb*) ,(map fudge-e lb*) ,(map fudge-size lb*)] ...) ,body))) (apply fx+ size size*)))] [(call ,preinfo ,[e size] ,[e* size*] ...) (values `(call ,preinfo ,e ,e* ...) (apply fx+ size size*))] [(case-lambda ,preinfo (clause (,x** ...) ,interface* ,[body* size*]) ...) (values `(case-lambda ,preinfo (clause (,x** ...) ,interface* ,body*) ...) (apply fx+ 1 size*))] [(letrec ([,x* ,[e* size*]] ...) ,[body size]) (values `(letrec ([,x* ,e* ,size*] ...) ,body) (apply fx+ size size*))] [(record-ref ,rtd ,type ,index ,[e size]) (values `(record-ref ,rtd ,type ,index ,e) (fx+ size 1))] [(record-set! ,rtd ,type ,index ,[e1 size1] ,[e2 size2]) (values `(record-set! ,rtd ,type ,index ,e1 ,e2) (fx+ size1 size2 1))] [(record ,rtd ,[rtd-expr size] ,[e* size*] ...) (values `(record ,rtd ,rtd-expr ,e* ...) (apply fx+ size size*))] [(cte-optimization-loc ,box ,[e size]) (values `(cte-optimization-loc ,box ,e) size)] [(immutable-list (,[e* size*] ...) ,[e size]) (values `(immutable-list (,e* ...) ,e) (apply fx+ size size*))] [(quote ,d) (values `(quote ,d) 1)] [(ref ,maybe-src ,x) (values `(ref ,maybe-src ,x) 1)] [,pr (values pr 1)] [(moi) (values `(moi) 1)] [(pariah) (values `(pariah) 0)] [(profile ,src) (values `(profile ,src) 0)] [else (sorry! who "unhandled record ~s" ir)]) (let-values ([(e size) (Expr ir)]) e)) (define-pass cpcommonize1 : Lcommonize1 (ir worthwhile-size) -> Lcommonize2 () (definitions (define worthwhile-size? (lambda (expr-size) (fx>= expr-size worthwhile-size))) (define worthwhile-ratio? (lambda (expr-size subst-count) (or (fx= subst-count 0) (fx>= (div expr-size subst-count) 4)))) (define-record-type subst (nongenerative) (sealed #t) (fields t e1 e2)) (define-record-type frob (nongenerative) (sealed #t) (fields subst* e b)) (define ht (make-hashtable values fx=)) (define make-sym (lambda x* (string->symbol (apply string-append (map (lambda (x) (if (prelex? x) (symbol->string (prelex-name x)) x)) x*))))) (define same-preinfo? (lambda (p1 p2) ; ignore differences in src and sexpr #t)) (define same-preinfo-lambda? (lambda (p1 p2) ; ignore differences src, sexpr, and name (eq? (preinfo-lambda-libspec p1) (preinfo-lambda-libspec p2)))) (define-who same-type? (lambda (ty1 ty2) (nanopass-case (Ltype Type) ty1 [(fp-integer ,bits1) (nanopass-case (Ltype Type) ty2 [(fp-integer ,bits2) (= bits1 bits2)] [else #f])] [(fp-unsigned ,bits1) (nanopass-case (Ltype Type) ty2 [(fp-unsigned ,bits2) (= bits1 bits2)] [else #f])] [(fp-void) (nanopass-case (Ltype Type) ty2 [(fp-void) #t] [else #f])] [(fp-scheme-object) (nanopass-case (Ltype Type) ty2 [(fp-scheme-object) #t] [else #f])] [(fp-u8*) (nanopass-case (Ltype Type) ty2 [(fp-u8*) #t] [else #f])] [(fp-u16*) (nanopass-case (Ltype Type) ty2 [(fp-u16*) #t] [else #f])] [(fp-u32*) (nanopass-case (Ltype Type) ty2 [(fp-u32*) #t] [else #f])] [(fp-fixnum) (nanopass-case (Ltype Type) ty2 [(fp-fixnum) #t] [else #f])] [(fp-double-float) (nanopass-case (Ltype Type) ty2 [(fp-double-float) #t] [else #f])] [(fp-single-float) (nanopass-case (Ltype Type) ty2 [(fp-single-float) #t] [else #f])] [(fp-ftd ,ftd1) (nanopass-case (Ltype Type) ty2 [(fp-ftd ,ftd2) (eq? ftd1 ftd2)] [else #f])] [else (sorry! who "unhandled foreign type ~s" ty1)]))) (define okay-to-subst? (lambda (e) (define free? (lambda (x) (and (not (prelex-operand x)) #t))) (nanopass-case (Lcommonize1 Expr) e [(ref ,maybe-src1 ,x1) (and (not (prelex-assigned x1)) (free? x1))] [(quote ,d) #t] [,pr (all-set? (prim-mask proc) (primref-flags pr))] [else #f]))) (define constant-equal? (lambda (x y) (define record-equal? (lambda (x y e?) (let ([rtd ($record-type-descriptor x)]) (and (eq? ($record-type-descriptor y) rtd) (let f ([field-name* (csv7:record-type-field-names rtd)] [i 0]) (or (null? field-name*) (and (let ([accessor (csv7:record-field-accessor rtd i)]) (e? (accessor x) (accessor y))) (f (cdr field-name*) (fx+ i 1))))))))) (parameterize ([default-record-equal-procedure record-equal?]) ; equal? should be okay since even mutable constants aren't supposed to be mutated (equal? x y)))) (define same? (lambda (e1 e2) (nanopass-case (Lcommonize1 Expr) e1 [(ref ,maybe-src1 ,x1) (nanopass-case (Lcommonize1 Expr) e2 [(ref ,maybe-src2 ,x2) (or (eq? x1 x2) (eq? (prelex-operand x1) x2))] [else #f])] [(quote ,d1) (nanopass-case (Lcommonize1 Expr) e2 [(quote ,d2) (constant-equal? d1 d2)] [else #f])] [,pr1 (nanopass-case (Lcommonize1 Expr) e2 [,pr2 (eq? pr1 pr2)] [else #f])] [(moi) (nanopass-case (Lcommonize1 Expr) e2 [(moi) #t] [else #f])] [(pariah) (nanopass-case (Lcommonize1 Expr) e2 [(pariah) #t] [else #f])] [(profile ,src1) (nanopass-case (Lcommonize1 Expr) e2 [(profile ,src2) (eq? src1 src2)] [else #f])] [(call ,preinfo1 ,pr1 (quote ,d1)) (guard (eq? (primref-name pr1) '$top-level-value)) (nanopass-case (Lcommonize1 Expr) e2 [(call ,preinfo2 ,pr2 (quote ,d2)) (guard (eq? (primref-name pr2) '$top-level-value)) (and (same-preinfo? preinfo1 preinfo2) (eq? d1 d2))] [else #f])] [else #f]))) (define-who unify (lambda (e1 e2) (module (with-env) (define $with-env (lambda (x1* x2* th) (dynamic-wind (lambda () (map (lambda (x1 x2) (prelex-operand-set! x1 x2) (prelex-operand-set! x2 #t)) x1* x2*)) th (lambda () (map (lambda (x1 x2) (prelex-operand-set! x1 #f) (prelex-operand-set! x2 #f)) x1* x2*))))) (define-syntax with-env (syntax-rules () [(_ x1* x2* e) ($with-env x1* x2* (lambda () e))]))) (call/cc (lambda (return) (let ([subst* '()]) (define lookup-subst (lambda (e1 e2) (define same-subst? (lambda (x) (and (same? (subst-e1 x) e1) (same? (subst-e2 x) e2)))) (cond [(find same-subst? subst*) => (lambda (subst) (let ([t (subst-t subst)]) (set-prelex-multiply-referenced! t #t) t))] [else #f]))) (let ([e (with-output-language (Lcommonize1 Expr) (let () (define fclause (lambda (cl1 cl2) (nanopass-case (Lcommonize1 CaseLambdaClause) cl1 [(clause (,x1* ...) ,interface1 ,body1) (nanopass-case (Lcommonize1 CaseLambdaClause) cl2 [(clause (,x2* ...) ,interface2 ,body2) (if (fx= interface1 interface2) (with-env x1* x2* (with-output-language (Lcommonize1 CaseLambdaClause) `(clause (,x1* ...) ,interface1 ,(f body1 body2)))) (return (iffalse #f (printf "lambda interfaces don't match\n")) '()))])]))) (define f (case-lambda [(e1 e2) (f e1 e2 #f)] [(e1 e2 call-position?) (or (cond [(same? e1 e2) e1] [(and (not call-position?) (okay-to-subst? e1) (okay-to-subst? e2)) `(ref #f ,(or (lookup-subst e1 e2) (let ([t (make-prelex*)]) (set-prelex-referenced! t #t) (set! subst* (cons (make-subst t e1 e2) subst*)) t)))] [else (nanopass-case (Lcommonize1 Expr) e1 [(ref ,maybe-src1 ,x1) #f] [(quote ,d) #f] [,pr #f] [(moi) #f] [(profile ,src1) #f] ; reject non-same top-level-value calls with constant symbol so they ; don't end up being abstracted over the symbol in the residual code [(call ,preinfo ,pr (quote ,d)) (guard (eq? (primref-name pr) '$top-level-value)) #f] ; don't allow abstraction of first (type) argument to $object-ref, foreign-ref, etc., ; since they can't be inlined without a constant type. ; ditto for $tc-field's first (field) argument. ; there are many other primitives we don't catch here for which the compiler generates ; more efficient code when certain arguments are constant. [(call ,preinfo1 ,pr1 (quote ,d1) ,e1* ...) (guard (memq (primref-name pr1) '($object-ref $swap-object-ref $object-set foreign-ref foreign-set! $tc-field))) (nanopass-case (Lcommonize1 Expr) e2 [(call ,preinfo2 ,pr2 (quote ,d2) ,e2* ...) (guard (eq? pr2 pr1) (eq? d1 d2)) (and (same-preinfo? preinfo1 preinfo2) (fx= (length e1*) (length e2*)) `(call ,preinfo1 ,pr1 (quote ,d1) ,(map f e1* e2*) ...))] [else #f])] [(call ,preinfo1 ,e1 ,e1* ...) (nanopass-case (Lcommonize1 Expr) e2 [(call ,preinfo2 ,e2 ,e2* ...) (and (fx= (length e1*) (length e2*)) (same-preinfo? preinfo1 preinfo2) `(call ,preinfo1 ,(f e1 e2 #t) ,(map f e1* e2*) ...))] [else #f])] [(if ,e10 ,e11 ,e12) (nanopass-case (Lcommonize1 Expr) e2 [(if ,e20 ,e21 ,e22) `(if ,(f e10 e20) ,(f e11 e21) ,(f e12 e22))] [else #f])] [(case-lambda ,preinfo1 ,cl1* ...) (nanopass-case (Lcommonize1 Expr) e2 [(case-lambda ,preinfo2 ,cl2* ...) (and (fx= (length cl1*) (length cl2*)) (same-preinfo-lambda? preinfo1 preinfo2) `(case-lambda ,preinfo1 ,(map fclause cl1* cl2*) ...))] [else #f])] [(seq ,e11 ,e12) (nanopass-case (Lcommonize1 Expr) e2 [(seq ,e21 ,e22) `(seq ,(f e11 e21) ,(f e12 e22))] [else #f])] [(set! ,maybe-src1 ,x1 ,e1) (nanopass-case (Lcommonize1 Expr) e2 [(set! ,maybe-src2 ,x2 ,e2) (and (eq? x1 x2) `(set! ,maybe-src1 ,x1 ,(f e1 e2)))] [else #f])] [(letrec ([,x1* ,e1* ,size1*] ...) ,body1) (nanopass-case (Lcommonize1 Expr) e2 [(letrec ([,x2* ,e2* ,size2*] ...) ,body2) (and (fx= (length x2*) (length x1*)) (andmap fx= size1* size2*) (with-env x1* x2* `(letrec ([,x1* ,(map f e1* e2*) ,size1*] ...) ,(f body1 body2))))] [else #f])] [(foreign (,conv1* ...) ,name1 ,e1 (,arg-type1* ...) ,result-type1) (nanopass-case (Lcommonize1 Expr) e2 [(foreign (,conv2* ...) ,name2 ,e2 (,arg-type2* ...) ,result-type2) (and (equal? conv1* conv2*) (equal? name1 name2) (fx= (length arg-type1*) (length arg-type2*)) (andmap same-type? arg-type1* arg-type2*) (same-type? result-type1 result-type2) `(foreign (,conv1* ...) ,name1 ,(f e1 e2) (,arg-type1* ...) ,result-type1))] [else #f])] [(fcallable (,conv1* ...) ,e1 (,arg-type1* ...) ,result-type1) (nanopass-case (Lcommonize1 Expr) e2 [(fcallable (,conv2* ...) ,e2 (,arg-type2* ...) ,result-type2) (and (equal? conv1* conv2*) (fx= (length arg-type1*) (length arg-type2*)) (andmap same-type? arg-type1* arg-type2*) (same-type? result-type1 result-type2) `(fcallable (,conv1* ...) ,(f e1 e2) (,arg-type1* ...) ,result-type1))] [else #f])] [(cte-optimization-loc ,box1 ,e1) (nanopass-case (Lcommonize1 Expr) e2 [(cte-optimization-loc ,box2 ,e2) (and (eq? box1 box2) `(cte-optimization-loc ,box1 ,(f e1 e2)))] [else #f])] [else (sorry! who "unhandled record ~s" e1)])]) (return (iffalse #f (parameterize ([print-level 3] [print-length 5]) (printf "unify failed for ~s and ~s (call-position ~s)\n" e1 e2 call-position?))) '()))])) (f e1 e2)))]) (values e subst*))))))) (define sort-substs ; reestablish original argument order for substituted variables where possible ; so the arguments to an abstracted procedure aren't shuffled around in the ; call to the generated helper. (lambda (subst0* x1* x2*) (define (this? x x*) (and (not (null? x*)) (eq? x (car x*)))) (define (next x*) (if (null? x*) x* (cdr x*))) (let-values ([(new-subst* subst*) (let f ([x1* x1*] [x2* x2*] [subst* subst0*] [n (length subst0*)]) (cond [(fx= n 0) (values '() subst*)] [(find (lambda (subst) (define (is-this-arg? e x*) (nanopass-case (Lcommonize1 Expr) e [(ref ,maybe-src ,x) (this? x x*)] [else #f])) (or (is-this-arg? (subst-e1 subst) x1*) (is-this-arg? (subst-e2 subst) x2*))) subst*) => (lambda (subst) (let-values ([(new-subst* subst*) (f (next x1*) (next x2*) (remq subst subst*) (fx- n 1))]) (values (cons subst new-subst*) subst*)))] [else (let-values ([(new-subst* subst*) (f (next x1*) (next x2*) subst* (fx- n 1))]) (values (cons (car subst*) new-subst*) (cdr subst*)))]))]) (safe-assert (null? subst*)) (safe-assert (fx= (length new-subst*) (length subst0*))) new-subst*))) (define find-match (lambda (b1 ht) (and (iffalse (worthwhile-size? (binding-size b1)) (printf "skipping b1: under worthwhile size ~s ~s\n" (binding-size b1) worthwhile-size)) (ormap (lambda (b2) (iffalse #f (printf "checking ~s & ~s:" (prelex-name (binding-x b1)) (prelex-name (binding-x b2)))) (nanopass-case (Lcommonize1 Expr) (binding-e b1) ; NB: restricting to one clause for now...handling multiple ; NB: clauses should be straightforward with a helper per ; NB: common clause. [(case-lambda ,preinfo1 (clause (,x1* ...) ,interface1 ,body1)) ; NB: no rest interface for now. should be straightforward (guard (fxnonnegative? interface1)) (and (nanopass-case (Lcommonize1 Expr) (binding-e b2) [(case-lambda ,preinfo2 (clause (,x2* ...) ,interface2 ,body2)) (guard (fxnonnegative? interface2)) (let-values ([(e subst*) (unify body1 body2)]) (and e (iffalse (worthwhile-ratio? (binding-size b1) (length subst*)) (printf " no, not worthwhile ratio ~s ~s\n" (binding-size b1) (length subst*))) (let ([subst* (sort-substs subst* x1* x2*)]) (iffalse #f (printf " yes\n")) (make-frob subst* e b2))))] [else (iffalse #f (printf " no, b2 does not meet lambda restrictions\n"))]))] [else (iffalse #f (printf " no, b1 does not meet lambda restrictions\n"))])) (hashtable-ref ht (binding-size b1) '()))))) (define record-helper! (lambda (b next e*) (binding-helper-b-set! b next) (binding-helper-arg*-set! b e*))) (define build-helper (lambda (t t* body size helper-box) (make-binding t (with-output-language (Lcommonize1 Expr) `(case-lambda ,(make-preinfo-lambda) (clause (,t* ...) ,(length t*) ,body))) size helper-box))) (define commonize-letrec (lambda (x* e* size* body) ; e* and body have not been processed (define (prune-and-process! b) (let ([b* (remq b (hashtable-ref ht (binding-size b) '()))]) (if (null? b*) (hashtable-delete! ht (binding-size b)) (hashtable-set! ht (binding-size b) b*))) (unless (binding-helper-b b) (binding-e-set! b (Expr (binding-e b))))) (if (null? x*) body (let ([helper-box (box '())]) (let ([b* (map (lambda (x e size) (make-binding x e size helper-box)) x* e* size*)]) (let ([body (let f ([b* b*]) (if (null? b*) (Expr body) (let ([b (car b*)]) (let ([frob (find-match b ht)]) (if frob (let* ([outer-b (frob-b frob)] [helper-box (binding-helper-box outer-b)] [helper-b (let ([t (make-prelex* (make-sym (binding-x b) "&" (binding-x outer-b)))]) (build-helper t (map subst-t (frob-subst* frob)) (frob-e frob) (binding-size outer-b) helper-box))]) (set-box! helper-box (cons helper-b (unbox helper-box))) (record-helper! b helper-b (map subst-e1 (frob-subst* frob))) (record-helper! outer-b helper-b (map subst-e2 (frob-subst* frob))) (hashtable-update! ht (binding-size outer-b) (lambda (b*) (cons helper-b (remq outer-b b*))) '()) (f (cdr b*))) (begin (hashtable-update! ht (binding-size b) (lambda (b*) (cons b b*)) '()) (let ([body (f (cdr b*))]) (prune-and-process! b) body)))))))]) (let ([helper-b* (unbox helper-box)]) (for-each prune-and-process! helper-b*) (with-output-language (Lcommonize2 Expr) `(letrec (,helper-b* ...) (,b* ...) ,body)))))))))) (Expr : Expr (ir) -> Expr () [(letrec ([,x* ,e* ,size*] ...) ,body) ; only unassigned lambda bindings post-cpletrec (safe-assert (andmap (lambda (x) (not (prelex-assigned x))) x*)) (safe-assert (andmap (lambda (e) (Lcommonize1-lambda? e)) e*)) (commonize-letrec x* e* size* body)] [(letrec* ([,x* ,e*] ...) ,body) ; no letrec* run post-cpletrec (assert #f)])) (define-pass cpcommonize2 : Lcommonize2 (ir) -> Lsrc () (definitions (define build-caller (lambda (e helper-b helper-arg*) (define-who Arg (lambda (e) (with-output-language (Lsrc Expr) (nanopass-case (Lcommonize1 Expr) e [(ref ,maybe-src ,x) `(ref ,maybe-src ,x)] [(quote ,d) `(quote ,d)] [else (sorry! who "unexpected helper arg ~s" e)])))) (define propagate (lambda (alist) (lambda (e) (nanopass-case (Lsrc Expr) e [(ref ,maybe-src ,x) (cond [(assq x alist) => cdr] [else e])] [else e])))) (nanopass-case (Lcommonize1 Expr) e [(case-lambda ,preinfo (clause (,x* ...) ,interface ,body)) (with-output-language (Lsrc Expr) `(case-lambda ,preinfo (clause (,x* ...) ,interface ,(let loop ([helper-b helper-b] [e* (map Arg helper-arg*)]) (if (binding-helper-b helper-b) (nanopass-case (Lcommonize1 Expr) (binding-e helper-b) [(case-lambda ,preinfo (clause (,x* ...) ,interface ,body)) (loop (binding-helper-b helper-b) (map (propagate (map cons x* e*)) (map Arg (binding-helper-arg* helper-b))))]) `(call ,(make-preinfo) ,(let ([t (binding-x helper-b)]) (if (prelex-referenced t) (set-prelex-multiply-referenced! t #t) (set-prelex-referenced! t #t)) `(ref #f ,t)) ,e* ...))))))]))) (define maybe-build-caller (lambda (b) (let ([helper-b (binding-helper-b b)] [e (binding-e b)]) (if helper-b (build-caller e helper-b (binding-helper-arg* b)) (Expr e)))))) (Expr : Expr (ir) -> Expr () [(letrec (,helper-b* ...) (,b* ...) ,[body]) (let loop ([rb* (reverse helper-b*)] [x* (map binding-x b*)] [e* (map maybe-build-caller b*)]) (if (null? rb*) `(letrec ([,x* ,e*] ...) ,body) (let ([b (car rb*)] [rb* (cdr rb*)]) (if (prelex-referenced (binding-x b)) (loop rb* (cons (binding-x b) x*) (cons (maybe-build-caller b) e*)) (loop rb* x* e*)))))])) (lambda (x) (let ([level (commonization-level)]) (if (fx= level 0) x (let ([worthwhile-size (expt 2 (fx- 10 level))]) (cpcommonize2 (cpcommonize1 (cpcommonize0 x) worthwhile-size)))))))) )
true
73fda6c1dbc2f1a1eeda35bfab6b3c53cb7a3392
12fc725f8273ebfd9ece9ec19af748036823f495
/daemon/variants/all_daemon.var.ss
7f590f640e9a0e5dbac3af8629470969497d483c
[]
no_license
contextlogger/contextlogger2
538e80c120f206553c4c88c5fc51546ae848785e
8af400c3da088f25fd1420dd63889aff5feb1102
refs/heads/master
2020-05-05T05:03:47.896638
2011-10-05T23:50:14
2011-10-05T23:50:14
1,675,623
1
0
null
null
null
null
UTF-8
Scheme
false
false
211
ss
all_daemon.var.ss
#lang scheme #| |# (require "base.ss") (require common/usual-4) (require konffaile/variant) (define* (info) (new devel-variant% (binary-type/o 'daemon) (sensor-list ALL-SYMBIAN-SENSORS)))
false
8a03be62de3165ae13205ec1ff31a13e41bae676
2c01a6143d8630044e3629f2ca8adf1455f25801
/xitomatl/tests/file-system-paths-tests.sps
585c8ba1d1572c7bf491c741a4169e1be09adfb1
[ "X11-distribute-modifications-variant" ]
permissive
stuhlmueller/scheme-tools
e103fac13cfcb6d45e54e4f27e409adbc0125fe1
6e82e873d29b34b0de69b768c5a0317446867b3c
refs/heads/master
2021-01-25T10:06:33.054510
2017-05-09T19:44:12
2017-05-09T19:44:12
1,092,490
5
1
null
null
null
null
UTF-8
Scheme
false
false
13,045
sps
file-system-paths-tests.sps
#!r6rs ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named ;; LICENSE from the original collection this file is distributed with. (import (rnrs) (xitomatl file-system paths) (srfi :78 lightweight-testing)) (path-style 'posix) (check (path? "") => #F) (check (path? 1) => #F) (check (path? 'oops) => #F) (check (path? "a") => #T) (check (path? " ") => #T) (check (path? "/") => #T) (check (path? "/foo") => #T) (check (absolute-path? "") => #F) (check (absolute-path? "a") => #F) (check (absolute-path? " a ") => #F) (check (absolute-path? "a/ b") => #F) (check (absolute-path? "a// //b") => #F) (check (absolute-path? "a////b///") => #F) (check (absolute-path? "/") => #T) (check (absolute-path? "///// //") => #T) (check (absolute-path? "/a") => #T) (check (absolute-path? "/a/b") => #T) (check (absolute-path? "//a/b") => #T) (check (absolute-path? "/////a //b//") => #T) (check (relative-path? "") => #F) (check (relative-path? " ") => #T) (check (relative-path? " a ") => #T) (check (relative-path? "a/b") => #T) (check (relative-path? "a// // b ") => #T) (check (relative-path? "a////b///") => #T) (check (relative-path? "/") => #F) (check (relative-path? "///// //") => #F) (check (relative-path? "/a") => #F) (check (relative-path? "/a/b") => #F) (check (relative-path? "//a/b") => #F) (check (relative-path? "/////a //b//") => #F) (check (path-join) => "") (check (path-join "a") => "a") (check (path-join "/") => "/") (check (path-join "/" "a") => "/a") (check (path-join "/a") => "/a") (check (path-join " " "a") => " /a") (check (path-join "" "a") => "a") (check (path-join "" "/a") => "/a") (check (path-join "a" "b") => "a/b") (check (path-join "a" "" "b" "") => "a/b") (check (path-join "" "a" "b") => "a/b") (check (path-join "a/b") => "a/b") (check (path-join "/a/b") => "/a/b") (check (path-join "" "/a/b") => "/a/b") (check (path-join "//a///b") => "/a/b") (check (path-join "a " " b") => "a / b") (check (path-join "/a" "b") => "/a/b") (check (path-join "/" "a" "b") => "/a/b") (check (path-join "/" "a/b") => "/a/b") (check (path-join "a/b" "/") => "a/b") (check (path-join "/" "a/b" "/") => "/a/b") (check (path-join "/////a/////" "b" "c") => "/a/b/c") (check (path-join "" "/////a/////" "b" "c") => "/a/b/c") (check (path-join "/////a/////" "/b/" "c////") => "/a/b/c") (check (path-join "" "/////a/////" "///b" "///c") => "/a/b/c") (check (path-join "a" "b" "c" "d" "e" "f") => "a/b/c/d/e/f") (check (path-join "a" "b/c/d" "e/f") => "a/b/c/d/e/f") (check (path-join "a" "/b//c///d" "e//////f") => "a/b/c/d/e/f") (check (path-join "/a" "b" "c" "d" "e" "f") => "/a/b/c/d/e/f") (check (path-join "//////" "a" "b" "c" "d" "e" "f") => "/a/b/c/d/e/f") (check (path-join "//////" "//////a" "b////////" "c/" "/d//" "//e" "f////////////////") => "/a/b/c/d/e/f") (check (path-join "/// ///" "//////a" "b b////////" "c/" "/d//" "//e" "f//////////////// ") => "/ /a/b b/c/d/e/f/ ") (check (path-split "") => '()) (check (path-split "/") => '("/")) (check (path-split "a") => '("a")) (check (path-split "ab cd") => '("ab cd")) (check (path-split "a/b") => '("a" "b")) (check (path-split "a/b/") => '("a" "b")) (check (path-split "aa a/b bb bbb") => '("aa a" "b bb bbb")) (check (path-split "/a/b") => '("/" "a" "b")) (check (path-split " /a/b") => '(" " "a" "b")) (check (path-split " /a / b") => '(" " "a " " b")) (check (path-split "//// a / b bbbbb ") => '("/" " a " " b bbbbb ")) (check (normalize-path "") => "") (check (normalize-path "/") => "/") (check (normalize-path "//") => "/") (check (normalize-path "////////////") => "/") (check (normalize-path "a") => "a") (check (normalize-path "ab cd") => "ab cd") (check (normalize-path "a/b") => "a/b") (check (normalize-path "a//b") => "a/b") (check (normalize-path "a/b/") => "a/b") (check (normalize-path "a/////////////b") => "a/b") (check (normalize-path "a////b//////") => "a/b") (check (normalize-path "aa a/b bb bbb") => "aa a/b bb bbb") (check (normalize-path "/a/b") => "/a/b") (check (normalize-path " /a/b") => " /a/b") (check (normalize-path "//a") => "/a") (check (normalize-path "//////a//////") => "/a") (check (normalize-path "//////a////bb//ccc///////dddd/eeeee//") => "/a/bb/ccc/dddd/eeeee") (check (path=? "/" "//" "///") => #T) (check (path=? "/a" "////a" "//a/") => #T) (check (path=? "//////a////bb//ccc///////dddd/eeeee//" "/a/bb/ccc/dddd/eeeee" "///a/bb///ccc///dddd//eeeee") => #T) (check (path=? "a/bb/ccc/" "a//bb///ccc") => #T) (check (path=? "a/bb/ccc/" "a//bb///ccc" "a///bb//ccc" "a//bb///ccc/" "a//bb///ccc//" "a//bb///ccc" "a//bb///ccc" "a/bb/ccc" "a//bb//ccc" "a/bb/ccc/") => #T) (check (path=? "foo/bar" "foo/baz") => #F) (check (path=? "/a/b/c/d" "/a/b/c/") => #F) (path-style 'windows) (check (path? "a") => #T) (check (path? "foo\\bar") => #T) (check (path? "\\foo") => #T) (check (path? "C:\\") => #T) (check (path? "C:foo") => #T) (check (path? "C:") => #F) (check (path? "") => #F) (check (absolute-path? "C:") => #F) (check (absolute-path? "foo\\bar") => #F) (check (absolute-path? "C:foo") => #F) (check (absolute-path? "\\") => #T) (check (absolute-path? "\\foo") => #T) (check (absolute-path? "C:\\") => #T) (check (absolute-path? "C:\\foo") => #T) (check (relative-path? "C:") => #F) (check (relative-path? "foo\\bar") => #T) (check (relative-path? "C:foo") => #T) (check (relative-path? "\\") => #F) (check (relative-path? "\\foo") => #F) (check (relative-path? "C:\\") => #F) (check (relative-path? "C:\\foo") => #F) (check (path-join) => "") (check (path-join "foo") => "foo") (check (path-join "foo" "bar") => "foo\\bar") (check (path-join "C:" "foo" "bar") => "C:\\foo\\bar") (check (path-join "\\foo" "bar") => "\\foo\\bar") (check (path-join "foo" "\\bar") => "foo\\bar") (check (path-join "C:\\" "foo" "bar") => "C:\\foo\\bar") (check (path-join "C:\\\\" "foo" "bar") => "C:\\foo\\bar") (check (path-join "C:foo" "bar") => "C:foo\\bar") (check (path-join "\\" "foo" "bar") => "\\foo\\bar") (check (path-join "\\" "C:" "bar") => "\\C:\\bar") (check (path-join "C:\\foo" "bar") => "C:\\foo\\bar") (check (path-join "C:\\\\foo\\" "\\bar\\") => "C:\\foo\\bar") (check (path-join "C:" "\\foo" "bar") => "C:\\foo\\bar") (check (path-join "\\") => "\\") (check (path-join "C:\\") => "C:\\") (check (path-join "C:\\\\") => "C:\\") (check (path-join "" "\\foo" "bar") => "\\foo\\bar") (check (path-join "" "C:\\" "bar") => "C:\\bar") (check (path-join "//foo/" "/bar" "//zab/") => "//foo/\\/bar\\//zab/") (check (path-split "") => '()) (check (path-split "a") => '("a")) (check (path-split "C:a\\") => '("C:a")) (check (path-split "a\\b") => '("a" "b")) (check (path-split "C:a\\b") => '("C:a" "b")) (check (path-split "\\") => '("\\")) (check (path-split "\\a") => '("\\" "a")) (check (path-split "\\foo\\bar") => '("\\" "foo" "bar")) (check (path-split "C:\\") => '("C:\\")) (check (path-split "C:\\a") => '("C:\\" "a")) (check (path-split "C:\\foo\\bar") => '("C:\\" "foo" "bar")) (check (path-split "C:\\\\foo\\\\bar\\\\") => '("C:\\" "foo" "bar")) (check (path-split "C:/foo/bar/") => '("C:/foo/bar/")) (check (normalize-path "") => "") (check (normalize-path "a") => "a") (check (normalize-path "\\") => "\\") (check (normalize-path "C:\\") => "C:\\") (check (normalize-path "foo\\\\bar") => "foo\\bar") (check (normalize-path "\\\\") => "\\") (check (normalize-path "\\\\foo") => "\\foo") (check (normalize-path "foo\\") => "foo") (check (normalize-path "\\\\\\foo\\\\bar\\") => "\\foo\\bar") (check (normalize-path "C:\\\\") => "C:\\") (check (normalize-path "C:\\\\foo") => "C:\\foo") (check (normalize-path "C:\\\\foo\\\\bar\\zab\\\\") => "C:\\foo\\bar\\zab") (check (path=? "" "") => #T) (check (path=? "\\" "\\\\") => #T) (check (path=? "foo\\" "foo") => #T) (check (path=? "C:\\\\\\" "C:\\\\") => #T) (check (path=? "C:\\foo\\\\bar\\" "C:\\\\foo\\bar\\\\") => #T) (check (path=? "C:foo\\bar" "C:foo\\\\bar") => #T) (check (path=? "\\" "") => #F) (check (path=? "\\foo" "foo") => #F) (check (path=? "C:\\" "C:") => #F) (check (path=? "C:\\foo" "C:foo") => #F) (path-style 'windows-/) (check (path? "a") => #T) (check (path? "foo/bar") => #T) (check (path? "/foo") => #T) (check (path? "C:/") => #T) (check (path? "C:foo") => #T) (check (path? "C:") => #F) (check (path? "") => #F) (check (absolute-path? "C:") => #F) (check (absolute-path? "foo/bar") => #F) (check (absolute-path? "C:foo") => #F) (check (absolute-path? "/") => #T) (check (absolute-path? "/foo") => #T) (check (absolute-path? "C:/") => #T) (check (absolute-path? "C:/foo") => #T) (check (relative-path? "C:") => #F) (check (relative-path? "foo/bar") => #T) (check (relative-path? "C:foo") => #T) (check (relative-path? "/") => #F) (check (relative-path? "/foo") => #F) (check (relative-path? "C:/") => #F) (check (relative-path? "C:/foo") => #F) (check (path-join) => "") (check (path-join "foo") => "foo") (check (path-join "foo" "bar") => "foo/bar") (check (path-join "C:" "foo" "bar") => "C:/foo/bar") (check (path-join "/foo" "bar") => "/foo/bar") (check (path-join "foo" "/bar") => "foo/bar") (check (path-join "C:/" "foo" "bar") => "C:/foo/bar") (check (path-join "C://" "foo" "bar") => "C:/foo/bar") (check (path-join "C:foo" "bar") => "C:foo/bar") (check (path-join "/" "foo" "bar") => "/foo/bar") (check (path-join "/" "C:" "bar") => "/C:/bar") (check (path-join "C:/foo" "bar") => "C:/foo/bar") (check (path-join "C://foo/" "/bar/") => "C:/foo/bar") (check (path-join "C:" "/foo" "bar") => "C:/foo/bar") (check (path-join "/") => "/") (check (path-join "C:/") => "C:/") (check (path-join "C://") => "C:/") (check (path-join "" "/foo" "bar") => "/foo/bar") (check (path-join "" "C:/" "bar") => "C:/bar") (check (path-join "\\\\foo\\" "\\bar" "\\\\zab\\") => "\\\\foo\\/\\bar/\\\\zab\\") (check (path-split "") => '()) (check (path-split "a") => '("a")) (check (path-split "C:a/") => '("C:a")) (check (path-split "a/b") => '("a" "b")) (check (path-split "C:a/b") => '("C:a" "b")) (check (path-split "/") => '("/")) (check (path-split "/a") => '("/" "a")) (check (path-split "/foo/bar") => '("/" "foo" "bar")) (check (path-split "C:/") => '("C:/")) (check (path-split "C:/a") => '("C:/" "a")) (check (path-split "C:/foo/bar") => '("C:/" "foo" "bar")) (check (path-split "C://foo//bar//") => '("C:/" "foo" "bar")) (check (path-split "C:\\foo\\bar\\") => '("C:\\foo\\bar\\")) (check (normalize-path "") => "") (check (normalize-path "a") => "a") (check (normalize-path "/") => "/") (check (normalize-path "C:/") => "C:/") (check (normalize-path "foo//bar") => "foo/bar") (check (normalize-path "//") => "/") (check (normalize-path "//foo") => "/foo") (check (normalize-path "foo/") => "foo") (check (normalize-path "///foo//bar/") => "/foo/bar") (check (normalize-path "C://") => "C:/") (check (normalize-path "C://foo") => "C:/foo") (check (normalize-path "C://foo//bar/zab//") => "C:/foo/bar/zab") (check (path=? "" "") => #T) (check (path=? "/" "//") => #T) (check (path=? "foo/" "foo") => #T) (check (path=? "C:///" "C://") => #T) (check (path=? "C:/foo//bar/" "C://foo/bar//") => #T) (check (path=? "C:foo/bar" "C:foo//bar") => #T) (check (path=? "/" "") => #F) (check (path=? "/foo" "foo") => #F) (check (path=? "C:/" "C:") => #F) (check (path=? "C:/foo" "C:foo") => #F) (check-report)
false
b2c41a2081c88cea5d2bd3a9be3056f93a5c7d54
f2a89a6c62c60082aeec115c2d4b5a1c947a4bd8
/scheme/gambit/all.scm
da550bd45d99a8ed9b8748561f1945c5807e8a99
[]
no_license
offby1/anagrams
13b83343d8f1ca8a0ab1cbc65aedac39c47ee1a9
0a7fbcff49a7dee6ed28333ecd354dd1fcff4bd6
refs/heads/master
2021-06-05T00:51:33.057068
2017-11-20T05:16:37
2017-11-20T05:16:37
89,620
9
5
null
2017-11-20T05:16:38
2008-12-12T17:57:46
Scheme
UTF-8
Scheme
false
false
128
scm
all.scm
(declare (standard-bindings)(block)(not safe)(mostly-fixnum)) (include "bag.scm") (include "dict.scm") (include "anagrams.scm")
false
e21755ec08cf4e27962d131c1d190720761c820c
defeada37d39bca09ef76f66f38683754c0a6aa0
/System/system/component-model/instance-creation-editor.sls
9be2afb11ba6801382e8db9124d83dc983524de9
[]
no_license
futsuki/ironscheme-port
2dbac82c0bda4f4ff509208f7f00a5211d1f7cd5
4e7a81b0fbeac9a47440464988e53fb118286c54
refs/heads/master
2016-09-06T17:13:11.462593
2015-09-26T18:20:40
2015-09-26T18:20:40
42,757,369
0
0
null
null
null
null
UTF-8
Scheme
false
false
672
sls
instance-creation-editor.sls
(library (system component-model instance-creation-editor) (export is? instance-creation-editor? create-instance text) (import (ironscheme-clr-port)) (define (is? a) (clr-is System.ComponentModel.InstanceCreationEditor a)) (define (instance-creation-editor? a) (clr-is System.ComponentModel.InstanceCreationEditor a)) (define-method-port create-instance System.ComponentModel.InstanceCreationEditor CreateInstance (System.Object System.ComponentModel.ITypeDescriptorContext System.Type)) (define-field-port text #f #f (property:) System.ComponentModel.InstanceCreationEditor Text System.String))
false
c07ca2a950986c74c3ba3830b000bd9fe64a0dae
6c6cf6e4b77640825c2457e54052a56d5de6f4d2
/ch3/3_72.scm
b9dbf8a0e9cdc979b455df3caaff650adcccb19a
[]
no_license
leonacwa/sicp
a469c7bc96e0c47e4658dccd7c5309350090a746
d880b482d8027b7111678eff8d1c848e156d5374
refs/heads/master
2018-12-28T07:20:30.118868
2015-02-07T16:40:10
2015-02-07T16:40:10
11,738,761
0
0
null
null
null
null
UTF-8
Scheme
false
false
967
scm
3_72.scm
(load "s3_5-scale-stream.scm") (load "s3_5-integers.scm") (load "3_70-merge-weighted.scm") (load "3_70-weighted-pairs.scm") (load "s3_5-display-stream.scm") (load "3_67-stream-n.scm") (define (double-weight p) (let ((i (car p)) (j (cadr p))) (let ((sum (+ (* i i) (* j j)))) (+ (* sum sum) (* i j))))) (define (d-weight p) (let ((i (car p)) (j (cadr p))) (+ (* i i) (* j j)))) (define (double-square-sum-stream s) (let ((p1 (stream-car s)) (p2 (stream-car (stream-cdr s))) (p3 (stream-car (stream-cdr (stream-cdr s))))) (let ((w1 (d-weight p1)) (w2 (d-weight p2)) (w3 (d-weight p3))) (if (= w1 w2 w3) (cons-stream (list w1 p1 p2 p3) (double-square-sum-stream (stream-cdr (stream-cdr (stream-cdr s))))) (double-square-sum-stream (stream-cdr s)))))) (define double-stream (weighted-pairs integers integers double-weight)) (define s (double-square-sum-stream double-stream)) (display-stream (stream-n 25 s))
false
0c8e76c129f439bfa189a6c52d5a9b235e119b15
92b8d8f6274941543cf41c19bc40d0a41be44fe6
/kawa/lib/ExceptionClasses.scm
c52138924ae08dcd32622b90fcc33b20dd34d852
[ "MIT" ]
permissive
spurious/kawa-mirror
02a869242ae6a4379a3298f10a7a8e610cf78529
6abc1995da0a01f724b823a64c846088059cd82a
refs/heads/master
2020-04-04T06:23:40.471010
2017-01-16T16:54:58
2017-01-16T16:54:58
51,633,398
6
0
null
null
null
null
UTF-8
Scheme
false
false
1,424
scm
ExceptionClasses.scm
(require <kawa.lib.prim_syntax>) (require <kawa.lib.std_syntax>) (require <kawa.lib.syntax>) (require <kawa.lib.misc>) (define current-handler ::java.lang.ThreadLocal[HandlerLink] (java.lang.ThreadLocal)) ;; Implements a stack of handler procedures. (define-simple-class HandlerLink () (handlerProc ::procedure) (outer ::HandlerLink) ((push handler::procedure)::HandlerLink allocation: 'static (let ((new (HandlerLink handlerProc: handler outer: (current-handler:get)))) (current-handler:set new) new)) ((pop) ::void (current-handler:set outer)) ((handle ex::java.lang.Throwable) ::java.lang.Throwable (current-handler:set outer) (if (not (or (kawa.lang.CalledContinuation? ex) (gnu.kawa.util.ExitCalled? ex))) (let ((cause (ExceptionWithValue:unwrap ex))) (handlerProc cause))) ex) ;;FIXME "secondary handler" ? Change ) ;; If raise/raise-continuable is called with a value that ;; is not a Thowable, wrap it in an ExceptionWithValue object. (define-simple-class ExceptionWithValue (java.lang.RuntimeException) (payload) ((getMessage)::java.lang.String (payload:toString)) ((wrap value) ::java.lang.Throwable allocation: 'static (if (java.lang.Throwable? value) value (ExceptionWithValue payload: value))) ((unwrap ex) allocation: 'static (if (ExceptionWithValue? ex) (->ExceptionWithValue ex):payload ex)))
false
cb0db32f8614793125314a57ccabb153543cd961
784dc416df1855cfc41e9efb69637c19a08dca68
/src/gerbil/boot/gx-init.scm
aead62a988ceddc410f3f702eb23b3b67ababcd2
[ "LGPL-2.1-only", "Apache-2.0", "LGPL-2.1-or-later" ]
permissive
danielsz/gerbil
3597284aa0905b35fe17f105cde04cbb79f1eec1
e20e839e22746175f0473e7414135cec927e10b2
refs/heads/master
2021-01-25T09:44:28.876814
2018-03-26T21:59:32
2018-03-26T21:59:32
123,315,616
0
0
Apache-2.0
2018-02-28T17:02:28
2018-02-28T17:02:28
null
UTF-8
Scheme
false
false
1,859
scm
gx-init.scm
;;; -*- Gerbil -*- ;;; (C) vyzo at hackzen.org ;;; Gerbil-gambc runtime init (##namespace ("")) (define _gx#gerbil-home (make-parameter #f)) (define _gx#gerbil-libdir (make-parameter #f)) (define _gx#gerbil-loadpath (make-parameter #f)) (define _gx#*rtlibs* '("gx-gambc0" "gx-gambc1" "gx-gambc2")) (define (_gx#init #!key (load-rt #t) (load-gx #t) (in-place #f)) (let* ((home (path-expand (path-normalize (cond (in-place "../..") ((getenv "GERBIL_HOME" #f) => values) (else (error "Cannot determine GERBIL_HOME")))))) (libdir (path-expand "lib" home))) (_gx#gerbil-home home) (_gx#gerbil-libdir libdir) (if load-rt (_gx#load-rt)) (let* ((loadpath (cond ((getenv "GERBIL_LOADPATH" #f) => (lambda (ev) (filter (lambda (path) (not (string-empty? path))) (string-split ev #\:)))) (else '()))) (userpath (path-expand "lib" (getenv "GERBIL_PATH" "~/.gerbil"))) (loadpath (if (file-exists? userpath) (cons (path-normalize userpath) loadpath) ; exists, pin it (cons userpath loadpath)))) ; maybe later (interactive gxi) (&current-module-libpath (cons libdir loadpath)) (_gx#gerbil-loadpath loadpath)) (&current-module-registry (make-hash-table)) (current-readtable _gx#*readtable*) (if load-gx (_gx#load-gx)))) (define (_gx#load-rt) (for-each (lambda (rt) (load (path-expand rt (_gx#gerbil-libdir)))) _gx#*rtlibs*)) (define (_gx#load-gx) (load-module "gerbil/expander__rt") (load (path-expand "gx-gambc" (_gx#gerbil-libdir)))) ;; exec module stub compatibility (define (_gx#load-expander!) #!void)
false
ab5ad248bc2ac9bcbd74646d280879459f070a99
ea28b962949105fb27622bad2de8a7e0c765f1f2
/m32.scm
3020fb9808380247678aed6cd08289b9c69aa05e
[]
no_license
even4void/scratch
5493c213036f7ba36ec9921de0abc7c3eb29287a
d6d58148753ca77800ddc04b56240eba621bc86a
refs/heads/master
2023-06-08T22:05:00.563639
2023-05-27T17:49:34
2023-05-27T17:49:34
191,911,467
0
0
null
null
null
null
UTF-8
Scheme
false
false
259
scm
m32.scm
(import (chicken foreign) (chicken format)) #> extern uint32_t murmur3_32(const uint8_t* key, size_t len, uint32_t seed); <# (define m32 (foreign-lambda unsigned-int32 "murmur3_32" blob size_t unsigned-int32)) (printf "~A " (m32 "murmur" 6 101))
false
012b54ba6900aee231d8a20ff01eee2f32b86d38
a8216d80b80e4cb429086f0f9ac62f91e09498d3
/lib/chibi/log-test.sld
f6b670da2fb09bef0d5446d54f1f436f361cecf1
[ "BSD-3-Clause" ]
permissive
ashinn/chibi-scheme
3e03ee86c0af611f081a38edb12902e4245fb102
67fdb283b667c8f340a5dc7259eaf44825bc90bc
refs/heads/master
2023-08-24T11:16:42.175821
2023-06-20T13:19:19
2023-06-20T13:19:19
32,322,244
1,290
223
NOASSERTION
2023-08-29T11:54:14
2015-03-16T12:05:57
Scheme
UTF-8
Scheme
false
false
1,402
sld
log-test.sld
(define-library (chibi log-test) (export run-tests) (import (scheme base) (scheme inexact) (srfi 130) (chibi log) (chibi show) (chibi test)) (begin (define-syntax log->string (syntax-rules () ((log->string expr ...) (let ((out (open-output-string))) (parameterize ((current-error-port out)) (log-open default-logger) expr ... (get-output-string out)))))) (define-syntax log->string/no-dates (syntax-rules () ((log->string/no-dates expr ...) (string-join (map (lambda (line) (if (string-null? line) line (substring line 20))) (string-split (log->string expr ...) "\n")) "\n")))) (define (run-tests) (test-begin "logging") (test "D four: 4\n" (log->string/no-dates (log-debug "four: " (+ 2 2)))) (test "I pi: 3.14\n" (log->string/no-dates (log-info "pi: " (with ((precision 2)) (acos -1))))) (test-assert (string-prefix? "E " (log->string/no-dates (with-logged-errors (/ 1 0))))) (test "W warn\nE error\n" (log->string/no-dates (with-log-level 'warn (log-info "info") (log-warn "warn") (log-error "error")))) (test-end))))
true
a457cb86c728c79d139a7f4f374d9eb004149957
c2e2ffee9e12a078bc59ed32dfe441e5d018807c
/stdlib/core/control.scm
3a17e233418b61036099321a5b94b51d5973b83b
[ "BSD-2-Clause" ]
permissive
fujita-y/digamma
3fb3bdb8d24b05b6e809863c17cf2a3cb1aac53c
fbab05bdcb7019ff005ee84ed8f737ff3d44b38e
refs/heads/master
2022-06-03T01:29:22.084440
2022-03-15T03:30:35
2022-03-15T03:30:35
59,635,079
32
3
BSD-2-Clause
2020-02-10T23:40:16
2016-05-25T05:58:28
C++
UTF-8
Scheme
false
false
1,746
scm
control.scm
#!core ;;; Copyright (c) 2004-2022 Yoshikatsu Fujita / LittleWing Company Limited. ;;; See LICENSE file for terms and conditions of use. (library (core control) (export when unless do case-lambda) (import (core intrinsics) (only (core primitives) do define-syntax) (only (core syntax-case) syntax-case syntax datum->syntax)) (define-syntax syntax-length (lambda (x) (syntax-case x () ((_ (lst ...)) (datum->syntax #'k (length (syntax (lst ...)))))))) (define-syntax when (syntax-rules () ((when test result1 result2 ...) (if test (begin result1 result2 ...))))) (define-syntax unless (syntax-rules () ((unless test result1 result2 ...) (if (not test) (begin result1 result2 ...))))) (define-syntax case-lambda-help (syntax-rules () ((_ args n) (assertion-violation #f "wrong number of arguments" args)) ((_ args n ((x ...) b1 b2 ...) more ...) (if (= n (syntax-length (x ...))) (apply (lambda (x ...) b1 b2 ...) args) (case-lambda-help args n more ...))) ((_ args n ((x1 x2 ... . r) b1 b2 ...) more ...) (if (>= n (syntax-length (x1 x2 ...))) (apply (lambda (x1 x2 ... . r) b1 b2 ...) args) (case-lambda-help args n more ...))) ((_ args n (r b1 b2 ...) more ...) (apply (lambda r b1 b2 ...) args)))) (define-syntax case-lambda (syntax-rules () ((_ (fmls b1 b2 ...)) (lambda fmls b1 b2 ...)) ((_ (fmls b1 b2 ...) ...) (lambda args (let ((n (length args))) (case-lambda-help args n (fmls b1 b2 ...) ...)))))) ) ;[end]
true
f38421ea1579bbdd64e3f171765331c85e7f57c1
b43e36967e36167adcb4cc94f2f8adfb7281dbf1
/scheme/swl1.3/src/swl/callback.ss
977207801d52381f007a55ea605298ad7d739e22
[ "SWL", "TCL" ]
permissive
ktosiu/snippets
79c58416117fa646ae06a8fd590193c9dd89f414
08e0655361695ed90e1b901d75f184c52bb72f35
refs/heads/master
2021-01-17T08:13:34.067768
2016-01-29T15:42:14
2016-01-29T15:42:14
53,054,819
1
0
null
2016-03-03T14:06:53
2016-03-03T14:06:53
null
UTF-8
Scheme
false
false
13,407
ss
callback.ss
;; Copyright (c) 1996 Oscar Waddell ;; ;; See the file "Notice" for information on usage and redistribution ;; of this file, and for a DISCLAIMER OF ALL WARRANTIES. ;(define broken-weak-pair ; (let ((x (weak-cons (cons 1 2) 3))) ; (collect 4) ; (car x))) ;; N O T E S ;; ;; * swl:callback-lambda defn moved to syntax.ss for separate compilation ;; * callback id's are now non-zero so that Tk event code can return ;; zero to indicate no callback (yeah, we could rig it so that callback ;; zero was the continuation of the loop, but that would be slower) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Callbacks totally out of date ;; ;l Callbacks are expressed as procedures. The number of arguments ;l with which a callback is invoked depends on the widget function ;l it serves. For example, the procedure supplied as the \scheme{command:} ;l option for a button is invoked without arguments. ;l Thus we might specify a button's callback as: ;l \scheme{(command: (lambda () (printf "hello~n")))}. ;l Other callbacks are invoked with arguments so we have: ;l ;l \scheme{(scroll-command: (lambda (total window first last) ;l (set-scrollbar mvscroll-bar total window first last)))} ;l ;l In addition to thunks, the \scheme{bind} form accepts procedures created by ;l the \scheme{swl:callback-lambda} form which provides event-record destructuring. ;l For example, a user interested in the canvas-relative x-coordinate and ;l screen-relative y-coordinate at which mouse-button 1 is pressed on a ;l canvas \scheme{c1} could write: ;l ;l \scheme{(bind c1 (event: "<ButtonPress-1>") ;l (swl:callback-lambda (x screen-y) ;l (printf "x = ~a screen-y = ~a~n" x screen-y)))} ;; ;; swl:callback-lambda expands into an instance of <callback-proc> ;; ;; <callback-proc> creates token and registers token in a database ;; so we can convert between token <--> callback-proc. So for callbacks ;; we arrange for Tcl to return the token to the Scheme event loop where ;; we lookup the token in the database and apply the corresponding callback ;; proc to any arguments provided when Tcl returned to Scheme. ;; introduced swl:fbq so that menu items could construct suitable ;; s_eval handle when consing up their callback-procs. (define-record swl:fbq ((mutable queue) (immutable handle))) (define-swl-class (<callback-proc> proc flag-or-args skip-1st?) (<tk-object>) ;; First arg is the procedure to wrap for use as Tk callback. ;; Second arg describes the extra args that Tk needs to provide. ;; (either by destructuring the event record, or passing along ;; a token for the benefit of swl:event-dispatch) ;; See note at end of swl:callback-lambda for explanation of skip-1st? (ivars (proc proc) (xtra-args (or flag-or-args "")) (token #f) (skip-1st? skip-1st?)) (inherited) (inheritable) (private) (protected) (public [swl:apply-callback-proc (args) (when (swl:bug) (fprintf (swl:bug-port) "fallback-eval: ~s ~s~n" token args)) (if args (apply proc (if skip-1st? (cdr args) args)) (proc))] [init ignore-args (set! token (swl:insert-callback self)) self] ;; THIS is to support make-destroy-notify in init.ss ;; which is used so that toplevels aren't destroyed by Tk ;; when a window-manager close event is received on the Tk side ;; instead we use a script that tells Scheme about the destroy ;; message. to do this we build a script that looks like ;; {s_eval 0 .t134} ;; where 0 is the index of the destroy callback proc, and ;; .t134 is the handle of the toplevel (see init method of <toplevel>) [index-of () token] [callback->procedure () proc] [scheme->tcl (op) ;; NOTE: ;; before we moved the behavior of widgets into Scheme ;; it had been essential that we put a break at the end of the s_eval ;; to prevent Tk from looking further down the list of bindtags for ;; another callback to invoke. consider what would happen w/ destroy ;; however, break only works when we're in a bind (ie. not a command:) ;; ;; Currently checking to see what happens when I eliminate the break ;; (since I probably don't want an implicit break for the tag bindings). ;; ;; Keep the name 's_eval synchronized with foreign.c and the "binding" ;; method. (swl:display* op "{" 's_eval " " token " " xtra-args "}")])) (define-generic swl:apply-callback-proc) (define swl:procedure->callback ;; fbq-token is the handle of the fallback queue on which we want to evaluate ;; proc (lambda (proc fbq-token) (create <callback-proc> proc fbq-token #t))) ;; needs callbacks to support table-index method to return the index they were ;; assigned in the table (define swl:lookup-callback) ;; given handle returns callback (define swl:insert-callback) ;; takes callback returns handle for swl:lookup-callback ;; lookup operations are much more common than inserts ;; still, we might speed up inserts by preallocating the weak-pairs ;; and just hammering in the car field ;; ;; table contains weak pairs of (callback . index-in-table) ;; we scan the table in next-index ;; looking for pairs w/ #!bwp car (we'd want to collect first) ;; ;; next is either the integer index of the next available slot in the table ;; or a pair whose car is such an integer and whose cdr is a next ;; ;; shrink-vector! grow-vector! and next-index only called from critical-section (let () (define (out->in x) (fx- x 1)) (define (in->out x) (fx+ x 1)) (define (make-item) (weak-cons #!bwp #f)) ; (define (make-item) (weak-cons broken-weak-pair #f)) (define (set-item! item what) (set-car! item what)) (define (item-value item) (let ((t (car item))) (and (not (eq? t #!bwp)) t))) ; (define (item-value item) ; (let ((t (car item))) (and (not (eq? t broken-weak-pair)) t))) ;; (define (shrink-worthy? count len) (< count (quotient len 2))) ;; disable shrinking for now (define (shrink-worthy? count len) #f) (let* ([len 200] [count 0] [free 0] [init-vector (lambda (vec start end) (let loop ((i start)) (unless (fx= i end) (vector-set! vec i (make-item)) (loop (fx+ i 1)))) vec)] [vec (init-vector (make-vector len) 0 len)]) ;; could shrink the vector if we set up a mechanism for the callback ;; bindings to notify their binders that they need to update the ;; index they were using ;; ;; this means callback lambda would have to keep a list of all the ;; widgets it's associated with and each widget has to keep a list of ;; all the callbacks associated with it ;; is that memory cost greater than the amount of space wasted in the table? (define shrink-vector! "shrink-vector! disabled") ;; grow-vector is called when free list is empty, ie. free == len ;; upon return, vec is bigger and free points to the first ;; empty slot in vec (define grow-vector! (lambda () (let* ([new-len (fx+ 1 (fx* 7 (fxquotient len 4)))] [new-vec (make-vector new-len)]) (vector-copy! vec new-vec len) (init-vector new-vec len new-len) (set! vec new-vec) (set! len new-len)))) (define vector-copy! (lambda (vec new-vec len) (let loop ([i (fx- len 1)]) (when (fx>= i 0) (vector-set! new-vec i (vector-ref vec i)) (loop (fx- i 1)))))) ;; table is currently full, ;; sweep table and rebuild the freelist ;; thus at the end, free is either the same integer it was ;; when we started, or a pair (indicating that we freed up something) (define update-freelist! (lambda () (let loop ([i 0] [fls free] [n 0]) (if (fx= i len) (unless (fxzero? n) (set! free fls) (when (swl:bug) (fprintf (swl:bug-port) "collected ~s callbacks~n" n)) (set! count (fx- count n))) (if (item-value (vector-ref vec i)) (loop (fx+ i 1) fls n) (loop (fx+ i 1) (cons i fls) (fx+ n 1))))))) (define next-index (lambda () (cond [(pair? free) (let ([i (car free)]) (set! free (cdr free)) i)] [(fx< free len) (let ([i free]) (set! free (fx+ free 1)) i)] [else (update-freelist!) (if (integer? free) (grow-vector!)) (next-index)]))) (set! swl:insert-callback (lambda (cb) (critical-section (let ([i (next-index)]) (set-item! (vector-ref vec i) cb) (set! count (fx+ count 1)) (in->out i))))) ; (set! swl:lookup-callback (lambda (i) (item-value (vector-ref vec (out->in i))))) (set! swl:lookup-callback (lambda (i) (let ([x (item-value (vector-ref vec (out->in i)))]) (unless (vector? x) (assertion-violationf 'swl:lookup-callback "attempt to lookup dead callback ~s" (out->in i))) x))))) (define-syntax swl:callback-lambda ;* \scheme{(swl:callback-lambda (keyword ...) body ...)} ;* ;* \scheme{swl:callback-lambda} creates callback procedures that bind parts of ;* the event record as arguements. The formals list of a \scheme{swl:callback-lambda} ;* is a set of keywords chosen from \scheme{keycode}, \scheme{keysym-text}, ;* \scheme{ascii}, \scheme{widget}, \scheme{x}, \scheme{y}, \scheme{screen-x}, \scheme{screen-y}. ;* When invoked as a callback the formals will be bound to the ;* relevant value extracted from the event record. For example, ;* \scheme{widget} is bound to the widget that received the event, ;* \scheme{x} is bound to the widget-relative x-coordinate, ;* \scheme{screen-x} is bound to the screen-relative x-coordinate, etc. (let* ((database '((above "%a") (button-number "%b") (count "%c") (detail "%d") (focus "%f") (height "%h") (keycode "%k") (mode "%m") (override-redirect "%o") (place "%p") (state "%s") (time "%t") (value-mask "%v") (width "%w") (x "%x") (y "%y") ;; current bug w/ ascii is that using read we're hosed because ;; Tcl is quoting things like the left-arrow key #\033 with { } ;; so it comes over here like: #\{ } ;; need our own tcl-reader to be used in foreign.ss. (ascii "#\\\\%A");; testing (seems to work) (border-width "%B") (display "%D") (send-event "%E") (keysym-text "|%K|") (keysym-decimal "%N") (root-window "%R") (sub-window "%S") (type "%T") (widget "%W" . swl:lookup-widget) (screen-x "%X") (screen-y "%Y"))) (make-trans (lambda (symkeys sokeys) (let loop ((ls symkeys) (sos sokeys)) (if (null? ls) '() (let ((x (assq (car ls) database))) (if (not x) (assertion-violationf 'swl:callback-lambda "invalid key ~s" (car ls)) (let ((x (cddr x))) (if (null? x) (loop (cdr ls) (cdr sos)) (with-syntax ((var (car sos)) (exp (datum->syntax-object (syntax _) x))) (cons (syntax (var (exp var))) (loop (cdr ls) (cdr sos)))))))))))) (lookup-code (lambda (sym) (let ((x (assq sym database))) (if x (cadr x) (assertion-violationf 'swl:callback-lambda "invalid key ~s" sym)))))) (define concat (lambda (args) (let f ((ls args)) (cond ((null? ls) "") ((null? (cdr ls)) (car ls)) (else (string-append (car ls) " " (f (cdr ls)))))))) (lambda (x) (syntax-case x () ((_ (key ...) e1 e2 ...) (let ((keys (syntax-object->datum (syntax (key ...))))) (with-syntax ((xtras (concat (map lookup-code keys))) (trans (make-trans keys (syntax (key ...))))) (if (and (not (null? keys)) (eq? (car keys) 'widget)) (syntax (send (make <callback-proc> (lambda (key ...) (let trans e1 e2 ...)) xtras #f) init)) ; egregious hack ; teventloop.ss event-dispatch requires widget name as first argument to ; callback functions so that we can use the widget name to lookup the appropriate ; fallback queue. If widget wasn't first, then we hack in in here and arrange ; to ignore our first argument. (syntax (send (make <callback-proc> (lambda (key ...) (let trans e1 e2 ...)) (string-append "%W " xtras) #t) init)) ))))))))
true
f3714253276884951af797dd176d02a877d7adbb
917429e3eb6bcf2db8c71197f88b979d998b1b7e
/progs/general/gold.scm
e8db8751520fed0210dbfbe248b7ff269d47facb
[]
no_license
mario-goulart/chicken-benchmarks
554ca8421631211a891cc497f84dfe62b8f9c8e5
ea00fe51ec33496de7c9b07fa0ec481fe59989fa
refs/heads/master
2021-11-20T21:40:55.198252
2021-10-09T18:52:48
2021-10-09T18:52:48
4,427,587
1
5
null
2019-01-27T07:59:38
2012-05-24T01:59:23
Scheme
UTF-8
Scheme
false
false
2,985
scm
gold.scm
;; Copied from stalin-0.11 (benchmarks/gold.sc) -- mario (define (abs1 x) (if (negative? x) (- x) x)) (define (abs2 x) (if (negative? x) (- x) x)) (define (abs3 x) (if (negative? x) (- x) x)) (define (abs4 x) (if (negative? x) (- x) x)) (define (abs5 x) (if (negative? x) (- x) x)) (define (abs6 x) (if (negative? x) (- x) x)) (define (mnbrak F ax bx K) (let ((gold 1.61803399) (glimit 100.0) (tiny 1.0e-20) (sign (lambda (x y) (if (< y 0.0) (- 0.0 x) x)))) (define (loop ax fa bx fb cx fc) (if (< fb fc) (K ax fa bx fb cx fc) (let* ((r (* (- bx ax) (- fb fc))) (q (* (- bx cx) (- fb fa))) (ux (- bx (/ (- (* (- bx cx) q) (* (- bx ax) r)) (* (sign (max (abs1 (- q r)) tiny) (- q r)) 2.0)))) (uL (+ bx (* (- cx bx) glimit)))) (if (> (* (- bx ux) (- ux cx)) 0.0) (let ((fu (F ux))) (if (< fu fc) (K bx fb ux fu cx fc) (if (> fu fb) (K ax fa bx fb ux fu) (let ((vx (+ cx (* (- cx bx) gold)))) (loop bx fb cx fc vx (F vx)))))) ;; (not (> (* (- bx) (- ux cx)) 0.0)) (if (> (* (- cx ux) (- ux uL)) 0.0) (let ((fu (F ux))) (if (< fu fc) (let ((vx (+ ux (* (- ux cx) gold)))) (loop cx fc ux fu vx (F vx))) (loop bx fb cx fc ux fu))) (if (>= (* (- ux uL) (- uL cx)) 0.0) (loop bx fb cx fc uL (F uL)) (let ((vx (+ cx (* (- cx bx) gold)))) (loop bx fb cx fc vx (F vx))))))))) (let ((fa (F ax)) (fb (F bx))) (if (> fb fa) (let ((vx (+ ax (* (- ax bx) gold)))) (loop bx fb ax fa vx (F vx))) (let ((vx (+ bx (* (- bx ax) gold)))) (loop ax fa bx fb vx (F vx))))))) (define (golden F tol ax bx cx K) (let* ((gold 1.61803399) ; approximate (r (- gold 1.0)) ; exact (c (- 1.0 r)) ; exact (x1 bx) (x2 bx)) (if (> (abs2 (- cx bx)) (abs3 (- bx ax))) (set! x2 (+ bx (* c (- cx bx)))) (set! x1 (- bx (* c (- bx ax))))) (let loop ((x0 ax) (x1 x1) (f1 (F x1)) (x2 x2) (f2 (F x2)) (x3 cx)) (if (<= (abs4 (- x3 x0)) (* tol (+ (abs5 x1) (abs6 x2)))) (if (< f1 f2) (K x1 f1) (K x2 f2)) (if (< f2 f1) (let ((xn (+ (* r x2) (* c x3)))) (loop x1 x2 f2 xn (F xn) x3)) (let ((xn (+ (* r x1) (* c x0)))) (loop x0 xn (F xn) x1 f1 x2))))))) (define (sqr x) (* x x)) (define (sqr1 x) (* x x)) (define (sqr2 x) (* x x)) (define (sqr3 x) (* x x)) (define (sqr4 x) (* x x)) (define (func x) (let ((a1 1.2) (a2 2.3) (a3 3.4) (a4 4.5)) (+ (sqr1 (- x a1)) (sqr2 (- x a2)) (sqr3 (- x a3)) (sqr4 (- x a4))))) (define (g L U) (mnbrak func L U (lambda (ax fa bx fb cx fc) (golden func 1.0e-3 ax bx cx (lambda (mx fm) fm))))) (define (test) (let* ((n 500) (eps (make-vector n 0.0)) (sum 0.0)) (do ((i 0 (+ i 1))) ((>= i n)) (vector-set! eps i (/ 1.0 (+ 2.0 i)))) (do ((i 0 (+ i 1))) ((>= i n)) (do ((j 0 (+ j 1))) ((>= j n)) (set! sum (+ sum (g (- 1.0 (vector-ref eps i)) (+ 5.0 (vector-ref eps j))))))) sum)) (time (test))
false
9c04d488e2340cbd146a72d2f9b72c9767a6dea4
bd2e1d57512d81836f31665e721168d421107b42
/translator.scm
22a63e281263e63727aef64e29c9501165c7204c
[]
no_license
goj/lisp-smile
cb8c3201efb943923ca7053d7cd55e78b900f9c5
b2b98ef18fbf9c93b47a80f240a6f4b01c063c04
refs/heads/master
2021-01-10T10:50:56.520469
2015-05-31T17:04:47
2015-05-31T17:04:47
36,612,517
0
0
null
null
null
null
UTF-8
Scheme
false
false
26,466
scm
translator.scm
#!/usr/bin/guile -s !# (define-module (smile std)) (use-syntax (ice-9 syncase)) (use-modules (oop goops) (ice-9 receive) (srfi srfi-1) (ice-9 optargs) (ice-9 q)) (define-macro (simple-syntax header . body) (let ((name (car header)) (bindings (cdr header)) (x (gensym))) `(define-syntax ,name (lambda ((unquote x)) (syntax-case ,x () ((_ (unquote-splicing bindings)) (syntax (unquote-splicing body)))))))) (export simple-syntax) (define-macro (gensyms a . rest) (unless (list? a) (error "gensyms expects list of symbols as it's first argument")) `(let ,(%~ map i in a (list i (quote (gensym)))) ,@rest)) (export gensyms) (define-macro (with woot arg . thunk) (let ((with-woot (symbol-append (quote with-) woot))) `(,with-woot arg (lambda () (unquote-splicing thunk))))) (export with) (simple-syntax (%% fn (x y ...) (a b ...) c1 c2 ...) (fn (lambda (x y ...) c1 c2 ...) a b ...)) (export %%) (define-macro (% fn bindings . rest) (receive (collections body) (split-at rest (length bindings)) `(%% ,fn ,bindings ,collections ,@body))) (export %) (define (make-eqv y) (lambda (x) (eqv? x y))) (export make-eqv) (define-macro (%~ fn . args) (receive (bindings rest) (break! (make-eqv (quote in)) args) `(% ,fn ,bindings ,@(cdr rest)))) (export %~) (define (compliment fn) (lambda x (not (apply fn x)))) (export compliment) (define-public ~ compliment) (simple-syntax (with-cc cc a b ...) (call-with-current-continuation (lambda (cc) a b ...))) (export with-cc) (define-macro (for . x) (append (quote (%~ for-each)) x)) (export for) (define-method (for-each fn (s1 <promise>)) (stream-for-each fn s1)) (define-method (for-each fn (s1 <promise>) (s2 <promise>)) (stream-for-each fn s1 s2)) (define-method (for-each fn (s1 <promise>) (s2 <promise>) (s3 <promise>)) (stream-for-each fn s1 s2 s3)) (define-method (for-each fn (s1 <hashtable>)) (hash-for-each (lambda (x y) (fn (cons x y))) s1)) (define-macro (calc-for . x) (append (quote (%~ map)) x)) (export calc-for) (simple-syntax (do-times count c1 c2 ...) (let req ((n count)) (when (> n 0) (begin c1 c2 ...) (req (1- n))))) (export do-times) (simple-syntax (when cnd c1 c2 ...) (if cnd (begin c1 c2 ...) *unspecified*)) (export when) (simple-syntax (unless cnd c1 c2 ...) (if cnd *unspecified* (begin c1 c2 ...))) (export unless) (simple-syntax (bind-vars lst (a b ...) c d ...) (receive (a b ...) (apply values lst) c d ...)) (export bind-vars) (define-macro (lambda-bind-vars vars . body) (gensyms (tmp) `(lambda ((unquote tmp)) (bind-vars ,tmp ,vars ,@body)))) (export lambda-bind-vars) (define (positional-only args) (let ((tmp (make-q))) (let req ((args args)) (cond ((null? args) (q->list tmp)) ((keyword? (car args)) (req (cl-cddr args))) (else (enq! tmp (car args)) (req (cdr args))))))) (export positional-only) (define* (print #:key (port (current-output-port)) (func display) (before "") (delim " ") (after " ") #:rest args) (display before port) (let ((args (positional-only args))) (unless (null? args) (let req ((args args)) (func (car args) port) (let ((tail (cdr args))) (unless (null? tail) (display delim port) (req tail)))))) (display after port)) (export print) (define-macro (set-slots! instance . pairs) (unless (symbol? instance) (error "set-slots! requires symbol as it's first argument")) (unless (list? pairs) (error "set-slots! expects list of lists as it's second argument")) (cons 'begin (append (%~ map pair in pairs (if ($ ,(pair? pair) and ,(pair? (cdr pair))) (let ((symbol (car pair)) (value (cadr pair))) (if (symbol? symbol) `(slot-set! ,instance ',symbol ,value) (error "set-slots! syntax error"))) (error "set-slots! expects list of lists as it's second argument"))) `((unquote instance))))) (export set-slots!) (define-macro (make-instance-and-setup class . initial-vals) (unless (symbol? class) (error "make-instance-and-setup requires class name as it's first argument")) (unless (list? initial-vals) (error "make-instance-and-setup expects list of lists as it's second argument")) (gensyms (result) `(let ((,result (make-instance (unquote class)))) (set-slots! ,result ,@initial-vals)))) (export make-instance-and-setup) (define-public rest cdr) (define-public q->list car) (define-public q-top q-front) (define-public (list->q lst) (let ((q (cons lst #f))) (sync-q! q) q)) (define-public (cl-car x) (if (null? x) (quote ()) (car x))) (define-public (cl-cdr x) (if (null? x) (quote ()) (cdr x))) (define-macro (cl-c___r ___ x) (let* ((lst (map string->symbol (map string (string->list (symbol->string ___)))))) (let calc ((lst lst)) (if (null? lst) x (let ((fun (symbol-append (quote cl-c) (car lst) (quote r)))) (list fun (calc (cdr lst)))))))) (define-macro (define-cl-c___rs a b) (let ((result (make-q))) (enq! result (quote begin)) (let req ((level 0) (mid-symbol (quote #{}#))) (when (>= level a) (enq! result `(define-public (,(symbol-append (quote cl-c) mid-symbol (quote r)) __x__) (cl-c___r (unquote mid-symbol) __x__)))) (when (< level b) (req (1+ level) (symbol-append mid-symbol (quote a))) (req (1+ level) (symbol-append mid-symbol (quote d))))) (q->list result))) (define-cl-c___rs 2 5) (define (range a b) (make-stream (lambda (state) (if (<= state b) (cons state (1+ state)) '())) a)) (export range) (define (list-range a b) (stream->list (range a b))) (export list-range) (define-macro (define-nth-fn fn) (let ((fun-name (symbol-append (quote nth-) fn))) (gensyms (lst i) `(define-public ((unquote fun-name) (unquote lst) (unquote i)) (if (zero? (unquote i)) ((unquote fn) (unquote lst)) (,fun-name (cdr (unquote lst)) (1- (unquote i)))))))) (define-nth-fn car) (define-nth-fn cdr) (define-nth-fn car+cdr) (simple-syntax (m->fn m) (lambda x (primitive-eval (cons m x)))) (export m->fn) (define (none . args) (not (apply any args))) (export none) (define-public any? any) (define-public every? every) (define-public none? none) (define (-- x) (- x)) (define ^ expt) (define (!= . args) (not (apply = args))) (define (<=> . args) (cond ((apply < args) -1) ((apply = args) 0) (else 1))) (define *smile-dollar-functions* '(sin cos tan exp fact sqrt -- truncate)) (define *smile-dollar-operator-precedence* '((%function-application) (^) (* /) (+ -) (= < > <= >= != <=>) (%negation) (or and))) (define (infix->prefix lst) (define (left-associative? operator) (not (member operator '(^ %function-application)))) (define (operator-priority operator) (let loop ((answer 1) (part *smile-dollar-operator-precedence*)) (cond ((null? part) #f) ((member operator (car part)) answer) (else (loop (1+ answer) (cdr part)))))) (define (operator? x) (operator-priority x)) (define (function? x) (member x *smile-dollar-functions*)) (define (negation? x) (eqv? x (quote not))) (define (operator-first? s c) (let ((ops (operator-priority s)) (opc (operator-priority c))) (or (< ops opc) (and (= ops opc) (left-associative? s))))) (let ((operators (make-q)) (stack (make-q))) (define (step) (let ((b (q-pop! stack)) (a (q-pop! stack)) (o (q-pop! operators))) (cond ((eqv? o (quote %function-application)) (q-push! stack (list a b))) ((eqv? o (quote %negation)) (q-push! stack (list a b))) (else (q-push! stack (list o a b)))))) (do ((args lst (cdr args))) ((null? args) (let reduce () (if (q-empty? operators) (q-top stack) (begin (step) (reduce))))) (let ((current (car args))) (cond ((pair? current) (if (member (car current) (quote (quote unquote))) (q-push! stack (cadr current)) (q-push! stack (infix->prefix current)))) ((operator? current) (while (and (not (q-empty? operators)) (<= 2 (q-length stack)) (operator-first? (q-top operators) current)) (step)) (q-push! operators current)) ((function? current) (q-push! stack current) (q-push! operators (quote %function-application))) ((negation? current) (q-push! stack current) (q-push! operators (quote %negation))) (else (q-push! stack current))))))) (define (repair-unary-minus arg) (define oper-fun (append (apply append (cdr *smile-dollar-operator-precedence*)) *smile-dollar-functions*)) (let ((q (make-q))) (let loop ((start #t) (lst arg)) (if (null? lst) (q->list q) (let ((x (car lst))) (cond ((and (pair? x) (not (eqv? (quote quote) (car x)))) (enq! q (repair-unary-minus x))) ((and start (eqv? (quote -) (car lst))) (enq! q (quote --))) (else (enq! q (car lst)))) (loop (member x oper-fun) (cdr lst))))))) (define (math->prefix args) (infix->prefix (repair-unary-minus args))) (define-macro ($ . args) (math->prefix args)) (define-module (smile internals)) (use-modules (oop goops) (srfi srfi-1) (srfi srfi-34) (ice-9 pretty-print) (ice-9 rdelim) (ice-9 readline) (ice-9 buffered-input) (ice-9 streams) (ice-9 q) (ice-9 receive) (ice-9 optargs) (ice-9 format) (ice-9 syncase) (smile std)) (define (lexer-error lexer . args) (define (str arg) (format #f "~a" arg)) (raise (list 'lexer-error (string-join (map str args) " ") (cons (port-line (lexer-port lexer)) (port-column (lexer-port lexer)))))) (define-class <lexer> () (port #:accessor lexer-port #:init-keyword #:port) (interactive? #:accessor lexer-interactive? #:init-keyword #:interactive?) (indentation #:accessor lexer-indentation #:init-value '(0)) (empty-line? #:accessor lexer-empty-line? #:init-value #t) (braces #:accessor lexer-braces #:init-value '()) (token-buffer #:accessor lexer-token-buffer #:init-thunk make-q)) (define (copy-lexer parser) (let ((port (lexer-port parser)) (interactive (lexer-interactive? parser))) (make <lexer> #:port port #:interactive? interactive))) (export copy-lexer) (define-macro (reset-lexer lexer) `(set! ,lexer (copy-lexer (unquote lexer)))) (export reset-lexer) (define (setup-lexer port interactive) (make <lexer> #:port port #:interactive? interactive)) (export setup-lexer) (define (read-token lexer) (let ((port (lexer-port lexer))) (define (on-empty-line?) (lexer-empty-line? lexer)) (define (set-on-empty-line! x) (set! (lexer-empty-line? lexer) x)) (define (indentation) (lexer-indentation lexer)) (define (set-indentation! new-one) (set! (lexer-indentation lexer) new-one)) (define (add-to-indentation x) (set! (lexer-indentation lexer) (cons x (lexer-indentation lexer)))) (define (token-buffer) (lexer-token-buffer lexer)) (define ignored (char-set #\space #\ht)) (define separators (char-set-union (apply char-set (map first *brace-tokens*)) (char-set #\space #\newline #\ht #\" #\;))) (define (separator? chr) (char-set-contains? separators chr)) (define (read-until-predicate pred result) (let ((chr (read-char port))) (if (pred chr) (begin (unread-char chr port) (reverse-list->string result)) (read-until-predicate pred (cons chr result))))) (define (string->thing str) (cond ((assoc str *token-strings*) => second) (else (read (open-input-string str))))) (define (open-parenthesis type) (set! (lexer-braces lexer) (cons type (lexer-braces lexer)))) (define (close-parenthesis type) (cond ((null? (lexer-braces lexer)) (lexer-error lexer "unexcepted closing brace")) ((eq? type (car (lexer-braces lexer))) (set! (lexer-braces lexer) (cdr (lexer-braces lexer)))) (else (lexer-error lexer "incompatible braces")))) (define (on-flat?) (and (not (on-empty-line?)) (null? (lexer-braces lexer)))) (define (read-slash) (let ((chr (read-char port))) (cond ((char=? chr #\newline) (eat-whitespace)) ((char-set-contains? ignored chr) (read-slash)) (else (unread-char chr port) (start-new-line))))) (define (read-string) (unread-char #\" port) (read port)) (define (read-real-token chr) (set-on-empty-line! #f) (cond ((char=? chr #\#) (unread-char #\# port) (read port)) ((char=? chr #\") (read-string)) ((char=? chr #\\) (read-slash)) ((char=? chr #\') SINGLE_QUOTE) ((char=? chr #\`) QUASI_QUOTE) ((char=? chr #\,) (let ((tmp (read-char port))) (if (char=? tmp #\@) COMMA_AT (begin (unread-char tmp port) COMMA)))) ((assoc chr *brace-tokens*) => (lambda-bind-vars (chr token type open) (if open (open-parenthesis type) (close-parenthesis type)) token)) (else (string->thing (read-until-predicate separator? (list chr)))))) (define (do-at-eof) (unless (on-empty-line?) (enq! (token-buffer) ENDLINE)) (do-times (1- (length (indentation))) (enq! (token-buffer) DEDENT)) (enq! (token-buffer) EOF) (set-indentation! (quote (1))) (deq! (token-buffer))) (define (start-new-line) (if (on-empty-line?) (eat-whitespace) (let position () (let ((chr (read-char port))) (cond ((eof-object? chr) (do-at-eof)) ((and (char=? chr #\newline) (= 0 (port-column port)) (lexer-interactive? lexer)) (do-at-eof)) ((char-whitespace? chr) (position)) (else (set-on-empty-line! #t) (unread-char chr port) (let ((col (port-column port))) (cond ((> col (first (indentation))) (add-to-indentation col) (enq! (token-buffer) INDENT)) ((member col (indentation)) => (lambda (whats-left) (let ((prev-len (length (indentation))) (curr-len (length whats-left))) (set-indentation! whats-left) (do ((countdown (- prev-len curr-len) (1- countdown))) ((= countdown 0)) (enq! (token-buffer) DEDENT))))) (else (lexer-error lexer "bad indentation" col (indentation))))) ENDLINE)))))) (define (read-part) (let ((chr (quote _))) (let pre-loop () (set! chr (read-char port)) (when (char-whitespace? chr) (pre-loop))) (let loop ((result (list chr))) (set! chr (read-char port)) (if (char-whitespace? chr) (reverse-list->string result) (loop (cons chr result)))))) (define (eat-whitespace) (define (ignore-comment) (do ((tmp #\_ (read-char port))) ((char=? tmp #\newline) (unread-char tmp port) (eat-whitespace)) 'do-nothing)) (let ((chr (read-char port))) (if (eof-object? chr) (do-at-eof) (case chr ((#\space #\ht) (eat-whitespace)) ((#\newline) (if (on-flat?) (start-new-line) (eat-whitespace))) ((#\;) (ignore-comment)) ((#\#) (let ((chr2 (read-char port))) (case chr2 ((#\!) (ignore-comment)) ((#\|) (let read-comment ((depth 1)) (let ((current (read-part))) (cond ((string=? current "#|") (read-comment (1+ depth))) ((string=? current "|#") (if (= depth 1) (eat-whitespace) (read-comment (1- depth)))) (else (read-comment depth)))))) (else (unread-char chr2 port) (read-real-token chr))))) (else (read-real-token chr)))))) (if (q-empty? (token-buffer)) (eat-whitespace) (deq! (token-buffer))))) (export read-token) (define (unread-token lexer tkn) (q-push! (lexer-token-buffer lexer) tkn)) (export unread-token) (define-class <token> () (type)) (define-method (initialize (tkn <token>) args) (bind-vars args (val) (slot-set! tkn (quote type) val))) (define-method (write (tkn <token>) (port <port>)) (display (format #f "TKN_~a" (slot-ref tkn (quote type))) port)) (define-macro (register-token . lst) (cons 'begin (calc-for tkn in lst (let ((str (symbol->string tkn))) `(define ,tkn (make <token> (unquote str))))))) (define (special-token? x) (is-a? x <token>)) (define (datum? x) (not (special-token? x))) (register-token INDENT DEDENT ENDLINE) (register-token DOT BAR BAR_BAR BAR_BAR_BAR) (register-token AMP_DOT AMP AMP_AMP AMP_AMP_AMP) (register-token SINGLE_QUOTE COMMA COMMA_AT QUASI_QUOTE) (register-token OPEN_PAREN CLOSE_PAREN) (register-token OPEN_BRACKET CLOSE_BRACKET) (register-token EOF WRONG) (define (parser-error parser . args) (define (str arg) (format #f "~a" arg)) (let ((port (slot-ref parser (quote port)))) (raise (list 'parser-error (string-join (map str args) " ") (cons (port-line port) (port-column port)) (read-line port))))) (define *brace-tokens* `((#\( (unquote OPEN_PAREN) ROUND #t) (#\) (unquote CLOSE_PAREN) ROUND #f) (#\[ (unquote OPEN_BRACKET) SQUARE #t) (#\] (unquote CLOSE_BRACKET) SQUARE #f))) (define *token-strings* `(("." (unquote DOT)) ("&." (unquote AMP_DOT)) ("&" (unquote AMP)) ("&&" (unquote AMP_AMP)) ("&&&" (unquote AMP_AMP_AMP)) ("|" (unquote BAR)) ("||" (unquote BAR_BAR)) ("|||" (unquote BAR_BAR_BAR)) ("~EOF~" (unquote EOF)))) (define *quotation-tokens* (list (list SINGLE_QUOTE (quote quote)) (list QUASI_QUOTE (quote quasiquote)) (list COMMA (quote unquote)) (list COMMA_AT (quote unquote-splicing)))) (define (get-lexer parser) parser) (define (parse parser) (let ((lexer (get-lexer parser))) (define (true-procedure-body) (let ((part (parse-or-allow parse-line EOF))) (if (wrong? part) (parser-error parser "error when parsing line") part))) (define (wrong? x) (eqv? WRONG x)) (define (eat-token tkn) (let ((eaten (read-token lexer))) (unless (eqv? tkn eaten) (parser-error parser "excepting" tkn "but" eaten "encountered")))) (define (eaten-token? tkn) (let ((eaten (read-token lexer))) (if (eqv? tkn eaten) #t (begin (unread-token lexer eaten) #f)))) (define (eat-and-return food return) (eat-token food) return) (define (kleene-star proc) (let ((q (make-q))) (let read-them () (let ((tmp_ (proc))) (unless (wrong? tmp_) (enq! q tmp_) (read-them)))) (q->list q))) (define (kleene-plus proc) (let ((lst (kleene-star proc))) (if (null? lst) WRONG lst))) (define (parse-or-allow parser-fn . allowed) (let ((tmp__ (read-token lexer))) (if (member tmp__ allowed) tmp__ (begin (unread-token lexer tmp__) (parser-fn))))) (define (force-parsing proc) (let ((tmp (proc))) (when (wrong? tmp) (parser-error parser (procedure-name proc) "failed")) tmp)) (define (parse-line) (let ((tkn (read-token lexer))) (cond ((eqv? DOT tkn) (eat-and-return ENDLINE (parse-element))) ((eqv? ENDLINE tkn) (eat-token INDENT) (eat-and-return DEDENT (parse-list-of-lines))) (else (unread-token lexer tkn) (let ((flat (parse-list-inside))) (if (wrong? flat) WRONG (begin (eat-token ENDLINE) (if (eaten-token? INDENT) (eat-and-return DEDENT (append flat (parse-list-of-lines))) flat)))))))) (define (parse-element) (let ((tkn (read-token lexer))) (cond ((eqv? OPEN_PAREN tkn) (let ((inside (parse-list-inside))) (eat-token CLOSE_PAREN) (if (wrong? inside) (quote ()) inside))) ((eqv? OPEN_BRACKET tkn) (let ((inside (parse-list-inside))) (eat-token CLOSE_BRACKET) (if (wrong? inside) (quote ()) inside))) ((eqv? AMP_DOT tkn) (cons (force-parsing parse-element) (force-parsing parse-element))) ((eqv? AMP tkn) (list (force-parsing parse-element))) ((eqv? AMP_AMP tkn) (list (force-parsing parse-element) (force-parsing parse-element))) ((eqv? AMP_AMP_AMP tkn) (list (force-parsing parse-element) (force-parsing parse-element) (force-parsing parse-element))) ((datum? tkn) tkn) ((assoc tkn *quotation-tokens*) => (lambda (info) (list (second info) (force-parsing parse-element)))) (else (unread-token lexer tkn) WRONG)))) (define (parse-flat-el) (parse-or-allow parse-element BAR BAR_BAR BAR_BAR_BAR)) (define (parse-list-inside) (let ((flat-el+ (kleene-plus parse-flat-el))) (if (wrong? flat-el+) WRONG (begin (when (eaten-token? DOT) (set! flat-el+ (append flat-el+ (force-parsing parse-element)))) (repair-flat flat-el+))))) (define (repair-flat lst) (let ((lst (cons (quote sentinel) lst))) (let repair ((elem lst)) (if (not (pair? (cl-cdr elem))) (cdr lst) (let ((tmp (second elem))) (cond ((eqv? BAR tmp) (set-cdr! elem (list (cddr elem))) (repair (cadr elem))) ((eqv? BAR_BAR tmp) (set-cdr! elem (list (list (cddr elem)))) (repair (caadr elem))) ((eqv? BAR_BAR_BAR tmp) (set-cdr! elem (list (list (list (cddr elem))))) (repair (caaadr elem))) (else (repair (cdr elem))))))))) (define (parse-flat) (let ((flat-el+ (kleene-plus parse-flat-el))) (if (wrong? flat-el+) WRONG (repair-flat flat-el+)))) (define (parse-list-of-lines) (kleene-plus parse-line)) (true-procedure-body))) (export parse) (define setup-parser setup-lexer) (export setup-parser) (define (load-smile file) (with-input-from-file file (lambda () (define *parser* (setup-parser (current-input-port) #f)) (let grande-lupe () (let ((parsed (parse *parser*))) (unless (eqv? parsed EOF) (primitive-eval parsed) (grande-lupe))))))) (use-modules (smile std) (smile internals) (ice-9 pretty-print) (ice-9 rdelim) (ice-9 readline) (ice-9 buffered-input)) (define (translate) (define *parser* (setup-parser (current-input-port) #f)) (let grande-lupe () (let ((parsed (parse *parser*))) (unless (eqv? parsed EOF) (pretty-print parsed) (grande-lupe))))) (if (null? (cdr (program-arguments))) (translate) (with-input-from-file (cadr (program-arguments)) translate))
true
adeee38580c82bbde0efa4dc0023b732f1d1fce0
7666204be35fcbc664e29fd0742a18841a7b601d
/code/1-17.scm
2a95e8a3ef26d4d505b5eee1448591a238ddc7a1
[]
no_license
cosail/sicp
b8a78932e40bd1a54415e50312e911d558f893eb
3ff79fd94eda81c315a1cee0165cec3c4dbcc43c
refs/heads/master
2021-01-18T04:47:30.692237
2014-01-06T13:32:54
2014-01-06T13:32:54
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
573
scm
1-17.scm
#lang racket (define (* a b) (if (= b 0) 0 (+ a (* a (- b 1))))) (* 3 5) (define (even? a) (= (remainder a 2) 0)) (define (double a) (+ a a)) (define (half a) (floor (/ a 2))) (define (fast* x n) (cond ((= n 0) 0) ((even? n) (double (fast* x (half n)))) (else (+ x (double (fast* x (half (- n 1)))))))) (fast* 3 5) (define (*iter a n) (define (iter a b n) (cond ((= n 0) a) ((even? n) (iter a (double b) (half n))) (else (iter (+ a b) b (- n 1))))) (iter 0 a n)) (*iter 3 5)
false
5a9f0189de17c6e1f61bdf86d25bfa1f2cc4922d
000dbfe5d1df2f18e29a76ea7e2a9556cff5e866
/ext/crypto/tests/testvectors/signature/rsa_signature_3072_sha384_test.scm
f16748e75425f469174526b7d63556918808c1c6
[ "BSD-3-Clause", "LicenseRef-scancode-other-permissive", "MIT", "BSD-2-Clause" ]
permissive
ktakashi/sagittarius-scheme
0a6d23a9004e8775792ebe27a395366457daba81
285e84f7c48b65d6594ff4fbbe47a1b499c9fec0
refs/heads/master
2023-09-01T23:45:52.702741
2023-08-31T10:36:08
2023-08-31T10:36:08
41,153,733
48
7
NOASSERTION
2022-07-13T18:04:42
2015-08-21T12:07:54
Scheme
UTF-8
Scheme
false
false
351,738
scm
rsa_signature_3072_sha384_test.scm
(test-signature/testvector "rsa_signature_3072_sha384_test" :algorithm "RSASSA-PKCS1-v1_5" :digest "SHA-384" :public-key #vu8(48 130 1 162 48 13 6 9 42 134 72 134 247 13 1 1 1 5 0 3 130 1 143 0 48 130 1 138 2 130 1 129 0 160 120 135 243 115 55 129 150 176 183 72 205 243 28 20 115 92 207 160 241 23 172 175 218 162 31 222 75 110 117 89 57 11 131 78 123 146 233 225 204 157 73 252 15 230 207 182 4 41 101 43 75 249 167 118 143 113 252 66 113 202 111 239 78 67 17 146 235 220 152 99 11 251 148 197 186 241 139 76 247 136 29 132 72 62 76 68 194 45 177 90 150 39 112 90 11 66 162 109 111 61 96 9 174 224 210 167 27 237 244 212 176 238 107 111 236 47 22 225 39 126 202 163 189 237 186 64 100 115 164 118 209 104 141 240 250 209 218 121 85 38 199 230 65 152 27 72 18 176 91 105 45 96 198 11 43 250 66 76 139 98 15 64 220 157 186 89 226 199 16 231 238 117 11 62 19 76 31 113 244 50 16 104 138 255 23 170 164 28 219 86 104 117 63 0 6 177 207 149 27 197 149 31 77 137 163 17 150 152 94 165 92 9 102 195 102 43 207 228 228 205 52 241 46 74 253 126 92 74 19 7 57 177 1 125 106 88 56 130 253 114 219 26 103 65 135 2 200 176 19 83 204 247 91 123 147 250 236 14 11 227 98 17 213 242 189 145 14 21 82 50 55 17 187 235 115 133 143 137 156 193 236 6 62 246 125 136 224 198 153 213 166 137 197 33 6 240 110 150 15 9 210 163 207 132 245 59 190 162 164 115 237 242 230 224 23 104 1 211 250 28 45 53 142 30 90 38 246 70 172 147 121 110 193 250 220 105 145 192 236 25 201 221 144 178 90 45 211 191 115 210 207 30 234 136 103 249 108 170 90 45 245 73 115 172 178 162 218 10 19 103 236 116 175 187 150 143 81 119 101 35 141 23 105 2 3 1 0 1) :der-encode #t :tests '(#(1 "" #vu8() #vu8(71 52 50 207 17 182 249 107 29 212 30 23 66 172 226 28 209 14 141 173 137 163 224 14 198 143 59 69 65 16 89 208 187 198 200 163 240 119 191 180 177 45 166 10 202 134 221 133 105 52 6 26 168 228 195 34 26 1 155 126 211 212 231 14 216 191 83 250 20 13 60 49 135 122 19 90 106 225 64 224 33 190 169 64 142 230 31 231 243 46 96 205 24 147 34 130 177 174 241 1 159 154 57 120 156 180 137 145 229 53 86 139 85 235 38 207 150 233 186 179 93 3 18 31 107 233 240 214 80 121 176 100 207 249 35 237 181 99 156 240 143 72 236 174 192 103 10 179 123 3 228 204 46 96 69 130 225 204 206 247 159 38 44 139 61 20 104 135 48 60 84 42 231 196 85 176 246 142 136 44 94 34 89 236 217 247 108 211 112 110 152 148 118 96 137 178 103 237 59 222 194 157 245 181 126 106 111 141 239 242 30 9 60 230 17 114 75 161 1 44 246 58 162 198 46 114 103 175 75 29 245 239 3 14 108 186 123 33 125 70 254 67 250 178 85 244 28 224 134 190 197 228 246 4 113 140 149 172 219 213 197 107 248 182 133 65 172 13 222 10 94 15 35 54 234 96 136 100 171 220 83 36 178 155 159 123 211 92 81 67 115 239 222 56 187 89 59 141 75 36 149 53 152 70 98 191 75 57 123 42 88 76 161 86 36 65 101 55 50 15 222 248 17 51 214 3 142 221 153 238 25 175 149 103 201 250 83 100 116 239 250 146 85 85 201 194 252 234 82 95 226 218 147 91 121 30 193 215 211 189 227 58 88 248 13 209 229 135 225 196 51 35 156 101 51 46 148 214 109 60 121 191 209 144) #t ()) #(2 "" #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) #vu8(105 216 154 238 154 27 152 39 34 140 64 195 243 189 185 71 158 211 107 237 210 199 123 63 93 202 25 145 122 92 222 150 54 185 246 237 226 151 24 163 145 34 74 181 143 70 76 144 82 181 230 120 97 120 25 74 144 236 4 210 210 183 81 59 25 223 39 153 176 231 162 214 209 239 44 73 236 104 112 251 140 174 69 238 17 3 105 45 168 210 17 191 97 246 86 211 4 246 154 223 104 192 34 124 122 245 206 184 194 219 74 54 104 187 106 27 140 195 164 55 185 223 121 188 13 214 80 214 227 164 34 149 180 166 226 61 64 179 169 183 84 143 55 96 224 250 246 146 0 223 35 13 44 20 56 7 178 243 95 164 73 207 167 55 146 132 77 255 93 42 229 10 220 39 44 13 186 202 205 96 235 11 121 100 1 42 92 25 129 203 47 53 143 245 53 9 249 11 14 196 18 89 254 243 33 233 163 6 160 131 99 237 25 78 81 171 109 188 0 206 238 87 108 4 140 2 112 74 25 248 243 87 37 10 220 112 205 210 129 145 87 215 26 240 74 176 204 99 172 156 111 164 181 121 158 174 82 30 39 95 38 206 83 48 32 23 81 8 38 249 108 74 40 137 222 174 241 159 222 218 204 112 166 89 138 168 158 43 207 55 50 57 190 217 141 31 34 103 250 124 36 54 173 209 61 246 141 158 162 150 250 181 47 237 15 94 228 104 116 244 135 53 254 50 198 30 210 177 201 119 255 24 98 204 206 9 59 223 125 132 166 176 60 48 7 196 201 38 209 229 45 129 220 192 188 42 85 58 18 190 54 59 118 79 106 50 46 65 168 49 142 167 64 140 24 227 60 38 10 160 93 3 150 37) #t ()) #(3 "" #vu8(84 101 115 116) #vu8(37 147 50 189 90 39 75 195 71 255 163 232 163 28 139 39 242 22 204 134 93 50 201 23 165 215 228 192 106 189 68 182 192 36 244 78 186 153 120 98 200 18 216 235 175 124 172 203 178 52 41 49 120 228 75 37 50 71 142 139 235 246 175 95 131 49 142 190 57 142 8 80 233 41 168 156 218 134 12 209 142 201 69 84 228 224 212 90 158 194 217 172 216 63 190 242 181 211 29 215 178 243 193 46 121 26 253 62 57 169 67 127 218 119 36 201 66 97 148 188 253 198 189 82 3 111 98 174 234 120 83 219 44 140 73 129 3 235 96 24 2 129 23 10 160 250 232 19 148 23 151 77 145 112 144 219 168 249 6 22 101 233 45 149 56 39 223 244 212 80 245 86 109 44 91 117 59 101 201 181 34 160 196 218 134 134 41 86 154 102 107 124 41 43 34 6 14 146 172 244 237 101 229 18 69 64 58 79 22 44 139 80 75 133 168 16 144 110 202 202 41 86 211 149 193 99 167 246 242 53 115 21 105 104 236 246 46 244 107 114 185 206 57 48 54 129 227 84 233 28 93 121 68 205 50 136 178 168 74 30 162 142 126 111 38 11 197 248 217 43 228 25 173 100 154 143 85 162 25 92 164 97 48 146 45 130 117 159 155 192 48 200 177 34 33 29 149 44 62 231 133 31 9 243 12 47 236 209 7 6 86 198 156 37 152 88 75 85 203 230 86 125 210 113 147 5 220 82 223 218 3 234 40 154 93 185 32 252 44 119 126 112 129 207 217 40 100 49 109 63 202 154 175 142 34 24 237 138 82 53 231 70 229 205 155 204 133 107 12 97 91 144 29 198 16 240 25 49 113 134 146 2 232 69) #t ()) #(4 "" #vu8(49 50 51 52 48 48) #vu8(31 50 179 110 180 63 135 177 142 86 159 207 231 2 23 99 190 160 202 87 108 210 115 192 178 3 82 144 110 216 72 68 40 210 80 36 23 9 200 37 112 69 24 255 158 151 16 59 183 12 210 111 67 127 135 117 75 212 4 7 3 74 150 83 208 14 134 138 117 154 25 15 48 103 206 94 252 233 171 23 200 180 96 0 216 142 45 158 104 184 218 224 160 234 164 163 29 59 181 28 140 141 15 200 57 176 178 115 200 61 173 87 1 107 27 92 29 142 204 255 28 117 62 92 109 24 158 208 123 128 31 10 84 161 20 76 20 32 17 253 50 38 69 31 174 164 61 82 89 123 0 63 146 86 206 219 13 125 127 86 216 109 254 239 80 23 154 121 79 11 13 233 125 161 146 110 148 145 240 37 187 60 62 142 3 22 97 224 234 216 96 200 145 79 11 41 75 248 207 234 45 92 204 114 106 208 116 62 25 37 16 115 45 200 67 1 238 225 94 202 60 106 82 19 186 102 208 135 23 137 49 95 133 55 164 75 114 123 216 161 13 110 84 99 107 52 87 21 252 11 111 91 81 22 242 37 87 176 175 159 148 133 88 176 255 74 59 15 175 29 231 218 25 101 185 119 170 175 3 156 91 123 9 180 240 62 254 234 179 24 157 42 9 253 220 57 131 228 129 93 243 93 221 28 33 152 182 149 207 252 53 170 102 98 131 159 130 70 140 182 118 182 119 213 62 228 133 122 185 190 123 217 158 23 73 200 17 226 214 88 68 39 203 206 20 210 202 21 223 6 17 101 232 85 2 66 6 2 102 105 147 70 55 51 180 60 28 30 186 232 211 119 128 71 11 140 245 202 227 28 215 66 119 153) #t ()) #(5 "" #vu8(77 101 115 115 97 103 101) #vu8(126 49 101 53 139 93 9 171 26 209 89 153 53 187 218 178 122 188 50 72 105 16 56 42 10 230 48 247 37 181 220 165 255 170 158 96 110 46 85 81 34 193 224 243 64 157 125 145 94 160 13 135 132 184 20 166 114 29 13 209 23 41 124 149 28 141 34 90 72 74 84 158 72 143 184 15 153 106 214 84 144 160 157 239 176 180 111 156 252 162 233 82 176 77 253 84 24 218 146 13 251 41 104 228 141 186 143 7 41 177 111 163 42 131 47 216 183 137 191 235 198 63 1 161 25 8 19 207 213 90 206 148 157 128 42 255 251 233 161 236 30 106 93 241 150 229 255 178 65 201 24 215 18 228 102 243 12 102 192 189 221 72 181 123 164 208 186 160 194 186 155 207 81 156 58 38 20 13 246 170 94 251 221 90 201 190 255 72 97 63 146 210 71 179 94 251 214 1 79 61 113 71 5 147 62 71 213 130 244 165 218 5 177 90 121 188 172 186 26 161 90 95 214 221 178 40 187 228 197 35 111 154 198 7 244 26 73 46 107 28 146 189 104 206 48 101 158 181 178 122 91 47 118 165 134 125 175 191 133 169 223 221 253 212 118 195 131 253 3 227 142 129 242 225 67 69 83 100 62 101 44 192 6 229 223 115 19 39 35 53 241 34 167 253 156 174 111 47 90 125 166 88 101 105 141 109 8 214 136 0 10 115 12 144 145 158 24 38 191 161 219 133 213 96 127 249 215 108 177 0 234 22 73 68 44 239 196 37 26 140 193 216 35 33 94 10 209 171 251 41 118 188 74 107 43 189 121 62 191 156 119 112 149 125 186 30 42 133 131 217 168 42 7 35 134 208 149 119 137 180 80 153 60 119) #t ()) #(6 "" #vu8(97) #vu8(139 201 72 197 193 102 3 171 99 231 94 24 188 127 6 46 164 198 117 235 249 141 202 204 26 152 38 176 238 171 0 4 226 89 43 7 82 95 202 83 189 40 139 181 107 89 97 174 169 59 84 135 113 6 143 91 12 239 70 124 56 126 45 98 201 30 4 88 114 146 43 81 109 214 197 184 172 54 21 201 134 169 200 181 33 26 5 246 62 130 56 113 117 232 116 151 9 149 18 115 205 157 139 46 204 246 120 40 71 97 199 34 133 190 92 24 156 68 0 98 156 38 248 123 241 142 191 229 229 111 32 87 253 145 252 146 9 236 72 168 114 214 210 59 195 48 241 200 30 222 127 197 160 226 176 156 58 71 53 239 249 200 173 247 49 82 179 64 106 98 101 104 151 193 238 240 117 196 251 2 36 78 205 147 145 45 211 111 190 13 53 138 113 224 45 43 48 45 190 189 40 186 80 134 14 74 150 48 113 240 168 144 162 228 0 193 143 83 12 249 68 10 137 126 178 120 28 235 23 187 197 143 97 130 138 100 86 185 60 134 223 151 44 66 208 130 185 19 196 216 128 123 117 99 170 251 123 51 14 195 157 201 136 103 74 92 59 54 246 187 221 9 98 1 241 199 194 92 169 234 143 40 233 35 186 70 219 233 57 16 38 141 110 53 207 182 5 185 46 207 152 105 154 233 176 157 212 99 77 18 128 88 108 94 107 176 177 164 181 229 226 43 34 84 83 245 198 111 154 126 215 255 248 62 203 32 30 177 87 199 108 155 239 249 82 39 180 149 200 81 107 188 113 24 240 17 207 146 55 182 231 148 189 122 155 161 158 53 208 166 80 219 247 192 106 12 157 220 149 241 8 167 130 70) #t ()) #(7 "" #vu8(224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255) #vu8(9 238 130 18 33 206 123 190 180 214 110 163 236 136 56 123 181 197 191 176 85 184 190 179 108 203 164 194 206 150 102 177 160 153 53 104 157 177 204 35 18 215 151 172 139 111 98 100 61 231 54 243 130 105 168 31 150 147 8 235 97 108 244 25 96 52 31 168 237 211 80 31 78 223 115 115 104 6 182 252 19 135 223 78 243 225 226 108 3 36 159 61 182 71 30 213 128 105 158 138 199 125 15 217 167 137 114 52 126 134 87 182 205 254 23 47 218 50 78 234 0 214 13 56 180 126 6 108 74 111 192 227 63 117 209 212 236 223 70 239 217 102 202 154 239 128 210 46 67 223 194 205 10 243 127 167 13 109 247 198 55 195 193 138 33 155 245 141 193 231 191 201 65 162 53 191 232 30 231 16 21 48 162 194 100 82 118 8 215 20 141 217 19 37 183 137 88 23 174 80 215 116 232 220 210 222 248 164 118 169 89 45 85 190 116 60 98 193 25 47 10 214 153 129 253 200 101 28 29 184 40 9 127 248 8 139 114 12 99 124 96 199 113 181 9 31 157 158 23 75 200 35 17 90 31 125 191 8 111 154 211 106 64 60 45 113 12 71 175 71 83 254 110 67 198 117 195 2 25 171 194 184 86 11 209 140 37 170 199 25 84 108 231 167 64 128 252 242 43 212 230 207 252 39 14 87 186 237 207 39 57 197 207 79 197 250 193 143 93 208 35 48 28 170 193 177 250 244 220 198 83 39 37 92 207 84 245 251 211 207 130 128 26 134 133 194 238 243 197 231 246 8 207 111 116 123 131 7 246 23 252 225 72 52 123 118 250 207 14 31 120 149 174 235 17 227 34 94 58 96 102 162 68 202) #t ()) #(8 "Legacy:missing NULL" #vu8(49 50 51 52 48 48) #vu8(59 26 1 246 154 250 119 217 108 27 123 253 255 148 213 142 52 103 70 243 113 43 43 242 112 93 119 27 110 224 130 199 221 157 44 138 135 222 106 104 65 119 237 216 3 142 161 185 191 221 103 34 161 69 61 104 32 78 77 110 255 165 132 161 185 82 5 97 152 47 1 129 241 2 222 45 98 16 132 24 119 139 73 118 180 147 58 121 198 169 129 189 72 248 71 17 163 247 204 38 221 191 6 197 154 166 105 213 109 96 167 65 64 127 134 230 166 69 219 219 31 121 39 219 192 172 249 150 115 104 153 221 154 163 103 236 123 177 87 237 18 29 161 95 37 187 33 128 114 147 204 246 211 166 110 24 113 61 128 118 60 209 83 205 239 88 177 230 227 27 52 140 197 20 184 242 211 87 209 74 247 203 170 227 153 147 215 135 27 189 12 185 193 54 147 107 41 45 211 104 239 29 130 96 0 211 202 19 171 72 182 89 210 49 201 92 2 22 61 46 17 227 49 82 230 159 111 63 8 105 73 24 216 159 154 4 173 106 1 192 136 115 9 101 74 78 168 168 72 66 45 201 36 249 144 203 101 186 37 80 206 22 107 106 0 28 206 71 103 163 241 204 231 70 73 135 102 36 210 161 17 20 54 169 166 176 109 253 186 254 175 50 152 134 213 231 72 44 227 232 26 51 182 154 159 167 216 41 129 170 189 129 194 101 12 60 43 52 119 143 153 239 162 211 132 59 56 108 36 55 127 225 116 131 196 144 166 60 104 150 33 47 139 238 238 224 74 57 89 238 239 71 160 15 236 128 97 132 93 132 254 125 122 250 32 96 116 180 31 240 1 190 49 90 126 50 194 207 171 220 134 30 236 69) #t ("MissingNull")) #(9 "long form encoding of length of sequence" #vu8(49 50 51 52 48 48) #vu8(120 53 225 53 24 142 151 151 63 60 208 160 90 16 46 136 143 165 28 226 50 6 44 152 86 209 52 179 15 243 43 81 48 147 224 123 117 113 178 81 245 179 97 131 100 184 48 177 175 1 22 155 10 25 194 3 224 121 8 60 78 248 88 39 241 164 9 95 10 108 251 158 160 198 234 74 209 188 190 39 24 143 144 184 198 106 155 160 37 141 59 170 73 185 125 15 129 80 55 11 190 153 38 225 71 23 114 241 243 125 216 91 55 165 185 164 225 93 50 192 43 66 115 19 64 127 169 237 105 62 15 68 79 198 241 13 193 86 64 114 195 96 249 229 67 63 233 133 250 105 152 96 214 201 252 82 138 168 44 215 181 3 133 74 151 85 36 177 50 238 237 95 148 1 94 209 178 216 93 157 252 107 16 181 41 225 64 189 97 29 49 108 181 79 49 249 215 208 107 109 238 249 182 53 25 193 79 254 61 150 148 7 123 208 187 179 72 43 9 164 144 177 12 162 198 181 16 83 47 56 220 43 252 229 28 251 242 255 138 67 24 31 226 133 46 104 118 183 96 85 129 41 195 6 106 79 47 110 15 47 78 149 200 95 64 204 221 129 231 149 213 210 152 124 146 1 61 84 45 153 118 75 208 202 201 112 36 173 172 239 200 28 232 155 54 49 30 196 238 48 75 35 7 207 30 16 209 241 113 240 206 116 19 204 3 213 189 44 34 51 224 248 13 152 3 78 145 216 181 117 225 236 171 118 215 8 192 137 159 39 191 161 254 225 2 233 165 243 147 173 24 41 61 59 169 60 122 243 187 98 225 115 17 231 158 2 33 77 201 182 42 133 230 254 39 11 233 138 114 57 27 161 78 24) #f ()) #(10 "long form encoding of length of sequence" #vu8(49 50 51 52 48 48) #vu8(14 14 49 110 157 109 30 95 115 51 120 157 66 243 118 21 152 187 183 109 167 132 125 91 117 195 118 173 136 74 194 182 26 3 148 187 47 101 225 219 185 134 194 111 163 131 127 144 91 218 50 77 198 85 69 252 198 217 73 202 75 139 212 159 158 247 204 91 28 12 89 59 195 78 2 165 106 11 47 205 228 206 209 104 165 4 235 212 239 21 101 207 180 0 206 192 216 98 117 175 53 175 176 26 94 211 34 99 188 38 74 44 138 69 168 79 52 140 42 183 199 247 71 17 228 226 149 50 62 43 155 118 167 186 116 117 216 248 215 41 67 177 11 166 78 176 132 200 50 172 155 42 152 78 26 44 225 191 181 11 151 246 75 183 84 191 93 88 50 73 148 121 161 152 186 239 136 217 221 33 36 12 201 85 104 198 70 100 167 4 163 89 235 86 83 78 36 27 16 108 216 211 1 176 71 68 140 158 131 208 227 217 99 45 164 100 21 129 206 83 200 130 158 73 112 30 210 151 216 21 196 111 133 82 141 47 197 49 167 129 62 234 228 92 13 36 158 234 0 220 105 218 146 85 13 221 158 4 120 122 28 187 118 215 198 244 191 53 183 216 88 44 226 242 228 193 24 79 121 211 215 71 61 118 55 244 34 21 173 75 155 235 241 67 249 88 243 208 41 91 82 157 59 61 177 146 220 223 68 25 212 42 226 25 189 129 167 22 247 214 71 42 106 134 50 142 39 40 197 237 76 8 207 198 249 195 39 126 66 223 34 209 93 125 70 196 66 175 97 10 69 102 141 230 109 115 94 9 171 203 182 56 172 57 205 169 5 218 176 205 128 47 90 84 41 81 223 50 51 170 135 50 17 29) #f ()) #(11 "length of sequence contains leading 0" #vu8(49 50 51 52 48 48) #vu8(2 227 27 59 111 18 0 249 63 190 132 38 207 67 53 117 207 1 3 15 161 40 74 184 191 116 66 138 206 242 87 89 223 88 123 226 106 82 96 120 156 222 42 174 123 19 61 36 151 131 177 202 225 71 150 101 141 75 106 74 162 67 33 245 175 230 132 120 142 250 174 132 139 105 56 70 164 87 115 118 148 209 167 175 105 133 137 15 250 115 132 118 152 100 6 78 202 145 236 230 192 50 152 245 235 250 122 24 191 115 30 201 167 203 35 2 91 112 114 173 76 6 187 191 227 54 85 101 68 34 205 75 151 169 190 58 255 1 96 0 166 199 48 60 207 199 60 189 144 142 130 201 48 221 65 12 58 178 172 226 88 188 208 94 145 233 78 74 97 106 109 237 122 76 100 176 13 197 207 32 38 137 160 239 53 131 163 30 6 99 55 177 151 28 221 144 156 32 161 255 199 192 6 148 75 129 168 154 92 150 207 67 166 222 244 215 69 19 64 86 190 205 185 201 39 91 47 42 151 207 224 22 59 234 90 200 220 50 208 250 123 36 221 164 236 12 136 246 28 174 119 250 196 193 154 103 196 111 210 106 3 185 144 197 115 126 190 235 222 64 40 121 160 44 222 86 114 134 136 57 77 87 126 95 199 195 71 168 207 102 112 43 59 37 80 132 235 34 68 54 202 92 134 27 104 134 219 96 89 10 120 60 45 50 190 172 188 236 223 172 254 107 110 82 5 134 133 101 150 178 92 217 24 213 134 100 45 185 172 218 114 152 96 120 81 27 206 221 190 165 35 159 34 159 26 238 128 207 185 216 81 239 158 132 5 97 65 208 38 255 80 171 224 200 61 46 186 98 136 114 36 87 249 22) #f ()) #(12 "length of sequence contains leading 0" #vu8(49 50 51 52 48 48) #vu8(14 167 170 51 120 27 137 125 23 232 73 243 150 127 248 249 155 47 2 122 47 61 70 187 151 158 93 78 88 57 143 43 103 152 182 198 255 78 131 223 10 50 12 201 100 223 189 101 66 192 68 22 104 21 110 16 141 46 181 199 205 73 71 180 195 16 69 111 190 52 42 0 173 126 194 190 54 93 14 108 113 171 235 162 15 112 27 11 85 200 51 229 46 48 234 156 222 33 187 29 35 55 43 158 191 146 14 28 22 55 3 164 132 150 8 114 194 181 236 78 72 64 132 52 71 209 8 204 118 163 116 116 169 183 242 186 9 228 6 174 38 114 43 66 79 61 231 160 201 182 142 205 113 251 28 191 62 135 22 61 199 128 251 184 240 161 111 6 224 92 211 26 11 109 224 199 153 18 223 7 41 107 208 89 255 50 127 181 248 96 221 222 80 195 162 140 206 249 89 232 152 8 18 12 177 41 140 165 246 247 188 183 54 101 100 152 27 249 1 97 69 61 240 189 130 104 232 203 52 32 156 150 155 181 199 2 132 118 235 33 43 170 48 153 5 38 253 87 179 108 102 183 28 89 24 12 205 38 176 41 144 144 110 13 229 251 56 107 206 90 193 179 210 210 62 24 147 34 15 105 139 93 7 94 192 189 135 24 67 244 115 85 93 248 119 190 217 187 34 203 230 156 215 0 77 158 174 127 238 198 8 8 236 116 219 159 37 124 205 222 45 32 255 94 234 154 74 140 59 137 189 40 18 134 134 77 98 228 153 125 185 45 248 174 13 42 31 195 223 217 174 188 233 247 9 60 18 156 66 107 91 116 229 218 187 127 162 187 248 165 159 162 228 177 174 249 214 159 247 173 101 60 37 70) #f ()) #(13 "wrong length of sequence" #vu8(49 50 51 52 48 48) #vu8(85 106 49 249 11 24 121 161 55 76 196 242 146 45 212 28 178 49 58 97 252 82 110 136 159 201 162 8 104 69 138 213 205 38 214 179 211 160 16 97 147 212 75 227 162 45 19 132 8 74 148 158 93 19 136 241 230 113 246 56 218 13 209 171 144 217 211 22 206 102 162 88 64 163 50 188 44 163 18 221 159 222 135 186 87 202 113 143 153 241 133 27 54 190 158 2 62 36 185 152 64 98 130 130 17 165 129 18 123 13 129 228 177 191 89 119 242 61 28 112 218 120 135 192 152 48 192 227 197 164 203 102 188 128 53 218 5 85 150 238 124 188 30 212 234 118 215 113 39 8 51 3 133 229 169 53 159 168 227 160 246 230 58 86 158 93 45 180 232 103 129 43 64 218 21 211 1 93 207 49 255 168 135 250 127 175 71 138 12 250 211 18 95 173 22 211 138 87 250 194 38 46 1 33 125 109 122 220 80 163 175 128 77 136 129 230 29 237 181 53 0 29 153 155 130 226 217 37 14 186 172 7 196 230 149 233 70 181 244 44 134 181 70 255 24 241 161 106 148 105 99 201 35 77 86 212 74 120 196 176 186 10 222 163 11 23 82 138 233 31 195 38 241 249 118 137 29 226 110 147 32 189 188 163 47 55 9 247 49 0 157 164 91 11 9 237 94 231 136 39 143 24 186 165 169 125 3 148 72 120 90 71 81 183 122 123 6 20 137 173 178 137 235 133 69 158 102 61 133 243 187 48 11 228 58 24 82 131 187 185 67 54 196 30 8 245 14 247 186 55 142 82 94 72 168 68 227 161 101 189 72 75 136 45 176 130 132 229 165 27 57 39 39 213 79 145 61 75 185 183 193 83 184 132) #f ()) #(14 "wrong length of sequence" #vu8(49 50 51 52 48 48) #vu8(62 93 60 60 20 14 233 161 68 52 40 170 6 18 80 109 168 98 229 107 26 221 58 134 177 63 74 1 75 101 171 11 227 144 197 182 190 10 161 76 170 119 192 224 169 17 108 84 63 58 224 236 185 39 146 72 51 131 137 147 208 44 222 86 129 159 181 41 59 132 185 160 14 232 66 51 196 44 249 147 202 121 169 175 93 199 251 29 0 116 185 169 248 149 191 72 248 217 247 159 93 133 53 116 129 150 115 71 144 222 215 245 225 207 240 146 186 148 155 183 7 86 131 93 31 242 71 44 130 6 154 236 181 14 244 235 32 120 229 152 119 238 142 190 66 217 13 134 41 88 8 19 243 238 75 159 224 137 96 97 92 123 76 89 172 208 113 223 84 63 222 183 68 4 153 173 71 54 33 223 202 227 193 74 41 113 248 94 35 57 37 33 90 176 143 127 46 227 207 112 66 126 148 190 108 137 92 193 30 42 59 165 105 215 165 48 211 110 51 240 12 247 107 183 246 11 79 231 52 156 173 134 240 146 37 165 206 0 146 184 250 33 98 179 237 85 106 126 186 137 228 132 97 211 42 36 28 79 199 1 110 215 122 9 127 251 40 158 211 75 136 188 71 29 53 169 49 167 91 3 9 2 29 207 222 35 81 105 216 179 241 141 230 113 68 76 197 168 106 202 204 218 246 41 69 253 57 247 28 131 58 88 82 31 89 28 91 160 74 243 40 116 68 214 151 93 18 143 9 12 16 48 174 77 227 16 0 148 194 78 38 36 129 222 31 243 70 218 103 234 115 196 16 184 7 88 39 61 203 216 62 18 117 36 235 147 167 3 187 152 41 48 100 66 151 84 94 163 96 0 223 80 14 125) #f ()) #(15 "wrong length of sequence" #vu8(49 50 51 52 48 48) #vu8(121 24 79 32 78 210 75 234 142 46 118 138 85 206 217 45 188 11 93 89 255 144 19 219 125 139 104 40 217 198 49 244 126 31 234 145 211 131 183 192 10 100 163 163 229 83 231 149 50 136 207 218 167 138 255 237 94 122 205 120 244 136 120 181 7 176 46 133 71 156 159 197 41 135 158 156 140 37 42 14 85 149 67 215 143 12 222 14 59 121 125 135 253 253 191 150 10 142 195 189 73 173 246 234 55 10 16 238 140 171 167 248 237 170 68 211 100 48 22 63 27 231 75 176 106 110 107 104 154 172 52 236 72 195 218 211 249 93 33 213 164 83 234 85 212 114 51 29 86 226 39 39 101 116 122 6 144 157 140 186 141 21 67 72 140 186 64 1 90 244 86 8 205 17 222 226 28 34 231 102 112 105 52 152 237 121 67 115 47 195 189 76 63 91 120 130 31 29 52 129 161 236 183 60 135 139 25 0 148 181 181 9 76 84 246 138 1 121 24 118 141 145 98 193 94 30 21 226 98 48 25 231 119 62 104 21 189 108 253 195 117 96 51 102 25 152 8 41 166 30 149 13 52 232 127 204 163 181 20 60 162 109 85 214 185 200 150 162 142 170 253 29 119 50 14 24 196 110 161 147 63 104 29 50 130 132 134 210 112 57 3 7 150 51 166 29 42 130 143 173 255 108 97 123 206 196 102 87 13 167 217 208 164 71 229 13 73 190 172 180 106 68 136 182 87 67 254 130 0 207 106 11 68 188 103 94 246 198 172 183 201 111 186 255 183 184 171 15 251 107 238 93 61 91 249 75 106 174 228 52 99 7 188 101 190 110 150 222 31 200 76 82 232 204 242 184 31 101 120 95 9 127 155 185) #f ()) #(16 "wrong length of sequence" #vu8(49 50 51 52 48 48) #vu8(17 173 73 32 94 181 96 103 44 161 115 209 13 22 233 241 150 174 58 228 51 80 6 149 73 183 79 246 200 196 170 113 179 30 1 123 162 171 176 216 182 232 21 70 82 254 24 106 131 252 52 132 75 239 249 52 133 42 156 39 130 134 191 96 22 107 111 153 163 0 129 163 68 225 28 101 90 15 181 30 31 199 163 173 112 6 118 235 174 176 85 122 44 129 64 104 109 90 128 59 200 229 204 200 15 104 139 208 85 11 238 96 62 165 245 151 5 207 58 221 151 113 38 66 240 182 94 81 122 24 59 70 55 218 92 122 199 134 101 204 94 192 117 21 252 76 216 76 136 92 166 115 195 95 51 176 27 151 39 52 45 223 38 159 75 231 54 134 176 93 143 219 248 58 20 146 50 245 199 230 116 212 7 155 128 33 220 49 74 252 243 197 86 25 21 224 63 239 120 15 81 235 90 203 120 174 20 232 76 130 161 239 228 68 51 10 196 99 142 63 153 24 221 201 123 137 204 255 249 69 56 208 3 24 7 234 20 126 6 142 93 244 94 127 163 89 47 236 96 251 177 90 136 9 77 73 27 249 67 148 224 32 26 134 91 64 81 110 22 105 105 91 195 40 19 164 67 170 134 141 229 143 96 182 6 23 35 15 135 31 153 35 194 170 187 145 6 195 155 136 101 15 21 10 201 53 72 90 36 111 85 148 55 169 246 135 16 71 133 99 10 107 24 213 84 74 30 173 235 37 146 40 224 160 71 239 130 157 159 197 201 206 144 122 52 74 137 197 175 197 20 8 248 242 52 56 190 104 133 172 116 106 51 78 121 114 19 251 111 133 78 88 223 181 139 170 186 240 90 79 32 112 36 74) #f ()) #(17 "uint32 overflow in length of sequence" #vu8(49 50 51 52 48 48) #vu8(19 89 67 189 18 104 155 254 4 204 28 10 136 96 215 193 143 19 180 191 10 130 195 52 180 74 218 44 94 130 252 50 176 174 153 192 72 201 78 53 8 245 152 85 197 62 107 66 188 192 65 194 25 253 100 101 210 21 130 244 249 156 186 75 136 236 24 68 174 90 137 243 33 92 175 69 133 71 240 209 71 192 250 29 182 116 83 70 94 89 58 210 191 186 200 234 146 56 214 114 54 141 50 204 182 129 102 63 216 176 35 17 92 79 65 52 85 81 213 242 191 211 135 17 120 48 50 58 77 6 31 203 182 170 19 242 220 12 90 49 126 107 115 57 246 204 229 197 67 41 17 84 237 123 17 143 184 197 94 137 66 208 238 154 203 164 236 60 145 6 39 140 152 42 140 218 103 162 243 207 116 238 248 163 127 239 122 37 110 39 171 67 245 182 246 165 100 85 68 188 125 118 110 74 235 67 157 37 93 20 67 48 254 164 193 4 56 210 184 1 180 119 218 134 31 111 19 238 175 97 191 90 208 183 150 105 221 28 121 94 3 187 130 102 39 252 55 151 132 96 5 170 151 85 83 52 60 145 222 172 12 119 123 169 226 83 218 143 59 146 90 191 92 187 12 49 127 194 234 111 141 117 11 220 233 207 20 158 191 98 51 20 222 72 13 170 177 19 159 136 42 241 97 117 13 59 116 202 67 125 248 189 124 149 112 194 61 13 137 109 74 112 170 78 70 77 10 131 108 123 188 34 48 106 174 16 5 141 29 253 129 48 61 254 7 185 35 28 101 31 227 14 12 235 50 133 112 128 46 48 223 181 145 12 187 7 57 198 247 76 96 136 178 255 32 8 139 123 145 253 187 233 96 104) #f ()) #(18 "uint32 overflow in length of sequence" #vu8(49 50 51 52 48 48) #vu8(85 19 193 110 197 52 2 192 84 103 133 237 47 235 214 81 193 55 3 82 193 33 40 157 42 31 201 212 219 116 249 144 65 175 34 213 156 64 125 96 118 145 116 229 151 97 89 173 100 232 74 61 216 65 192 74 22 182 247 64 6 123 80 56 92 211 25 86 217 23 55 33 135 208 75 193 105 172 13 85 85 93 218 148 155 212 34 211 156 160 62 64 129 122 51 136 164 174 3 102 138 243 20 141 208 142 111 175 30 170 23 13 77 141 157 31 214 7 235 196 247 44 62 172 22 48 36 221 47 134 175 220 214 180 72 199 197 208 159 37 148 233 94 249 123 95 230 163 138 38 92 6 193 45 218 6 101 57 62 203 246 71 112 190 124 186 66 86 50 147 98 108 48 94 184 64 181 67 135 212 15 179 113 4 112 20 160 88 237 0 130 190 49 245 146 89 151 26 39 220 77 225 138 64 59 194 108 123 66 121 227 144 132 75 252 19 33 83 101 55 95 222 194 243 195 135 59 31 248 248 127 96 80 108 85 183 204 240 63 59 60 162 83 74 79 104 97 69 83 111 101 189 31 17 191 126 202 84 243 39 198 188 18 1 146 254 73 117 101 127 84 185 98 240 218 4 68 198 101 9 132 33 62 162 181 49 176 184 67 37 37 164 22 226 222 23 144 239 184 58 34 77 41 213 216 21 50 121 212 95 153 14 54 200 57 171 126 243 206 186 176 219 174 56 43 9 106 135 7 91 95 224 0 164 54 155 174 19 53 178 46 220 204 237 16 133 247 193 253 199 247 28 110 193 106 252 150 223 38 223 101 188 171 84 50 29 145 213 159 112 36 202 93 101 228 121 31 138 21 137 240 148 183 151) #f ()) #(19 "uint64 overflow in length of sequence" #vu8(49 50 51 52 48 48) #vu8(98 177 253 149 17 118 110 105 169 77 97 211 142 75 2 241 198 179 154 60 40 232 227 144 23 92 214 29 246 32 1 177 137 160 228 78 119 38 205 141 228 75 5 24 218 221 122 163 96 235 191 252 242 147 197 255 116 146 48 6 106 99 204 94 57 58 196 67 231 58 52 93 121 228 181 70 55 171 61 22 37 163 209 231 211 208 197 187 206 219 101 190 28 133 49 112 53 206 169 247 59 40 37 84 243 85 53 5 19 167 248 86 77 92 46 191 147 114 63 148 61 87 152 120 200 155 99 210 91 233 34 147 83 139 185 216 7 147 80 91 32 201 88 218 95 253 232 148 199 28 57 36 83 197 6 100 155 56 145 190 85 214 156 96 123 110 65 121 213 169 26 51 47 132 164 78 211 39 103 187 24 159 219 113 69 188 19 241 40 160 121 11 51 59 232 18 136 212 181 36 147 206 251 17 141 119 10 165 98 42 67 24 245 211 123 164 12 190 161 29 36 51 191 81 209 13 111 13 72 248 86 172 26 135 55 108 106 0 138 217 80 125 100 16 60 242 225 45 79 144 63 157 199 189 8 193 198 229 106 87 16 192 16 64 163 5 117 231 85 184 218 187 221 131 171 191 83 201 192 229 63 24 70 128 165 217 85 38 37 47 158 192 75 3 186 153 115 31 241 94 7 216 86 99 102 236 120 211 238 160 247 35 198 223 28 195 46 15 144 108 243 59 25 103 7 127 97 237 4 80 88 240 64 116 110 77 65 69 132 208 194 49 205 231 194 138 16 142 21 204 191 94 137 116 78 59 161 247 189 62 201 41 52 16 27 232 175 11 192 112 86 144 4 50 97 233 134 146 239 115 126 215 142 91) #f ()) #(20 "uint64 overflow in length of sequence" #vu8(49 50 51 52 48 48) #vu8(27 3 90 20 202 227 168 196 49 27 135 159 78 208 0 222 187 231 47 152 71 250 145 207 254 55 29 44 195 229 229 133 53 66 238 236 54 32 6 231 187 143 226 82 141 50 80 113 168 216 86 78 201 214 14 234 118 85 255 51 188 182 152 214 92 195 7 83 8 79 119 61 220 51 71 233 52 148 42 252 255 35 218 53 98 141 203 39 81 51 122 253 223 31 217 0 226 216 63 82 138 150 212 165 235 212 99 106 167 206 15 32 177 129 23 105 115 196 64 176 20 210 3 178 75 3 169 37 49 167 156 127 200 2 205 16 183 246 51 252 35 142 159 243 225 132 187 174 29 179 26 142 112 166 157 187 235 249 37 70 126 86 132 33 142 86 81 253 203 154 178 55 155 44 187 57 131 99 196 16 25 44 31 240 57 126 158 35 237 221 142 60 180 115 237 57 221 154 209 66 167 128 108 46 117 51 16 239 177 37 78 219 146 141 120 30 112 33 29 4 131 188 239 107 124 67 181 45 4 185 110 213 109 230 49 52 62 41 201 159 76 17 93 17 192 183 72 128 196 214 161 35 92 85 208 96 27 7 178 53 48 201 246 25 206 18 40 155 193 179 239 212 240 165 209 210 247 244 111 157 88 240 185 63 101 148 32 206 162 135 83 46 15 59 108 146 214 80 132 197 225 136 201 152 133 121 137 213 162 5 107 185 115 167 206 201 248 162 91 38 9 99 188 194 212 247 79 135 1 174 185 202 146 254 117 81 192 6 178 29 188 167 79 72 27 140 161 100 14 37 27 152 255 167 104 239 46 199 146 76 215 8 147 27 21 117 40 88 214 247 220 8 144 250 226 102 24 27 82 204 237 200 116 70) #f ()) #(21 "length of sequence = 2**31 - 1" #vu8(49 50 51 52 48 48) #vu8(13 108 142 3 57 148 182 236 237 242 44 95 84 79 46 59 104 141 184 178 35 90 0 223 200 241 178 191 209 57 31 175 100 155 230 88 21 83 61 110 233 64 152 164 56 32 114 190 221 194 162 244 57 131 125 198 223 12 152 38 236 73 195 197 41 183 30 156 173 44 231 23 250 4 124 235 248 30 7 136 234 113 248 0 90 12 122 209 168 213 156 39 239 195 52 200 38 180 12 63 78 192 53 70 51 231 230 215 22 84 80 148 96 231 213 238 247 164 79 72 148 240 126 101 45 157 120 96 199 139 167 250 205 22 27 101 229 184 196 127 211 223 133 129 110 229 175 78 211 92 3 249 191 8 194 217 93 86 188 232 41 84 241 125 160 25 94 149 85 141 252 73 215 213 69 186 0 74 252 89 232 241 114 54 203 111 13 141 125 40 143 139 252 65 18 42 197 232 3 239 133 91 61 2 209 29 210 20 167 241 233 6 23 67 91 40 64 88 58 205 238 15 235 20 90 55 168 184 201 245 254 239 117 13 154 149 10 96 91 89 132 19 112 164 127 89 163 174 170 210 117 63 107 30 241 196 50 113 51 253 89 137 91 98 123 125 160 220 245 249 187 118 96 203 144 2 105 42 185 71 17 219 156 21 211 188 95 180 203 14 98 179 107 239 240 59 218 119 70 160 22 27 65 153 54 109 62 42 58 156 122 118 43 107 241 94 193 250 39 88 90 162 45 66 142 124 122 231 223 232 184 1 10 125 249 240 122 6 13 145 21 210 53 40 122 206 134 53 150 225 224 31 191 53 81 217 153 94 84 66 222 101 9 83 205 41 81 197 97 49 125 51 29 240 16 209 198 252 172 233 248 176 81 69) #f ()) #(22 "length of sequence = 2**31 - 1" #vu8(49 50 51 52 48 48) #vu8(123 187 160 155 85 76 219 235 114 1 105 149 50 86 73 171 156 157 10 155 222 203 95 196 79 240 5 123 246 25 223 44 162 187 208 195 177 61 236 49 38 160 84 93 196 147 108 4 63 32 13 125 241 29 135 195 144 223 161 176 221 78 32 193 152 119 242 131 246 45 110 32 224 255 47 13 86 21 137 166 131 3 75 255 181 251 43 233 206 43 226 163 249 248 102 103 181 60 176 144 28 223 64 194 62 230 119 70 164 155 161 172 87 107 32 117 191 31 247 244 137 65 221 139 185 96 77 83 105 201 7 125 118 103 118 242 101 186 164 219 93 195 254 122 38 67 252 100 74 1 241 76 64 167 169 109 149 113 57 39 183 202 230 253 85 250 165 200 2 173 222 211 44 95 246 247 2 106 222 246 7 162 242 171 245 159 47 10 142 221 53 84 125 180 172 224 184 216 25 97 72 4 18 176 43 93 81 241 231 240 66 0 134 251 80 107 125 97 118 5 65 74 89 219 141 127 19 116 57 142 254 109 56 223 163 154 5 104 165 63 181 142 27 113 206 216 227 193 38 219 153 176 44 10 123 62 39 164 209 73 63 44 7 127 81 245 185 174 115 188 137 57 155 24 194 112 230 229 118 107 105 87 114 131 224 132 206 59 37 34 167 122 153 79 224 228 161 146 235 153 124 181 180 187 215 89 45 36 236 79 177 151 120 9 68 12 126 13 234 7 195 132 22 158 156 204 178 60 31 220 167 119 58 254 228 237 128 79 99 170 85 100 146 183 164 6 58 6 153 221 255 226 181 131 35 11 130 106 50 14 30 38 103 122 223 193 29 24 90 25 146 211 142 73 70 99 16 83 51 10 84 47 229 148) #f ()) #(23 "length of sequence = 2**32 - 1" #vu8(49 50 51 52 48 48) #vu8(126 19 150 77 118 127 47 40 104 7 190 80 17 132 129 242 101 30 157 160 141 147 216 80 187 164 41 120 144 231 150 115 72 13 125 193 15 84 53 181 224 227 24 173 201 175 61 213 217 158 3 57 249 187 254 33 137 31 43 238 53 185 70 43 68 45 221 118 79 194 120 247 126 124 23 208 23 119 152 136 253 85 37 55 248 215 169 190 230 61 189 220 16 144 60 102 94 151 92 187 1 204 29 221 3 73 175 161 0 243 37 227 218 211 3 183 7 242 42 210 193 32 8 62 78 48 78 177 209 42 189 206 228 31 109 28 178 118 245 142 176 156 186 100 52 68 105 126 67 168 153 197 189 59 29 16 172 147 158 97 141 180 188 18 206 109 130 42 41 194 5 173 116 141 63 99 43 20 122 114 50 247 153 193 70 120 235 170 1 36 169 236 22 22 142 50 223 65 210 31 195 26 45 135 195 182 0 139 44 217 15 81 35 14 29 236 0 49 31 175 240 156 47 192 122 205 120 181 126 57 39 26 137 18 160 197 183 110 60 223 213 145 92 99 98 241 85 156 40 201 84 121 117 11 114 196 240 183 158 245 249 162 93 144 34 5 30 177 217 222 26 199 100 254 104 57 88 202 138 105 128 9 137 57 180 115 210 186 88 164 4 27 163 219 139 90 108 209 155 74 34 18 116 78 30 33 121 214 201 77 220 251 119 13 85 171 227 229 215 168 16 50 128 151 103 221 169 86 131 241 234 96 5 77 25 182 23 121 241 115 70 183 100 42 146 181 125 169 108 93 84 33 189 119 180 156 12 199 94 98 148 53 78 48 116 83 113 131 53 245 193 216 127 81 121 201 252 116 240 177 13 224 15 158) #f ()) #(24 "length of sequence = 2**32 - 1" #vu8(49 50 51 52 48 48) #vu8(49 20 15 179 183 85 213 23 250 102 15 220 91 148 11 166 200 252 182 103 234 99 54 5 199 48 250 71 163 181 44 6 65 130 159 39 93 47 141 155 140 207 161 110 84 97 70 86 29 83 164 209 106 136 191 199 235 245 252 63 129 136 46 158 86 51 70 225 153 68 114 124 205 245 59 47 113 195 10 16 142 242 164 61 186 91 229 51 251 15 5 186 15 243 2 207 24 231 125 45 244 109 144 52 118 169 247 250 191 176 164 232 162 62 4 3 89 50 102 18 253 217 65 25 16 137 153 0 195 152 122 75 89 210 232 173 166 214 219 69 239 127 66 11 142 143 170 194 140 107 155 85 128 109 207 68 240 178 19 112 132 3 91 232 71 90 198 229 198 187 172 103 6 149 48 163 104 146 225 214 191 249 197 148 218 217 183 233 187 96 66 0 201 50 10 191 254 220 142 211 165 104 172 184 232 52 17 230 210 142 5 97 132 135 118 193 143 136 34 161 80 198 138 168 39 155 144 66 47 57 67 43 68 169 248 67 168 67 212 185 112 202 96 139 21 245 76 66 5 126 23 180 6 249 57 219 132 113 19 252 105 73 9 11 32 59 53 191 229 62 63 65 72 55 220 14 45 205 88 213 247 184 41 173 251 188 96 228 26 140 158 212 169 253 21 243 26 119 149 196 251 147 216 143 100 11 32 132 34 129 233 102 9 128 96 238 242 91 46 163 223 77 141 168 184 219 217 69 64 34 190 215 243 53 57 118 19 3 180 107 248 16 179 50 83 239 26 88 135 169 228 23 92 255 133 39 114 16 27 39 209 188 38 110 139 41 36 251 55 145 122 171 164 161 255 204 159 196 68 204 173 70 146 96) #f ()) #(25 "length of sequence = 2**40 - 1" #vu8(49 50 51 52 48 48) #vu8(123 75 189 214 164 70 190 125 95 243 6 23 29 145 170 208 249 78 121 150 192 27 18 242 228 2 239 65 91 6 234 36 131 163 159 196 219 117 95 62 118 103 244 116 191 162 130 223 184 175 48 194 106 86 31 73 155 80 106 154 193 85 0 216 185 148 230 236 93 215 192 182 150 61 234 127 11 241 229 223 94 222 87 64 228 27 143 113 186 111 245 111 234 5 30 68 180 65 223 2 100 215 48 81 78 60 183 78 142 10 197 212 224 190 126 54 33 190 83 164 26 18 193 45 9 102 206 100 197 36 193 111 78 29 208 77 255 48 119 181 14 245 79 47 75 177 218 66 254 121 170 129 209 96 78 243 70 226 67 33 167 217 53 92 126 62 100 216 58 237 253 204 2 3 142 228 131 214 196 111 201 162 41 10 141 117 200 122 197 110 4 218 9 230 97 223 31 106 219 177 221 193 144 135 163 215 169 104 150 203 128 48 104 196 150 237 147 171 24 77 131 119 203 39 112 50 214 39 203 95 137 174 252 87 77 121 148 69 35 34 146 56 45 112 225 50 52 228 52 40 37 206 117 220 8 80 24 120 244 211 210 25 68 44 236 69 197 198 188 218 42 112 4 125 103 26 172 117 147 199 70 133 13 132 145 164 252 159 23 255 22 253 163 65 237 151 206 143 201 211 216 207 216 137 221 117 46 239 25 137 20 196 219 183 134 70 103 74 92 136 218 15 109 188 48 131 221 84 83 165 32 166 142 247 154 151 181 128 184 125 220 123 119 97 39 113 8 238 186 177 56 183 235 115 251 109 115 232 130 127 13 123 127 68 17 19 108 174 62 226 241 114 173 173 107 95 63 227 172 180 120 207 126 194) #f ()) #(26 "length of sequence = 2**40 - 1" #vu8(49 50 51 52 48 48) #vu8(86 237 247 86 243 4 23 115 95 51 67 9 21 124 86 177 145 137 71 245 89 120 230 132 252 152 242 177 165 40 228 95 22 46 164 220 36 99 188 61 234 126 49 224 174 25 168 17 70 137 172 118 70 78 251 47 247 227 162 37 142 217 220 7 77 91 252 71 214 208 249 91 113 239 190 141 189 251 176 207 106 159 63 150 151 133 151 182 226 237 92 92 253 54 90 181 96 116 25 197 41 221 49 83 2 167 83 147 156 146 3 81 226 209 80 31 99 172 43 142 30 48 100 235 117 113 204 79 210 214 175 8 198 166 229 78 172 9 47 128 48 74 206 45 113 125 156 199 94 252 219 113 77 124 134 70 15 115 249 98 255 34 26 118 169 52 90 169 42 23 175 183 250 245 238 48 169 53 18 89 163 4 248 67 13 198 192 99 222 149 71 119 79 29 248 144 117 110 74 121 123 189 31 170 231 242 20 89 64 173 49 109 253 238 228 43 220 95 254 169 188 177 157 211 41 180 248 76 72 49 141 99 71 111 9 248 222 123 136 219 7 99 66 137 237 66 197 70 178 153 139 88 62 25 145 32 146 177 137 90 8 106 125 5 13 254 105 63 54 118 227 253 242 96 0 255 21 104 39 166 188 148 255 72 62 83 26 82 216 75 208 243 186 154 141 60 82 5 44 18 251 115 48 179 24 218 52 218 86 95 20 179 113 68 160 25 96 0 173 150 98 148 131 228 55 30 255 237 1 132 82 230 159 250 76 115 176 39 11 106 59 206 12 118 187 89 66 0 249 146 176 53 234 101 61 84 237 101 178 180 231 11 182 214 245 30 243 124 58 46 251 51 118 148 227 197 70 55 133 141 130 140 87 218) #f ()) #(27 "length of sequence = 2**64 - 1" #vu8(49 50 51 52 48 48) #vu8(158 55 71 3 169 233 78 109 112 143 171 13 148 203 163 117 189 41 74 238 116 184 182 62 214 224 232 57 108 25 8 160 40 75 240 183 155 135 24 157 218 53 177 133 21 120 184 2 108 170 170 238 191 135 158 1 66 173 21 116 211 31 63 155 222 134 127 37 244 179 205 219 101 162 115 36 46 8 236 119 105 140 139 209 208 149 249 42 135 247 119 127 184 101 112 61 231 177 31 146 221 207 141 86 163 48 228 62 43 213 117 204 227 90 234 5 247 161 125 107 46 126 66 10 124 178 246 249 105 7 106 106 150 6 139 70 17 225 226 160 76 23 190 51 58 250 98 22 231 166 143 147 20 48 127 228 154 63 175 137 15 100 18 44 4 223 101 138 249 62 5 38 27 83 115 68 186 163 54 203 192 170 182 255 26 115 235 84 14 255 73 34 205 246 224 17 65 97 239 238 129 120 181 135 92 119 240 200 122 181 137 77 113 213 121 245 32 68 225 51 131 212 116 120 41 116 79 61 137 159 194 39 143 42 177 217 70 150 151 144 191 98 243 213 95 1 90 14 140 71 163 237 39 220 233 164 250 224 216 82 61 238 126 175 23 3 209 242 177 181 218 162 189 241 58 116 254 108 206 221 171 28 126 99 157 247 136 59 87 135 87 154 245 66 155 53 138 132 83 163 37 163 171 87 70 25 11 122 190 236 107 171 193 152 208 198 18 27 196 32 188 65 146 236 60 215 159 172 203 240 42 43 24 141 113 165 255 249 255 248 153 190 129 1 134 17 147 210 253 65 217 250 37 58 226 67 166 222 101 210 95 248 109 226 54 171 103 78 19 245 245 235 199 149 249 92 164 65 90 48 205 58 72 224) #f ()) #(28 "length of sequence = 2**64 - 1" #vu8(49 50 51 52 48 48) #vu8(126 26 243 122 41 1 117 231 25 22 64 216 196 151 193 38 113 76 195 217 14 120 138 150 199 15 210 32 100 133 199 131 195 188 172 148 158 9 219 24 212 99 156 225 210 107 183 172 183 108 63 215 146 42 221 250 163 112 193 29 140 150 19 143 255 85 147 108 98 190 246 27 181 220 67 102 4 103 244 48 57 251 93 105 168 150 78 2 55 69 235 206 66 75 49 77 247 108 233 229 153 154 127 216 205 51 194 210 202 127 98 226 209 203 142 224 179 73 103 79 165 71 105 73 160 2 251 107 225 14 33 242 65 180 34 229 183 168 173 136 137 215 229 36 81 194 97 249 184 63 147 86 234 78 55 220 168 109 236 20 211 113 162 63 199 201 169 158 143 129 84 46 92 170 105 24 115 197 121 72 163 185 179 28 138 32 62 164 110 53 63 77 173 48 241 18 174 84 94 152 87 89 178 39 38 100 38 109 141 247 205 219 136 146 81 200 252 160 6 26 39 211 104 35 65 167 137 182 98 99 64 185 201 164 189 124 6 62 150 208 128 129 176 171 20 55 40 58 216 228 217 92 92 164 129 103 212 164 16 86 82 148 182 87 202 252 86 231 90 202 245 83 214 9 254 2 5 106 32 55 77 60 6 187 116 132 55 58 220 169 91 218 211 157 92 95 32 79 86 233 244 166 137 98 138 127 3 100 188 192 252 66 247 26 135 105 102 151 100 192 36 76 121 86 16 15 174 69 38 200 43 198 45 203 228 123 182 243 125 255 197 158 157 191 223 80 34 94 184 197 131 184 177 97 232 170 60 48 247 14 113 24 31 65 39 88 236 149 97 254 172 63 81 234 93 25 96 197 65 186 25 121 85 144) #f ()) #(29 "incorrect length of sequence" #vu8(49 50 51 52 48 48) #vu8(157 134 117 69 17 218 238 239 159 246 181 161 130 130 0 103 10 26 26 159 124 96 136 150 68 162 76 176 102 76 176 31 239 83 24 35 122 86 135 129 194 111 73 207 157 12 9 74 231 157 243 186 169 234 83 72 107 217 145 10 87 179 255 231 22 95 146 8 189 223 224 71 106 22 238 231 60 216 95 180 31 208 114 112 142 179 72 78 41 90 230 221 28 250 207 45 99 172 38 158 29 198 175 211 77 2 32 48 168 88 97 210 77 143 199 62 204 93 157 111 81 12 36 136 191 0 179 17 209 20 242 199 63 24 212 36 75 180 239 134 140 35 21 115 70 5 248 206 80 34 215 66 0 191 82 12 208 64 216 153 223 161 147 54 127 7 21 27 160 222 65 45 189 206 207 92 202 146 74 230 117 99 24 24 166 140 43 146 168 165 141 83 209 104 225 47 132 229 241 203 176 135 233 116 89 6 137 223 54 28 179 240 36 61 90 63 50 91 219 244 69 106 77 89 145 210 69 255 92 207 141 21 195 70 241 241 94 184 230 174 124 228 228 39 85 57 130 186 56 0 87 17 68 59 74 203 153 197 149 247 211 183 244 101 244 227 100 42 1 107 79 165 209 212 16 143 111 215 174 172 157 18 175 255 231 249 6 25 245 97 98 226 137 162 100 103 96 200 3 244 36 107 245 123 223 235 227 154 167 197 99 184 194 94 104 227 89 150 168 160 104 252 211 227 42 196 211 73 149 207 134 35 230 208 22 192 210 173 34 70 15 122 14 62 232 246 8 176 39 98 62 146 108 54 165 179 80 47 56 175 89 72 75 113 206 104 20 55 85 225 242 188 251 91 108 231 252 6 15 228 128 19 164 169) #f ()) #(30 "incorrect length of sequence" #vu8(49 50 51 52 48 48) #vu8(27 226 54 200 25 209 231 7 138 169 154 176 60 83 52 186 132 196 187 48 237 117 160 93 77 204 229 75 12 48 72 114 11 32 246 159 112 56 128 249 241 239 56 182 81 67 248 56 71 138 255 69 111 175 205 124 124 86 97 143 10 95 104 158 9 216 106 189 227 212 170 242 72 171 230 196 99 32 88 204 81 149 23 161 207 211 215 194 25 170 74 83 170 44 237 177 100 233 56 127 120 154 64 153 185 79 194 52 81 248 85 224 235 117 156 82 43 236 184 211 185 186 158 115 97 62 124 26 22 140 55 142 174 213 255 218 78 96 98 24 77 64 179 64 159 244 45 215 241 209 203 32 165 87 18 47 168 34 146 239 85 19 218 64 161 109 177 212 91 1 33 101 104 49 176 247 33 54 80 71 142 131 95 67 197 225 3 191 102 59 188 224 46 245 227 64 80 202 56 255 239 85 116 210 29 210 18 181 127 101 229 147 54 20 46 203 100 204 88 166 197 27 191 26 202 197 92 138 163 10 119 201 181 217 68 22 172 45 156 137 87 96 4 95 33 144 27 25 219 144 38 170 195 218 114 95 144 175 73 142 16 143 59 15 51 131 255 25 125 209 48 234 66 82 84 215 168 91 93 29 132 54 9 217 37 224 157 154 13 12 166 253 221 13 122 249 9 19 64 84 72 15 216 247 142 168 225 6 72 77 250 190 226 167 38 2 5 218 140 226 169 94 162 164 44 220 157 224 123 12 148 253 70 130 165 116 255 34 202 20 192 51 161 137 5 247 21 92 252 202 153 76 34 196 50 25 21 175 208 20 152 67 179 242 190 116 210 141 58 224 179 1 126 142 234 180 255 197 49 195 130 161 218 188) #f ()) #(31 "indefinite length without termination" #vu8(49 50 51 52 48 48) #vu8(94 203 217 31 9 83 22 34 167 59 182 150 113 28 69 10 185 26 245 140 149 49 57 220 129 253 82 120 117 190 53 184 172 126 55 123 91 223 198 242 204 80 44 11 109 59 30 251 213 183 79 47 203 73 119 154 60 158 215 22 67 26 160 236 191 52 155 29 238 62 114 133 205 211 119 77 185 73 210 125 190 208 142 209 142 207 18 172 36 240 72 101 183 225 23 25 185 97 139 215 112 133 16 110 176 92 217 148 231 105 254 31 38 31 139 117 93 29 71 2 17 86 56 192 96 193 197 196 48 121 2 80 202 113 189 207 16 179 16 93 195 237 132 190 9 237 18 254 18 68 149 105 43 46 216 65 66 157 190 19 130 187 81 52 22 164 136 251 74 167 149 103 52 172 228 85 105 90 100 29 217 151 25 188 37 48 207 253 110 2 189 180 248 224 179 145 231 10 179 57 177 83 101 61 150 136 242 190 235 144 70 234 44 164 26 17 101 73 120 221 129 85 35 134 130 123 141 200 227 93 93 64 31 121 195 202 43 242 225 24 140 53 178 122 175 120 163 110 47 60 2 69 163 181 221 30 10 180 191 96 163 229 193 142 136 59 77 129 16 145 78 8 119 126 70 57 50 205 197 208 26 77 183 33 162 122 153 163 194 207 183 164 151 96 146 67 136 126 178 68 246 250 39 106 10 40 213 58 119 210 139 184 24 112 110 114 249 191 145 235 217 157 53 152 118 27 60 56 251 14 208 196 197 187 50 131 18 119 87 73 150 251 31 70 175 52 207 23 60 113 31 184 30 10 236 5 93 207 25 165 148 164 207 95 102 127 246 65 102 24 14 200 120 61 14 130 113 110 87 97 154 69 246 202) #f ()) #(32 "indefinite length without termination" #vu8(49 50 51 52 48 48) #vu8(71 159 98 46 186 101 81 182 249 117 244 25 191 211 254 95 195 87 211 33 153 216 90 226 125 92 100 169 168 50 242 243 61 217 63 241 250 15 62 148 135 211 242 146 177 166 10 193 35 156 204 86 137 152 245 165 226 253 174 125 160 24 124 207 183 169 29 117 75 35 201 140 52 168 16 1 91 5 15 143 239 120 254 80 242 201 169 158 22 188 147 104 152 165 53 91 6 66 238 21 40 111 138 8 81 167 185 29 57 136 135 89 23 227 144 90 12 38 91 204 127 95 255 2 12 112 159 209 16 73 233 8 235 66 228 170 19 187 111 123 202 171 42 50 86 205 178 245 133 0 113 124 123 162 132 100 85 41 1 68 11 223 76 166 244 203 156 159 174 195 114 245 87 203 131 212 37 139 248 83 128 138 243 91 129 218 118 201 55 175 98 201 38 247 249 99 170 104 115 95 110 164 236 28 72 113 147 205 77 225 127 214 121 169 251 216 237 24 82 124 251 123 184 38 102 53 244 170 102 192 63 49 11 25 174 229 127 211 151 122 118 168 88 183 231 196 5 5 31 203 220 228 173 64 115 216 153 58 27 94 225 107 16 245 187 55 2 172 135 40 192 243 192 200 183 35 227 2 135 253 213 105 127 191 95 8 192 48 241 126 31 249 136 171 113 224 234 133 57 250 104 195 14 47 167 96 241 153 142 91 222 149 166 80 19 198 134 5 122 80 16 92 154 160 88 180 74 105 130 16 77 238 195 29 209 243 147 168 34 58 37 130 129 48 219 1 100 22 96 240 122 95 149 49 186 189 113 223 100 8 113 128 104 128 243 58 43 19 219 68 239 159 176 208 59 54 239 88 162 197 84 81 5 21) #f ()) #(33 "indefinite length without termination" #vu8(49 50 51 52 48 48) #vu8(118 118 15 79 172 231 55 61 205 102 243 248 154 28 249 51 68 192 173 14 240 131 239 118 154 142 38 1 62 5 81 100 28 94 240 3 151 237 161 110 145 0 190 108 226 18 89 234 218 71 91 15 252 178 215 15 252 86 18 80 80 60 89 40 12 99 245 238 90 88 203 92 17 210 123 168 139 241 194 25 228 151 95 62 180 224 46 184 129 145 179 244 8 30 48 139 4 85 202 61 114 154 223 94 145 119 248 55 229 182 39 158 132 206 36 127 111 149 22 65 9 245 21 26 196 186 176 143 94 26 40 117 228 239 22 192 174 145 33 205 75 26 38 1 253 82 164 241 215 66 171 100 32 22 25 4 129 110 67 104 251 126 100 188 143 36 6 81 218 57 194 138 232 31 32 105 159 109 215 28 76 42 61 191 210 16 158 233 115 191 77 246 251 212 131 121 72 94 46 126 246 96 46 107 72 10 127 137 77 51 133 200 13 148 83 25 23 55 81 96 52 189 200 205 147 179 80 23 162 249 115 86 214 112 244 36 188 244 230 100 59 77 41 236 231 56 133 31 181 126 184 86 31 183 38 12 161 145 158 197 201 249 12 108 212 165 214 7 150 174 205 45 40 144 116 18 239 152 108 176 129 87 225 94 90 229 234 152 234 141 253 236 240 207 98 78 101 199 98 160 10 120 254 20 83 160 112 182 223 110 137 215 181 18 133 55 156 216 191 79 62 230 154 26 35 61 12 170 50 78 247 42 30 241 158 91 83 118 64 52 135 184 198 240 213 76 213 194 53 29 8 41 7 176 69 51 60 179 75 86 249 191 179 20 43 136 154 92 252 59 158 102 126 137 113 18 154 33 180 162 229 209 179 157) #f ()) #(34 "indefinite length without termination" #vu8(49 50 51 52 48 48) #vu8(152 147 161 248 10 83 153 219 99 222 243 106 24 1 144 62 4 198 138 34 151 76 55 180 199 126 97 10 203 161 6 127 143 170 111 84 244 125 166 172 104 13 47 148 182 22 124 113 182 246 38 103 157 64 153 41 73 20 197 63 0 252 119 38 60 66 255 169 149 211 119 123 253 164 68 119 202 27 121 6 133 251 39 153 122 184 13 181 14 26 153 173 75 119 220 10 168 176 84 121 255 42 193 88 148 64 71 107 19 252 221 87 18 174 191 209 136 182 230 209 26 243 23 24 65 29 208 158 85 39 86 86 70 114 32 190 142 10 185 63 240 55 150 50 29 114 233 204 211 44 202 85 60 45 175 189 53 40 14 141 42 171 250 138 163 193 17 167 163 77 165 119 133 222 153 14 28 160 238 19 242 17 139 34 119 104 49 5 255 9 254 88 0 251 11 230 8 114 147 147 242 239 73 92 188 196 236 48 191 24 231 242 59 142 129 203 61 94 73 115 234 52 81 250 100 237 125 45 107 249 146 69 119 92 109 140 51 214 35 104 213 201 13 115 185 234 41 32 67 239 175 117 100 18 147 85 230 151 135 230 24 161 153 235 223 117 234 83 191 123 25 179 120 50 118 240 104 207 1 231 68 231 193 63 153 175 179 121 107 108 31 24 200 169 97 240 44 226 177 40 12 102 179 29 124 44 67 197 99 120 35 89 192 220 246 127 28 35 206 188 76 170 159 61 18 159 221 13 172 111 10 121 23 234 197 24 127 1 199 8 179 166 213 57 225 51 214 72 101 150 193 106 214 162 211 39 48 200 89 61 220 195 14 102 206 65 52 94 103 169 43 149 183 232 118 204 108 72 147 11 129 125 92 198) #f ()) #(35 "indefinite length without termination" #vu8(49 50 51 52 48 48) #vu8(33 219 124 121 200 95 50 9 14 42 0 135 213 85 130 152 199 0 196 15 57 166 249 224 143 112 134 11 188 4 45 220 30 152 194 144 0 127 13 66 107 12 255 109 111 50 234 239 7 146 241 10 209 42 184 146 133 139 178 171 81 13 157 93 141 42 43 208 160 199 55 96 44 153 73 209 94 12 103 213 197 77 216 90 76 206 0 53 130 248 146 49 120 105 211 71 9 105 102 32 251 207 11 181 114 214 101 49 109 17 209 73 88 165 142 17 221 251 117 48 156 123 221 184 127 184 81 216 151 15 252 46 206 243 215 245 124 171 148 4 81 88 192 30 163 169 120 67 235 181 66 73 75 143 136 54 134 251 184 63 188 137 162 174 238 89 5 115 187 65 120 136 36 202 73 218 136 47 71 95 65 93 123 182 75 17 62 4 103 20 221 103 219 224 206 199 36 22 185 190 48 71 109 25 126 208 103 93 234 198 20 190 36 237 139 69 17 196 16 23 221 229 190 13 9 225 228 32 30 142 217 244 51 39 218 24 221 244 15 188 224 60 71 127 138 56 49 188 29 34 183 236 114 190 59 73 39 201 5 215 112 102 6 153 98 246 172 138 146 159 129 0 68 220 28 191 221 175 183 99 223 133 150 215 168 25 126 142 112 180 168 24 244 194 22 58 22 144 123 234 215 41 64 191 148 246 79 76 237 90 81 65 220 39 87 214 185 58 28 110 80 52 212 122 94 229 18 249 96 243 127 178 105 209 176 16 43 136 1 172 103 236 163 236 39 166 147 133 68 65 85 64 245 91 28 89 25 86 7 120 198 207 200 198 249 187 33 210 67 141 44 101 185 85 84 66 13 3 139 25 5 224 45 9) #f ()) #(36 "removing sequence" #vu8(49 50 51 52 48 48) #vu8(22 154 29 105 55 108 229 227 127 125 219 121 150 198 106 106 11 202 239 172 110 65 25 60 246 177 193 83 8 172 159 205 187 104 188 230 2 170 187 24 217 75 69 131 2 199 249 97 16 237 218 217 198 24 68 66 133 19 241 13 91 130 250 138 104 91 117 107 210 174 30 44 122 148 218 87 63 75 189 188 196 156 150 87 72 190 187 189 148 251 14 231 73 68 205 39 45 168 30 227 175 111 116 112 149 217 37 98 192 203 55 238 234 235 36 204 170 185 186 194 35 2 196 108 120 70 137 31 93 225 40 106 22 161 189 244 220 247 139 79 148 121 88 144 171 132 181 162 50 229 162 27 116 231 45 93 136 151 133 136 151 32 29 61 179 167 245 160 195 218 110 182 70 89 117 218 121 10 130 113 97 158 207 47 139 20 254 94 217 134 68 31 200 194 110 80 111 64 134 153 184 209 0 187 45 157 199 81 92 17 77 152 69 230 242 154 48 104 0 48 123 80 251 73 49 162 73 244 125 174 88 117 110 19 38 132 174 30 214 25 143 136 23 156 92 151 211 237 252 247 109 135 147 28 201 1 43 35 217 239 212 210 243 48 213 73 235 123 48 172 126 0 182 127 57 200 227 82 104 223 95 18 241 99 227 247 196 89 65 253 247 70 166 83 20 74 61 194 250 179 101 213 39 178 178 112 193 133 224 32 84 94 234 7 239 198 186 240 0 73 173 220 216 56 116 120 122 63 201 134 165 113 192 193 26 76 114 50 181 74 67 139 224 51 37 137 236 181 152 52 141 10 29 193 63 201 49 18 44 191 216 235 77 40 107 237 161 131 41 30 113 60 161 184 114 216 184 49 144 159 188 3 59 119) #f ()) #(37 "removing sequence" #vu8(49 50 51 52 48 48) #vu8(58 151 95 247 115 82 102 114 214 113 56 13 171 32 173 208 0 0 53 212 124 4 204 206 174 120 255 162 151 90 144 100 121 69 180 103 196 227 3 101 207 245 243 167 105 176 83 181 237 5 224 200 121 52 137 56 129 216 150 218 44 113 64 35 57 74 31 188 8 160 149 56 207 200 154 211 72 27 176 56 52 114 172 237 78 125 25 71 196 14 101 160 109 106 220 13 29 71 73 49 153 170 152 26 123 222 130 138 156 69 52 156 232 92 238 176 11 57 120 161 44 115 234 213 166 95 23 223 138 168 93 225 234 135 235 176 190 181 235 157 150 214 174 178 66 145 123 119 122 115 155 248 5 206 73 226 208 242 244 213 17 93 98 27 199 131 150 64 215 245 174 195 164 84 105 88 246 43 148 132 26 30 142 83 229 62 168 32 237 166 104 246 67 53 75 27 221 119 31 178 40 242 14 195 233 104 166 221 83 219 56 240 254 132 124 69 220 104 174 255 185 109 202 68 27 133 24 13 154 179 72 168 164 40 207 226 215 79 35 143 223 114 125 2 228 235 111 82 231 64 218 133 255 239 64 142 181 0 162 122 201 251 20 97 183 218 246 132 245 106 243 165 142 128 55 146 203 226 188 112 24 162 82 95 211 228 49 63 66 17 37 88 172 130 28 209 39 76 6 86 182 90 46 226 233 238 124 33 212 124 33 26 48 24 202 239 121 142 218 104 20 169 192 161 76 3 156 254 178 158 73 92 162 114 240 71 28 243 37 23 189 253 107 195 111 164 120 144 206 73 252 106 72 175 161 60 132 207 118 82 248 238 27 109 145 176 52 142 144 243 128 28 209 159 61 255 26 210 78 165 253 139 98 239) #f ()) #(38 "lonely sequence tag" #vu8(49 50 51 52 48 48) #vu8(92 16 43 181 25 216 49 236 139 55 119 134 29 141 166 229 151 8 65 29 110 39 139 38 78 151 192 228 150 59 110 68 113 23 86 113 254 39 198 75 0 81 29 0 250 124 133 148 64 92 221 14 143 213 198 253 201 151 163 247 134 125 93 109 241 51 118 149 90 162 203 233 49 32 203 190 195 243 18 30 195 64 208 197 43 11 156 204 17 13 25 77 204 1 84 216 238 10 62 176 86 99 58 27 177 69 147 175 174 76 70 25 40 178 32 144 19 183 255 81 108 159 139 84 132 144 252 22 149 181 115 97 253 187 128 105 98 52 38 82 223 137 143 41 118 118 176 160 189 220 152 238 77 53 242 237 133 82 5 174 0 163 186 225 27 220 125 236 50 46 105 230 41 231 52 32 8 182 36 33 153 229 169 15 85 1 7 149 126 45 213 224 55 119 111 59 103 158 71 155 143 56 66 239 214 163 90 50 218 95 32 234 89 234 32 155 62 77 158 82 254 246 195 114 31 223 124 175 92 138 82 115 123 87 59 142 114 34 132 44 107 151 98 62 56 55 141 97 220 70 68 45 221 5 108 239 30 98 82 140 127 88 104 50 168 107 57 240 44 81 107 118 106 218 53 239 214 167 168 133 103 230 24 84 111 251 2 124 168 38 52 58 144 32 73 21 114 177 185 109 219 204 106 163 195 67 9 162 84 173 191 17 18 119 75 108 160 186 72 15 78 147 117 24 93 42 18 180 40 148 60 141 10 173 116 32 133 126 126 156 143 54 74 114 21 181 243 248 156 75 52 92 162 78 214 164 83 88 103 199 184 181 238 208 62 78 240 44 58 217 73 82 37 41 199 137 61 76 162 213 229 205 82 185) #f ()) #(39 "lonely sequence tag" #vu8(49 50 51 52 48 48) #vu8(76 136 50 241 10 127 181 17 65 196 248 2 189 166 128 166 146 32 206 216 8 229 3 121 51 145 27 151 240 23 173 115 145 145 213 241 85 20 233 244 42 215 173 191 182 45 164 238 245 86 78 211 152 6 82 47 199 199 224 148 41 251 175 183 244 140 35 188 251 106 206 102 111 215 100 116 126 43 27 184 179 164 8 173 128 152 60 160 183 148 162 90 46 196 233 103 180 209 245 205 163 199 231 8 241 249 14 254 176 104 223 42 181 59 26 226 121 174 56 80 216 136 42 56 236 44 146 119 42 122 39 215 65 29 80 247 104 179 185 155 131 41 51 156 95 179 117 173 81 61 36 207 42 192 179 0 196 169 1 180 134 174 102 6 41 61 98 47 198 231 96 131 162 150 208 236 165 192 134 51 1 101 157 103 113 76 149 180 139 147 99 30 126 106 166 86 29 141 209 76 1 149 211 130 215 187 96 224 81 31 217 139 33 4 12 172 22 245 120 140 224 150 113 180 159 122 13 147 151 217 105 105 239 62 219 18 185 87 67 10 83 37 1 58 235 159 215 58 223 175 92 207 93 97 14 95 179 29 120 162 114 88 53 35 173 200 153 178 77 171 248 207 21 181 192 66 165 159 216 115 7 145 78 97 114 158 183 44 108 22 17 212 169 156 184 12 212 62 183 47 196 245 51 155 226 39 212 175 214 130 249 102 100 104 237 207 143 110 125 43 165 121 121 40 155 201 27 248 226 165 225 20 199 223 152 255 54 208 227 197 87 145 123 253 147 101 246 97 250 65 127 198 167 88 137 248 174 99 156 140 164 243 29 95 61 135 225 241 113 31 127 54 152 245 16 113 70 203 204 164 245 139 214 137) #f ()) #(40 "appending 0's to sequence" #vu8(49 50 51 52 48 48) #vu8(145 207 236 95 150 68 31 10 5 23 155 133 80 45 141 250 44 65 150 108 191 49 105 78 37 138 221 134 149 17 210 79 24 70 190 228 4 23 151 71 221 23 182 230 169 82 76 227 151 253 205 7 139 220 147 232 180 199 95 86 105 147 50 184 171 6 243 203 184 104 241 230 178 180 16 228 4 156 189 49 197 56 226 70 196 241 79 118 225 43 242 48 218 116 105 42 229 91 192 25 210 78 184 207 68 94 222 217 161 77 90 162 171 162 69 146 7 47 243 185 200 1 150 27 12 124 191 128 55 41 7 85 135 159 43 81 88 254 19 61 199 2 63 210 27 164 226 26 57 218 121 146 183 36 173 226 165 41 33 56 91 108 53 157 152 20 182 43 4 148 229 177 212 54 177 123 243 210 252 193 233 91 95 149 86 252 174 231 216 8 142 128 140 59 165 213 169 44 193 81 143 130 202 36 233 101 158 4 53 163 98 212 161 241 208 51 254 207 133 90 62 111 5 182 121 27 35 34 216 31 18 152 175 92 203 69 136 217 166 198 212 241 164 37 199 47 157 3 79 124 53 216 248 16 62 226 202 10 231 212 218 238 45 41 41 206 111 63 74 224 77 129 131 66 126 160 178 15 7 135 10 196 113 80 63 91 148 105 46 216 9 197 198 223 155 149 51 11 170 61 19 174 138 62 210 30 116 128 241 242 162 186 225 223 159 236 8 42 193 84 39 111 31 20 38 39 189 186 241 171 182 71 3 198 125 151 97 160 47 136 240 225 142 155 255 188 183 212 190 211 219 91 174 142 100 33 217 192 79 188 136 228 58 130 36 149 203 73 210 214 36 69 8 243 16 42 115 43 250 76 192 187 151 15) #f ()) #(41 "appending 0's to sequence" #vu8(49 50 51 52 48 48) #vu8(77 19 185 235 93 163 35 167 225 135 126 54 184 48 254 106 132 235 251 53 166 24 202 83 228 51 120 250 48 124 153 144 3 133 32 223 69 60 149 16 22 171 79 145 142 148 193 161 206 83 50 126 15 154 246 65 13 62 15 194 10 34 237 233 92 194 26 139 129 165 94 220 200 246 74 73 124 87 157 81 7 255 170 11 255 95 190 100 190 119 242 93 71 99 213 70 163 69 22 51 245 147 13 171 253 203 200 76 92 41 240 147 126 252 71 255 251 37 147 10 127 115 118 50 228 133 23 107 120 165 117 83 108 199 82 46 250 125 144 129 122 222 142 106 41 147 229 55 150 174 84 247 70 196 217 225 159 85 246 206 229 49 9 214 105 211 95 7 17 203 30 176 184 53 232 37 123 244 103 42 174 236 46 171 164 160 213 97 29 117 115 1 158 214 108 58 80 100 33 15 24 127 100 229 189 111 52 87 55 231 107 18 227 219 73 19 167 82 221 125 28 160 168 2 118 179 128 41 244 18 7 149 69 197 73 151 193 137 15 159 38 144 64 247 206 155 19 102 12 182 195 72 202 236 174 255 61 201 163 189 143 84 45 235 80 119 26 68 161 117 100 201 146 161 99 190 73 21 22 84 150 31 221 153 117 183 123 71 194 196 181 167 49 215 132 22 147 111 10 244 103 17 108 86 220 89 135 180 46 190 196 233 38 24 72 136 235 5 49 112 184 128 141 186 248 181 142 83 179 41 234 36 175 8 237 184 44 72 246 109 88 196 181 145 23 167 17 86 75 74 136 109 56 224 29 216 50 48 210 12 45 36 133 148 194 138 78 22 166 145 13 57 236 5 212 196 107 84 156 218 186 124 143 241) #f ()) #(42 "prepending 0's to sequence" #vu8(49 50 51 52 48 48) #vu8(121 247 7 102 20 185 104 211 1 54 35 65 36 235 0 33 0 24 90 164 22 3 184 85 48 168 126 86 114 62 54 62 134 110 193 139 43 247 205 105 117 14 172 18 170 237 47 93 60 216 161 116 3 125 27 17 224 253 219 174 130 72 182 149 128 71 244 251 8 54 234 204 127 99 175 159 224 92 119 43 127 216 75 101 128 244 22 10 183 130 57 70 138 169 183 99 130 114 235 59 208 49 53 120 12 255 233 88 8 95 229 113 207 135 44 211 224 99 250 234 198 135 216 92 68 15 216 249 241 176 40 74 71 73 206 34 64 111 61 119 147 24 176 207 152 32 162 38 197 77 194 56 118 1 167 176 172 140 76 117 121 130 31 204 184 232 202 255 177 197 6 236 60 51 144 180 48 143 165 240 211 234 77 15 89 107 37 140 76 65 76 71 246 237 20 50 114 223 17 141 7 89 247 7 181 15 77 249 204 250 198 15 114 161 238 190 72 75 206 70 222 41 171 132 80 243 88 82 255 6 255 134 12 172 87 202 242 13 200 27 159 14 140 124 243 22 103 233 147 192 197 2 165 79 145 40 127 196 210 13 205 60 218 226 44 79 215 60 149 123 231 122 6 90 143 240 64 152 182 231 174 22 107 219 66 89 76 221 156 144 46 45 3 29 74 212 33 218 124 74 125 137 255 133 174 196 160 87 89 250 32 116 70 245 84 8 56 106 201 195 199 74 82 187 217 191 115 192 148 183 165 67 77 207 211 130 42 197 84 168 82 211 190 28 235 150 111 165 146 59 145 126 228 35 90 175 70 36 146 141 86 141 128 242 21 92 36 67 194 19 139 11 250 92 99 183 49 76 32 115 167 46 125 60) #f ()) #(43 "prepending 0's to sequence" #vu8(49 50 51 52 48 48) #vu8(130 63 114 125 118 250 8 230 18 75 133 126 36 250 14 77 147 8 193 139 90 117 15 38 184 3 93 146 78 213 110 47 249 34 110 7 71 204 220 238 107 93 245 129 46 67 45 149 42 147 190 48 55 237 145 148 249 135 186 216 116 152 129 11 64 114 249 135 70 147 179 86 144 191 106 149 117 155 10 217 97 58 186 11 54 236 133 101 211 132 195 69 102 153 49 54 109 25 72 3 118 215 151 51 237 176 150 41 121 29 155 63 123 212 234 211 255 55 150 108 59 155 120 147 30 41 51 160 169 103 41 4 239 145 124 128 152 206 207 48 176 247 161 31 65 220 0 193 40 230 79 165 44 181 104 20 145 251 8 19 81 158 230 10 221 59 135 80 239 248 165 31 170 228 249 106 91 186 199 49 238 218 212 193 27 129 201 241 22 242 168 201 231 215 39 184 78 144 249 248 156 55 254 213 105 171 108 169 225 187 128 82 154 99 97 66 138 111 62 135 184 58 145 34 8 95 240 249 168 31 170 94 87 7 15 202 73 218 163 139 29 89 2 22 255 29 56 225 151 122 83 252 137 68 10 41 233 69 230 24 33 84 174 199 228 58 161 245 144 112 113 91 226 221 14 239 142 55 114 162 199 242 196 75 87 238 42 4 145 174 111 203 49 40 56 253 223 251 223 14 155 194 26 82 217 71 63 250 175 79 233 129 106 39 124 60 34 0 82 142 131 10 194 215 250 52 158 80 85 10 203 23 122 10 54 33 146 75 32 47 180 74 84 46 85 30 198 203 123 167 182 109 184 108 224 118 112 148 232 157 202 30 238 165 234 42 115 46 192 9 149 139 122 197 92 66 0 27 181 222 7 216 153 244) #f ()) #(44 "appending unused 0's to sequence" #vu8(49 50 51 52 48 48) #vu8(83 120 81 104 117 93 183 43 205 59 117 40 233 171 66 71 248 92 36 37 238 101 35 52 133 156 226 94 26 189 178 98 119 21 13 185 170 54 65 205 172 185 80 216 203 67 11 99 138 209 111 146 73 242 160 219 106 88 208 216 50 230 144 27 236 223 78 116 155 206 8 254 206 1 214 196 234 127 228 41 58 102 174 74 227 156 238 229 208 209 44 195 123 132 129 147 151 53 247 165 85 36 37 10 6 24 211 154 251 54 69 225 175 145 251 234 2 20 95 20 49 202 34 95 109 28 74 86 47 180 191 200 197 158 100 136 115 112 229 72 253 151 61 76 11 127 192 216 211 40 30 191 48 84 254 53 132 222 225 53 100 168 129 140 109 241 205 120 131 143 77 162 203 194 244 71 214 115 222 173 106 85 178 123 200 176 40 200 169 178 18 249 71 63 54 28 211 142 139 36 190 4 60 253 42 24 180 47 91 68 70 167 29 76 116 220 231 183 55 22 88 197 51 113 38 116 30 183 7 131 81 45 47 145 185 223 136 147 233 249 3 24 52 135 53 48 8 73 83 99 230 138 53 113 8 252 65 99 72 48 198 125 105 152 157 37 181 211 178 66 115 84 44 231 140 167 45 253 160 55 53 152 225 3 181 73 98 223 210 154 130 63 165 192 20 158 159 44 47 128 234 221 2 178 67 107 120 114 204 95 56 52 67 125 34 162 103 23 150 77 218 68 204 162 89 118 155 248 82 179 120 202 168 121 160 151 24 243 110 53 40 102 244 231 99 70 48 83 25 120 157 134 38 61 231 70 248 124 135 137 244 75 230 73 54 72 120 159 215 134 76 48 187 8 159 107 246 110 198 105 218 140 207 233) #f ()) #(45 "appending unused 0's to sequence" #vu8(49 50 51 52 48 48) #vu8(95 181 142 255 181 212 106 103 184 139 82 206 179 14 207 40 94 38 78 184 241 121 246 51 199 211 200 127 4 1 87 78 215 54 90 229 160 47 173 20 55 227 198 206 27 250 3 152 111 15 147 2 75 223 60 240 224 79 8 116 31 92 128 50 9 29 88 202 138 201 39 133 163 26 249 100 212 153 238 213 53 213 205 20 174 251 97 80 129 70 50 30 69 250 10 199 74 76 59 180 205 26 91 146 31 51 104 166 94 184 223 93 136 122 227 3 250 122 69 49 160 126 82 42 112 101 97 141 29 167 92 218 102 86 77 236 51 32 40 10 118 154 103 48 21 135 12 63 4 165 44 1 235 110 49 215 66 80 51 150 19 187 59 57 230 123 195 62 221 69 19 11 80 5 145 143 49 220 162 49 205 226 167 229 226 125 132 241 137 137 139 83 125 120 190 204 152 63 30 0 18 107 33 243 249 71 218 171 145 2 98 62 50 99 156 158 124 102 198 9 156 161 198 155 74 77 36 160 197 103 152 186 248 97 108 141 66 69 203 247 178 215 178 18 185 251 124 123 253 74 73 181 188 28 240 61 218 95 105 199 73 10 142 128 71 50 136 199 173 174 2 120 154 180 150 106 227 180 205 251 254 58 13 177 152 157 30 57 45 144 219 221 181 44 97 155 84 227 226 133 90 21 7 242 195 20 229 242 105 243 147 67 8 243 174 244 155 166 30 22 240 171 255 109 61 24 23 175 184 44 9 124 155 239 34 205 67 158 113 116 128 189 248 93 125 231 94 144 59 58 34 6 10 220 136 219 221 155 133 78 215 39 182 216 111 1 226 3 201 141 153 161 162 45 173 145 132 42 68 79 127 129 168 148) #f ()) #(46 "appending null value to sequence" #vu8(49 50 51 52 48 48) #vu8(122 135 6 125 178 91 155 17 59 102 235 222 152 45 111 182 140 181 151 42 35 84 6 26 100 159 191 166 137 139 166 227 158 210 162 6 239 9 1 165 253 45 4 172 37 14 11 17 130 192 180 130 10 125 54 202 232 42 23 216 73 182 180 131 197 99 25 43 232 227 190 92 222 217 55 180 168 237 52 140 173 139 22 18 23 111 22 111 214 76 79 154 211 55 73 78 6 2 198 112 123 185 251 13 139 201 139 18 244 252 7 220 226 142 28 156 63 121 125 24 115 240 145 211 36 79 242 216 1 159 4 220 88 38 170 227 107 63 20 105 22 250 27 74 223 242 195 66 194 133 16 141 240 122 146 178 83 159 219 197 104 251 1 179 17 12 70 87 116 191 30 125 177 66 15 234 108 44 89 217 225 20 42 156 226 163 241 78 54 243 3 118 221 37 236 85 166 106 22 170 83 224 65 13 202 50 77 230 145 114 139 217 165 50 231 167 61 68 102 196 92 90 63 43 76 201 231 155 165 150 84 120 240 81 144 80 66 39 55 112 58 84 37 45 161 201 14 99 68 218 209 177 241 16 7 86 180 33 118 92 172 115 218 20 216 77 133 124 241 19 7 150 187 151 186 204 87 68 46 162 242 80 112 176 186 252 226 52 184 106 91 198 159 46 194 155 238 118 122 138 253 182 229 150 235 37 96 177 65 254 41 236 215 161 17 36 134 98 203 255 222 242 80 11 158 156 16 237 66 38 129 29 153 100 142 58 63 138 176 201 242 239 111 121 251 230 29 159 35 203 47 232 30 121 4 51 68 128 136 114 229 13 129 209 189 29 226 17 212 49 50 111 188 188 245 163 97 69 246 38 226 171 2 29) #f ()) #(47 "appending null value to sequence" #vu8(49 50 51 52 48 48) #vu8(55 16 137 28 27 198 9 215 211 26 88 221 80 148 247 11 67 77 95 241 211 125 58 175 163 206 49 57 92 208 129 157 148 215 68 235 13 121 217 66 240 198 93 166 96 107 226 168 154 35 137 84 98 47 94 109 14 153 58 128 255 98 55 8 181 24 108 236 190 154 33 236 74 181 147 169 95 228 108 247 53 71 242 91 10 44 137 83 193 223 239 58 30 80 195 122 114 82 22 190 158 236 80 137 90 98 245 54 251 201 207 68 129 18 101 108 199 117 80 107 121 167 226 109 214 191 144 229 241 229 62 13 124 26 63 34 226 192 134 191 145 106 167 47 52 85 222 198 201 155 114 13 86 178 248 12 254 85 180 163 231 148 79 86 133 57 16 105 142 108 217 116 193 148 104 223 15 192 225 164 64 138 44 30 207 226 57 103 42 126 16 74 149 184 247 169 219 251 254 77 83 138 226 75 28 118 207 188 222 235 49 194 124 73 235 85 214 213 211 36 127 210 65 30 250 102 216 224 165 61 157 0 183 101 65 38 90 0 185 238 13 113 232 154 56 246 63 249 179 22 157 202 101 21 134 2 239 180 250 112 65 155 60 126 22 23 163 61 241 58 222 236 180 107 17 76 138 150 255 142 112 235 34 49 206 143 80 199 133 240 179 163 251 79 186 151 238 178 94 171 35 17 95 113 166 80 24 162 44 14 221 195 191 125 49 183 89 133 116 255 223 13 43 175 156 35 198 96 73 66 67 144 123 147 236 203 63 51 91 238 128 51 79 69 114 195 213 229 126 193 117 63 209 12 118 76 244 166 209 181 171 217 156 78 200 68 251 26 193 111 184 69 1 187 15 140 219 117 41 103 115 82 56 33) #f ()) #(48 "including garbage" #vu8(49 50 51 52 48 48) #vu8(4 77 91 106 23 108 135 243 182 5 226 34 189 158 42 240 99 83 150 247 60 210 219 117 96 232 66 178 139 92 149 110 183 77 210 170 70 205 217 71 106 207 63 246 237 208 46 13 24 1 163 233 127 137 192 97 26 59 237 119 50 33 126 215 200 253 137 10 131 25 190 21 157 193 3 139 45 242 137 151 204 49 237 176 143 100 217 197 255 132 228 205 99 16 8 89 175 165 214 197 74 218 61 57 54 56 100 229 62 209 110 186 160 217 93 241 168 175 25 193 27 35 100 32 119 91 253 12 28 99 242 93 113 176 141 217 122 2 52 105 232 77 38 93 23 206 23 202 241 67 69 159 53 227 216 241 128 31 100 186 140 151 205 171 119 85 108 31 52 172 87 15 25 71 163 117 246 47 198 196 195 221 176 67 99 198 69 95 245 7 23 248 203 222 255 85 8 124 131 110 202 158 220 121 151 109 31 20 196 11 60 76 93 172 12 87 154 100 196 10 38 9 45 6 46 26 140 43 79 198 58 3 210 26 188 172 174 106 15 175 39 77 182 161 216 47 250 85 235 39 35 84 183 80 126 0 40 238 176 190 242 250 218 174 3 184 45 72 138 180 80 225 167 56 157 228 177 247 63 190 50 29 141 228 140 145 24 104 149 7 186 59 223 101 129 144 117 35 34 47 120 32 184 95 96 28 251 230 182 178 151 113 20 109 174 52 222 227 215 167 189 108 120 70 28 84 76 129 220 30 150 44 125 120 254 80 223 153 141 227 48 138 76 44 254 104 227 191 120 8 50 145 240 68 52 155 193 34 10 123 150 158 122 46 119 58 155 197 126 53 157 8 38 209 92 232 236 9 173 34 240 59 242 200) #f ()) #(49 "including garbage" #vu8(49 50 51 52 48 48) #vu8(50 14 43 23 145 115 86 37 167 132 108 197 96 80 239 130 88 236 75 174 245 229 174 142 105 190 187 235 74 119 116 7 120 10 155 227 86 104 122 161 60 159 92 4 246 112 68 197 165 177 15 251 23 201 87 67 96 198 151 183 47 210 246 71 163 59 15 85 134 127 203 190 211 17 188 93 118 190 153 138 146 105 111 55 230 185 159 39 238 68 141 16 224 221 23 255 230 245 247 240 114 98 241 42 132 187 143 83 159 99 168 95 191 83 12 254 28 217 177 190 28 152 218 41 110 119 187 175 173 108 255 52 221 85 158 8 58 64 237 18 255 72 57 231 161 24 184 211 241 162 168 132 67 114 114 189 148 114 197 111 7 250 140 194 159 62 20 217 6 192 54 34 181 91 14 156 205 124 248 220 250 180 220 90 178 191 177 88 252 22 103 187 130 53 76 25 136 56 8 221 230 199 46 153 83 33 65 54 99 219 208 27 47 204 224 244 237 22 56 175 246 114 174 175 44 130 211 126 202 13 197 164 236 112 195 36 149 43 113 211 125 8 199 239 48 248 132 195 100 193 200 85 36 100 112 16 170 225 27 104 135 229 242 200 106 175 199 166 194 52 50 235 76 143 87 227 95 82 158 239 128 106 209 12 57 163 47 101 1 154 37 224 66 82 190 31 121 93 23 72 120 204 154 252 196 220 174 221 115 248 8 13 195 184 18 81 107 73 167 109 123 108 91 41 96 238 68 198 221 78 142 205 176 241 95 153 157 156 69 127 107 202 0 131 243 138 173 106 128 167 175 47 70 216 156 241 37 231 245 92 117 81 30 76 217 212 98 214 196 168 200 36 138 3 187 20 165 245 57 135 193 201 51 91) #f ()) #(50 "including garbage" #vu8(49 50 51 52 48 48) #vu8(8 164 129 153 239 124 35 190 48 40 127 164 200 182 198 62 241 147 101 180 82 159 32 121 236 16 48 63 139 170 113 154 240 22 83 37 147 51 100 1 249 59 146 42 23 167 96 121 139 17 54 74 187 70 58 146 115 147 107 74 0 5 185 236 185 101 134 48 232 132 124 94 78 247 133 196 79 242 206 8 50 196 202 37 225 89 90 84 238 166 33 23 140 125 218 39 3 47 254 191 61 201 238 39 117 154 10 1 64 14 54 184 114 73 181 140 133 67 149 234 91 248 49 192 141 66 182 154 87 171 191 251 171 234 148 60 93 69 13 250 160 82 34 249 168 32 98 177 3 39 124 167 81 233 147 82 200 86 30 126 223 1 101 75 245 126 190 253 138 90 77 238 175 169 226 170 0 85 208 45 115 195 206 67 177 200 105 69 19 233 139 73 14 206 145 129 232 61 160 250 154 226 195 46 113 226 125 201 95 109 245 245 203 120 209 174 41 123 192 68 183 49 93 43 3 209 223 120 106 176 172 85 2 47 174 92 81 189 239 205 151 239 212 213 240 204 170 20 195 244 41 209 100 7 124 35 50 13 162 196 125 147 106 8 65 244 1 238 224 170 24 211 103 122 188 25 112 144 94 218 166 132 93 230 45 139 81 22 111 234 140 20 150 52 198 75 126 85 46 67 4 57 41 33 73 45 131 182 36 217 23 246 218 116 65 236 101 12 118 216 64 74 104 81 186 22 204 105 25 40 182 66 53 78 145 83 92 165 190 106 99 109 82 69 148 171 225 213 50 104 101 33 100 160 117 47 182 189 133 95 240 226 241 111 7 63 148 141 254 29 104 113 80 206 252 205 23 223 128 101 191 18 100 233) #f ()) #(51 "including garbage" #vu8(49 50 51 52 48 48) #vu8(73 134 65 164 9 108 209 46 228 214 138 185 245 192 176 189 236 53 136 85 143 177 42 75 74 218 191 48 189 92 232 215 87 52 48 120 254 31 100 248 63 115 217 3 157 117 200 243 122 25 119 207 199 187 143 219 205 148 253 161 237 170 56 43 74 14 155 20 46 142 249 228 161 1 131 125 217 106 158 52 72 190 41 45 75 78 197 150 129 7 106 227 246 222 59 219 213 93 223 45 128 181 74 157 130 21 47 254 237 1 4 60 42 92 14 53 90 227 104 220 208 188 102 110 180 104 114 160 161 74 86 229 99 69 189 188 220 149 146 200 78 215 60 166 24 158 52 10 133 193 31 142 110 238 6 76 217 224 226 161 204 69 102 226 209 66 243 247 190 170 194 247 59 154 5 92 113 141 83 234 213 83 236 82 55 43 198 113 37 75 0 246 221 139 36 207 109 37 169 101 183 66 150 142 80 19 66 27 113 67 78 198 47 187 220 253 134 248 93 180 164 254 25 151 55 159 33 168 155 123 26 165 205 188 19 204 39 190 41 157 78 148 136 233 56 206 125 18 162 181 196 67 4 125 51 136 116 138 59 149 94 49 113 62 227 172 249 162 118 122 202 222 165 79 31 122 114 141 15 60 247 48 190 30 10 14 199 198 174 138 97 250 74 138 61 21 96 249 122 184 130 162 61 32 230 234 123 236 166 45 145 208 11 130 90 41 41 188 3 111 196 181 123 223 202 58 108 191 192 42 183 132 90 85 18 143 39 254 28 15 243 133 181 192 63 212 42 255 143 142 136 72 12 140 79 76 145 35 33 154 188 232 76 206 124 147 107 0 22 250 129 22 186 78 98 104 114 30 93 253 145 24 204 255) #f ()) #(52 "including garbage" #vu8(49 50 51 52 48 48) #vu8(51 178 1 211 176 246 109 41 229 250 200 91 203 20 48 197 112 167 86 61 57 213 145 220 139 247 203 165 86 106 109 113 6 213 42 104 44 219 19 94 82 8 13 241 116 212 118 208 183 51 233 253 55 110 52 88 26 143 247 30 125 231 168 156 9 224 63 18 148 56 79 57 32 221 82 129 209 57 165 217 57 144 44 93 32 30 151 94 6 23 59 6 224 240 45 187 198 157 177 105 99 166 127 111 77 174 154 128 253 90 75 7 150 245 63 182 214 95 57 252 156 173 104 5 151 131 73 30 55 146 139 71 124 13 181 120 209 10 21 154 181 176 21 106 73 243 1 224 35 232 87 118 54 46 28 49 73 204 156 85 19 173 249 80 82 89 191 146 39 60 137 34 153 72 16 188 44 36 120 56 180 103 43 135 39 146 198 23 16 155 244 107 252 20 118 142 11 183 219 76 238 253 169 153 123 37 62 121 71 38 5 192 72 207 234 162 191 116 62 75 16 161 33 129 12 42 89 95 27 81 120 11 49 72 76 126 129 178 50 79 196 32 130 36 14 31 136 105 147 43 171 169 24 3 246 51 178 175 237 127 132 2 251 117 140 223 146 143 177 200 249 165 66 22 98 228 224 134 131 129 0 171 63 171 184 232 51 153 158 228 15 97 233 216 231 184 240 46 50 7 147 10 19 31 76 111 161 184 144 180 12 39 225 129 75 90 96 111 49 152 144 42 238 245 95 209 159 50 120 65 209 135 60 6 102 219 46 51 186 70 83 71 2 21 119 61 137 237 107 221 90 200 164 136 157 115 15 59 203 126 92 87 238 176 212 141 63 91 98 15 208 47 131 126 163 38 41 193 181 215 71 243 139 76) #f ()) #(53 "including garbage" #vu8(49 50 51 52 48 48) #vu8(88 143 130 170 180 19 186 91 3 116 143 233 88 125 52 185 54 76 65 147 108 133 17 160 43 110 49 215 44 231 176 246 40 68 37 42 152 178 239 43 234 177 128 107 1 34 92 147 143 205 90 135 135 120 179 72 212 80 133 174 250 2 51 81 83 188 170 235 213 144 113 217 144 152 219 131 160 214 3 65 11 69 232 243 181 107 73 0 253 35 231 51 54 115 112 190 43 10 220 62 175 60 176 185 168 223 211 98 250 193 12 128 240 89 207 63 180 113 185 8 208 88 6 234 81 46 233 90 214 29 144 240 83 102 153 167 15 227 1 98 68 211 40 255 61 172 213 183 115 177 130 136 100 143 133 198 203 57 87 54 218 226 183 165 44 67 88 159 158 67 204 199 108 97 166 209 192 54 16 36 152 8 9 78 10 69 222 27 144 218 161 196 201 247 121 189 16 156 244 48 14 76 169 38 53 101 190 68 227 56 218 169 38 111 147 102 161 154 218 182 56 6 9 55 185 218 49 113 112 236 99 59 143 143 58 83 226 131 246 122 195 93 239 75 24 103 158 132 229 159 157 38 39 67 199 43 199 70 154 16 207 139 149 63 124 16 252 98 174 142 9 90 101 150 72 65 180 245 58 21 46 37 17 8 156 131 161 105 96 173 31 18 245 44 213 134 119 117 226 232 13 28 48 190 15 116 146 173 152 50 140 34 200 207 91 106 168 73 133 234 12 30 114 77 58 126 197 81 243 245 20 67 35 148 139 186 186 143 26 54 13 39 156 93 181 191 133 182 64 173 118 231 49 150 59 249 218 171 101 58 246 190 39 225 251 222 65 68 252 49 35 80 229 33 32 142 136 77 206 24 67 107 210 190) #f ()) #(54 "including garbage" #vu8(49 50 51 52 48 48) #vu8(55 19 9 114 248 157 44 62 232 123 149 4 147 138 98 68 133 190 218 188 61 186 4 220 55 239 178 120 185 192 82 200 11 184 230 1 193 137 186 43 22 206 1 111 236 62 75 83 191 87 53 13 240 15 155 82 137 78 242 208 118 177 179 78 67 175 244 215 178 208 159 239 102 187 247 59 159 251 205 152 101 154 253 78 183 185 107 234 78 249 154 30 48 60 229 80 226 132 37 34 245 18 170 44 51 22 116 123 28 74 19 117 10 12 152 70 117 116 98 120 236 21 123 195 164 131 155 77 129 88 77 156 3 215 125 144 127 71 52 73 47 6 128 238 251 153 139 201 23 195 137 52 16 81 100 171 182 92 218 171 134 139 59 41 155 54 188 166 44 160 229 227 108 122 136 23 31 111 141 234 93 227 46 93 18 115 49 223 154 6 237 174 255 96 10 71 128 39 59 88 230 238 188 185 213 195 145 246 43 144 141 205 19 153 38 77 43 244 40 223 157 134 29 91 196 149 90 129 125 23 98 201 199 15 69 88 161 74 151 137 124 113 7 156 118 231 55 114 60 52 67 233 15 68 181 181 231 180 30 192 232 190 214 78 220 206 128 197 106 163 192 161 165 32 95 64 205 79 234 104 112 126 189 233 233 97 238 251 14 212 122 90 177 226 31 215 149 77 164 3 254 110 113 54 154 219 58 226 242 248 171 156 32 169 27 41 130 9 193 41 106 243 2 9 28 234 186 19 115 177 66 162 47 195 35 245 136 117 117 36 136 76 92 50 103 225 194 245 158 212 160 29 9 100 41 129 71 247 59 124 235 221 163 126 223 70 67 220 226 245 181 95 20 226 196 24 98 20 25 251 228 193 99 32) #f ()) #(55 "including garbage" #vu8(49 50 51 52 48 48) #vu8(80 59 191 8 0 214 161 20 66 229 97 39 133 137 234 101 19 52 222 242 39 177 156 214 54 41 42 108 98 125 105 44 82 163 106 28 82 111 88 16 226 150 131 30 76 4 36 108 217 213 18 46 71 148 10 106 247 8 194 227 109 116 3 197 194 180 175 249 121 61 175 77 220 108 161 34 57 102 4 119 254 237 54 163 204 232 85 195 123 70 177 193 134 89 203 15 57 223 1 163 42 183 247 196 176 168 162 209 245 210 201 186 231 56 165 207 62 28 147 153 244 228 217 0 142 135 203 20 57 48 207 34 157 253 15 97 152 120 127 156 220 128 224 45 104 243 78 247 233 229 147 106 234 3 95 28 58 230 126 17 249 65 247 3 113 103 0 57 181 163 218 55 223 86 239 135 226 90 56 56 173 41 233 145 159 30 251 45 164 52 98 142 128 197 249 93 92 57 231 129 195 189 64 99 131 74 161 238 153 193 61 9 146 116 89 202 178 92 213 2 10 48 77 11 51 100 233 132 139 165 206 133 42 132 16 41 212 47 244 214 66 8 168 163 182 91 129 206 134 243 173 96 190 33 214 108 117 18 29 81 71 26 66 113 227 70 55 203 178 162 94 19 34 26 49 12 55 100 101 230 218 220 206 128 100 41 243 101 100 209 184 109 108 92 222 86 17 233 37 122 158 233 140 110 197 79 9 209 30 22 86 44 211 221 115 22 244 225 49 36 227 117 125 69 218 250 144 42 1 191 4 249 48 60 185 207 134 242 53 23 237 225 53 8 50 195 118 139 185 66 50 253 147 181 200 195 140 75 198 28 13 218 170 36 195 86 140 53 41 100 166 84 92 102 20 208 255 206 246 250 246 88 253 12) #f ()) #(56 "including garbage" #vu8(49 50 51 52 48 48) #vu8(7 88 93 211 225 68 104 243 39 243 218 125 64 30 90 210 254 212 188 23 211 171 174 215 168 129 148 243 233 168 243 249 94 73 133 43 175 254 62 143 101 25 45 77 148 111 206 215 12 162 191 174 199 229 4 105 103 130 81 224 132 128 243 40 86 230 10 70 188 11 204 151 76 224 18 81 197 85 167 85 61 159 131 163 177 156 249 75 189 125 159 243 159 174 84 187 79 229 82 173 201 44 71 20 26 173 102 252 176 230 94 162 144 2 34 144 248 215 148 77 84 198 53 2 192 136 160 201 122 204 161 34 205 228 131 5 88 95 22 36 120 212 79 66 171 9 63 56 40 13 98 210 158 221 253 167 92 148 209 234 211 79 36 14 30 47 60 187 116 116 73 81 142 246 210 51 141 47 101 217 93 244 117 54 82 241 238 44 197 90 225 12 255 210 100 106 184 35 205 88 58 121 100 225 191 95 152 48 163 176 42 191 0 211 20 52 49 84 130 62 83 109 97 119 116 236 96 93 178 204 202 172 222 95 185 187 195 214 138 190 245 76 106 149 163 63 189 205 118 181 180 54 56 203 46 48 204 33 49 209 251 213 214 148 97 70 157 51 105 124 3 78 23 149 230 238 215 95 222 27 32 247 38 93 204 212 220 123 169 13 243 254 215 53 102 12 248 65 66 4 12 235 40 135 182 98 170 38 14 40 127 188 150 141 52 136 88 194 63 168 144 140 108 176 73 144 106 201 6 95 207 58 117 95 144 94 145 242 221 8 213 175 3 48 132 199 63 112 91 208 228 111 200 100 193 109 166 168 116 108 117 226 165 61 150 131 14 136 97 169 117 69 130 51 218 224 234 244 48 132 182 218 82 5) #f ()) #(57 "including garbage" #vu8(49 50 51 52 48 48) #vu8(49 113 13 180 9 148 60 76 222 243 100 176 232 245 18 103 215 1 23 14 198 128 19 15 149 151 19 183 209 72 101 103 51 228 39 102 86 255 135 10 146 128 181 148 243 238 80 228 94 239 42 2 59 63 242 215 83 115 0 10 74 199 125 170 120 156 252 67 129 103 209 125 144 7 237 108 103 255 63 160 71 241 101 165 97 152 46 240 146 75 220 33 49 168 73 149 233 208 57 147 94 229 63 229 143 226 38 202 33 246 245 30 98 208 30 37 113 101 166 71 196 117 160 105 219 86 143 138 235 193 100 248 127 151 3 110 45 89 37 220 118 58 32 228 203 59 222 78 138 242 207 65 26 157 78 245 215 22 196 174 32 119 195 3 138 198 213 155 238 96 50 102 184 119 252 112 17 211 169 85 53 240 194 105 22 135 230 47 13 130 88 125 138 191 218 39 98 148 104 90 88 59 185 136 149 202 98 197 155 229 1 171 17 201 20 54 31 197 56 234 36 51 61 37 163 14 110 87 208 125 173 65 97 164 89 229 250 31 210 201 176 141 45 40 139 61 197 204 68 240 236 203 115 109 78 71 118 109 248 161 36 149 159 226 130 116 87 236 135 119 216 249 136 82 219 129 60 70 18 175 210 17 221 243 126 110 34 74 190 214 19 35 113 129 83 177 177 143 0 160 70 206 153 212 84 90 87 84 97 49 12 236 56 5 237 207 232 231 47 145 109 65 71 168 245 178 113 21 194 88 93 187 165 88 206 2 130 254 184 198 165 176 81 217 99 155 47 33 252 6 29 32 91 40 238 17 1 106 174 135 228 47 6 114 248 90 15 177 172 179 236 222 192 194 113 173 78 216 149 164 240 85 153 213) #f ()) #(58 "including garbage" #vu8(49 50 51 52 48 48) #vu8(159 204 97 37 131 184 168 177 9 140 176 157 20 33 199 37 144 112 68 128 78 125 5 96 107 120 138 190 207 52 232 14 199 126 160 238 189 236 105 112 169 71 253 86 147 24 18 53 125 100 157 237 202 81 17 221 142 28 28 162 21 69 196 28 200 201 105 234 178 97 88 0 25 87 231 231 248 72 203 97 136 47 247 24 46 48 241 130 102 0 247 170 18 26 193 57 253 212 152 7 114 112 127 217 18 160 8 204 114 192 2 55 139 34 247 43 56 190 164 252 195 9 186 228 56 133 140 90 39 10 129 211 22 51 179 161 73 9 53 16 176 187 136 84 7 190 27 250 18 130 86 250 204 239 67 181 132 57 11 141 180 218 223 140 62 226 51 42 188 92 130 241 164 74 171 138 99 42 19 163 176 71 204 144 244 205 237 50 138 250 188 226 26 97 249 199 77 58 226 9 227 95 200 165 234 207 89 73 91 164 220 213 153 188 79 40 46 37 82 124 195 81 92 163 198 146 95 191 62 131 248 175 227 123 95 73 108 238 118 47 241 213 171 88 203 6 197 73 167 108 24 26 28 117 182 3 48 218 199 17 64 62 64 245 203 147 76 51 212 226 162 173 25 68 4 26 47 198 191 159 6 164 8 15 122 77 27 154 173 212 87 156 137 101 123 244 236 111 140 253 116 162 134 180 134 117 229 116 204 42 203 245 98 49 47 201 219 69 97 105 158 69 116 31 166 34 117 118 178 250 121 3 26 150 168 229 101 31 219 86 133 135 139 113 91 169 19 245 154 190 34 236 227 58 34 71 148 215 135 107 40 152 145 14 137 212 255 191 47 249 83 133 173 65 219 60 255 204 96 188 228 1 159 98) #f ()) #(59 "including garbage" #vu8(49 50 51 52 48 48) #vu8(59 198 180 221 188 21 45 247 254 50 85 154 131 39 245 222 85 48 4 111 188 20 254 226 173 79 249 66 221 211 71 113 154 131 9 131 204 220 185 63 99 231 40 73 51 10 92 180 241 176 222 116 245 98 120 238 120 186 31 193 137 26 15 87 44 118 148 211 195 11 245 56 222 204 199 195 60 45 200 99 100 89 39 204 61 252 179 112 156 254 220 208 4 84 226 109 234 176 93 54 163 180 16 223 71 247 60 36 193 227 39 17 20 180 66 245 73 117 21 176 179 39 57 207 143 207 248 108 44 224 30 13 121 32 44 230 211 109 237 32 71 208 7 8 142 21 0 177 148 31 247 47 0 84 126 21 172 82 219 139 3 244 249 5 130 193 159 177 115 96 160 53 83 5 80 112 3 171 195 103 103 89 131 251 197 34 161 189 120 123 62 60 243 228 70 131 9 155 127 4 207 206 62 90 245 61 135 182 169 148 91 169 112 160 205 36 58 196 174 147 237 174 132 250 202 177 95 163 227 254 14 73 167 113 48 88 81 197 31 103 112 2 254 193 38 237 120 1 196 43 212 179 44 76 65 11 243 190 31 244 57 198 192 101 154 31 175 130 100 182 82 243 65 138 192 220 106 223 191 103 178 193 114 90 164 171 59 211 111 53 138 34 73 180 161 120 79 201 101 202 241 249 116 61 167 85 80 16 140 17 147 201 183 231 101 12 27 162 238 4 151 235 200 164 66 131 241 88 155 206 21 165 184 92 135 255 62 171 152 11 190 24 237 129 77 110 232 187 97 38 220 110 180 22 102 55 23 136 54 198 210 236 99 170 51 47 109 68 148 133 83 97 179 213 31 69 4 82 22 142 75 48 128 140) #f ()) #(60 "including garbage" #vu8(49 50 51 52 48 48) #vu8(100 206 189 116 136 5 44 226 142 10 49 97 172 147 190 181 142 115 185 240 84 1 144 149 210 104 104 26 66 172 194 196 87 156 192 189 98 138 120 107 5 39 135 72 82 67 167 99 193 248 128 252 25 174 65 204 253 112 245 231 177 177 7 36 78 135 140 49 139 17 66 99 59 180 254 16 153 150 39 49 99 192 147 195 78 51 201 219 69 214 26 154 56 220 255 85 196 55 85 68 1 143 85 91 77 59 101 206 118 76 68 158 16 86 178 136 197 151 148 117 166 172 72 162 23 24 56 93 23 4 39 93 199 189 149 83 92 11 53 30 96 176 107 105 73 254 175 126 97 90 65 202 17 31 211 144 252 195 221 23 44 209 163 100 47 57 41 166 28 34 143 138 53 174 244 189 159 79 219 173 205 30 97 172 167 192 210 240 172 244 0 60 80 77 151 154 160 101 190 66 247 105 129 13 155 187 81 94 159 94 213 36 211 136 202 34 232 10 48 8 90 56 191 204 204 115 72 247 134 176 78 141 18 221 173 213 28 26 69 11 17 163 165 52 83 99 202 120 158 6 16 104 67 108 221 14 154 164 128 209 249 252 20 63 107 254 34 165 148 6 131 153 116 108 73 68 14 149 138 67 78 51 19 106 74 18 10 49 79 143 97 124 61 12 133 109 196 66 179 202 83 128 159 236 104 102 82 190 207 203 128 60 206 169 162 22 213 16 156 32 140 131 79 49 82 157 5 27 76 81 85 158 190 160 181 48 83 33 137 87 137 243 217 208 200 14 70 234 19 229 208 151 148 135 163 183 90 230 211 3 76 66 78 217 74 96 156 142 237 219 241 30 145 216 192 18 69 155 173 247 91 189 179 253) #f ()) #(61 "including garbage" #vu8(49 50 51 52 48 48) #vu8(155 56 168 247 60 235 139 166 112 15 200 127 100 239 36 230 171 119 86 149 80 137 136 183 115 22 144 57 223 211 81 113 232 225 22 25 196 96 244 49 129 106 117 183 246 159 166 147 137 25 167 115 180 137 197 60 173 36 49 133 205 14 9 181 232 156 170 239 153 156 147 208 118 124 5 173 194 96 52 218 158 69 239 67 144 134 29 223 174 69 188 65 206 84 166 245 23 89 7 147 86 219 5 53 44 127 33 121 32 2 111 5 69 232 114 113 12 162 76 31 113 103 217 214 96 186 17 136 235 66 100 139 160 123 136 181 169 231 152 61 73 129 157 226 88 23 176 252 139 149 198 227 221 99 158 128 221 159 94 207 48 59 125 157 111 61 199 81 36 108 141 151 25 213 55 160 114 236 181 129 134 122 123 144 201 47 145 229 180 100 5 4 14 174 56 105 110 132 73 91 18 131 117 110 118 158 229 136 79 165 139 219 35 37 203 64 153 53 74 89 225 145 20 72 16 162 79 127 47 41 190 217 39 123 122 3 250 198 178 42 185 216 123 171 98 170 7 106 218 27 221 118 46 0 209 250 37 53 255 195 226 158 139 21 240 124 86 215 231 13 101 253 75 139 118 28 247 218 198 133 12 210 92 78 143 200 32 157 255 57 1 134 37 127 14 82 42 124 76 206 159 194 168 1 71 242 175 154 153 235 134 0 115 8 117 102 166 152 216 231 75 23 169 161 151 222 197 172 223 218 205 230 38 93 100 67 173 245 58 173 103 116 210 51 224 129 69 247 201 130 26 10 134 155 250 232 123 46 57 227 146 195 28 180 115 81 152 44 31 105 213 65 102 213 80 210 81 190 126 54 138 248 245 249) #f ()) #(62 "including garbage" #vu8(49 50 51 52 48 48) #vu8(100 7 101 174 96 252 220 110 155 129 212 132 109 10 162 23 121 9 30 69 197 158 4 213 98 117 37 146 110 213 176 165 237 22 131 137 3 194 60 76 83 204 221 68 249 61 219 67 206 26 130 100 108 48 20 189 213 65 12 21 95 231 46 218 215 218 215 246 177 114 212 133 156 235 23 116 223 17 6 79 182 11 108 55 202 219 168 205 103 68 253 105 240 67 253 228 104 5 33 200 47 120 175 19 80 173 159 44 183 157 91 253 84 211 158 80 227 112 211 236 34 153 34 110 78 134 133 29 209 158 221 42 58 193 182 249 9 66 33 158 168 5 253 168 9 85 146 50 101 249 171 175 8 106 73 167 162 66 211 63 196 60 49 72 234 172 230 39 109 198 123 90 212 40 189 61 197 118 13 47 178 163 58 212 31 229 104 192 154 137 3 124 228 142 145 67 105 99 80 75 79 223 16 146 227 114 124 78 235 99 29 16 150 238 197 203 226 255 80 37 119 216 1 232 195 99 182 196 197 30 92 20 226 99 229 46 201 55 246 108 164 122 56 233 26 210 168 105 108 178 212 221 219 177 81 44 106 38 47 128 217 90 60 121 68 165 35 191 102 165 160 224 96 115 184 108 71 241 66 161 246 50 18 34 18 185 69 26 186 14 18 201 135 188 92 184 145 179 55 25 193 39 45 28 3 219 2 148 224 156 10 194 205 171 160 24 183 195 107 3 61 150 230 169 94 145 51 52 30 254 251 72 118 205 180 88 243 101 252 47 142 127 242 43 42 200 238 3 194 114 50 212 5 230 80 112 254 10 3 178 225 214 160 64 231 143 184 114 192 134 161 104 182 9 156 38 226 243 46 136 226 206 88 117) #f ()) #(63 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(71 238 216 234 147 59 192 177 210 37 41 206 245 27 15 222 108 68 202 24 7 59 131 22 90 129 228 23 161 111 198 116 46 136 106 201 119 163 123 198 221 38 200 185 164 94 134 196 36 136 16 150 211 67 8 243 212 6 38 13 163 91 23 134 25 207 50 125 146 15 252 137 23 64 241 72 130 101 47 146 45 133 1 217 176 192 48 154 239 118 90 118 157 152 83 100 88 224 160 230 75 74 123 133 212 64 59 102 236 229 169 119 135 36 193 45 61 87 1 167 63 167 94 97 213 78 231 242 217 37 149 166 38 215 4 19 66 131 107 38 74 110 188 189 188 195 12 74 116 221 20 45 93 75 118 96 156 162 14 16 254 184 52 136 128 243 132 141 114 169 190 235 2 203 249 204 17 196 67 235 226 167 221 120 111 72 102 226 70 240 184 184 222 145 26 85 129 99 127 17 73 142 75 5 178 17 149 82 12 161 191 179 176 141 26 192 165 190 198 141 79 99 194 175 222 30 49 117 63 3 137 84 69 33 69 182 210 113 3 210 243 227 133 45 75 24 149 225 197 103 85 126 198 121 191 241 85 48 99 129 136 133 61 79 14 72 121 69 68 2 141 5 50 148 153 154 32 104 168 30 64 134 6 55 58 140 119 41 106 156 195 96 108 155 138 111 183 181 152 49 3 113 70 86 104 209 221 140 30 237 12 229 161 180 0 88 239 155 17 164 14 38 145 104 181 180 3 65 124 30 26 85 13 207 180 102 222 227 149 208 11 30 77 142 237 186 193 160 30 225 101 60 214 14 249 110 11 49 215 33 169 208 53 214 55 8 165 168 141 211 17 167 60 7 252 3 181 137 124 105 66 151 217 225) #f ()) #(64 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(88 102 65 184 155 164 212 67 129 235 163 27 210 3 31 182 72 23 92 148 244 126 116 33 223 151 75 102 136 117 129 73 120 231 100 85 95 2 84 129 188 61 247 27 115 104 66 225 62 215 86 103 171 16 239 244 109 96 249 22 143 228 48 27 8 19 47 188 132 123 159 161 183 122 84 123 126 7 64 103 91 104 230 163 131 179 21 171 17 246 36 127 123 115 75 224 154 221 209 242 9 232 11 109 152 220 96 215 47 131 42 11 21 166 138 160 90 3 234 177 101 6 157 109 71 125 180 194 231 82 250 172 140 142 84 169 212 43 200 29 34 73 143 191 123 123 65 232 199 235 36 233 166 76 236 180 68 163 123 166 176 187 18 32 34 13 32 30 189 203 47 20 102 136 210 248 45 201 238 245 216 156 220 134 29 123 186 245 109 41 110 145 216 239 162 32 72 76 15 84 237 24 24 207 43 99 145 29 91 43 33 197 249 190 177 144 196 66 209 115 113 65 191 32 150 85 74 40 159 202 52 37 19 33 122 114 25 171 4 176 7 174 253 204 154 3 6 77 1 165 126 46 149 81 5 175 243 25 33 250 107 204 2 250 233 245 15 216 142 252 88 25 23 204 155 215 200 233 8 80 221 43 206 38 238 122 43 96 207 57 149 231 27 57 67 245 145 213 75 71 231 89 237 90 69 34 98 169 56 184 245 177 245 123 72 79 87 107 107 108 75 7 119 199 205 116 46 117 97 3 15 78 12 132 173 112 15 205 244 5 67 252 170 86 9 53 207 151 62 178 107 84 205 166 178 142 41 60 152 115 73 22 74 220 132 125 56 118 164 46 139 97 191 214 233 254 92 34 6 157 228 168 198 101) #f ()) #(65 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(107 135 61 135 3 159 228 150 205 55 90 163 170 57 1 99 42 30 252 150 197 39 148 143 109 63 8 62 192 65 175 145 131 218 15 182 208 147 67 55 190 38 251 249 71 212 253 152 109 45 2 22 240 43 217 148 161 178 176 82 234 0 243 215 98 161 81 110 254 43 11 140 23 28 100 124 18 177 208 222 134 242 73 249 68 98 187 150 172 51 99 227 167 145 254 104 234 241 243 133 225 82 96 163 145 168 186 135 100 196 17 170 192 247 212 242 247 26 136 86 192 79 16 229 190 49 190 117 140 4 86 161 223 169 12 159 123 219 95 176 63 170 91 193 40 200 26 240 90 86 210 90 46 139 5 137 180 152 35 250 251 119 95 139 132 105 33 244 31 72 208 207 175 252 46 229 176 57 203 63 127 60 102 107 241 53 58 195 79 119 222 244 138 51 187 142 204 177 43 77 121 188 84 121 131 107 23 180 126 37 30 179 216 247 62 171 13 192 21 211 210 107 221 211 242 188 20 51 186 62 19 106 152 244 53 77 238 55 161 28 71 209 78 225 195 187 69 178 0 13 79 147 114 130 235 13 132 156 120 174 22 213 7 148 114 153 23 145 254 251 233 157 10 164 123 43 204 230 237 20 211 54 172 189 70 29 211 154 60 210 115 51 82 203 241 32 84 123 159 220 168 65 140 58 216 163 9 152 156 63 165 6 212 134 210 221 7 98 81 6 95 213 72 118 38 140 133 29 65 205 114 242 139 20 70 193 27 52 4 61 95 225 71 138 99 136 74 11 1 60 81 197 58 223 164 162 116 161 98 197 13 51 211 59 213 139 185 156 201 120 246 158 4 118 165 21 119 253 105 103 142 162 9 213) #f ()) #(66 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(119 49 99 63 244 187 191 187 127 2 2 74 187 18 196 49 151 214 153 44 28 18 2 237 57 215 85 23 117 36 197 41 253 229 217 81 42 73 193 80 224 36 209 236 51 69 135 239 0 76 170 6 56 26 183 209 189 64 21 196 119 218 94 7 9 129 98 204 31 117 109 11 95 230 93 107 128 52 59 251 141 113 10 250 105 223 177 54 151 27 9 167 204 238 100 67 0 27 131 75 189 148 203 225 197 221 148 120 127 179 133 104 126 116 75 93 201 152 121 213 237 117 168 146 93 253 192 1 74 72 12 100 209 191 55 50 253 177 73 94 26 243 53 193 248 20 29 3 249 221 133 154 69 86 7 174 105 26 10 159 50 50 25 27 122 54 156 27 95 230 52 220 218 32 41 108 0 41 147 29 134 80 4 234 177 163 155 217 49 165 76 147 77 196 182 195 135 67 98 176 11 191 242 230 179 12 92 81 62 140 32 237 99 185 233 102 6 153 79 82 25 244 108 169 175 30 227 14 155 92 43 78 215 75 32 185 38 202 132 66 127 217 16 255 160 197 54 139 59 249 164 164 194 120 185 227 53 232 196 61 26 24 26 245 205 146 138 202 112 58 252 36 206 226 63 216 125 199 135 215 61 254 224 232 7 101 236 111 170 121 88 255 59 53 231 15 31 161 129 45 153 193 242 60 237 26 140 36 3 236 161 233 96 243 23 188 183 187 223 135 82 190 58 117 141 243 44 64 50 19 189 112 237 73 152 23 68 57 188 170 228 118 98 96 241 187 255 42 249 97 122 248 65 154 149 152 115 133 153 40 155 124 226 245 162 124 87 181 246 164 10 41 149 106 174 149 181 187 69 186 8 202 255 224) #f ()) #(67 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(115 249 162 172 160 185 253 203 240 166 154 62 108 46 128 46 15 198 176 163 36 148 152 158 125 30 189 189 230 37 67 23 237 185 42 124 151 93 168 231 106 108 244 0 93 231 245 114 234 253 72 236 207 216 16 155 68 204 197 137 150 149 81 124 39 79 152 47 29 65 22 11 24 202 242 166 118 126 169 227 204 237 241 55 63 55 210 37 111 104 46 248 144 10 109 242 28 213 170 184 222 47 159 201 219 150 129 36 111 52 1 156 10 107 152 41 34 21 21 110 104 91 10 101 210 209 188 133 85 184 162 125 49 32 154 38 35 96 104 187 41 183 36 27 102 14 63 103 157 175 107 37 191 152 201 116 97 81 225 51 57 162 14 93 29 188 17 183 0 121 113 132 63 219 186 18 185 251 76 100 35 176 221 9 38 95 109 160 58 208 17 151 187 80 147 126 112 156 33 180 167 81 182 12 227 187 92 223 69 55 181 18 127 140 240 172 126 109 48 7 181 245 169 110 72 47 125 112 0 200 50 132 153 134 86 189 177 123 99 178 159 48 103 108 125 186 193 77 71 181 7 188 63 231 67 111 82 166 242 143 70 142 140 30 193 167 81 231 233 185 65 95 200 162 88 45 165 210 195 114 148 181 149 89 134 14 105 175 181 158 192 134 141 51 244 99 43 167 207 211 43 91 246 103 97 178 171 227 38 200 122 201 84 61 91 99 172 8 26 233 34 69 168 64 192 242 228 116 207 176 197 187 100 22 178 136 246 90 181 197 14 195 164 159 241 220 182 111 104 34 28 65 1 105 135 87 231 205 126 40 192 23 231 24 150 252 115 182 122 110 86 86 162 53 76 203 31 53 252 153 184 246 99 107) #f ()) #(68 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(68 105 130 44 219 60 31 229 52 51 0 29 100 251 114 18 140 71 126 115 118 225 230 186 170 50 79 226 117 253 124 139 190 221 24 107 87 204 78 143 72 215 69 48 134 233 17 194 132 166 150 35 16 5 36 173 61 33 4 162 95 226 38 132 90 69 229 185 160 201 134 228 67 216 156 194 69 140 172 217 222 101 152 8 126 7 205 43 206 71 216 170 244 255 101 107 164 57 215 166 128 218 47 227 70 67 0 166 238 236 161 185 168 223 182 255 85 64 134 144 224 107 90 20 132 133 245 14 204 27 46 182 41 194 40 49 225 156 203 108 7 77 120 202 179 208 115 239 72 35 217 162 172 73 46 208 90 241 78 201 70 111 88 235 196 190 94 67 118 154 97 24 237 41 34 196 92 23 185 45 241 63 232 114 240 70 6 29 10 132 31 139 175 246 24 111 185 80 15 183 102 60 21 151 229 52 91 133 124 168 233 33 140 193 252 110 244 14 226 160 41 124 93 215 87 169 150 123 191 46 217 125 173 6 17 170 63 136 0 107 76 38 50 55 48 178 88 188 181 204 64 26 200 174 82 195 4 211 64 214 227 41 68 170 101 164 113 70 85 217 48 192 56 160 62 249 78 218 74 238 211 213 72 92 64 89 192 20 239 144 2 157 22 116 237 182 128 90 32 200 251 104 229 90 172 234 112 93 6 216 216 138 167 71 216 227 209 75 156 231 44 0 231 96 253 164 245 243 70 64 164 63 51 29 3 102 173 97 54 74 152 193 168 151 211 44 8 122 224 56 174 229 147 188 59 167 79 71 78 6 175 83 16 155 46 215 80 201 4 151 130 175 151 14 119 240 71 129 116 182 200 231 226 89) #f ()) #(69 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(4 65 111 28 194 244 65 189 200 243 180 172 22 225 202 159 216 211 103 118 188 161 213 200 152 17 35 224 231 109 106 107 179 219 69 146 147 90 214 97 117 89 49 194 63 99 48 65 29 89 44 81 5 74 168 152 134 42 220 174 81 237 135 73 154 206 196 171 26 152 243 211 124 69 108 142 176 47 136 71 194 92 243 27 104 177 53 195 61 5 20 64 212 5 231 109 240 43 253 242 5 57 242 145 52 234 9 101 158 186 81 151 31 211 213 224 182 2 89 44 55 228 37 14 10 118 51 206 7 35 63 62 45 186 54 158 28 168 45 0 28 48 155 100 29 99 7 246 150 189 246 133 102 101 129 193 202 146 244 22 71 31 2 157 70 116 76 45 220 204 63 199 88 86 0 203 129 154 115 134 254 35 182 161 139 119 221 89 199 194 51 85 148 200 178 176 215 7 118 102 88 87 59 59 176 86 119 127 110 6 193 232 254 174 107 131 52 91 3 219 145 131 222 150 208 143 8 92 66 156 254 59 162 255 106 142 176 176 37 187 78 49 108 163 152 86 134 235 142 98 149 179 48 106 98 239 243 95 41 192 50 78 88 37 146 184 242 159 151 151 245 212 162 99 66 193 3 249 246 25 104 204 40 50 16 239 162 33 199 213 144 164 134 58 132 211 190 252 30 76 153 26 25 208 11 42 78 73 36 26 241 22 255 225 174 59 247 64 26 191 14 3 33 48 125 156 59 15 186 205 40 194 45 143 242 251 81 213 245 38 233 130 185 117 240 186 59 140 121 68 241 61 255 83 5 51 192 156 102 230 111 218 80 93 144 210 75 119 194 211 2 234 188 231 233 33 168 14 195 195 64 83 49 245) #f ()) #(70 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(30 124 105 194 63 105 46 34 41 44 251 129 124 10 11 182 11 215 85 11 106 255 152 30 106 235 110 247 178 51 134 70 163 161 171 145 145 122 89 15 188 208 203 20 47 114 76 99 140 91 169 29 255 154 227 88 130 58 116 144 84 241 71 177 4 92 83 239 249 25 14 47 148 89 99 182 120 60 114 157 126 176 251 154 155 6 209 141 4 252 86 149 80 26 147 98 126 171 197 208 67 131 69 100 105 174 244 91 99 78 195 105 72 36 214 152 22 230 101 58 19 160 80 63 100 137 220 66 33 3 150 115 142 76 80 12 132 31 160 138 125 242 14 235 24 190 94 5 241 143 226 58 120 129 63 25 14 187 146 27 220 205 253 163 116 119 203 254 84 245 116 249 34 173 125 185 245 102 208 251 124 179 104 110 51 91 77 112 242 70 218 228 88 132 138 65 167 47 122 167 2 245 75 84 221 38 18 178 25 70 214 60 57 142 112 36 195 162 62 128 16 179 194 45 172 29 97 11 30 192 167 111 125 156 216 115 105 176 172 118 141 180 112 174 0 40 53 207 72 4 14 101 148 103 227 64 194 54 61 52 94 244 21 60 250 169 213 235 219 93 96 190 19 141 52 253 122 54 170 212 202 125 165 180 111 120 33 164 113 20 3 22 136 250 54 88 224 140 100 203 103 10 88 192 250 227 107 138 25 161 163 232 219 200 139 85 50 203 187 4 78 249 15 226 75 132 46 172 181 239 24 149 193 169 44 241 251 181 175 170 99 166 32 16 233 57 247 43 86 198 0 110 185 119 98 126 246 37 66 245 8 93 21 197 59 26 35 91 66 12 228 234 168 95 127 198 101 109 84 116 255 135 254 153) #f ()) #(71 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(111 250 84 218 119 96 144 135 253 96 187 81 115 70 161 129 57 84 191 201 250 67 209 217 84 54 19 208 46 236 110 163 182 75 189 227 250 6 114 113 229 109 150 169 105 155 0 217 218 6 240 167 30 103 139 84 128 27 228 116 193 95 113 127 203 66 197 62 174 23 236 200 75 219 7 188 40 108 55 84 155 6 83 10 20 90 202 37 51 71 211 155 1 149 63 72 51 41 237 229 163 9 228 26 227 154 184 129 5 41 68 188 231 95 218 241 197 70 5 169 187 45 228 61 50 60 245 159 2 157 201 95 47 147 30 138 134 186 199 153 121 229 234 194 180 18 121 176 108 105 127 129 217 165 104 88 165 153 158 151 194 40 179 118 34 255 15 242 10 138 10 74 216 60 15 218 104 122 195 168 143 113 193 222 177 123 221 247 137 228 145 247 202 4 98 105 60 238 74 106 208 245 254 83 205 81 210 87 209 10 235 102 116 31 213 228 243 6 208 168 134 220 99 165 36 187 76 235 29 201 155 78 53 109 215 18 60 1 0 171 216 56 46 101 156 228 190 213 104 225 34 5 43 124 120 173 77 60 127 40 99 181 215 252 145 221 9 155 130 77 243 129 9 13 217 180 1 73 74 147 154 27 183 166 199 24 163 105 22 250 15 47 61 39 169 152 169 50 69 71 246 78 104 104 139 166 211 185 72 251 31 49 9 8 234 187 147 133 253 215 211 169 160 213 122 88 1 134 49 0 165 160 26 60 214 176 153 85 246 252 103 134 122 142 174 200 23 195 206 127 137 42 93 106 240 1 90 187 73 70 211 136 14 158 20 181 80 174 135 227 113 108 156 1 206 174 94 194 11 162 82 128 158 99) #f ()) #(72 "including undefined tags" #vu8(49 50 51 52 48 48) #vu8(50 144 170 130 34 8 170 247 96 68 159 160 200 142 233 182 19 93 101 171 57 27 151 53 79 149 104 32 82 223 89 164 195 242 24 125 110 21 181 99 219 43 138 209 196 140 41 148 86 3 215 167 180 79 239 239 214 66 245 26 171 0 52 206 111 15 241 203 221 140 237 50 54 188 193 73 184 65 50 102 105 130 216 61 221 35 207 181 205 33 137 30 146 122 82 59 33 171 101 91 139 125 4 20 130 161 110 127 114 34 70 167 117 66 84 58 17 229 180 171 255 254 128 128 230 122 111 27 78 113 108 168 169 172 223 103 212 153 41 109 125 124 33 147 238 112 3 169 229 99 188 224 31 158 54 61 190 51 161 168 220 69 207 227 126 14 180 84 128 158 82 248 75 104 42 115 107 143 194 75 190 100 243 130 140 136 55 154 14 214 57 251 43 101 13 56 50 29 61 181 52 38 91 60 243 47 141 132 117 41 110 10 179 58 1 201 20 242 148 175 16 59 233 154 16 44 22 196 96 253 121 173 138 190 104 153 3 249 69 50 95 21 96 178 82 105 63 82 235 111 111 74 9 104 93 149 121 177 220 153 203 194 234 175 139 3 145 118 105 147 55 214 226 228 220 44 225 211 74 41 247 28 240 23 68 247 76 127 253 7 101 102 59 179 233 221 149 134 6 24 53 3 118 211 243 156 128 94 87 125 1 16 127 6 180 239 210 227 153 178 97 181 85 120 149 7 167 228 177 31 38 161 155 172 93 45 114 61 207 64 159 159 12 68 190 64 13 37 2 53 84 158 191 38 111 208 44 105 157 69 132 118 20 132 138 183 63 72 81 243 197 113 129 57 34 18 68 140 2 47 110 3 3 184) #f ()) #(73 "truncated length of sequence" #vu8(49 50 51 52 48 48) #vu8(122 186 33 121 230 57 1 175 16 181 146 37 47 214 129 240 223 13 131 166 160 159 114 124 4 70 166 66 162 92 73 32 4 19 149 228 152 134 200 199 143 243 36 195 71 108 124 208 82 49 91 145 161 109 36 254 217 1 111 130 155 160 14 11 7 81 88 237 177 100 238 3 204 105 27 33 209 132 103 119 108 224 178 53 50 64 103 108 187 114 100 56 1 205 44 135 176 212 91 101 22 167 149 172 114 244 220 147 17 106 84 51 204 10 45 197 208 142 73 147 235 103 251 147 125 95 235 233 167 205 173 88 185 203 87 98 125 154 43 3 132 69 169 200 230 247 155 250 243 94 224 87 231 193 19 0 62 155 84 145 62 65 82 177 183 81 63 238 209 43 233 216 78 135 237 154 94 188 26 24 230 15 99 36 24 3 133 110 172 168 191 11 100 141 156 23 50 87 63 236 86 192 233 241 27 240 101 10 176 179 119 53 25 242 72 21 4 25 230 24 79 4 152 65 207 115 98 5 205 68 203 11 43 218 160 66 28 146 135 191 91 96 177 167 3 184 81 159 251 64 140 37 243 242 255 15 102 101 171 252 93 29 85 65 137 95 228 83 245 194 146 69 231 186 88 187 225 27 244 64 236 78 215 183 41 138 43 161 47 218 170 167 117 195 69 98 251 100 10 106 99 179 108 116 216 250 105 173 206 121 14 18 194 236 66 133 218 221 2 155 186 191 17 23 180 37 238 232 98 51 10 61 82 216 163 98 24 102 68 179 27 251 166 215 211 34 164 144 20 116 78 70 105 17 87 138 92 198 2 192 6 100 25 212 24 168 208 87 250 40 14 39 152 213 246 81 228 233 130 6 129 5 173 204) #f ()) #(74 "truncated length of sequence" #vu8(49 50 51 52 48 48) #vu8(85 95 200 60 230 88 204 220 254 55 81 170 202 6 229 140 163 134 14 43 185 217 191 158 26 106 131 218 148 201 168 49 3 175 225 150 212 33 172 171 196 136 160 162 150 116 125 115 228 146 206 189 104 215 25 167 197 108 236 83 252 209 162 23 55 173 203 253 220 4 71 197 83 170 93 57 152 189 159 88 21 92 72 87 3 104 8 169 20 79 18 209 250 224 41 213 65 236 68 114 46 183 220 253 84 78 183 26 236 114 48 155 150 113 96 101 2 193 131 209 44 69 47 55 201 6 65 150 100 210 249 110 202 187 207 56 158 31 241 221 245 188 146 51 66 110 32 164 33 136 164 238 141 111 134 233 8 91 198 195 97 120 236 149 139 202 170 11 160 114 129 190 76 156 69 5 112 121 65 4 132 141 91 95 82 148 146 204 102 59 114 85 1 142 109 235 246 230 245 150 43 166 73 138 194 243 235 92 245 189 168 78 54 151 158 240 121 194 187 205 182 20 191 181 202 156 232 106 42 4 73 242 171 196 212 195 12 228 50 56 39 17 230 33 176 14 133 218 113 152 126 4 53 154 135 155 188 39 49 162 2 104 209 90 171 243 83 123 173 37 162 226 240 97 73 85 182 166 137 246 254 204 30 200 70 70 110 36 243 59 89 211 235 157 160 111 78 144 162 12 121 143 17 213 59 25 37 92 247 73 169 42 240 230 234 7 131 72 253 95 247 149 192 76 58 23 104 248 246 249 240 8 119 66 76 224 136 126 184 87 45 217 146 230 181 126 0 177 68 245 155 70 171 27 54 78 118 173 105 166 186 11 63 228 162 41 134 161 133 251 126 167 4 230 19 118 57 53 198 149 143 254 164 204) #f ()) #(75 "using composition with indefinite length" #vu8(49 50 51 52 48 48) #vu8(68 176 180 30 32 144 112 198 248 161 149 5 199 245 189 76 153 216 109 55 222 40 169 94 223 139 67 13 216 81 234 249 210 130 242 6 209 74 106 127 210 157 60 169 83 225 169 180 90 114 234 135 27 2 178 192 85 161 230 200 69 113 156 149 48 211 255 100 64 101 135 99 64 64 141 226 174 200 176 68 76 79 156 17 21 161 168 83 63 32 47 145 131 34 224 26 24 10 189 13 95 103 155 43 49 98 47 179 151 43 72 11 161 175 247 208 27 212 238 106 68 212 174 134 12 111 54 113 8 25 241 123 98 44 98 195 85 121 19 144 14 163 214 129 199 110 88 239 122 247 223 52 212 152 164 145 126 246 106 108 4 180 192 224 155 108 112 20 140 29 192 131 84 105 105 168 180 166 47 129 35 248 236 131 203 47 53 158 92 204 125 212 213 255 247 144 209 148 1 150 197 73 92 157 59 186 59 195 32 177 77 203 120 112 179 184 151 39 119 235 150 239 98 31 124 48 230 98 37 0 110 218 76 92 67 139 203 153 109 13 227 174 241 34 166 19 14 217 37 127 60 123 221 44 4 140 135 65 242 21 131 170 30 224 254 63 147 56 134 74 145 167 38 152 141 109 12 255 43 41 35 232 234 13 6 255 246 200 19 187 109 82 2 169 15 40 123 90 169 205 204 173 243 19 92 238 185 76 2 20 107 108 106 133 44 103 239 145 223 225 194 252 177 239 8 149 59 249 17 134 97 133 255 64 38 4 201 118 160 168 175 5 40 22 164 200 87 12 253 55 148 188 39 52 149 181 178 191 162 124 98 144 132 250 107 186 176 110 216 114 4 165 189 34 83 12 169 71 9 142 88 115 138 1) #f ()) #(76 "using composition with indefinite length" #vu8(49 50 51 52 48 48) #vu8(147 130 157 148 211 21 63 174 32 226 62 156 85 67 182 67 130 195 184 143 175 239 218 142 207 85 250 77 250 64 3 132 139 213 67 244 158 127 191 197 172 155 118 179 71 175 68 119 76 53 7 118 239 2 171 58 217 224 244 40 73 205 69 123 132 14 12 123 62 155 164 25 211 239 113 150 29 175 75 182 55 191 131 147 205 150 85 136 1 158 154 215 63 168 196 210 71 132 112 194 30 90 25 145 150 132 44 21 137 26 191 174 79 224 41 102 129 245 221 202 112 131 143 1 0 58 195 128 213 216 214 219 43 88 113 177 75 210 9 55 191 121 25 221 127 242 74 78 76 225 76 238 249 137 48 157 225 197 59 148 171 137 254 170 86 126 20 0 5 190 168 188 65 27 194 73 36 196 134 166 129 155 69 202 104 30 72 20 139 235 137 151 64 144 73 227 241 192 155 166 254 226 47 218 173 178 80 68 163 191 54 15 13 41 101 110 187 205 222 188 15 151 18 157 2 215 161 85 210 124 7 121 41 219 161 72 239 186 236 79 44 183 118 170 141 170 20 222 0 179 49 9 34 246 104 250 136 129 210 142 96 120 41 154 64 119 10 1 65 87 219 183 79 36 47 240 164 218 195 29 163 191 253 248 80 235 123 234 186 46 200 17 109 151 143 254 220 35 48 186 65 232 196 137 225 142 23 2 163 195 132 95 122 48 143 67 3 63 31 199 84 157 220 48 80 159 118 139 233 37 64 55 43 66 58 115 121 56 144 217 155 30 218 140 166 230 207 78 186 18 41 237 38 67 104 167 187 196 172 148 18 217 176 124 227 234 101 119 232 228 79 186 1 10 200 99 214 213 137 39 117 123 173 217) #f ()) #(77 "using composition with indefinite length" #vu8(49 50 51 52 48 48) #vu8(34 107 176 238 55 48 7 43 236 236 23 28 209 42 239 36 12 145 237 88 233 194 210 59 50 87 56 87 86 39 213 41 104 38 64 63 31 120 154 127 157 159 40 95 67 114 236 224 3 195 188 126 156 49 199 94 116 25 46 149 193 167 27 29 103 136 26 140 66 91 100 31 213 16 253 103 229 34 226 88 142 107 125 237 90 69 66 52 184 3 34 145 52 81 153 67 31 12 8 198 48 232 188 82 74 53 39 0 242 161 157 126 37 241 34 156 244 193 229 159 42 34 94 151 116 151 103 141 5 148 246 147 0 158 217 112 172 239 121 27 231 24 31 198 122 91 56 23 172 130 68 140 6 79 42 253 150 84 252 184 96 107 74 148 9 158 241 29 219 217 112 86 34 21 159 144 209 101 172 205 137 78 117 60 252 19 79 220 194 32 4 243 214 194 113 196 74 228 149 141 229 211 208 35 44 8 172 240 63 245 67 54 140 177 146 50 109 237 33 181 46 192 17 142 57 73 33 253 179 53 211 113 33 213 196 163 60 35 112 128 79 87 149 194 111 123 203 185 112 188 79 94 199 64 193 15 19 36 113 129 215 234 51 156 211 145 49 142 84 138 115 19 89 121 240 122 116 73 172 245 24 65 38 119 154 98 85 64 235 146 32 196 18 106 149 97 202 51 137 213 172 35 120 98 6 116 34 140 117 135 220 120 231 170 108 159 162 236 209 229 234 163 126 67 162 215 144 115 162 13 231 192 178 21 23 53 11 74 27 69 147 114 210 251 106 203 5 4 97 109 168 147 196 164 205 135 55 201 199 136 30 217 99 179 110 126 110 35 24 185 197 241 137 100 48 143 137 50 220 123 26 198 84 54) #f ()) #(78 "using composition with indefinite length" #vu8(49 50 51 52 48 48) #vu8(55 73 110 171 160 97 84 160 140 236 209 167 104 128 141 250 21 22 192 33 5 164 49 126 30 148 29 150 123 113 96 207 155 190 121 18 178 4 109 183 26 12 171 232 98 159 142 209 151 241 120 20 65 141 98 230 22 203 16 112 94 102 45 129 119 82 8 170 124 39 44 228 11 89 140 154 132 108 105 133 50 172 150 125 154 235 97 14 0 51 194 234 157 49 133 179 165 73 38 12 26 74 14 213 107 16 187 125 163 40 198 140 112 234 5 140 130 30 41 83 43 254 48 49 37 141 124 97 179 234 215 255 228 225 196 38 93 214 173 51 126 104 236 121 84 195 41 195 40 92 128 146 31 224 103 208 114 188 142 130 29 251 110 109 26 125 67 84 171 186 240 6 239 244 125 154 177 50 90 69 148 208 119 201 255 32 19 67 131 196 57 158 157 153 199 27 106 0 246 4 208 178 193 22 202 192 251 239 3 125 234 131 236 192 163 22 130 19 184 214 181 10 20 10 85 217 210 190 64 153 137 247 191 41 191 253 251 182 238 101 159 225 67 84 56 212 137 120 184 53 41 33 45 112 106 146 61 79 25 76 82 198 254 84 134 111 186 240 232 6 59 201 205 203 40 59 169 161 38 157 38 1 13 21 80 133 211 254 130 115 77 232 68 168 135 50 18 221 242 245 54 152 56 170 236 149 252 121 3 183 136 25 0 145 196 93 144 57 61 146 159 223 178 235 131 205 115 0 213 248 157 252 96 90 202 50 154 97 102 80 118 14 255 116 203 246 151 246 51 58 207 244 120 23 124 140 56 38 75 79 240 167 243 53 249 190 172 11 71 211 174 66 178 216 190 73 192 203 183 94 180 227 156 179) #f ()) #(79 "using composition with indefinite length" #vu8(49 50 51 52 48 48) #vu8(39 201 222 103 219 153 192 73 15 52 181 175 42 4 148 196 136 140 139 2 150 63 207 147 27 229 128 250 249 160 18 83 192 218 59 173 112 86 15 123 8 235 58 213 41 137 121 47 192 220 190 13 7 237 8 73 248 164 187 66 67 67 153 122 224 73 167 85 44 55 25 226 246 77 44 112 141 246 62 225 85 107 91 140 71 180 16 159 93 83 70 104 162 231 123 4 55 198 115 218 226 48 179 185 97 41 170 186 145 152 15 86 218 244 150 178 198 75 76 17 232 144 175 152 116 231 12 73 127 242 189 168 189 112 6 100 35 83 106 16 68 221 132 245 215 248 66 190 213 70 192 62 195 143 226 14 221 236 83 121 110 232 130 109 230 219 94 16 222 193 68 234 4 137 52 51 183 197 56 122 65 55 9 103 98 136 178 33 155 239 214 75 222 5 57 172 50 220 172 226 255 248 221 85 69 201 158 196 190 142 187 209 231 82 0 32 196 194 33 7 195 154 19 219 43 95 105 36 130 69 98 80 176 97 216 216 41 67 224 247 60 205 183 114 140 38 20 37 64 170 235 218 192 77 243 44 101 230 168 35 222 55 0 217 89 234 84 197 32 73 81 185 186 137 8 193 137 119 183 241 91 200 156 149 150 210 235 82 101 174 29 240 92 222 202 34 15 93 27 57 54 245 195 70 41 30 55 160 179 198 141 152 103 25 15 116 132 190 176 76 44 76 18 31 83 250 251 197 103 232 142 153 80 159 225 19 82 205 162 86 144 1 200 175 2 189 104 184 1 231 69 113 26 61 125 193 50 227 49 178 67 152 219 176 142 17 3 161 167 216 185 112 34 116 52 236 166 173 181 64 10 165 131 5) #f ()) #(80 "using composition with wrong tag" #vu8(49 50 51 52 48 48) #vu8(15 220 136 240 14 84 111 124 198 50 105 203 21 116 59 191 192 37 185 50 28 37 141 242 94 96 90 138 105 161 51 163 167 101 187 235 100 129 222 11 239 5 163 157 7 26 66 91 3 50 251 6 255 188 87 36 255 204 220 59 180 78 99 233 23 82 233 100 72 244 237 162 243 197 239 182 10 13 51 96 36 134 170 52 230 251 15 201 46 165 217 123 136 64 249 62 104 138 178 15 18 241 107 20 7 28 13 135 251 248 58 95 16 81 142 187 109 163 176 165 4 26 102 134 247 58 105 106 230 219 47 26 193 50 25 41 73 114 135 170 40 23 33 242 144 217 214 18 229 214 139 126 197 148 31 70 128 47 165 4 189 129 14 235 49 120 8 30 8 38 184 129 119 1 74 79 128 223 146 165 183 102 217 64 193 173 159 61 12 121 237 5 135 192 169 126 89 208 163 194 238 60 197 115 37 28 116 79 52 54 56 121 92 33 129 217 220 229 185 196 127 193 223 15 120 70 145 209 21 99 147 98 170 73 3 59 51 122 162 222 188 144 159 100 219 249 117 164 161 47 20 173 82 190 47 219 72 21 176 76 251 202 111 71 222 86 202 202 11 163 196 231 178 17 223 206 206 90 150 87 1 9 184 163 3 120 106 228 184 212 0 163 254 225 26 5 188 61 229 82 86 99 93 102 203 49 69 18 51 28 210 195 214 58 106 231 249 160 177 169 229 81 114 101 232 229 54 166 8 108 146 112 96 154 252 180 132 89 199 89 118 6 60 173 239 232 126 11 192 42 168 68 115 55 62 164 195 105 20 86 49 245 16 100 15 33 192 161 5 226 98 22 176 105 23 130 5 48 16 11 89 202 156 31) #f ()) #(81 "using composition with wrong tag" #vu8(49 50 51 52 48 48) #vu8(33 63 232 112 78 182 129 239 212 188 180 43 190 222 7 92 79 96 246 90 72 238 243 116 10 190 36 202 23 1 21 192 215 166 83 190 248 209 249 190 17 211 38 35 130 91 119 170 234 66 89 93 151 53 91 49 232 169 147 69 42 22 179 135 62 140 164 38 164 89 104 214 55 206 174 162 100 243 204 194 186 169 59 253 165 116 90 170 3 218 62 47 186 169 155 43 148 96 164 19 188 85 209 131 101 206 178 155 59 4 87 191 39 37 135 197 97 241 206 238 51 204 68 169 104 188 187 122 14 242 239 136 248 67 214 169 65 76 5 85 196 79 180 252 3 95 89 223 214 91 229 206 129 245 213 50 248 23 188 162 41 79 215 80 206 71 182 86 105 66 65 20 110 213 216 47 60 173 204 170 170 107 13 254 223 118 21 25 35 79 124 128 189 145 151 168 237 75 32 147 67 252 247 118 94 201 34 99 124 125 230 250 188 217 44 178 160 180 248 86 63 117 200 63 160 246 9 126 71 148 227 119 222 243 22 105 118 33 42 139 73 252 2 28 10 102 53 142 122 12 31 65 88 220 116 36 123 200 30 212 237 208 72 175 12 68 83 138 158 251 84 128 16 246 18 38 63 113 109 214 224 64 92 193 209 227 185 177 141 184 73 245 253 47 28 19 134 230 135 218 165 176 145 181 149 134 29 129 105 74 243 205 98 52 58 50 173 225 19 201 53 170 165 112 65 237 19 125 124 103 124 232 237 41 84 235 60 85 129 46 58 43 25 72 225 164 53 196 110 2 51 199 125 128 129 63 35 100 154 193 217 4 234 60 5 2 82 197 198 45 238 180 98 198 87 30 253 95 8 224 65 0 65 151) #f ()) #(82 "using composition with wrong tag" #vu8(49 50 51 52 48 48) #vu8(1 44 230 64 109 69 123 123 85 192 247 125 20 13 67 24 171 180 37 209 63 40 92 181 245 15 67 105 13 214 168 175 191 75 135 106 117 31 171 38 61 9 53 215 143 45 192 29 136 85 98 5 2 57 217 203 132 155 73 125 201 90 87 104 16 249 48 175 27 202 249 44 166 2 13 226 125 140 244 250 241 229 77 251 106 94 198 102 174 84 42 21 131 82 107 45 88 197 155 187 224 66 243 57 125 151 2 30 216 250 209 223 29 207 127 111 153 120 163 240 100 90 2 254 248 62 219 66 167 236 133 190 202 34 23 195 35 160 1 225 61 132 83 50 162 114 165 224 14 237 26 155 10 194 155 69 197 115 78 87 192 22 195 78 82 184 105 93 50 40 155 153 53 129 228 170 76 66 84 198 52 11 131 17 219 253 133 72 103 69 198 35 148 217 41 193 94 153 10 227 52 23 93 233 148 128 235 198 185 227 149 132 45 248 6 105 158 211 38 170 181 80 202 71 175 147 250 145 51 244 196 171 160 214 5 230 248 235 194 113 246 114 178 60 137 52 193 90 229 77 142 116 160 46 11 233 14 34 29 255 116 169 193 123 63 1 63 140 9 128 182 39 71 241 32 192 70 214 155 58 67 102 15 42 87 152 66 62 2 176 71 121 91 7 237 68 245 215 30 59 221 220 42 30 125 127 236 61 116 91 106 20 9 34 118 210 37 63 146 196 132 51 248 246 40 226 203 168 198 38 243 164 215 213 30 79 240 73 213 228 252 59 39 184 223 207 231 93 56 185 94 90 136 194 215 160 218 241 146 104 142 92 13 151 247 149 202 68 111 129 73 109 41 49 123 77 197 150 133 72 161 6 239 254) #f ()) #(83 "using composition with wrong tag" #vu8(49 50 51 52 48 48) #vu8(79 147 189 129 48 199 128 187 198 149 192 126 124 131 199 19 29 74 209 108 187 30 251 28 255 255 241 201 52 222 233 178 38 28 225 137 238 25 188 11 148 189 34 171 1 162 17 148 81 44 165 237 74 213 15 83 251 110 87 117 96 136 153 9 251 86 104 187 112 67 52 102 84 43 69 9 81 13 95 124 1 179 31 24 226 51 174 209 87 1 22 67 218 219 32 90 188 181 232 43 121 190 125 102 146 92 21 181 166 252 14 164 1 69 238 188 176 160 253 178 51 163 248 213 106 132 108 173 89 175 41 2 106 236 184 220 126 54 165 231 222 100 136 1 146 28 176 180 152 253 118 100 4 148 243 150 240 126 245 209 234 142 175 59 193 234 107 146 229 249 43 147 30 123 217 252 188 155 70 55 111 6 243 191 164 79 193 42 90 26 98 226 58 46 249 33 99 134 83 7 75 140 229 136 69 225 141 187 87 128 229 26 126 170 161 74 207 5 233 47 140 91 123 46 42 15 100 13 177 102 43 11 73 146 23 26 93 105 208 188 13 217 162 200 163 23 178 104 236 70 114 242 198 164 108 67 0 190 5 27 66 79 169 4 179 22 92 173 235 90 68 60 84 81 63 117 154 5 48 176 75 149 94 129 214 221 188 138 151 46 78 45 144 146 238 208 37 166 210 82 38 240 68 94 105 60 233 197 210 31 159 83 180 17 192 125 104 214 97 76 222 208 59 141 245 128 236 18 143 182 0 252 102 118 5 56 197 90 2 59 47 137 245 157 15 86 198 231 22 167 40 159 38 142 39 148 82 126 218 218 184 191 53 158 108 0 186 229 248 240 255 97 113 47 163 58 253 180 188 12 150 64 84 199) #f ()) #(84 "using composition with wrong tag" #vu8(49 50 51 52 48 48) #vu8(26 25 210 62 158 32 9 36 231 81 176 27 82 11 166 50 27 63 35 1 100 126 166 103 209 173 252 165 99 51 64 56 19 109 39 121 18 12 219 35 1 223 49 101 197 8 196 166 76 132 7 204 103 146 224 243 51 45 11 79 244 177 249 201 5 253 238 139 12 10 182 245 251 79 103 211 204 166 205 144 160 250 13 84 7 30 251 69 246 239 31 21 94 35 42 42 166 124 222 45 125 57 46 5 204 93 47 180 155 108 233 214 40 114 42 22 210 245 174 213 78 80 236 1 203 219 117 203 240 201 146 57 84 186 29 61 251 161 188 254 84 40 52 83 33 0 30 240 202 50 210 207 112 25 74 117 44 9 44 93 16 149 249 8 104 221 195 137 194 137 56 114 110 26 0 0 180 209 216 171 167 177 237 120 71 92 72 111 126 30 8 202 210 229 205 166 63 37 174 5 56 9 2 237 129 173 23 44 1 240 21 56 181 225 227 172 164 155 243 171 183 227 64 135 54 3 110 241 74 34 115 237 235 160 25 194 15 229 198 175 6 104 16 222 187 139 118 217 130 131 231 23 185 28 170 165 219 73 145 120 128 81 133 35 225 171 114 114 175 220 170 36 174 74 3 1 155 212 217 136 95 225 132 64 121 199 197 90 68 162 240 110 64 216 114 131 165 103 124 236 8 243 132 196 126 19 142 223 67 79 28 82 237 222 25 130 48 195 182 64 17 222 116 130 250 31 147 143 246 196 225 166 111 191 191 19 86 94 135 110 225 86 58 88 98 255 193 58 24 133 226 11 220 60 230 227 75 248 51 27 254 23 119 63 51 27 112 141 206 126 215 77 150 252 249 77 172 65 29 229 50 32 149 26) #f ()) #(85 "Replacing sequence with NULL" #vu8(49 50 51 52 48 48) #vu8(4 241 189 43 19 41 69 102 40 54 242 122 114 54 241 92 53 125 176 47 57 219 70 217 2 193 201 55 138 67 249 160 124 1 226 51 4 113 13 83 26 235 118 32 112 216 12 100 114 8 1 248 111 90 35 84 209 70 217 182 73 39 249 94 84 26 83 11 93 32 220 249 77 111 234 86 169 100 111 198 16 116 21 117 204 135 230 143 67 34 5 102 0 59 174 232 198 254 10 216 203 27 209 195 37 125 24 195 158 224 91 206 127 48 117 9 150 72 110 192 6 145 39 228 159 106 202 150 59 171 136 146 147 38 7 80 112 89 196 68 173 145 126 116 239 127 181 92 80 214 227 121 182 152 189 231 29 17 106 91 180 63 3 158 223 148 68 121 18 45 214 96 216 129 135 65 141 177 192 156 94 189 126 110 53 238 120 243 47 134 58 25 253 205 98 69 214 211 251 249 161 61 159 202 117 147 130 103 21 85 80 48 246 127 190 212 153 180 0 1 40 82 219 156 31 78 18 224 216 142 120 28 17 69 81 210 38 27 1 111 213 201 32 200 155 168 63 118 174 137 249 47 118 147 226 226 95 98 81 104 238 74 21 54 96 55 61 42 41 206 125 56 19 157 31 111 179 26 147 170 77 136 120 1 251 68 212 162 245 134 83 56 68 187 58 187 87 97 230 143 89 34 186 55 29 45 156 109 178 141 54 220 166 63 84 151 48 186 144 241 158 171 232 212 245 112 20 175 11 0 99 163 64 120 92 203 255 104 96 209 121 68 34 202 109 131 133 127 127 60 6 125 38 178 210 74 73 59 211 193 62 240 151 8 114 148 30 106 226 195 239 121 244 70 48 135 221 37 169 186 165 126 63 3) #f ()) #(86 "Replacing sequence with NULL" #vu8(49 50 51 52 48 48) #vu8(39 155 57 80 236 121 107 253 213 90 204 142 176 217 192 239 159 32 154 97 172 108 114 163 173 252 92 17 38 77 132 253 172 16 87 46 4 12 199 214 148 229 12 115 248 250 94 62 166 237 217 180 209 129 250 222 123 95 202 246 84 148 123 246 126 197 146 46 144 243 9 89 119 99 168 144 28 58 197 202 79 71 75 248 70 213 240 136 126 74 6 155 104 136 240 11 138 177 15 214 6 193 77 78 127 86 227 24 77 23 27 136 72 208 192 63 156 192 227 62 5 187 209 224 244 15 21 167 80 168 2 0 145 146 185 227 253 215 43 26 36 33 148 232 1 16 181 173 111 68 76 32 34 165 202 42 254 136 146 161 82 199 28 222 206 246 211 53 57 145 57 86 200 237 133 88 11 123 208 119 7 43 240 4 47 90 158 246 84 71 129 173 157 78 205 190 92 93 50 32 174 39 8 38 211 85 239 205 19 212 34 29 204 178 107 196 88 204 248 50 31 188 91 153 151 205 109 190 59 29 135 18 162 98 249 232 177 94 203 207 30 34 67 238 52 21 169 235 127 97 38 188 248 247 200 33 180 47 158 106 141 188 215 119 95 190 133 75 155 220 131 31 11 65 111 240 205 217 23 7 116 191 75 155 124 23 0 34 115 250 114 217 202 229 20 76 52 138 134 174 199 88 63 129 178 34 161 216 241 124 210 226 31 154 164 162 156 126 137 5 51 11 99 4 53 148 230 47 160 111 76 103 8 239 165 106 213 146 158 171 133 153 80 93 195 218 162 181 91 198 161 177 236 37 214 197 176 27 39 127 152 214 199 214 92 213 69 10 104 174 131 236 121 252 197 25 38 78 186 110 105 145 97 3) #f ()) #(87 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(150 13 218 44 32 157 229 105 161 116 11 208 122 113 226 4 118 191 102 235 25 44 98 7 243 106 97 136 244 20 157 167 212 118 36 251 142 160 204 126 236 78 149 41 164 121 242 130 32 81 85 28 145 85 103 13 204 60 143 136 156 47 49 17 55 63 86 42 197 81 49 173 158 97 220 68 113 172 150 236 143 67 24 74 218 49 18 203 31 158 66 203 115 77 133 41 27 40 43 100 200 123 205 238 84 154 62 251 199 159 188 225 53 67 185 184 218 147 136 60 77 153 126 192 55 202 16 197 41 146 37 216 252 78 61 110 143 145 1 84 3 210 158 173 109 171 112 54 53 247 216 39 132 248 159 245 197 94 135 62 91 193 28 117 121 32 92 14 230 205 107 60 182 68 7 92 113 115 140 181 174 47 25 103 60 21 246 209 113 99 144 93 249 152 214 89 73 42 64 235 252 155 41 88 50 129 112 90 207 147 234 236 0 111 1 254 186 109 224 115 81 42 241 4 40 194 240 197 53 51 18 155 55 6 128 4 39 133 3 68 157 238 119 65 77 28 82 248 31 140 57 183 16 14 134 181 28 165 125 3 86 97 33 136 91 232 125 234 107 53 201 221 94 22 92 61 16 181 158 61 93 206 25 185 194 132 223 51 166 67 26 135 216 68 88 11 156 57 213 200 199 119 247 110 243 100 40 174 52 208 25 173 27 84 91 50 60 100 62 124 15 70 82 156 36 31 179 74 231 225 22 214 42 25 76 24 189 2 194 164 66 41 64 154 72 207 142 249 157 162 190 168 103 136 208 3 96 163 221 195 36 73 149 239 33 205 124 50 198 117 106 93 48 31 129 124 24 157 255 59 156 71 227 81) #f ()) #(88 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(89 43 146 24 181 128 191 138 141 105 119 105 197 136 86 113 87 225 6 213 154 131 9 252 198 239 168 88 115 62 56 188 63 69 214 183 98 2 44 84 99 218 115 54 111 47 108 195 51 182 222 68 232 7 194 172 179 198 157 195 209 199 57 173 234 63 239 168 30 189 170 138 39 106 13 3 245 84 22 235 105 171 50 100 36 52 181 94 241 133 76 24 56 137 212 241 124 149 44 80 115 8 190 122 139 194 122 243 51 55 54 178 136 66 83 142 85 162 203 166 99 105 168 15 225 42 128 114 238 153 227 152 242 195 178 58 74 22 25 119 197 108 73 71 207 54 210 6 117 114 55 63 133 240 222 98 89 120 112 13 158 239 31 189 182 199 152 137 188 45 144 165 169 116 50 218 81 202 197 125 105 177 66 232 86 101 132 233 20 247 75 116 35 127 6 224 185 74 192 13 118 18 8 24 176 137 136 0 193 130 114 11 219 193 30 245 94 117 50 118 251 235 16 167 220 255 127 33 21 239 32 74 44 230 6 240 147 185 36 153 106 36 95 147 158 226 201 113 224 37 89 234 186 100 25 30 37 160 255 116 231 169 106 120 124 155 96 2 27 2 222 117 237 30 211 173 204 158 162 76 78 207 154 224 1 10 125 145 219 64 108 72 153 43 231 198 189 105 78 117 252 164 44 88 237 118 208 132 228 87 76 208 63 135 204 228 195 153 191 192 81 106 191 116 67 132 46 83 144 15 130 138 230 96 165 39 4 92 129 218 11 6 122 53 7 247 77 111 244 177 64 238 153 35 64 211 219 62 178 2 15 90 243 204 240 69 90 28 84 24 139 78 223 85 161 78 103 142 126 18 173 240 84 166) #f ()) #(89 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(130 168 185 58 25 175 144 89 30 33 37 89 169 59 153 165 145 102 63 129 193 216 0 214 70 219 123 74 0 27 213 105 176 107 5 85 96 87 97 86 41 152 75 127 72 0 157 149 93 132 223 185 192 196 167 174 144 192 1 49 10 3 9 182 249 211 112 173 214 239 3 142 241 80 205 250 101 36 4 55 72 209 109 23 134 108 155 217 177 235 88 167 12 235 235 134 165 162 186 115 55 220 187 136 2 59 236 183 181 38 248 44 95 106 191 188 130 44 104 171 15 4 156 84 174 228 196 159 237 205 3 177 11 77 199 8 182 126 231 13 71 97 80 200 95 58 240 95 69 23 14 150 69 203 191 61 87 34 97 44 179 66 70 82 162 249 237 17 87 235 174 42 182 39 220 113 218 181 57 165 211 212 207 187 199 188 175 191 113 172 69 53 222 150 164 126 163 53 83 183 100 130 247 189 117 32 241 45 201 245 188 22 23 89 136 90 140 226 68 205 208 30 221 243 40 197 24 132 156 60 181 216 116 141 196 233 185 152 59 124 31 164 51 140 128 151 190 39 61 170 226 182 251 213 199 19 147 0 5 186 181 138 184 200 82 116 56 237 33 97 47 117 224 136 189 151 181 234 223 174 252 104 164 241 42 153 22 93 124 111 97 228 222 111 60 34 221 248 78 80 100 62 212 30 153 229 65 76 55 166 150 192 165 252 239 179 216 192 61 148 55 64 46 93 111 182 185 99 21 105 221 44 237 151 42 105 231 16 179 182 225 132 25 201 164 175 64 26 36 39 5 242 61 102 203 97 234 30 39 94 234 162 191 87 0 20 113 66 160 191 9 157 92 164 38 167 234 101 57 156 213 189 242 168) #f ()) #(90 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(20 35 177 171 9 100 182 221 151 124 34 118 72 252 252 41 169 194 243 192 105 9 49 155 6 41 198 35 74 185 170 92 173 53 0 178 74 113 64 94 125 140 41 159 160 246 213 90 167 9 227 33 199 18 173 30 182 227 46 121 145 242 155 231 221 17 107 0 84 171 76 204 41 186 195 2 178 78 144 76 154 19 166 77 217 94 221 225 142 222 204 127 230 4 69 89 84 36 183 101 202 205 141 128 113 160 29 69 182 211 141 91 216 50 27 20 188 178 233 163 36 56 21 169 230 178 61 36 187 120 195 190 223 136 185 58 242 60 91 112 213 255 217 212 233 37 120 1 129 150 220 100 71 177 254 161 166 117 46 178 219 224 213 180 35 19 183 245 163 105 80 120 235 42 178 81 54 126 204 180 171 100 24 22 33 202 223 124 146 248 99 10 93 98 80 12 48 110 47 157 33 57 38 191 117 52 49 121 226 250 170 173 189 24 198 195 231 133 108 190 70 68 51 126 244 18 177 144 129 155 51 193 236 1 231 234 55 28 13 187 3 136 68 54 164 80 119 185 224 95 109 93 194 96 185 170 227 65 217 104 32 7 61 206 141 2 146 76 35 149 224 187 151 127 50 69 170 1 150 80 116 79 31 177 109 255 25 134 212 63 153 162 116 17 1 61 160 107 66 93 169 129 132 202 141 216 107 90 200 59 139 26 175 113 192 118 151 34 241 161 232 228 158 230 100 39 19 23 200 64 252 128 104 235 94 203 255 238 217 145 153 236 137 161 196 89 170 146 49 112 176 220 10 145 2 169 145 133 145 0 164 205 59 155 124 115 207 134 48 53 22 55 158 245 34 26 241 63 63 22 81 180 217 166) #f ()) #(91 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(76 84 9 56 105 48 250 151 150 51 102 62 46 98 61 214 135 207 182 8 163 210 189 118 77 242 149 64 121 62 204 147 98 219 238 219 241 67 187 218 234 99 235 176 29 222 219 186 92 37 195 91 181 91 116 206 66 42 48 143 76 167 183 105 136 235 120 27 228 249 34 155 180 96 24 0 249 151 51 9 138 17 67 227 125 225 159 224 228 182 135 76 60 126 83 74 177 214 45 244 43 212 139 246 206 117 197 148 0 252 49 192 211 5 193 33 122 59 34 95 0 19 189 70 211 76 186 153 130 112 15 231 225 193 104 60 33 119 250 15 104 123 95 141 42 114 131 225 34 251 26 160 238 27 239 5 115 85 167 174 225 23 221 160 124 231 158 168 96 69 119 71 59 100 173 94 62 208 147 131 63 208 199 196 150 182 122 41 51 237 197 170 165 80 69 43 190 225 77 79 108 92 110 111 37 79 175 246 171 91 185 106 6 222 153 21 25 54 223 105 21 147 201 100 217 28 225 103 159 163 181 94 38 190 126 165 41 147 162 95 103 164 89 92 117 201 82 23 77 26 110 121 207 159 62 6 37 183 23 52 129 184 64 168 54 138 155 244 94 161 106 143 35 32 174 59 101 221 108 101 73 5 207 245 190 21 195 144 205 202 214 193 66 229 55 243 86 237 106 83 116 163 229 177 209 127 128 47 61 238 44 26 156 217 35 12 114 22 10 213 217 195 118 223 173 140 93 57 165 46 187 191 81 97 185 203 30 112 0 154 16 127 210 20 99 28 50 65 72 236 133 239 109 67 139 152 227 223 113 53 174 26 123 5 42 176 44 148 162 97 175 113 85 68 23 81 174 241 155 221 60 28 50 234) #f ()) #(92 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(42 186 23 120 60 94 90 200 90 30 207 58 118 215 68 53 170 106 104 108 44 235 52 81 116 82 170 68 54 199 233 97 218 36 170 201 228 93 140 69 236 126 221 230 230 171 5 241 181 73 108 129 236 92 12 71 222 93 62 73 3 23 56 28 195 97 154 244 182 54 28 116 236 254 155 248 204 176 167 23 207 242 106 191 165 236 3 42 228 110 107 53 135 97 180 137 147 169 12 86 33 108 91 110 233 19 153 226 155 193 245 182 5 87 111 116 32 80 91 59 238 183 197 25 160 207 92 177 225 152 181 222 109 115 112 147 225 42 130 103 7 172 0 159 164 88 94 119 117 9 241 29 103 127 123 240 105 190 191 15 14 85 95 71 161 205 11 175 54 38 59 193 252 126 40 221 168 60 187 182 64 87 62 164 176 118 39 101 24 14 184 97 236 101 5 49 112 37 137 90 137 241 225 228 81 30 248 188 196 107 243 73 116 224 131 178 81 226 113 110 194 152 2 108 186 186 58 47 57 43 195 91 23 200 65 85 146 193 244 150 132 75 32 188 80 92 205 211 212 203 226 253 188 55 48 243 229 76 255 103 101 61 196 49 135 144 32 141 130 93 196 83 148 38 126 79 252 1 240 224 113 97 92 170 225 51 73 136 155 53 225 168 215 220 184 59 100 2 246 159 159 21 119 184 104 124 45 75 234 151 36 12 238 65 176 185 3 73 209 148 102 252 247 82 3 45 57 92 202 49 115 128 198 254 102 85 149 196 7 57 81 241 176 180 45 139 80 201 18 105 190 222 119 135 195 11 121 232 12 190 23 64 50 26 106 189 140 4 128 57 69 17 229 122 97 158 232 12 19 43 125 166 206 154) #f ()) #(93 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(150 1 67 163 65 113 167 214 211 3 135 140 35 170 201 215 204 216 185 33 138 93 132 237 240 192 149 108 34 209 38 61 235 219 90 8 207 137 14 52 24 54 249 71 96 19 92 206 121 59 11 143 207 124 6 45 219 134 97 190 254 230 44 215 144 41 78 52 94 253 255 222 124 38 221 217 220 109 58 58 219 12 110 254 203 253 221 158 56 44 29 120 142 169 176 12 93 45 15 137 100 194 65 101 123 209 201 248 47 223 62 75 21 69 45 246 226 247 228 111 174 179 66 114 87 57 54 147 71 3 221 21 131 239 180 25 230 192 63 244 245 214 234 29 127 24 39 82 134 4 114 159 29 226 71 33 144 15 61 62 192 114 55 244 205 230 132 108 18 206 27 84 160 102 36 163 252 144 37 78 60 247 42 210 110 130 35 21 145 119 55 102 136 209 225 231 159 128 11 47 29 232 17 178 156 144 202 203 203 186 232 66 26 52 199 76 75 13 226 154 177 227 182 247 110 17 136 215 0 216 165 90 73 3 134 7 58 209 181 120 152 119 84 66 229 58 120 177 228 201 250 235 156 21 207 208 183 53 217 125 69 155 17 253 17 145 111 104 64 200 106 158 180 70 195 244 241 244 31 98 55 10 126 185 161 187 191 188 14 96 152 238 222 170 187 139 234 39 145 164 174 186 36 67 189 231 74 43 209 13 224 187 220 218 79 253 6 44 44 211 70 55 109 51 229 64 209 102 127 144 179 120 239 102 59 90 132 201 39 227 238 65 176 26 162 193 51 202 7 207 67 236 204 51 5 140 244 192 226 166 106 233 18 158 20 197 127 1 242 84 196 4 112 221 103 81 48 70 65 115 15 154 163 209) #f ()) #(94 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(8 154 100 192 130 167 219 140 87 104 202 157 170 66 108 68 108 181 1 93 164 23 249 141 224 0 180 17 46 11 113 164 100 16 113 117 158 150 241 160 207 53 214 13 12 94 122 97 144 242 136 35 58 207 150 55 192 219 249 93 161 185 160 252 154 107 125 96 44 182 14 130 251 3 246 126 129 20 209 213 150 206 99 125 120 163 62 23 109 220 210 161 55 97 4 179 223 254 9 171 253 113 172 253 218 102 213 144 193 239 134 47 53 175 219 132 14 251 121 232 185 118 197 69 154 45 139 67 203 237 130 98 239 209 157 46 40 122 20 189 252 90 40 162 33 233 64 86 234 241 183 225 206 56 32 70 114 61 8 196 203 118 31 78 202 181 126 190 62 36 234 31 141 9 159 103 229 163 213 115 105 82 14 43 27 169 147 235 227 188 14 194 142 104 183 209 86 148 181 69 73 83 203 90 175 153 200 53 160 26 12 83 7 187 87 251 149 162 147 140 84 251 195 231 248 236 104 127 4 151 68 252 95 144 34 233 169 63 128 240 190 46 237 231 95 183 166 45 148 64 223 139 91 128 62 148 201 189 166 109 10 68 215 200 50 253 223 180 17 88 18 140 0 28 55 219 49 36 141 109 174 83 147 89 154 197 41 126 177 63 99 238 16 202 110 87 82 148 88 159 128 92 94 173 254 22 229 218 29 167 136 6 1 108 17 83 76 229 16 168 247 183 108 14 185 139 184 123 144 245 173 148 228 169 180 82 224 146 217 73 26 7 20 250 2 113 31 199 182 116 13 77 127 212 158 81 223 172 16 149 211 0 115 102 150 212 98 188 13 121 111 109 10 131 124 215 229 21 224 198 49 120 18 151) #f ()) #(95 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(81 154 65 54 118 77 210 164 208 155 24 230 101 178 51 164 138 42 163 6 171 184 127 181 223 28 96 32 227 207 232 205 133 120 43 146 68 187 205 67 106 5 235 159 22 82 252 162 139 28 136 56 98 91 151 139 107 34 225 184 97 25 206 128 222 194 99 186 218 155 213 109 217 183 215 34 123 136 81 26 216 48 66 186 48 241 190 113 89 177 87 236 149 176 21 49 187 239 188 108 57 36 6 202 107 110 167 148 128 7 36 67 217 33 215 29 213 225 213 131 203 134 118 62 254 237 233 141 74 70 234 177 65 140 100 239 146 158 55 180 16 0 59 207 174 136 45 102 166 233 125 184 8 68 116 123 198 50 203 203 13 56 210 166 151 11 98 114 219 65 65 203 140 142 190 50 54 233 71 132 139 39 101 48 205 118 165 106 228 66 121 49 26 226 192 250 192 24 226 178 217 48 197 99 6 138 177 84 233 15 67 136 153 81 11 152 209 122 37 107 4 17 174 193 115 82 177 55 67 113 118 199 51 27 11 49 90 126 183 100 251 183 204 247 97 75 65 133 144 125 36 6 61 31 220 232 147 108 26 26 193 49 1 255 113 68 40 7 132 179 97 234 187 204 55 246 146 82 1 12 92 99 16 247 12 222 110 62 168 155 203 77 127 208 231 144 24 65 78 95 211 170 0 242 200 230 233 254 187 188 76 2 160 198 215 148 186 111 21 3 138 102 119 28 174 109 200 118 173 213 221 35 56 184 6 216 42 24 217 172 31 106 229 124 91 116 142 195 17 31 181 109 108 217 146 180 200 14 18 132 52 248 184 252 144 37 178 162 29 6 45 206 250 117 86 108 36 33 24 178 176 97 159 206) #f ()) #(96 "changing tag value of sequence" #vu8(49 50 51 52 48 48) #vu8(8 228 128 185 212 50 77 16 234 133 94 26 11 42 68 70 55 10 122 31 61 101 101 105 127 140 91 42 93 219 54 13 234 182 123 10 92 117 207 157 212 145 251 11 166 64 43 112 42 251 34 255 156 79 125 175 38 250 65 51 35 37 158 21 243 146 57 60 36 251 210 251 159 48 8 230 74 119 88 56 214 255 102 198 141 188 226 96 238 45 11 120 178 154 13 169 208 214 213 71 25 60 136 198 176 76 96 89 34 58 104 227 83 41 229 133 145 28 90 45 123 214 252 76 216 153 69 238 222 94 59 227 246 253 84 121 158 33 126 23 8 116 86 52 173 6 205 16 63 36 251 44 171 208 122 29 102 84 94 15 100 19 1 216 80 58 249 78 75 23 105 8 37 77 31 172 76 251 246 194 39 165 24 241 56 24 226 47 247 213 241 47 3 190 117 49 238 48 96 244 115 119 242 240 219 82 141 105 230 186 67 109 8 164 192 52 251 35 8 76 247 29 216 25 172 25 154 75 21 154 186 106 63 63 116 115 63 94 159 223 169 245 175 91 119 70 134 59 167 15 246 58 131 221 74 216 5 115 116 123 112 23 59 50 214 124 254 61 108 68 253 59 16 113 23 92 119 192 53 53 134 118 12 141 109 125 12 214 12 202 104 202 4 154 225 50 29 57 115 91 227 167 30 118 84 132 17 145 187 137 83 202 111 102 119 167 168 100 82 4 2 229 236 173 206 95 10 32 246 21 223 202 1 120 107 1 231 232 26 10 57 135 244 209 32 74 139 97 152 103 84 107 65 6 145 149 242 42 159 192 101 149 67 188 112 94 192 142 1 31 88 82 133 46 176 160 124 103 11 43 99 140 25 168) #f ()) #(97 "dropping value of sequence" #vu8(49 50 51 52 48 48) #vu8(124 99 194 29 110 41 160 138 111 14 219 25 88 245 59 89 58 38 18 75 204 45 87 128 59 175 215 166 4 4 238 210 46 252 218 7 167 189 140 186 25 70 164 136 253 112 120 232 7 246 141 44 247 128 181 201 106 199 254 101 195 233 117 185 39 75 185 188 26 121 32 93 132 217 204 150 237 173 150 65 165 136 97 239 192 88 212 37 224 120 16 183 33 195 16 109 5 80 132 240 113 31 47 222 232 209 177 138 134 146 209 53 131 229 2 247 75 101 201 9 145 123 70 132 228 204 106 99 62 99 91 36 200 190 36 151 22 248 184 101 112 181 221 238 185 142 135 44 84 3 145 123 14 225 141 39 69 95 240 197 32 107 202 98 76 164 182 16 41 76 191 219 67 130 121 146 156 71 97 223 148 47 115 220 29 84 74 126 216 188 45 241 12 164 77 12 120 2 227 36 145 39 160 134 162 9 178 197 204 16 188 207 82 164 71 254 178 76 179 124 75 179 50 187 65 78 98 225 172 192 186 4 62 22 11 222 157 142 58 216 22 125 137 209 220 238 212 21 111 192 192 9 63 6 244 199 247 130 167 143 88 50 139 47 134 232 224 79 250 148 249 252 217 7 87 252 161 55 130 189 8 166 211 205 229 100 118 205 60 164 49 22 149 52 253 133 95 217 85 52 85 56 90 187 213 85 154 71 193 228 200 106 207 69 92 162 23 86 164 165 49 15 239 94 44 206 255 159 214 55 192 240 59 244 9 120 128 115 40 92 140 15 86 172 212 241 99 91 14 33 184 78 50 186 122 191 149 211 41 109 82 188 186 238 78 244 164 52 55 34 126 188 105 77 70 44 160 110 184 134 231 37 24 147) #f ()) #(98 "dropping value of sequence" #vu8(49 50 51 52 48 48) #vu8(3 237 106 16 113 32 162 101 80 152 225 46 250 248 11 186 187 105 236 180 54 50 164 47 186 190 11 252 68 209 240 243 91 112 88 218 98 137 9 253 36 39 120 30 71 14 177 177 76 148 53 95 218 155 245 191 180 118 113 112 106 65 229 23 76 101 71 162 102 231 116 31 26 185 97 128 53 243 202 143 94 26 244 171 225 145 192 182 43 71 208 156 187 251 37 161 191 255 84 220 54 144 150 211 96 44 172 33 207 66 254 32 109 221 247 98 121 134 33 206 20 200 85 179 178 247 79 56 178 230 128 30 32 237 91 83 238 144 234 221 111 158 252 106 8 114 101 206 144 101 166 245 37 228 80 138 112 50 39 82 64 154 14 93 218 193 204 193 5 21 11 146 224 17 184 50 246 200 222 64 142 241 149 124 29 150 33 150 29 208 27 74 66 90 231 36 76 252 110 214 17 150 109 16 255 249 210 89 132 148 190 227 154 199 2 15 69 120 90 100 190 54 9 74 247 242 111 201 61 138 179 247 154 131 241 207 94 192 227 233 114 93 44 16 89 65 74 244 73 23 225 158 51 65 110 29 4 164 147 76 184 18 83 13 42 1 83 179 58 224 43 171 225 47 153 89 156 82 220 80 128 18 137 70 154 92 208 179 70 123 152 139 57 167 244 62 233 195 173 95 144 63 170 225 238 56 127 126 169 72 40 66 120 12 97 80 60 229 13 199 46 32 48 5 151 215 89 183 199 133 205 161 26 69 80 139 81 230 97 239 221 212 176 138 242 104 84 162 147 21 0 133 235 201 84 206 127 94 50 233 121 251 182 255 157 24 195 143 246 216 40 118 54 233 183 38 143 122 230 187 54 254 149 20) #f ()) #(99 "using composition for sequence" #vu8(49 50 51 52 48 48) #vu8(9 167 72 23 78 172 147 130 50 71 99 14 89 251 90 80 191 225 115 12 180 151 149 171 110 163 155 96 51 50 65 155 73 159 43 117 65 92 69 231 4 100 33 57 152 239 64 63 254 83 58 220 101 247 138 163 115 153 251 129 23 142 86 101 62 151 63 78 49 126 35 89 230 196 140 144 193 115 187 218 238 86 66 104 180 94 182 37 84 232 228 191 96 190 242 218 78 38 27 193 148 140 125 169 36 156 249 114 6 171 35 73 107 88 87 168 176 187 9 137 110 22 199 248 245 195 214 32 162 188 69 95 165 191 96 12 165 191 118 36 26 81 47 195 182 17 72 214 32 84 251 219 137 112 53 226 10 163 32 137 11 87 220 133 47 207 142 49 206 110 25 24 81 199 177 30 214 146 33 94 185 206 138 80 128 51 234 43 124 224 139 228 142 40 194 157 206 182 159 187 74 42 35 32 203 251 145 76 152 237 195 162 193 223 148 203 99 30 222 126 246 236 206 17 115 149 30 27 150 45 63 29 253 115 108 183 175 153 76 126 120 86 67 156 158 254 229 47 121 27 10 73 5 141 231 251 198 123 99 11 226 52 16 48 200 128 70 128 36 52 226 160 252 178 226 172 112 213 205 190 3 62 239 73 220 184 114 203 131 154 86 150 230 14 67 139 113 141 223 43 121 177 251 180 151 60 53 89 84 48 86 116 38 174 247 166 65 232 118 208 138 191 97 179 185 83 92 156 3 86 73 43 74 162 122 219 33 54 64 113 235 248 236 92 208 221 52 228 106 146 131 233 151 186 182 39 184 23 232 75 245 43 9 172 8 238 223 32 56 63 35 138 87 59 57 202 148 180 45 49 176 166 34 42) #f ()) #(100 "using composition for sequence" #vu8(49 50 51 52 48 48) #vu8(110 112 45 214 43 136 171 146 101 212 221 215 27 9 30 234 106 40 37 217 166 64 35 103 100 136 193 230 244 103 238 154 136 147 6 54 18 205 56 218 136 149 32 148 26 89 243 205 113 51 183 203 49 204 65 13 189 16 149 102 153 91 188 81 70 246 72 247 160 20 182 65 210 6 41 174 141 140 117 202 67 66 253 18 243 116 36 124 196 110 21 79 170 219 213 147 216 249 228 4 173 235 249 37 177 201 176 231 242 12 1 169 25 8 184 53 205 194 212 85 216 44 222 139 188 108 204 176 239 49 29 118 222 227 193 232 50 216 165 158 251 224 54 117 64 251 242 250 33 203 238 44 243 69 253 248 185 120 41 71 67 110 247 213 40 86 71 177 200 197 121 9 211 81 28 223 222 7 114 62 182 102 89 156 189 165 150 176 139 97 100 39 44 138 196 113 18 56 97 94 221 25 249 222 160 106 135 70 125 59 143 226 248 127 69 232 163 161 229 208 211 225 95 224 193 128 39 84 6 77 235 183 114 229 57 187 149 40 244 205 239 119 231 95 174 188 198 147 137 100 207 69 211 44 126 36 217 201 182 153 185 217 39 116 75 46 67 36 70 44 56 192 158 231 10 88 122 140 38 250 127 226 135 242 168 245 82 174 181 183 24 54 194 233 43 111 12 241 174 33 23 130 52 184 162 94 226 60 101 56 78 179 50 214 17 58 157 72 250 177 7 49 98 128 108 86 113 185 242 120 63 145 59 200 90 173 155 58 8 173 150 10 72 23 225 180 196 231 198 60 52 75 34 246 219 96 224 92 63 44 44 2 85 97 114 59 233 249 174 0 124 62 138 29 108 34 176 179 149 122 244 201 66 173) #f ()) #(101 "truncated sequence" #vu8(49 50 51 52 48 48) #vu8(40 211 182 172 165 45 172 28 185 122 193 137 60 197 148 11 143 173 34 171 80 145 140 120 80 4 54 84 106 28 222 166 94 144 0 174 228 79 221 176 172 105 37 66 29 224 32 151 17 165 28 156 136 2 99 111 153 10 220 209 124 177 240 136 154 92 176 156 238 164 48 84 126 138 50 103 159 151 220 100 72 116 84 59 180 93 162 206 68 46 204 220 127 115 191 246 184 240 157 81 144 110 46 193 234 161 108 23 56 60 166 95 67 167 109 5 79 30 230 90 22 41 183 249 213 253 196 76 113 103 27 241 10 231 90 34 215 186 154 17 172 190 218 150 10 71 229 115 42 216 56 25 113 0 251 137 231 130 148 15 14 190 173 75 249 177 11 122 93 72 129 26 58 131 48 54 62 134 59 195 181 111 110 84 183 15 15 172 51 168 131 72 197 196 156 147 89 81 150 34 214 199 158 177 166 67 59 214 138 98 75 23 87 169 220 167 199 190 27 250 205 239 31 56 147 111 42 53 72 108 247 206 232 93 128 16 137 214 218 255 165 114 194 91 79 90 112 55 137 112 168 228 251 72 132 12 116 193 190 60 186 200 71 152 191 146 129 226 155 147 166 49 242 55 66 185 50 97 201 105 19 71 149 152 186 254 222 99 127 245 244 167 118 26 40 199 14 248 96 164 179 58 190 127 222 180 158 158 250 159 169 223 177 119 2 190 22 97 120 157 236 182 227 10 152 158 0 188 111 66 169 1 209 164 52 92 71 171 135 216 22 142 108 252 251 51 151 57 247 16 93 229 246 139 240 17 254 229 201 15 95 202 123 43 22 58 199 126 52 153 93 48 151 21 231 11 205 53 234 85 122 132 62 39) #f ()) #(102 "truncated sequence" #vu8(49 50 51 52 48 48) #vu8(7 234 126 247 251 97 160 33 193 181 194 106 30 190 184 216 252 148 59 74 46 145 208 203 217 176 35 232 167 134 226 213 33 221 212 61 212 231 91 191 149 131 33 52 5 219 152 188 61 122 166 177 240 186 234 27 19 241 138 170 118 156 164 35 77 53 254 222 198 180 1 125 181 145 242 123 158 153 108 33 215 213 16 216 30 51 49 203 118 179 32 161 51 142 210 215 64 226 128 47 212 163 21 158 26 71 235 15 46 130 196 66 201 241 56 166 48 181 7 241 76 39 125 131 223 72 24 5 78 200 173 207 175 23 10 219 253 86 13 105 187 136 251 159 125 226 162 148 239 182 26 225 139 184 21 158 206 93 163 26 77 154 96 148 203 149 109 29 158 133 171 19 117 95 78 149 169 168 219 233 19 15 229 234 254 15 88 50 205 130 185 114 242 240 246 92 96 231 46 93 244 18 179 249 40 12 173 253 17 236 188 40 187 30 102 85 241 193 45 236 186 112 205 117 217 12 177 174 73 75 65 108 90 214 188 131 208 249 238 204 215 160 169 104 108 40 233 3 136 62 127 209 188 190 78 157 190 60 225 163 34 109 113 221 109 244 89 247 46 132 21 105 124 177 111 195 210 255 255 56 55 106 139 27 7 57 125 46 110 47 246 94 215 178 176 0 159 170 32 165 180 37 21 124 132 116 129 222 37 147 54 109 123 123 222 211 4 209 51 252 89 167 136 117 19 207 80 103 193 233 113 51 102 165 51 178 238 114 50 69 137 196 110 249 160 93 8 202 128 85 196 127 12 18 197 65 168 84 224 221 222 164 23 30 111 31 8 208 145 253 104 28 249 13 248 108 123 222 160 68 1 63 4 133) #f ()) #(103 "truncated sequence" #vu8(49 50 51 52 48 48) #vu8(34 214 15 165 142 123 144 79 193 168 227 221 115 133 90 114 113 83 229 138 121 140 11 86 108 27 114 210 58 79 250 41 54 52 114 85 123 1 235 220 168 112 24 156 2 74 247 106 169 86 15 83 139 179 46 46 118 144 150 7 226 59 249 69 9 18 208 202 230 108 212 194 177 104 242 139 71 154 90 70 6 113 14 232 6 116 98 195 150 119 59 24 240 225 86 131 65 114 129 32 183 24 236 134 119 144 43 85 108 137 179 54 144 37 38 132 104 74 236 150 161 46 95 155 235 160 248 250 16 253 120 9 198 148 11 167 56 159 21 46 246 203 57 22 1 87 251 169 154 203 213 232 14 72 229 75 181 231 183 19 77 188 238 198 45 115 216 209 179 221 12 10 39 85 93 73 246 34 187 225 87 227 231 49 255 70 40 169 136 236 6 2 113 24 76 248 212 64 127 149 220 88 57 165 82 151 82 22 148 191 232 151 140 172 81 29 79 171 251 144 114 167 155 32 91 251 175 60 189 30 24 193 184 119 178 238 157 216 157 18 96 114 188 30 99 87 157 23 120 13 133 81 220 70 62 217 172 101 91 132 158 217 99 10 209 140 180 14 84 252 96 229 100 23 250 10 137 173 233 145 105 87 28 152 89 220 128 17 57 179 149 182 47 223 73 237 71 72 198 178 226 30 18 156 154 91 191 52 111 196 111 244 8 221 126 16 247 173 26 188 127 55 70 53 226 146 153 77 233 243 9 65 103 211 74 29 16 79 68 89 183 244 140 208 91 126 21 10 215 227 189 105 167 230 25 187 8 23 99 164 251 111 40 76 61 51 12 77 246 61 66 224 219 242 133 96 68 174 28 23 173 78 129 18) #f ()) #(104 "truncated sequence" #vu8(49 50 51 52 48 48) #vu8(72 220 85 73 199 208 214 137 57 109 150 106 8 230 157 214 169 174 56 179 47 108 114 111 250 214 132 149 50 4 185 247 78 184 67 167 171 215 136 202 126 149 172 171 244 78 11 0 225 220 253 119 145 156 61 227 138 119 184 242 148 116 97 162 158 112 56 41 4 115 169 89 19 205 245 124 123 244 222 130 98 137 133 2 129 67 58 171 124 135 84 238 234 126 10 230 21 43 88 121 45 2 168 183 98 85 13 44 116 51 210 84 46 67 86 245 184 168 219 82 79 154 4 78 2 97 193 210 192 131 135 182 37 125 170 29 153 116 189 124 223 70 234 188 110 184 22 138 83 94 89 15 165 223 9 152 67 108 8 214 87 75 247 97 20 67 221 157 74 164 140 3 138 209 132 126 158 102 31 173 164 27 106 82 169 82 100 236 130 189 14 73 123 63 242 143 178 228 1 231 160 60 177 236 130 60 195 238 78 252 235 49 192 158 162 220 162 210 5 24 203 138 249 53 36 238 131 166 236 64 144 104 92 151 79 97 17 14 173 250 244 148 61 233 62 208 237 164 213 19 207 185 31 59 173 91 197 74 74 21 116 43 59 92 6 218 122 115 212 61 217 238 249 212 223 76 32 34 252 98 177 217 59 40 94 251 194 168 35 211 225 92 169 15 246 176 5 64 216 120 20 60 224 111 81 201 150 214 40 231 165 236 24 93 231 197 211 122 158 211 10 93 170 123 218 100 5 113 116 189 26 65 90 169 198 128 11 130 237 92 8 146 241 116 66 44 81 232 89 43 253 178 243 186 81 5 96 18 52 94 146 230 49 150 4 222 213 72 134 54 223 206 168 19 154 216 65 27 19 255 91 184 149 128) #f ()) #(105 "indefinite length" #vu8(49 50 51 52 48 48) #vu8(156 192 157 244 94 19 180 211 62 227 28 84 80 38 190 95 154 99 211 147 169 180 61 167 244 39 34 234 189 28 167 131 202 220 33 227 188 31 126 158 143 112 195 187 142 196 226 254 250 130 219 156 253 193 6 238 180 31 73 32 125 102 84 172 55 75 7 48 22 4 171 252 40 6 111 181 36 201 123 36 230 76 47 98 236 152 48 117 136 228 222 59 35 145 48 18 61 63 141 10 113 88 43 18 54 18 177 0 190 18 57 61 135 134 88 232 225 34 22 27 31 72 72 255 45 60 173 104 237 222 100 6 254 192 166 15 83 39 18 10 109 154 74 19 116 101 66 100 45 111 145 138 153 137 37 101 183 196 255 16 178 183 242 52 74 69 6 100 139 94 216 240 221 31 243 22 135 171 83 94 169 145 229 95 83 33 243 118 251 147 146 95 138 14 21 80 146 66 122 213 239 240 62 251 26 113 46 52 127 10 251 125 249 68 100 9 212 67 168 57 213 210 135 19 203 64 100 201 196 255 82 117 135 215 48 190 63 152 156 102 8 74 183 39 14 70 227 142 79 210 242 102 134 176 249 235 34 35 145 162 91 183 2 2 45 59 183 215 69 36 81 239 222 91 141 16 83 102 32 21 204 186 248 10 250 81 240 117 237 159 179 173 94 196 173 63 241 154 151 101 133 232 45 85 221 223 139 25 137 212 76 33 215 63 27 25 230 242 89 252 190 129 128 122 17 86 144 190 225 198 165 10 225 101 33 53 141 46 248 193 251 185 185 188 152 158 214 77 158 25 231 172 77 226 18 78 61 142 250 240 157 112 166 223 234 16 44 118 84 146 79 182 237 148 75 68 124 101 216 30 77 139 190 69) #f ()) #(106 "indefinite length" #vu8(49 50 51 52 48 48) #vu8(96 161 70 134 242 231 46 177 152 116 30 254 187 101 131 29 47 59 122 81 223 253 169 179 154 157 202 251 175 73 106 72 62 129 54 194 15 181 207 59 157 164 215 27 37 96 97 207 58 191 104 10 46 144 75 196 9 22 237 239 14 207 194 191 111 80 171 47 201 102 124 243 7 185 242 54 0 111 41 131 1 156 22 194 87 17 16 110 199 102 33 119 69 133 47 118 181 23 142 168 208 199 192 69 80 169 127 56 236 15 235 158 67 25 58 131 201 239 48 36 210 184 106 134 20 47 160 244 192 84 73 242 76 230 115 191 193 29 94 54 212 216 67 187 175 14 54 163 34 239 173 206 161 58 0 129 168 164 20 78 201 220 173 10 144 170 23 203 185 199 114 149 122 185 80 23 109 27 50 13 208 101 29 52 80 191 61 246 139 106 57 250 12 133 97 9 249 212 43 5 142 10 34 37 147 227 117 102 156 171 233 99 241 218 237 15 219 68 157 123 139 203 194 196 199 10 244 116 230 72 106 25 234 213 232 195 175 61 255 166 19 174 206 133 216 233 255 199 225 17 70 174 240 117 206 0 1 160 24 249 231 133 155 59 157 13 94 138 119 226 41 184 146 240 8 187 161 10 208 221 218 230 57 82 132 92 11 106 74 26 41 108 169 230 217 150 5 201 35 197 217 108 216 248 151 109 46 62 52 11 99 120 73 242 32 19 201 157 94 134 100 52 24 158 145 23 3 29 243 50 232 83 251 134 23 78 163 3 128 174 203 140 106 17 69 18 115 241 154 53 36 97 57 59 158 148 28 207 248 212 160 128 208 104 148 25 132 2 78 63 133 201 101 103 105 180 210 6 187 210 247 93 211 37) #f ()) #(107 "indefinite length with truncated delimiter" #vu8(49 50 51 52 48 48) #vu8(120 209 55 103 31 176 199 136 177 64 31 17 226 96 85 194 181 103 40 145 197 19 113 62 83 209 125 22 51 35 84 55 230 32 92 10 66 196 15 120 211 125 148 1 25 171 2 141 10 103 225 230 27 131 201 125 65 81 76 148 59 18 196 217 240 151 151 148 156 63 145 14 73 180 164 122 45 15 8 153 110 229 129 35 59 48 4 29 216 142 89 146 103 228 240 218 33 48 58 109 5 147 191 117 82 224 40 137 116 187 25 143 168 77 147 181 195 142 78 166 69 11 141 7 14 49 83 128 138 182 170 117 15 208 44 53 157 243 15 156 244 19 234 89 36 106 126 121 172 120 216 248 154 232 49 182 53 218 216 96 19 68 137 44 241 148 230 37 30 247 47 252 129 54 70 1 108 37 238 13 81 13 186 231 91 106 132 223 18 135 148 149 167 138 41 217 16 232 28 89 181 124 102 224 85 212 71 32 230 173 240 228 3 36 201 48 41 124 205 106 9 163 192 84 35 52 44 35 0 131 112 130 110 159 85 179 223 74 162 240 242 170 98 5 215 223 230 156 107 107 183 2 53 250 187 130 101 31 238 105 214 180 125 166 191 213 180 123 212 239 143 164 117 253 143 34 2 240 165 57 155 148 65 234 222 58 1 41 39 84 229 177 178 238 136 204 219 91 76 115 93 243 118 50 211 202 221 106 206 211 44 150 87 210 197 175 80 166 5 160 77 67 21 171 160 247 245 91 54 26 200 37 72 181 29 209 16 62 111 158 180 35 72 157 190 160 123 164 110 189 39 119 62 243 35 23 230 223 38 173 149 190 62 32 15 77 85 225 183 161 199 137 57 179 147 96 83 169 79 86 54 142 96 109) #f ()) #(108 "indefinite length with truncated delimiter" #vu8(49 50 51 52 48 48) #vu8(57 10 119 28 27 233 246 214 244 162 104 34 9 249 223 226 245 101 204 25 20 132 255 58 23 142 50 39 45 182 134 54 129 49 26 123 64 100 114 187 71 108 27 235 89 124 143 14 153 33 170 69 205 74 138 1 226 20 62 232 106 50 247 26 204 132 207 194 19 161 117 122 205 33 216 24 98 17 84 0 197 205 20 8 186 101 164 241 38 115 78 250 119 190 7 20 4 166 17 237 117 240 138 226 128 69 224 20 192 44 44 121 197 156 115 111 202 62 200 101 148 61 70 236 42 97 72 190 137 36 228 148 43 121 198 142 64 140 96 181 124 10 170 219 35 77 43 182 234 227 79 87 37 122 66 107 220 90 166 101 35 14 236 76 154 234 42 242 117 240 186 21 247 102 85 223 190 78 145 81 145 200 184 4 179 146 245 169 208 78 251 26 63 76 135 8 80 214 82 68 220 158 67 18 73 170 144 109 32 111 20 151 176 161 214 222 180 214 145 182 26 185 161 230 31 114 169 36 206 252 208 246 251 86 111 119 166 144 103 177 246 186 175 35 209 215 236 124 19 75 153 89 191 120 255 121 235 117 11 226 134 163 240 59 118 156 25 154 212 158 118 158 145 61 183 35 23 241 47 18 170 52 2 101 6 2 24 240 203 40 222 75 229 85 13 197 97 81 166 40 6 31 80 89 144 148 234 104 23 125 90 157 90 151 204 179 166 156 83 254 94 163 106 245 151 76 87 220 149 182 239 59 6 124 32 78 185 130 73 230 162 19 48 14 63 40 255 126 175 161 161 166 26 185 91 202 114 157 23 248 73 209 253 40 87 237 0 119 127 124 172 59 5 255 152 231 231 95 220 179 161 58 206 22) #f ()) #(109 "indefinite length with additional element" #vu8(49 50 51 52 48 48) #vu8(127 196 141 66 242 57 222 81 178 118 209 172 169 47 245 77 254 87 163 148 137 146 246 118 194 3 109 240 170 201 13 244 242 94 71 199 19 197 82 241 4 131 148 82 181 195 138 5 41 253 194 178 29 202 204 160 71 12 130 199 164 44 128 131 126 41 60 228 175 211 193 236 62 8 107 150 29 184 32 157 7 60 120 81 235 19 69 214 246 243 114 221 53 135 149 240 192 39 97 162 109 241 208 168 73 1 168 202 99 225 167 5 232 65 168 30 132 144 50 248 254 251 14 57 67 196 91 8 228 120 152 65 249 227 151 55 248 107 158 216 131 57 134 77 169 146 46 5 32 44 193 247 63 195 33 170 49 122 208 39 173 85 51 254 88 107 70 249 43 86 231 163 45 174 237 59 213 229 103 101 117 12 127 248 68 89 192 192 213 251 29 23 240 160 185 120 43 32 59 85 25 170 215 138 135 42 128 189 123 10 239 187 203 139 141 28 94 147 231 242 133 6 202 168 38 122 87 95 6 79 78 109 77 243 150 87 96 130 146 102 210 37 225 52 53 82 250 101 120 80 135 26 254 247 157 47 178 91 186 209 200 74 71 166 46 43 227 213 130 106 73 171 71 111 56 103 133 100 42 209 24 104 148 204 84 47 185 19 8 166 77 16 0 103 138 152 100 87 131 152 240 43 132 237 31 0 39 196 238 40 165 202 95 201 125 94 43 39 16 127 109 58 154 104 230 213 238 186 246 25 77 34 237 187 222 101 43 73 111 196 253 205 101 187 193 12 41 45 247 195 232 161 223 140 108 203 47 112 180 230 121 168 32 221 37 6 146 146 106 223 191 245 209 39 242 154 4 101 189 140 135 25 167 174) #f ()) #(110 "indefinite length with additional element" #vu8(49 50 51 52 48 48) #vu8(25 80 150 56 115 175 174 245 21 120 36 27 121 166 3 91 75 91 81 217 80 197 80 170 0 149 126 142 255 110 199 46 142 124 92 148 57 235 83 31 47 5 12 62 54 56 233 70 188 114 49 177 14 161 78 71 191 241 18 71 187 131 217 132 197 109 154 238 17 255 176 119 44 169 21 207 128 185 230 245 215 118 143 202 120 126 80 81 195 21 0 125 228 207 140 11 105 122 68 169 85 222 79 86 153 152 97 163 216 160 28 137 125 33 46 243 44 127 121 253 152 111 142 208 153 85 97 122 63 91 220 192 174 1 106 65 76 238 90 77 244 2 150 94 156 212 104 132 68 146 55 221 211 4 233 15 124 104 86 212 140 167 199 201 209 160 207 77 47 33 204 221 186 110 113 83 221 246 93 229 35 10 11 33 86 42 149 105 189 100 63 185 38 241 79 13 38 168 225 74 195 223 58 32 81 113 19 7 183 221 38 14 84 209 248 156 38 176 47 15 28 211 120 160 155 33 22 211 8 151 156 153 126 66 251 222 31 172 190 182 159 12 120 142 57 208 155 143 135 151 187 101 249 242 164 199 61 217 93 2 128 89 187 182 128 127 231 241 167 16 180 83 237 22 191 217 84 143 202 98 63 230 80 218 138 112 28 146 87 158 74 130 54 27 66 237 58 34 198 2 118 84 124 120 67 129 63 153 132 141 198 10 163 23 143 76 1 248 118 59 11 93 61 214 132 50 19 181 220 250 247 58 100 197 98 138 53 83 234 161 249 85 238 151 184 231 168 55 214 148 19 222 159 97 248 156 43 142 254 107 155 108 127 239 66 26 36 159 74 139 231 28 42 156 249 0 226 18 25 8 11 38 81 197) #f ()) #(111 "indefinite length with truncated element" #vu8(49 50 51 52 48 48) #vu8(119 149 238 228 189 209 56 164 186 235 81 89 198 11 86 202 243 150 49 58 246 164 107 165 55 91 141 187 136 232 191 55 147 81 133 222 92 142 167 115 182 171 47 111 120 114 83 139 107 13 223 53 221 170 6 175 229 25 202 92 129 16 152 92 113 11 142 138 232 118 117 59 201 101 55 100 168 16 190 189 41 82 76 54 40 68 241 6 227 72 151 34 117 106 241 22 79 216 205 217 96 105 19 154 119 154 171 106 226 131 169 90 23 218 124 121 170 67 172 67 226 81 47 158 238 168 69 185 159 77 40 75 70 174 166 89 110 67 243 220 61 21 129 217 249 148 62 171 6 194 173 138 165 6 186 28 119 138 17 40 161 173 252 185 115 114 100 123 174 28 241 35 87 254 14 68 195 7 233 115 116 210 22 123 200 100 222 244 236 122 36 211 95 219 69 66 198 243 211 48 194 166 48 166 243 0 161 229 113 205 196 235 118 177 62 12 93 230 176 110 32 153 218 220 95 94 138 35 149 132 146 99 76 193 205 173 139 82 98 148 21 215 121 214 11 118 41 158 69 34 58 64 114 143 55 83 130 73 44 160 171 244 90 178 59 95 217 245 164 92 94 113 225 56 11 71 186 50 166 11 10 183 86 140 101 30 110 153 126 126 138 212 1 81 13 48 187 50 66 127 154 42 67 206 159 88 253 22 135 216 108 23 25 16 174 171 139 233 134 153 154 183 57 30 133 78 47 110 138 129 93 239 144 238 195 188 210 216 0 222 170 99 198 223 248 138 165 44 29 169 105 143 216 241 177 106 112 95 75 61 231 221 11 34 142 255 117 197 244 141 52 8 23 13 57 98 108 126 157 62 190 67 123 192) #f ()) #(112 "indefinite length with truncated element" #vu8(49 50 51 52 48 48) #vu8(35 136 122 34 119 107 186 49 124 36 136 36 61 119 145 108 247 6 39 94 59 142 203 186 82 108 1 100 161 30 123 83 105 180 145 187 216 228 180 19 86 114 137 195 134 185 34 252 17 31 20 156 92 17 104 212 158 18 85 232 209 143 40 177 115 172 241 176 240 173 227 40 1 208 201 86 39 235 240 99 98 107 252 190 62 193 23 196 3 49 237 39 87 162 203 43 108 249 158 0 89 38 12 185 118 39 32 59 126 105 223 252 250 208 153 239 67 114 143 99 17 36 10 161 237 213 212 5 81 8 9 129 8 162 61 60 74 231 74 227 182 191 252 79 151 170 165 10 65 163 213 178 46 190 118 127 224 225 116 154 60 219 227 255 64 233 130 217 211 72 120 22 1 2 175 193 74 16 163 146 29 234 107 137 221 129 61 253 104 2 242 110 183 111 34 49 134 252 52 84 181 153 178 244 82 141 103 110 253 24 183 178 142 37 181 217 4 15 184 239 10 242 195 100 145 71 139 16 188 161 161 103 65 230 39 111 226 72 46 99 227 181 223 106 56 167 116 207 14 36 105 165 243 214 198 63 58 104 181 98 189 99 199 145 167 17 225 217 55 156 201 25 221 248 89 3 16 176 74 153 216 175 149 8 240 166 103 56 254 45 5 25 206 42 88 189 206 5 232 105 26 251 9 92 76 96 187 224 255 24 242 199 50 233 17 144 179 219 203 213 76 83 55 177 33 68 217 138 169 24 180 99 195 179 169 97 18 18 24 183 12 208 50 39 43 11 187 28 84 91 247 167 185 254 170 110 183 125 23 156 19 84 24 96 169 199 139 183 215 99 34 127 90 20 83 63 168 67 76 99 229 224 92 170) #f ()) #(113 "indefinite length with garbage" #vu8(49 50 51 52 48 48) #vu8(1 209 161 87 218 51 53 93 151 182 243 99 242 206 164 249 139 49 236 26 223 194 212 82 59 64 216 250 41 63 46 217 62 165 120 74 109 19 58 77 136 88 78 229 125 37 16 22 47 161 108 6 153 97 234 144 75 50 68 111 193 164 102 146 101 126 15 220 46 224 112 25 90 195 152 53 159 253 157 51 140 64 215 39 82 65 118 113 79 85 13 149 240 230 233 136 169 187 132 96 213 105 234 250 37 46 163 92 57 143 235 18 12 176 104 201 200 185 206 137 33 16 161 164 103 43 223 228 22 107 186 254 102 114 0 245 222 3 73 62 116 232 150 11 154 250 128 15 229 179 177 163 184 236 133 123 231 80 215 170 200 156 169 92 3 116 77 62 103 234 89 158 8 202 231 250 207 255 30 179 22 208 237 38 100 193 241 92 53 89 243 167 0 14 175 137 201 209 42 178 196 205 33 43 230 74 134 232 12 202 182 178 60 78 207 46 255 62 251 132 216 75 194 11 179 113 113 123 241 186 131 189 212 52 108 51 34 18 243 30 130 201 249 216 155 123 93 68 243 98 133 4 97 79 160 183 142 212 219 17 227 250 197 4 21 33 232 233 228 218 159 74 118 136 67 225 218 254 110 70 105 242 246 83 158 148 126 254 36 222 112 28 66 94 26 99 246 170 253 234 25 223 36 195 124 35 171 178 8 156 10 73 154 157 220 47 22 228 233 45 225 152 49 219 41 136 177 229 59 113 27 207 189 179 81 147 82 167 191 61 213 86 115 95 131 239 159 67 140 125 146 252 42 86 19 84 177 156 208 40 201 185 233 42 228 32 55 44 70 118 183 214 129 164 161 206 173 252 17 68 77 191 187 160) #f ()) #(114 "indefinite length with garbage" #vu8(49 50 51 52 48 48) #vu8(15 248 167 166 243 141 194 157 10 181 134 5 220 17 114 195 46 5 46 38 149 123 125 53 50 247 8 115 82 178 26 228 145 120 36 33 141 121 215 194 239 239 209 130 132 216 43 138 225 137 116 148 156 98 124 213 215 247 88 112 255 148 236 196 180 116 107 35 216 73 152 7 40 109 32 253 83 33 95 179 61 234 162 54 125 129 133 20 116 76 58 170 135 115 101 210 58 170 197 40 144 166 161 75 39 55 249 6 153 125 91 234 74 210 192 230 255 233 95 40 73 71 96 223 190 13 33 227 146 163 87 250 201 186 18 106 249 220 27 7 151 87 174 173 173 6 49 115 138 195 135 52 6 77 34 239 63 82 18 111 102 108 16 237 5 210 181 219 120 246 114 95 93 225 167 243 87 67 127 50 8 239 79 132 38 194 130 67 9 166 224 231 232 42 38 77 165 120 33 81 100 110 113 30 73 104 136 108 70 98 248 124 53 123 185 49 17 85 220 44 203 160 6 66 200 98 18 13 224 199 144 36 162 133 93 253 151 80 155 21 21 154 46 78 236 70 123 122 194 119 143 195 93 46 148 28 243 197 212 106 147 28 35 117 47 166 147 68 182 236 241 131 105 56 6 184 95 72 153 46 125 31 32 139 227 17 154 55 220 158 236 241 49 250 199 31 158 85 182 165 245 162 29 98 167 194 66 46 17 178 197 0 46 249 83 166 243 78 28 19 145 22 46 80 9 152 101 251 36 182 41 126 213 40 207 225 148 153 153 228 139 40 208 233 39 240 58 200 194 86 249 113 26 173 253 13 151 233 138 205 18 233 199 162 51 31 240 96 18 138 147 80 141 19 176 25 177 33 157 244 242 207 84 101) #f ()) #(115 "indefinite length with nonempty EOC" #vu8(49 50 51 52 48 48) #vu8(64 74 113 187 201 28 237 91 96 121 217 76 167 160 228 198 1 195 177 44 124 30 137 192 188 231 24 171 8 153 205 37 161 195 57 152 88 72 12 221 7 116 161 210 74 183 33 65 245 7 47 111 200 82 2 234 108 69 253 237 177 150 19 53 96 236 157 225 137 100 224 225 108 196 153 89 194 144 182 158 91 128 247 208 206 163 64 117 171 36 34 15 18 163 36 250 185 46 222 8 159 100 92 244 195 12 24 39 92 61 82 36 175 83 227 112 63 247 182 168 65 58 174 180 26 30 57 226 157 65 152 102 152 167 170 119 147 164 15 63 127 56 158 51 134 12 125 151 253 31 21 138 138 14 255 196 141 8 202 157 140 84 253 78 200 13 74 33 14 46 181 208 156 154 250 230 251 87 136 202 180 108 130 81 228 34 133 135 154 135 47 27 72 184 71 23 34 52 231 145 32 4 126 173 134 90 186 243 22 130 193 162 209 4 244 10 44 188 179 41 64 79 149 2 237 126 159 155 167 225 237 166 185 74 54 168 178 143 253 74 43 135 48 184 111 144 19 181 54 144 99 97 86 113 165 142 198 1 188 201 112 63 61 246 208 66 117 34 175 244 136 229 125 35 169 13 175 121 184 148 186 190 232 167 62 44 24 181 90 61 92 139 177 106 228 126 204 237 241 174 248 13 193 184 77 217 194 92 42 246 189 57 218 189 13 223 57 108 68 194 44 177 86 65 221 156 196 9 177 83 141 103 40 17 27 33 1 249 150 71 230 155 146 40 245 34 170 212 14 63 152 18 249 204 79 80 107 235 91 102 98 66 70 109 218 78 126 142 144 164 201 209 57 77 242 59 147 231 78 202 35 147 164 42) #f ()) #(116 "indefinite length with nonempty EOC" #vu8(49 50 51 52 48 48) #vu8(100 248 115 87 143 189 251 5 67 231 65 45 88 94 198 15 149 145 146 22 82 157 147 206 122 22 175 205 250 87 123 210 241 170 110 182 96 165 242 171 59 121 130 125 225 151 23 122 70 30 106 252 196 68 144 157 149 95 48 230 82 78 79 165 201 165 150 44 122 130 74 137 56 84 60 57 124 37 86 71 31 108 10 3 15 183 159 12 241 71 238 41 83 42 170 213 76 103 174 234 168 230 219 75 218 168 105 113 31 233 240 33 67 249 184 83 44 153 229 140 58 102 41 197 225 123 154 224 43 24 105 95 177 196 201 230 28 250 198 120 199 95 162 122 116 74 129 38 232 110 13 29 66 12 58 18 95 58 112 91 254 106 123 255 37 103 71 188 240 71 202 179 132 44 218 110 251 169 39 166 135 215 217 100 27 46 140 213 52 4 184 81 11 39 55 23 220 52 102 71 104 136 51 124 55 196 39 249 119 219 9 132 139 141 31 170 170 124 22 59 143 244 96 143 249 14 141 134 118 112 62 187 161 206 252 164 76 37 199 50 101 78 166 212 94 192 204 88 189 0 33 74 33 124 5 90 234 199 242 220 239 93 202 219 49 68 84 162 225 229 114 74 29 118 33 240 124 42 119 176 141 84 11 116 227 99 36 77 135 155 204 21 132 208 177 121 174 17 68 193 227 216 249 118 146 48 185 54 189 168 211 139 228 80 162 35 161 157 120 14 201 63 95 230 120 232 217 230 209 216 26 73 32 50 15 135 51 179 124 221 4 118 108 26 218 177 254 255 99 19 101 120 172 16 83 173 186 161 170 239 253 37 89 208 38 158 125 192 26 223 244 235 141 140 153 2 188 66 84 154 215 103 95 20) #f ()) #(117 "prepend empty sequence" #vu8(49 50 51 52 48 48) #vu8(0 246 112 82 167 7 137 231 80 57 241 140 198 170 175 155 29 184 247 126 92 46 28 73 109 34 116 181 193 213 202 9 127 246 191 158 200 216 174 91 186 19 191 44 18 9 138 252 162 91 207 44 38 235 87 22 236 227 40 108 106 125 100 245 106 71 62 49 22 196 230 136 95 239 126 210 104 87 96 252 136 100 97 59 99 95 173 149 107 101 16 11 237 96 71 117 117 229 231 187 165 11 194 110 98 63 67 112 6 136 112 132 61 165 146 95 127 18 52 3 211 141 76 179 4 87 225 76 62 237 42 2 104 187 155 151 211 119 250 46 71 253 82 56 172 100 60 242 39 147 179 252 230 45 165 1 252 12 40 126 90 233 96 183 143 122 202 226 12 232 24 102 185 183 3 248 93 44 154 226 5 124 221 32 119 149 147 86 229 25 3 160 63 226 117 126 236 244 122 205 51 172 73 146 82 45 221 162 44 141 231 81 174 55 58 89 112 164 102 216 200 12 104 212 53 133 108 172 116 210 168 92 108 15 132 116 246 161 184 145 57 225 94 217 236 134 137 177 203 228 185 127 126 185 173 151 141 73 146 187 56 226 186 87 250 72 144 22 106 183 146 206 206 65 40 79 151 203 214 232 146 179 45 73 237 99 176 251 171 37 103 12 39 57 150 39 145 23 81 66 127 170 110 90 10 71 90 219 192 17 146 190 47 226 235 45 50 61 37 234 82 16 37 98 71 248 24 109 184 115 20 189 72 77 250 236 237 54 114 86 208 128 127 142 152 28 175 134 212 43 59 177 54 57 89 128 1 208 229 123 174 191 34 47 204 188 94 206 191 53 187 163 18 56 153 26 198 142 222 180 231 6 129 240) #f ()) #(118 "prepend empty sequence" #vu8(49 50 51 52 48 48) #vu8(66 191 134 241 122 130 234 108 171 126 184 66 21 119 150 145 129 144 25 237 130 124 72 95 170 17 133 89 71 24 58 73 245 47 176 246 197 145 222 97 109 46 197 222 84 128 168 1 127 177 188 63 120 94 197 229 100 140 93 185 16 27 8 122 49 179 253 125 49 85 170 215 123 105 174 61 207 205 214 227 32 49 246 112 20 52 54 191 243 36 86 111 114 122 148 8 186 177 149 160 171 97 231 158 136 77 194 250 102 176 13 165 44 12 104 63 30 159 177 96 22 67 159 110 144 199 195 239 237 83 220 231 238 233 219 240 82 135 201 43 35 211 217 112 183 69 163 75 128 29 253 249 232 70 218 43 74 252 8 108 88 218 243 235 17 50 131 58 151 153 33 109 166 206 115 11 148 173 126 1 235 238 238 23 121 78 41 95 154 222 10 126 216 177 181 151 2 62 149 214 126 35 142 151 142 255 41 64 192 130 158 124 240 193 234 136 91 23 128 59 55 48 194 38 185 126 161 171 22 30 134 44 1 131 120 154 114 156 49 35 43 89 106 252 217 177 146 214 154 66 158 210 55 31 221 242 188 173 17 151 59 210 123 47 108 243 85 248 190 179 220 162 104 133 41 48 231 200 177 148 188 153 155 146 236 5 158 113 34 191 5 184 73 192 100 124 57 157 174 218 247 153 152 136 29 163 184 106 58 94 192 141 126 196 122 211 112 18 209 168 126 106 164 71 112 9 239 145 23 106 166 31 115 220 192 64 225 6 59 32 3 250 43 132 99 94 107 74 32 107 164 114 29 11 120 130 161 163 227 96 222 54 47 27 1 219 106 254 193 205 1 66 64 19 246 111 175 44 80 62 184 75 57 41) #f ()) #(119 "append empty sequence" #vu8(49 50 51 52 48 48) #vu8(139 172 174 189 153 14 204 209 40 234 6 200 225 53 229 13 63 155 0 196 179 26 88 249 96 69 140 146 86 3 28 131 44 80 28 218 103 174 79 26 173 152 203 17 3 209 69 202 173 145 33 17 58 26 54 90 193 159 65 53 52 23 99 21 92 180 72 190 211 203 195 24 95 200 202 99 210 188 139 111 7 132 179 122 109 244 72 107 237 121 120 180 144 254 54 170 77 114 115 142 51 55 228 130 120 6 197 151 15 252 67 19 150 110 82 70 224 88 4 149 24 104 250 69 212 212 23 67 143 216 234 140 181 127 74 117 113 122 48 18 144 11 25 242 97 216 170 216 212 139 30 65 50 96 74 50 115 225 127 227 191 202 8 0 131 80 155 144 49 80 19 214 119 226 147 46 2 155 168 158 154 142 44 59 233 109 222 118 15 157 62 212 34 193 27 248 214 201 245 196 170 199 156 169 16 192 240 106 11 13 117 127 98 51 234 130 28 30 44 18 60 130 211 46 150 56 220 108 132 203 133 220 148 202 131 2 106 243 1 208 57 13 29 49 134 66 46 216 165 68 182 117 181 38 115 105 228 162 118 116 63 184 141 146 107 156 202 222 90 180 211 26 126 207 162 63 178 113 244 126 20 255 235 121 95 230 90 219 171 215 188 185 253 96 96 3 187 139 12 200 24 22 41 55 179 110 235 225 218 6 133 144 124 236 100 230 234 12 183 30 1 0 27 185 157 25 221 32 91 178 100 25 154 216 122 7 236 32 145 39 112 192 182 16 126 231 59 9 70 7 211 21 88 197 177 195 26 26 140 121 210 46 92 119 174 52 218 152 226 161 77 51 101 183 238 228 215 120 151 129 200 81 87 151) #f ()) #(120 "append empty sequence" #vu8(49 50 51 52 48 48) #vu8(98 170 145 39 216 243 213 50 133 129 77 155 62 102 254 63 117 100 74 209 202 7 26 106 137 94 205 20 141 127 183 223 150 5 173 24 47 187 206 212 249 224 120 86 63 144 147 152 180 50 77 77 25 45 47 122 187 130 132 69 174 215 131 212 201 199 106 130 234 215 254 223 16 147 16 166 214 88 82 170 238 255 135 230 99 3 53 68 120 8 84 116 246 8 115 240 198 119 177 173 145 56 222 224 222 37 137 35 90 18 27 107 190 253 107 125 142 189 61 41 108 44 160 145 195 68 91 52 106 195 159 82 173 223 18 72 153 85 252 79 240 173 33 143 95 93 181 171 128 133 135 252 66 187 178 5 47 151 130 0 31 130 139 130 148 186 30 191 76 106 103 235 170 235 238 243 134 181 110 35 85 93 249 35 28 194 43 90 73 236 222 227 86 73 113 64 64 113 83 135 241 49 59 125 142 44 230 230 13 32 180 170 57 77 24 14 167 220 28 112 167 30 115 140 224 96 72 237 159 31 110 161 194 98 195 247 127 97 57 104 189 134 73 11 201 28 67 247 233 48 42 44 156 63 147 77 226 243 104 213 22 208 105 57 16 180 32 169 243 38 137 133 44 182 163 24 79 232 21 237 0 4 142 44 168 124 249 180 238 83 193 120 207 247 191 51 152 220 212 68 19 106 85 182 117 62 10 249 81 204 142 124 83 113 45 217 129 77 103 237 30 241 130 139 61 130 126 175 83 218 5 82 155 221 45 13 36 220 26 214 75 231 189 104 159 58 234 237 254 49 168 239 116 196 100 83 149 59 31 31 52 102 2 13 255 108 105 13 62 6 213 237 159 81 195 242 143 211 35 157 22 52 185 61) #f ()) #(121 "append garbage with high tag number" #vu8(49 50 51 52 48 48) #vu8(83 152 38 136 154 138 255 115 26 233 231 49 8 60 119 68 135 33 65 200 237 62 77 4 1 49 82 40 142 209 222 237 160 212 45 192 122 112 174 243 192 83 164 181 80 153 237 207 217 43 93 248 183 51 70 166 43 243 229 190 44 50 110 211 178 87 153 114 177 131 3 19 186 81 18 105 152 133 92 66 120 103 69 242 183 30 56 205 82 46 64 21 242 248 146 140 138 206 72 22 30 28 176 146 133 140 172 192 97 231 185 158 59 68 232 90 80 167 250 253 24 76 167 57 230 221 240 233 245 203 4 9 63 127 43 35 7 6 31 217 158 29 166 105 26 198 148 228 117 106 228 101 23 175 109 58 150 129 9 103 14 49 122 153 229 25 113 146 205 244 255 8 60 126 4 79 70 190 83 8 133 202 254 222 160 108 101 127 29 107 144 36 88 225 2 129 31 163 203 89 176 43 177 240 79 2 64 181 161 71 21 32 220 78 186 247 14 160 204 49 223 177 115 97 68 214 21 199 199 122 75 247 50 231 119 90 175 3 181 98 50 120 185 111 170 2 45 103 14 154 4 53 117 191 205 194 119 186 80 245 147 42 5 212 0 119 97 204 151 227 126 10 152 108 237 17 107 59 187 104 215 122 15 110 50 70 76 39 115 169 101 228 20 253 217 191 25 161 207 176 69 26 171 189 150 179 179 226 115 32 206 35 145 52 61 68 26 164 4 188 199 204 16 117 80 189 179 225 158 179 169 84 165 5 79 218 202 57 161 78 244 161 239 161 69 154 170 114 200 246 139 160 38 64 4 149 167 107 200 18 6 0 171 83 234 160 149 203 45 250 57 150 222 54 41 138 196 234 212 7 197 203 115 237) #f ()) #(122 "append garbage with high tag number" #vu8(49 50 51 52 48 48) #vu8(110 215 107 12 242 45 232 137 174 96 137 210 252 115 156 187 45 185 195 72 192 53 193 177 194 180 0 52 44 135 156 115 162 184 52 115 122 195 56 99 234 191 97 228 82 195 50 66 30 244 177 105 38 67 206 110 229 208 143 35 149 251 62 183 182 210 14 96 198 254 46 238 11 166 77 157 218 59 185 94 123 107 91 238 100 218 191 159 28 44 69 12 17 139 15 59 130 187 185 211 133 28 110 155 177 170 19 142 245 217 76 216 169 118 95 122 162 176 231 111 193 109 105 122 140 16 206 111 144 1 192 5 6 75 176 116 11 245 234 234 63 73 242 119 176 27 250 57 83 118 241 227 61 62 42 233 148 36 87 94 213 209 83 109 199 119 58 204 148 97 150 146 67 27 232 88 252 148 28 213 63 86 166 132 22 50 33 92 223 253 164 29 230 124 193 2 171 145 21 20 11 79 151 162 42 108 228 242 170 239 170 3 81 102 151 127 64 76 249 86 207 10 37 214 148 92 141 143 85 128 228 141 119 238 42 218 73 99 209 57 203 68 120 53 113 20 133 30 57 171 204 250 119 199 187 112 182 216 244 172 229 59 159 101 0 217 217 194 193 178 132 137 248 141 169 22 43 76 254 168 154 56 121 87 2 219 206 71 117 213 213 215 64 155 255 166 147 66 35 50 39 94 245 248 44 232 247 184 131 0 238 194 228 9 103 245 209 114 78 194 149 237 129 36 221 246 130 138 148 248 186 139 124 8 77 24 104 124 150 209 198 57 255 136 218 43 66 175 125 178 251 142 46 80 72 133 35 61 234 167 19 175 130 158 195 246 36 224 61 174 36 171 19 137 49 231 3 132 238 118 201 179 90 1) #f ()) #(123 "sequence of sequence" #vu8(49 50 51 52 48 48) #vu8(119 34 39 212 19 33 237 160 184 224 98 95 135 203 85 91 239 183 166 150 157 246 61 3 146 65 8 197 189 137 151 75 255 60 105 216 220 150 63 49 95 105 17 204 73 215 107 47 87 91 193 92 205 102 130 146 150 97 182 89 178 67 107 57 69 209 88 242 169 87 33 236 30 184 234 64 56 245 175 76 248 82 102 169 135 183 125 49 139 108 22 49 153 149 116 191 203 194 130 128 220 11 101 107 51 70 126 237 223 117 197 113 41 101 126 229 183 125 103 17 24 212 181 122 85 196 104 188 217 26 15 113 121 148 51 190 183 175 184 85 138 192 231 15 249 30 212 133 100 217 58 165 90 199 155 53 196 104 175 87 203 100 221 214 42 74 213 108 41 247 75 190 130 155 88 108 203 155 241 176 172 86 251 151 97 178 120 209 84 109 45 157 140 140 84 130 47 113 202 71 146 158 246 217 136 137 85 39 246 163 100 191 189 5 135 242 75 139 209 121 15 220 163 239 243 99 57 151 145 101 165 148 142 241 113 37 172 142 141 63 62 42 171 134 128 19 86 155 87 65 122 83 48 61 90 207 251 209 30 101 229 99 143 196 249 217 178 60 22 119 158 130 171 56 195 83 171 40 46 184 3 95 209 113 46 21 249 244 65 190 135 115 37 30 83 98 159 190 154 77 142 171 167 96 123 13 66 99 223 41 228 37 180 115 69 221 186 180 218 92 214 182 106 97 103 41 201 103 198 242 138 41 232 168 5 125 124 43 236 84 216 84 200 147 84 55 186 34 5 200 166 21 80 29 9 56 161 141 16 243 173 154 227 242 152 132 14 175 135 180 30 66 173 129 30 184 186 72 217 21 150 47 245 238) #f ()) #(124 "sequence of sequence" #vu8(49 50 51 52 48 48) #vu8(44 234 253 73 222 98 252 253 41 209 3 8 163 126 132 231 184 141 153 13 223 213 120 125 77 77 148 92 67 9 254 186 195 133 161 60 40 85 85 22 27 193 79 131 255 95 243 38 218 11 109 98 120 189 167 189 167 188 183 172 215 23 143 141 113 224 194 151 235 60 152 232 11 151 236 110 234 86 76 246 73 51 234 117 211 69 143 204 77 140 213 98 84 217 30 254 214 21 41 83 190 255 119 128 50 239 56 73 37 177 228 92 145 171 48 171 106 220 151 158 154 208 44 1 177 234 223 201 99 17 180 206 152 116 91 5 118 233 15 92 244 113 207 156 117 207 52 115 221 203 10 103 77 11 61 3 120 126 132 70 255 23 2 196 250 88 133 32 115 140 220 72 251 206 114 205 120 103 173 31 245 163 86 21 181 29 213 212 44 234 159 114 28 187 18 216 135 241 237 88 174 93 50 105 215 129 247 100 229 28 27 205 147 218 90 179 35 105 175 173 159 107 103 33 143 155 248 219 192 252 19 116 230 126 195 96 177 131 89 71 64 182 61 41 216 99 64 210 24 124 34 145 210 128 211 80 158 247 204 211 178 203 253 69 255 106 95 103 191 31 146 19 91 224 244 183 204 41 64 12 173 228 18 225 82 45 129 161 56 213 226 118 25 153 56 101 248 195 215 63 194 75 194 235 113 71 167 144 107 37 216 150 90 68 128 196 187 70 180 199 223 52 143 208 216 49 25 181 153 97 154 124 79 217 133 170 170 16 64 100 22 121 168 174 105 170 162 163 163 21 85 117 149 128 109 227 80 243 61 193 105 255 41 5 193 180 50 222 52 68 60 207 195 128 159 245 236 116 98 172 15 178 165 242) #f ()) #(125 "truncated sequence: removed last 1 elements" #vu8(49 50 51 52 48 48) #vu8(79 195 152 15 136 216 218 24 20 222 217 42 63 74 75 214 110 82 78 44 109 217 141 128 178 174 86 181 155 0 6 163 50 192 235 239 133 183 99 43 99 236 133 82 138 236 206 231 207 9 1 110 194 70 92 0 207 1 44 50 77 33 219 128 190 8 57 184 127 99 28 5 29 125 21 46 37 31 98 3 197 233 55 184 247 86 23 111 35 86 241 62 148 126 71 97 149 72 117 28 78 187 150 182 83 47 34 81 14 225 235 249 70 133 28 210 12 9 133 4 66 157 215 238 116 114 215 173 155 147 217 186 65 94 117 71 119 54 8 131 72 72 191 79 128 254 253 250 35 58 149 250 154 83 91 222 50 219 238 40 160 206 56 101 11 240 34 187 220 171 163 156 67 109 127 126 45 27 199 64 121 252 168 223 185 195 175 251 127 88 250 249 8 55 170 141 119 3 130 242 112 232 21 118 75 82 162 235 63 156 44 49 94 41 0 7 223 94 136 27 4 27 75 238 101 182 221 199 197 73 148 135 52 172 142 26 141 39 242 5 163 12 104 176 235 54 182 58 174 227 115 224 228 254 48 61 55 152 140 193 121 174 22 149 82 175 151 93 105 204 102 61 130 225 21 159 221 139 26 161 78 250 60 244 101 66 20 1 211 1 254 199 29 239 47 161 177 193 133 187 110 146 23 38 123 52 220 46 19 178 26 94 214 134 64 230 152 24 32 243 73 183 211 88 22 162 238 174 181 136 29 18 48 14 0 34 161 84 119 222 21 154 201 1 80 18 186 206 254 75 193 116 159 217 109 31 177 189 34 115 248 110 106 115 54 136 99 44 206 229 81 236 113 205 104 247 242 4 85 76 164 141 52 91) #f ()) #(126 "repeating element in sequence" #vu8(49 50 51 52 48 48) #vu8(158 149 71 173 251 145 145 9 163 167 41 27 176 65 248 164 49 236 34 154 146 44 12 242 86 193 106 92 66 44 134 2 146 255 198 38 237 0 240 154 225 250 167 35 15 87 33 128 124 10 153 19 64 145 198 171 11 114 103 98 89 44 214 30 170 76 88 239 32 70 145 44 152 129 17 156 81 124 132 49 80 150 250 11 114 158 194 1 168 4 202 76 74 75 52 212 118 142 151 255 9 144 83 246 166 40 238 235 111 48 82 239 178 106 97 228 95 101 234 70 182 160 143 68 111 35 158 206 56 119 94 221 245 126 255 95 44 216 255 185 212 250 228 52 140 122 78 148 160 142 187 154 173 229 124 220 171 45 57 40 92 219 207 150 78 92 91 23 94 244 27 79 218 70 182 61 138 129 0 68 217 58 4 211 68 224 114 255 52 142 248 197 143 119 221 11 70 54 153 4 241 116 177 68 255 238 98 173 139 29 68 166 112 37 165 39 167 38 27 120 168 49 179 249 31 57 158 195 223 213 187 56 229 153 164 133 233 182 60 218 20 248 171 6 193 223 35 107 33 11 218 115 130 223 107 26 216 144 79 254 68 247 11 137 61 153 13 50 18 70 213 65 180 9 13 235 224 47 41 105 224 66 68 20 74 52 94 78 137 241 238 90 81 198 163 216 58 139 24 102 21 44 186 5 88 102 238 166 65 122 230 12 247 43 104 140 94 123 26 25 25 205 72 19 175 222 214 133 243 199 143 142 218 254 107 214 66 175 35 45 175 46 18 164 9 112 8 168 231 161 170 125 61 78 85 131 204 146 34 70 164 253 5 27 218 92 30 118 181 248 156 40 171 232 141 96 111 134 185 194 101 18 166 213) #f ()) #(127 "long form encoding of length of oid" #vu8(49 50 51 52 48 48) #vu8(64 155 172 15 56 92 93 117 252 201 236 138 99 206 241 176 11 42 160 180 149 131 172 86 201 234 105 125 112 78 245 52 114 54 163 81 0 125 253 116 32 19 77 251 140 134 11 196 125 11 214 227 3 38 92 197 219 139 242 212 98 116 76 174 6 191 217 185 42 8 46 240 145 27 200 40 125 194 2 178 228 137 58 193 82 23 172 178 194 152 89 207 202 5 118 158 144 232 189 16 16 182 125 166 162 176 189 164 195 16 23 74 151 128 73 43 128 41 39 244 88 218 83 218 157 105 239 232 172 67 108 90 14 190 6 196 208 198 45 68 33 240 24 244 104 117 155 54 206 5 12 139 36 46 64 112 213 174 149 52 64 104 113 174 161 167 214 87 54 118 58 39 189 151 217 8 40 240 242 23 167 69 252 244 84 100 13 222 57 3 4 50 232 179 207 146 104 108 54 127 166 175 250 227 189 95 221 197 120 3 137 138 136 14 162 137 120 197 231 231 107 222 24 244 81 234 59 42 137 214 136 205 93 205 95 25 209 96 15 242 34 135 95 132 16 14 190 46 151 194 217 138 189 254 156 187 183 51 160 242 87 188 24 122 23 19 38 38 140 251 222 241 42 202 162 129 37 6 47 223 62 158 221 117 106 216 237 158 105 91 97 203 201 173 185 64 70 72 6 147 230 172 213 180 21 220 166 149 81 219 234 104 131 248 97 27 153 74 181 125 115 101 87 182 194 215 168 97 57 58 12 142 157 170 75 224 251 59 161 50 1 244 26 86 112 31 25 83 195 252 245 78 38 21 162 11 21 162 251 115 98 45 31 82 114 169 193 21 13 201 117 136 127 3 42 11 207 22 129 4 26 33 197 39) #f ()) #(128 "length of oid contains leading 0" #vu8(49 50 51 52 48 48) #vu8(80 109 143 161 244 221 50 34 239 77 29 184 13 116 117 98 204 218 58 191 193 41 66 102 16 144 23 128 36 19 0 173 44 82 232 205 94 228 75 73 153 40 215 212 45 189 55 208 160 221 192 172 46 88 58 104 199 99 204 63 216 231 28 184 2 136 196 165 208 196 251 143 249 26 191 153 202 222 186 54 145 152 42 47 49 131 128 150 208 217 225 185 230 93 128 48 113 138 161 25 36 210 47 73 214 207 192 64 110 198 175 5 219 201 236 77 30 138 177 57 24 52 63 106 151 63 210 61 94 215 189 5 96 54 133 197 147 11 221 147 195 19 194 144 206 103 143 242 93 129 92 46 70 157 214 204 207 145 75 202 214 232 189 81 33 186 245 137 218 205 169 240 74 34 203 232 177 208 65 227 200 235 111 144 42 239 34 133 144 102 234 34 254 236 195 60 137 138 127 194 84 202 31 132 214 108 241 65 215 177 189 17 153 7 7 73 248 245 132 235 126 192 171 129 147 115 164 119 9 22 230 90 204 11 224 6 195 1 175 44 12 167 44 207 191 64 218 227 126 49 97 147 85 91 172 86 250 152 44 0 52 162 199 201 120 95 88 204 64 148 95 236 124 10 209 69 192 59 171 193 106 155 171 2 86 42 250 77 254 174 206 211 44 196 9 211 68 236 20 55 48 194 144 121 31 231 138 61 111 142 242 251 177 99 206 197 237 84 142 99 31 67 211 225 23 37 138 184 193 95 111 98 234 215 170 243 213 144 249 253 92 115 233 71 102 23 129 250 31 86 195 239 201 89 103 86 198 189 190 75 62 60 138 5 191 102 34 12 162 52 230 4 60 144 14 153 57 214 137 183 239 74 206 255) #f ()) #(129 "wrong length of oid" #vu8(49 50 51 52 48 48) #vu8(136 18 223 5 175 180 189 184 101 104 207 221 35 69 167 123 170 191 239 167 250 253 57 60 121 4 76 53 118 250 123 69 55 232 52 103 110 162 37 1 96 72 53 204 104 80 48 250 89 107 181 214 236 78 143 117 214 93 12 105 148 159 207 40 241 182 113 17 85 188 241 149 18 24 141 252 138 252 195 82 27 125 135 92 219 186 167 204 77 153 60 103 227 173 164 245 84 242 42 77 108 42 192 51 231 226 238 246 140 241 202 137 163 38 123 24 145 30 130 192 170 114 244 82 191 202 123 41 97 115 244 226 88 66 98 73 66 52 84 22 144 101 118 88 123 151 245 154 17 113 123 172 88 204 231 51 120 18 185 247 194 36 173 4 166 179 194 35 110 241 41 131 151 89 121 252 64 113 156 254 199 170 63 74 22 145 86 176 60 231 149 46 59 247 175 124 60 223 154 181 100 60 46 67 170 21 1 48 108 219 242 15 127 44 163 175 71 164 190 93 157 102 140 80 60 228 64 109 42 149 162 9 167 158 8 21 7 237 212 96 154 165 103 55 55 244 139 4 52 43 226 10 161 180 105 105 152 106 166 97 86 253 169 27 0 34 11 171 46 76 149 133 195 163 90 22 6 170 233 229 119 97 47 52 254 24 239 12 236 24 119 196 150 101 195 75 23 194 230 188 32 98 121 140 31 29 56 96 44 116 32 196 20 234 61 235 9 142 204 184 88 242 42 213 135 123 226 76 28 68 199 2 95 147 79 104 181 1 90 61 158 224 211 153 26 150 212 135 15 14 123 70 146 98 72 135 44 196 106 116 215 194 114 250 237 86 249 9 129 163 10 213 92 137 150 243 132 41 98 138 253 254 180 20) #f ()) #(130 "wrong length of oid" #vu8(49 50 51 52 48 48) #vu8(113 49 249 242 239 112 206 239 105 217 10 218 204 116 221 223 91 130 199 240 186 106 221 110 77 83 190 72 120 97 253 143 91 19 253 45 155 180 184 98 51 108 239 191 211 105 255 236 91 123 55 215 127 94 109 84 212 239 220 197 92 117 207 239 85 0 172 57 170 224 89 123 251 246 178 196 82 58 156 185 126 83 158 79 3 131 220 179 174 164 199 5 1 93 23 72 164 225 29 190 217 151 156 5 235 95 117 121 166 11 98 82 64 173 227 22 206 251 156 5 102 71 146 126 23 66 65 73 28 135 160 237 1 18 141 8 158 80 216 120 64 58 74 41 70 211 21 202 3 64 3 176 137 159 75 185 86 19 80 152 50 199 108 204 190 212 206 63 121 74 235 168 62 143 89 36 78 130 48 189 159 124 83 82 209 45 155 175 187 69 177 30 109 89 57 141 104 73 146 11 24 118 8 42 176 88 230 130 231 254 199 156 30 14 199 186 106 149 183 43 150 80 81 109 42 37 210 132 112 211 30 146 50 0 39 153 53 60 28 194 201 33 55 44 180 227 136 64 70 101 1 181 134 41 206 181 27 29 189 23 100 59 228 172 181 159 195 205 180 77 226 76 170 73 250 206 210 21 250 204 216 213 47 67 124 138 165 229 41 67 111 172 190 156 30 253 133 200 113 182 95 255 7 93 109 111 174 195 167 231 189 37 245 234 254 166 43 234 0 124 69 207 219 184 188 24 152 53 8 140 6 145 72 143 76 162 176 214 166 37 11 94 31 199 110 180 10 164 21 217 238 239 207 102 90 65 238 11 181 61 66 26 39 194 88 10 168 156 110 37 221 189 166 158 150 61 146 20 85 145 190 248 185 16) #f ()) #(131 "uint32 overflow in length of oid" #vu8(49 50 51 52 48 48) #vu8(44 71 142 127 226 131 92 229 54 49 34 195 121 236 238 78 124 173 49 23 61 194 72 19 74 148 42 114 76 51 98 0 217 16 19 147 95 191 128 168 245 168 31 64 151 28 204 73 27 165 101 12 195 114 94 40 105 183 110 6 163 15 236 168 13 9 180 140 137 105 105 84 187 145 164 23 68 8 42 179 166 159 58 91 138 18 42 146 127 217 231 244 30 110 83 162 101 130 214 98 91 225 225 184 202 191 63 250 90 243 80 12 249 210 19 25 173 95 198 237 216 94 231 147 85 98 250 41 207 178 203 63 188 172 154 171 165 247 229 210 226 82 246 211 14 252 32 210 23 98 54 250 103 13 75 1 52 239 165 112 169 191 95 174 139 184 141 164 83 111 71 118 245 191 181 48 72 48 171 140 185 207 141 243 249 6 101 176 130 238 126 204 3 233 243 103 6 202 217 215 251 41 60 46 70 120 0 68 42 179 156 1 80 48 75 102 140 239 111 132 178 175 222 135 114 143 66 152 2 133 142 105 136 248 182 206 216 148 219 226 67 83 229 226 229 51 16 172 188 194 145 182 136 231 108 6 39 21 42 201 45 157 85 121 188 199 59 56 178 117 128 117 105 231 255 55 92 185 60 151 126 82 177 242 30 172 147 52 185 225 165 230 138 181 251 25 48 184 16 245 99 108 251 56 100 72 65 62 168 10 129 116 166 22 177 11 156 250 50 29 188 100 143 157 31 139 138 200 8 124 236 149 157 130 69 242 189 14 193 187 172 219 150 175 230 10 187 92 125 180 61 152 121 12 195 195 241 150 161 191 35 170 22 22 35 26 218 19 165 95 246 179 69 185 1 152 88 142 61 68 235 116 46 206) #f ()) #(132 "uint64 overflow in length of oid" #vu8(49 50 51 52 48 48) #vu8(99 25 222 189 38 58 9 33 249 217 53 248 176 51 166 95 110 159 217 190 191 167 163 131 230 220 44 10 174 153 105 162 210 155 111 139 169 201 212 103 243 17 249 222 61 10 247 82 48 188 214 98 183 104 31 73 103 171 29 212 175 206 163 171 207 18 167 196 184 155 62 49 226 45 17 42 174 231 110 17 75 152 184 16 147 104 78 81 114 178 111 24 222 180 93 71 119 41 87 212 246 140 213 243 158 13 112 21 217 131 237 213 52 176 186 89 175 160 241 236 192 207 206 116 139 164 47 249 195 198 245 79 196 71 163 67 194 74 59 94 36 77 24 209 92 212 58 55 227 204 244 224 163 74 11 99 97 182 80 242 124 217 12 233 36 31 48 121 117 221 238 5 148 84 48 38 44 104 240 191 8 175 230 12 135 250 111 42 168 207 11 38 230 114 38 205 150 46 28 160 227 175 252 229 81 130 226 109 197 242 158 14 188 72 161 217 174 131 112 65 203 186 40 70 26 204 182 119 172 121 59 59 218 230 16 199 245 207 211 173 34 19 23 200 29 106 43 24 65 93 45 0 194 93 39 89 181 9 203 229 225 169 158 233 204 161 161 209 95 142 193 251 100 43 42 135 114 230 24 97 186 253 140 103 201 58 131 81 52 233 172 240 63 118 48 225 226 201 154 31 233 172 8 189 252 195 26 108 136 132 93 154 14 85 42 63 172 132 250 18 2 190 164 173 40 104 251 216 160 139 3 104 185 161 218 7 141 53 118 98 94 183 43 127 103 107 158 103 189 175 104 126 134 122 102 215 1 71 240 155 0 146 0 190 189 74 134 98 2 185 222 125 201 114 152 185 22 221 143 173 248 23 206 42) #f ()) #(133 "length of oid = 2**31 - 1" #vu8(49 50 51 52 48 48) #vu8(23 164 94 250 136 5 139 223 192 18 88 121 152 225 99 38 106 27 94 41 244 116 183 127 206 29 105 154 238 255 237 145 210 88 108 15 182 93 32 87 43 171 65 230 120 80 14 62 3 253 114 2 248 159 139 204 54 61 79 235 64 190 72 119 173 81 194 179 31 35 164 201 150 126 132 224 49 13 53 168 49 241 244 202 171 156 173 19 247 223 99 148 165 35 117 188 221 169 124 76 141 244 131 238 209 115 92 234 204 155 177 39 10 205 47 142 43 113 223 237 189 96 178 194 11 250 115 32 83 71 61 223 46 57 122 106 140 30 221 1 225 211 126 236 38 166 212 235 133 128 113 203 149 16 67 104 185 69 112 150 192 180 241 232 197 30 126 81 162 185 0 127 159 136 182 58 168 49 115 221 246 46 12 30 65 71 32 21 34 8 147 247 199 148 127 219 197 117 158 177 176 95 16 4 64 238 126 193 102 131 74 51 56 141 10 192 214 179 45 129 200 56 83 244 110 248 94 141 182 59 30 184 67 47 127 29 51 217 97 66 110 174 186 65 86 151 116 54 174 78 53 57 166 135 160 44 8 214 214 32 31 87 36 76 131 209 31 95 224 3 21 72 224 38 124 155 236 18 92 190 94 162 235 45 167 41 134 180 119 39 70 152 69 93 148 169 166 146 103 133 22 130 236 226 218 50 174 236 26 235 102 108 249 105 202 237 40 29 205 29 60 217 114 156 213 98 24 131 151 87 118 181 218 139 241 164 44 99 75 207 49 108 95 20 102 189 184 156 120 239 111 104 51 99 100 203 158 46 41 218 221 114 209 156 145 85 3 158 180 178 89 145 76 13 33 206 7 20 95 131 60 99 141 191) #f ()) #(134 "length of oid = 2**32 - 1" #vu8(49 50 51 52 48 48) #vu8(61 9 44 8 177 56 34 59 89 77 168 63 207 254 6 208 144 223 243 8 125 170 49 61 159 105 31 249 21 114 105 74 205 121 97 128 22 162 17 40 213 236 38 111 254 111 253 69 165 93 158 33 204 45 50 104 13 18 212 107 12 250 51 45 126 182 118 218 189 201 39 19 37 237 38 217 169 228 109 211 212 162 52 135 36 102 26 80 197 24 39 255 205 17 35 228 59 9 173 100 104 56 170 213 55 44 234 247 165 216 233 208 169 218 241 193 20 76 8 115 49 193 223 252 58 74 251 100 2 40 89 2 192 192 161 205 220 211 156 23 213 158 38 186 135 87 79 157 25 227 222 166 169 7 64 154 140 230 10 26 52 63 153 192 63 211 200 194 48 76 77 163 248 86 210 152 60 234 46 33 41 152 173 239 187 74 60 17 225 29 247 52 182 37 38 91 73 245 128 173 115 54 102 228 32 214 64 255 249 137 103 102 107 159 19 93 132 41 6 229 74 32 235 146 37 3 224 191 11 130 146 55 64 76 55 107 159 167 102 239 10 31 146 17 253 38 142 238 194 151 131 63 26 43 106 95 141 5 139 59 127 76 240 101 70 48 125 172 154 143 137 131 180 35 197 228 227 91 214 1 93 223 26 154 17 128 135 202 158 131 98 96 164 73 21 33 99 67 138 2 124 41 73 72 180 183 45 133 232 253 154 130 150 97 93 23 227 112 134 75 143 15 201 156 60 23 125 120 136 146 64 180 125 214 244 41 251 85 23 32 62 69 238 232 50 172 167 18 223 188 225 46 225 18 221 232 97 59 40 92 169 204 98 170 183 94 185 238 35 162 233 173 247 161 207 141 54 239 85 188 162 99 193 138) #f ()) #(135 "length of oid = 2**40 - 1" #vu8(49 50 51 52 48 48) #vu8(64 92 217 71 138 213 77 244 21 250 238 118 176 44 228 74 142 165 85 233 254 177 54 87 254 15 208 235 126 153 167 25 92 207 128 174 168 9 77 244 143 173 89 244 253 126 139 56 61 26 206 9 86 112 156 210 204 74 96 24 229 227 100 220 8 103 254 129 241 155 24 167 112 252 130 81 152 72 207 51 129 57 204 223 237 120 197 182 153 101 46 228 174 221 93 82 157 81 202 65 170 174 98 52 105 132 139 3 59 186 59 184 152 233 231 58 77 107 112 159 150 151 206 60 136 157 43 242 177 0 252 121 254 238 14 91 180 202 152 149 214 122 223 211 19 252 233 191 88 163 222 169 182 19 154 126 247 19 62 7 243 87 193 8 23 71 230 9 63 161 15 114 91 255 206 251 62 167 158 128 230 108 136 112 229 204 147 60 71 154 100 230 130 249 188 196 89 69 149 129 228 131 234 196 26 39 175 25 128 35 172 168 6 183 131 59 23 55 145 39 150 84 109 217 54 223 193 228 199 227 231 181 213 132 192 120 215 89 48 194 107 109 83 213 188 8 110 209 181 145 106 2 64 155 98 84 162 150 187 15 221 237 163 28 59 38 181 134 95 22 85 195 70 84 180 180 106 252 97 202 191 188 67 157 197 245 162 130 16 125 251 115 225 108 64 233 98 54 16 29 217 152 206 131 17 53 85 41 199 152 34 202 68 46 177 191 8 155 111 50 190 251 74 67 12 211 179 140 1 92 43 124 94 116 178 230 113 110 166 216 147 248 131 10 32 9 45 184 85 16 231 33 235 88 16 163 188 122 83 28 181 226 99 234 75 28 133 30 199 141 165 48 198 148 34 109 108 92 208 24 241 222 242 30) #f ()) #(136 "length of oid = 2**64 - 1" #vu8(49 50 51 52 48 48) #vu8(19 9 48 91 71 207 44 98 147 88 26 73 142 192 217 192 186 175 104 40 34 193 233 60 23 56 81 155 56 69 197 53 175 201 93 9 140 197 19 14 81 58 234 133 136 159 56 46 237 185 36 71 4 107 118 44 43 167 110 235 137 244 201 116 207 184 193 107 14 37 129 120 200 171 6 182 170 188 55 102 153 132 196 219 94 194 238 199 205 119 133 224 250 194 88 206 78 192 20 93 196 64 31 244 106 51 200 232 77 216 52 115 39 121 146 129 236 71 90 153 140 201 46 166 11 177 67 9 84 241 116 248 98 142 184 79 70 56 53 20 131 122 51 164 178 158 70 19 10 217 209 129 39 124 79 210 64 92 154 65 247 150 203 87 183 218 38 34 85 218 36 62 118 177 49 82 52 194 65 54 58 191 88 119 209 235 188 212 83 177 122 60 210 87 117 121 235 192 226 183 69 123 150 94 51 73 26 252 66 8 60 172 133 38 214 244 68 70 66 91 19 218 9 33 127 178 207 179 171 95 181 162 216 75 131 113 149 238 165 141 65 42 131 114 108 182 125 239 123 197 243 73 196 178 95 236 156 81 43 187 59 52 186 6 211 62 111 206 19 185 145 185 234 118 151 107 44 100 22 65 233 212 106 30 209 148 68 222 185 242 15 152 236 31 209 247 202 176 37 226 57 76 94 101 154 187 153 104 71 8 4 33 44 43 197 38 163 237 58 227 140 83 65 187 238 59 35 100 65 196 5 102 191 152 14 252 209 179 49 157 83 104 118 64 58 153 98 248 216 77 43 251 101 187 203 199 245 231 68 143 47 129 65 136 17 237 161 183 88 3 25 81 194 199 206 126 14 55 93 119 9 68 108 17) #f ()) #(137 "incorrect length of oid" #vu8(49 50 51 52 48 48) #vu8(29 122 247 48 59 116 128 162 212 146 248 121 40 238 88 228 179 14 90 71 205 227 124 195 104 150 61 83 150 97 181 3 32 42 19 219 61 8 172 80 125 159 152 99 79 134 154 207 109 120 36 246 95 206 207 3 247 250 255 93 81 115 46 35 240 58 32 167 132 128 138 79 137 241 196 24 165 154 124 167 209 165 221 215 38 190 213 50 191 164 152 148 42 111 180 220 184 163 49 100 26 38 27 148 246 11 67 192 168 87 87 143 179 18 43 104 45 138 59 249 249 124 93 152 35 30 9 29 106 111 53 211 179 170 59 45 35 151 193 81 56 196 201 28 231 216 249 107 84 160 190 250 181 102 36 66 180 255 48 219 26 13 6 151 14 156 24 49 121 140 101 71 30 96 165 240 231 108 197 96 127 193 45 179 236 71 144 68 250 42 201 176 211 106 39 148 147 26 100 74 254 117 75 67 113 105 137 180 219 42 70 42 139 230 155 140 124 194 251 215 138 251 104 24 22 178 31 235 123 167 17 86 234 180 173 77 209 150 172 227 144 142 188 202 0 215 72 115 39 232 101 118 158 155 135 126 77 28 23 45 74 231 122 24 59 251 236 163 78 11 39 243 209 245 15 103 57 250 249 130 228 99 64 230 108 137 188 237 80 70 118 77 61 217 176 44 110 24 219 21 28 234 249 210 120 157 90 146 54 117 231 46 137 201 224 26 162 39 15 36 163 19 134 167 204 100 137 127 76 121 213 128 32 99 73 34 194 146 107 114 176 208 13 30 162 128 153 17 100 101 187 81 32 198 73 71 201 130 27 168 64 192 252 177 144 109 250 136 174 217 67 17 81 246 7 31 216 46 56 131 48 0 158 135) #f ()) #(138 "removing oid" #vu8(49 50 51 52 48 48) #vu8(19 147 16 56 117 61 193 163 246 50 150 109 48 19 64 188 141 110 99 3 138 196 233 229 191 211 168 153 195 250 168 188 55 0 147 19 241 22 224 56 229 94 130 8 124 245 147 169 120 212 245 108 174 185 248 230 134 136 122 227 81 184 199 12 6 82 94 8 80 174 21 52 253 150 136 127 171 86 97 188 249 172 138 213 26 32 152 50 230 7 111 248 161 81 76 29 34 157 215 126 30 123 16 196 71 105 205 54 38 18 108 182 35 31 74 24 217 188 191 32 230 19 235 210 176 138 133 90 136 173 182 31 31 198 106 19 79 94 55 254 153 26 29 121 78 204 228 215 69 199 19 238 101 194 147 100 63 65 141 53 174 35 53 247 109 194 104 51 100 103 76 103 93 147 166 224 158 184 80 167 3 101 124 11 48 250 242 38 139 236 97 232 207 18 148 105 109 168 189 200 161 57 5 22 156 45 207 190 103 227 232 142 2 92 193 9 106 141 2 145 13 218 96 116 190 145 74 37 67 80 106 166 26 242 60 194 235 179 106 241 142 79 213 251 19 248 145 171 18 167 111 60 39 65 67 35 42 139 154 233 137 203 6 219 54 120 161 137 72 143 234 158 31 85 128 211 85 66 16 140 177 39 192 86 233 35 8 24 103 211 159 62 0 205 23 219 225 142 190 161 242 55 14 17 86 136 14 234 106 157 100 159 6 37 12 246 14 114 188 5 135 156 97 167 149 60 88 129 150 108 1 117 25 68 113 107 253 241 150 51 36 120 248 131 200 193 98 31 150 152 201 117 182 173 243 211 100 44 178 203 253 131 202 124 138 94 204 212 89 110 25 103 127 66 190 22 45 209 151 49 161 228 214 163) #f ()) #(139 "lonely oid tag" #vu8(49 50 51 52 48 48) #vu8(32 8 156 232 69 197 163 200 162 142 57 1 199 67 134 241 247 59 171 230 43 99 155 99 109 109 48 119 41 221 92 146 216 167 60 151 10 136 10 213 234 121 164 182 141 13 142 159 103 44 84 65 190 149 249 219 116 1 1 249 158 80 118 231 87 46 36 138 147 80 65 103 176 239 124 71 165 76 161 89 177 56 86 214 100 140 4 159 242 204 19 43 234 73 62 187 191 222 99 72 112 108 76 33 4 165 62 140 144 152 169 13 89 201 121 40 207 85 136 200 35 114 34 71 8 73 220 222 182 110 191 166 190 227 55 51 225 109 80 239 168 247 154 196 197 166 198 209 185 133 23 130 240 254 81 69 186 153 142 222 207 55 142 153 158 145 216 210 144 7 172 68 49 198 45 229 118 185 83 85 111 155 237 188 198 180 21 183 178 159 173 246 82 74 65 164 171 207 1 189 54 119 147 238 184 65 186 147 76 87 28 146 197 44 247 102 66 246 241 233 49 168 208 118 84 11 237 86 236 233 66 29 191 95 150 90 130 141 177 22 39 236 6 37 144 134 157 41 12 39 2 13 90 175 61 98 108 171 135 0 242 13 103 47 108 160 148 30 5 151 57 116 78 209 146 212 220 244 232 53 182 28 116 228 83 123 60 58 128 88 108 104 180 125 254 168 238 66 157 193 205 68 145 101 158 175 122 135 169 253 225 22 218 201 235 66 84 174 178 101 244 240 221 211 53 73 166 62 217 9 109 129 241 119 146 179 228 238 160 109 177 156 216 123 0 148 124 226 250 21 132 184 155 38 204 126 236 155 196 139 107 119 192 224 211 6 160 188 90 194 248 130 60 70 71 2 212 145 218 144 253 72 231 192) #f ()) #(140 "appending 0's to oid" #vu8(49 50 51 52 48 48) #vu8(68 113 55 132 24 254 59 175 83 137 249 16 241 118 88 98 180 79 69 41 247 253 238 217 173 232 242 37 6 21 46 7 15 128 236 157 201 165 85 71 219 104 135 98 135 79 224 107 225 193 20 80 112 180 233 24 5 194 50 133 235 92 26 46 46 13 83 163 67 21 22 160 81 214 184 128 186 227 219 204 106 222 195 147 77 50 57 16 238 220 241 235 173 1 147 231 90 209 124 198 250 231 120 169 46 92 108 52 96 35 95 22 137 169 214 175 150 71 27 107 73 98 193 13 185 168 62 114 226 97 78 44 187 215 136 115 90 158 213 149 92 90 10 138 96 155 91 10 220 125 1 228 159 151 187 195 58 51 193 164 125 15 213 34 225 175 51 60 122 121 228 211 203 104 163 86 175 184 18 212 77 75 213 117 121 25 96 227 117 160 234 68 230 93 15 91 32 126 204 226 1 198 72 79 240 108 34 146 190 218 184 208 94 129 253 251 20 103 158 128 206 34 23 62 33 244 138 166 38 183 235 43 146 179 125 248 117 161 67 28 227 176 159 249 125 108 220 247 85 140 94 116 92 36 83 220 208 43 60 189 183 142 143 79 216 4 219 223 217 204 156 36 239 147 52 223 63 150 91 169 153 229 86 116 95 113 122 50 83 70 247 165 62 58 37 121 114 6 157 165 114 212 11 7 82 142 207 176 18 113 250 4 215 172 20 144 202 76 111 45 76 112 222 71 134 109 141 57 230 152 251 144 250 181 60 7 41 40 65 90 120 79 94 253 45 146 34 73 79 8 150 7 221 27 97 202 110 220 134 173 60 38 177 205 131 30 191 11 240 194 93 133 209 245 74 224 207 240 174 241 119 190 191 229) #f ()) #(141 "prepending 0's to oid" #vu8(49 50 51 52 48 48) #vu8(36 97 158 68 101 209 240 239 72 166 106 24 166 199 106 17 252 147 131 190 108 185 209 158 196 252 9 40 149 156 109 150 249 228 86 101 148 154 11 220 201 162 96 147 41 24 88 81 179 163 83 119 184 72 49 247 180 248 246 22 141 119 210 81 105 255 209 247 71 48 60 147 222 13 147 156 145 46 252 90 22 67 157 21 18 222 248 33 54 148 199 158 254 89 216 83 81 228 102 202 20 139 28 228 59 116 105 47 22 97 233 83 115 187 80 119 198 89 27 208 168 103 211 23 255 213 185 143 34 131 80 62 78 233 206 87 145 58 219 2 222 241 79 3 2 56 147 23 241 99 48 26 63 27 177 119 188 30 145 187 93 136 167 210 48 111 84 54 42 26 81 56 169 188 22 83 218 11 176 169 192 241 60 31 58 255 206 107 176 162 142 11 66 135 245 207 240 51 216 5 90 145 94 57 173 41 205 249 208 137 115 216 29 243 77 90 3 46 83 70 104 4 133 145 118 238 200 165 47 18 19 76 136 114 130 149 85 102 207 89 3 133 242 45 75 145 120 193 253 17 18 14 136 0 241 156 16 229 179 221 67 45 167 139 49 125 84 48 95 118 87 159 211 135 83 150 31 182 108 97 247 232 29 138 54 157 161 177 237 228 123 192 221 238 99 80 92 83 87 11 44 121 81 99 25 242 175 160 84 103 204 58 57 57 201 237 94 13 220 130 144 202 118 190 144 213 87 85 63 177 70 212 25 231 81 164 201 99 29 176 4 145 187 202 190 223 202 54 5 213 105 100 127 85 67 203 25 102 135 54 9 39 65 115 135 188 39 183 116 177 72 108 127 118 104 193 102 94 118 209 219 176 59 25) #f ()) #(142 "appending unused 0's to oid" #vu8(49 50 51 52 48 48) #vu8(7 150 225 172 147 138 162 76 153 90 3 251 44 53 163 154 82 6 20 12 124 41 25 151 143 122 132 161 226 181 236 147 239 231 0 69 226 19 145 43 110 30 119 230 90 98 223 96 50 146 92 252 242 245 202 222 48 111 77 235 173 108 46 28 106 132 162 33 172 184 111 141 16 118 159 102 204 62 26 214 107 181 46 150 17 195 216 235 80 222 142 33 168 80 211 148 226 236 105 4 148 38 66 105 199 92 101 33 126 45 241 253 75 136 225 62 180 116 122 4 67 116 52 165 54 185 107 210 221 37 28 73 18 62 19 65 183 199 235 223 11 163 199 48 114 112 190 71 176 177 13 106 82 168 52 167 64 74 231 114 92 192 199 224 247 200 193 13 82 92 100 41 101 223 123 130 31 220 93 15 121 69 217 75 187 47 141 76 241 79 145 237 169 114 11 143 52 93 53 163 38 134 110 167 4 12 195 222 195 42 234 4 70 70 233 181 44 54 184 163 2 24 209 194 241 182 76 169 221 22 213 136 182 244 162 38 52 197 81 194 47 222 158 108 140 14 66 224 162 150 64 221 43 184 94 115 69 65 169 116 198 248 155 68 182 21 227 151 65 137 158 249 241 228 243 119 24 48 174 166 125 233 120 249 56 110 234 85 32 174 163 93 211 130 11 239 31 201 10 149 94 221 48 200 162 153 148 28 98 49 88 254 217 127 8 245 29 83 84 197 18 104 103 120 247 204 223 220 57 111 157 228 138 175 154 200 148 230 84 36 226 227 26 206 76 92 29 178 138 200 9 206 106 63 127 255 74 229 91 241 185 109 188 75 93 165 190 237 121 82 129 187 214 160 171 117 246 102 13 238 227 8 30 54) #f ()) #(143 "appending null value to oid" #vu8(49 50 51 52 48 48) #vu8(18 218 193 188 164 119 125 44 183 231 240 114 230 30 135 241 165 38 175 180 39 141 16 244 152 245 169 54 228 56 96 115 184 226 98 68 40 149 197 83 196 69 60 206 253 162 58 36 161 134 1 247 101 163 215 163 156 91 250 218 219 128 182 49 167 8 186 69 113 209 144 19 190 69 24 50 202 100 149 46 156 217 133 5 157 85 211 126 171 148 227 200 251 28 247 86 92 193 190 47 246 180 90 127 27 23 133 216 160 119 84 66 177 185 110 173 55 7 249 189 113 47 117 200 71 15 152 87 115 173 160 67 62 114 10 243 184 183 56 153 25 80 95 198 38 115 63 201 11 219 16 100 207 108 201 239 65 194 117 44 111 182 251 180 64 67 223 201 123 179 211 20 99 172 13 139 174 158 25 101 139 114 61 156 116 55 29 169 223 215 76 187 215 204 128 65 226 67 122 166 36 150 81 128 95 140 223 42 242 178 86 20 44 83 7 62 60 154 198 5 155 101 168 237 37 240 13 158 49 86 26 241 187 249 210 112 35 105 56 3 253 164 245 17 175 82 52 22 51 123 32 132 48 129 95 9 179 170 120 195 91 232 238 67 147 67 188 121 24 103 2 53 28 145 130 173 31 94 207 66 96 233 146 157 10 207 232 131 166 5 35 151 222 158 73 181 27 167 4 76 117 26 166 228 235 166 34 225 217 247 219 67 31 59 112 72 19 126 23 197 214 210 140 243 26 121 149 180 108 220 91 69 78 179 89 62 98 42 84 169 111 43 16 25 60 228 22 8 219 170 122 22 183 241 233 111 98 123 11 26 46 210 240 113 70 135 33 67 114 18 114 101 208 145 131 75 85 36 126 149 30 216 56 105) #f ()) #(144 "truncated length of oid" #vu8(49 50 51 52 48 48) #vu8(137 13 139 3 92 241 210 147 133 147 21 10 160 12 63 66 66 9 140 98 80 175 249 195 195 48 68 225 185 36 124 129 4 155 232 138 221 181 124 198 138 44 185 139 48 145 156 37 187 228 147 20 35 119 30 90 230 250 155 21 39 93 5 143 233 49 152 93 137 108 203 38 220 73 92 169 0 63 206 96 45 99 22 28 79 0 57 157 122 164 110 102 22 24 26 6 160 204 120 144 106 251 216 14 101 253 1 101 199 48 53 81 185 208 177 212 203 62 253 191 195 19 141 164 209 166 204 204 67 248 205 134 19 147 45 157 9 44 210 147 111 149 177 119 92 164 133 244 194 233 167 192 213 89 160 17 42 96 237 47 31 186 244 158 59 81 76 89 141 232 14 13 220 7 45 200 74 232 253 181 101 234 145 198 85 229 201 137 213 176 167 188 178 65 250 191 7 5 198 252 175 191 226 122 188 175 178 91 38 22 92 40 34 249 194 182 129 168 107 151 207 188 231 81 80 252 88 163 249 173 146 206 154 20 194 155 240 135 194 217 129 60 14 95 165 144 102 221 38 11 166 224 102 104 176 211 5 168 97 45 109 2 36 183 65 140 99 8 184 20 15 119 53 189 253 227 240 246 69 234 242 11 192 197 230 164 200 230 64 46 109 28 128 22 160 203 39 110 32 1 182 61 43 125 229 43 237 78 15 153 181 17 240 96 119 62 93 45 103 68 110 21 169 235 245 186 76 221 153 88 145 48 31 8 178 137 46 39 90 71 165 165 102 212 5 80 127 110 197 18 37 160 47 132 22 117 140 75 53 88 104 99 205 252 143 229 116 36 184 227 95 220 85 143 165 179 173 132 116 60 88 105 228 5) #f ()) #(145 "Replacing oid with NULL" #vu8(49 50 51 52 48 48) #vu8(153 187 53 255 39 225 158 160 77 210 236 54 122 201 13 96 67 232 194 5 181 10 241 6 31 154 216 144 19 174 246 37 126 222 245 200 101 208 76 247 161 116 6 185 16 211 196 147 253 12 202 65 237 243 110 242 247 252 62 177 212 234 132 46 192 68 238 137 246 209 146 198 149 100 178 55 121 82 180 80 98 122 244 6 108 95 242 238 83 152 23 151 73 49 80 9 67 98 202 189 104 248 181 39 99 8 102 84 96 96 25 199 194 147 215 82 236 101 220 61 118 219 251 166 163 103 94 2 4 26 235 134 117 141 74 83 228 213 201 56 33 156 16 28 187 165 181 166 24 144 194 236 22 229 105 216 209 26 47 224 168 56 170 11 235 90 85 81 69 242 52 17 194 9 18 68 73 221 157 25 99 100 3 1 139 142 56 45 89 86 188 200 31 71 197 194 147 72 115 8 9 179 243 235 162 147 74 57 188 149 76 119 135 197 168 110 92 202 20 79 169 58 190 29 138 52 230 93 226 145 81 224 143 112 149 26 205 98 185 108 177 168 189 149 102 234 19 108 231 91 131 33 79 129 50 213 175 44 188 244 209 89 6 93 34 88 139 58 120 212 235 157 134 234 171 35 163 91 69 23 25 246 173 22 99 91 53 188 1 112 95 3 165 216 238 113 8 14 105 226 161 222 91 162 104 127 69 143 48 184 165 175 117 150 254 101 249 100 100 93 135 29 77 120 85 163 114 233 201 212 186 101 113 81 109 141 222 93 155 92 87 4 196 204 114 127 144 34 226 164 255 236 119 204 134 104 243 32 219 10 164 33 24 98 218 147 160 62 83 72 241 9 14 84 223 62 201 222 80 192 147 167 156 243) #f ()) #(146 "changing tag value of oid" #vu8(49 50 51 52 48 48) #vu8(115 30 37 1 29 168 123 153 15 56 231 252 240 143 170 224 69 64 36 114 117 107 233 135 77 118 73 51 247 241 239 84 237 187 121 226 185 102 15 64 215 201 224 95 52 37 63 211 167 184 161 46 219 249 174 82 24 162 3 186 130 191 241 203 181 250 105 16 32 97 94 229 155 246 157 235 2 51 143 11 168 121 167 181 198 96 23 152 163 174 48 53 36 4 204 215 248 78 28 18 208 33 227 40 113 16 94 138 195 76 44 30 199 253 232 36 142 73 19 224 124 230 155 94 233 152 79 10 78 32 194 244 52 219 201 182 252 70 110 73 251 209 209 59 127 21 146 33 132 237 198 169 133 198 75 118 103 93 70 72 82 99 218 18 81 180 171 0 48 223 140 240 174 58 140 146 193 158 233 235 175 30 128 50 136 226 9 38 139 19 232 49 39 204 58 66 79 222 206 41 175 192 62 41 144 2 109 113 9 64 1 142 97 162 173 144 236 193 242 95 62 33 241 116 105 122 210 191 50 148 136 143 227 144 45 36 10 179 95 77 198 140 224 68 1 202 200 43 39 255 236 236 233 137 76 110 131 203 181 244 43 174 98 213 166 35 0 175 226 37 214 143 84 210 181 127 112 104 59 106 218 85 231 12 201 128 36 1 199 97 131 42 176 155 64 175 42 147 149 100 220 79 247 38 93 218 193 254 176 153 210 43 215 250 77 43 119 105 20 190 3 5 225 8 15 27 28 82 75 131 193 59 148 95 73 156 42 192 67 244 131 35 113 22 136 83 235 177 117 105 235 109 83 66 52 71 162 4 68 113 195 97 104 247 139 65 69 22 10 136 66 212 213 185 206 136 104 218 83 63 103 96 219 42) #f ()) #(147 "changing tag value of oid" #vu8(49 50 51 52 48 48) #vu8(7 223 85 224 150 230 212 252 171 50 20 84 106 236 92 187 144 250 110 198 33 221 187 50 86 105 47 142 230 131 227 232 40 174 164 41 156 114 11 196 210 184 182 62 162 93 83 175 217 21 115 162 255 155 136 206 9 23 111 123 138 115 187 139 149 205 53 250 219 79 104 217 22 171 116 72 205 132 91 95 26 241 8 9 185 231 243 89 81 26 254 247 81 71 181 245 104 27 52 99 19 132 100 97 185 19 54 98 171 14 195 129 117 225 169 199 103 101 157 13 253 156 41 141 34 149 80 64 57 145 247 76 255 5 205 219 114 62 92 126 219 233 214 155 204 96 83 193 193 85 146 166 190 98 151 220 255 172 11 77 157 58 73 231 74 32 66 72 10 232 49 244 198 41 134 99 84 98 179 158 36 74 55 88 205 34 221 231 91 2 61 170 88 86 224 134 120 146 213 125 143 216 5 206 189 33 254 8 98 39 138 99 255 57 161 30 4 80 153 157 157 11 1 200 241 160 69 195 71 74 5 150 23 234 33 238 251 70 148 122 68 98 94 79 1 122 247 61 32 250 164 191 2 16 201 102 60 24 178 3 176 42 47 3 153 85 44 49 83 28 174 98 27 183 113 123 85 80 161 47 187 137 111 76 14 48 229 253 249 200 233 166 118 62 184 21 191 170 210 38 202 148 127 29 166 186 132 69 89 134 195 58 174 47 247 65 144 91 241 145 14 236 69 11 183 70 207 218 55 76 239 214 72 159 160 133 77 78 68 17 244 57 243 31 253 124 192 53 26 242 46 176 179 173 4 70 54 194 65 227 16 18 101 205 123 40 93 123 111 174 209 146 200 1 93 138 96 144 177 117 241 9 39 151) #f ()) #(148 "changing tag value of oid" #vu8(49 50 51 52 48 48) #vu8(53 59 55 160 228 134 13 226 178 20 38 103 152 140 183 220 48 226 157 134 218 51 180 178 121 132 174 241 128 61 182 110 223 225 22 240 237 125 19 185 140 163 15 126 108 208 251 152 176 43 216 109 203 215 152 141 45 182 140 97 31 254 103 161 21 49 216 60 130 22 19 58 175 83 246 1 99 31 226 243 201 0 120 139 86 140 157 79 106 114 234 135 174 153 175 50 34 134 56 21 67 25 197 151 78 225 232 4 149 77 209 174 167 160 212 206 251 244 68 43 246 155 198 126 240 2 118 28 231 165 198 122 51 22 247 27 35 23 35 104 102 236 60 62 78 208 233 2 252 33 83 39 140 189 192 210 173 44 54 164 186 37 98 240 152 231 31 127 182 176 98 8 187 100 3 27 190 95 149 200 36 200 218 134 35 36 174 199 253 67 96 101 152 111 183 4 234 68 244 213 67 204 87 141 165 244 78 160 243 173 203 175 178 142 161 137 202 22 173 253 225 220 15 133 41 84 205 73 34 137 149 151 7 175 161 66 62 60 234 240 100 243 220 48 117 234 129 165 31 133 113 127 167 232 179 140 249 137 164 124 119 163 185 100 156 170 171 4 162 56 75 239 169 46 79 212 210 222 139 0 105 157 111 253 135 198 80 124 211 185 168 31 22 43 148 230 12 48 252 74 158 112 213 36 6 180 215 84 0 69 126 76 156 138 217 0 232 254 228 86 222 151 95 240 117 192 142 243 120 189 203 166 158 123 23 25 245 173 109 145 67 76 116 177 238 87 127 1 109 169 34 151 105 236 154 61 62 145 231 70 102 99 33 43 123 181 17 130 252 36 94 145 68 70 195 24 16 228 68 146 49 150 185 114) #f ()) #(149 "changing tag value of oid" #vu8(49 50 51 52 48 48) #vu8(152 255 126 187 132 137 188 195 200 234 253 215 82 37 183 68 218 58 196 187 168 204 198 192 21 126 7 41 77 210 104 123 80 201 226 75 32 107 78 27 162 249 50 107 142 48 172 101 97 173 10 150 66 80 139 11 134 93 189 137 214 25 48 37 126 194 111 251 123 179 46 230 117 78 221 9 230 16 206 71 164 125 176 171 4 40 196 197 3 218 173 120 32 26 32 6 99 42 6 230 144 208 1 243 69 221 78 149 52 187 100 23 28 73 250 46 162 80 244 53 71 81 17 180 161 36 96 180 14 116 177 66 131 175 24 251 75 162 175 12 100 167 100 85 178 220 49 196 35 129 125 205 80 192 223 14 85 101 27 191 238 72 83 111 4 243 212 19 255 27 230 57 45 201 243 243 2 126 242 12 88 219 24 239 134 187 72 52 112 92 28 163 104 175 191 23 69 117 244 128 236 121 176 223 14 252 242 74 22 81 193 201 226 96 152 13 197 246 176 171 155 217 138 36 141 159 138 109 42 223 68 252 80 31 218 251 86 90 196 124 34 124 209 159 74 69 97 143 173 38 134 199 101 37 79 111 31 201 33 98 70 15 122 157 50 169 28 226 18 87 53 121 136 216 106 37 214 57 91 231 12 115 192 39 181 62 220 179 46 94 213 140 54 185 39 52 149 240 39 183 135 44 90 36 237 57 245 230 240 123 29 14 33 236 151 172 59 23 202 252 73 84 192 24 75 1 253 68 196 159 227 250 151 105 136 40 223 139 111 30 78 162 127 50 37 178 50 99 241 231 46 250 249 166 50 46 102 130 111 229 181 208 135 17 154 91 251 218 50 124 199 166 16 131 82 48 128 108 146 51 203 201 102 187) #f ()) #(150 "changing tag value of oid" #vu8(49 50 51 52 48 48) #vu8(16 60 49 34 246 236 8 36 56 183 4 236 224 41 242 66 110 38 103 65 28 172 153 128 20 189 45 141 31 238 145 123 167 87 83 185 144 127 244 251 198 91 239 39 74 164 248 99 131 74 12 228 95 151 69 143 119 134 44 66 106 215 134 164 24 216 250 51 88 20 91 196 108 182 204 74 227 222 104 121 18 126 254 156 111 177 53 237 186 11 249 111 127 44 124 191 60 248 162 55 153 253 251 34 212 109 24 132 45 62 94 185 241 116 35 164 237 211 148 50 50 54 37 206 85 89 165 10 96 44 184 4 49 171 193 98 173 128 164 231 50 61 89 70 122 59 108 45 172 243 134 195 140 216 44 34 101 140 79 149 79 43 181 251 141 140 79 181 211 82 54 57 183 135 46 196 178 228 49 119 139 65 221 194 15 234 6 134 159 102 30 106 162 193 9 42 244 33 243 143 82 85 82 68 229 88 91 66 114 49 121 184 92 34 42 242 204 179 93 235 147 229 161 254 6 91 134 44 133 124 160 150 222 201 0 154 23 96 142 66 18 2 194 39 250 215 57 118 75 6 69 131 219 28 113 175 154 1 136 0 206 174 229 86 201 247 222 255 101 34 209 74 72 129 67 15 161 2 115 228 63 222 185 146 173 200 37 193 180 71 46 31 124 41 143 17 221 154 210 198 206 65 3 80 155 108 127 89 28 16 205 223 48 107 54 191 198 49 64 253 101 34 60 223 187 6 175 18 87 115 83 70 123 103 116 190 120 155 124 93 213 157 177 15 56 69 30 5 130 193 89 36 110 217 235 45 5 40 94 243 219 73 128 25 159 82 167 137 59 64 222 211 230 82 117 97 112 55 207 4 208 84 196 188) #f ()) #(151 "dropping value of oid" #vu8(49 50 51 52 48 48) #vu8(15 98 111 156 193 209 44 209 151 134 75 219 225 44 24 134 19 56 89 96 217 255 154 173 60 91 141 131 94 74 62 171 96 135 186 226 144 136 59 69 121 111 67 103 85 88 63 1 123 45 18 147 253 226 110 148 147 180 132 204 102 52 169 40 210 99 11 13 118 243 178 210 109 157 129 233 3 159 209 135 161 249 73 99 216 113 40 14 69 25 56 199 34 62 131 243 71 132 228 250 30 248 59 32 180 25 117 255 81 78 118 36 186 130 218 86 107 159 163 13 219 110 191 202 113 48 183 5 84 114 11 18 13 9 76 115 22 54 252 93 147 139 138 221 228 199 164 158 130 45 99 51 19 255 251 221 78 167 212 121 119 19 137 110 162 194 19 249 147 153 206 140 118 233 22 54 31 136 62 27 118 118 10 69 222 138 8 151 26 45 55 65 229 112 121 223 76 147 220 40 1 7 127 68 57 91 89 168 22 229 91 92 84 56 176 55 45 124 205 224 98 63 66 68 66 190 253 123 141 178 192 91 218 23 122 94 107 101 68 118 42 85 145 152 159 210 220 54 112 224 23 78 18 220 164 200 63 43 92 50 123 95 61 181 56 151 137 85 148 152 10 212 169 154 77 58 65 229 134 178 127 44 68 243 12 237 141 23 121 251 239 216 110 150 94 118 66 212 215 78 251 148 179 117 28 214 88 186 128 243 166 207 144 208 20 88 43 81 243 159 65 190 108 83 181 71 90 11 193 52 15 88 63 148 145 184 201 28 157 103 60 163 38 175 92 246 105 67 168 138 160 76 4 117 10 131 254 143 66 158 228 92 53 93 155 237 123 220 223 136 107 91 154 141 205 87 169 151 40 240 5 191 122 197) #f ()) #(152 "using composition for oid" #vu8(49 50 51 52 48 48) #vu8(86 132 55 244 81 3 53 251 60 200 24 209 119 116 125 160 97 174 89 125 207 33 232 66 22 243 34 60 40 67 141 17 87 223 13 184 237 6 212 41 199 51 102 167 107 237 223 32 125 192 59 95 111 179 169 17 160 66 40 14 25 67 49 154 28 248 192 4 22 17 209 99 63 62 76 83 56 123 170 117 13 148 160 193 221 172 30 65 101 144 172 87 160 55 212 0 118 226 118 137 30 112 80 138 30 231 136 111 187 92 131 142 52 182 32 226 136 9 59 155 175 188 210 187 172 212 173 54 92 190 87 243 72 116 103 222 120 4 35 157 191 184 55 214 93 239 168 171 16 35 183 148 146 196 48 20 25 239 243 150 229 97 34 74 188 228 10 88 208 2 93 122 236 103 201 65 199 136 181 133 215 244 121 19 216 191 168 68 154 72 84 175 90 56 6 189 60 207 108 35 54 153 53 0 41 116 145 48 70 133 39 120 34 230 110 46 86 246 36 200 235 230 165 166 117 18 63 72 133 64 255 177 200 23 113 162 34 195 220 222 187 235 254 24 2 89 222 128 69 174 46 242 180 74 62 23 226 126 42 88 89 13 199 9 179 153 12 26 22 7 81 70 147 201 95 151 222 229 209 203 82 124 40 231 8 86 14 236 87 176 122 103 24 178 178 238 120 46 215 73 1 114 208 138 183 28 4 52 52 179 2 235 242 151 118 110 130 19 216 239 169 89 176 92 206 94 41 184 82 103 195 255 143 24 80 177 7 183 53 142 93 28 235 81 237 194 144 108 38 145 27 194 252 179 0 77 223 104 237 53 203 181 80 92 79 107 168 239 54 207 231 163 126 83 120 30 41 181 112 115 205 1 96 47) #f ()) #(153 "modify first byte of oid" #vu8(49 50 51 52 48 48) #vu8(10 77 58 160 31 128 175 249 120 200 221 159 176 224 168 96 92 136 130 165 233 147 99 113 255 153 6 247 254 206 180 206 92 152 31 65 131 76 158 246 174 52 175 230 86 123 209 204 212 153 19 90 132 78 109 193 105 91 106 31 167 172 88 244 186 115 113 79 211 212 104 27 16 232 99 2 210 113 228 78 182 133 20 98 2 218 173 51 208 227 167 178 89 2 169 21 252 213 193 14 69 103 118 114 88 26 126 18 215 245 26 76 191 97 151 173 1 63 168 61 43 71 50 56 150 62 114 122 243 203 31 226 5 77 133 129 58 112 200 19 155 121 93 179 229 20 201 5 22 113 249 147 201 229 9 106 35 86 101 223 42 124 12 67 81 113 197 1 36 19 239 149 178 56 76 249 16 115 10 181 42 80 41 183 243 40 215 79 36 189 51 212 31 67 29 204 220 119 87 23 205 40 206 97 26 245 5 100 218 70 161 122 178 192 230 79 82 89 230 123 137 86 49 135 154 131 27 189 208 47 151 253 186 250 55 249 38 51 185 165 146 91 41 48 228 6 1 146 226 231 72 50 225 236 178 128 237 142 10 160 216 90 2 95 50 163 143 159 67 172 127 210 32 61 183 66 77 20 38 53 118 254 76 212 36 105 73 244 178 37 164 43 26 40 44 227 100 208 219 201 176 161 17 155 170 45 49 10 23 222 139 142 150 154 147 232 160 140 31 138 15 108 91 170 165 10 185 176 54 141 217 53 5 97 228 146 206 198 24 143 86 176 245 55 149 213 48 59 176 235 108 190 229 59 9 238 182 53 145 49 78 82 246 46 209 53 199 114 33 154 147 3 171 174 194 115 189 98 177 56 52 113 177 40) #f ()) #(154 "modify last byte of oid" #vu8(49 50 51 52 48 48) #vu8(13 163 51 229 9 215 141 142 204 190 221 127 156 64 237 163 17 49 3 59 247 101 232 149 102 107 113 247 239 229 65 119 17 127 16 57 122 227 23 62 72 109 196 117 185 168 148 48 29 38 112 97 40 36 87 95 173 98 32 213 91 57 27 37 175 109 135 121 54 127 133 212 48 45 86 102 146 81 160 140 240 177 163 75 60 167 174 127 71 64 182 49 86 4 44 4 10 94 7 98 223 134 119 0 126 211 1 156 178 135 16 100 248 132 186 0 183 242 11 122 175 47 204 211 142 141 140 71 85 92 145 100 163 43 187 64 69 137 2 253 142 8 96 55 25 14 37 213 127 129 10 228 235 204 66 222 19 102 79 79 92 39 199 6 134 87 246 55 37 111 175 40 246 100 221 225 88 143 58 100 159 123 213 182 11 157 250 206 178 157 109 172 133 127 203 59 75 207 43 44 109 68 140 15 193 199 16 152 104 37 227 85 10 152 49 43 243 213 113 234 44 182 142 8 44 176 115 45 117 166 101 18 142 86 182 176 190 172 205 71 96 48 103 156 239 115 179 208 126 181 103 116 190 48 1 197 173 137 252 119 248 39 67 105 111 5 5 166 174 69 65 153 148 29 86 246 0 32 84 239 101 30 111 173 231 87 83 26 252 43 202 176 83 151 219 143 50 45 208 157 144 212 169 160 88 190 224 161 111 115 177 218 129 111 134 134 66 89 190 160 18 229 142 167 219 230 255 229 239 28 130 252 251 151 238 169 26 223 244 122 12 117 94 174 159 37 253 95 215 50 229 189 221 163 81 154 105 51 237 105 111 129 57 19 80 185 243 2 44 84 156 182 152 110 161 110 232 113 117 208 186 66 43 214) #f ()) #(155 "truncated oid" #vu8(49 50 51 52 48 48) #vu8(142 216 117 0 120 255 90 99 93 109 223 66 218 194 136 214 208 38 141 8 10 181 61 46 184 89 184 241 19 82 163 161 72 238 198 198 191 136 140 218 41 189 128 226 112 140 181 235 222 212 4 31 139 1 182 60 218 209 212 52 42 108 193 191 253 248 26 59 252 46 195 209 35 247 215 206 93 109 141 69 91 31 130 59 238 12 10 207 106 157 160 61 5 58 11 163 20 178 222 161 212 174 77 173 142 183 58 77 73 61 44 233 237 35 195 178 103 140 247 100 185 181 0 131 139 158 234 155 85 22 0 175 187 60 192 59 52 139 78 187 162 246 164 30 227 229 219 57 239 42 101 41 148 187 5 52 200 239 226 150 32 39 96 158 244 165 98 3 173 232 188 203 80 199 85 74 34 236 218 59 128 208 38 83 244 233 208 57 140 163 0 233 244 217 46 195 186 74 27 21 86 90 245 108 179 87 247 55 51 49 238 121 90 25 210 238 240 6 14 238 174 45 190 174 169 226 131 36 82 54 185 57 191 70 38 88 22 114 236 125 6 48 6 130 80 7 46 134 236 154 209 181 31 38 67 132 165 67 165 47 44 228 36 113 161 80 81 105 186 48 182 8 189 171 35 185 204 170 113 11 220 60 252 212 120 100 113 6 81 135 63 36 17 174 124 26 191 101 211 110 242 162 64 27 141 151 77 96 186 149 26 2 59 235 118 137 192 153 176 129 107 131 26 111 42 83 100 169 35 49 211 253 13 196 22 215 52 224 88 19 71 16 138 78 188 253 201 218 226 237 122 139 12 217 61 44 245 96 90 146 89 190 210 33 148 120 222 195 189 56 118 127 213 170 136 100 63 97 203 187 105 162 52 176) #f ()) #(156 "truncated oid" #vu8(49 50 51 52 48 48) #vu8(71 35 39 158 111 250 194 165 24 79 241 9 67 114 4 152 194 53 46 162 225 85 252 128 34 99 225 11 23 128 26 3 6 34 245 246 132 173 174 168 234 252 80 135 233 113 239 218 52 166 148 32 206 180 252 243 214 170 12 29 138 179 233 240 9 185 8 85 24 146 28 182 132 222 181 5 23 181 115 86 202 163 145 93 61 18 52 129 82 180 10 138 134 147 33 61 154 25 196 73 156 253 66 208 157 74 204 216 121 241 188 41 135 207 173 82 120 80 95 144 203 214 185 129 80 13 173 253 162 53 130 210 220 21 155 185 137 158 240 170 159 17 84 164 96 106 149 190 24 163 71 170 26 119 113 111 236 159 132 252 221 27 35 168 177 216 50 222 133 141 47 90 232 138 92 50 205 167 98 217 97 151 150 245 42 153 89 170 168 111 229 39 208 78 75 247 177 155 24 70 87 69 12 166 17 194 75 12 85 87 124 163 43 29 198 246 134 62 44 165 194 112 88 214 128 60 59 19 86 77 212 22 209 233 230 246 149 180 197 30 116 242 220 40 10 227 235 137 191 188 140 249 45 96 139 243 178 34 11 38 251 96 237 120 194 213 121 37 88 32 226 62 177 92 59 49 73 215 111 14 204 205 178 220 127 11 234 154 52 111 202 237 117 246 7 139 185 215 188 249 230 119 161 91 169 46 222 102 125 96 195 173 14 93 144 151 212 66 59 239 73 41 167 157 139 185 83 202 77 205 133 250 31 106 101 181 120 211 29 55 135 64 44 247 177 213 21 207 171 113 251 196 137 177 241 33 100 58 156 4 140 165 83 100 206 30 119 12 131 147 17 233 195 184 137 38 18 200 41 81 61 65 103 174) #f ()) #(157 "wrong oid" #vu8(49 50 51 52 48 48) #vu8(59 64 189 136 249 156 158 55 176 20 114 182 239 196 19 194 14 178 35 236 133 15 226 14 245 233 211 216 31 38 107 17 34 94 175 32 127 59 113 45 121 46 230 129 177 217 216 101 122 246 124 153 85 89 198 2 184 247 114 218 39 148 218 204 201 63 157 122 168 204 80 6 9 40 176 120 161 217 52 221 50 241 13 98 170 73 47 194 169 9 234 106 211 220 16 89 63 203 228 32 9 230 125 199 200 61 123 66 194 237 8 92 90 11 98 43 209 234 171 160 112 101 216 117 62 233 158 50 58 24 228 195 26 172 58 85 146 104 210 220 94 215 70 12 80 172 204 154 112 190 120 74 237 43 212 121 77 24 169 166 254 206 111 162 82 189 11 95 110 40 95 201 201 249 240 25 11 132 146 242 32 144 119 247 33 93 38 195 30 188 223 222 223 251 75 221 30 64 125 125 39 19 214 67 146 20 211 7 117 73 234 90 238 127 105 239 82 242 99 129 189 130 34 148 234 34 24 154 135 160 174 234 133 233 185 168 95 16 44 55 216 16 116 120 79 252 166 172 226 228 79 132 50 188 126 44 225 186 190 193 171 11 184 161 115 57 210 1 125 37 74 57 160 113 153 87 187 44 115 244 234 103 170 223 143 191 172 57 88 232 69 153 108 170 2 147 75 112 100 180 100 108 99 104 115 59 115 40 157 92 27 239 116 56 147 179 165 245 112 250 144 11 51 40 224 118 164 34 46 95 213 106 144 50 195 5 35 18 4 168 60 208 33 54 107 123 242 241 177 197 94 177 204 232 193 29 91 240 128 78 143 106 41 246 1 168 156 62 146 132 156 69 251 1 50 150 198 101 138 158 9 230 184 227) #f ()) #(158 "wrong oid" #vu8(49 50 51 52 48 48) #vu8(17 53 104 163 58 210 251 132 0 118 6 114 8 71 185 15 72 248 82 149 13 75 107 57 234 222 28 115 4 191 112 30 55 235 9 68 247 103 166 123 219 223 172 217 175 120 23 39 222 4 69 9 173 125 9 79 222 6 254 166 208 198 153 10 131 78 221 187 71 193 189 204 143 227 149 69 240 246 96 219 213 12 122 163 236 254 114 144 159 195 45 193 131 48 147 101 187 228 120 23 95 27 225 68 177 1 46 163 216 73 186 175 78 97 114 220 116 125 34 14 234 122 94 230 49 32 186 135 100 206 117 200 252 17 4 237 84 129 59 148 86 104 218 30 115 168 195 168 2 190 110 231 217 28 53 54 164 158 124 138 57 197 99 187 227 117 48 134 162 97 209 158 190 29 81 36 232 21 240 98 74 161 97 41 119 103 80 229 33 146 140 101 120 216 173 36 187 20 242 79 195 217 78 51 91 146 147 176 26 106 2 209 183 91 128 211 87 188 147 193 230 157 111 138 165 26 167 129 235 192 238 241 139 116 55 247 146 106 243 205 134 149 112 80 233 183 89 182 129 70 47 210 228 157 170 229 24 165 253 178 199 206 56 166 57 149 147 180 79 78 243 47 123 222 144 126 205 123 220 104 183 97 54 88 86 96 58 231 129 252 0 0 223 186 201 255 149 106 113 201 76 50 249 2 212 112 87 47 235 81 59 140 206 106 250 27 202 239 4 237 73 149 254 199 3 149 151 111 51 254 180 168 120 210 121 150 180 34 17 134 129 216 181 25 72 238 73 125 140 59 246 237 83 80 9 19 249 133 226 243 88 159 204 204 170 221 129 198 252 8 66 60 86 67 246 186 62 196 186 178 181 27 130 246) #f ()) #(159 "longer oid" #vu8(49 50 51 52 48 48) #vu8(110 148 49 79 107 242 200 147 209 232 168 71 69 36 87 251 248 137 146 132 13 127 223 181 96 217 134 124 29 198 204 73 105 118 129 207 95 153 45 79 72 1 5 160 254 152 139 74 227 194 5 67 33 88 158 254 198 108 43 0 219 122 190 36 44 152 100 168 171 129 209 43 234 10 114 200 85 16 85 195 84 162 204 102 19 180 10 34 59 246 198 19 15 112 92 37 70 133 96 96 203 122 175 137 58 21 94 26 220 58 96 49 177 20 96 134 92 104 33 96 212 7 214 10 247 63 36 185 23 48 73 166 203 164 160 8 115 228 208 27 67 132 38 240 86 104 182 96 204 46 124 91 218 48 41 191 236 241 192 139 95 65 66 220 75 219 130 235 59 160 221 135 205 111 34 129 47 96 184 28 120 88 66 13 248 232 190 105 48 211 77 243 84 55 82 162 14 91 19 39 197 179 26 222 40 226 47 54 231 220 223 53 61 52 59 228 27 209 168 34 175 141 179 52 110 160 153 78 118 97 241 223 66 122 54 152 74 166 25 79 182 205 46 12 250 242 180 141 95 31 56 195 212 202 161 145 234 1 71 200 78 216 62 144 198 22 89 68 88 115 227 232 114 72 39 252 100 79 132 166 208 183 170 140 60 140 202 203 149 54 189 7 99 248 241 58 37 69 44 68 153 237 207 28 29 131 146 14 167 197 55 19 72 71 254 239 223 237 10 3 90 113 38 32 177 125 130 42 115 45 203 195 7 188 40 143 129 168 11 37 99 213 166 74 236 173 56 204 150 196 251 248 148 170 95 140 24 110 219 162 132 75 170 197 147 98 203 169 232 166 164 123 91 152 47 7 175 212 18 12 254 229 66 63) #f ()) #(160 "oid with modified node" #vu8(49 50 51 52 48 48) #vu8(130 53 253 97 224 124 175 237 35 93 107 178 207 50 166 28 70 204 100 33 76 55 19 81 49 86 161 67 114 92 86 56 155 188 5 94 252 230 51 145 185 222 156 240 104 206 133 82 175 243 177 1 51 223 139 150 166 153 225 197 245 85 50 203 216 253 11 83 127 23 1 165 202 60 184 128 91 139 15 180 50 22 69 249 38 62 239 199 242 224 246 36 173 181 133 27 38 212 67 253 158 166 58 151 119 234 212 96 213 65 121 74 62 213 1 120 91 112 4 97 122 252 143 74 47 162 94 240 49 197 138 204 244 32 7 214 159 17 209 234 91 198 10 10 215 96 29 223 189 56 134 133 89 101 32 61 146 63 159 229 91 164 101 159 97 158 147 105 141 149 206 107 162 56 31 176 11 101 178 122 253 157 120 247 210 52 94 61 224 40 142 218 71 66 107 63 181 50 116 150 20 49 218 95 39 110 240 183 177 232 155 184 146 246 8 193 216 104 201 255 240 5 52 158 23 7 217 160 179 219 67 199 205 108 88 254 96 16 219 210 116 14 25 187 81 106 175 106 116 57 85 46 118 201 164 244 127 112 71 60 46 196 108 182 152 66 152 247 151 50 241 38 152 134 220 53 170 159 220 36 197 61 251 133 216 107 210 248 212 1 78 8 219 226 14 211 134 37 31 20 131 201 115 18 70 87 42 93 120 18 211 24 127 63 155 3 91 157 67 94 174 247 188 4 182 64 247 222 59 238 36 192 234 236 25 200 59 98 231 127 39 224 125 116 125 217 209 43 44 108 152 29 124 120 47 185 70 180 220 103 12 88 171 167 117 230 145 252 92 135 2 151 64 213 51 236 142 246 85 249 220 7 224 98) #f ()) #(161 "oid with modified node" #vu8(49 50 51 52 48 48) #vu8(50 123 165 146 31 153 107 138 136 183 58 170 185 225 200 74 2 119 247 255 107 50 26 17 70 176 116 249 185 11 180 114 142 101 45 214 118 252 193 28 207 124 30 241 236 235 160 25 246 11 193 139 46 209 166 165 186 238 190 156 87 11 204 152 117 105 46 156 114 252 218 244 204 96 224 149 205 9 226 7 15 190 7 77 116 236 48 207 201 208 120 118 153 68 120 88 63 143 64 102 224 91 214 192 34 245 50 131 21 177 20 255 229 8 9 176 173 210 22 157 18 233 125 212 38 190 130 242 88 243 155 52 138 174 158 177 219 201 120 171 25 42 11 102 246 132 66 73 161 2 93 135 135 43 223 12 231 4 245 133 186 49 225 41 196 5 225 45 226 34 105 107 72 132 142 8 203 237 191 247 203 107 95 32 107 38 201 208 34 46 223 206 123 244 216 254 185 10 231 232 140 101 249 95 237 157 33 244 130 11 191 252 43 126 135 43 101 101 138 38 152 72 7 65 170 76 254 157 153 244 13 108 149 108 184 216 201 132 7 29 42 203 81 22 226 63 126 137 194 178 167 112 38 42 239 156 43 93 96 103 41 186 175 158 164 33 117 144 127 52 231 1 127 165 135 200 188 134 224 56 62 218 43 243 2 153 20 245 79 112 184 70 69 98 164 70 216 69 188 223 187 2 122 8 38 90 185 210 219 96 31 75 141 206 104 55 157 230 201 175 106 121 90 77 197 51 6 229 28 234 176 123 242 111 57 85 81 58 98 17 187 134 218 195 56 177 127 64 191 188 245 234 225 83 11 133 108 114 155 185 48 186 194 214 105 213 155 35 50 15 93 138 57 241 22 174 244 39 237 108 103 211 240 135) #f ()) #(162 "large integer in oid" #vu8(49 50 51 52 48 48) #vu8(74 12 94 232 46 144 87 99 45 32 113 31 86 252 165 184 69 247 15 160 177 103 254 123 205 90 163 116 213 204 202 116 164 13 146 197 37 247 171 239 26 162 158 124 59 239 105 106 36 129 200 170 194 47 70 169 183 51 168 95 207 179 140 118 95 181 110 139 69 34 78 211 202 109 221 14 141 140 53 40 31 190 66 201 252 99 94 182 83 77 93 66 221 187 37 86 98 142 233 66 190 162 192 208 252 230 92 47 77 58 81 184 192 224 233 114 201 242 221 132 121 102 22 177 239 72 244 195 33 119 160 253 191 185 187 43 26 124 128 212 211 167 80 82 183 103 247 148 196 37 26 64 251 170 20 239 138 112 15 160 176 211 217 116 232 13 219 49 208 61 174 244 44 243 186 19 41 33 31 96 248 64 37 248 125 182 235 103 247 148 211 163 26 108 252 63 247 165 237 173 62 187 32 253 19 137 29 4 70 164 76 96 182 187 42 174 150 235 140 133 199 64 97 19 237 124 19 236 109 174 148 38 109 21 129 248 175 6 197 17 240 192 210 125 23 76 13 173 183 120 76 194 144 16 33 6 24 42 178 140 4 26 71 32 74 237 204 21 65 158 201 24 145 38 244 194 123 247 0 160 231 130 122 30 188 19 163 121 213 163 19 102 247 35 121 245 68 81 59 132 111 167 214 89 126 72 163 37 161 181 207 133 52 131 171 81 40 135 53 235 85 231 237 230 104 253 230 167 60 227 244 122 110 177 125 226 86 167 127 15 98 236 63 95 51 155 14 58 193 233 0 13 224 125 146 202 94 17 153 135 25 140 122 139 69 11 176 175 203 212 202 58 113 31 37 7 217 137 171 253 8 221 24 254) #f ()) #(163 "oid with invalid node" #vu8(49 50 51 52 48 48) #vu8(115 25 204 249 208 205 21 72 243 23 38 241 44 95 66 245 201 52 212 202 143 135 7 60 5 240 205 2 143 92 118 131 178 243 109 68 98 97 133 141 234 155 177 55 171 101 249 178 158 242 154 156 22 26 210 68 182 127 228 129 129 12 181 153 153 81 61 217 232 25 158 179 229 209 122 92 67 30 143 74 59 141 196 91 193 60 122 254 81 8 232 205 235 70 8 173 20 118 123 26 108 60 155 46 83 194 41 208 246 173 254 40 178 73 193 150 236 137 6 193 179 38 176 85 36 193 132 5 216 193 226 109 3 86 49 191 34 99 14 36 46 187 108 25 169 121 85 47 106 122 214 220 233 131 99 6 167 67 157 141 93 235 140 90 191 50 56 189 221 244 204 167 179 113 14 127 171 194 58 187 110 179 156 100 118 121 142 252 45 149 168 114 13 192 52 57 8 49 200 122 25 218 248 195 199 223 11 192 176 126 147 18 38 80 38 153 209 9 244 188 141 46 59 136 10 152 73 199 48 243 5 34 232 24 251 215 29 63 67 139 236 241 170 5 94 237 55 236 59 193 2 190 50 239 247 236 42 246 182 4 4 173 60 234 130 90 76 42 70 254 148 25 48 9 235 148 9 132 216 48 0 140 146 88 126 141 54 115 62 90 236 230 145 212 160 3 161 91 15 219 144 38 227 204 63 75 105 208 113 120 159 167 57 45 11 246 64 193 11 104 250 207 252 134 86 196 102 47 205 137 75 34 218 108 78 104 92 1 19 5 57 1 142 225 155 114 199 150 74 32 10 6 167 113 75 170 177 6 138 229 95 163 16 183 124 59 120 144 187 130 136 49 218 61 201 58 199 117 62 11 234 18 197 240) #f ()) #(164 "oid with invalid node" #vu8(49 50 51 52 48 48) #vu8(27 163 196 19 111 195 31 72 254 164 26 83 170 8 128 156 86 7 56 230 63 228 200 10 48 178 151 111 70 38 211 126 72 128 72 188 105 98 118 232 101 108 160 113 247 189 58 174 69 206 137 17 227 228 144 86 211 234 84 87 90 169 60 88 238 175 72 144 57 215 89 111 158 99 42 88 106 236 89 147 222 137 57 237 38 182 54 61 94 136 141 215 12 57 43 150 217 51 177 88 87 15 208 145 123 118 180 100 66 150 76 212 226 105 46 178 214 155 25 228 193 198 230 178 8 169 165 204 254 250 218 94 31 245 79 227 252 167 66 17 239 1 166 9 125 186 231 135 166 80 98 176 9 113 238 169 59 139 62 237 42 85 138 199 92 251 222 150 152 204 165 209 72 74 36 54 251 127 84 4 14 192 173 243 66 153 230 110 60 80 98 23 151 69 97 140 40 104 9 37 147 219 193 229 146 54 247 213 93 210 234 31 86 7 204 166 7 192 3 40 214 61 142 4 155 235 151 238 15 146 160 89 39 237 38 57 246 142 199 66 119 77 111 105 175 200 30 29 40 140 136 127 108 78 239 180 21 41 248 70 180 158 10 195 196 136 113 191 234 76 200 76 239 8 224 143 46 182 71 20 98 134 189 202 39 86 33 191 250 4 141 193 16 18 237 80 173 157 239 200 16 123 245 52 65 9 84 138 2 222 18 109 240 214 148 251 123 230 164 219 15 132 68 104 78 104 234 202 210 175 70 101 128 132 254 156 69 70 176 223 105 23 119 27 191 176 81 37 202 77 232 88 92 3 88 76 145 107 69 138 210 67 105 47 120 112 183 14 147 192 205 3 23 0 69 18 21 223 57 203 189 246 26 170) #f ()) #(165 "long form encoding of length of null" #vu8(49 50 51 52 48 48) #vu8(145 244 69 135 139 177 185 255 54 85 94 167 52 38 72 17 159 48 54 148 199 236 172 78 154 186 88 93 193 107 54 254 123 61 191 249 112 110 30 44 48 225 218 168 255 223 87 33 75 5 199 149 22 61 67 246 54 135 87 234 115 163 6 55 167 167 232 146 73 159 232 233 81 11 233 230 188 215 144 186 136 126 102 198 225 19 46 197 83 211 6 214 170 44 75 90 116 58 21 53 187 170 184 243 230 239 244 103 174 127 64 60 86 109 153 165 152 216 119 134 11 102 245 175 181 212 104 203 148 184 238 137 160 214 122 30 22 61 45 235 247 211 129 197 113 216 197 195 52 238 52 88 56 86 224 171 86 223 222 134 130 80 142 237 68 175 203 234 221 96 2 45 183 193 68 106 219 202 246 215 253 233 179 31 2 141 223 76 240 69 88 73 217 210 25 188 4 98 153 137 145 133 119 183 244 96 202 70 70 68 148 71 156 180 182 188 207 217 225 209 162 238 83 241 98 16 245 220 199 57 12 237 231 59 4 53 75 213 189 246 194 231 205 77 76 5 108 1 60 3 131 202 5 59 21 210 65 34 113 199 163 132 144 30 121 30 61 87 2 169 146 154 84 12 252 17 184 13 205 152 15 166 73 22 218 215 170 169 215 48 72 203 184 100 100 19 152 243 55 117 254 80 202 89 14 164 144 171 192 65 156 120 254 3 9 252 3 52 49 40 53 160 7 111 28 243 74 71 98 61 16 112 79 34 227 239 134 241 160 152 149 101 218 57 208 211 160 133 148 136 228 143 5 114 48 21 151 135 201 68 60 204 126 138 185 58 83 186 231 34 97 62 108 85 193 55 20 3 185 202 72 118 30 144) #f ()) #(166 "length of null contains leading 0" #vu8(49 50 51 52 48 48) #vu8(128 76 110 26 138 254 233 246 32 21 96 103 107 101 80 42 159 212 225 125 57 8 33 167 156 24 221 112 54 244 215 166 244 239 220 138 32 185 197 115 180 241 189 161 195 194 129 99 75 193 193 88 63 254 160 62 93 216 74 93 58 7 40 147 89 112 195 115 128 185 127 129 200 154 58 35 22 169 9 218 104 148 106 53 247 116 39 231 7 103 214 204 223 205 58 218 126 80 51 54 180 217 221 29 38 156 117 48 153 70 99 164 217 63 158 94 61 50 8 221 143 79 38 34 162 211 191 220 43 199 155 173 178 84 30 108 4 180 15 152 181 211 167 202 202 137 251 121 62 247 139 90 160 215 28 28 255 84 166 167 84 140 236 183 174 110 191 245 42 163 247 158 204 192 250 96 220 237 162 254 168 89 142 241 53 189 59 23 3 224 114 230 176 123 148 149 238 138 72 175 134 215 238 157 111 0 252 17 253 12 213 175 52 60 253 105 239 249 192 130 153 186 163 100 222 123 153 151 20 171 155 49 180 14 251 121 128 86 58 104 115 72 13 21 18 218 220 116 149 193 5 145 95 24 237 164 114 207 74 82 74 59 195 247 161 99 193 26 236 69 98 38 97 82 33 179 33 183 223 251 242 61 78 30 40 26 170 81 32 60 150 109 68 13 78 223 61 12 38 235 3 192 243 100 134 242 82 104 13 43 72 223 35 155 92 219 125 76 119 51 31 232 215 113 185 153 190 103 191 0 165 10 15 184 6 191 155 220 185 29 116 182 172 158 18 79 115 214 150 204 217 118 109 241 168 242 145 29 210 118 8 197 11 42 74 7 6 7 26 129 210 109 126 159 198 251 202 57 95 183 241 144 51 11) #f ()) #(167 "wrong length of null" #vu8(49 50 51 52 48 48) #vu8(69 68 194 234 98 123 250 206 18 66 235 48 205 152 27 3 34 10 68 88 113 18 18 126 195 75 60 236 102 37 247 133 184 157 84 102 21 77 178 221 138 226 207 205 82 149 8 101 45 75 141 76 55 56 39 4 17 195 254 192 61 202 172 24 195 99 216 172 119 119 137 37 191 221 233 176 121 181 60 28 250 90 149 44 149 137 88 67 102 143 232 169 243 76 96 246 43 28 202 52 27 44 194 236 215 177 183 79 161 184 22 89 99 207 148 195 8 15 146 10 201 105 255 148 82 54 235 71 6 44 31 97 111 26 112 237 8 67 154 12 228 143 101 183 35 138 252 228 79 81 255 34 189 47 73 84 230 201 202 86 64 109 140 191 58 70 60 65 57 157 149 134 51 221 147 206 70 4 211 207 153 215 196 108 176 183 10 92 58 188 199 250 211 41 198 237 233 162 226 243 138 204 189 85 187 191 5 98 162 83 154 98 88 225 106 88 57 97 86 66 41 226 26 27 18 83 137 176 88 119 139 162 236 94 37 113 192 189 198 236 39 64 202 78 44 150 27 172 85 150 59 56 132 19 43 157 173 124 11 23 46 248 197 171 240 124 166 244 238 129 1 212 159 159 249 183 198 52 167 19 196 245 142 140 84 62 38 19 69 100 238 108 165 248 158 105 10 146 185 196 193 149 24 46 189 228 137 142 98 186 62 209 71 30 166 73 119 119 101 142 12 246 225 192 121 224 33 105 89 96 189 148 109 4 197 253 251 169 21 178 121 142 121 128 148 89 182 84 79 130 143 243 247 184 65 88 16 130 184 130 8 50 241 91 57 4 86 17 5 158 64 132 36 135 142 200 130 148 17 149 225 224 95 194) #f ()) #(168 "uint32 overflow in length of null" #vu8(49 50 51 52 48 48) #vu8(111 165 31 227 175 161 130 114 170 97 252 158 180 110 115 13 198 46 65 225 48 89 98 191 213 47 251 16 8 55 63 183 65 39 116 55 7 220 138 68 202 197 118 123 218 223 95 157 184 19 3 105 178 5 16 23 210 124 74 245 224 1 146 215 8 167 79 145 81 40 171 123 88 187 172 163 17 69 108 235 198 90 11 50 129 198 124 19 89 78 215 92 71 138 59 148 59 169 246 161 62 110 94 186 59 49 62 155 72 192 82 225 21 142 5 121 166 18 81 105 75 55 138 165 13 60 56 129 41 23 88 238 56 50 140 106 241 103 190 14 19 38 124 252 40 93 14 21 86 85 239 37 247 63 14 144 8 207 206 70 220 211 93 241 241 23 49 129 108 197 79 98 239 41 32 99 199 78 177 51 6 37 62 52 28 177 9 92 28 135 192 117 155 131 98 237 162 243 184 27 187 66 84 201 29 100 135 252 203 36 117 22 245 178 234 240 117 185 193 200 236 100 163 37 65 237 171 79 29 109 130 143 105 118 39 152 191 20 26 176 230 192 161 147 255 133 51 26 208 81 248 38 99 146 222 88 185 73 211 72 27 150 129 178 224 49 59 219 247 35 230 158 155 203 3 59 202 104 246 114 114 129 176 248 39 38 101 68 2 61 196 179 90 20 212 24 218 231 176 171 113 131 38 170 144 8 190 214 223 27 40 252 118 239 178 76 224 254 133 160 206 68 96 127 54 121 98 24 25 175 239 115 5 29 73 36 143 85 119 136 68 115 30 181 50 230 207 71 106 8 24 221 173 31 18 244 161 194 165 149 10 199 193 40 201 244 146 1 62 216 46 17 218 75 95 163 162 129 226 243 80 88 189 179) #f ()) #(169 "uint64 overflow in length of null" #vu8(49 50 51 52 48 48) #vu8(53 172 52 174 211 123 237 200 75 161 134 149 200 103 217 118 105 5 169 103 207 64 107 118 88 1 190 8 144 195 213 42 235 48 112 240 83 164 7 8 82 9 188 251 153 245 244 88 96 32 111 223 253 59 173 236 154 78 143 25 236 45 63 130 6 230 164 231 103 196 181 44 189 142 38 46 48 197 37 41 164 86 134 146 171 135 56 240 62 91 30 225 91 100 183 76 57 165 125 232 136 42 165 18 193 236 161 230 190 81 111 250 103 70 90 172 100 114 206 128 166 153 133 168 241 7 84 107 13 154 96 134 151 109 232 216 179 12 164 106 118 168 98 10 182 78 37 4 130 69 104 180 189 154 94 168 129 155 69 74 234 49 5 49 191 248 192 136 76 82 200 5 67 102 15 43 125 199 143 161 93 143 203 170 146 4 246 73 109 245 96 214 105 150 254 63 2 47 76 250 54 182 212 228 39 40 47 132 11 35 196 152 56 25 191 177 145 57 81 41 73 146 141 27 24 6 117 156 148 182 72 46 157 126 82 28 66 177 119 86 68 184 133 230 225 121 194 15 231 142 2 185 122 1 169 31 56 214 28 23 213 202 103 108 179 139 63 67 19 249 254 133 32 132 76 26 150 88 151 223 15 4 84 37 82 181 163 15 55 162 15 177 73 177 6 64 7 217 26 224 171 30 116 241 178 157 155 97 41 71 198 165 181 163 234 113 129 210 22 199 123 202 148 238 138 172 7 0 34 164 205 58 202 107 116 14 181 32 253 171 80 224 113 53 244 209 87 238 224 65 98 131 255 222 234 116 110 90 98 90 10 103 211 33 255 14 42 227 165 221 74 219 179 245 99 159 11 65 42 176 71 161 181 233) #f ()) #(170 "length of null = 2**31 - 1" #vu8(49 50 51 52 48 48) #vu8(17 87 216 45 61 125 100 83 124 61 113 212 92 97 55 48 195 90 34 112 183 86 100 170 3 116 91 209 20 92 97 3 8 37 252 130 206 187 71 179 43 72 61 253 17 24 141 203 238 252 51 165 162 60 211 148 200 251 73 107 212 111 195 124 39 243 178 166 20 249 59 131 33 107 176 220 94 210 171 72 37 232 203 214 20 106 217 0 35 174 227 161 123 116 86 122 98 25 247 3 212 210 152 181 58 221 167 239 166 233 14 148 89 118 84 235 159 11 223 96 84 2 183 226 151 14 248 125 92 156 195 97 96 125 64 231 220 87 223 101 160 33 89 159 221 252 51 65 125 88 168 116 119 114 164 187 42 80 176 41 33 222 4 42 204 138 123 184 102 89 194 153 153 21 159 94 82 139 22 127 63 198 143 176 214 198 39 56 227 122 81 8 225 78 128 22 156 74 122 239 220 74 109 126 95 142 4 196 106 153 197 92 143 48 65 224 30 226 94 14 165 94 111 182 26 176 148 98 139 218 244 52 202 32 2 171 232 34 216 61 203 97 153 25 142 40 165 150 227 28 169 161 214 82 39 156 31 88 59 15 77 143 98 246 211 87 44 204 215 151 36 21 251 243 50 13 83 235 64 37 69 229 198 128 9 78 29 67 253 223 255 154 124 111 197 77 153 213 187 216 155 67 176 31 73 83 18 133 56 151 169 41 51 65 198 99 33 221 225 88 106 252 154 135 220 14 230 185 110 149 34 200 224 211 192 210 110 252 139 138 30 114 233 32 221 226 206 207 154 187 15 194 98 254 110 211 204 67 61 25 2 230 104 180 86 218 102 57 119 177 3 102 102 177 239 215 96 157 47 186 108 95 248 9) #f ()) #(171 "length of null = 2**32 - 1" #vu8(49 50 51 52 48 48) #vu8(19 209 8 88 233 221 131 184 140 109 6 253 162 180 51 99 123 85 198 17 169 207 252 86 109 16 36 110 150 110 172 43 64 74 126 188 95 29 56 46 16 0 189 7 188 179 180 114 54 238 249 52 73 207 206 137 2 144 45 209 169 99 198 151 98 66 1 37 235 208 131 222 218 221 147 182 164 254 69 52 146 218 24 151 247 111 17 207 22 26 139 123 84 231 14 169 252 94 76 138 57 9 165 55 239 242 241 198 147 168 102 133 242 73 190 30 139 10 157 181 145 164 214 149 2 87 79 177 97 188 0 116 107 29 169 208 182 151 145 74 143 128 50 180 93 97 163 145 43 80 34 141 110 172 219 250 174 150 8 118 193 21 3 77 140 174 187 74 107 66 108 61 136 19 164 142 236 82 33 254 182 161 31 154 77 66 111 91 20 45 9 158 253 234 29 176 114 247 215 118 22 64 128 226 228 46 169 115 199 184 98 21 217 128 177 35 143 128 250 13 208 49 135 209 244 46 74 108 27 95 153 197 122 131 240 167 41 126 79 141 244 26 113 99 125 221 130 230 238 195 117 13 34 107 67 20 75 5 149 104 47 223 226 152 133 243 48 247 44 227 164 172 101 203 249 171 232 3 7 118 194 36 225 167 127 129 138 98 82 136 161 68 206 215 113 115 247 216 150 134 213 51 8 49 208 244 155 185 18 31 139 211 100 118 82 32 17 119 154 13 251 16 223 253 172 126 243 166 186 92 169 161 137 169 213 153 198 221 154 12 170 54 221 241 169 38 3 96 241 214 130 245 107 27 238 17 254 96 93 212 106 34 82 61 12 254 182 180 16 105 122 118 170 26 150 203 249 179 151 39 14 218 51 82) #f ()) #(172 "length of null = 2**40 - 1" #vu8(49 50 51 52 48 48) #vu8(115 216 60 73 178 249 242 18 102 82 11 95 192 36 5 171 48 252 17 9 127 53 49 229 237 137 24 151 178 17 31 105 128 255 135 220 158 113 3 118 22 175 73 220 123 149 255 222 106 64 150 148 234 80 145 40 125 95 184 152 144 40 108 240 24 160 53 80 102 72 91 169 46 202 233 198 25 112 3 184 180 33 120 53 41 136 207 243 61 226 152 214 54 94 11 114 106 11 96 80 210 254 231 150 126 121 252 141 169 57 169 230 210 73 48 202 103 73 6 189 122 92 149 166 37 202 50 15 40 170 252 168 83 103 242 15 139 244 73 53 67 187 138 124 117 52 178 143 218 151 92 102 215 180 14 57 151 176 20 89 0 117 27 50 150 88 206 93 79 82 70 233 97 85 32 123 131 153 173 158 146 1 87 180 20 154 33 56 145 91 191 92 142 74 171 56 193 19 225 55 92 108 155 203 213 60 34 128 238 194 136 91 28 154 130 111 44 147 143 109 66 235 71 143 195 45 39 147 62 243 224 35 159 80 152 150 3 54 108 152 153 157 203 231 51 1 242 106 85 226 2 139 215 33 241 231 101 34 95 238 30 193 61 66 16 97 39 200 38 168 16 179 160 116 122 229 247 2 86 214 219 239 217 40 67 121 124 112 139 75 105 152 195 78 87 199 45 123 238 90 26 114 13 241 65 122 30 80 236 39 76 196 87 148 86 199 247 44 89 128 48 88 198 172 95 157 110 151 243 172 103 177 147 136 251 226 86 94 66 19 71 250 243 38 234 42 185 135 149 2 84 8 137 156 239 173 29 185 246 233 197 159 187 107 76 229 0 52 170 38 245 35 116 216 62 53 15 118 92 82 226 87 17 38) #f ()) #(173 "length of null = 2**64 - 1" #vu8(49 50 51 52 48 48) #vu8(63 147 100 204 96 200 153 236 153 65 23 78 253 133 70 126 170 8 209 166 26 144 19 67 29 40 221 166 21 134 71 4 21 243 98 24 212 62 206 65 212 34 110 91 42 211 37 211 27 241 201 72 114 166 212 145 227 66 250 68 205 214 187 20 182 169 227 58 114 55 77 67 207 140 103 31 26 176 29 240 27 228 155 7 71 140 240 94 185 54 229 81 234 229 63 91 179 236 119 129 22 50 95 174 233 170 255 40 97 239 62 158 174 232 38 12 133 238 27 213 60 64 45 240 132 119 83 124 220 77 21 252 87 124 231 191 233 239 56 119 220 59 46 39 83 54 84 225 141 98 192 35 34 178 210 201 241 220 101 165 82 223 228 236 79 62 95 188 212 116 189 217 207 75 14 190 239 248 173 239 146 76 34 36 38 90 126 49 190 255 206 129 188 94 120 164 236 240 209 22 206 115 222 152 68 220 2 95 222 45 131 219 35 62 233 101 176 134 22 254 251 34 154 154 180 104 141 114 97 119 8 46 225 31 116 90 104 189 159 115 246 143 0 73 180 253 29 110 182 64 154 70 91 17 255 201 170 146 130 114 74 149 1 226 30 0 229 216 225 130 239 53 232 214 12 247 117 200 82 150 158 240 29 245 160 4 85 130 109 104 17 180 215 31 69 173 9 112 159 242 30 205 125 1 98 222 227 51 43 14 245 175 117 168 157 80 160 79 176 99 127 168 151 149 200 131 187 21 102 53 35 27 17 56 123 99 147 148 11 205 223 13 238 37 17 101 109 1 155 252 119 82 255 172 92 199 167 21 180 21 38 65 143 3 30 41 114 29 141 239 237 208 223 60 54 10 174 95 6 21 204 47 191 113) #f ()) #(174 "incorrect length of null" #vu8(49 50 51 52 48 48) #vu8(85 49 231 230 18 23 108 119 151 92 26 242 91 222 215 169 221 35 47 205 81 243 168 164 71 212 113 110 145 22 27 251 121 151 174 151 61 32 165 229 85 200 73 80 117 124 167 112 157 132 15 9 84 190 28 66 177 154 125 52 23 129 54 135 40 40 180 30 87 211 179 59 152 250 97 170 49 201 13 107 174 16 191 10 156 116 180 25 0 203 107 144 207 136 21 128 24 4 60 122 185 150 57 153 4 194 18 206 43 21 240 150 101 122 36 246 151 242 122 205 4 243 153 120 128 164 160 33 181 0 166 75 104 148 73 49 48 219 55 57 4 247 54 222 3 171 231 27 182 117 221 222 151 136 95 12 115 167 112 204 253 184 178 91 91 254 160 251 245 201 141 107 241 157 60 210 36 124 17 176 44 208 190 196 71 107 157 169 127 225 212 166 132 21 138 226 53 39 74 26 147 160 55 128 180 146 155 133 73 18 141 140 186 58 240 112 151 134 136 220 162 150 216 31 172 206 0 77 14 21 247 135 198 23 0 143 254 61 193 69 209 29 152 90 38 79 59 162 202 247 167 245 163 191 153 234 200 6 175 6 97 30 16 111 45 170 6 236 109 166 183 45 128 71 196 84 200 58 231 155 252 68 184 5 61 75 227 81 180 110 115 206 243 137 169 236 253 130 136 28 230 145 168 121 114 179 247 235 1 136 26 181 103 13 97 144 207 239 158 3 79 186 10 219 64 21 131 95 72 13 100 100 160 122 234 219 15 172 25 158 69 36 220 110 232 80 200 170 39 153 226 65 40 208 11 64 41 99 84 150 32 49 59 135 81 138 157 0 63 43 171 233 31 252 233 40 151 243 153 150 119 85 61 151) #f ()) #(175 "appending 0's to null" #vu8(49 50 51 52 48 48) #vu8(83 13 242 18 195 8 250 151 212 232 83 154 98 137 71 113 246 61 229 143 177 239 127 244 35 180 41 145 150 79 20 125 226 218 239 173 217 65 74 64 5 155 179 247 182 131 186 136 124 205 150 219 59 158 136 123 153 19 42 33 239 143 182 194 3 47 195 31 206 198 181 201 193 222 16 98 68 56 216 110 126 218 202 107 175 74 157 170 228 104 188 39 217 133 216 203 159 85 79 5 118 156 167 72 134 167 42 66 197 28 212 94 194 178 182 0 46 224 30 82 87 42 161 177 118 96 236 171 140 4 17 159 62 95 238 86 251 84 176 54 123 19 93 57 169 5 89 78 58 67 233 31 36 251 209 120 50 61 105 131 155 250 44 255 253 183 152 45 109 162 240 30 96 151 77 144 92 231 81 100 203 53 92 67 208 5 126 235 204 196 69 29 228 11 146 58 166 158 13 131 57 213 202 86 233 92 14 46 62 121 66 191 28 83 173 64 104 105 80 167 167 210 102 167 22 237 172 225 139 48 103 90 160 213 49 233 195 128 204 71 150 1 19 107 55 228 201 2 230 205 99 183 122 41 215 210 206 225 192 68 220 52 122 33 4 63 59 16 239 223 72 179 175 118 156 57 153 147 249 222 67 41 65 250 180 25 176 136 58 140 91 19 125 0 197 253 130 122 168 3 151 11 32 122 154 210 140 14 162 131 162 247 192 141 39 61 174 221 62 115 178 220 189 21 67 65 161 176 96 125 201 32 138 78 7 128 164 87 90 28 165 65 182 71 3 61 105 71 56 96 50 180 242 177 239 61 218 82 253 165 70 15 158 20 91 238 220 230 208 160 48 130 93 227 133 185 151 179 166 27 90 140 139 114) #f ()) #(176 "appending null value to null" #vu8(49 50 51 52 48 48) #vu8(54 190 215 224 124 196 22 167 213 172 25 181 11 86 236 205 220 181 48 214 115 154 159 183 170 14 161 81 252 207 101 206 135 47 212 138 29 144 200 22 226 185 136 114 118 186 7 226 29 149 168 144 76 48 6 2 213 69 13 110 233 150 232 206 147 15 193 16 21 86 63 110 94 93 139 96 102 178 205 252 148 229 150 67 17 217 199 174 183 101 32 204 25 193 236 81 130 249 66 249 63 34 225 209 245 238 213 87 47 63 15 144 187 123 51 249 16 112 212 175 194 62 228 155 54 6 14 70 178 154 27 122 83 104 9 197 87 138 19 235 188 4 171 82 1 154 1 127 148 101 33 119 15 194 59 225 243 173 177 232 75 169 171 202 253 68 137 45 57 105 20 245 31 164 167 172 192 206 227 245 208 100 87 26 101 76 191 225 223 209 125 43 243 198 72 117 171 182 36 104 242 169 181 98 83 228 120 105 58 17 208 228 232 132 69 112 144 235 61 156 140 183 156 131 235 100 173 171 25 2 58 111 110 0 58 116 20 47 171 181 185 132 169 38 149 236 240 223 2 83 140 109 93 169 252 7 83 236 54 216 160 47 191 174 232 222 116 178 151 184 236 240 138 40 221 239 85 49 242 31 169 205 251 7 145 248 9 219 27 12 246 205 228 165 56 234 174 2 166 164 89 199 108 177 24 208 182 188 6 244 1 226 172 219 243 230 186 247 255 123 93 52 185 17 62 190 208 21 111 214 57 216 14 81 199 180 22 21 9 110 79 149 74 48 10 215 172 152 246 211 241 165 212 95 213 103 163 61 8 101 50 199 229 107 85 168 151 133 240 238 160 194 133 17 215 110 255 171 181 110 43 150 245 209) #f ()) #(177 "truncated length of null" #vu8(49 50 51 52 48 48) #vu8(148 212 55 141 28 140 118 63 130 95 187 29 26 36 251 76 98 233 35 72 58 151 40 171 212 225 37 25 173 38 2 211 182 118 152 126 158 189 57 137 83 31 99 6 217 99 48 15 145 160 196 73 140 22 175 194 220 130 168 169 126 192 142 124 17 134 26 108 214 240 55 238 144 169 103 97 41 150 183 138 115 140 169 236 81 248 83 218 18 197 60 120 135 154 250 21 236 46 121 148 76 221 3 105 41 202 126 110 210 142 233 242 245 86 193 52 31 48 2 201 182 33 227 165 189 79 20 150 94 187 172 147 151 153 153 147 77 204 126 77 48 187 239 119 184 13 123 74 187 192 191 160 39 223 255 40 168 209 108 203 156 71 205 146 152 97 42 130 125 6 13 225 140 146 161 143 217 43 164 206 134 250 54 13 242 11 128 28 147 196 30 117 59 203 227 208 3 65 163 203 96 45 148 73 75 196 74 134 214 205 151 4 146 147 109 92 190 140 3 104 156 239 255 46 145 149 84 137 80 90 217 134 23 236 214 180 64 176 33 103 169 131 87 252 78 76 59 93 112 173 113 15 171 254 145 242 68 243 106 72 128 70 9 125 51 149 152 218 0 200 78 124 235 242 74 130 247 187 133 64 77 71 181 91 145 235 31 207 73 32 170 147 212 60 166 5 11 251 47 140 238 134 37 229 35 243 198 32 209 211 168 86 81 186 93 15 207 168 51 222 231 53 64 248 139 68 193 234 221 187 235 17 156 164 222 123 22 50 16 240 168 85 145 87 126 116 136 255 53 160 221 82 199 82 5 90 85 29 81 123 122 254 229 33 237 244 255 96 251 0 179 5 250 251 110 164 123 0 132 171 238 1 172 188) #f ()) #(178 "changing tag value of null" #vu8(49 50 51 52 48 48) #vu8(101 112 183 43 193 163 4 119 88 247 175 245 102 118 75 254 61 74 122 233 198 169 206 71 120 172 63 192 93 188 47 160 227 177 113 58 111 185 61 196 211 255 26 140 48 86 82 195 71 132 3 169 149 249 0 101 189 72 191 60 200 46 121 56 45 34 230 44 243 40 169 45 81 145 224 187 237 66 243 248 82 201 132 136 154 144 135 132 191 23 47 70 199 244 12 238 41 112 66 157 179 98 41 25 157 43 204 40 121 102 40 137 110 183 93 134 6 148 25 192 25 99 140 242 29 239 220 205 0 68 50 50 243 234 68 237 170 165 91 4 71 99 48 47 82 233 44 35 237 113 95 64 247 242 236 4 151 25 183 70 112 184 181 156 180 67 135 172 240 27 212 6 233 128 111 52 96 190 200 126 92 197 92 84 1 163 65 13 252 176 217 218 203 168 79 132 18 57 211 65 110 18 52 207 191 129 245 232 130 18 116 140 96 245 117 154 185 52 48 177 126 146 188 142 109 128 181 232 146 199 105 79 17 156 40 83 72 231 120 85 175 250 110 36 249 188 22 168 218 42 162 69 6 156 193 138 57 1 32 28 136 30 184 189 128 91 73 232 114 14 251 36 252 7 70 35 155 14 78 69 33 219 35 206 89 124 243 179 215 55 34 83 33 69 66 188 76 64 235 95 225 169 11 44 248 199 93 237 68 177 114 231 158 166 26 189 204 205 159 39 130 156 145 194 157 87 78 130 141 65 110 82 97 205 45 125 228 46 80 202 53 21 151 247 39 149 168 189 79 192 235 114 20 55 252 132 139 54 63 169 211 191 244 71 135 159 29 221 28 25 39 214 121 176 33 87 148 201 37 107 84 110 22 133) #f ()) #(179 "changing tag value of null" #vu8(49 50 51 52 48 48) #vu8(27 190 143 179 160 193 7 55 74 39 133 136 102 211 201 225 136 97 144 132 57 246 49 214 170 85 225 247 235 138 98 148 82 132 239 169 240 248 57 15 125 187 102 38 114 183 180 71 160 189 90 190 90 161 112 104 98 136 4 82 39 226 208 54 203 147 97 185 132 117 22 24 27 27 132 223 181 154 223 179 24 175 55 150 245 75 206 96 139 249 6 56 152 220 158 245 197 184 6 170 249 209 244 157 9 60 60 26 195 161 168 173 235 60 191 220 42 136 233 168 182 87 247 160 205 54 104 249 74 104 235 109 137 192 22 121 55 119 175 109 4 110 158 122 76 81 168 64 26 15 11 4 63 27 154 165 188 243 182 75 37 56 140 10 65 249 156 12 193 80 40 186 88 217 248 193 55 219 66 128 33 62 77 77 65 38 215 30 156 162 218 77 12 86 210 21 191 27 18 239 208 62 48 99 179 14 188 153 75 122 71 192 16 27 181 172 232 8 165 169 240 229 149 171 236 79 42 94 200 4 12 53 114 142 103 48 163 174 121 115 127 73 94 169 174 250 35 44 216 106 47 183 40 152 127 17 201 127 244 125 110 101 161 85 224 117 77 87 22 26 109 66 126 84 230 130 62 114 243 104 239 2 224 175 11 56 184 147 3 90 204 96 203 154 216 218 45 160 174 219 97 213 84 41 140 45 127 168 85 116 111 108 133 206 200 94 97 162 135 242 250 26 227 130 230 235 223 94 149 116 251 190 201 190 103 28 150 206 212 216 84 126 155 79 163 153 157 204 203 9 133 177 142 144 148 34 90 113 54 50 136 53 48 97 27 200 84 169 40 119 228 35 114 51 172 132 102 57 75 214 81 69 242 50) #f ()) #(180 "changing tag value of null" #vu8(49 50 51 52 48 48) #vu8(58 152 215 217 250 176 104 4 72 177 56 100 65 251 55 60 7 104 187 89 253 114 72 76 0 56 227 224 68 142 230 209 174 114 122 28 234 69 30 136 31 32 77 66 158 107 255 73 181 46 163 225 106 113 199 38 94 173 49 215 12 66 130 151 92 133 79 122 8 242 5 170 240 206 228 4 10 19 162 180 202 231 28 175 22 177 249 163 7 174 2 155 222 51 164 101 156 201 47 166 50 249 251 114 71 23 208 160 193 38 234 37 105 120 37 83 88 182 195 189 151 93 4 84 185 116 203 161 127 100 85 221 36 6 4 134 108 11 69 208 107 30 193 234 141 89 12 72 29 187 158 40 6 229 86 212 251 94 64 244 243 118 65 87 12 194 169 222 152 178 111 3 70 182 253 93 195 158 7 106 160 216 54 176 163 254 40 36 202 68 233 89 33 84 104 213 174 9 221 200 244 139 79 27 248 164 238 198 131 186 157 69 134 59 154 84 76 192 213 53 182 36 81 130 47 172 51 100 98 198 126 208 191 239 22 25 213 22 175 102 251 20 127 0 97 209 139 154 143 103 144 239 48 39 74 183 254 251 158 216 157 79 44 166 211 12 108 28 127 185 144 20 159 22 175 129 99 208 235 163 229 156 229 159 193 168 34 163 140 177 128 45 43 228 175 5 199 228 82 240 103 76 209 64 155 202 26 189 150 54 206 84 185 143 31 196 173 34 164 130 207 30 80 233 96 154 224 151 65 214 253 11 31 254 201 184 120 44 191 203 112 108 65 223 213 47 214 198 0 51 13 193 204 66 164 184 110 10 133 242 110 10 38 154 184 250 118 227 191 47 167 159 79 208 46 90 71 25 97 246 124 58 122 148) #f ()) #(181 "changing tag value of null" #vu8(49 50 51 52 48 48) #vu8(51 83 139 49 206 124 94 36 215 220 8 125 115 38 92 97 195 18 57 158 137 32 184 253 245 33 211 223 197 144 101 127 0 253 252 173 202 63 213 61 33 49 78 124 195 81 41 205 110 23 12 6 184 220 194 84 118 164 120 146 166 137 237 92 138 251 221 244 25 27 156 213 87 212 205 41 245 147 51 32 29 239 22 143 187 240 2 83 169 66 235 108 94 84 60 224 31 227 196 161 148 14 220 19 140 185 94 36 154 50 171 123 144 253 29 152 52 61 61 223 96 98 222 214 38 248 176 73 255 199 58 159 105 38 75 170 14 187 11 126 143 234 4 112 237 8 194 212 20 12 45 73 46 235 18 228 116 154 117 129 131 92 216 19 6 41 71 55 53 30 163 2 201 6 145 50 209 155 15 126 178 128 118 9 65 203 89 234 216 46 102 91 177 56 250 247 9 63 69 9 14 191 107 235 87 84 41 58 30 79 15 234 236 199 103 141 95 213 100 19 189 253 112 20 147 143 48 49 169 18 203 197 127 163 33 27 2 173 52 19 159 217 193 31 111 194 122 139 106 224 186 34 246 77 76 158 45 193 173 153 30 61 137 245 151 141 156 135 209 251 5 42 104 223 188 11 9 10 189 27 49 145 94 224 122 10 72 26 148 55 223 200 22 63 132 88 109 15 60 195 135 159 182 180 164 32 59 180 77 132 245 245 133 159 91 41 75 189 173 243 78 178 52 61 226 209 110 122 160 5 190 233 89 190 170 56 72 43 108 13 15 120 23 244 165 86 243 119 203 43 56 143 96 156 55 121 33 213 226 15 8 208 251 234 219 26 62 99 161 31 234 91 123 117 49 201 76 21 42 8 50 33 210 56) #f ()) #(182 "changing tag value of null" #vu8(49 50 51 52 48 48) #vu8(32 106 132 26 124 156 43 10 241 20 154 64 165 234 130 101 135 48 172 80 188 210 11 221 7 98 175 185 228 229 222 187 116 94 153 67 21 60 140 244 238 31 192 226 44 115 10 102 221 205 82 32 76 190 131 192 81 73 204 187 111 198 11 157 100 17 104 175 154 120 230 215 65 160 164 5 115 26 205 69 154 69 185 66 88 22 50 17 31 159 68 122 39 241 120 124 186 27 63 172 1 246 110 60 103 86 246 63 252 24 213 80 49 63 87 157 71 186 132 126 155 59 245 161 244 161 56 105 123 147 140 4 229 71 210 45 51 67 217 237 27 33 67 248 81 9 173 90 8 184 53 128 39 50 167 150 241 241 86 152 228 107 71 101 134 72 85 71 6 82 18 82 210 101 235 53 50 49 105 94 239 0 75 145 59 160 206 152 135 234 234 174 117 42 59 125 125 183 10 151 198 16 195 226 18 197 51 110 46 134 88 149 41 26 112 161 239 178 165 147 183 107 96 149 7 39 220 161 51 13 18 21 119 95 65 245 97 74 9 77 175 148 201 166 197 255 4 246 153 205 204 196 139 109 121 83 253 232 6 33 199 150 40 91 252 197 109 28 183 206 13 20 229 85 8 63 254 214 109 58 190 249 169 194 206 118 194 44 197 124 160 135 147 198 8 12 240 183 76 33 68 60 93 115 56 181 190 21 32 75 69 98 136 68 246 139 30 195 98 158 83 245 81 55 255 154 14 201 130 123 244 30 249 53 198 230 207 103 178 213 7 74 143 236 146 154 180 177 179 102 62 110 117 94 116 137 136 233 212 165 49 13 48 85 195 38 154 215 79 190 120 53 78 207 151 189 212 4 219 147 232 164 45 127) #f ()) #(183 "composed null" #vu8(49 50 51 52 48 48) #vu8(114 67 78 205 15 89 4 79 100 190 33 159 25 125 210 171 121 201 27 43 245 211 206 208 2 188 255 219 40 227 197 154 224 79 77 135 189 154 67 159 64 106 33 23 79 204 91 117 242 86 91 238 47 54 168 62 91 137 226 44 230 230 226 110 104 206 246 198 231 151 62 39 80 44 48 145 229 116 72 1 95 20 143 8 71 168 5 163 59 232 50 33 39 56 63 10 134 157 33 174 210 118 233 134 60 227 18 142 162 64 182 59 108 174 162 223 33 118 68 251 238 147 10 221 45 1 69 210 31 47 121 154 49 124 18 58 174 219 29 113 244 10 222 78 118 99 124 145 18 196 232 243 39 187 47 110 176 80 7 140 155 128 45 58 46 24 222 254 12 50 244 54 2 26 106 137 75 3 222 95 104 214 166 119 202 87 188 168 132 83 133 213 189 166 176 243 32 50 80 67 0 143 184 190 37 201 122 132 153 230 84 93 201 159 39 215 226 234 34 37 65 174 145 148 29 254 129 42 142 215 63 132 139 105 42 171 162 49 125 194 235 132 144 6 5 224 184 50 140 158 71 23 12 75 182 169 15 203 192 221 254 51 20 103 126 212 37 91 101 130 4 136 70 210 168 167 56 196 230 230 15 54 25 174 114 38 25 223 15 148 6 96 232 152 138 187 195 253 104 82 168 246 182 185 71 204 205 28 221 219 204 103 107 53 238 220 86 25 171 161 191 138 219 10 116 242 250 187 49 244 175 254 21 85 190 94 244 120 246 197 195 147 96 0 197 117 172 189 59 246 189 193 250 246 146 118 179 117 62 118 51 31 246 19 14 181 15 169 85 44 135 215 174 4 122 47 194 138 62 33 29 48 135 101) #f ()) #(184 "incorrect null" #vu8(49 50 51 52 48 48) #vu8(145 251 150 160 20 83 161 91 208 121 135 182 160 114 160 76 58 31 113 222 9 73 172 223 137 136 58 116 159 169 103 213 114 29 105 98 244 179 19 197 214 3 109 210 201 219 5 31 183 125 145 217 231 41 150 220 4 11 151 245 19 235 37 102 119 197 84 239 86 168 71 213 227 205 153 67 191 191 116 155 103 22 108 82 191 162 173 212 195 153 214 98 211 139 182 236 184 18 191 48 82 246 118 237 191 224 132 182 40 35 161 99 26 13 34 249 146 174 115 185 43 14 17 108 204 69 207 228 191 45 145 60 166 15 194 34 68 128 211 45 254 117 203 80 239 20 86 27 162 212 37 152 141 213 4 204 246 50 207 241 39 106 165 146 235 207 114 94 166 27 26 244 183 242 254 83 187 203 224 20 225 151 17 219 190 126 66 223 12 115 233 52 128 227 125 141 66 213 230 5 55 1 22 177 48 18 146 31 95 20 204 29 251 185 126 6 247 239 247 127 191 78 93 18 114 57 216 180 76 201 7 3 60 186 243 136 28 202 103 235 26 34 153 198 229 134 197 17 66 0 31 71 92 49 121 238 30 0 152 103 191 230 22 20 8 154 6 13 143 157 97 30 81 158 237 1 73 216 55 111 101 206 63 11 3 143 243 56 230 204 178 71 206 12 210 205 125 210 77 61 90 72 195 98 133 35 225 247 237 252 244 97 2 54 10 160 4 96 220 130 129 19 244 110 35 153 178 239 119 248 109 38 1 203 78 180 194 166 52 84 34 174 64 232 251 162 161 77 0 69 37 23 198 254 228 49 104 36 56 150 42 2 228 36 219 1 68 152 122 228 3 237 168 140 90 185 224 101 74 253 209 58 177 232) #f ()) #(185 "long form encoding of length of digest" #vu8(49 50 51 52 48 48) #vu8(3 60 36 139 188 63 245 35 30 117 203 68 191 248 179 34 93 32 240 37 46 229 40 255 36 190 103 35 40 254 102 244 19 164 255 2 89 179 162 43 108 167 136 182 244 188 180 49 90 201 159 89 67 78 9 126 240 102 192 229 130 28 172 44 225 245 14 69 16 211 112 155 208 48 166 19 239 5 168 24 65 76 154 85 128 213 31 212 230 213 180 183 177 70 248 8 175 47 237 30 165 242 60 18 163 112 229 38 251 17 51 240 111 58 204 77 127 26 229 137 30 237 130 220 252 228 220 70 173 148 120 88 162 40 214 228 124 187 101 129 118 3 34 144 173 123 76 199 109 33 156 65 163 88 214 78 25 137 250 162 148 205 111 17 181 249 217 79 175 225 51 183 37 203 228 130 232 46 198 89 67 19 224 174 155 107 170 185 115 62 78 224 26 136 9 62 209 113 187 184 56 71 128 209 194 105 48 212 9 188 152 195 105 137 169 219 147 253 174 215 133 47 252 0 62 152 28 105 105 227 162 31 28 30 200 5 82 243 221 253 118 241 110 248 176 69 51 121 154 41 134 144 198 167 106 46 3 65 25 250 169 45 69 128 137 223 77 245 207 195 229 162 172 95 183 73 104 53 164 220 230 184 82 44 207 80 73 228 210 148 33 108 194 67 146 173 11 107 199 37 15 125 49 156 19 82 245 129 35 55 127 199 255 155 211 77 46 47 79 80 79 194 114 201 235 196 29 17 248 58 190 96 73 93 170 54 192 206 108 42 38 185 133 203 31 48 135 63 123 157 101 102 191 230 150 61 194 21 76 18 142 238 99 106 129 94 105 239 50 215 81 5 249 31 21 151 255 206 15 179 75 43 137 231) #f ()) #(186 "length of digest contains leading 0" #vu8(49 50 51 52 48 48) #vu8(110 100 24 146 85 192 215 178 169 63 48 191 119 29 156 8 80 245 122 23 63 147 245 218 252 213 153 184 1 185 151 235 163 247 110 79 29 120 212 120 199 154 223 225 76 168 25 26 234 221 129 132 138 167 105 214 91 80 188 150 243 225 134 84 194 9 110 22 238 172 59 2 70 200 212 12 224 154 203 239 252 213 237 216 120 21 219 172 53 236 85 89 37 243 55 102 164 15 51 6 117 254 228 166 139 139 143 84 211 85 13 208 230 166 13 63 201 249 113 104 90 209 220 255 73 177 123 247 169 51 161 49 83 220 75 21 79 245 245 110 30 114 200 119 83 102 182 67 91 23 91 164 32 230 253 9 221 219 100 102 246 232 124 226 7 91 47 205 117 201 158 77 245 242 168 84 217 175 182 10 56 223 73 69 42 32 244 107 198 4 249 42 245 201 241 85 136 78 58 193 178 49 157 221 69 37 193 24 179 33 48 183 218 178 252 24 150 113 129 164 213 135 157 190 232 185 9 76 224 38 131 243 13 68 229 117 100 32 19 112 55 223 125 196 226 30 254 153 114 27 1 48 152 253 137 90 53 147 238 134 97 133 86 68 187 135 41 195 106 235 22 242 48 196 232 251 10 196 88 126 35 146 162 107 233 93 220 87 177 151 5 1 135 113 166 22 2 6 220 226 230 254 176 43 41 141 234 67 231 50 22 124 191 123 201 106 91 255 175 39 227 163 176 78 176 122 119 239 72 45 119 184 126 2 143 108 208 190 54 77 156 214 6 247 60 203 10 110 225 157 146 126 226 33 243 199 36 231 163 216 12 138 113 86 23 170 6 219 2 26 78 27 149 111 23 226 155 70 42 109 170 107 222 159) #f ()) #(187 "wrong length of digest" #vu8(49 50 51 52 48 48) #vu8(85 183 113 161 15 157 127 29 174 102 80 245 165 137 140 113 50 226 136 233 142 5 39 50 120 11 227 162 43 197 160 111 0 175 89 131 26 173 235 190 93 173 113 91 30 44 128 202 39 22 10 18 107 55 44 106 2 251 197 151 201 177 50 209 71 229 172 114 176 186 129 207 218 68 41 33 187 101 188 49 181 95 44 201 235 94 249 250 4 85 60 248 20 21 91 228 148 65 56 167 157 5 63 10 220 200 204 47 160 254 90 151 234 97 41 89 63 253 29 51 100 205 193 218 13 58 140 162 174 238 185 111 76 213 41 145 157 21 91 9 179 91 110 243 7 144 253 146 141 214 35 163 20 48 145 174 116 178 152 217 230 113 53 147 145 148 214 205 236 163 102 246 241 123 32 42 229 169 178 145 184 16 161 101 207 166 88 26 164 42 164 145 56 168 84 130 103 205 32 190 166 29 144 178 8 205 69 73 217 177 244 72 110 249 51 250 39 111 199 30 173 247 160 195 50 189 15 251 44 122 122 65 35 156 221 36 81 180 90 95 116 219 113 119 204 18 126 219 117 42 141 56 245 67 176 99 43 248 233 45 192 175 241 92 224 54 172 104 114 46 48 19 242 25 182 163 251 139 159 157 117 224 234 113 253 65 120 170 254 22 186 87 94 95 183 190 249 208 111 41 70 88 36 107 83 49 74 13 5 197 223 179 105 119 168 211 243 122 112 149 173 156 191 80 191 77 69 215 232 41 31 170 114 238 184 61 180 172 188 18 207 28 154 187 233 16 139 74 185 127 35 19 169 208 118 119 134 161 58 15 134 17 196 54 39 226 61 13 24 12 16 32 125 185 211 102 22 93 93 106 108 24 51 83) #f ()) #(188 "wrong length of digest" #vu8(49 50 51 52 48 48) #vu8(101 81 254 178 180 68 240 250 198 80 218 52 69 193 19 255 146 124 38 161 212 200 239 15 75 21 11 51 86 53 236 80 255 24 68 244 105 173 107 61 168 130 135 5 224 171 180 66 112 248 110 146 71 43 33 23 14 230 230 141 196 154 70 209 189 36 44 14 21 151 74 134 59 63 160 240 72 147 145 232 121 17 100 52 124 86 184 123 240 37 139 209 254 4 246 241 29 20 247 202 252 30 80 86 139 135 26 43 218 32 109 222 133 15 110 221 70 207 196 132 187 38 228 188 140 155 126 91 90 166 148 221 240 220 33 122 139 133 248 55 30 110 0 202 189 163 155 34 253 239 79 198 167 83 28 24 191 3 148 59 58 244 15 93 73 206 76 69 72 143 36 165 100 234 171 196 165 79 171 243 188 72 72 179 9 222 15 84 82 65 86 7 196 49 128 87 133 216 212 64 164 213 179 111 113 214 76 73 201 102 0 25 120 21 158 96 173 72 25 156 69 171 136 51 62 50 155 101 213 120 11 226 101 8 117 236 12 202 63 49 70 53 104 232 64 229 66 14 56 124 177 120 140 97 79 185 94 3 146 169 124 3 146 215 149 148 21 94 213 141 69 84 109 106 183 237 8 190 117 249 89 213 35 43 207 8 231 116 3 24 93 191 94 185 57 140 232 185 164 254 53 53 236 178 229 75 21 150 91 156 171 196 39 22 74 178 62 40 75 183 45 79 125 18 183 182 99 53 104 107 169 136 162 106 161 38 23 162 103 237 227 32 231 92 139 57 154 141 202 51 56 97 58 172 131 249 155 254 210 129 82 55 18 251 227 42 112 70 184 90 242 113 99 225 65 147 236 227 187 239 147 54 30 211) #f ()) #(189 "uint32 overflow in length of digest" #vu8(49 50 51 52 48 48) #vu8(22 193 183 196 98 93 58 184 185 167 89 91 218 150 225 187 124 112 221 123 67 188 20 58 171 129 117 36 211 252 242 129 174 156 213 223 44 30 25 73 214 167 212 254 222 38 155 99 8 97 76 30 202 214 219 46 231 18 80 222 179 138 149 92 7 231 111 112 39 42 38 27 251 43 49 186 49 85 179 140 211 112 91 253 221 33 72 242 227 224 151 103 96 196 240 5 26 31 37 26 236 116 148 45 255 63 231 139 220 54 233 200 212 20 87 244 41 3 189 237 35 224 86 131 4 92 19 28 221 78 52 56 49 162 161 210 228 24 53 94 32 40 210 179 236 148 104 141 58 205 126 58 94 244 192 229 63 77 114 42 205 50 140 185 195 202 63 4 151 246 245 197 71 17 238 200 105 60 103 254 156 35 94 69 234 159 39 185 57 1 247 174 152 231 126 220 41 90 105 125 138 23 169 27 149 78 169 16 144 0 105 180 57 8 2 75 53 183 171 168 34 227 202 87 175 65 41 22 241 165 223 33 62 71 96 142 101 210 217 3 239 118 39 85 174 96 194 65 177 195 107 254 234 194 2 184 163 80 134 221 150 27 6 83 76 204 90 42 79 35 163 145 49 169 21 238 29 28 175 140 91 80 131 75 34 76 254 248 186 139 117 43 126 3 11 94 149 83 97 164 99 166 185 8 248 200 208 204 81 58 249 37 105 102 20 98 77 18 196 235 164 173 114 178 167 114 123 90 41 40 184 51 95 232 112 187 23 173 240 137 211 1 22 215 201 240 166 203 223 181 62 95 90 183 240 86 175 98 44 165 231 123 121 113 24 247 173 217 90 113 21 4 158 74 195 30 245 215 133 142 223 81 134 196) #f ()) #(190 "uint64 overflow in length of digest" #vu8(49 50 51 52 48 48) #vu8(68 13 23 176 9 246 137 171 213 48 29 39 40 235 98 56 52 42 229 182 49 52 104 27 36 214 28 24 68 50 9 161 141 138 159 243 46 207 210 49 231 119 131 160 11 229 89 21 47 226 136 7 192 195 44 142 241 40 123 230 189 15 195 231 13 15 184 116 27 190 45 48 188 57 168 152 86 155 132 91 26 203 235 22 136 200 42 52 115 47 39 130 87 250 229 2 219 33 35 138 80 77 193 21 124 195 41 140 107 246 19 125 103 0 202 108 224 62 90 29 199 41 50 113 212 63 88 99 224 36 89 94 99 226 185 142 236 243 237 20 175 194 189 8 188 171 224 251 136 45 157 248 55 242 116 7 126 121 208 142 26 70 50 108 245 243 180 128 105 69 64 92 132 167 231 190 162 139 110 132 48 80 88 131 44 24 144 57 3 139 94 42 213 77 242 17 57 228 122 202 189 147 204 83 233 26 142 73 136 166 51 166 63 184 167 219 50 204 101 128 172 248 70 121 52 150 156 182 79 255 227 218 39 68 231 81 129 64 203 251 26 243 243 24 59 227 252 201 81 215 145 115 212 11 236 155 89 135 207 154 218 130 164 140 119 52 7 63 221 21 41 110 208 127 207 80 178 112 227 243 140 242 39 48 1 56 247 66 192 14 2 232 214 54 214 188 70 193 94 235 99 26 224 178 95 100 154 27 169 161 154 141 53 239 49 60 118 154 238 94 153 101 38 187 106 29 32 89 152 211 102 237 230 171 234 145 45 207 143 57 52 154 12 208 226 53 170 36 217 164 247 27 157 225 141 182 109 137 200 247 165 52 133 52 62 141 222 241 116 101 58 69 74 60 133 106 52 54 226 249 135 42 162 95) #f ()) #(191 "length of digest = 2**31 - 1" #vu8(49 50 51 52 48 48) #vu8(116 110 65 199 132 73 4 247 41 216 121 145 112 129 118 30 160 2 10 234 35 114 238 133 104 246 204 217 30 94 252 83 47 156 177 47 8 218 59 152 135 127 43 147 133 26 214 39 219 116 17 66 147 103 249 167 175 112 58 22 186 52 242 104 149 24 244 104 88 24 121 187 205 49 28 23 28 120 31 15 117 254 82 45 3 138 229 190 219 186 69 94 248 191 146 217 47 83 243 216 187 6 182 169 253 24 93 145 125 1 163 39 34 73 120 238 137 138 177 192 175 17 5 198 93 39 38 91 96 145 47 132 163 218 179 114 14 210 41 134 149 35 171 213 101 206 236 8 109 220 212 138 36 4 71 30 112 242 46 33 75 128 192 98 240 210 164 60 61 15 140 15 161 46 68 156 161 178 23 78 209 214 240 231 148 15 30 195 92 199 79 208 84 93 183 100 188 204 172 84 131 114 13 37 172 218 92 59 203 156 153 244 182 14 119 23 131 107 141 53 32 195 168 231 219 72 251 104 87 29 201 227 4 179 163 145 78 178 64 124 140 243 232 241 123 179 132 149 243 57 126 200 80 254 246 20 17 116 64 174 191 237 252 64 81 90 187 17 43 204 240 159 164 179 131 1 221 202 115 137 47 79 120 12 87 75 213 42 145 61 219 116 251 159 86 222 198 197 78 12 142 145 14 170 149 242 241 169 23 44 246 115 255 172 1 194 204 53 114 184 14 147 163 37 55 60 23 112 207 105 192 159 206 214 190 118 25 60 131 199 64 245 228 205 70 143 194 11 169 186 20 89 57 224 82 210 165 139 59 202 193 149 65 226 240 188 64 138 46 213 71 17 125 183 170 106 195 82 44 100 9 216 224 111) #f ()) #(192 "length of digest = 2**32 - 1" #vu8(49 50 51 52 48 48) #vu8(68 104 174 45 175 239 232 91 138 82 83 156 200 201 132 125 148 224 17 97 224 29 55 127 110 163 132 187 23 153 255 215 99 228 164 33 10 57 233 55 153 51 17 179 85 133 10 137 82 134 180 123 38 194 81 153 124 154 159 24 150 78 121 62 255 128 252 101 47 191 183 206 31 127 5 43 57 50 57 112 196 207 66 125 50 160 119 8 243 133 159 157 16 28 76 117 137 154 20 93 160 89 13 168 240 119 56 4 62 66 100 224 211 211 227 162 152 118 54 1 136 35 100 126 77 215 236 59 195 207 125 101 251 250 254 54 88 89 230 165 253 144 125 55 224 219 35 69 230 126 192 13 125 192 183 93 239 207 136 245 6 3 171 85 177 233 158 15 120 140 222 212 117 27 180 149 34 223 180 249 238 232 178 190 168 19 172 80 190 83 137 22 206 7 227 81 59 31 187 235 155 47 131 196 194 224 4 212 42 73 211 31 230 61 201 218 107 85 233 221 96 215 5 250 54 125 44 234 71 132 102 169 37 114 49 165 57 64 22 77 77 203 165 223 252 23 223 247 255 2 62 138 149 218 158 154 225 38 203 137 74 6 224 52 26 163 195 200 58 82 216 48 101 189 24 195 106 158 223 61 68 16 248 223 212 108 239 202 61 185 182 77 96 32 249 185 100 198 228 217 181 99 11 70 83 150 121 5 37 229 93 51 182 189 236 219 127 244 160 133 81 109 218 62 92 15 163 167 187 87 37 47 76 121 253 86 255 179 80 102 158 207 16 117 17 44 94 144 38 139 215 115 171 145 46 29 237 243 106 133 156 65 95 119 74 175 171 55 8 131 152 29 62 84 206 120 0 151 176 121 116 3 214 16) #f ()) #(193 "length of digest = 2**40 - 1" #vu8(49 50 51 52 48 48) #vu8(119 216 206 196 145 8 184 166 186 67 21 194 148 125 172 18 216 20 50 72 68 123 68 61 60 24 146 103 114 126 173 146 224 84 248 220 89 29 248 98 237 163 46 68 127 190 186 245 53 79 103 218 192 67 251 178 84 51 20 129 175 182 196 218 69 178 51 228 165 68 157 162 186 7 185 147 236 208 125 230 229 194 31 138 45 200 192 106 98 34 238 193 203 130 4 62 35 237 114 187 217 153 83 121 103 42 58 109 112 8 112 219 107 126 51 196 89 240 115 185 43 188 5 41 53 250 150 122 183 202 160 78 238 166 70 29 182 221 215 204 6 29 56 216 219 157 229 129 21 29 139 56 194 94 141 215 159 138 78 44 209 71 65 43 190 144 69 43 202 209 20 167 203 232 214 182 19 6 89 170 56 190 47 238 214 201 110 251 26 59 130 49 210 248 178 144 53 110 119 211 252 249 35 12 215 90 135 168 68 121 163 77 221 230 122 130 111 9 180 19 64 241 55 42 93 192 122 202 160 199 219 137 141 73 37 26 149 200 135 49 235 147 203 53 66 60 7 21 113 62 36 140 162 199 168 80 162 187 199 129 109 123 243 216 43 171 33 97 137 220 21 217 65 62 35 215 122 159 221 17 206 22 212 143 63 251 38 67 205 97 28 225 83 137 150 102 86 37 30 90 219 8 3 59 172 166 230 155 40 159 74 3 207 136 255 73 62 100 135 133 33 11 48 72 79 249 18 93 37 33 115 72 175 135 76 185 123 35 200 208 114 88 249 89 151 225 79 49 246 70 247 13 47 148 240 13 184 226 149 133 6 205 216 64 63 17 6 2 233 43 167 187 14 208 207 139 231 78 205 200 90 19 25 130) #f ()) #(194 "length of digest = 2**64 - 1" #vu8(49 50 51 52 48 48) #vu8(74 182 184 90 44 43 100 19 82 23 112 155 110 245 210 103 220 142 159 97 230 92 83 159 201 41 147 184 73 0 249 242 230 160 53 89 39 81 245 202 84 0 17 116 193 37 153 70 111 251 207 127 134 180 231 227 154 148 33 74 139 132 187 43 170 190 220 227 245 38 16 62 62 149 23 40 179 83 18 164 166 23 160 49 22 122 203 32 226 143 43 183 193 117 7 111 133 86 220 91 55 232 189 205 176 50 14 244 52 130 26 181 244 178 163 18 52 44 122 100 205 15 239 137 129 181 45 153 220 122 240 242 126 80 108 126 9 158 202 117 16 146 4 57 77 91 80 210 106 227 119 10 20 22 170 115 0 52 97 167 80 251 24 154 203 35 229 166 128 45 9 143 139 51 193 57 124 68 214 164 243 192 230 239 73 86 219 210 133 134 141 63 47 204 168 40 15 247 169 175 190 73 39 244 68 163 148 224 214 44 59 184 226 85 57 111 34 209 74 33 72 115 45 128 182 250 230 222 78 230 228 116 119 100 223 235 76 96 218 154 123 40 40 255 202 166 112 161 54 187 34 255 223 153 126 28 139 161 245 163 114 250 207 180 103 215 231 55 138 100 195 143 68 125 69 237 186 32 46 35 63 142 224 107 165 110 124 138 21 28 76 75 141 175 229 65 222 89 167 181 48 163 91 186 228 207 122 136 92 214 236 31 46 230 209 73 48 236 32 181 56 147 235 68 87 236 54 223 34 165 173 1 83 0 212 209 3 66 134 71 31 114 160 94 57 85 152 243 176 156 57 14 10 5 148 183 211 107 77 156 23 88 206 61 40 50 171 100 219 42 76 166 82 17 220 78 91 78 105 183 43 33 181 233) #f ()) #(195 "incorrect length of digest" #vu8(49 50 51 52 48 48) #vu8(19 29 157 114 119 63 58 107 144 38 245 94 219 35 179 72 204 180 227 79 103 53 204 194 4 89 42 105 255 25 102 53 81 215 61 52 12 222 190 159 29 38 202 25 42 197 135 100 176 41 137 206 164 232 37 56 99 166 217 55 106 73 162 221 106 181 61 206 182 120 195 234 116 231 240 180 255 151 86 61 193 104 226 2 11 222 74 86 194 28 152 143 136 227 121 254 100 123 58 57 101 28 28 86 27 164 68 238 182 119 215 19 15 155 157 90 154 76 217 176 159 200 121 194 83 159 44 66 59 209 84 88 239 50 187 28 113 213 181 24 162 13 213 15 74 154 206 197 118 72 190 191 196 223 121 100 251 109 96 208 211 113 22 213 148 134 75 233 248 38 202 83 83 59 119 49 112 144 163 189 16 36 187 122 57 202 103 244 58 150 245 229 42 165 215 61 105 40 140 163 242 222 84 134 65 87 159 84 228 132 171 162 228 103 109 145 206 1 165 10 144 153 106 205 211 44 33 36 163 206 161 16 202 223 164 99 56 55 76 135 251 82 70 0 135 169 202 234 130 79 184 54 115 121 110 40 226 208 13 87 133 177 232 32 184 211 92 161 173 5 35 183 36 163 16 182 6 164 191 166 81 90 43 122 242 49 220 32 51 8 233 169 208 163 155 193 12 43 230 134 81 134 3 68 102 26 115 205 30 129 182 28 195 179 155 32 53 193 95 111 234 244 214 130 26 56 137 142 62 146 15 14 112 123 167 42 32 33 61 134 178 100 40 115 219 195 10 218 91 92 252 48 137 95 28 171 3 147 56 63 97 167 170 193 228 66 243 165 235 208 29 22 213 196 183 69 229 107 135 177 149 34 246 73) #f ()) #(196 "lonely octet string tag" #vu8(49 50 51 52 48 48) #vu8(9 204 126 213 53 127 46 183 68 149 20 33 91 125 75 201 76 61 14 59 148 3 161 56 104 52 68 241 42 36 251 79 27 255 218 128 55 96 43 25 5 55 39 194 241 66 47 84 13 92 108 46 224 192 32 90 62 141 25 228 238 150 134 64 186 133 124 4 206 188 253 207 117 56 227 161 27 50 34 111 87 113 78 246 172 71 4 94 148 2 103 72 253 240 94 233 117 207 139 71 215 144 18 26 11 239 14 134 162 252 158 116 68 242 142 191 84 226 204 6 247 173 183 193 76 16 119 249 159 67 75 79 75 35 208 227 8 195 175 8 9 57 54 57 244 4 53 177 144 23 95 171 87 11 106 205 160 178 185 77 211 49 207 117 237 213 148 170 125 73 131 102 32 167 32 207 113 86 67 167 55 4 241 245 215 19 107 48 114 214 233 5 140 174 114 192 205 63 225 83 148 180 67 135 49 195 126 111 231 137 113 216 40 6 48 103 145 49 101 123 100 237 209 50 145 10 161 38 62 162 187 202 54 237 219 52 222 11 77 154 66 37 140 110 39 39 183 26 65 194 139 220 7 195 227 103 241 148 240 65 138 79 199 181 255 126 83 29 181 240 228 229 220 217 186 51 44 15 182 196 250 115 225 10 218 72 64 247 170 44 49 8 86 226 164 83 237 89 94 155 123 176 224 199 41 55 94 176 96 118 148 196 212 74 194 32 63 121 127 112 26 19 192 164 190 31 191 90 144 198 198 128 167 141 135 30 54 55 99 114 0 228 211 142 246 207 44 45 181 194 165 229 92 17 5 99 123 217 120 49 201 243 158 157 237 32 190 47 56 27 150 21 125 236 250 14 100 134 150 229 36 31 55 148) #f ()) #(197 "appending 0's to digest" #vu8(49 50 51 52 48 48) #vu8(136 137 186 58 5 86 215 214 90 8 190 220 244 12 40 98 64 156 246 92 93 235 130 27 125 18 230 209 150 24 89 184 172 145 23 123 125 80 255 129 104 207 128 254 136 38 110 87 76 111 215 25 152 7 5 189 124 72 141 118 142 21 210 248 113 241 57 4 174 34 128 226 28 127 230 93 161 153 136 242 246 45 132 200 122 50 173 161 95 163 160 89 30 143 123 172 93 166 126 115 57 150 108 148 192 216 100 230 112 206 160 12 129 10 1 237 120 192 85 37 98 179 124 17 160 68 39 193 0 205 164 198 81 31 41 134 229 119 129 78 72 255 86 93 63 131 112 231 147 33 230 18 195 113 253 78 27 156 249 61 83 99 104 68 252 108 57 46 84 127 92 48 159 163 184 156 246 45 25 18 240 119 76 130 197 103 152 155 193 67 153 209 250 11 29 135 214 126 241 90 233 196 213 119 247 140 145 63 88 196 140 210 141 171 149 214 53 139 73 65 9 38 129 98 66 237 187 202 151 223 233 250 159 68 100 159 224 47 200 198 32 254 134 118 119 8 161 97 150 6 171 108 135 62 151 12 155 186 27 184 8 58 113 226 136 138 122 73 23 174 135 103 179 5 28 227 36 200 186 187 202 126 250 69 9 248 24 98 100 151 97 9 195 176 178 180 83 225 187 27 116 104 86 123 226 132 77 226 149 9 138 141 132 150 2 192 38 31 108 50 132 97 53 23 247 158 132 0 141 232 235 193 81 185 138 156 25 163 131 58 140 50 44 208 33 175 9 66 46 9 147 141 176 176 156 221 173 71 219 11 238 204 186 94 165 109 43 3 62 45 144 227 39 53 159 5 109 34 105 44 183 174 178 198) #f ()) #(198 "prepending 0's to digest" #vu8(49 50 51 52 48 48) #vu8(37 37 148 201 52 25 43 102 163 73 229 131 50 201 255 17 16 38 197 18 164 57 248 134 223 24 89 243 39 216 117 131 111 82 158 156 70 42 149 213 176 232 238 107 64 126 214 247 167 81 43 112 228 38 18 193 71 158 133 99 136 218 141 202 206 145 120 11 226 245 109 169 156 74 118 37 31 134 242 239 226 226 20 64 76 207 190 38 114 139 103 102 249 162 143 135 135 174 49 141 63 237 15 165 133 182 139 215 106 178 56 226 135 57 239 25 175 171 18 71 237 27 177 25 250 80 241 252 206 75 185 70 4 117 16 188 104 58 228 153 115 12 243 22 234 185 111 20 214 84 171 49 23 134 18 31 247 242 172 9 206 20 107 152 236 3 2 119 92 11 159 6 190 2 64 178 134 149 137 79 83 236 26 146 237 152 93 92 108 213 93 156 165 214 72 145 132 38 115 210 219 232 244 214 166 120 218 73 41 236 168 69 8 135 136 66 41 163 237 171 51 5 182 145 242 66 218 123 112 67 240 215 89 214 195 99 97 102 78 69 102 170 65 158 38 148 65 149 171 135 70 160 93 86 56 89 67 217 113 161 235 173 98 124 42 158 108 66 146 83 161 20 42 188 171 90 183 27 203 53 183 198 220 137 255 87 149 170 225 250 13 125 138 229 254 50 123 57 89 211 199 195 115 199 169 140 243 130 129 159 33 230 252 29 41 174 21 137 120 135 114 128 51 182 192 92 41 60 40 189 150 112 183 189 127 231 0 81 241 211 11 195 233 180 242 13 108 170 199 125 51 28 60 134 76 97 115 60 236 181 207 87 86 169 195 228 133 181 143 147 98 97 72 126 242 184 5 75 90 31 149 196 41 91) #f ()) #(199 "appending null value to digest" #vu8(49 50 51 52 48 48) #vu8(15 230 85 83 64 104 95 131 68 79 216 68 174 94 125 17 165 171 54 146 47 60 99 128 52 50 204 184 75 54 67 240 96 250 122 189 198 134 88 145 161 103 43 102 185 33 134 122 176 143 198 42 77 196 129 4 185 235 142 75 216 156 38 184 33 196 144 232 67 195 81 127 205 194 73 190 102 104 12 164 15 44 59 117 0 34 140 189 208 50 60 246 182 167 193 138 24 70 192 66 103 111 80 190 69 128 43 164 241 145 122 132 5 131 130 185 240 161 64 27 22 86 180 148 163 37 169 241 81 237 196 159 226 204 145 157 132 227 160 39 216 200 58 251 184 237 90 114 246 129 85 134 173 163 15 215 182 251 60 149 176 99 206 158 232 254 162 177 52 174 66 171 139 240 129 16 48 26 136 56 196 36 152 244 214 180 73 225 220 198 84 84 248 26 240 173 47 108 20 111 11 63 240 235 199 97 181 59 127 133 83 35 204 76 22 149 102 7 168 158 35 139 55 107 215 100 21 100 138 38 200 164 115 112 158 240 43 39 162 207 98 100 80 201 46 209 35 142 233 93 249 15 75 156 184 255 29 109 9 43 251 121 192 224 17 78 253 176 171 152 156 239 66 128 184 168 8 155 77 101 70 14 220 159 147 216 154 171 106 208 114 175 201 3 199 79 204 136 154 30 6 172 139 171 142 97 188 234 229 227 37 175 104 209 53 124 240 116 123 209 12 16 63 160 79 105 213 99 251 39 10 6 243 130 19 5 222 63 2 172 22 23 112 15 7 236 170 109 213 37 239 158 84 185 68 158 41 116 169 78 126 123 131 7 101 148 149 215 0 24 31 9 248 104 0 100 55 92 161 156 175 235 91 129) #f ()) #(200 "truncated length of digest" #vu8(49 50 51 52 48 48) #vu8(28 8 73 100 76 114 130 31 137 119 94 130 64 148 159 211 23 230 106 210 22 190 178 135 104 101 218 240 103 16 61 81 252 66 139 201 225 157 234 57 177 109 243 207 85 254 154 249 148 30 212 86 169 179 152 179 115 236 125 230 202 156 23 99 82 215 210 178 226 99 85 41 195 119 21 193 19 155 54 161 5 247 222 244 170 230 136 38 111 238 204 242 42 7 109 25 213 25 172 167 107 136 183 19 100 253 168 181 253 82 192 131 46 210 72 61 58 55 147 22 227 112 183 225 12 142 98 9 222 191 33 114 68 103 65 175 246 118 218 49 215 118 27 116 151 242 229 91 247 137 84 203 51 82 229 28 143 134 134 207 153 73 197 61 3 214 175 82 88 205 60 207 68 42 110 119 58 104 126 201 90 7 210 253 60 55 173 12 124 114 154 131 47 10 227 104 157 31 59 178 114 161 249 1 161 178 249 225 97 67 43 87 195 127 163 171 251 80 158 125 217 22 7 137 93 244 92 242 183 114 15 92 163 74 155 116 205 191 130 201 99 122 219 57 26 215 15 83 228 113 49 162 47 130 112 159 237 49 201 144 84 162 170 237 147 94 151 145 161 166 25 11 114 74 22 229 223 116 202 20 209 209 87 38 204 249 110 223 234 139 245 223 233 244 135 71 244 81 83 5 110 192 104 66 158 208 128 235 94 197 127 15 122 201 200 28 230 177 220 204 29 239 213 82 128 136 102 30 10 5 3 34 225 162 243 21 253 101 164 222 206 233 239 159 48 33 163 74 242 177 246 195 101 214 128 240 12 12 233 209 155 161 43 93 251 81 92 18 155 122 99 195 76 80 51 237 249 216 118 192 62 31 53 148) #f ()) #(201 "Replacing digest with NULL" #vu8(49 50 51 52 48 48) #vu8(86 129 236 53 180 151 8 184 248 150 42 87 154 51 233 104 153 71 233 136 50 70 168 223 153 154 53 216 188 36 39 30 193 70 6 104 153 158 199 65 146 180 245 220 208 212 159 34 179 28 119 175 218 116 142 59 236 88 237 82 233 109 212 91 35 246 107 123 44 44 112 58 221 100 230 121 72 103 233 190 114 189 58 79 128 67 26 214 215 107 154 80 43 155 129 240 77 18 111 101 193 142 159 227 149 58 242 2 60 85 25 250 230 149 139 199 163 146 171 84 19 178 203 205 33 54 73 27 95 37 192 41 88 168 68 215 0 70 140 43 202 67 29 43 153 140 193 236 107 49 133 98 52 246 125 80 135 42 235 18 233 212 1 245 151 24 13 57 110 116 219 134 45 176 115 253 21 127 244 194 207 11 115 200 108 254 82 102 217 158 249 105 217 134 35 105 96 215 16 133 60 85 64 246 47 18 223 9 240 168 26 123 10 203 101 113 121 171 176 68 42 222 68 70 60 231 41 84 15 49 179 194 223 150 135 21 31 20 43 93 243 145 61 3 102 4 99 111 223 81 48 108 50 151 56 254 204 113 29 87 113 62 95 38 48 231 105 102 43 238 69 11 181 252 140 135 224 218 138 43 252 37 144 46 92 82 165 194 252 212 107 240 39 85 10 231 151 111 142 208 8 205 244 182 181 61 50 189 163 125 254 249 201 138 60 182 130 0 195 224 107 10 16 221 115 208 45 169 196 57 40 225 76 116 85 20 14 125 74 251 201 114 192 137 151 126 11 214 149 36 167 33 172 244 138 79 180 93 238 118 176 71 61 180 172 25 7 255 213 134 197 76 100 61 110 13 223 4 211 130 20 57 243 228) #f ()) #(202 "changing tag value of digest" #vu8(49 50 51 52 48 48) #vu8(52 158 159 178 58 78 179 201 67 216 64 145 42 68 120 112 170 169 28 61 73 76 5 177 248 1 188 83 132 252 11 126 155 11 13 104 153 70 43 205 11 53 126 183 9 76 224 158 129 122 9 31 16 204 52 186 121 63 183 149 39 89 204 252 142 189 165 189 196 183 184 147 45 179 205 24 245 203 13 60 204 7 225 205 90 101 55 167 1 240 108 7 238 1 67 61 80 161 108 83 49 162 169 19 168 45 211 200 202 149 230 107 72 18 55 189 56 188 118 226 19 175 61 50 72 154 50 90 228 72 53 139 214 133 9 211 84 26 148 202 137 200 152 172 246 246 189 103 205 102 200 82 34 34 161 235 175 197 244 125 241 176 177 12 8 184 77 187 129 146 110 158 113 4 192 46 123 213 167 122 25 235 191 172 79 180 35 245 239 9 86 169 202 62 244 157 222 193 247 89 29 133 31 102 131 72 104 144 140 200 168 245 105 146 30 199 169 161 36 141 15 42 166 140 56 15 25 78 128 88 14 49 19 66 124 246 235 182 149 219 24 206 52 88 69 191 34 199 95 98 191 145 204 161 195 235 57 56 20 163 143 75 234 8 192 243 95 3 185 183 124 198 81 64 163 130 180 55 106 242 124 101 62 27 122 124 11 248 1 253 211 209 140 90 163 117 158 235 37 193 88 193 237 140 152 101 248 193 207 11 100 56 228 18 104 6 103 169 78 76 57 10 211 217 22 179 185 196 122 80 166 186 70 11 31 240 90 61 241 247 240 245 133 150 0 93 40 175 117 235 69 122 237 133 171 100 117 167 49 114 232 235 152 122 244 21 88 2 140 140 218 218 26 117 66 41 219 28 53 105 157 113 121 130) #f ()) #(203 "changing tag value of digest" #vu8(49 50 51 52 48 48) #vu8(65 154 208 227 28 222 149 203 83 211 179 168 107 138 143 182 5 160 221 8 187 73 4 207 254 192 209 41 171 123 32 203 169 31 221 237 208 25 137 127 180 134 133 111 215 121 148 119 2 239 190 146 154 0 104 96 65 115 84 180 147 37 130 8 75 117 227 7 100 152 37 159 220 120 59 52 68 21 41 194 83 129 204 87 209 1 110 25 103 104 219 192 24 121 215 104 209 88 194 153 50 92 187 15 132 163 113 42 12 145 120 229 124 89 46 125 165 233 93 223 53 161 173 177 199 210 23 237 19 162 241 245 63 118 52 66 54 234 147 190 167 31 17 58 97 194 103 126 62 213 196 6 164 231 14 221 215 100 57 128 75 104 96 51 116 82 218 140 188 239 128 175 123 20 76 233 219 215 206 224 16 38 140 157 198 138 65 69 173 242 189 253 5 246 79 228 149 163 196 198 153 99 88 225 131 62 7 246 161 137 238 59 65 149 32 66 105 109 75 152 136 230 204 240 148 11 68 67 173 183 139 120 123 41 246 193 152 46 111 134 176 153 163 166 189 6 97 164 37 157 75 150 140 200 52 103 67 54 50 216 111 241 140 44 252 146 13 186 43 250 190 133 46 40 53 37 161 95 191 47 231 169 101 179 40 248 227 69 20 179 67 1 130 212 38 167 227 179 146 2 77 139 254 32 225 186 173 203 72 78 172 14 169 120 18 204 201 42 64 68 246 13 68 109 32 3 8 10 111 44 187 164 122 251 116 254 61 72 252 157 89 156 80 34 123 48 223 117 169 65 200 241 157 111 214 237 102 185 211 222 216 153 71 237 25 188 172 125 180 250 184 9 122 45 110 230 82 218 97 22 58 123 90 49) #f ()) #(204 "changing tag value of digest" #vu8(49 50 51 52 48 48) #vu8(149 85 213 106 94 218 211 202 127 28 64 112 14 226 160 114 103 49 89 25 53 134 176 135 19 54 41 149 137 139 163 132 170 203 118 247 239 60 188 225 233 79 183 154 119 247 43 172 91 231 58 234 253 156 211 182 5 70 182 58 191 87 87 65 165 130 79 91 10 98 25 5 175 246 199 8 85 49 147 101 4 218 21 17 14 223 49 136 123 233 201 11 150 149 11 171 223 189 111 91 12 207 233 156 76 48 15 115 4 8 189 7 189 123 157 3 93 123 130 156 253 112 69 21 11 28 158 137 180 96 13 111 9 186 255 170 77 186 72 97 28 140 63 116 95 185 84 165 47 171 105 68 182 223 127 140 196 38 108 48 66 189 14 109 123 49 164 6 64 247 38 86 124 68 212 86 221 169 62 173 183 226 1 109 79 161 10 3 118 232 172 196 228 237 1 208 132 157 163 193 120 166 199 92 13 122 139 105 90 140 252 132 208 216 207 41 97 155 62 237 250 202 194 22 92 49 252 195 195 166 240 98 253 85 66 195 5 70 12 245 88 88 211 114 38 123 249 95 88 129 127 55 172 123 144 193 156 105 241 125 156 222 180 80 78 215 194 120 220 16 193 42 134 39 58 145 158 3 65 158 235 37 49 61 151 109 146 127 202 221 190 8 228 53 127 123 187 173 15 39 63 11 176 48 40 71 224 75 200 156 133 10 134 5 241 184 255 10 254 159 233 160 15 208 92 130 53 206 215 102 204 176 242 216 89 13 159 214 194 12 79 225 108 90 96 224 86 65 78 202 111 232 136 237 95 163 56 231 183 226 114 64 189 188 108 112 142 19 163 22 193 19 195 175 2 75 78 125 197 54 10 234 52 131) #f ()) #(205 "changing tag value of digest" #vu8(49 50 51 52 48 48) #vu8(136 41 6 24 8 234 122 239 43 51 142 187 207 190 169 157 207 205 227 25 88 66 1 147 50 110 38 250 90 173 188 158 175 186 47 73 179 139 214 41 245 191 28 45 62 146 0 0 80 213 216 147 96 137 106 138 41 209 71 170 162 173 214 34 229 145 61 164 57 69 26 149 28 2 134 134 60 191 238 48 131 88 90 248 131 144 158 164 152 49 79 88 116 40 41 68 84 109 227 42 128 169 48 159 169 70 94 191 50 77 72 42 168 40 60 133 137 238 144 117 122 197 45 232 246 101 78 231 8 180 79 88 140 87 143 8 51 168 32 200 165 107 213 117 85 35 96 173 252 185 92 57 97 106 72 143 44 149 253 148 224 131 195 5 213 222 195 138 21 142 185 76 64 192 24 230 180 0 46 254 210 158 40 247 137 128 204 158 174 116 86 198 182 139 4 245 160 220 12 42 51 183 27 9 17 224 88 191 30 98 155 141 252 129 135 49 157 120 40 89 83 213 58 56 191 241 169 148 162 59 1 122 116 182 209 139 134 211 126 9 39 28 255 81 229 209 19 217 217 71 171 235 24 140 7 65 130 207 40 31 220 135 153 48 104 80 35 165 112 53 148 130 10 76 177 220 34 199 0 112 131 174 190 158 200 82 90 4 76 223 103 213 142 119 94 82 94 194 217 84 242 238 163 22 204 18 112 30 168 163 38 39 184 219 2 21 44 202 157 222 135 166 191 93 213 235 75 205 163 179 77 53 23 29 145 82 86 15 148 172 45 196 59 237 51 243 224 240 38 241 165 120 190 228 108 49 30 59 20 212 68 66 132 130 149 33 132 229 169 176 92 156 202 12 186 55 182 180 211 8 68 170 215 138) #f ()) #(206 "changing tag value of digest" #vu8(49 50 51 52 48 48) #vu8(159 142 162 90 64 122 203 132 92 107 230 228 203 38 59 230 76 194 252 167 213 115 83 107 48 118 199 90 233 211 140 183 1 86 135 62 178 255 250 53 135 195 101 10 129 206 25 162 84 226 237 227 65 11 12 16 248 162 244 184 151 44 117 223 198 144 237 41 237 27 65 164 76 20 157 252 54 213 240 114 19 16 28 212 210 198 189 58 155 54 114 121 175 8 248 160 47 195 70 67 116 82 187 64 196 109 112 93 176 120 239 212 156 10 192 250 107 226 117 227 178 219 96 171 23 32 77 135 227 82 1 164 38 196 193 179 3 64 255 220 102 103 194 224 186 130 220 204 209 19 64 225 199 204 252 209 140 107 52 172 21 69 225 142 48 52 226 150 194 203 72 46 91 138 169 35 182 133 151 102 122 189 2 175 84 175 124 234 149 203 47 217 35 220 144 172 230 255 144 105 137 205 185 141 54 172 180 15 86 99 207 214 198 137 118 229 2 231 155 132 91 89 42 186 2 180 58 177 102 153 219 202 215 76 15 0 222 205 30 38 175 25 99 196 157 187 198 186 235 88 92 156 188 130 48 130 114 103 192 246 51 2 105 49 122 240 27 160 238 146 139 4 232 58 217 79 216 113 203 189 58 29 77 165 138 205 204 64 50 112 66 118 41 48 153 80 131 193 12 219 178 217 84 60 252 107 84 120 230 26 229 68 246 107 182 83 50 160 97 212 240 127 174 65 243 178 81 48 132 154 169 238 74 233 73 123 175 176 20 61 239 141 10 47 160 225 159 135 177 83 254 52 248 23 164 108 176 3 72 211 154 177 80 119 8 226 194 222 252 56 132 134 114 78 147 113 20 135 97 218 4 217 149 232) #f ()) #(207 "dropping value of digest" #vu8(49 50 51 52 48 48) #vu8(109 103 85 39 89 79 121 204 94 102 201 247 149 87 59 183 55 79 102 235 57 111 151 193 254 237 7 114 200 109 189 26 59 54 22 127 85 114 133 234 224 102 86 113 24 103 10 120 125 79 241 19 167 167 239 87 93 224 88 117 195 188 234 218 122 242 200 106 186 98 19 82 240 177 236 26 163 165 147 123 250 131 14 133 158 131 107 58 10 98 132 31 238 183 210 70 10 38 111 214 217 48 92 241 132 33 161 116 77 147 24 58 166 142 23 206 29 97 188 85 238 190 33 162 63 168 191 27 148 4 91 16 88 15 87 227 147 160 199 32 129 170 28 131 191 144 32 227 212 195 231 97 69 106 24 161 254 173 94 0 21 112 41 182 86 121 125 252 50 28 117 79 209 176 156 178 17 19 3 209 189 96 60 44 62 101 9 81 81 108 52 191 233 101 14 3 68 96 113 204 25 255 149 41 80 94 28 111 105 226 253 63 97 167 19 152 202 139 85 49 8 67 3 58 208 199 85 120 161 29 179 232 58 216 2 253 51 93 203 113 232 62 203 78 223 71 250 175 208 177 188 207 184 159 49 114 249 87 234 223 230 29 155 9 113 133 21 11 165 130 210 63 117 56 124 170 36 141 17 65 61 20 60 56 98 123 226 68 189 180 66 239 71 86 35 108 243 33 40 130 100 168 146 133 107 160 181 120 79 145 50 110 88 254 254 128 227 47 88 58 235 86 246 32 74 84 6 33 25 232 119 88 204 212 239 9 150 171 81 87 146 64 56 65 73 225 241 155 207 84 226 112 147 123 63 145 80 96 185 137 192 38 181 253 163 137 25 187 159 186 107 249 131 9 28 44 111 51 143 171 190 151 28 150) #f ()) #(208 "using composition for digest" #vu8(49 50 51 52 48 48) #vu8(40 172 89 253 138 101 198 157 189 76 102 227 170 178 209 188 189 147 213 78 71 16 179 195 0 59 216 225 168 95 254 110 33 255 230 186 101 38 243 204 220 181 99 41 93 183 86 247 239 41 218 245 195 33 10 54 195 79 164 47 161 60 106 85 123 79 127 174 150 81 71 66 10 220 205 14 16 19 207 33 0 150 61 255 108 162 115 113 163 79 199 206 114 247 222 98 161 182 153 43 107 254 40 112 70 240 22 17 192 251 101 135 47 163 249 136 7 82 149 183 55 49 235 241 73 223 155 48 1 111 48 94 149 12 70 190 245 124 196 12 192 218 236 236 220 60 161 151 157 161 52 16 46 71 49 155 5 0 203 50 179 55 24 45 5 60 15 23 186 155 154 120 102 163 133 40 85 209 229 249 20 162 27 131 84 128 147 212 166 196 248 246 53 248 201 215 182 98 90 173 57 10 32 44 109 60 252 36 178 184 169 209 149 19 91 222 108 237 95 87 54 141 46 203 161 102 231 241 126 5 210 149 152 98 125 140 230 180 157 62 104 24 39 230 24 82 114 32 4 22 80 42 27 158 26 252 180 249 189 69 79 163 150 34 195 235 131 155 197 95 2 26 208 6 169 12 75 45 159 154 147 58 146 223 123 45 153 120 104 53 44 208 17 248 236 23 170 198 97 154 240 190 78 206 87 71 185 38 90 65 24 94 188 101 25 220 67 177 186 154 226 12 248 146 159 84 223 110 76 224 47 135 230 73 185 117 209 230 156 134 16 205 252 155 99 100 161 72 178 23 108 241 189 228 134 170 20 29 168 25 246 57 245 135 137 235 168 150 233 148 104 150 254 25 149 96 159 222 192 137 231 95 215 66) #f ()) #(209 "modify first byte of digest" #vu8(49 50 51 52 48 48) #vu8(109 5 226 247 38 233 163 103 182 95 132 27 1 132 78 97 82 128 54 68 101 7 28 134 179 244 165 39 222 187 215 205 70 245 115 45 98 3 114 123 134 136 137 67 141 86 155 130 25 87 118 44 69 20 89 81 221 184 255 118 253 169 127 95 138 39 158 184 64 249 241 245 33 248 4 200 230 81 104 35 63 133 173 184 99 130 74 116 139 90 91 19 149 151 147 53 161 79 189 209 96 229 85 186 6 75 121 250 59 109 11 49 105 39 83 253 242 224 136 239 245 73 247 246 252 196 37 100 68 119 138 209 174 81 18 165 156 228 233 150 34 20 191 13 78 123 78 133 201 60 169 204 175 85 181 83 2 238 58 208 121 94 164 244 218 144 175 137 108 175 38 21 171 162 211 251 33 73 156 79 248 19 246 150 197 77 11 149 91 15 179 75 78 234 135 75 249 52 33 147 34 108 109 107 41 103 84 59 157 56 31 51 247 55 15 93 127 245 248 157 215 159 56 139 88 65 230 79 27 120 93 158 41 254 35 92 125 80 159 210 58 8 212 115 239 59 117 251 138 126 139 167 130 116 213 83 143 206 221 35 136 110 217 22 207 32 192 5 77 196 52 56 6 13 166 182 133 96 114 25 65 10 8 36 95 33 71 121 172 210 120 97 150 137 186 126 98 29 2 87 245 74 37 131 163 80 139 13 105 169 104 81 107 87 69 190 137 30 224 115 25 137 161 97 135 33 109 71 96 11 171 112 0 171 157 52 212 29 81 93 144 157 151 65 157 196 214 63 240 20 233 219 145 230 243 213 238 131 162 45 16 9 50 117 134 244 81 251 173 167 87 127 101 64 149 74 118 10 65 76 239 15 228 43) #f ()) #(210 "modify last byte of digest" #vu8(49 50 51 52 48 48) #vu8(59 7 200 62 183 22 51 204 224 45 112 155 254 146 123 170 184 19 151 118 86 92 144 239 79 54 59 157 254 36 181 25 127 79 69 122 77 85 21 177 139 88 51 169 115 42 135 202 12 160 246 87 39 103 239 220 121 226 154 116 41 184 249 94 93 145 35 107 168 142 3 4 31 53 24 143 207 48 86 153 164 90 16 244 61 22 153 26 156 65 87 242 89 212 201 42 159 85 84 104 104 12 209 125 165 236 147 191 176 248 242 253 30 219 6 70 118 52 102 175 71 4 239 70 18 60 35 44 226 48 170 223 8 3 232 156 239 164 14 139 192 15 245 59 214 212 100 102 176 88 177 46 222 127 109 218 192 75 175 66 11 3 115 153 12 211 198 158 39 124 29 164 33 40 142 248 95 113 116 121 49 24 222 214 230 89 68 198 102 187 198 173 128 210 252 23 229 250 2 85 129 45 209 242 39 203 159 98 241 216 232 231 39 247 126 231 97 16 105 79 2 23 179 209 223 229 32 108 83 162 217 144 133 8 188 144 46 10 173 243 24 216 204 229 26 77 238 2 125 180 175 137 30 180 149 251 105 238 143 99 225 155 219 199 231 159 99 110 203 164 231 59 196 203 199 124 252 56 247 35 73 130 124 190 78 167 212 22 253 102 187 254 206 13 128 137 226 105 23 230 179 209 106 70 97 57 151 78 95 88 55 147 139 220 126 90 219 25 171 223 12 150 1 174 68 137 89 17 210 106 224 174 208 141 253 240 237 19 166 7 13 165 26 123 52 103 148 253 79 253 27 176 228 176 237 164 17 141 174 56 142 115 138 166 212 81 251 132 51 184 161 202 75 4 229 179 109 143 243 220 213 55 73 142) #f ()) #(211 "truncated digest" #vu8(49 50 51 52 48 48) #vu8(46 241 181 125 75 174 104 211 54 3 113 156 51 161 212 8 241 237 191 2 98 215 241 28 241 254 18 113 32 109 48 4 171 88 26 17 232 112 231 174 221 157 72 244 206 214 209 121 32 212 98 96 51 30 59 105 54 190 57 118 192 25 93 117 241 174 10 49 83 24 133 218 252 188 253 171 16 143 131 12 168 17 220 84 101 6 59 75 11 227 100 226 132 204 117 159 172 74 110 33 170 21 111 105 22 101 74 159 70 248 80 215 20 210 69 221 12 5 66 230 18 146 16 24 57 198 60 53 152 213 143 86 187 155 30 250 68 190 93 106 42 220 85 72 196 198 114 65 61 85 31 253 242 57 85 1 64 233 30 183 99 197 66 86 97 60 145 13 78 28 149 26 26 155 40 0 73 227 104 223 205 122 102 68 135 135 174 10 199 99 143 76 198 139 253 219 10 131 123 18 67 6 180 232 100 215 168 158 237 98 194 12 108 101 14 28 36 6 76 124 119 151 38 213 101 94 124 124 15 41 179 41 142 230 81 143 68 179 22 235 14 103 254 31 248 131 172 208 191 62 143 67 214 102 219 129 159 80 202 60 118 81 72 211 85 43 254 217 135 90 183 101 6 197 171 128 8 206 25 22 50 100 213 121 44 175 71 159 209 38 249 237 140 204 35 79 62 105 110 98 168 230 197 173 223 160 85 141 154 35 188 9 244 222 227 191 3 220 127 153 113 17 221 15 31 204 51 28 108 17 90 210 153 192 131 124 196 181 41 51 216 67 250 235 133 239 128 151 27 164 230 195 88 210 144 97 163 86 50 191 121 74 206 75 133 81 61 176 88 229 79 129 253 180 58 32 213 231 192 191 252 63 156 184) #f ()) #(212 "truncated digest" #vu8(49 50 51 52 48 48) #vu8(36 21 192 97 165 13 163 161 236 102 54 133 113 39 55 142 235 17 23 25 77 157 178 20 126 196 241 30 93 107 74 145 55 232 21 158 81 239 18 91 243 151 120 47 227 220 241 90 17 12 25 148 241 236 208 6 194 3 11 229 222 13 148 224 224 158 85 88 28 216 48 234 251 20 191 180 115 242 154 47 17 215 187 11 126 167 183 167 21 97 71 247 214 225 63 53 65 248 223 209 10 77 134 123 127 130 229 80 188 124 85 58 67 134 107 41 91 84 48 250 175 125 95 244 34 14 143 225 181 56 131 126 146 234 200 17 252 113 58 131 83 50 65 179 30 16 4 98 127 88 63 227 73 238 92 125 253 51 79 217 180 73 77 174 104 9 2 156 18 184 219 168 101 115 74 215 134 130 136 170 109 27 218 69 243 118 57 210 208 254 239 63 59 26 116 39 32 250 160 198 40 223 224 22 234 65 58 72 3 42 30 204 252 92 84 246 103 200 109 20 232 198 173 91 159 122 68 252 10 133 225 170 118 139 247 253 119 141 113 69 154 146 207 7 55 77 44 201 230 237 38 96 51 15 78 139 98 226 199 17 126 220 169 209 109 155 16 216 51 178 193 35 9 167 162 233 217 111 182 235 167 96 164 195 82 142 113 171 58 139 235 27 17 3 152 151 68 59 190 140 133 183 8 97 60 33 74 122 183 167 184 28 134 180 147 183 95 197 177 25 108 170 43 17 56 178 57 176 196 85 241 115 56 204 182 202 163 90 66 4 85 211 221 206 230 221 208 24 71 99 42 173 68 234 136 87 60 213 14 101 136 229 134 240 173 99 101 231 170 58 143 169 65 224 182 8 155 151 22 229 131 46 182 89) #f ()) #(213 "wrong hash in padding" #vu8(49 50 51 52 48 48) #vu8(84 42 252 141 61 60 206 150 135 148 159 140 84 15 144 35 47 0 142 141 32 24 251 239 39 72 112 233 155 108 225 12 166 189 78 185 180 127 254 84 123 204 30 126 173 217 100 63 97 190 96 248 111 136 77 216 166 110 27 21 37 80 179 151 215 187 172 156 196 41 108 74 245 225 75 238 102 176 75 200 138 140 161 211 81 137 202 76 208 252 125 10 231 60 82 8 97 72 186 38 66 151 9 131 12 51 156 61 200 156 184 219 160 225 130 227 223 155 149 251 16 229 21 15 24 184 30 227 2 53 4 164 177 218 168 248 92 162 35 111 98 16 143 255 34 25 54 32 62 156 90 176 141 66 187 178 8 188 49 138 237 72 105 104 110 132 76 27 148 217 76 195 186 109 173 87 37 179 67 218 185 176 21 83 255 80 17 229 148 150 200 189 49 115 161 210 178 250 186 55 147 3 4 51 149 60 225 8 92 75 138 139 153 92 245 207 237 52 15 36 162 145 122 245 53 162 109 28 12 95 58 59 177 6 195 0 132 159 200 254 38 32 61 20 239 203 59 29 146 20 165 101 73 63 93 7 224 132 243 103 92 151 30 204 143 182 203 177 247 196 224 115 82 177 179 255 158 66 134 210 88 231 177 46 132 76 118 255 158 177 142 17 48 76 173 183 199 129 102 28 152 187 235 139 142 40 183 96 198 110 215 24 144 243 252 167 191 218 161 92 4 254 126 181 54 34 9 106 134 102 222 36 68 9 94 3 240 22 240 148 128 8 72 222 41 38 137 130 70 110 160 64 30 235 76 91 138 24 83 212 182 163 62 113 118 251 63 106 49 189 214 213 115 203 232 87 186 0 197 213 55 30 232 28) #f ()) #(214 "wrong hash in padding" #vu8(49 50 51 52 48 48) #vu8(49 105 15 215 17 35 109 214 202 58 207 88 81 149 172 83 203 214 54 6 150 132 244 4 38 202 134 225 178 215 176 51 246 185 3 63 167 91 54 237 154 132 142 44 159 148 229 184 221 5 185 57 108 17 81 77 223 174 24 232 222 90 61 81 22 191 129 170 178 28 46 86 75 25 25 127 229 232 61 188 135 244 252 26 253 195 160 166 97 127 63 222 228 214 62 137 176 124 204 48 170 255 244 193 146 204 1 100 168 28 3 37 133 205 146 201 151 216 82 160 171 53 163 48 3 14 89 221 73 254 17 59 136 154 206 243 77 39 142 171 201 133 183 11 49 46 107 182 43 162 120 215 210 203 85 122 163 140 136 185 160 164 244 235 181 27 135 48 102 2 97 154 147 97 216 218 248 188 130 137 226 50 102 95 146 162 68 236 14 139 4 21 16 198 193 1 92 1 192 91 251 13 54 153 157 228 165 127 179 18 114 88 225 171 38 83 101 254 43 76 5 22 51 37 75 66 145 49 163 48 117 4 34 7 72 3 182 222 206 21 91 179 175 80 141 244 112 111 166 180 101 227 190 40 9 66 226 109 130 131 12 170 179 118 219 106 92 149 202 221 202 128 154 36 111 5 254 31 185 51 106 67 58 73 177 235 49 178 111 206 130 1 23 145 79 109 125 72 156 60 121 184 214 122 242 156 129 90 40 131 71 15 83 132 246 81 96 136 186 29 153 157 13 74 209 199 165 208 6 223 82 60 166 146 41 210 10 182 119 79 247 173 141 128 198 243 145 38 113 71 92 254 201 119 130 123 254 229 64 192 156 75 225 227 250 26 229 81 106 235 84 119 59 82 38 33 250 255 21 2 75 32 180 71) #f ()) #(215 "wrong hash in signature" #vu8(49 50 51 52 48 48) #vu8(18 193 125 124 90 233 10 239 103 27 101 147 39 158 210 199 98 25 249 250 107 122 1 230 32 180 89 6 88 45 133 97 31 149 200 213 180 34 79 202 220 173 141 87 225 214 171 122 239 146 140 42 54 8 172 109 148 68 42 254 200 9 69 168 210 210 90 4 55 110 154 65 172 119 167 110 87 40 25 205 175 170 120 138 3 106 64 93 158 235 30 227 227 201 86 213 61 188 234 158 98 173 252 146 28 160 187 182 81 48 120 24 207 191 103 0 11 128 137 65 109 9 240 79 171 21 56 34 99 252 155 36 85 168 163 71 46 140 214 133 190 45 54 191 107 159 7 60 11 55 231 108 62 116 160 156 150 139 255 174 32 50 176 112 142 141 202 198 229 213 57 235 34 198 225 5 3 31 192 58 48 158 35 247 143 199 173 4 33 150 219 132 184 119 237 163 162 52 54 143 152 42 212 88 68 45 153 128 0 244 19 184 164 66 199 24 140 145 57 40 73 137 215 39 208 239 253 9 182 218 231 7 117 141 230 27 138 29 110 226 180 135 59 159 56 232 117 112 132 44 21 14 125 245 32 68 94 102 86 91 124 237 123 182 16 135 136 132 208 141 100 56 248 96 193 145 30 45 7 137 77 199 6 177 75 31 131 152 140 41 104 252 173 12 11 211 246 26 235 119 90 144 156 64 191 73 131 23 92 105 11 145 12 227 220 64 42 47 138 181 58 9 58 103 245 68 214 82 112 60 130 197 91 73 1 109 35 137 83 176 179 30 15 154 157 195 44 19 64 50 130 12 23 160 39 92 243 230 188 173 11 74 220 134 68 7 72 44 158 179 68 6 183 190 108 22 99 63 233 194 237 36 222 46) #f ()) #(216 "wrong hash in signature" #vu8(49 50 51 52 48 48) #vu8(7 151 220 167 155 90 22 105 97 218 57 226 139 190 198 235 240 217 195 45 97 136 16 103 246 103 66 63 88 65 72 254 138 34 212 50 252 0 215 181 96 147 11 152 116 221 102 215 49 116 144 21 175 0 229 24 199 16 93 77 64 212 139 216 36 230 155 119 233 42 46 48 47 20 176 10 247 147 95 174 131 156 116 2 173 88 226 76 237 84 29 204 46 10 149 24 133 4 230 82 167 240 81 120 23 24 247 65 242 5 166 183 216 20 179 159 160 102 220 11 48 12 178 234 140 156 127 185 15 11 26 5 126 100 35 154 151 240 187 172 121 149 198 10 184 9 155 39 45 46 13 255 211 74 130 230 164 67 33 30 19 218 165 255 197 235 40 244 230 137 10 120 65 232 130 52 73 81 56 246 210 180 151 220 33 101 198 92 200 23 118 81 55 95 188 14 109 15 8 21 185 229 244 155 83 246 120 80 36 155 173 102 112 62 132 194 41 16 149 186 102 236 51 255 7 143 64 174 92 214 111 227 149 5 20 130 12 135 196 46 88 102 153 122 53 186 240 247 33 121 59 8 188 80 64 53 152 5 133 38 192 17 31 145 188 70 179 135 205 178 18 211 246 209 68 242 125 62 182 163 44 237 91 80 34 225 119 90 116 228 226 197 38 56 160 216 220 68 16 113 138 115 48 248 209 94 213 225 179 33 252 12 247 227 178 9 180 159 26 97 205 113 86 4 52 6 141 23 89 82 152 152 241 166 162 128 215 227 27 124 244 152 188 161 104 32 141 19 53 189 53 49 43 180 203 48 125 122 186 130 58 156 232 118 125 76 41 217 99 107 133 160 205 7 126 85 46 89 197 82 194 1 228 149) #f ()) #(217 "wrong hash in signature" #vu8(49 50 51 52 48 48) #vu8(86 112 158 122 193 209 179 127 22 43 235 179 42 156 185 248 108 143 148 115 229 235 238 255 76 229 80 102 66 104 143 2 86 181 241 251 6 16 139 12 59 216 155 247 149 110 7 172 34 164 21 78 228 187 44 245 103 37 146 133 47 36 209 235 70 33 31 58 157 197 92 81 95 168 125 184 61 90 116 122 186 154 11 139 62 7 225 190 38 189 180 98 163 218 190 115 18 53 14 104 20 204 133 122 28 172 126 198 225 120 159 105 223 57 45 19 254 252 73 172 251 52 99 202 97 220 89 246 25 243 77 117 222 124 117 50 161 194 146 40 165 115 55 161 57 160 139 203 55 110 190 234 54 254 146 208 152 16 124 197 124 26 179 40 34 97 149 132 74 140 188 41 45 190 49 82 58 132 44 94 34 34 113 209 255 152 202 142 245 152 91 221 127 140 12 111 159 26 88 46 7 173 70 250 100 48 108 175 210 238 118 139 174 161 226 203 90 164 36 67 146 10 110 196 14 22 142 93 229 13 210 169 66 67 247 23 220 235 201 180 238 71 165 18 131 105 180 31 190 224 104 248 72 184 169 6 147 80 220 224 184 62 109 90 154 158 198 101 33 177 27 115 92 228 234 61 140 123 78 205 134 149 205 135 34 29 29 116 132 201 168 147 205 220 188 179 4 253 32 62 124 33 32 234 81 4 192 211 232 254 197 154 110 13 28 68 171 236 104 217 143 100 9 190 93 168 170 136 0 169 63 69 122 214 176 133 207 242 95 122 81 96 38 145 248 70 83 145 39 110 113 215 6 137 119 19 6 104 170 194 165 51 68 75 214 205 249 61 136 8 170 68 243 183 156 153 48 226 118 188 235 51 222 223) #f ()) #(218 "wrong hash in signature" #vu8(49 50 51 52 48 48) #vu8(38 241 196 186 92 26 49 110 111 197 14 71 224 128 116 14 46 214 134 154 222 195 228 39 211 232 91 65 231 6 201 42 38 57 36 170 217 157 249 13 93 209 167 247 120 72 111 43 191 166 73 102 139 139 139 229 31 105 144 108 232 102 177 30 58 210 254 133 227 107 202 22 171 59 25 195 249 102 47 94 88 250 42 219 37 215 6 194 161 171 249 77 251 189 177 157 68 238 42 202 4 5 133 200 184 60 1 214 13 192 214 194 25 20 82 29 91 77 158 223 29 253 99 1 254 36 180 161 178 114 118 230 19 72 104 107 116 61 60 22 207 90 213 144 102 127 162 49 192 232 204 249 107 76 48 207 255 55 6 26 51 176 18 88 166 179 19 60 80 135 243 212 249 2 56 208 215 104 155 70 68 79 21 205 174 117 201 245 45 147 66 48 213 169 200 39 76 125 120 247 181 108 241 87 90 179 9 118 191 64 87 164 219 0 8 4 73 49 131 149 211 69 62 212 10 133 26 233 61 68 240 99 122 116 58 82 223 206 254 239 42 171 112 84 106 126 35 219 113 129 55 194 71 107 41 185 169 106 111 20 74 250 71 128 99 53 98 209 64 24 128 108 91 30 21 106 3 34 234 247 10 165 116 226 254 205 29 249 93 34 233 27 69 191 12 142 138 68 5 66 209 215 13 191 46 220 8 196 8 189 177 141 112 217 80 40 108 32 230 51 44 196 199 21 3 126 84 56 140 140 162 37 97 140 148 21 66 65 18 158 100 44 0 253 122 204 170 189 182 50 34 208 232 72 32 248 97 65 155 20 227 232 206 228 184 20 177 254 252 98 107 165 28 47 16 151 198 164 235 203 140 15 249 241) #f ()) #(219 "message not hashed" #vu8(49 50 51 52 48 48) #vu8(135 203 63 67 56 243 119 135 36 222 41 135 156 4 218 230 242 107 218 239 98 190 219 211 189 144 199 190 255 173 194 152 85 163 39 99 174 240 162 112 245 20 78 57 219 231 28 159 150 82 66 224 14 38 131 22 24 20 248 47 216 128 53 188 212 176 136 228 234 235 255 14 16 238 102 177 173 25 88 220 141 242 119 147 238 226 177 21 189 193 117 111 130 114 137 103 213 79 9 198 202 12 90 170 214 225 154 95 223 45 225 231 250 146 39 78 189 139 244 47 102 166 58 6 98 100 181 198 58 198 169 97 5 206 1 200 32 254 124 117 192 87 13 154 202 75 167 225 106 87 174 218 79 246 62 50 214 114 206 71 115 159 230 245 153 242 172 66 14 228 119 110 88 73 223 227 192 161 136 139 79 110 253 118 243 74 94 145 255 66 155 85 58 153 41 231 55 49 226 97 157 81 43 186 171 243 209 136 207 36 120 208 38 223 160 243 171 174 119 144 103 128 219 46 29 78 168 19 121 246 182 9 251 11 36 74 68 234 209 147 107 64 107 76 156 96 177 241 134 29 60 69 98 20 36 71 96 231 127 219 59 82 130 34 10 250 52 95 201 221 163 233 26 237 23 214 206 108 73 32 253 221 38 103 244 224 116 207 234 101 160 98 145 218 154 124 68 122 126 181 165 49 222 223 166 117 239 72 147 230 21 170 33 165 72 125 232 103 197 227 83 233 64 55 186 92 243 105 244 159 102 31 29 11 29 208 110 184 225 93 2 160 70 189 98 126 33 219 188 132 41 212 157 182 91 197 241 64 123 84 166 9 152 80 5 135 138 18 110 21 6 222 39 175 247 78 245 157 7 127 22 9 12 232) #f ()) #(220 "message not hashed" #vu8(49 50 51 52 48 48) #vu8(87 227 81 173 25 17 97 57 16 198 220 145 181 87 56 186 98 30 41 154 161 61 41 168 91 188 91 24 21 184 190 250 191 213 240 31 80 190 84 47 254 18 231 86 55 190 108 252 213 61 217 8 152 107 241 88 18 158 172 153 210 29 163 79 143 235 202 196 158 234 156 10 248 120 102 115 158 130 175 205 145 232 251 167 174 203 173 197 70 62 168 168 215 88 249 4 201 197 192 45 255 27 38 90 112 23 145 133 84 177 228 175 102 9 113 194 24 155 157 17 176 100 205 174 26 68 42 6 39 176 233 208 28 87 147 29 187 205 85 255 47 19 5 36 247 80 43 35 76 246 250 189 77 162 78 200 220 139 38 24 155 211 176 237 181 85 111 36 211 85 115 146 102 250 191 139 102 103 38 48 111 57 108 246 121 169 94 47 151 109 37 166 174 19 80 16 147 236 169 144 195 90 172 158 244 204 122 123 112 34 234 168 161 194 65 99 124 141 60 170 140 135 81 53 68 233 85 187 28 201 223 165 130 50 164 118 191 146 188 249 247 208 29 11 199 163 148 212 53 87 67 98 245 6 122 97 108 169 79 128 222 244 50 85 16 201 159 219 205 233 155 172 209 246 186 26 165 16 198 221 12 199 234 110 84 11 30 246 202 3 114 31 22 110 58 52 237 121 68 2 221 129 175 11 106 118 131 172 191 168 62 96 144 95 1 62 101 3 127 194 163 233 140 221 141 42 120 130 217 106 240 39 71 194 233 64 188 4 156 247 210 31 136 151 103 9 111 23 127 43 239 108 190 246 92 90 17 245 237 72 19 82 171 146 136 141 168 192 129 114 91 87 60 104 116 94 237 49 88 29 100 146 24 202) #f ()) #(221 "using PKCS#1 encryption padding: 0002ff...00<asn wrapped hash>" #vu8(49 50 51 52 48 48) #vu8(72 233 250 156 142 49 26 30 48 161 35 86 197 237 190 232 166 244 38 226 175 210 19 188 64 70 24 196 160 80 240 14 144 41 0 111 176 242 133 117 155 214 67 176 61 196 104 63 199 104 16 184 250 46 237 159 85 147 131 217 255 88 215 244 246 127 166 179 248 29 112 44 121 139 73 159 48 12 175 23 183 213 144 223 157 179 155 137 11 91 77 21 227 60 190 250 244 96 31 255 224 208 98 138 175 208 40 233 37 43 235 7 153 226 248 218 184 36 84 118 209 65 240 244 7 22 20 90 79 75 112 0 230 108 179 136 234 3 125 103 143 11 134 121 100 70 132 103 133 10 122 214 206 87 240 102 40 33 37 155 11 147 124 254 7 42 88 126 86 47 158 160 208 79 213 246 70 114 115 5 177 225 100 87 143 253 191 206 197 56 171 75 85 151 127 73 233 244 100 62 245 252 145 72 44 213 9 65 238 51 137 88 59 237 88 238 87 250 187 161 117 90 41 148 49 125 144 59 73 51 220 94 27 149 13 32 35 161 236 134 71 228 122 167 24 203 51 135 210 245 124 66 131 99 193 185 107 194 27 99 107 191 224 45 50 157 104 213 242 184 165 81 132 153 127 159 37 15 231 68 9 154 40 128 139 72 124 35 135 130 93 158 239 70 184 152 177 106 103 134 57 30 43 191 101 30 80 209 114 230 241 88 30 195 151 148 52 207 163 19 161 144 6 189 218 179 20 245 222 67 29 168 75 55 123 11 81 224 26 243 28 34 4 110 90 8 207 1 200 83 231 66 17 106 226 7 34 217 214 190 116 179 101 154 58 61 195 247 43 196 128 143 108 178 5 149 61 140 54 56 16 49 250 8) #f ()) #(222 "using PKCS#1 encryption padding: 0002ff...00<hash>" #vu8(49 50 51 52 48 48) #vu8(64 190 68 83 153 220 15 91 191 200 11 81 20 212 99 21 92 237 127 128 175 221 4 135 99 243 241 196 47 123 160 66 28 48 179 244 51 212 221 195 69 146 152 85 41 81 78 174 227 114 90 109 167 114 50 135 70 202 109 14 142 96 15 24 194 124 145 227 174 134 240 132 20 67 132 129 111 177 48 131 135 14 240 111 174 17 86 156 43 242 35 3 51 31 205 11 76 144 92 93 191 63 31 184 68 187 0 58 150 204 138 210 255 141 19 216 20 248 48 74 239 23 157 190 83 20 26 27 146 194 142 5 162 172 255 71 176 17 60 236 59 209 109 13 29 40 68 201 93 174 205 33 3 221 142 24 1 183 139 239 106 194 187 78 149 132 149 98 71 35 93 24 110 186 141 188 90 226 120 167 153 44 229 143 75 217 240 207 121 190 220 200 201 2 56 189 255 111 44 150 113 204 243 85 21 71 115 220 244 37 223 2 209 190 175 4 186 121 180 102 240 54 131 126 38 227 92 229 90 96 113 181 74 146 244 224 186 217 27 142 30 14 126 87 39 122 22 178 214 99 119 134 99 113 34 47 143 199 71 188 44 225 164 186 166 206 110 177 40 156 37 177 131 67 119 213 44 105 61 144 214 60 235 247 253 173 150 178 39 150 189 190 236 109 234 120 236 111 45 136 108 59 124 39 184 80 228 171 151 80 201 167 30 40 162 158 147 219 139 152 9 8 174 143 72 81 85 187 67 78 73 37 48 94 224 111 8 202 139 230 54 145 205 182 13 50 210 142 189 80 204 186 193 196 142 143 145 160 111 171 221 213 31 182 202 38 66 31 253 165 182 191 48 227 138 255 136 204 36 113 95 151 207 81) #f ()) #(223 "using PKCS#1 encryption padding: 0002ff...00<message>" #vu8(49 50 51 52 48 48) #vu8(22 101 130 92 180 192 119 69 2 80 181 195 236 139 195 78 195 252 191 233 104 30 62 38 54 214 72 126 230 237 222 55 235 98 172 90 113 90 184 19 80 131 206 46 204 137 36 13 92 92 113 109 211 130 61 144 226 17 249 77 48 141 76 136 21 54 159 154 94 49 103 130 199 26 222 69 228 140 203 12 101 122 93 97 116 231 57 125 89 204 249 69 80 68 171 135 185 123 97 189 8 68 251 201 181 120 62 115 51 161 144 238 112 222 162 154 133 24 180 111 128 82 224 111 149 108 211 86 207 235 27 91 126 112 29 130 105 195 217 0 167 45 75 120 175 127 208 70 36 74 94 155 26 189 48 15 107 55 234 90 145 210 108 156 176 80 46 148 133 214 7 41 140 182 47 44 167 48 212 203 192 130 243 191 122 210 28 194 80 119 43 117 193 136 234 104 69 232 167 118 170 109 208 113 115 28 164 218 216 93 11 163 236 45 155 2 112 113 204 197 118 18 65 25 20 68 247 188 152 254 216 152 156 13 207 16 207 32 116 18 202 132 132 211 53 75 22 105 8 125 164 78 14 28 24 45 205 7 85 191 159 100 57 116 26 87 129 105 92 217 13 181 30 66 132 137 151 221 172 162 185 36 184 46 191 120 179 198 118 155 202 136 56 150 148 231 154 214 238 67 140 1 15 251 147 161 11 184 57 20 31 141 253 207 106 203 181 154 99 77 198 172 226 183 219 215 52 206 27 191 87 36 205 239 160 210 92 248 151 55 155 3 121 7 254 221 237 125 36 12 38 73 169 157 129 58 133 10 239 117 177 141 127 230 241 130 156 172 161 54 8 26 53 2 215 9 30 185 5 85 1 122 83 163) #f ()) #(224 "using PKCS#1 encryption padding: 0002ff...00" #vu8(49 50 51 52 48 48) #vu8(61 167 196 39 161 40 7 114 0 205 5 117 65 53 124 255 94 149 241 235 30 196 163 112 55 43 164 182 46 226 194 92 94 21 89 53 28 196 212 67 124 13 228 249 111 254 209 8 215 69 91 30 118 89 13 228 6 81 62 20 58 198 222 153 6 115 172 12 27 53 233 174 49 144 185 101 20 103 5 135 21 174 32 23 41 104 250 248 28 47 89 132 189 198 53 17 70 40 44 68 146 198 167 217 200 207 135 138 168 108 41 82 59 116 161 93 193 143 15 212 39 240 154 101 69 139 209 122 205 171 219 233 2 99 213 178 71 199 185 204 203 66 155 227 213 70 123 107 145 151 101 188 49 89 141 198 132 192 28 0 67 112 150 144 78 211 249 33 119 116 172 81 78 217 134 31 224 212 2 6 148 137 174 145 174 38 235 121 165 165 241 212 89 39 16 31 255 230 179 197 91 156 252 15 123 196 118 64 25 223 207 253 208 93 19 218 30 191 192 186 153 243 68 177 228 129 165 148 118 171 109 66 44 135 42 191 161 51 9 95 255 38 131 255 222 176 147 90 92 119 155 201 122 89 217 41 8 77 119 50 95 160 95 171 46 64 197 13 20 14 189 167 113 6 120 202 119 223 98 118 42 124 60 176 163 85 70 101 126 51 47 56 224 254 81 203 40 92 250 155 42 232 56 210 61 107 185 243 233 98 213 92 6 243 41 142 150 236 79 119 163 242 165 48 22 32 45 194 205 139 66 62 162 231 201 106 123 229 92 254 191 87 83 127 111 140 172 110 92 80 212 173 155 83 63 80 211 153 5 122 91 186 3 248 124 237 194 222 89 174 160 128 121 207 190 144 185 102 190 16 42 95 196 186) #f ()) #(225 "invalid PKCS#1 signature padding: 0001ff...ee00" #vu8(49 50 51 52 48 48) #vu8(152 246 73 167 102 65 58 225 52 138 142 96 26 120 0 15 123 40 78 185 7 127 43 74 32 38 9 198 84 5 2 214 184 229 74 93 221 231 99 77 78 14 141 91 218 10 86 115 160 66 198 89 213 253 3 102 147 127 34 37 130 176 164 19 5 204 56 45 237 238 20 35 79 134 1 94 150 115 222 253 17 51 209 51 176 218 168 122 161 229 238 235 211 175 84 92 213 158 255 228 76 200 165 129 121 31 135 79 73 26 16 3 8 55 230 25 252 8 156 118 113 235 5 81 241 127 251 130 55 194 8 94 13 92 144 52 139 34 49 126 252 30 213 56 147 224 98 66 236 96 165 212 56 25 91 243 199 11 10 17 183 138 127 14 220 109 66 135 18 155 65 45 148 119 176 32 147 120 130 166 189 219 156 247 174 150 62 123 212 78 166 31 182 113 206 111 186 26 47 8 90 251 247 129 151 19 89 238 234 8 35 18 243 97 140 25 150 87 101 59 55 240 124 70 164 61 223 103 9 171 52 51 215 153 21 143 246 103 18 70 170 197 96 167 247 226 96 16 217 147 126 230 21 55 166 160 97 1 22 56 131 182 139 14 77 189 234 191 34 160 233 165 160 218 21 211 52 39 68 11 72 145 141 98 12 137 71 56 127 146 55 125 58 35 105 66 117 129 103 170 69 159 255 233 111 181 202 115 4 116 42 62 78 4 154 44 202 87 13 168 240 92 33 189 127 121 114 22 240 31 95 92 248 68 192 93 215 77 106 95 209 14 167 57 107 39 4 192 125 68 215 208 110 202 241 141 45 58 235 113 101 153 200 1 62 120 221 40 18 56 14 21 210 130 114 172 26 55 143 228 220 173 144 133) #f ()) #(226 "PKCS#1 padding too short: 000001ff..." #vu8(49 50 51 52 48 48) #vu8(159 89 234 63 157 238 125 147 54 237 47 134 173 177 128 205 40 114 192 50 173 51 36 205 187 246 142 38 213 121 188 117 128 207 156 194 139 202 39 238 70 48 195 205 105 103 8 64 225 248 146 32 24 2 60 62 160 178 232 91 134 165 24 52 139 70 225 3 35 122 218 75 93 14 221 232 160 255 10 84 101 106 21 96 16 177 109 134 219 163 194 193 70 131 24 50 87 16 184 250 177 71 147 73 115 156 2 114 148 114 253 73 122 146 161 162 63 142 91 103 23 41 37 150 218 105 195 250 234 62 156 200 54 205 33 4 53 105 172 100 179 184 142 57 75 139 212 80 83 142 99 176 225 181 7 236 121 150 158 110 74 175 158 137 51 116 16 58 1 41 116 34 166 190 153 145 136 42 72 102 92 201 85 182 213 91 255 140 118 38 55 248 42 24 30 168 235 189 246 234 37 255 183 147 192 158 105 132 42 145 152 129 253 10 47 144 99 107 136 234 26 61 191 39 48 92 175 208 199 35 63 238 1 196 244 164 68 75 203 188 101 133 239 169 74 140 41 137 102 221 140 242 234 23 152 31 103 38 200 84 86 12 26 144 142 247 139 250 46 188 229 34 7 46 181 244 183 65 180 92 99 101 184 213 218 73 44 6 124 37 180 244 103 182 195 72 50 3 42 14 36 70 245 170 173 20 155 41 139 59 103 17 219 254 179 96 207 97 73 176 202 153 138 148 175 217 200 53 80 76 110 201 126 244 154 91 132 39 229 119 153 107 252 146 29 45 166 190 137 149 121 18 246 24 59 40 146 18 39 159 111 239 167 104 206 142 244 56 106 188 241 220 140 123 106 218 29 189 228 91 126 118 36 175) #f ()) #(227 "CVE-2017-11185: signature=n" #vu8(49 50 51 52 48 48) #vu8(160 120 135 243 115 55 129 150 176 183 72 205 243 28 20 115 92 207 160 241 23 172 175 218 162 31 222 75 110 117 89 57 11 131 78 123 146 233 225 204 157 73 252 15 230 207 182 4 41 101 43 75 249 167 118 143 113 252 66 113 202 111 239 78 67 17 146 235 220 152 99 11 251 148 197 186 241 139 76 247 136 29 132 72 62 76 68 194 45 177 90 150 39 112 90 11 66 162 109 111 61 96 9 174 224 210 167 27 237 244 212 176 238 107 111 236 47 22 225 39 126 202 163 189 237 186 64 100 115 164 118 209 104 141 240 250 209 218 121 85 38 199 230 65 152 27 72 18 176 91 105 45 96 198 11 43 250 66 76 139 98 15 64 220 157 186 89 226 199 16 231 238 117 11 62 19 76 31 113 244 50 16 104 138 255 23 170 164 28 219 86 104 117 63 0 6 177 207 149 27 197 149 31 77 137 163 17 150 152 94 165 92 9 102 195 102 43 207 228 228 205 52 241 46 74 253 126 92 74 19 7 57 177 1 125 106 88 56 130 253 114 219 26 103 65 135 2 200 176 19 83 204 247 91 123 147 250 236 14 11 227 98 17 213 242 189 145 14 21 82 50 55 17 187 235 115 133 143 137 156 193 236 6 62 246 125 136 224 198 153 213 166 137 197 33 6 240 110 150 15 9 210 163 207 132 245 59 190 162 164 115 237 242 230 224 23 104 1 211 250 28 45 53 142 30 90 38 246 70 172 147 121 110 193 250 220 105 145 192 236 25 201 221 144 178 90 45 211 191 115 210 207 30 234 136 103 249 108 170 90 45 245 73 115 172 178 162 218 10 19 103 236 116 175 187 150 143 81 119 101 35 141 23 105) #f ()) #(228 "the signature is 2 bytes too long" #vu8(49 50 51 52 48 48) #vu8(160 120 135 243 115 55 129 150 176 183 72 205 243 28 20 115 92 207 160 241 23 172 175 218 162 31 222 75 110 117 89 57 11 131 78 123 146 233 225 204 157 73 252 15 230 207 182 4 41 101 43 75 249 167 118 143 113 252 66 113 202 111 239 78 67 17 146 235 220 152 99 11 251 148 197 186 241 139 76 247 136 29 132 72 62 76 68 194 45 177 90 150 39 112 90 11 66 162 109 111 61 96 9 174 224 210 167 27 237 244 212 176 238 107 111 236 47 22 225 39 126 202 163 189 237 186 64 100 115 164 118 209 104 141 240 250 209 218 121 85 38 199 230 65 152 27 72 18 176 91 105 45 96 198 11 43 250 66 76 139 98 15 64 220 157 186 89 226 199 16 231 238 117 11 62 19 76 31 113 244 50 16 104 138 255 23 170 164 28 219 86 104 117 63 0 6 177 207 149 27 197 149 31 77 137 163 17 150 152 94 165 92 9 102 195 102 43 207 228 228 205 52 241 46 74 253 126 92 74 19 7 57 177 1 125 106 88 56 130 253 114 219 26 103 65 135 2 200 176 19 83 204 247 91 123 147 250 236 14 11 227 98 17 213 242 189 145 14 21 82 50 55 17 187 235 115 133 143 137 156 193 236 6 62 246 125 136 224 198 153 213 166 137 197 33 6 240 110 150 15 9 210 163 207 132 245 59 190 162 164 115 237 242 230 224 23 104 1 211 250 28 45 53 142 30 90 38 246 70 172 147 121 110 193 250 220 105 145 192 236 25 201 221 144 178 90 45 211 191 115 210 207 30 234 136 103 249 108 170 90 45 245 73 115 172 178 162 218 10 19 103 236 116 175 187 150 143 81 119 101 35 141 23 105 0 0) #f ()) #(229 "the signature is empty" #vu8(49 50 51 52 48 48) #vu8() #f ()) #(230 "the signature has value 0" #vu8(49 50 51 52 48 48) #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) #f ()) #(231 "the signature has value 1" #vu8(49 50 51 52 48 48) #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1) #f ()) #(232 "the signature has value 2" #vu8(49 50 51 52 48 48) #vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2) #f ()) #(233 "the signature has value n-1" #vu8(49 50 51 52 48 48) #vu8(160 120 135 243 115 55 129 150 176 183 72 205 243 28 20 115 92 207 160 241 23 172 175 218 162 31 222 75 110 117 89 57 11 131 78 123 146 233 225 204 157 73 252 15 230 207 182 4 41 101 43 75 249 167 118 143 113 252 66 113 202 111 239 78 67 17 146 235 220 152 99 11 251 148 197 186 241 139 76 247 136 29 132 72 62 76 68 194 45 177 90 150 39 112 90 11 66 162 109 111 61 96 9 174 224 210 167 27 237 244 212 176 238 107 111 236 47 22 225 39 126 202 163 189 237 186 64 100 115 164 118 209 104 141 240 250 209 218 121 85 38 199 230 65 152 27 72 18 176 91 105 45 96 198 11 43 250 66 76 139 98 15 64 220 157 186 89 226 199 16 231 238 117 11 62 19 76 31 113 244 50 16 104 138 255 23 170 164 28 219 86 104 117 63 0 6 177 207 149 27 197 149 31 77 137 163 17 150 152 94 165 92 9 102 195 102 43 207 228 228 205 52 241 46 74 253 126 92 74 19 7 57 177 1 125 106 88 56 130 253 114 219 26 103 65 135 2 200 176 19 83 204 247 91 123 147 250 236 14 11 227 98 17 213 242 189 145 14 21 82 50 55 17 187 235 115 133 143 137 156 193 236 6 62 246 125 136 224 198 153 213 166 137 197 33 6 240 110 150 15 9 210 163 207 132 245 59 190 162 164 115 237 242 230 224 23 104 1 211 250 28 45 53 142 30 90 38 246 70 172 147 121 110 193 250 220 105 145 192 236 25 201 221 144 178 90 45 211 191 115 210 207 30 234 136 103 249 108 170 90 45 245 73 115 172 178 162 218 10 19 103 236 116 175 187 150 143 81 119 101 35 141 23 104) #f ()) #(234 "the signature has value n+1" #vu8(49 50 51 52 48 48) #vu8(160 120 135 243 115 55 129 150 176 183 72 205 243 28 20 115 92 207 160 241 23 172 175 218 162 31 222 75 110 117 89 57 11 131 78 123 146 233 225 204 157 73 252 15 230 207 182 4 41 101 43 75 249 167 118 143 113 252 66 113 202 111 239 78 67 17 146 235 220 152 99 11 251 148 197 186 241 139 76 247 136 29 132 72 62 76 68 194 45 177 90 150 39 112 90 11 66 162 109 111 61 96 9 174 224 210 167 27 237 244 212 176 238 107 111 236 47 22 225 39 126 202 163 189 237 186 64 100 115 164 118 209 104 141 240 250 209 218 121 85 38 199 230 65 152 27 72 18 176 91 105 45 96 198 11 43 250 66 76 139 98 15 64 220 157 186 89 226 199 16 231 238 117 11 62 19 76 31 113 244 50 16 104 138 255 23 170 164 28 219 86 104 117 63 0 6 177 207 149 27 197 149 31 77 137 163 17 150 152 94 165 92 9 102 195 102 43 207 228 228 205 52 241 46 74 253 126 92 74 19 7 57 177 1 125 106 88 56 130 253 114 219 26 103 65 135 2 200 176 19 83 204 247 91 123 147 250 236 14 11 227 98 17 213 242 189 145 14 21 82 50 55 17 187 235 115 133 143 137 156 193 236 6 62 246 125 136 224 198 153 213 166 137 197 33 6 240 110 150 15 9 210 163 207 132 245 59 190 162 164 115 237 242 230 224 23 104 1 211 250 28 45 53 142 30 90 38 246 70 172 147 121 110 193 250 220 105 145 192 236 25 201 221 144 178 90 45 211 191 115 210 207 30 234 136 103 249 108 170 90 45 245 73 115 172 178 162 218 10 19 103 236 116 175 187 150 143 81 119 101 35 141 23 106) #f ()) #(235 "the signature has value -1" #vu8(49 50 51 52 48 48) #vu8(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255) #f ()) #(236 "RSASSA-PSS signature" #vu8(49 50 51 52 48 48) #vu8(98 126 118 217 171 70 236 20 77 148 42 252 181 254 143 103 126 185 177 165 28 4 127 123 137 116 241 166 105 124 95 78 209 198 22 206 48 75 239 129 76 227 7 212 214 168 173 150 167 4 231 28 43 190 127 234 71 219 80 46 89 236 152 90 105 64 93 154 96 108 165 238 123 193 225 49 120 52 82 203 215 175 235 235 198 204 78 205 175 17 159 241 105 134 245 97 238 68 5 160 187 160 87 7 218 102 222 112 242 92 27 110 123 221 230 86 234 251 112 211 236 190 47 243 190 230 110 63 6 99 165 95 238 216 197 1 130 122 52 245 145 109 13 255 34 253 123 172 203 135 219 71 164 114 162 22 37 193 175 9 114 100 181 150 77 5 54 138 25 0 74 201 197 225 27 211 18 147 39 244 118 182 106 187 229 181 158 125 241 205 173 150 96 197 43 209 60 134 181 167 33 222 71 111 102 98 203 204 100 219 76 110 147 200 173 117 97 50 105 71 25 37 1 5 13 76 246 230 42 220 66 229 243 192 198 5 227 161 177 161 203 132 134 219 187 111 176 112 66 96 19 233 225 165 162 209 216 176 72 31 252 201 35 90 153 209 84 225 153 30 143 21 205 69 62 96 155 230 189 0 129 135 177 243 6 111 184 213 52 143 8 178 120 79 143 255 49 48 109 191 202 44 89 225 244 141 64 215 15 125 177 107 137 204 133 6 207 1 55 226 166 23 226 125 82 148 80 242 90 216 167 197 2 209 151 207 20 110 133 252 189 246 229 126 71 3 64 135 84 129 122 6 252 138 96 0 133 96 137 13 30 114 166 117 26 67 144 60 15 0 164 122 211 131 162 142 199 187 70 155 23 141 94 204) #f ()) #(237 "RSASSA-PSS signature" #vu8(49 50 51 52 48 48) #vu8(75 65 114 65 241 71 32 85 156 30 140 252 173 185 224 214 183 222 132 155 22 200 13 253 188 134 127 195 62 75 129 213 105 21 25 15 202 174 203 184 246 72 28 23 124 198 142 38 129 61 138 147 255 69 204 196 27 121 87 20 199 212 134 255 59 146 152 0 248 128 99 205 172 123 113 0 217 23 194 40 128 148 206 203 229 214 242 238 32 237 243 109 198 70 70 73 88 203 28 252 218 190 213 127 50 149 97 236 106 138 0 234 32 17 210 249 33 95 101 255 106 250 138 198 146 171 168 50 138 4 201 249 252 89 200 216 242 46 48 157 64 63 224 74 207 90 49 222 0 122 95 15 64 46 253 178 200 60 12 90 165 115 121 22 59 20 66 145 70 249 82 26 206 84 24 156 84 69 248 0 118 178 212 50 20 3 92 43 14 23 90 224 196 99 37 55 150 236 102 71 126 21 113 187 106 197 119 34 16 91 88 251 80 121 34 151 78 215 112 235 137 139 213 132 208 10 34 103 216 188 252 102 5 94 124 215 235 126 116 151 20 144 118 225 210 135 179 22 113 41 128 118 241 170 109 63 26 225 227 253 98 235 135 20 249 252 56 188 100 19 178 161 80 100 218 123 107 88 156 165 202 83 157 13 1 165 143 153 153 53 241 168 230 160 216 157 68 10 81 11 169 203 113 168 123 224 203 129 203 30 5 183 63 132 2 214 132 199 104 173 134 201 140 211 188 144 74 89 236 136 195 133 131 95 180 107 74 180 110 62 2 110 174 20 229 74 0 240 229 91 92 194 105 32 104 47 151 19 212 140 121 70 225 176 171 34 166 253 108 211 232 51 102 108 221 161 46 49 192 82 64 169 76 128) #f ()) #(238 "RSASSA-PSS signature" #vu8(49 50 51 52 48 48) #vu8(51 140 59 139 60 161 94 15 209 36 51 197 177 131 71 215 157 52 72 113 174 202 23 220 147 56 159 60 95 193 35 172 159 159 233 92 151 220 167 88 62 63 227 194 163 25 208 203 64 147 103 170 117 115 199 173 117 177 24 237 229 6 99 31 82 170 134 28 43 14 49 169 216 196 53 65 110 142 103 5 157 251 76 239 245 51 194 20 196 36 63 84 81 244 73 186 123 117 102 122 205 190 174 34 175 233 89 40 127 217 240 173 62 78 119 9 222 92 144 166 226 57 150 167 173 100 62 240 195 170 229 73 52 195 29 121 97 156 4 180 203 133 250 80 105 252 155 144 35 29 235 227 229 157 160 255 162 135 61 207 158 83 184 72 30 33 91 88 91 17 21 192 47 99 191 166 20 62 43 144 10 10 199 23 115 160 67 155 181 216 106 120 180 221 170 94 43 158 68 247 25 45 148 81 166 187 142 70 53 148 130 18 177 113 115 176 105 93 79 81 129 137 113 77 192 181 26 206 59 144 104 245 254 221 163 180 186 78 36 186 249 1 179 19 54 111 100 205 84 252 47 163 219 139 184 241 232 30 6 239 253 88 15 196 151 74 60 218 230 136 41 123 74 196 35 216 29 189 52 43 48 103 230 180 215 85 138 200 244 253 28 29 143 95 201 72 84 173 251 14 248 166 158 196 59 55 94 167 36 147 43 57 28 165 192 78 126 117 253 185 82 214 113 195 21 167 248 106 40 186 149 77 177 38 205 163 163 158 242 19 181 249 83 26 138 21 157 217 229 105 138 199 236 143 231 223 42 35 22 121 135 66 178 251 82 113 250 186 217 50 84 43 201 138 246 233 157 35 26 27 95 187 9 235) #f ()) #(239 "RSASSA-PSS signature" #vu8(49 50 51 52 48 48) #vu8(123 244 212 115 156 28 224 225 58 171 230 16 161 16 255 231 157 198 137 219 63 159 220 190 41 181 98 18 247 236 11 60 219 150 234 112 82 162 119 50 113 7 169 146 212 12 92 93 3 238 17 71 111 50 138 131 210 195 161 188 173 92 157 158 162 146 143 218 87 24 80 162 169 152 138 0 120 66 150 49 246 9 123 47 169 168 90 170 30 217 172 9 52 165 185 208 15 230 252 16 99 66 226 176 61 65 35 224 158 42 198 28 19 67 248 128 71 218 255 95 81 28 143 163 214 111 118 64 107 121 184 244 240 71 90 177 67 19 150 142 86 202 157 46 134 114 211 190 194 122 93 83 108 239 84 34 12 244 74 74 105 143 183 203 184 3 94 181 81 106 228 180 74 236 25 218 64 252 120 143 37 70 213 218 84 183 225 17 13 19 211 227 174 151 103 28 219 169 58 111 89 70 178 206 226 44 67 24 183 52 58 12 107 10 50 0 12 110 205 8 198 145 57 1 183 157 194 191 56 112 127 223 20 38 21 129 182 86 175 31 196 225 213 214 35 79 154 85 120 134 156 200 185 32 215 2 15 255 235 149 151 123 195 209 84 177 18 127 69 75 174 99 247 177 202 55 124 62 244 43 12 235 117 201 107 63 84 171 138 88 49 213 158 232 235 244 69 127 84 5 80 166 17 53 132 202 71 130 165 61 123 98 189 92 93 236 244 78 0 93 44 70 207 62 6 145 150 55 48 112 140 205 107 223 178 158 124 9 159 30 145 73 74 20 169 56 179 245 251 8 172 64 191 147 161 12 188 239 0 127 182 169 155 67 36 114 206 59 200 131 113 78 236 199 110 0 43 172 228 176 57 64 65 231) #f ())))
false
66b2bf461b9becc7a7c9a281a361dc88c69f8dea
5503b5a19ce00e31652aee766269bd8a6d351375
/scheme-libs/racket/unison/bytevector.ss
dde98e22be2153959227d6885f250b87ed45ca9b
[ "BSD-3-Clause", "MIT" ]
permissive
unisonweb/unison
bf700a33b8c2733118c5c6d5d685b84faf7ae417
e7b891914b10df0c5075a617e55be93d3f4b7537
refs/heads/trunk
2023-09-02T06:42:04.521355
2023-08-31T22:35:33
2023-08-31T22:35:33
35,164,952
4,887
283
NOASSERTION
2023-09-14T21:44:52
2015-05-06T14:53:49
Haskell
UTF-8
Scheme
false
false
4,386
ss
bytevector.ss
; This library implements missing bytevector functionality for unison ; builtins. The main missing bits are better support for immutable ; bytevectors. Both chez and racket have support for immutable ; bytevectors, but there is no standard API for dealing with them that ; implements all the functions we'd want. This library exports the ; desired functionality on top of an unsafe in-place freeze ; re-exported from the (unison core) module. #!r6rs (library (unison bytevector) (export freeze-bytevector! ibytevector-drop ibytevector-take ibytevector-append bytevector-u8-ref bytevector-u16-ref bytevector-u24-ref bytevector-u32-ref bytevector-u40-ref bytevector-u48-ref bytevector-u56-ref bytevector-u64-ref u8-list->ibytevector b32d b32hd base32-string->ibytevector) (import (rnrs) (unison core)) (define (ibytevector-drop n bs) (let* ([l (bytevector-length bs)] [k (max 0 (- l n))] [br (make-bytevector k)]) (bytevector-copy! bs n br 0 k) (freeze-bytevector! br))) (define (ibytevector-take n bs) (let* ([sz (min n (bytevector-length bs))] [br (make-bytevector sz)]) (bytevector-copy! bs 0 br 0 sz) (freeze-bytevector! br))) (define (ibytevector-append l r) (freeze-bytevector! (bytevector-append l r))) (define (u8-list->ibytevector l) (freeze-bytevector! (u8-list->bytevector l))) (define (bytevector-u24-ref bs n end) (let ([v16 (bytevector-u16-ref bs n end)] [v8 (bytevector-u8-ref bs (+ n 2))]) (case end [big (fxior v8 (fxarithmetic-shift-left v16 8))] [little (fxior v16 (fxarithmetic-shift-left v8 16))]))) (define (bytevector-u40-ref bs n end) (let ([v32 (bytevector-u32-ref bs n end)] [v8 (bytevector-u8-ref bs (+ n 4))]) (case end [big (fxior v8 (fxarithmetic-shift-left v32 8))] [small (fxior v32 (fxarithmetic-shift-left v8 32))]))) (define (bytevector-u48-ref bs n end) (let ([v32 (bytevector-u32-ref bs n end)] [v16 (bytevector-u16-ref bs (+ n 4) end)]) (case end [big (fxior v16 (fxarithmetic-shift-left v32 8))] [small (fxior v32 (fxarithmetic-shift-left v16 32))]))) (define (bytevector-u56-ref bs n end) (let ([v32 (bytevector-u32-ref bs n end)] [v16 (bytevector-u16-ref bs (+ n 4) end)] [v8 (bytevector-u8-ref bs (+ n 6))]) (case end [big (fxior v8 (fxarithmetic-shift-left v16 8) (fxarithmetic-shift-left v32 24))] [small (fxior v32 (fxarithmetic-shift-left v16 32) (fxarithmetic-shift-left v8 48))]))) (define (b32d c) (let ([n (char->integer c)]) (cond [(and (<= 65 n) (<= n 90)) (- n 65)] [(and (<= 97 n) (<= n 122)) (- n 97)] [(and (<= 50 n) (<= n 55)) (- n 24)]))) (define (b32hd c) (let ([n (char->integer c)]) (cond [(and (<= 48 n) (<= n 57)) (- n 48)] [(and (<= 65 n) (<= n 86)) (- n 65)] [(and (<= 97 n) (<= n 118)) (- n 97)]))) (define (base32-string->ibytevector decode str) (define (main ilen) (let* ([olen (div (* ilen 5) 8)] [out (make-bytevector olen)]) (define (fill n k o) (if (>= k 0) (let ([m (fxand n 255)]) (bytevector-u8-set! out (+ o k) m) (fill (fxarithmetic-shift-right n 8) (- k 1) o)))) (define (fixup i) (if (= i 0) (values 0 -1) (let ([chars (+ 1 (mod (- i 1) 8))]) (div-and-mod (* 5 chars) 8)))) (let rec ([acc 0] [i 0] [o 0]) (cond [(>= i ilen) (let-values ([(k n) (fixup i)]) (fill (fxarithmetic-shift-right acc n) (- k 1) o) (freeze-bytevector! out))] [(and (> i 0) (= 0 (mod i 8))) (fill acc 4 o) (rec (decode (string-ref str i)) (+ i 1) (+ o 5))] [else (let ([sacc (fxarithmetic-shift-left acc 5)] [bits (decode (string-ref str i))]) (rec (fxior sacc bits) (+ i 1) o))])))) (let search ([i (- (string-length str) 1)]) (if (and (>= i 0) (eq? (string-ref str i) #\=)) (search (- i 1)) (main (+ i 1))))) )
false
5bb3b6c4c37df9b5454d7b795ebd7971c970067a
5fa722a5991bfeacffb1d13458efe15082c1ee78
/src/c3_34.scm
e4e9b7ce097eb2731687e8b332bb38d4723d95c4
[]
no_license
seckcoder/sicp
f1d9ccb032a4a12c7c51049d773c808c28851c28
ad804cfb828356256221180d15b59bcb2760900a
refs/heads/master
2023-07-10T06:29:59.310553
2013-10-14T08:06:01
2013-10-14T08:06:01
11,309,733
3
0
null
null
null
null
UTF-8
Scheme
false
false
495
scm
c3_34.scm
(import (constraint)) (define (make-squarer a b) (make-multiplier a a b)) (define (test-squarer) (let ((a (make-connector)) (b (make-connector))) (make-squarer a b) (make-probe 'a a) ; we cannot get a from b. different from multiplier, we can know a when we ; only know b. (set-new-value! b 9 'user) ; besides, when we set a, the on-new-value procedure will be called twice. ; But this seems will not cause any serious problem... )) (test-squarer)
false
8ddca6cb11024dcf2a6f7de83f67a345de10c19d
b43e36967e36167adcb4cc94f2f8adfb7281dbf1
/sicp/ch2/exercises/2.54.scm
a49a741e821732bfde310ae7813c278ea3296468
[]
no_license
ktosiu/snippets
79c58416117fa646ae06a8fd590193c9dd89f414
08e0655361695ed90e1b901d75f184c52bb72f35
refs/heads/master
2021-01-17T08:13:34.067768
2016-01-29T15:42:14
2016-01-29T15:42:14
53,054,819
1
0
null
2016-03-03T14:06:53
2016-03-03T14:06:53
null
UTF-8
Scheme
false
false
369
scm
2.54.scm
(equal? '(a b c d) '(a b c d)) (equal? '(a b c d) '(a (b) c d)) (eq? 'a 'b) (eq? 'a 'a) (define (my-equal? a b) (if (and (not (null? a)) (not (null? b))) (if (eq? (car a) (car b)) (my-equal? (cdr a) (cdr b)) #f) (if (and (null? a) (null? b)) #t #f))) (my-equal? '(a b c d) '(a b c d))
false
57ed4f847928fe005c1bfd4dadce7ebddb5bf593
f4cf5bf3fb3c06b127dda5b5d479c74cecec9ce9
/Tests/LispKitTests/Code/Vectors.scm
df2742162af8cc1c1279c54f941dbc829b76a385
[ "Apache-2.0" ]
permissive
objecthub/swift-lispkit
62b907d35fe4f20ecbe022da70075b70a1d86881
90d78a4de3a20447db7fc33bdbeb544efea05dda
refs/heads/master
2023-08-16T21:09:24.735239
2023-08-12T21:37:39
2023-08-12T21:37:39
57,930,217
356
17
Apache-2.0
2023-06-04T12:11:51
2016-05-03T00:37:22
Scheme
UTF-8
Scheme
false
false
4,024
scm
Vectors.scm
;;; Vectors.scm ;;; Regression test data ;;; ;;; Author: Matthias Zenger ;;; Copyright © 2019 ObjectHub. All rights reserved. ;;; ;;; Licensed under the Apache License, Version 2.0 (the "License"); ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; http://www.apache.org/licenses/LICENSE-2.0 ;;; ;;; Unless required by applicable law or agreed to in writing, software ;;; distributed under the License is distributed on an "AS IS" BASIS, ;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;;; See the License for the specific language governing permissions and ;;; limitations under the License. ( "Basic vectors" (3 3 3 0 1 2 3 #(1 2 3) #(1 2 3) #(1 2 3) #() #(1) #t #t #t #f #f #f #t) (define v0 #(1 2 3)) (define v1 (vector 1 2 3)) (define v2 (make-vector 3)) (vector-set! v2 0 1) (vector-set! v2 1 7) (vector-set! v2 2 3) (vector-set! v2 1 2) (define v3 (vector)) (define v4 (immutable-vector 1)) (list (vector-length v0) (vector-length v1) (vector-length v2) (vector-length v3) (vector-ref v0 0) (vector-ref v1 1) (vector-ref v2 2) v0 v1 v2 v3 v4 (vector? v1) (vector? v4) (immutable-vector? v0) (immutable-vector? v1) (immutable-vector? v2) (immutable-vector? v3) (immutable-vector? v4)) ) ( "Vector operations" (#(a b h i j f g h i j) #(x x x y y y y x x x) #(a b c d e f g h i j) #(f g h i) #f #t (f g h i)) (define v5 (vector 'a 'b 'c 'd 'e 'f 'g 'h 'i 'j)) (define v7 (vector-copy v5 #f)) (define v6 (make-vector 10 'x)) (vector-fill! v6 'y 3 7) (vector-copy! v5 2 v5 7) (define v8 (vector-copy v7 5 9)) (list v5 v6 v7 v8 (immutable-vector? v5) (immutable-vector? v7) (vector->list v8)) ) ( "Character vectors" ("abcD" "bc" #(#\h #\e #\l #\l #\o) #(#\l #\l #\o) "abcDabcD" #t #f) (define v9 (list->vector (list #\a #\b #\c #\D))) (define v10 (list->vector (append (list #\a #\b #\c #\D) (list #\a #\b #\c #\D)))) (define v11 (vector-append v9 v9)) (list (vector->string v9) (vector->string v9 1 3) (string->vector "hello") (string->vector "hello world" 2 5) (vector->string v10) (equal? v10 v11) (equal? v9 v10)) ) ( "Vector syntax" (#(5 7 9) #(0 1 4 9 16)) (list (vector-map + #(1 2 3) ’#(4 5 6 7)) (let ((v (make-vector 5 0))) (vector-for-each (lambda (i) (vector-set! v i (* i i))) ’#(0 1 2 3 4)) v)) ) ( "Basic gvectors" (#g(1 2 3) #g(2) #g(x 2 3 4) #g(1 2 3 2 x 2 3 4) #g(s 3 2 1 3 2 1) #g(1 2 3 5 6 7 8) #(1 7 2 3 6 5 8) #t #f #f #t (2) 2) (import (lispkit gvector)) (define gv (make-gvector 50)) (gvector-add! gv 1) (gvector-add! gv 2) (define gv2 (gvector-copy gv)) (gvector-add! gv 3) (gvector-remove! gv2 0) (define gv3 (list->gvector '(1 2 3 4 5))) (gvector-remove-last! gv3) (gvector-set! gv3 0 'x) (define gv4 (gvector-append gv gv2 gv3)) (define gv5 (gvector-concatenate (list gv gv))) (gvector-reverse! gv5) (gvector-insert! gv5 0 's) (define gv6 (gvector-copy gv)) (gvector-insert! gv6 1 7) (gvector-append! gv6 #(6 5) #(8)) (define gv7 (vector-copy gv6 #f)) (gvector-sort! < gv6) (list gv gv2 gv3 gv4 gv5 gv6 gv7 (gvector? gv6) (gvector? gv7) (immutable-vector? gv6) (immutable-vector? gv7) (vector->list gv2) (gvector-ref gv3 1)) ) ( "Vector equality" (#t #t #t #f #f #f #f #t #t) (list (vector= eq?) (vector= eq? #(1 2)) (vector= eq? #(1 2 3) #(1 2 3)) (vector= eq? #(1 2) #(1 2 3)) (vector= eq? #(1 2 3) #(1 2)) (vector= eq? #(1 2 3) #() #(1 2 3)) (vector= eq? #("one" "two") #("one" "two")) (vector= string=? #("one" "two") #("one" "two")) (vector= string=? #("one" "two") #("one" "two") #("one" "two"))) )
false
8da8d1502b81df0dde0eed6d2e216a93782114e1
8198fe9ada6f569a9ad9932b22f8e0a743221407
/examples/gtkglext/font.scm
dafa50d38ec5bd4de544f337f8479edc4d456daf
[ "BSD-2-Clause" ]
permissive
shirok/Gauche-gtk2
56b17162d2a1a6cb814a6cfcfe48aed7293a857d
a90bdd15eafdfcff74eb1ca92b124aa9656a7079
refs/heads/master
2022-05-18T03:28:49.088852
2022-03-20T09:43:48
2022-03-20T09:43:48
684,933
8
2
NOASSERTION
2020-05-22T08:28:29
2010-05-25T10:29:50
C
UTF-8
Scheme
false
false
7,194
scm
font.scm
;; ;; Simple bitmap font rendering example. ;; ;; Ported from examples/font.c, ;; written by Naofumi Yasufuku <[email protected]> ;; (use gauche.collection) (use gauche.uvector) (use gtk) (use gtk.gtkgl) (use gl) (define *font-string* "courier 12") (define *font-list-base* 0) (define *font-height* 0) (define-syntax prval (syntax-rules () ((_ expr) (format #f "~s = ~a" 'expr expr)))) (define-syntax prattr (syntax-rules () ((_ glconfig name bool?) (receive (status value) (gdk-gl-config-get-attrib glconfig name) (if status (format #f "~s = ~s" 'name (if bool? (not (zero? value)) value)) (format #f "~s : failed to get attribute value" 'name)))))) (define (examine-gl-config-attrib glconfig) (print "\nOpenGL visual configurations :\n") (print (prval (gdk-gl-config-is-rgba glconfig))) (print (prval (gdk-gl-config-is-double-buffered glconfig))) (print (prval (gdk-gl-config-is-stereo glconfig))) (print (prval (gdk-gl-config-has-alpha glconfig))) (print (prval (gdk-gl-config-has-depth-buffer glconfig))) (print (prval (gdk-gl-config-has-accum-buffer glconfig))) (print) (print (prattr glconfig GDK_GL_USE_GL #t)) (print (prattr glconfig GDK_GL_BUFFER_SIZE #f)) (print (prattr glconfig GDK_GL_LEVEL #f)) (print (prattr glconfig GDK_GL_RGBA #t)) (print (prattr glconfig GDK_GL_DOUBLEBUFFER #t)) (print (prattr glconfig GDK_GL_STEREO #t)) (print (prattr glconfig GDK_GL_AUX_BUFFERS #f)) (print (prattr glconfig GDK_GL_RED_SIZE #f)) (print (prattr glconfig GDK_GL_GREEN_SIZE #f)) (print (prattr glconfig GDK_GL_BLUE_SIZE #f)) (print (prattr glconfig GDK_GL_ALPHA_SIZE #f)) (print (prattr glconfig GDK_GL_DEPTH_SIZE #f)) (print (prattr glconfig GDK_GL_STENCIL_SIZE #f)) (print (prattr glconfig GDK_GL_ACCUM_RED_SIZE #f)) (print (prattr glconfig GDK_GL_ACCUM_GREEN_SIZE #f)) (print (prattr glconfig GDK_GL_ACCUM_BLUE_SIZE #f)) (print (prattr glconfig GDK_GL_ACCUM_ALPHA_SIZE #f)) (print) ) (define (init widget) (let ((glcontext (gtk-widget-get-gl-context widget)) (gldrawable (gtk-widget-get-gl-drawable widget)) (wsize (ref widget 'allocation))) (when (gdk-gl-drawable-gl-begin gldrawable glcontext) (let* ((font-list-base (gl-gen-lists 128)) (font-desc (pango-font-description-from-string *font-string*)) (font (gdk-gl-font-use-pango-font font-desc 0 128 font-list-base))) (unless font (errorf "*** Can't load font '~s'" *font-string*)) (set! *font-list-base* font-list-base) (let1 font-metrics (pango-font-get-metrics font #f) (set! *font-height* (pango-pixels (+ (pango-font-metrics-get-ascent font-metrics) (pango-font-metrics-get-descent font-metrics)))))) (gl-clear-color 1.0 1.0 1.0 1.0) (gl-clear-depth 1.0) (gl-viewport 0 0 (ref wsize 'width) (ref wsize 'height)) (gl-matrix-mode GL_PROJECTION) (gl-load-identity) (gl-ortho 0.0 (ref wsize 'width) 0.0 (ref wsize 'height) -1.0 1.0) (gl-matrix-mode GL_MODELVIEW) (gl-load-identity) (gdk-gl-drawable-gl-end gldrawable)) ;;*** OpenGL END *** )) (define (reshape widget . _) (let ((glcontext (gtk-widget-get-gl-context widget)) (gldrawable (gtk-widget-get-gl-drawable widget)) (wsize (ref widget 'allocation))) ;;*** OpenGL BEGIN *** (when (gdk-gl-drawable-gl-begin gldrawable glcontext) (gl-viewport 0 0 (ref wsize 'width) (ref wsize 'height)) (gl-matrix-mode GL_PROJECTION) (gl-load-identity) (gl-ortho 0.0 (ref wsize 'width) 0.0 (ref wsize 'height) -1.0 1.0) (gl-matrix-mode GL_MODELVIEW) (gl-load-identity) (gdk-gl-drawable-gl-end gldrawable)) ;;*** OpenGL END *** #t)) ;; this should be in Gauche core ... (define (string->u8vector string) (with-builder (<u8vector> put! get :size (string-size string)) (with-input-from-string string (lambda () (port-for-each put! read-byte))) (get))) (define (display widget . _) (let ((glcontext (gtk-widget-get-gl-context widget)) (gldrawable (gtk-widget-get-gl-drawable widget))) ;;*** OpenGL BEGIN *** (when (gdk-gl-drawable-gl-begin gldrawable glcontext) (gl-clear (logior GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT)) (gl-color 0.0 0.0 0.0) (do ((i 2 (- i 1))) ((< i -2)) (gl-raster-pos 10.0 (+ (* 0.5 (ref (ref widget 'allocation) 'height)) (* i *font-height*))) (do ((j (char->integer #\space) (+ j 1))) ((> j (char->integer #\Z))) (gl-call-list (+ *font-list-base* j)))) (gl-color 1.0 0.0 0.0) (gl-raster-pos 10.0 10.0) (gl-list-base *font-list-base*) (let1 array (string->u8vector *font-string*) ;;ugh... (gl-call-lists array)) (if (gdk-gl-drawable-is-double-buffered gldrawable) (gdk-gl-drawable-swap-buffers gldrawable) (gl-flush)) (gdk-gl-drawable-gl-end gldrawable) ;;*** OpenGL END *** ) #t)) (define (main args) (gtk-init args) (unless (gdk-gl-query-extension) (error "*** OpenGL is not suppotred.***")) (call-with-values gdk-gl-query-version (cut format #t "OpenGL is supported - version ~*~a.~a\n" <> <> <>)) (let1 glconfig (or (gdk-gl-config-new-by-mode (logior GDK_GL_MODE_RGB GDK_GL_MODE_DOUBLE)) (begin (warn "*** Cannot find the double-buffered visual.\n*** Trying single-buffered visual.\n") (gdk-gl-config-new-by-mode GDK_GL_MODE_RGB)) (error "*** No appropriate OpenGL-capable visual found.\n") ) (examine-gl-config-attrib glconfig) (let1 window (gtk-window-new GTK_WINDOW_TOPLEVEL) (gtk-window-set-title window "font") (g-signal-connect window "delete_event" (lambda _ (gtk-main-quit)) #f) (let1 vbox (gtk-vbox-new #f 0) (gtk-container-add window vbox) (gtk-widget-show vbox) (let1 drawing-area (gtk-drawing-area-new) (gtk-widget-set-size-request drawing-area 640 240) (gtk-widget-set-gl-capability drawing-area glconfig #f #t GDK_GL_RGBA_TYPE) (gtk-box-pack-start vbox drawing-area #t #t 0) (gtk-widget-set-events drawing-area (logior GDK_EXPOSURE_MASK GDK_BUTTON_PRESS_MASK)) (g-signal-connect drawing-area "realize" init) (g-signal-connect drawing-area "configure_event" reshape) (g-signal-connect drawing-area "expose_event" display) (gtk-widget-show drawing-area)) (let1 button (gtk-button-new-with-label "Quit") (gtk-box-pack-start vbox button #f #f 0) (g-signal-connect button "clicked" (lambda _ (gtk-main-quit)) #f) (gtk-widget-show button)) ) (gtk-widget-show window) )) (gtk-main) 0)
true
72ef339e28b10b05d8bc252299cd9c956a82a08e
b799840b179368ed5ec0a24032f62699cadb3d5e
/scheme/chicken/tls.scm
35c7ad244eb8be72e21add5524522eae1415bd3d
[]
no_license
anderscui/Programming
891a34ad65062e61abe1f3dc8d11f10584e49758
ec48ceb1b07c51ed894ffa23cd88024258a9ec2f
refs/heads/master
2022-11-08T02:41:47.609547
2022-10-27T02:47:10
2022-10-27T02:47:10
31,781,791
0
0
null
2022-06-29T17:50:58
2015-03-06T18:00:21
HTML
UTF-8
Scheme
false
false
2,226
scm
tls.scm
; data types ; primitive: number? (define atom? (lambda (x) (and (not (pair? x)) (not (null? x))))) ; (lambda ...) creates a function; ; (define ...) gives it a name; ; (else ...) asks if else is true which is always true. (define lat? (lambda (l) (cond ((null? l) #t) ((atom? (car l)) (lat? (cdr l))) (else #f)))) ; list operations. (define len (lambda (lat) (cond ((null? lat) 0) (else (add1 (len (cdr lat))))))) (define nth (lambda (n lat) (cond ((= n 1) (car lat)) (else (nth (sub1 n) (cdr lat)))))) (define occur (lambda (a lat) (cond ((null? lat) 0) ((= a (car lat)) (add1 (occur a (cdr lat)))) (else (occur a (cdr lat)))))) (define member? (lambda (a lat) (cond ((null? lat) #f) ((equal? a (car lat)) #t) (else (member? a (cdr lat)))))) (define rember (lambda (a lat) (cond ((null? lat) (quote ())) ((eq? a (car lat)) (cdr lat)) (else (cons (car lat) (rember a (cdr lat))))))) (define occur (lambda (a lat) (cond ((null? lat) 0) ((= a (car lat)) (add1 (occur a (cdr lat)))) (else (occur a (cdr lat)))))) (define first (lambda (l) (car l))) (define second (lambda (l) (car (cdr l)))) (define third (lambda (l) (car (cdr (cdr l))))) ; the nth element of list 'lat' (define pick (lambda (n lat) (cond ((= n 1) (car lat)) (else (pick (sub1 n) (cdr lat)))))) ; build a list consisting of the two specific items. (define build (lambda (a b) (cons a (cons b '())))) ; maths ; is 'n' multiple of 'm', 6 of 3. (define multiple? (lambda (n m) (= (remainder n m) 0))) (define factor? (lambda (n m) (multiple? m n))) (define even? (lambda (n) (= (modulo n 2) 0))) (define odd? (lambda (n) (not (even? n)))) ; assert (define eqvals? (lambda (v1 v2) (if (equal? v1 v2) (print "cool") (begin (print "oops...") (print v1) (print v2))))) (define true? (lambda (v) (if (and (boolean? v) v) (print "cool") (print "oops...")))) (define false? (lambda (v) (true? (not v)))) (print "tls.scm loaded, this is the default module.") (newline)
false
53a78a6013b190051e03c73f73cf506430c3414f
222b42ba803bfecd4ec31166dd2be107a840f2bd
/undone/unsorted/src/src/dijkstra.scm
3484f4486fb6578daf96454cd0fdff26a902607d
[]
no_license
ab3250/ablib
83512c2c2cadd0eb49ad534548c058e3ed119d4c
887c8661ce99e8edfe89bcf707400e55c3943dd4
refs/heads/master
2023-06-12T13:36:49.487467
2021-07-11T13:29:45
2021-07-11T13:29:45
384,955,137
0
0
null
null
null
null
UTF-8
Scheme
false
false
3,061
scm
dijkstra.scm
;; Dijkstra's algorithm ;; Copyright Juha Heinanen 1988 ;; This code may be freely distributed. ;; (load "matrix.scm") (load "util.scm") (define (dijkstra1 C) ; computes the costs of the shortest paths from vertex 0 ; to every vertex in the cost matrix C (define n (matrix-col-length C)) (define D (matrix-row-copy C 0)) ; shortest distance from vertex 0 to each vertex (define (min-vertex D V) ; chooses a vertex w in V such that D[w] is minimum (let loop ((w (car V)) (V (cdr V))) (if (null? V) w (if (< (vector-ref D (car V)) (vector-ref D w)) (loop (car V) (cdr V)) (loop w (cdr V)))))) ; dijkstra (let loop ((V (enum 1 (- n 1)))) ; V contains the set of vertexes whose shortest ; distance from the vertex 0 is still unknown (if (null? V) D (let* ((w (min-vertex D V)) (V-w (remv V w))) (for-each (lambda (v) (vector-set! D v (min (vector-ref D v) (+ (vector-ref D w) (matrix-ref C w v))))) V-w) (loop V-w))))) (define (dijkstra2 C) ; computes a pair of vectors which contain ; (1) the costs of the shortest paths from vertex 0 ; to every vertex in the cost matrix C and ; (2) the immediate predecessor vertexes of every ; vertex in the shortest path (define n (matrix-col-length C)) (define D (matrix-row-copy C 0)) ; shortest distance from vertex 0 to each vertex (define P (make-vector n 0)) ; P[v] contains the vertex immediately before ; vertex v in the shortest path (define (min-vertex D V) ; chooses a vertex w in V such that D[w] is minimum (let loop ((w (car V)) (V (cdr V))) (if (null? V) w (if (< (vector-ref D (car V)) (vector-ref D w)) (loop (car V) (cdr V)) (loop w (cdr V)))))) ; dijkstra (let loop ((V (enum 1 (- n 1)))) ; V contains the set of vertexes whose shortest ; distance from the vertex 0 is still unknown (if (null? V) (cons D P) (let* ((w (min-vertex D V)) (V-w (remv V w))) (for-each (lambda (v) (if (< (+ (vector-ref D w) (matrix-ref C w v)) (vector-ref D v)) (begin (vector-set! D v (+ (vector-ref D w) (matrix-ref C w v)) (vector-set! P v w))))) V-w) (loop V-w))))) (define (make-cost-matrix size cost-list) (define infinity 536870911) (define matrix (make-matrix size size infinity)) (define (set-cost! i j c) (matrix-set! matrix i j c)) (let loop ((i 0)) (if (< i size) (begin (matrix-set! matrix i i 0) (loop (+ i 1))))) (for-each (lambda (lst) (apply set-cost! lst)) cost-list) matrix) (define C (make-cost-matrix 5 '((0 1 10) (0 3 30) (0 4 100) (1 2 50) (2 4 10) (3 2 20) (3 4 60))))
false
173f1716df66721d7c4ea248650356286aff48bd
7168cedb23c0a8f2b81419507dab5e87436821f8
/15.TheDifferenceBetweenMenAndBoys.scm
e2b9a0fe751312909573f6350156f5985dc9a7a7
[]
no_license
valvallow/TheSeasonedSchemer
9b6f50706c473a40af0ed20f1b9bd880538e96ad
d36b57e8eb14389015e51841957428ecc8aaa5db
refs/heads/master
2020-05-04T20:06:52.902979
2010-05-10T12:12:15
2010-05-10T12:12:15
511,208
1
1
null
null
null
null
UTF-8
Scheme
false
false
2,438
scm
15.TheDifferenceBetweenMenAndBoys.scm
;; chapter.15 (define x (cons (quote chicago) (cons (quote pizza) (quote ())))) ; -> x x ; -> (chicago pizza) (set! x (quote gone)) ; -> gone x ; -> gone (set! x (quote skins)) ; -> skins x ; -> skins (define gourmet (lambda (food) (cons food (cons x (quote ()))))) x ; -> skins (gourmet (quote onion)) ; -> (onion skins) (set! x (quote rings)) (gourmet (quote onion)) ; -> (onion rings) (define gourmand (lambda (food) (set! x food) (cons food (cons x (quote ()))))) (gourmand (quote potato)) ; -> (potato potato) (define dinner (lambda (food) (cons (quote milkshake) (cons food (quote ()))))) (define dinnerR (lambda (food) (set! x food) (cons (quote milkshake) (cons food (quote ()))))) (dinnerR (quote onion)) ; -> (milkshake onion) (dinnerR (quote pecanpie)) ; -> (milkshake pecanpie) x ; -> pecanpie (gourmand (quote onion)) ; -> (onion onion) x ; -> onion (define omnivore (let ((x (quote minestrone))) (lambda (food) (set! x food) (cons food (cons x (quote ())))))) (omnivore (quote bouillabaisse)) ; -> (bouillabaisse bouillabaisse) (define gobbler (let ((x (quote minestrone))) (lambda (food) (set! x food) (cons food (cons x (quote ())))))) (gobbler (quote gumbo)) ; -> (gumbo gumbo) (define nibbler (lambda (food) (let ((x (quote donut))) (set! x food) (cons food (cons x (quote ())))))) (nibbler (quote cheerio)) ; -> (cheerio cheerio) ;; Isn't (let ...) like (letrec ...) (define food (quote none)) (define glutton (lambda (x) (set! food x) (cons (quote more) (cons x (cons (quote more) (cons x (quote ()))))))) (glutton (quote garlic)) ; -> (more garlic more garlic) food ; -> garlic (define chez-nous (lambda () (set! food x) (set! x food))) food ; -> garlic x ; -> onion (chez-nous) food ; -> onion x ; -> onion (define chez-nous (lambda () (let ((a food)) (set! food x) (set! x a)))) (glutton (quote garlic)) ; -> (more garlic more garlic) food ; -> garlic (gourmand (quote potato)) ; -> (potato potato) x ; -> potato (chez-nous) food ; -> potato x ; -> garlic
false
4f08ca28f40577db1e0fbb46899248991a79bcf8
d8bdd07d7fff442a028ca9edbb4d66660621442d
/scam/tests/10-scheme/00-base/math/complex-times.scm
ae945a7a08e9f95c9987f69d0819b7a24d4c3aef
[]
no_license
xprime480/scam
0257dc2eae4aede8594b3a3adf0a109e230aae7d
a567d7a3a981979d929be53fce0a5fb5669ab294
refs/heads/master
2020-03-31T23:03:19.143250
2020-02-10T20:58:59
2020-02-10T20:58:59
152,641,151
0
0
null
null
null
null
UTF-8
Scheme
false
false
282
scm
complex-times.scm
(import (only (scheme base) *) (only (checks) c-check) (test narc)) (narc-label "Complex Times") (narc-expect ('(1+i #t #f #f #f #t) (c-check (* 1+i))) ('(5-i #t #f #f #f #t) (c-check (* 1+i 2-3i))) ('(2 #t #t #t #t #t) (c-check (* 1+i 1-i)))) (narc-report)
false
2384033072a98047d3ec3e58108eba4f2fe4cc25
37c751fc27e790303b84730013217d1c8cbb60cc
/s48/exceptions/packages.scm
361870f88f1898df622985746a23d60237befd7b
[ "LicenseRef-scancode-public-domain", "BSD-3-Clause" ]
permissive
gitGNU/gnu_sunterlib
e82df45894f0075e2ad2df88ce6edf0f1704c6a0
96d443b55c990506e81f2c893e02245b7e2b5f4c
refs/heads/master
2023-08-06T09:32:59.463520
2017-03-07T14:31:05
2017-03-07T14:31:05
90,394,267
0
0
null
null
null
null
UTF-8
Scheme
false
false
925
scm
packages.scm
(define-interface srfi-34-interface (export raise with-exception-handler with-exception-handlers (guard :syntax))) (define-interface srfi-35-interface (export make-condition-type condition-type? make-condition condition? condition-has-type? condition-ref make-compound-condition extract-condition (define-condition-type :syntax) (condition :syntax) &condition &message message-condition? condition-message &serious serious-condition? &error error?)) (define-interface srfi-34-restart-interface (export (raise-restartable :syntax) (restart :syntax))) (define-structure srfi-34 srfi-34-interface (open scheme signals) (files srfi-34)) (define-structure srfi-35 srfi-35-interface (open scheme signals srfi-1 srfi-9) (files srfi-35)) (define-structure srfi-34-restart srfi-34-restart-interface (open scheme srfi-34 srfi-35) (files restart))
false
fc3e69d7390169dd2f912ff25b5de7a19b5e8548
0011048749c119b688ec878ec47dad7cd8dd00ec
/src/078/solution.scm
938bf5d70de9c2de9a7d3ad864c1377a415da7ac
[ "0BSD" ]
permissive
turquoise-hexagon/euler
e1fb355a44d9d5f9aef168afdf6d7cd72bd5bfa5
852ae494770d1c70cd2621d51d6f1b8bd249413c
refs/heads/master
2023-08-08T21:01:01.408876
2023-07-28T21:30:54
2023-07-28T21:30:54
240,263,031
8
0
null
null
null
null
UTF-8
Scheme
false
false
1,190
scm
solution.scm
(import (chicken fixnum) (euler) (srfi 69)) (define partition (let ((cache (make-hash-table))) (hash-table-set! cache 0 1) (hash-table-set! cache 1 1) (lambda (n m) (if (hash-table-exists? cache n) (hash-table-ref cache n) (let loop ((i 1) (acc 0)) (if (fx> i n) (let ((acc (fxmod acc m))) (hash-table-set! cache n acc) acc) (let* ((a (fx- n (fx/ (fx* i (fx- (fx* 3 i) 1)) 2))) (b (fx- n (fx/ (fx* i (fx+ (fx* 3 i) 1)) 2))) (acc (fx+ acc (fx* (if (fxeven? i) -1 +1) (fx+ (partition a m) (partition b m)))))) (if (and (fx< a 0) (fx< b 0)) (let ((acc (fxmod acc m))) (hash-table-set! cache n acc) acc) (loop (fx+ i 1) acc))))))))) (define (solve n) (let loop ((i 1)) (if (fx= (partition i n) 0) i (loop (fx+ i 1))))) (let ((_ (solve #e1e6))) (print _) (assert (= _ 55374)))
false
6af8afd7690683b610b7dde66a79a3b9974a2dfd
00466b7744f0fa2fb42e76658d04387f3aa839d8
/sicp/chapter2/2.2/ex2.40.scm
8b32f06401fe728ab5bf5bed9f090aab3214466d
[ "WTFPL" ]
permissive
najeex/stolzen
961da2b408bcead7850c922f675888b480f2df9d
bb13d0a7deea53b65253bb4b61aaf2abe4467f0d
refs/heads/master
2020-09-11T11:00:28.072686
2015-10-22T21:35:29
2015-10-22T21:35:29
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
1,264
scm
ex2.40.scm
#lang scheme (define (accumulate op initial sequence) (if (null? sequence) initial (op (car sequence) (accumulate op initial (cdr sequence))) ) ) (define (enumerate-interval begin end) (if (> begin end) null (cons begin (enumerate-interval (+ begin 1) end)) ) ) (define (flat seq) (accumulate append null seq) ) (define (flatmap proc seq) (flat (map proc seq)) ) ; 2.40 (define (unique-pairs n) (flatmap (lambda (i) (map (lambda (j) (list i j)) (enumerate-interval 1 (- i 1))) ) (enumerate-interval 1 n) ) ) (unique-pairs 5) ; 2.41 (define (C3 n) (flatmap (lambda (i) (flatmap (lambda (j) (map (lambda (k) (list k j i)) (enumerate-interval 1 (- j 1))) ) (enumerate-interval 1 (- i 1))) ) (enumerate-interval 1 n) ) ) (C3 5) (define (sum seq) (accumulate + 0 seq) ) (define (sum-equal-to? value) (lambda (seq) (= value (sum seq)) ) ) (define (triples-with-sum n s) (filter (sum-equal-to? s) (C3 n)) ) (triples-with-sum 5 10)
false
f6dd7032a09d8c7f861604d3b1e39bb010533a13
c852b3f8e53b2a515abc4e45f53e4f7fa2e13613
/anf-big/nqueens.scm
c3e187a37919d501d92213a808a70fe8add0b230
[]
no_license
acieroid/abstract-benchmarks
81d988aa5e65a1c2601244f8bedbf2d29563ff35
f4abc6550d121b2fd1618ff20f476b97e565aed9
refs/heads/master
2020-04-04T15:07:56.682077
2014-12-01T16:00:32
2014-12-01T16:00:32
26,171,263
0
1
null
null
null
null
UTF-8
Scheme
false
false
2,055
scm
nqueens.scm
;; Expected result: 92 (letrec ((append (lambda (l x) (let ((_30 (null? l))) (if _30 x (let ((_33 (car l))) (let ((_34 (cdr l))) (let ((_31 _34)) (let ((_35 (append _31 x))) (let ((_32 _35)) (let ((_36 (cons _33 _32))) _36))))))))))) (letrec ((one-to (lambda (n) (letrec ((loop (lambda (i l) (let ((_37 (= i 0))) (if _37 l (let ((_38 (- i 1))) (let ((_39 (cons i l))) (let ((_40 (loop _38 _39))) _40)))))))) (let ((_41 (quote ()))) (let ((_42 (loop n _41))) _42)))))) (letrec ((ok? (lambda (row dist placed) (let ((_43 (null? placed))) (if _43 #t (let ((_61 (car placed))) (let ((_47 _61)) (let ((_44 _47)) (let ((_62 (+ row dist))) (let ((_48 _62)) (let ((_45 _48)) (let ((_63 (= _44 _45))) (let ((_49 _63)) (let ((_46 _49)) (let ((_64 (not _46))) (let ((_50 _64)) (let ((_65 (car placed))) (let ((_54 _65)) (let ((_51 _54)) (let ((_66 (- row dist))) (let ((_55 _66)) (let ((_52 _55)) (let ((_67 (= _51 _52))) (let ((_56 _67)) (let ((_53 _56)) (let ((_68 (not _53))) (let ((_57 _68)) (let ((_69 (+ dist 1))) (let ((_58 _69)) (let ((_70 (cdr placed))) (let ((_59 _70)) (let ((_71 (ok? row _58 _59))) (let ((_60 _71)) (let ((_72 (and _50 _57 _60))) _72)))))))))))))))))))))))))))))))))) (letrec ((try-it (lambda (x y z) (let ((_73 (null? x))) (if _73 (let ((_74 (null? y))) (if _74 1 0)) (let ((_93 (car x))) (let ((_75 _93)) (let ((_94 (ok? _75 1 z))) (let ((_76 _94)) (let ((_95 (if _76 (let ((_81 (cdr x))) (let ((_77 _81)) (let ((_82 (append _77 y))) (let ((_78 _82)) (let ((_83 (quote ()))) (let ((_84 (car x))) (let ((_79 _84)) (let ((_85 (cons _79 z))) (let ((_80 _85)) (let ((_86 (try-it _78 _83 _80))) _86)))))))))) 0))) (let ((_96 (cdr x))) (let ((_89 _96)) (let ((_97 (car x))) (let ((_90 _97)) (let ((_87 _90)) (let ((_98 (cons _87 y))) (let ((_91 _98)) (let ((_88 _91)) (let ((_99 (try-it _89 _88 z))) (let ((_92 _99)) (let ((_100 (+ _95 _92))) _100))))))))))))))))))))) (letrec ((nqueens (lambda (n) (let ((_101 (one-to n))) (let ((_102 (quote ()))) (let ((_103 (quote ()))) (let ((_104 (try-it _101 _102 _103))) _104))))))) (nqueens 8))))))
false
1495441edb75eb82b15bc13ee9fcf0f3881c0ede
b63aa30386f5aac8a82d9c6742e1947d432498ab
/glfw/error.scm
dbe8ac5f8395dd5b38a7f4d7a2c0880c45c562a1
[]
no_license
lemvik/scheme-graphics-playground
95ba4b45b12651943117dd724cf28882d8125eb0
ca09055906b28ca7253f587acd64905760956a03
refs/heads/master
2020-03-27T23:54:28.671736
2019-08-14T13:33:46
2019-08-14T13:33:46
147,357,274
0
0
null
null
null
null
UTF-8
Scheme
false
false
616
scm
error.scm
;;;; ;;;; Errors that glfw bindings might produce. ;;;; (library (glfw error) (export make-glfw-error glfw-error?) (import (chezscheme) (prefix (glfw raw) raw:)) ;; Condition describing error in GLFW library. (define-condition-type &glfw-error &violation make-glfw-error-internal glfw-error? (internal-code glfw-error-code)) ;; Creates glfw error condition from recent GLFW library error. (define (make-glfw-error) (let-values ([(code description) (raw:get-error)]) (condition (make-glfw-error-internal code) (make-message-condition description)))))
false
ff42a8169b0c9aa106d30f83ca91695425c23cfc
b520d90c5c5c5908db328d962aac8aac41a97040
/knight.scm
3d7b87110e474e9cf160a50aaefbf2b6cb05b09b
[]
no_license
iBelieve/knight
6b684080ce35b2cbdf61d9cac8562c8cbbcdafe4
be48fe62194ea26a1afcf0f1c4db9f01d9c8436f
refs/heads/master
2022-07-12T08:52:09.365407
2020-05-10T14:37:15
2020-05-10T14:37:15
261,616,603
0
0
null
null
null
null
UTF-8
Scheme
false
false
19,977
scm
knight.scm
;;; A simple Knight-to-JS compiler used for bootstrapping (import (chicken keyword)) (import (chicken format)) (import (chicken io)) (import (chicken irregex)) (import srfi-1) ; list functions (import srfi-13) ; string functions (import srfi-69) ; hash tables (import srfi-113) ; sets and bags (import srfi-128) ; comparators (import arrays) (import simple-exceptions) (define js-keywords (set (make-equal-comparator) "var" "let" "const")) (define nil '()) (define var-not-found-exn (make-exception "Variable not found" 'var-not-found)) (define empty-op-exn (make-exception "Empty operator call" 'empty-op)) (define internal-exn (make-exception "Internal error" 'internal)) (define (tagged-list? exp tag) (and (pair? exp) (eq? (car exp) tag))) (define analyze-specials (make-hash-table)) (define (make-env) (list :variables (make-hash-table) :recur-variables nil)) (define (child-env env) (list :variables (hash-table-copy (get-keyword :variables env)) :recur-variables (let ([vars (get-keyword :recur-variables env)]) (if (not (null? vars)) (array-copy vars) nil)))) (define (recur-env env) (list :variables (hash-table-copy (get-keyword :variables env)) :recur-variables (make-array))) (define (append-recur-var env var) (array-add! var (get-keyword :recur-variables env))) (define (recur-vars env) (array->list (get-keyword :recur-variables env))) ;; Thread-firsts macro from Clojure. ;; See https://lispdreams.wordpress.com/2016/04/10/thread-first-thread-last-and-partials-oh-my/ (define-syntax -> (syntax-rules () ((_ value) value) ((_ value (f1 . body) next ...) (-> (f1 value . body) next ...)))) (define (regex-replace string regex . replacements) (apply irregex-replace `(,regex ,string . ,replacements))) (define (regex-replace/all string regex . replacements) (apply irregex-replace/all `(,regex ,string . ,replacements))) (define (replace-special-chars ident) (-> ident (regex-replace/all "!" "") (regex-replace/all "->" "-to-") (regex-replace "^(contains.*)\\?$" "" 1) (regex-replace "^(has.*)\\?$" "" 1) (regex-replace "^(.*)\\?$" "is-" 1))) (define (js-keyword? ident) (set-contains? js-keywords ident)) (define (sanitize-js-keywords ident) (if (js-keyword? ident) (string-append ident "$") ident)) (define (kebabcase->camelcase ident) (-> ident (replace-special-chars) (regex-replace/all "[-_]([a-zA-Z])" (lambda (m) (string-upcase (irregex-match-substring m 1)))) (sanitize-js-keywords))) (define (symbol->ident symbol) (cond [(eq? symbol '=) "isEqual"] [(eq? symbol 'Symbol) "LispSymbol"] [else (kebabcase->camelcase (symbol->string symbol))])) (define (define-variable env symbol) (let ([variables (get-keyword :variables env)]) (if (not (hash-table-exists? variables symbol)) (hash-table-set! variables symbol (symbol->ident symbol))) (hash-table-ref variables symbol))) (define (define-function env symbol) (let ([variables (get-keyword :variables env)]) (if (not (hash-table-exists? variables symbol)) (hash-table-set! variables symbol (symbol->ident symbol))) (hash-table-ref variables symbol))) (define (predefine-function env symbol) (let ([variables (get-keyword :variables env)]) (if (not (hash-table-exists? variables symbol)) (hash-table-set! variables symbol (symbol->ident symbol))) (hash-table-ref variables symbol))) (define (resolve-variable env symbol) (if (string-prefix? "js/" (symbol->string symbol)) (substring/shared (symbol->string symbol) 3) (let ([variables (get-keyword :variables env)]) (if (not (hash-table-exists? variables symbol)) (raise (var-not-found-exn 'resolve-variable symbol))) (hash-table-ref variables symbol)))) (define (print-return ctx) (if (eq? ctx :return) (printf "return "))) (define (print-end ctx) (if (or (eq? ctx :statement) (eq? ctx :return)) (printf ";"))) (define (field-access? form) (and (symbol? form) (string-prefix? ".-" (symbol->string form)))) (define (method-call? form) (and (symbol? form) (string-prefix? "." (symbol->string form)))) (define (special? form) (and (symbol? form) (hash-table-exists? analyze-specials form))) (define (for-each-enumerated func list) (unless (null-list? list) (let loop ([index 0] [list list]) (let* ([item (car list)] [rest (cdr list)] [first? (= index 0)] [last? (null-list? rest)]) (func item index first? last?) (unless last? (loop (add1 index) rest)))))) (define (emit-many env ctx forms sep) (for-each-enumerated (lambda (form index first? last?) (let ([ctx (case ctx [(:statement :expr) ctx] [(:return) (if last? :return :statement)] [else (raise (internal-exn 'emit-many ctx))])]) (emit env ctx form) (if (and (not (string-null? sep)) (not last?)) (printf "~a" sep)))) forms)) (define (emit env ctx form) (cond [(eq? form 'nil) (emit-literal env ctx nil)] [(eq? form 'true) (emit-literal env ctx #t)] [(eq? form 'false) (emit-literal env ctx #f)] [(symbol? form) (emit-var env ctx form)] [(list? form) (emit-list env ctx form)] [else (emit-literal env ctx form)])) (define (emit-var env ctx symbol) (let ([name (resolve-variable env symbol)]) (print-return ctx) (printf "~a" name) (print-end ctx))) (define (emit-literal env ctx form) (print-return ctx) (cond [(null? form) (printf "null")] [(eq? #t form) (printf "true")] [(eq? #f form) (printf "false")] [(char? form) (case form [(#\\) (printf "\"\\\\\"")] [(#\") (printf "\"\\\"\"")] [(#\newline) (printf "\"\\n\"")] [(#\return) (printf "\"\\r\"")] [(#\tab) (printf "\"\\t\"")] [(#\space) (printf "\" \"")] [else (printf "\"~a\"" form)])] [(keyword? form) (printf "stringToKeyword(\"~a\")" (keyword->string form))] [else (printf "~s" form)]) (print-end ctx)) (define (emit-list env ctx form) (let ([callable (car form)] [args (cdr form)]) (cond [(field-access? callable) (emit-field env ctx callable args)] [(method-call? callable) (emit-methodcall env ctx callable args)] [(special? callable) ((hash-table-ref analyze-specials callable) env ctx args)] [else (emit-funcall env ctx callable args)]))) (define (emit-methodcall env ctx callable args) (let ([method-name (substring/shared (symbol->string callable) 1)] [obj (car args)] [args (cdr args)]) (print-return ctx) (emit env :expr obj) (printf ".~a(" method-name) (emit-many env :expr args ",") (printf ")") (print-end ctx))) (define (emit-funcall env ctx callable args) (print-return ctx) (emit env :expr callable) (printf "(") (emit-many env :expr args ",") (printf ")") (print-end ctx)) (define (emit-field env ctx callable args) (let ([field-name (substring/shared (symbol->string callable) 2)] [obj (car args)]) (print-return ctx) (emit env :expr obj) (printf ".~a" field-name) (print-end ctx))) (define (emit-def env ctx args) (unless (eq? ctx :statement) (raise (knight-exn))) (let ([var-name (define-variable env (car args))] [init-form (if (cdr args) (cadr args))]) (printf "let ~a=" var-name) (if init-form (emit env :expr init-form)) (printf ";"))) (hash-table-set! analyze-specials 'def emit-def) (define (emit-index env ctx args) (let ([obj (car args)] [index (cadr args)]) (print-return ctx) (emit env :expr obj) (printf "[") (emit env :expr index) (printf "]") (print-end ctx))) (hash-table-set! analyze-specials 'js/index emit-index) (define (emit-let env ctx args) (if (eq? ctx :expr) (raise (knight-exn))) (let ([vars (car args)] [body (cdr args)] [env (child-env env)]) (let loop ([vars vars]) (if (not (null-list? vars)) (let ([var (car vars)] [value (cadr vars)] [rest (cddr vars)]) (if (list? var) (printf "let [~a]=" (string-join (map (lambda (var) (define-variable env var)) var) ",")) (printf "let ~a=" (define-variable env var))) (emit env :expr value) (printf ";") (loop rest)))) (emit-many env ctx body ""))) (hash-table-set! analyze-specials 'let emit-let) (define (emit-obj env ctx args) (print-return ctx) (printf "{") (let loop ([args args]) (if (not (null-list? args)) (let ([key (car args)] [value (cadr args)] [rest (cddr args)]) (printf "\"~a\":" key) (emit env :expr value) (printf ",") (loop rest)))) (printf "}") (print-end "}")) (hash-table-set! analyze-specials 'js/obj emit-obj) (define (emit-cond env ctx args) (if (eq? ctx :expr) (printf "(()=>{")) (for-each-enumerated (lambda (expr index first? last?) (let ([test (car expr)] [body (cdr expr)]) (if (not first?) (printf "else ")) (if (eq? test 'else) (printf "{") (begin (printf "if(") (emit env :expr test) (printf "){"))) (emit-many env (statement-ctx ctx) body "") (printf "}"))) args) (if (eq? ctx :expr) (printf "})()"))) (hash-table-set! analyze-specials 'cond emit-cond) (define (emit-new env ctx args) (let ([callable (car args)] [args (cdr args)]) (print-return ctx) (printf "new ") (emit env :expr callable) (printf "(") (emit-many env :expr args ",") (printf ")") (print-end ctx))) (hash-table-set! analyze-specials 'js/new emit-new) (define (single-list? list) (and (pair? list) (null-list? (cdr list)))) (define (emit-if env ctx args) (let ([test (car args)] [if-true (cadr args)] [if-false (cddr args)]) (if (eq? ctx :expr) (begin (emit env :expr test) (printf "?") (emit env :expr if-true) (printf ":") (cond [(null-list? if-false) (printf "null")] [(single-list? if-false) (emit env :expr (car if-false))] [else (printf "(") (emit-many env :expr if-false ",") (printf ")")])) (begin (printf "if(isTruthy(") (emit env :expr test) (printf ")){") (emit env ctx if-true) (if (not (null-list? if-false)) (begin (printf "}else{") (emit-many env ctx if-false "") (printf "}")) (if (eq? ctx :return) (printf "}else{return;}") (printf "}"))))))) (hash-table-set! analyze-specials 'if emit-if) (define (emit-for env ctx args) (if (eq? ctx :expr) (raise (knight-exn))) (let ([var (car args)] [body (cdr args)] [env (child-env env)]) (printf "for(") (let ([var (car var)] [value (cadr var)]) (if (list? var) (printf "let [~a]of " (string-join (map (lambda (var) (define-variable env var)) var) ",")) (printf "let ~a of " (define-variable env var))) (emit env :expr value)) (printf "){") (emit-many env :statement body "") (printf "}"))) (hash-table-set! analyze-specials 'for emit-for) (define (emit-return env ctx args) (if (eq? ctx :expr) (raise (knight-exn))) (if (null-list? args) (printf "return;") (emit env :return (car args)))) (hash-table-set! analyze-specials 'js/return emit-return) (define (emit-yield env ctx args) (if (eq? ctx :expr) (raise (knight-exn))) (printf "yield ") (emit env :expr (car args)) (printf ";")) (hash-table-set! analyze-specials 'yield emit-yield) (define (emit-throw env ctx args) (if (eq? ctx :expr) (raise (knight-exn))) (printf "throw ") (emit env :expr (car args)) (printf ";")) (hash-table-set! analyze-specials 'js/throw emit-throw) (define (emit-recur env ctx args) (if (eq? ctx :expr) (raise (knight-exn))) (for-each (lambda (var) (printf "~a=" (car var)) (emit env :expr (cadr var)) (printf ";")) (zip (recur-vars env) args)) (printf "continue;")) (hash-table-set! analyze-specials 'recur emit-recur) (define (emit-set env ctx args) (unless (eq? ctx :statement) (raise (knight-exn))) (let ([setter (car args)] [value (cadr args)]) (cond [(symbol? setter) (emit-set-var env setter value)] [(list? setter) (emit-setter env setter value)] [else (raise (invalid-setter-exn 'emit-set setter))]))) (define (emit-setter env setter value) (let ([callable (car setter)] [args (cdr setter)]) (cond [(field-access? callable) (emit-set-field env callable args value)] [else (raise (invalid-setter-exn 'emit-set setter))]))) (define (emit-set-var env symbol value) (let ([name (resolve-variable env symbol)]) (printf "~a=" name) (emit env :expr value) (printf ";"))) (define (emit-set-field env symbol args value) (let ([field-name (substring/shared (symbol->string symbol) 2)] [obj (car args)]) (emit env :expr obj) (printf ".~a=" field-name) (emit env :expr value) (printf ";"))) (hash-table-set! analyze-specials 'set! emit-set) (define (emit-defn env ctx args) (unless (eq? ctx :statement) (raise (knight-exn))) (let* ([func-name (define-function env (car args))] [params (cadr args)] [docs (if (and (not (null-list? (cddr args))) (string? (caddr args)) (not (null-list? (cdddr args)))) (caddr args) nil)] [body (if (not (null? docs)) (cdddr args) (cddr args))] [env (child-env env)]) (printf "function ~a(" func-name) (for-each-enumerated (lambda (param index first? last?) (if (tagged-list? param 'spread) (printf "...~a" (define-variable env (cadr param))) (printf "~a" (define-variable env param))) (unless last? (printf ","))) params) (printf "){") (emit-many env :return body "") (printf "}"))) (hash-table-set! analyze-specials 'defn emit-defn) (define (emit-defgen env ctx args) (unless (eq? ctx :statement) (raise (knight-exn))) (let* ([func-name (define-function env (car args))] [params (cadr args)] [docs (if (and (not (null-list? (cddr args))) (string? (caddr args)) (not (null-list? (cdddr args)))) (caddr args) nil)] [body (if (not (null? docs)) (cdddr args) (cddr args))] [env (child-env env)]) (printf "function* ~a(" func-name) (for-each-enumerated (lambda (param index first? last?) (if (tagged-list? param 'spread) (printf "...~a" (define-variable env (cadr param))) (printf "~a" (define-variable env param))) (unless last? (printf ","))) params) (printf "){") (emit-many env :return body "") (printf "}"))) (hash-table-set! analyze-specials 'defgen emit-defgen) (define (emit-do env ctx args) (printf "{") (emit-many env ctx args "") (printf "}")) (hash-table-set! analyze-specials 'do emit-do) (define (emit-fn env ctx args) (print-return ctx) (let* ([params (car args)] [body (cdr args)] [env (child-env env)]) (printf "(") (for-each-enumerated (lambda (param index first? last?) (if (tagged-list? param 'spread) (printf "...~a" (define-variable env (cadr param))) (printf "~a" (define-variable env param))) (unless last? (printf ","))) params) (printf ")=>{") (emit-many env :return body "") (printf "}")) (print-end ctx)) (hash-table-set! analyze-specials 'fn emit-fn) (define (statement-ctx ctx) (if (eqv? ctx #:statement) #:statement #:return)) (define (emit-loop env ctx args) (if (eq? ctx :expr) (printf "(()=>{")) (let ([vars (car args)] [body (cdr args)] [env (recur-env env)]) (let loop ([vars vars]) (if (not (null-list? vars)) (let ([name (define-variable env (car vars))] [value (cadr vars)] [rest (cddr vars)]) (append-recur-var env name) (printf "let ~a=" name) (emit env :expr value) (printf ";") (loop rest)))) (printf "while(true){") (emit-many env :return body "")) (printf "}") (if (eq? ctx :expr) (printf "})()"))) (hash-table-set! analyze-specials 'loop emit-loop) (define (emit-array env ctx args) (print-return ctx) (printf "[") (emit-many env :expr args ",") (printf "]") (print-end ctx)) (hash-table-set! analyze-specials 'js/array emit-array) (define (emit-spread env ctx args) (unless (eq? ctx :expr) (raise (knight-exn))) (printf "...") (emit env :expr (car args))) (hash-table-set! analyze-specials 'spread emit-spread) (define (emit-or env ctx args) (if (null-list? args) (raise (empty-op-exn 'emit-op "or"))) (print-return ctx) (for-each-enumerated (lambda (arg index first? last?) (unless last? (printf "isTruthy")) (printf "(") (emit env :expr arg) (printf ")") (unless last? (printf "||"))) args) (print-end ctx)) (hash-table-set! analyze-specials 'or emit-or) (define (emit-and env ctx args) (if (null-list? args) (raise (empty-op-exn 'emit-op "and"))) (print-return ctx) (for-each-enumerated (lambda (arg index first? last?) (unless last? (printf "isTruthy")) (printf "(") (emit env :expr arg) (printf ")") (unless last? (printf "&&"))) args) (print-end ctx)) (hash-table-set! analyze-specials 'and emit-and) (define (emit-quote env ctx args) (emit env ctx (knight-quote (car args)))) (hash-table-set! analyze-specials 'quote emit-quote) (define (emit-op op) (lambda (env ctx args) (if (null-list? args) (raise (empty-op-exn 'emit-op op))) (print-return ctx) (for-each-enumerated (lambda (arg index first? last?) (printf "(") (emit env :expr arg) (printf ")") (unless last? (printf op))) args) (print-end ctx))) (hash-table-set! analyze-specials 'js/and (emit-op "&&")) (hash-table-set! analyze-specials 'js/or (emit-op "||")) (hash-table-set! analyze-specials 'js/== (emit-op "==")) (hash-table-set! analyze-specials 'js/!= (emit-op "!=")) (hash-table-set! analyze-specials 'js/=== (emit-op "===")) (hash-table-set! analyze-specials 'js/!== (emit-op "!==")) (hash-table-set! analyze-specials '= (emit-op "===")) (hash-table-set! analyze-specials '!= (emit-op "!==")) (hash-table-set! analyze-specials '> (emit-op ">")) (hash-table-set! analyze-specials '< (emit-op "<")) (hash-table-set! analyze-specials '<= (emit-op "<=")) (hash-table-set! analyze-specials '>= (emit-op ">=")) (hash-table-set! analyze-specials '+ (emit-op "+")) (hash-table-set! analyze-specials '- (emit-op "-")) (hash-table-set! analyze-specials '* (emit-op "*")) (hash-table-set! analyze-specials '/ (emit-op "/")) (hash-table-set! analyze-specials 'js/instanceof (emit-op "instanceof")) (define (emit-module exprs) (let ([env (make-env)]) (for-each (lambda (expr) (if (tagged-list? expr 'defn) (predefine-function env (cadr expr)))) exprs) (emit-many env :statement exprs "\n"))) (define (knight-quote form) (cond [(symbol? form) (list 'string->symbol (symbol->string form))] [(list? form) (append (list 'js/array) (map knight-quote form))] [else form])) (let ([src (read-list)]) (emit-module src) (newline))
true
54b8da48c0b38a80bf97fea46775b2abb517d6bb
58381f6c0b3def1720ca7a14a7c6f0f350f89537
/Chapter 3/3.3/Ex3.19.scm
05c4f06bc4320eb3df12df4f7ede9fecf797ee5d
[]
no_license
yaowenqiang/SICPBook
ef559bcd07301b40d92d8ad698d60923b868f992
c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a
refs/heads/master
2020-04-19T04:03:15.888492
2015-11-02T15:35:46
2015-11-02T15:35:46
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
734
scm
Ex3.19.scm
#lang planet neil/sicp ; if cdr x and (define (cyclic? lst) (define (iter move-slow-pointer slow-pointer fast-pointer) (cond ((null? fast-pointer) false) ((eq? fast-pointer slow-pointer) true) (else (iter (not move-slow-pointer) (if move-slow-pointer (cdr slow-pointer) slow-pointer) (cdr fast-pointer))))) (iter true lst (cdr lst))) (define three (list 1 2 3)) (cyclic? three) (define (last-pair x) (if (null? (cdr x)) x (last-pair (cdr x)))) (define (make-cycle x) (set-cdr! (last-pair x) x) x) (define z (make-cycle (list 'a 'b 'c 'd))) (define w (append '(g h j) z)) (cyclic? z)
false
196a5bb5f4b6ac12a1b3a02661146bbba155715d
bad9eef8668f81d8f6e468dfc916e6e0fe6fa65f
/sctp-misc-tests.scm
ba2171679f01ac8c72c14a71c9b3a97b34971983
[ "BSD-3-Clause" ]
permissive
nplab/sctp-tests
763dbaf8ae67a4590d69e2a0b233a32a2c6b0475
8de778a3af0614be170eb40a1250b0f4ea066b93
refs/heads/master
2022-07-05T01:55:51.784161
2022-05-25T12:43:18
2022-05-25T12:43:18
66,732,625
2
1
null
null
null
null
UTF-8
Scheme
false
false
17,508
scm
sctp-misc-tests.scm
;;; ;;; Copyright (C) 2010 M. Tuexen [email protected] ;;; ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or ;;; without modification, are permitted provided that the ;;; following conditions are met: ;;; 1. Redistributions of source code must retain the above ;;; copyright notice, this list of conditions and the ;;; following disclaimer. ;;; 2. Redistributions in binary form must reproduce the ;;; above copyright notice, this list of conditions and ;;; the following disclaimer in the documentation and/or ;;; other materials provided with the distribution. ;;; 3. Neither the name of the project nor the names of ;;; its contributors may be used to endorse or promote ;;; products derived from this software without specific ;;; prior written permission. ;;; ;;; THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ;;; ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, ;;; BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ;;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;;; DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS ;;; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ;;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ;;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ;;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER ;;; IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ;;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY ;;; OF SUCH DAMAGE. ;;; $Id: sctp-misc-tests.scm,v 1.5 2014/11/17 19:53:11 tuexen Exp $ (define (sctp-cookie-ack-from-other-address peer-server? peer-addr local-port peer-port) (sctp-cleanup) ;; set up a asscociation first. (if (not peer-server?) (let ((local-tag (choose-local-tag)) (local-tsn (random (expt 2 32)))) (let* ((answer (sctp-receive-chunk init-chunk?)) (init (vector-ref (cadr answer) 0)) (local-port (get-destination-port (car answer))) (peer-port (get-source-port (car answer))) (peer-addr (cadddr answer)) (parameters (get-parameters init)) (peer-tag (get-initiate-tag init)) (header (make-common-header local-port peer-port peer-tag))) (sctp-send header (vector (make-init-ack-chunk local-tag 1500 tester-os tester-mis local-tsn (vector (make-cookie-parameter (vector 1)) (make-ipv4-address-parameter tester-addr-1) (make-ipv4-address-parameter tester-addr-2)))) peer-addr) (sctp-receive-chunk cookie-echo-chunk?) (sctp-send header (vector (make-cookie-ack-chunk)) peer-addr tester-addr-2) (let ((result (sctp-receive 3000))) (if (equal? result (list #f #f #f #f #f)) stt-test-result-passed (let ((chunk (vector-ref (cadr result) 0))) (if (cookie-echo-chunk? chunk) stt-test-result-failed stt-test-result-passed)))))) stt-test-result-not-applicable)) ;;; The SUT needs to be a client. ;;; (sctp-cookie-ack-from-other-address sut-is-server sut-addr tester-port sut-port) (define (sctp-cookie-ack-bundled-with-abort peer-server? peer-addr local-port peer-port) (sctp-cleanup) (if peer-server? (let ((local-tag (choose-local-tag)) (local-tsn (random (expt 2 32)))) (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk local-tag 1500 tester-os tester-mis local-tsn (if (equal? tester-addr-1 tester-addr-2) (vector) (vector (make-ipv4-address-parameter tester-addr-1) (make-ipv4-address-parameter tester-addr-2))))) peer-addr) (let* ((answer (sctp-receive-chunk init-ack-chunk?)) (init-ack (vector-ref (cadr answer) 0)) (parameters (get-parameters init-ack)) (state-cookie (vector-find parameters cookie-parameter?)) (peer-tag (get-initiate-tag init-ack)) (header (make-common-header local-port peer-port peer-tag))) (sctp-send header (vector (make-cookie-echo-chunk (get-cookie-parameter-cookie state-cookie)) (make-abort-chunk #t)) peer-addr) (let ((result (sctp-receive 3000))) (if (equal? result (list #f #f #f #f #f)) stt-test-result-passed stt-test-result-failed)))) stt-test-result-not-applicable)) (define (sctp-init-ack-stream-test peer-server? peer-addr local-port peer-port) (sctp-cleanup) (if (not peer-server?) (let ((local-tag (choose-local-tag)) (local-tsn (random (expt 2 32)))) (let* ((answer (sctp-receive-chunk init-chunk?)) (init (vector-ref (cadr answer) 0)) (local-port (get-destination-port (car answer))) (peer-port (get-source-port (car answer))) (peer-addr (cadddr answer)) (peer-tag (get-initiate-tag init)) (header (make-common-header local-port peer-port peer-tag))) (sctp-send header (vector (make-init-ack-chunk local-tag 1500 (1+ (get-mis init)) (get-mos init) local-tsn (list->vector (cons (make-cookie-parameter (vector 1)) (if (equal? tester-addr-1 tester-addr-2) (list) (list (make-ipv4-address-parameter tester-addr-1) (make-ipv4-address-parameter tester-addr-2))))))) peer-addr))) stt-test-result-not-applicable)) (define (sctp-init-with-set-primary-valid-address peer-server? peer-addr local-port peer-port) (sctp-reset) (if peer-server? (let ((local-tag (choose-local-tag)) (os 1) (mis 65535) (local-tsn (random (expt 2 32)))) (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk local-tag 1500 os mis local-tsn (vector (make-set-primary-address-parameter 1 (make-ipv4-address-parameter tester-addr-1))))) peer-addr) (let ((result (sctp-receive-chunk-with-timeout init-ack-chunk? 1000))) (if (equal? result (list #f #f #f #f #f)) stt-test-result-failed stt-test-result-passed))) stt-test-result-not-applicable)) (define (sctp-init-with-set-primary-invalid-address peer-server? peer-addr local-port peer-port) (sctp-reset) (if peer-server? (let ((local-tag (choose-local-tag)) (os 1) (mis 65535) (local-tsn (random (expt 2 32)))) (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk local-tag 1500 os mis local-tsn (vector (make-set-primary-address-parameter 1 (make-ipv4-address-parameter tester-addr-2))))) peer-addr) (let ((result (sctp-receive-chunk-with-timeout init-ack-chunk? 1000))) (if (equal? result (list #f #f #f #f #f)) stt-test-result-failed stt-test-result-passed))) stt-test-result-not-applicable)) (define (sctp-init-with-set-primary-hostname-address peer-server? peer-addr local-port peer-port) (sctp-reset) (if peer-server? (let ((local-tag (choose-local-tag)) (os 1) (mis 65535) (local-tsn (random (expt 2 32)))) (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk local-tag 1500 os mis local-tsn (vector (make-set-primary-address-parameter 1 (make-hostname-parameter "stt.sctp.org"))))) peer-addr) (let ((result (sctp-receive-chunk-with-timeout init-ack-chunk? 1000))) (if (equal? result (list #f #f #f #f #f)) stt-test-result-failed stt-test-result-passed))) stt-test-result-not-applicable)) (define (sctp-init-ack-with-set-primary-valid-address peer-server? peer-addr local-port peer-port) (sctp-reset) (if (not peer-server?) (let ((local-tag (choose-local-tag)) (os 1) (mis 65535) (local-tsn (random (expt 2 32)))) (let* ((answer (sctp-receive-chunk init-chunk?)) (init (vector-ref (cadr answer) 0)) (local-port (get-destination-port (car answer))) (peer-port (get-source-port (car answer))) (peer-addr (cadddr answer)) (parameters (get-parameters init)) (peer-tag (get-initiate-tag init)) (header (make-common-header local-port peer-port peer-tag))) (sctp-send header (vector (make-init-ack-chunk local-tag 1500 os mis local-tsn (vector (make-set-primary-address-parameter 1 (make-ipv4-address-parameter tester-addr-1)) (make-cookie-parameter (vector 1))))) peer-addr) (let ((result (sctp-receive-chunk-with-timeout cookie-echo-chunk? 1000))) (sctp-send header (vector (make-abort-chunk #f #())) peer-addr) (if (equal? result (list #f #f #f #f #f)) stt-test-result-failed stt-test-result-passed)))) stt-test-result-not-applicable)) (define (sctp-init-ack-with-set-primary-invalid-address peer-server? peer-addr local-port peer-port) (sctp-reset) (if (not peer-server?) (let ((local-tag (choose-local-tag)) (os 1) (mis 65535) (local-tsn (random (expt 2 32)))) (let* ((answer (sctp-receive-chunk init-chunk?)) (init (vector-ref (cadr answer) 0)) (local-port (get-destination-port (car answer))) (peer-port (get-source-port (car answer))) (peer-addr (cadddr answer)) (parameters (get-parameters init)) (peer-tag (get-initiate-tag init)) (header (make-common-header local-port peer-port peer-tag))) (sctp-send header (vector (make-init-ack-chunk local-tag 1500 os mis local-tsn (vector (make-set-primary-address-parameter 1 (make-ipv4-address-parameter tester-addr-2)) (make-cookie-parameter (vector 1))))) peer-addr) (let ((result (sctp-receive-chunk-with-timeout cookie-echo-chunk? 1000))) (sctp-send header (vector (make-abort-chunk #f #())) peer-addr) (if (equal? result (list #f #f #f #f #f)) stt-test-result-failed stt-test-result-passed)))) stt-test-result-not-applicable)) (define (sctp-init-ack-with-set-primary-hostname-address peer-server? peer-addr local-port peer-port) (sctp-reset) (if (not peer-server?) (let ((local-tag (choose-local-tag)) (os 1) (mis 65535) (local-tsn (random (expt 2 32)))) (let* ((answer (sctp-receive-chunk init-chunk?)) (init (vector-ref (cadr answer) 0)) (local-port (get-destination-port (car answer))) (peer-port (get-source-port (car answer))) (peer-addr (cadddr answer)) (parameters (get-parameters init)) (peer-tag (get-initiate-tag init)) (header (make-common-header local-port peer-port peer-tag))) (sctp-send header (vector (make-init-ack-chunk local-tag 1500 os mis local-tsn (vector (make-set-primary-address-parameter 1 (make-hostname-parameter "stt.sctp.org")) (make-cookie-parameter (vector 1))))) peer-addr) (let ((result (sctp-receive-chunk-with-timeout cookie-echo-chunk? 1000))) (sctp-send header (vector (make-abort-chunk #f #())) peer-addr) (if (equal? result (list #f #f #f #f #f)) stt-test-result-failed stt-test-result-passed)))) stt-test-result-not-applicable)) (define (sctp-malformed-stream-reset-request peer-server? peer-addr local-port peer-port) (sctp-cleanup) (if peer-server? (let ((local-tag (choose-local-tag)) (local-tsn #x01020304)) (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk local-tag 1500 tester-os tester-mis local-tsn (vector (make-supported-extensions-parameter (vector 130))))) peer-addr) (let* ((answer (sctp-receive-chunk init-ack-chunk?)) (init-ack (vector-ref (cadr answer) 0)) (parameters (get-parameters init-ack)) (state-cookie (vector-find parameters cookie-parameter?)) (peer-tag (get-initiate-tag init-ack)) (header (make-common-header local-port peer-port peer-tag))) (sctp-send header (vector (make-cookie-echo-chunk (get-cookie-parameter-cookie state-cookie))) peer-addr) (sctp-receive-chunk cookie-ack-chunk?) (sctp-send header (vector (make-chunk #x82 0 (vector #x00 #x0d #x01 #x00 #x01 #x02 #x03 #x04))) peer-addr) (sctp-send header (vector heartbeat-chunk) peer-addr) (let ((result (sctp-receive 1000))) (sctp-send header (vector (make-abort-chunk #f)) peer-addr) (if (equal? result (list #f #f #f #f #f)) stt-test-result-failed (let ((chunk (vector-ref (cadr result) 0))) (if (or (abort-chunk? chunk) (heartbeat-ack-chunk? chunk)) stt-test-result-passed stt-test-result-failed)))))) stt-test-result-not-applicable)) (define (sctp-cookie-with-wrong-address peer-server? peer-addr local-port peer-port) (sctp-cleanup) (if peer-server? (let ((local-tag (choose-local-tag)) (local-tsn #x01020304)) (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk local-tag 1500 tester-os tester-mis local-tsn (vector (make-supported-extensions-parameter (vector 130))))) peer-addr tester-addr-1) (let* ((answer (sctp-receive-chunk init-ack-chunk?)) (init-ack (vector-ref (cadr answer) 0)) (parameters (get-parameters init-ack)) (state-cookie (vector-find parameters cookie-parameter?)) (peer-tag (get-initiate-tag init-ack)) (header (make-common-header local-port peer-port peer-tag))) (sctp-send header (vector (make-cookie-echo-chunk (get-cookie-parameter-cookie state-cookie)) (make-data-chunk local-tsn 0 0 test-ppid test-message)) peer-addr tester-addr-2) (sctp-receive-chunk cookie-ack-chunk?) stt-test-result-passed)) stt-test-result-not-applicable)) (define (sctp-init-with-zero-initiate-tag peer-server? peer-addr local-port peer-port) (sctp-cleanup) ;; set up a asscociation first. (let* ((tcb (if peer-server? (associate-from-port peer-addr local-port peer-port tester-os tester-mis) (accept-association tester-os tester-mis))) (peer-addr (get-peer-addr tcb)) (header (get-header tcb))) ;; Send INIT chunk with initiate tag 0 (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk 0 1500 tester-os tester-mis 0 (vector))) peer-addr) (let ((result (sctp-receive 1000))) (sctp-send header (vector (make-abort-chunk #f)) peer-addr) (if (equal? result (list #f #f #f #f #f)) stt-test-result-passed (let ((chunk (vector-ref (cadr result) 0))) (if (abort-chunk? chunk) stt-test-result-failed stt-test-result-passed)))))) (define (sctp-init-with-zero-a-rwnd peer-server? peer-addr local-port peer-port) (sctp-cleanup) ;; set up a asscociation first. (let* ((tcb (if peer-server? (associate-from-port peer-addr local-port peer-port tester-os tester-mis) (accept-association tester-os tester-mis))) (peer-addr (get-peer-addr tcb)) (header (get-header tcb))) ;; Send INIT chunk with initiate tag 0 (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk 1 0 tester-os tester-mis 0 (vector))) peer-addr) (let ((result (sctp-receive 1000))) (sctp-send header (vector (make-abort-chunk #f)) peer-addr) (if (equal? result (list #f #f #f #f #f)) stt-test-result-passed (let ((chunk (vector-ref (cadr result) 0))) (if (and (abort-chunk? chunk) (= 1 (get-verification-tag (car result)))) stt-test-result-passed stt-test-result-failed)))))) (define (sctp-init-with-zero-os peer-server? peer-addr local-port peer-port) (sctp-cleanup) ;; set up a asscociation first. (let* ((tcb (if peer-server? (associate-from-port peer-addr local-port peer-port tester-os tester-mis) (accept-association tester-os tester-mis))) (peer-addr (get-peer-addr tcb)) (header (get-header tcb))) ;; Send INIT chunk with initiate tag 0 (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk 1 1500 0 tester-mis 0 (vector))) peer-addr) (let ((result (sctp-receive 1000))) (sctp-send header (vector (make-abort-chunk #f)) peer-addr) (if (equal? result (list #f #f #f #f #f)) stt-test-result-passed (let ((chunk (vector-ref (cadr result) 0))) (if (and (abort-chunk? chunk) (= 1 (get-verification-tag (car result)))) stt-test-result-passed stt-test-result-failed)))))) (define (sctp-init-with-zero-mis peer-server? peer-addr local-port peer-port) (sctp-cleanup) ;; set up a asscociation first. (let* ((tcb (if peer-server? (associate-from-port peer-addr local-port peer-port tester-os tester-mis) (accept-association tester-os tester-mis))) (peer-addr (get-peer-addr tcb)) (header (get-header tcb))) ;; Send INIT chunk with initiate tag 0 (sctp-send (make-common-header local-port peer-port 0) (vector (make-init-chunk 1 1500 tester-os 0 0 (vector))) peer-addr) (let ((result (sctp-receive 1000))) (sctp-send header (vector (make-abort-chunk #f)) peer-addr) (if (equal? result (list #f #f #f #f #f)) stt-test-result-passed (let ((chunk (vector-ref (cadr result) 0))) (if (and (abort-chunk? chunk) (= 1 (get-verification-tag (car result)))) stt-test-result-passed stt-test-result-failed))))))
false
285bb041ddf5d99394f3499e1afc8f7bf46a763d
2e4afc99b01124a1d69fa4f44126ef274f596777
/apng/resources/dracula/lang/conditionals.ss
3b8b28c01ea97f29a2d0b8a2248389a7565c3abe
[]
no_license
directrix1/se2
8fb8204707098404179c9e024384053e82674ab8
931e2e55dbcc55089d9728eb4194ebc29b44991f
refs/heads/master
2020-06-04T03:10:30.843691
2011-05-05T03:32:54
2011-05-05T03:32:54
1,293,430
0
0
null
null
null
null
UTF-8
Scheme
false
false
2,370
ss
conditionals.ss
#| Implement some of the boolean & conditional forms. if and cond are currently in (file "acl2-prims-scheme.ss"). |# #lang scheme (require (file "constants.ss") (file "nil-macros.ss") "../private/planet.ss") (require (for-syntax (cce text))) (provide (rename-out [acl2-and and] [acl2-or or] [acl2-if if] [acl2-cond cond] [acl2-case case])) (define (false->nil x) (if x x nil)) (define-syntax (acl2-and stx) (syntax-case stx () [(_) #'t] [(_ expr) #'(false->nil expr)] [(_ expr . exprs) #'(let ([temp expr]) (acl2-if temp (acl2-and . exprs) nil))])) (define-syntax (acl2-or stx) (syntax-case stx () [(_) #'nil] [(_ expr) #'(false->nil expr)] [(_ expr . exprs) #'(let ([temp expr]) (acl2-if temp temp (acl2-or . exprs)))])) (define (void->nil x) (if (void? x) nil x)) ;; ACL2 allows a question to be a datum or a list of data, but ;; Scheme only allows the latter. (define-for-syntax (xform-question q) (syntax-case* q (t otherwise) text=? [(_ ...) q] [t (datum->syntax (quote-syntax here) 'else)] [otherwise (datum->syntax (quote-syntax here) 'else)] [x #`(#,q)])) (define-for-syntax (transform-clause cl) (syntax-case cl (t) [(t body) #'(#t body)] [(q a) #'((not-nil q) a)])) (define-syntax (acl2-cond stx) (syntax-case stx (acl2:not t) [(_ [(acl2:not x) body] . others) #'(acl2-if x (acl2-cond . others) body)] [(_) #'nil] [(_ (question answer) . others) #'(acl2-if question answer (acl2-cond . others))])) (define-syntax (acl2-if stx) (syntax-case stx (acl2:not) [(_ (acl2:not x) y z) #'(acl2-if x z y)] [(_ test conseq) (raise-syntax-error #f "missing an alternative expression: if requires a test, a consequent, and an alternative." stx)] [(_ test conseq alt) #'(if (nil? test) alt conseq)])) (define-syntax (acl2-case stx) (syntax-case stx () [(_ expr (question answer) ...) (with-syntax ([(new-question ...) (map xform-question (syntax->list #'(question ...)))]) #'(void->nil (case expr (new-question answer) ...)))]))
true
cbd22a8b548cbe22ba2e4026be9242ef7b0b3091
4b2aeafb5610b008009b9f4037d42c6e98f8ea73
/16/change.scm
e42a27bb668841eb50ceca0d5056833db0872b23
[]
no_license
mrinalabrol/clrs
cd461d1a04e6278291f6555273d709f48e48de9c
f85a8f0036f0946c9e64dde3259a19acc62b74a1
refs/heads/master
2021-01-17T23:47:45.261326
2010-09-29T00:43:32
2010-09-29T00:43:32
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
3,253
scm
change.scm
(define (greedy-change denominations n) (let ((denominations (sort denominations >)) (iter (rec (iter change denominations n) (if (null? denominations) change (let* ((denomination (car denominations)) (coins (exact-floor (/ n denomination)))) (iter (cons (cons denomination coins) change) (cdr denominations) (modulo n denomination))))))) (iter '() denominations n))) (define (power-change c n) (let ((iter-k (rec (iter-k k) (let ((e (expt c k))) (if (> e n) (- k 1) (iter-k (+ k 1))))))) (let* ((k (iter-k 0)) (denominations (unfold-right (lambda (x) (> x k)) (lambda (x) (expt c x)) (lambda (x) (+ x 1)) 0))) (greedy-change denominations n)))) (define (dynamic-change denominations n) (let ((d (length denominations))) (let ((s (make-array '#(#f) `(0 ,d) `(0 ,(+ n 1)))) (r (make-array '#(#f) `(0 ,d) `(0 ,(+ n 1))))) (let ((iter-s (rec (iter-s i j) (let ((lookup (if (negative? j) #f (array-ref s i j)))) (if lookup lookup (let ((denomination (list-ref denominations i))) (cond ((zero? j) (array-set! s 0 i j)) ((positive? j) (array-set! s +inf i j) (loop ((for k (up-from 0 (to (+ i 1))))) (let ((q (+ (iter-s k (- j denomination)) 1))) (if (< q (array-ref s i j)) (begin (array-set! s q i j) (array-set! r k i j))))))))) (if (negative? j) +inf (array-ref s i j)))))) (loop ((for k (up-from 0 (to d)))) (iter-s k n)) (values s r))))) (define (make-change denominations s r) (let ((d-n (array-dimensions s))) (let ((d (car d-n)) (n (cadr d-n))) (let* ((final-tallies (make-shared-array s (lambda (i) (list i (- n 1))) d)) (min-tally (inexact->exact (array-fold min +inf final-tallies))) (min-index (list-index (lambda (x) (= x min-tally)) (array->list final-tallies)))) (let ((iter (rec (iter change coins d n) (if (zero? coins) change (let ((next-coin (array-ref r d n)) (denomination (list-ref denominations d))) (iter (cons denomination change) (- coins 1) next-coin (- n denomination))))))) (iter '() min-tally min-index (- n 1)))))))
false
5a568a4cc216cacc678017c2b892e2b24c71dac9
06d73af66d0c8450e2c9cb20757774c61c813ee6
/applicative-order-evaluator.scm
e2f2eb945366794491ecac188105af9693a7e1bb
[]
no_license
logicshan/lc-with-redex
ce5dc164abc6550bb431b2a7fa20c98f5c024037
63aa4cbf1f0acf0553c545686ba00a1699f003f8
refs/heads/master
2020-12-29T01:42:06.026750
2014-04-29T05:23:37
2014-04-29T05:23:37
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
5,854
scm
applicative-order-evaluator.scm
#lang scheme (require (only-in redex test-equal test-results)) ; Simple normal order evaluator for lambda terms. ; T ::= V ; lambda term: variable reference ; T ::= (λ (V ...) T) ; lambda term: abstraction ; T ::= (T T ...) ; lambda term: application ; V ::= identifier, but not λ ; variable ; E ::= (B ...) ; environment ; B ::= ((V any) ...) ; binding (define (eval T) (eval-aux (curry T) '())) ; Procedure curry: ; (curry V) --> V ; (λ () T) --> T ; (T) --> T ; (λ (V_1 V ...) T) --> (λ (V_1) (curry (λ (V ...) T))) ; (T_1 T_2 T ...) --> (curry ((T_1 T_2) T ...)) (define (curry T) (define (var? x) (and (symbol? x) (not (eq? x 'λ)))) (define (appl? x) (and (pair? x) (list? x))) (define (abstr? x) (and (list? x) (= (length x) 3) (eq? (car x) 'λ) (var? (caadr x)))) (define (curry-abstr T) (let ((body (curry (caddr T)))) (let curry-abstr ((vars (cadr T))) (if (null? vars) body `(λ (,(car vars)) ,(curry-abstr (cdr vars))))))) (define (curry-appl T) (let ((T (map curry T))) (let curry-appl ((op (car T)) (args (cdr T))) (if (null? args) op (curry-appl (list op (car args)) (cdr args)))))) (cond ((var? T) T) ((abstr? T) (curry-abstr T)) ((appl? T) (curry-appl T)) (else (error 'curry "incorrect subterm: ~s" T)))) ; Evaluator expecting a checked and curried lambda term. (define (eval-aux T E) (if (symbol? T) (lookup T E) (if (= (length T) 3) (let ((body (caddr T)) (var (caadr T))) (λ (arg) (eval-aux body (extend-env var arg E)))) (let ((op (eval-aux (car T) E)) (arg (eval-aux (cadr T) E))) (if (procedure? op) (op arg) (error 'eval "op of appl must be a proc, found: ~s applied to arg: ~s" op arg)))))) (define (extend-env var arg E) (cons (cons var arg) E)) (define (lookup var E) (let ((B (assq var E))) (if B (cdr B) var))) ; Tests with Church numerals. (define (number->Church n) (define (expt-proc f n) (if (zero? n) 'x `(,f ,(expt-proc f (sub1 n))))) `(λ (f) (λ (x) ,(expt-proc 'f n)))) (define (Church->number Church) ((Church add1) 0)) (define (test T expect) (test-equal (Church->number (eval T)) expect)) (define (test-bool T expect) (test-equal (((eval T) #t) #f) expect)) (define (test-true T) (test-bool T #t)) (define (test-false T) (test-bool T #f)) (define (test-error T expect) (test-equal (with-handlers ((exn:fail? exn-message)) (eval T) #f) expect)) (let ((true '(λ (x y) x)) (false '(λ (x y) y))) (let ((C-add1 '(λ (n f x) (f (n f x)))) (C-sub1 '(λ (n f x) (n (λ (g h) (h (g f))) (λ (u )x) (λ (u) u)))) (C-plus '(λ (m n f x) (m f (n f x)))) (C-mult '(λ (m n f) (n (m f)))) (C-expt '(λ (m n) (n m))) (C-zero? `(λ (n) (n (λ (x) ,false) ,true))) (Y '(λ (m) ((λ (f) (m (λ (x) (f f x)))) (λ (f) (m (λ (x) (f f x)))))))) (let ((C-minus `(λ (m n) (n ,C-sub1 m))) (C-eq? `(,Y ; for recursion (λ (eq n m) ; write (if test a b) as ((test (λ (x) a) (λ (x) b)) ignore) ; in order to delay the evaluation of the alternatives a and b. ; (λ (n m) ; (if (C-zero? n) (C-zero? m) ; (if C-zero? m) false ; (eq (C-sub1 n) (C-sub1 m))))) becomes: (((,C-zero? n) (λ (x) (,C-zero? m)) (λ (x) (((,C-zero? m) (λ (x) ,false) (λ (x) (eq (,C-sub1 n) (,C-sub1 m)))) ignore))) ignore))))) (let ((first-ten-Churches (build-list 10 number->Church))) (let-values (((C0 C1 C2 C3 C4 C5 C6 C7 C8 C9) (apply values first-ten-Churches))) (test-equal first-ten-Churches '((λ (f) (λ (x) x)) (λ (f) (λ (x) (f x))) (λ (f) (λ (x) (f (f x)))) (λ (f) (λ (x) (f (f (f x))))) (λ (f) (λ (x) (f (f (f (f x)))))) (λ (f) (λ (x) (f (f (f (f (f x))))))) (λ (f) (λ (x) (f (f (f (f (f (f x)))))))) (λ (f) (λ (x) (f (f (f (f (f (f (f x))))))))) (λ (f) (λ (x) (f (f (f (f (f (f (f (f x)))))))))) (λ (f) (λ (x) (f (f (f (f (f (f (f (f (f x))))))))))))) (test C0 0) (test C1 1) (test C2 2) (test C3 3) (test C4 4) (test C5 5) (test C6 6) (test C7 7) (test C8 8) (test C9 9) (test `(,C-add1 ,C7 ) 8) (test `(,C-sub1 ,C7 ) 6) (test `(,C-sub1 ,C0 ) 0) (test `(,C-plus ,C5 ,C7) 12) (test `(,C-mult ,C5 ,C7) 35) (test `(,C-minus ,C5 ,C5) 0) (test `(,C-minus ,C7 ,C5) 2) (test `(,C-expt ,C7 ,C3) 343) (test `(,C-expt ,C5 ,C4) 625) (test `(,C-expt ,C5 (,C-expt ,C2 ,C2)) 625) (test-false `(,C-eq? ,C7 ,C5)) (test-false `(,C-eq? ,C5 ,C7)) (test-true `(,C-eq? ,C0 ,C0)) (test-true `(,C-eq? ,C1 ,C1)) (test-true `(,C-eq? ,C7 ,C7)) (test-true `(,C-zero? (,C-minus ,C5 ,C5))) (test-true `(,C-zero? (,C-minus ,C5 ,C8))) (test-false `(,C-zero? (,C-minus ,C5 ,C4))) (test-error '(a b) "eval: op of appl must be a proc, found: a applied to arg: b") (test-error 1 "curry: incorrect subterm: 1") (test-error 'λ "curry: incorrect subterm: λ") (test-error '(λ (a) λ) "curry: incorrect subterm: λ") (test-error '(λ (a) λ) "curry: incorrect subterm: λ") (test-error '(λ (λ) a) "curry: incorrect subterm: λ") (test-error '(a . b) "curry: incorrect subterm: (a . b)") ))))) (test-results)
false
5c2826371d1dddad9bbe8e91bb566ae737ff0c73
080465977523100c18e7e8a052e67cc44d6bd176
/.site/src/niconico.scm
8440a998be306ee7cf23e5ff5f0f007f311a4abe
[]
no_license
mytoh/dotfiles
af4c40c090c17b20ccad1c02eb3b0a632fc0803a
4756f8976c9f8aa21b450759d65a460e56d6591b
refs/heads/master
2020-04-06T07:04:30.243973
2018-07-02T22:32:53
2018-07-02T22:32:53
909,274
3
0
null
null
null
null
UTF-8
Scheme
false
false
2,108
scm
niconico.scm
(use gauche.threads) (use text.html-lite) (use srfi-1) (use www.cgi) (use makiki) (use sxml.tools) (use sxml.sxpath) (use sxml.ssax) (use text.tree) (use file.util) (use rfc.uri) (require-extension (srfi 13)) (use kirjasto.verkko) ;define-page-handler ;; niconico (define nico-page (lambda (req) (html5 `( (title "nico") (link (@ (rel "stylesheet") (href "css/nico.css") (type "text/css"))) ,(div-loader) (div (@ (id "wrapper")) (header (h1 "niconico playlist") (br)) (nav ,(nico-page-navigation)) (article ,(nico-page-content-videos))))))) (define nico-get-video-info (lambda (video-number) (ssax:xml->sxml (open-input-string (open (uri-merge "http://ext.nicovideo.jp/api/getthumbinfo/" video-number))) '()))) (define nico-page-navigation (lambda () `((ul (li (a (@ (href "#content")) "video")) (li (a (@ (href "#")) "playlist")))))) (define nico-page-content-videos (lambda () (map (lambda (m) (let* ((video-number (symbol->string m)) (video-info (nico-get-video-info video-number)) (title (cadr ((car-sxpath "//title") video-info))) (thumbnail-url (cadr ((car-sxpath "//thumbnail_url") video-info))) (watch-url (cadr ((car-sxpath "//watch_url") video-info))) ) `((div (@ (class "video")) (a (@ (href ,watch-url) (target "_blank")) (img (@ (class "video-img") (alt "") (src ,thumbnail-url) (height "50px") (width "50px")))) (a (@ (class "video-title") (href ,watch-url) (target "_blank")) ,title))))) (file->list read (build-path document-root "nico/videos"))))) (define-page #/^\/niconico/ nico-page)
false
f2ed3ccfd7e5d94f4759efba4c7305d4bca9ef81
4f22045cb28e1444f81be3272301aa23c4d83238
/04/parser.scm
a5dfbd1dab54752136754906dffd834b28f9fc58
[]
no_license
h8gi/TAPL
f28a9481d7cbc57f139f58d4436db35b8b4337ef
80259c4c4f5a0255421bce41b083aadd817d8c08
refs/heads/master
2021-01-12T02:31:04.575533
2017-01-10T02:11:26
2017-01-10T02:11:26
78,054,401
0
0
null
null
null
null
UTF-8
Scheme
false
false
1,036
scm
parser.scm
(use prcc matchable) (define parser (<@> (<and> (<*> (<s+>)) (<*_> term)) second)) (define term (<or> (lazy const) (lazy succ) (lazy pred) (lazy iszero) (lazy ifs))) (define (<sym> str) (<@> (<s> str) string->symbol)) (define bool (<or> (<sym> "true") (<sym> "false"))) (define zero (<@> (<s> "0") (constantly 'zero))) (define const (<or> bool zero)) (define (<app> str) (<@> (<and_> (<sym> str) (<c> #\() term (<c> #\))) (match-lambda [(name leftp val rightp) [] (list name val)]))) (define succ (<app> "succ")) (define pred (<@> (<app> "pred") (match-lambda ['(pred zero) 'zero] [`(pred (succ ,nv)) nv]))) (define iszero (<@> (<app> "iszero") (match-lambda ['(iszero zero) 'true] [`(iszero (succ ,nv1)) 'false]))) (define ifs (<@> (<and_> (<sym> "if") term (<sym> "then") term (<sym> "else") term) (match-lambda [`(if true then ,t2 else ,t3) t2] [`(if false then ,t2 else ,t3) t3])))
false
938a379817d2f842e8a001490ead43ec37f813b1
689df92d22fb0cf7e1e2bd7894ba208d5e26f36a
/tools/sten.scm
df1ecd216472ff196a305df209ee90c4952aac51
[]
no_license
khaki3/ddcpu
6456cbb5dcc5430873c3092be2b2e70c24d30711
edf970dca49509b59c6ba9477e65e128278f9614
refs/heads/master
2023-07-14T12:24:50.956350
2016-02-04T17:20:09
2016-02-04T17:20:09
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
704
scm
sten.scm
;;; ;;; Scheme template engine ;;; (use file.util) (define (sten-eval string) (with-output-to-string (^[] (eval (read-from-string (string-append "(begin " string ")")) (current-module))))) (define (sten string) (regexp-replace-all #/<SCM>(.*?)<\/SCM>/ string (^[x] (sten-eval (x 1))))) (define (save file string) (with-output-to-file file (^[] (display string)))) (define (usage) (display "Usage: sten [input] [output]\n" (current-error-port))) (define (main args) (unless (= (length args) 3) (usage) (sys-exit -1)) (let ([in (~ args 1)] [out (~ args 2)]) (save out (sten (file->string in)))) (sys-exit 0))
false
31b4e3ebcf726f882ed746330f5c5a0e0fad79fb
b43e36967e36167adcb4cc94f2f8adfb7281dbf1
/sicp/ch4/code/scheme-driver.scm
92c993dffd688b1ef0d8f4955de373d25c04c858
[]
no_license
ktosiu/snippets
79c58416117fa646ae06a8fd590193c9dd89f414
08e0655361695ed90e1b901d75f184c52bb72f35
refs/heads/master
2021-01-17T08:13:34.067768
2016-01-29T15:42:14
2016-01-29T15:42:14
53,054,819
1
0
null
2016-03-03T14:06:53
2016-03-03T14:06:53
null
UTF-8
Scheme
false
false
876
scm
scheme-driver.scm
;(load "./interpreter.scm") (load "interpreter-global-environment.scm") (load "interpreter-analyze.scm") ;; Driver loops goes here (define input-prompt ";;; Meta-Eval input:") (define output-prompt ";;; Meta-Eval value:") (define (prompt-for-input string) (newline) (newline) (display string) (newline)) (define (announce-output string) (newline) (display string) (newline)) (define (user-print object) (if (compound-procedure? object) (display (list 'compound-procedure (procedure-parameters object) (procedure-body object) '<procedure-env>)) (display object))) (define (driver-loop) (prompt-for-input input-prompt) (let ((input (read))) (let ((output (eval input the-global-environment))) (announce-output output-prompt) (user-print output))) (driver-loop)) (driver-loop)
false
9eb918156f9e8fea601eaf143b8b18422bdae787
d3e9eecbf7fa7e015ab8b9c357882763bf6d6556
/practices/assignments/07.picture-language/hend.scm
de0839fca04f729ea69ede27674d0eebaed45a8a
[]
no_license
yangchenyun/learning-sicp
37d43f18836055274f78755ff93eb20fba63d383
99a19a06eddc282e0eb364536e297f27c32a9145
refs/heads/master
2021-01-19T02:15:15.634140
2017-02-13T22:26:58
2017-02-13T22:26:58
5,344,488
17
3
null
null
null
null
UTF-8
Scheme
false
false
3,910
scm
hend.scm
;;;; HEND.SCM ;;;; This is the code for the square-limit language ;;;; Representing frames (define (make-frame origin edge1 edge2) (list 'frame origin edge1 edge2)) (define frame-origin cadr) (define frame-edge1 caddr) (define frame-edge2 cadddr) ;;;; Primitive painters ;;;The following procedures create primitive painters. ;;;They are defined in the file primitive-painters, which is compiled ;;;so that things will run fast. You need not deal with the ;;;implementation of these procedures, just use them as black boxes. ;;;construct a painter from a number ;;;(define (number->painter num) ....) ;;;construct a painter from a procedure ;;;(define (procedure->painter proc) ....) ;;;construct a painter from a list of segments ;;;(define (segments->painter segments) ....) ;;;construct a painter from a Scheme picture ;;;(define (picture->painter picture) ....) ;;;The following procedure loads a painter from a image file in the ;;;6001-image directory (define (load-painter file-name) (picture->painter (pgm-file->picture (string-append "~u6001/6001-images/" file-name ".pgm")))) ;;; Some simple painters (define black (number->painter 0)) (define white (number->painter 255)) (define gray (number->painter 150)) (define diagonal-shading (procedure->painter (lambda (x y) (* 100 (+ x y))))) (define mark-of-zorro (let ((v1 (make-vect .1 .9)) (v2 (make-vect .8 .9)) (v3 (make-vect .1 .2)) (v4 (make-vect .9 .3))) (segments->painter (list (make-segment v1 v2) (make-segment v2 v3) (make-segment v3 v4))))) (define fovnder (load-painter "fovnder")) ;;;; Painting images on the screen (define (paint window painter) (if (not (graphics-device? window)) (error "bad window" window)) (set-painter-resolution! 128) (painter (screen-frame)) (picture-display window *the-screen* 0 256)) (define (paint-hi-res window painter) (if (not (graphics-device? window)) (error "bad window" window)) (set-painter-resolution! 256) (painter (screen-frame)) (picture-display window *the-screen* 0 256)) (define (frame-coord-map frame) (lambda (point-in-frame-coords) (vector-add (frame-origin frame) (vector-add (vector-scale (vector-xcor point-in-frame-coords) (frame-edge1 frame)) (vector-scale (vector-ycor point-in-frame-coords) (frame-edge2 frame)))))) (define (make-relative-frame origin corner1 corner2) (lambda (frame) (let ((m (frame-coord-map frame))) (let ((new-origin (m origin))) (make-frame new-origin (vector-sub (m corner1) new-origin) (vector-sub (m corner2) new-origin)))))) (define (transform-painter origin corner1 corner2) (lambda (painter) (compose painter (make-relative-frame origin corner1 corner2)))) ;;;; Basic means of combination for painters (define flip-horiz (transform-painter (make-vect 1 0) (make-vect 0 0) (make-vect 1 1))) (define rotate90 (transform-painter (make-vect 1 0) (make-vect 1 1) (make-vect 0 0))) (define (beside painter1 painter2) (let ((split-point (make-vect .5 0))) (superpose ((transform-painter zero-vector split-point (make-vect 0 1)) painter1) ((transform-painter split-point (make-vect 1 0) (make-vect .5 1)) painter2)))) (define rotate180 (repeated rotate90 2)) (define rotate270 (repeated rotate90 3)) (define (below painter1 painter2) (rotate270 (beside (rotate90 painter2) (rotate90 painter1)))) (define (superpose painter1 painter2) (lambda (frame) (painter1 frame) (painter2 frame))) ;;; More complex means of combination (define (right-split painter n) (if (= n 0) painter (let ((smaller (right-split painter (- n 1)))) (beside painter (below smaller smaller)))))
false
a81d7e72d70354e348e1162f654ee53768e0e02c
defeada37d39bca09ef76f66f38683754c0a6aa0
/System/system/net/mail/smtp-permission.sls
59a221d04540eb111f040cd7ef3cae2560164595
[]
no_license
futsuki/ironscheme-port
2dbac82c0bda4f4ff509208f7f00a5211d1f7cd5
4e7a81b0fbeac9a47440464988e53fb118286c54
refs/heads/master
2016-09-06T17:13:11.462593
2015-09-26T18:20:40
2015-09-26T18:20:40
42,757,369
0
0
null
null
null
null
UTF-8
Scheme
false
false
1,772
sls
smtp-permission.sls
(library (system net mail smtp-permission) (export new is? smtp-permission? union from-xml is-subset-of? to-xml add-permission is-unrestricted? copy intersect access) (import (ironscheme-clr-port)) (define-syntax new (lambda (e) (syntax-case e () ((_ a ...) #'(clr-new System.Net.Mail.SmtpPermission a ...))))) (define (is? a) (clr-is System.Net.Mail.SmtpPermission a)) (define (smtp-permission? a) (clr-is System.Net.Mail.SmtpPermission a)) (define-method-port union System.Net.Mail.SmtpPermission Union (System.Security.IPermission System.Security.IPermission)) (define-method-port from-xml System.Net.Mail.SmtpPermission FromXml (System.Void System.Security.SecurityElement)) (define-method-port is-subset-of? System.Net.Mail.SmtpPermission IsSubsetOf (System.Boolean System.Security.IPermission)) (define-method-port to-xml System.Net.Mail.SmtpPermission ToXml (System.Security.SecurityElement)) (define-method-port add-permission System.Net.Mail.SmtpPermission AddPermission (System.Void System.Net.Mail.SmtpAccess)) (define-method-port is-unrestricted? System.Net.Mail.SmtpPermission IsUnrestricted (System.Boolean)) (define-method-port copy System.Net.Mail.SmtpPermission Copy (System.Security.IPermission)) (define-method-port intersect System.Net.Mail.SmtpPermission Intersect (System.Security.IPermission System.Security.IPermission)) (define-field-port access #f #f (property:) System.Net.Mail.SmtpPermission Access System.Net.Mail.SmtpAccess))
true
88cd79ed382244241d23689c38e9404ddc9cb858
5a68949704e96b638ca3afe335edcfb65790ca20
/brown-scheme/repl.scm
b96af389c690c4d195f22bf7eb9c4c0edcef8898
[]
no_license
terryc321/lisp
2194f011f577d6b941a0f59d3c9152d24db167b2
36ca95c957eb598facc5fb4f94a79ff63757c9e5
refs/heads/master
2021-01-19T04:43:29.122838
2017-05-24T11:53:06
2017-05-24T11:53:06
84,439,281
2
0
null
null
null
null
UTF-8
Scheme
false
false
10,467
scm
repl.scm
;; repl.scm ;; attempt understand meta circular interpreter with debugging support , maybe reflective procedures ;; each meta circular level gets its own environment , initialized to the global environment ;; everything is going through meta-apply ;; ;; Eval functions ;; (define (base-eval exp env cont) (cond ((number? exp) (meta-apply cont exp)) ((boolean? exp) (meta-apply cont exp)) ((string? exp) (meta-apply cont exp)) ((symbol? exp) (meta-apply 'eval-var exp env cont)) ((eq? (car exp) 'quote) (meta-apply 'eval-quote exp env cont)) ((eq? (car exp) 'if) (meta-apply 'eval-if exp env cont)) ((eq? (car exp) 'cond) (meta-apply 'eval-cond (cdr exp) env cont)) ((eq? (car exp) 'define) (meta-apply 'eval-define exp env cont)) ((eq? (car exp) 'set!) (meta-apply 'eval-set! exp env cont)) ((eq? (car exp) 'lambda) (meta-apply 'eval-lambda exp env cont)) ((eq? (car exp) 'begin) (meta-apply 'eval-begin (cdr exp) env cont)) ((eq? (car exp) 'let) (meta-apply 'eval-let (car (cdr exp)) (cdr (cdr exp)) env cont)) ((eq? (car exp) 'let*) (meta-apply 'eval-let* (car (cdr exp)) (cdr (cdr exp)) env cont)) ((eq? (car exp) 'letrec) (meta-apply 'eval-letrec (car (cdr exp)) (cdr (cdr exp)) env cont)) ((eq? (car exp) 'EM) (meta-apply 'eval-EM exp env cont)) ((eq? (car exp) 'exec-at-metalevel) (meta-apply 'eval-EM exp env cont)) ((eq? (car exp) 'primitive-EM) (meta-apply 'eval-primitive-EM exp env cont)) ((eq? (car exp) 'exit) (meta-apply 'eval-exit exp env cont)) ((eq? (car exp) 'load) (meta-apply 'eval-load exp env cont)) ((eq? (car exp) 'and) (meta-apply 'eval-and (cdr exp) env cont)) ((eq? (car exp) 'or) (meta-apply 'eval-or (cdr exp) env cont)) ((eq? (car exp) 'delay) (meta-apply 'eval-delay exp env cont)) ((eq? (car exp) 'cons-stream) (meta-apply 'eval-cons-stream exp env cont)) (else (meta-apply 'eval-application exp env cont)))) ;; evaluates all arguments , then apply first to rest (define (eval-application exp env cont) (meta-apply 'eval-list exp env (lambda (l) (meta-apply 'base-apply (car l) (cdr l) env cont)))) ;; lookup variable , if found in environment , pass result to continuation ;; otherwise my-error unbound variable (define (eval-var exp env cont) (let ((pair (get exp env))) (if (pair? pair) (meta-apply cont (cdr pair)) (meta-apply 'my-error (list 'eval-var: 'unbound 'variable: exp) env cont)))) ;; pass 1nd argument unevaluated to continuation (define (eval-quote exp env cont) (meta-apply cont (car (cdr exp)))) ;; if the predicate is true , evaluate the then part , otherwise ;; if no ELSE part , pass result #f to continuation ;; otherwise do the ELSE part (define (eval-if exp env cont) (let ((pred-part (car (cdr exp))) (then-part (car (cdr (cdr exp)))) (else-part (cdr (cdr (cdr exp))))) (meta-apply 'base-eval pred-part env (lambda (p) (cond (p (meta-apply 'base-eval then-part env cont)) ((null? else-part) (meta-apply cont #f)) (else (meta-apply 'base-eval (car else-part) env cont))))))) ;; if no clauses pass it the empty list ;; if ELSE clause then treat clauses as sequence using eval-begin (define (eval-cond clauses env cont) (cond ((null? clauses) (meta-apply cont '())) ((eq? (car (car clauses)) 'else) (meta-apply 'eval-begin (cdr (car clauses)) env cont)) (else (meta-apply 'base-eval (car (car clauses)) env (lambda (pred) (if pred (meta-apply 'eval-begin (cdr (car clauses)) env cont) (meta-apply 'eval-cond (cdr clauses) env cont))))))) ;; make some definitions ;; (define (f x) ... ) ;; car (cdr exp ) = (f x) ;; car (car (cdr exp))) = f ;; ;; (define (f x) ...) = (define f (lambda (x ...) ...) ;; evaluate the lambda expression , set that to be named ;; pass the continuation the name of the variable ;; ie => f (define (eval-define exp env cont) (if (pair? (car (cdr exp))) (let ((var (car (car (cdr exp)))) (body (cons 'lambda (cons (cdr (car (cdr exp))) (cdr (cdr exp)))))) (meta-apply 'base-eval body env (lambda (data) (define-value var data env) (meta-apply cont var)))) ;; otherwise (let ((var (car (cdr exp))) (body (car (cdr (cdr exp))))) (meta-apply 'base-eval body env (lambda (data) (define-value var data env) (meta-apply cont var)))))) ;; evaluate 2nd expression , set value of 1st expression in environment ;; if not found then call my-error (define (eval-set! exp env cont) (let ((var (car (cdr exp))) (body (car (cdr (cdr exp))))) (meta-apply 'base-eval body env (lambda (data) (let ((pair (get var env))) (if (pair? pair) (begin (set-value! var data env) (meta-apply cont var)) (meta-apply 'my-error (list 'eval-set!: 'unbound 'variable var) env cont))))))) ;; the actual tag (define lambda-tag (cons 'lambda 'tag)) ;; says pulls apart lambda expression , and stores environment and tags it with the ;; lambda tag ;; passes this to the continuation (define (eval-lambda exp env cont) (let ((lambda-body (cdr (cdr exp))) (lambda-params (car (cdr exp)))) (meta-apply cont (list lambda-tag lambda-params lambda-body env)))) ;; basic sequencing ;; if its the last expression then base-eval that , ;; otherwise have continuation evaluate the rest of the sequence (define (eval-begin body env cont) (define (eval-begin-local body) (if (null? (cdr body)) (meta-apply 'base-eval (car body) env cont) (meta-apply 'base-eval (car body) env (lambda (x) (eval-begin-local (cdr body)))))) (if (null? body) (meta-apply 'my-error '(eval-begin: null body) env cont) (eval-begin-local body))) ;; all local extending environment , standard stuff , nothing to see here , moving on. (define (eval-let pairs body env cont) (let ((params (map car pairs)) (args (map (lambda (x) (car (cdr x))) pairs))) (meta-apply 'eval-list args env (lambda (operand) (meta-apply 'eval-begin body (extend env params operand) cont))))) (define (eval-let* pairs body env cont) (if (null? pairs) (meta-apply 'eval-begin body env cont) (meta-apply 'base-eval (car (cdr (car pairs))) env (lambda (arg) (meta-apply 'eval-let* (cdr pairs) body (extend env (list (car (car pairs))) (list arg)) cont))))) (define (eval-letrec pairs body env cont) (define (set-value-list! params operand env) (if (null? params) #f (begin (set-value! (car params) (car operand) env) (set-value-list! (cdr params) (cdr operand) env)))) (let ((params (map car pairs)) (args (map (lambda (x) (car (cdr x))) pairs))) (let ((letrec-env (extend env params params))) (meta-apply 'eval-list args letrec-env (lambda (operand) (set-value-list! params operand letrec-env) (meta-apply 'eval-begin body letrec-env cont)))))) ;; evaluate list items from left to right ;; consing up the result after all rest of the list has been evaluated (define (eval-list exp env cont) (if (null? exp) (meta-apply cont '()) (meta-apply 'base-eval (car exp) env (lambda (val1) (meta-apply 'eval-list (cdr exp) env (lambda (val2) (meta-apply cont (cons val1 val2)))))))) ;; exit allows us to go to a higher metalevel ;; do this by evaluating argument to exit ;; then deliberately call an error , which bump into higher meta-level (define (eval-exit exp env cont) (meta-apply 'base-eval (car (cdr exp)) env (lambda (x) (meta-apply 'my-error x env cont)))) ;; if map - simple map f x , single arguments ;; if scheme-apply - ;; some stuff to do with lazy streams , force delay and sleep. (define (base-apply operator operand env cont) (cond ((procedure? operator) (cond ((eq? operator map) (meta-apply 'eval-map (car operand) (car (cdr operand)) env cont)) ((eq? operator scheme-apply) (meta-apply 'base-apply (car operand) (car (cdr operand)) env cont)) ((eq? operator force) (let ((arg (car operand))) (if (and (pair? arg) (eq? (car arg) delay-tag)) (let ((promise-body (car (cdr arg))) (promise-env (car (cdr (cdr arg)))) (pair (cdr (cdr arg)))) (if (pair? (cdr pair)) (meta-apply cont (car (cdr pair))) (meta-apply 'base-eval promise-body promise-env (lambda (ans) (set-cdr! pair (list ans)) (meta-apply cont ans))))) (meta-apply cont arg)))) ((pair? (member operator primitive-procedures)) (meta-apply cont (scheme-apply operator operand))) (else ;; called when going down a level. (lambda (Mcont) ((scheme-apply operator operand) (cons-stream (list (get-global-env env) cont) Mcont)))))) ;; ((and (pair? operator) (eq? (car operator) lambda-tag)) (let ((lambda-params (car (cdr operator))) (lambda-body (car (cdr (cdr operator)))) (lambda-env (car (cdr (cdr (cdr operator)))))) ;; are the operands and parameters matched up (if (can-receive? lambda-params operand) (meta-apply 'eval-begin lambda-body (extend lambda-env lambda-params operand) cont) (meta-apply 'my-error (list 'base-apply: 'Wrong 'number 'of 'arguments: operand 'to: lambda-params) env cont)))) (else (meta-apply 'my-error (list 'Not 'a 'function: operator) env cont)))) ;; exec-at-metalevel (define (eval-EM exp env cont) (lambda (Mcont) (let ((meta-env (car (head Mcont))) (meta-cont (car (cdr (head Mcont)))) (meta-Mcont (tail Mcont))) ((meta-apply 'base-eval (car (cdr exp)) meta-env (lambda (ans) (lambda (Mcont2) ((meta-apply cont ans) (cons-stream (head Mcont) Mcont2))))) meta-Mcont)))) (define (eval-primitive-EM exp env cont) (meta-apply 'base-eval (car (cdr exp)) env (lambda (body) (meta-apply 'eval-EM (list 'EM body) env cont))))
false
0a18455cab3d06afd84adc0eb25297435f60bee8
6b961ef37ff7018c8449d3fa05c04ffbda56582b
/bbn_cl/mach/runtime/future.scm
ace467ed34cdefe38b05bd4a865e4aa58a59b845
[]
no_license
tinysun212/bbn_cl
7589c5ac901fbec1b8a13f2bd60510b4b8a20263
89d88095fc2a71254e04e57cf499ae86abf98898
refs/heads/master
2021-01-10T02:35:18.357279
2015-05-26T02:44:00
2015-05-26T02:44:00
36,267,589
4
3
null
null
null
null
UTF-8
Scheme
false
false
24,359
scm
future.scm
;;; ******** ;;; ;;; Copyright 1992 by BBN Systems and Technologies, A division of Bolt, ;;; Beranek and Newman Inc. ;;; ;;; Permission to use, copy, modify and distribute this software and its ;;; documentation is hereby granted without fee, provided that the above ;;; copyright notice and this permission appear in all copies and in ;;; supporting documentation, and that the name Bolt, Beranek and Newman ;;; Inc. not be used in advertising or publicity pertaining to distribution ;;; of the software without specific, written prior permission. In ;;; addition, BBN makes no respresentation about the suitability of this ;;; software for any purposes. It is provided "AS IS" without express or ;;; implied warranties including (but not limited to) all implied warranties ;;; of merchantability and fitness. In no event shall BBN be liable for any ;;; special, indirect or consequential damages whatsoever resulting from ;;; loss of use, data or profits, whether in an action of contract, ;;; negligence or other tortuous action, arising out of or in connection ;;; with the use or performance of this software. ;;; ;;; ******** ;;; ;;;; This is -*- SCHEME -*- code (declare (usual-integrations) (integrate-primitive-procedures (weak-car system-pair-car) (weak-cdr system-pair-cdr) (weak-set-car! system-pair-set-car!) (weak-set-cdr! system-pair-set-cdr!) set-fixed-objects-vector! vector-set! get-work within-control-point future-ref future-set!)) ; Some useful macros for dealing with atomicity. Notice that ;;DEFINE-MACRO happens when the text is turned into code (i.e. ;;at syntax time), while ADD-SYNTAX! happens only when the program ;;is actually executed. So both are used when this file uses the ;;macro, but only ADD-SYNTAX! is used for user macros which ;;are not referenced here. (define-macro (add-syntax! name expander) `(SYNTAX-TABLE-DEFINE SYSTEM-GLOBAL-SYNTAX-TABLE ,name ,expander)) ; atomic takes a list of expression and guarantees that they ;;are done without interrupts. (define-macro (atomic . expressions) `(WITHOUT-INTERRUPTS (LAMBDA () . ,expressions))) (add-syntax! 'atomic (macro expressions `(WITHOUT-INTERRUPTS (LAMBDA () . ,expressions)))) ; define-atomic is like the procedural version of DEFINE, except ;;that the body is wrapped in WITHOUT-INTERRUPTS. (define-macro (define-atomic arg-template . body) `(DEFINE ,arg-template (atomic . ,body))) (add-syntax! 'define-atomic (macro (arg-template . body) `(DEFINE ,arg-template (atomic . ,body)))) ; LOCKING-FUTURE is the same as atomic except that it also wraps ;;a LOCK-FUTURE! and UNLOCK-FUTURE! around the expression(s). ;;LOCKED? is a flag which can be used in BODY -- it will be #t ;;if the future is still valid (you hang until you can lock it), ;;or #f if it has been spliced out. (define-macro (LOCKING-FUTURE FUTURE LOCKED? . BODY) `(WITH-FUTURE-LOCKED ,future (LAMBDA (,locked?) . ,body))) (add-syntax! 'LOCKING-FUTURE (macro (FUTURE LOCKED? . BODY) `(WITH-FUTURE-LOCKED ,future (LAMBDA (,locked?) . ,body)))) (define-macro (WITH-STATE STATE . BODY) `(NON-REENTRANT-TASK-CATCH (LAMBDA (,state) . ,body))) (define (with-future-locked future thunk) (with-interrupt-mask INTERRUPT-MASK-GC-OK (lambda (old-mask) (if (lock-future! future) (let ((result (thunk #t))) (unlock-future! future) result) (thunk #f))))) (define %await-future (make-primitive-procedure '%await-future)) (define %reschedule (make-primitive-procedure '%reschedule)) (define %spawn-process (make-primitive-procedure '%spawn-process)) (define %change-priority (make-primitive-procedure '%change-priority)) (define %inherit-priority-up (make-primitive-procedure '%inherit-priority-up)) (define %inherit-priority-down (make-primitive-procedure '%inherit-priority-down)) (define (inherit-priority-up future priority) (if (lock-future! future) (%inherit-priority-up future priority))) (define (inherit-priority-down future priority) (if (lock-future! future) (%inherit-priority-down future priority))) (define (change-priority future priority) (if (lock-future! future) (%change-priority future priority))) (define debug-paused-tasks) (define timer-interrupt) ; We must define this here! (define put-work (make-primitive-procedure 'PUT-WORK)) (define global-interrupt (make-primitive-procedure 'GLOBAL-INTERRUPT)) (define touch (make-primitive-procedure 'TOUCH)) (define set-car-if-eq?! (make-primitive-procedure 'SET-CAR-IF-EQ?!)) (define set-cdr-if-eq?! (make-primitive-procedure 'SET-CDR-IF-EQ?!)) (define vector-set-if-eq?! (make-primitive-procedure 'VECTOR-SET-IF-EQ?!)) (define set-cxr-if-eq?! (make-primitive-procedure 'SET-CXR-IF-EQ?!)) (define future-ref (make-primitive-procedure 'FUTURE-REF)) (define future-set! (make-primitive-procedure 'FUTURE-SET!)) (define future-size (make-primitive-procedure 'FUTURE-SIZE)) (define lock-future! (make-primitive-procedure 'LOCK-FUTURE!)) (define unlock-future! (make-primitive-procedure 'UNLOCK-FUTURE!)) (define non-touching-eq? (make-primitive-procedure 'NON-TOUCHING-EQ?)) (define n-interpreters (make-primitive-procedure 'N-INTERPRETERS)) (define my-processor-number (make-primitive-procedure 'MY-PROCESSOR-NUMBER)) (define my-interpreter-number (make-primitive-procedure 'MY-INTERPRETER-NUMBER)) (define make-future (make-primitive-procedure 'MAKE-CHEAP-FUTURE)) (define spawn-process) (define suspending-execution) (define reschedule-future) ;; Slots in a future ;; MICROCODE KNOWS ABOUT THESE ;; FUTURE-DETERMINED-SLOT is #!TRUE if the value is known and immutable ;; #!FALSE if not yet know, else known but mutable (i.e. KEEP-SLOT) (define FUTURE-DETERMINED-SLOT 0) ;; FUTURE-LOCK-SLOT is #!TRUE if the future is locked by a process (define FUTURE-LOCK-SLOT 1) ;; The next two are mutually exclusive. The VALUE is used if ;; DETERMINED is not #!FALSE. The QUEUE contains a WEAK queue of ;; processes waiting for a value to appear if DETERMINED is #!FALSE. (define FUTURE-VALUE-SLOT 2) (define FUTURE-QUEUE-SLOT 2) ; REFERENCED ONLY BY THE RUNTIME SYSTEM ;; Code to run to re-activate this process (define FUTURE-PROCESS-SLOT 3) ;; The FUTURE-STATUS-SLOT contains one of: ;; RUNNING: Actually in possession of a processor ;; WAITING: Stopped waiting for the value of a future ;; PAUSED: Stopped by PAUSE-EVERYTHING ;; DELAYED: Created by delay scheduler and not yet run ;; RUNNABLE: Available for execution ;; DETERMINED: Value has been set and process is finished ;; CREATED: Future newly created (define FUTURE-STATUS-SLOT 4) ;; For debugging purposes, the original thunk to be executed. (define FUTURE-ORIG-CODE-SLOT 5) (define FUTURE-PROCESS-PRIVATE-SLOT 6) ;; If this process has status WAITING this is a (strong) list of the ;; futures on which it is waiting. (define FUTURE-WAITING-ON-SLOT 7) ;; Used by the external metering system - a systemwide unique process number. (define FUTURE-METERING-SLOT 8) ;; Contains the number of subtasks spawned by this future. (define FUTURE-SUBTASK-COUNT-SLOT 9) ;; Contains a pointer to the spawn tree list structure. (define FUTURE-SPAWN-TREE-SLOT 10) ;; For users: (define FUTURE-USER-SLOT 11) ;; For priority queues (define FUTURE-PRIORITY-SLOT 12) ;; Metering Hooks - Called if not NIL (define *future-creation-hook* ()) (define *future-start-hook* ()) (define *future-await-hook* ()) (define *future-restart-hook* ()) (define *future-determine-hook* ()) (define *future-suspend-hook* ()) (define (futures-on #!optional slice) (if (unassigned? slice) (set! slice '())) (initialize-scheduler! slice)) (define (non-touching-memq element list) (cond ((null? list) #f) ((non-touching-eq? element (car list)) list) (else (non-touching-memq element (cdr list))))) (define (non-touching-assq element list) (cond ((null? list) #f) ((non-touching-eq? element (caar list)) (car list)) (else (non-touching-assq element (cdr list))))) (add-syntax! 'FUTURE (macro (expression #!optional doc priority) (let ((the-doc) (this-priority)) (cond ((unassigned? doc) (set! the-doc (with-output-to-string (lambda () (display expression)))) (set! this-priority (future-ref (current-future) FUTURE-PRIORITY-SLOT))) ((and (unassigned? priority) (number? doc)) (set! this-priority doc) (set! the-doc (with-output-to-string (lambda () (display expression))))) ((unassigned? priority) (set! this-priority (future-ref (current-future) FUTURE-PRIORITY-SLOT)) (set! the-doc doc)) (else (set! this-priority priority) (set! the-doc doc))) `(%spawn-process (lambda () ,expression) ,the-doc #t #| ,this-priority |# )))) (define scheduler (make-environment (define sti (make-primitive-procedure 'SETUP-TIMER-INTERRUPT #t)) (define drain-work-queue! (make-primitive-procedure 'DRAIN-WORK-QUEUE!)) (define set-fluid-bindings! (make-primitive-procedure 'SET-FLUID-BINDINGS!)) (define non-reentrant-call/cc (make-primitive-procedure 'NON-REENTRANT-CALL-WITH-CURRENT-CONTINUATION)) (define call/cc (make-primitive-procedure 'CALL-WITH-CURRENT-CONTINUATION)) (define set-current-dynamic-state! (make-primitive-procedure 'SET-CURRENT-DYNAMIC-STATE!)) (define current-future (make-primitive-procedure 'CURRENT-FUTURE)) (define set-current-future! (make-primitive-procedure 'SET-CURRENT-FUTURE!)) (define control-point-type (microcode-type 'CONTROL-POINT)) (define catch-maker (access catch-maker continuation-package)) (define non-reentrant-task-catch) (define task-catch) (define current-future-vector) ; Process currently running (define Idle-Future) ; Future to wait until idle on (define discard-the-paused-tasks? #f); Throw away tasks? (define scheduler-info (vector '() #f)) ; Scheduler info shared w/microcode (define schinfo-delta 0) (set! non-reentrant-task-catch (catch-maker non-reentrant-call/cc set-current-dynamic-state! #t)) (set! task-catch (catch-maker call/cc set-current-dynamic-state! #f)) (define (legitimate-process? object) (or (procedure? object) (primitive-type? control-point-type object))) (define start-preempting (make-primitive-procedure '%Start-Preempting)) (define stop-preempting (make-primitive-procedure '%Stop-Preempting)) (define (end-preempting) (stop-preempting) (vector-set! scheduler-info schinfo-delta '())) (define (more-work work) (future-set! work FUTURE-STATUS-SLOT 'RUNNABLE) (put-work work)) (set! reschedule-future (named-lambda (reschedule-future work) (if *future-restart-hook* (*future-restart-hook* work (current-future))) (more-work work))) (define primitive-determine! (make-primitive-procedure '%determine!)) (define (determine! fut val #!optional keep?) (if (unassigned? keep?) (primitive-determine! fut val #f) (primitive-determine! fut val keep?))) (define (Futures-On?) (not (unassigned? Current-Future-Vector))) (define (Futures-Off) (pause-everything) (set! Current-Future-Vector) 'FUTURES-TURNED-OFF) (define (initialize-scheduler! #!optional interval non-aborting?) (pause-everything) ; Stop all processors & drain queue (new-current-future-vector 'NO-FUTURE-YET) (set! idle-routine (if is-a-butterfly? (lambda args (display "Idle-routine called!") (new-line) (apply bfly-idle-routine args)) (lambda args (display "Idle-routine called!") (new-line) (apply default-idle-routine args)))) (let ((fov (get-fixed-objects-vector))) (vector-set! fov #x15 %await-future) (vector-set! fov #x24 (vector 'runnable 'created 'determined 'waiting 'your-turn 'waiting-for-work 'running 'delayed 'paused)) (vector-set! fov #x26 %reschedule) (vector-set! fov #x27 idle-routine) (set! scheduler-info (vector '() #f)) (vector-set! fov #x2b scheduler-info) (set-fixed-objects-vector! fov)) (Set-Current-Future! (make-future 'INITIAL-PROCESS 'INITIAL-PROCESS "The Initial Process")) (future-set! (current-future) FUTURE-STATUS-SLOT 'RUNNING) (set! timer-interrupt ; Set up the timer interrupt handler. (lambda () (if (not (vector-ref scheduler-info schinfo-delta)) (begin (stop-preempting) (bkpt "TIMER: Illegal entry")) (saving-state (lambda () 'nothing))))) (let ((termination-handlers (vector-ref (get-fixed-objects-vector) (fixed-objects-vector-slot 'MICROCODE-TERMINATIONS-PROCEDURES)))) (if (= (vector-length termination-handlers) 0) (begin (set! termination-handlers (vector-cons number-of-microcode-terminations '())) (vector-set! (get-fixed-objects-vector) (fixed-objects-vector-slot 'MICROCODE-TERMINATIONS-PROCEDURES) termination-handlers) (set-fixed-objects-vector! (get-fixed-objects-vector)))) (vector-set! termination-handlers (microcode-termination 'END-OF-CONTINUATION) end-of-computation-handler)) (set! Idle-Future (make-future 'NO-PROCESS 'NO-PROCESS "Idle-Loop")) (if (not (unassigned? interval)) (begin (vector-set! scheduler-info schinfo-delta interval) (start-preempting)) (vector-set! scheduler-info schinfo-delta '())) (global-interrupt 1 (lambda (IntCode IntEnb) (next)) (lambda () #t)) (if (or (unbound? abort-to-top-level-driver) (and (not (unassigned? non-aborting?)) non-aborting?)) (or (vector-ref scheduler-info schinfo-delta) 'NOT-PREEMPTIVE-SCHEDULING) (abort-to-top-level-driver (cond ((unbound? format) "^G to restart the futures") ((not (vector-ref scheduler-info schinfo-delta)) "^G: no preemptive scheduling") ((negative? (vector-ref scheduler-info schinfo-delta)) (let ((delta (vector-ref scheduler-info schinfo-delta))) (format () "^G: scheduling ~o.~o~o (real) secs." (quotient (abs delta) 100) (remainder (quotient (abs delta) 10) 10) (remainder (remainder (abs delta) 10) 10)))) (else (let ((delta (vector-ref scheduler-info schinfo-delta))) (format () "^G: scheduling ~o.~o~o (runtime) secs." (quotient delta 100) (remainder (quotient delta 10) 10) (remainder (remainder delta 10) 10)))))))) (define (end-of-computation-handler expression environment value) (%reschedule)) (define (new-current-future-vector content) (set! Current-Future-Vector (make-vector (n-interpreters) content)) (let ((fov (get-fixed-objects-vector))) (vector-set! fov #x25 Current-Future-Vector) (set-fixed-objects-vector! fov))) ; Scheduling support (define (next) (stop-preempting) (Set-Current-Future! 'WAITING-FOR-WORK) (set-interrupt-enables! interrupt-mask-all) (run (get-work idle-routine))) (define (default-idle-routine) (let loop () (stop-preempting) (determine! Idle-Future 'DONE) (set! Idle-Future (make-future 'NO-PROCESS 'NO-PROCESS "Idle Loop")) (run (get-work (lambda () (error "No work available!") (loop)))))) (define (bfly-idle-routine) (stop-preempting) (determine! Idle-Future 'DONE) (set! Idle-Future (make-future 'NO-PROCESS 'NO-PROCESS "Idle Loop")) (run (get-work ()))) (define idle-routine default-idle-routine) ;; RUN starts a process running (define (run future) (if *future-start-hook* (*future-start-hook* future)) ((LOCKING-FUTURE future Still-A-Future? (if Still-A-Future? (let ((new-process (future-set! future FUTURE-PROCESS-SLOT (My-Interpreter-Number))) (old-status (future-set! future FUTURE-STATUS-SLOT 'RUNNING))) (if (and (legitimate-process? new-process) (eq? old-status 'RUNNABLE)) (begin (Set-Current-Future! future) (lambda () (start-preempting) ;;;; JSM??? (set-interrupt-enables! interrupt-mask-all) ; For preemption -sas (new-process 'YOUR-TURN))) (begin (future-set! future FUTURE-STATUS-SLOT old-status) (future-set! future FUTURE-PROCESS-SLOT new-process) next))) next)))) ; Special scheduler operations ;; RESCHEDULE allows me to give up my processor slice and ;; wait until the scheduler gets back to me. (define-atomic (reschedule) (let ((my-task (current-future))) (WITH-STATE me (if (LOCKING-FUTURE my-task am-I-running? (if am-I-running? (begin (future-set! my-task FUTURE-PROCESS-SLOT me) (more-work my-task))) am-I-running?) (next) 'NOT-CURRENTLY-RUNNING-A-FUTURE)))) ;; WAIT-UNTIL-IDLE causes a process to just continue ;; going to sleep until there are no other active processes. (define (wait-until-idle) (touch idle-future)) (define weak-cons (let ((weak-cons-type (microcode-type 'weak-cons))) (named-lambda (weak-cons a b) (system-pair-cons weak-cons-type a b)))) ;(define weak-car system-pair-car) ;(define weak-cdr system-pair-cdr) ;(define weak-set-car! system-pair-set-car!) ;(define weak-set-cdr! system-pair-set-cdr!) ;; SAVING-STATE wraps up the current state of the system into the ;; current future and returns it to the work queue. It then executes ;; the thunk. If the current future is invoked the call to ;; SAVING-STATE is exitted; when the thunk returns, the processor will ;; wait for new work to perform. (define (saving-state thunk) (suspending-execution (lambda (me) (if (future? me) (more-work me)) (thunk)))) ;; SUSPENDING-EXECUTION suspends the current task and calls the specified ;; thunk with the current future. Then it returns to the scheduler. (set! suspending-execution (named-lambda (suspending-execution thunk) (WITH-STATE my-state (let ((my-future (current-future))) (LOCKING-FUTURE my-future am-I-running? (if am-I-running? (begin (if *future-suspend-hook* (*future-suspend-hook* my-future)) (future-set! my-future FUTURE-PROCESS-SLOT my-state) (future-set! my-future FUTURE-STATUS-SLOT 'SUSPENDED)))) (stop-preempting) (set-current-future! 'STATE-SAVED) (set! my-state) (thunk my-future) (next))) 'COMPLETED)) ;; PAUSE-EVERYTHING is used to make every processor but the caller ;; save its state and go quiescent. The value returned by ;; Pause-Everything is a procedure which will put the work queue ;; back to its initial state (modulo order of futures on the queue). (define-atomic (pause-everything) ;; RELEASE-STATE! takes a list of futures and puts them ;; on the work queue. (define (release-state! list) (if (null? list) 'RESTARTED (let ((work-unit (car list))) (LOCKING-FUTURE work-unit work-to-do? (if (and work-to-do? (legitimate-process? (future-ref work-unit FUTURE-PROCESS-SLOT)) (eq? (future-ref work-unit FUTURE-STATUS-SLOT) 'PAUSED)) (more-work work-unit))) (release-state! (cdr list))))) ;; WEAK-LIST->LIST! takes a weak list of futures, as ;; returned by DRAIN-WORK-QUEUE! and converts it to a list of ;; the objects referenced. The GC code needs the weak form, ;; hence the extra work here. In the process, each future is ;; made to be PAUSED so it will automatically resume if touched (define (weak-list->list! weak-list) (let loop ((current weak-list) (result '())) (if (null? current) (reverse! result) (let ((work-unit (weak-car current))) (if (future? work-unit) (begin (future-set! work-unit FUTURE-STATUS-SLOT 'PAUSED) (loop (weak-cdr current) (cons work-unit result))) (loop (weak-cdr current) result)))))) (define ((returned-object the-queue) #!optional message) (if (unassigned? message) (set! message 'Restart-tasks)) (cond ((eq? message 'Any-Tasks?) (and (not (eq? the-queue #t)) (not (null? the-queue)))) ((eq? message 'Restart-tasks) (if (not (eq? the-queue #t)) (release-state! the-queue) (error "Attempt to re-use a pause object!")) (set! the-queue #t)) ((eq? message 'The-Tasks) (if (eq? the-queue #t) '() the-queue)) (else (error "Pause object: strange message" message)))) (if (not (Futures-On?)) (returned-object '()) (let ((save-synch (make-synchronizer)) (drain-synch (make-synchronizer)) (proceed-synch (make-synchronizer))) (stop-preempting) (global-interrupt 1 (lambda (int-code int-mask) (await-synchrony save-synch) (saving-state (lambda () (set-interrupt-enables! int-mask) (await-synchrony drain-synch) (await-synchrony proceed-synch)))) (lambda () #!TRUE)) (await-synchrony save-synch) (await-synchrony drain-synch) (let ((me (current-future)) (the-queue (weak-list->list! (drain-work-queue!)))) (new-current-future-vector 'PAUSED) (Set-Current-Future! me) (await-synchrony proceed-synch) (returned-object the-queue))))) ;; WITH-TASKS-SUSPENDED executes the thunk with all other processes ;; stopped. It returns the value of the thunk. (define (with-tasks-suspended thunk) (if (not (Futures-On?)) (thunk) (begin (let ((the-paused-tasks (pause-everything))) (fluid-let ((debug-paused-tasks the-paused-tasks)) (dynamic-wind (lambda () (if (the-paused-tasks 'any-tasks?) (begin (newline) (display "[Suspending tasks]")))) thunk (lambda () (cond ((not (the-paused-tasks 'any-tasks?)) '()) (discard-the-paused-tasks? (newline) (display "[Discarding tasks]") (newline)) (else (newline) (display "[Resuming tasks]") (newline) (the-paused-tasks 'Restart-tasks)))))))))) ;; Dealing with recently suspended tasks (define (discard-recently-suspended-tasks!) (set! discard-the-paused-tasks? #t)) (define (prevent-discarding-processes!) (set! discard-the-paused-tasks? #f)) ;; Execution within a selected task (define (within-process future thunk) (define (loop noisy?) ((LOCKING-FUTURE future true-future? (if true-future? (let ((status (future-ref future FUTURE-STATUS-SLOT)) (process (future-ref future FUTURE-PROCESS-SLOT))) (cond ((non-touching-eq? future (current-future)) thunk) ((eq? status 'RUNNING) (lambda () (if noisy? (bkpt "WITHIN-PROCESS: process is running")) (loop #f))) (else (future-set! future FUTURE-PROCESS-SLOT (if (continuation? process) (let ((our-fluids (continuation-fluid-bindings (continuation-next-continuation process)))) (if (not (null? our-fluids)) (lambda (arg) (set-fluid-bindings! our-fluids) (within-continuation process thunk)) (lambda (arg) (thunk) (process 'go)))) (lambda (arg) (thunk) (process 'go)))) (more-work future) (lambda () (run future))))) (begin (error "WITHIN-PROCESS: Not a process" future) (lambda () (next))))))) (loop #t)) (define (get-scheduling-delta) (vector-ref scheduler-info schinfo-delta)) )) ; End of SCHEDULER ; Export definitions to the world outside the scheduler (define initialize-scheduler! (access initialize-scheduler! scheduler)) (define determine! (access determine! scheduler)) (define next (access reschedule scheduler)) (define wait-until-idle (access wait-until-idle scheduler)) (define pause-everything (access pause-everything scheduler)) (define with-tasks-suspended (access with-tasks-suspended scheduler)) (define discard-recently-suspended-tasks! (access discard-recently-suspended-tasks! scheduler)) (define prevent-discarding-processes! (access prevent-discarding-processes! scheduler)) (define Current-Future (access Current-Future scheduler)) (define Futures-On? (access Futures-On? scheduler)) (define Futures-Off (access Futures-Off scheduler)) (define Saving-State (access Saving-State scheduler)) (define within-process (access within-process scheduler)) (define get-scheduling-delta (access get-scheduling-delta scheduler)) (define weak-cons (access weak-cons scheduler)) (define weak-car system-pair-car) (define weak-cdr system-pair-cdr) (define weak-set-car! system-pair-set-car!) (define weak-set-cdr! system-pair-set-cdr!) (futures-on)
false
7900e9595b34f33ef708177f187057130b88a13b
665da87f9fefd8678b0635e31df3f3ff28a1d48c
/srfi/sorting/vqsort3.scm
8c69c83a70d155878211b334e029fe9799bb4bdb
[ "MIT" ]
permissive
justinethier/cyclone
eeb782c20a38f916138ac9a988dc53817eb56e79
cc24c6be6d2b7cc16d5e0ee91f0823d7a90a3273
refs/heads/master
2023-08-30T15:30:09.209833
2023-08-22T02:11:59
2023-08-22T02:11:59
31,150,535
862
64
MIT
2023-03-04T15:15:37
2015-02-22T03:08:21
Scheme
UTF-8
Scheme
false
false
11,475
scm
vqsort3.scm
;;; The SRFI-32 sort package -- three-way quick sort -*- Scheme -*- ;;; Copyright (c) 2002 by Olin Shivers. ;;; This code is open-source; see the end of the file for porting and ;;; more copyright information. ;;; Olin Shivers 2002/7. ;;; (quick-sort3! c v [start end]) -> unspecific ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Sort vector V[start,end) using three-way comparison function C: ;;; (c x y) < 0 => x<y ;;; (c x y) = 0 => x=y ;;; (c x y) > 0 => x>y ;;; That is, C acts as a sort of "subtraction" procedure; using - for the ;;; comparison function will cause numbers to be sorted into increasing order. ;;; ;;; This algorithm is more efficient than standard, two-way quicksort if there ;;; are many duplicate items in the data set and the comparison function is ;;; relatively expensive (e.g., comparing large strings). It is due to Jon ;;; Bentley & Doug McIlroy; I learned it from Bentley. ;;; ;;; The algorithm is a standard quicksort, but the partition loop is fancier, ;;; arranging the vector into a left part that is <, a middle region that is ;;; =, and a right part that is > the pivot. Here's how it is done: ;;; The partition loop divides the range being partitioned into five ;;; subranges: ;;; =======<<<<<<<<<?????????>>>>>>>======= ;;; where = marks a value that is equal the pivot, < marks a value that ;;; is less than the pivot, ? marks a value that hasn't been scanned, and ;;; > marks a value that is greater than the pivot. Let's consider the ;;; left-to-right scan. If it checks a ? value that is <, it keeps scanning. ;;; If the ? value is >, we stop the scan -- we are ready to start the ;;; right-to-left scan and then do a swap. But if the rightward scan checks ;;; a ? value that is =, we swap it *down* to the end of the initial chunk ;;; of ====='s -- we exchange it with the leftmost < value -- and then ;;; continue our rightward scan. The leftwards scan works in a similar ;;; fashion, scanning past > elements, stopping on a < element, and swapping ;;; up = elements. When we are done, we have a picture like this ;;; ========<<<<<<<<<<<<>>>>>>>>>>========= ;;; Then swap the = elements up into the middle of the vector to get ;;; this: ;;; <<<<<<<<<<<<=================>>>>>>>>>> ;;; Then recurse on the <'s and >'s. Work out all the tricky little ;;; boundary cases, and you're done. ;;; ;;; Other tricks that make this implementation industrial strength: ;;; - This quicksort makes some effort to pick the pivot well -- it uses the ;;; median of three elements as the partition pivot, so pathological n^2 ;;; run time is much rarer (but not eliminated completely). If you really ;;; wanted to get fancy, you could use a random number generator to choose ;;; pivots. The key to this trick is that you only need to pick one random ;;; number for each *level* of recursion -- i.e. you only need (lg n) random ;;; numbers. ;;; ;;; - After the partition, we *recurse* on the smaller of the two pending ;;; regions, then *tail-recurse* (iterate) on the larger one. This guarantees ;;; we use no more than lg(n) stack frames, worst case. ;;; ;;; - There are two ways to finish off the sort. ;;; A. Recurse down to regions of size 10, then sort each such region using ;;; insertion sort. ;;; B. Recurse down to regions of size 10, then sort *the entire vector* ;;; using insertion sort. ;;; We do A. Each choice has a cost. Choice A has more overhead to invoke ;;; all the separate insertion sorts -- choice B only calls insertion sort ;;; once. But choice B will call the comparison function *more times* -- ;;; it will unnecessarily compare elt 9 of one segment to elt 0 of the ;;; following segment. The overhead of choice A is linear in the length ;;; of the vector, but *otherwise independent of the algorithm's parameters*. ;;; I.e., it's a *fixed*, *small* constant factor. The cost of the extra ;;; comparisons made by choice B, however, is dependent on an externality: ;;; the comparison function passed in by the client. This can be made ;;; arbitrarily bad -- that is, the constant factor *isn't* fixed by the ;;; sort algorithm; instead, it's determined by the comparison function. ;;; If your comparison function is very, very slow, you want to eliminate ;;; every single one that you can. Choice A limits the potential badness, ;;; so that is what we do. (define (vector-quick-sort3! c v . maybe-start+end) (call-with-values (lambda () (vector-start+end v maybe-start+end)) (lambda (start end) (%quick-sort3! c v start end)))) (define (vector-quick-sort3 c v . maybe-start+end) (call-with-values (lambda () (vector-start+end v maybe-start+end)) (lambda (start end) (let ((ans (make-vector (- end start)))) (vector-portion-copy! ans v start end) (%quick-sort3! c ans 0 (- end start)) ans)))) ;;; %QUICK-SORT3! is not exported. ;;; Preconditions: ;;; V vector ;;; START END fixnums ;;; 0 <= START, END <= (vector-length V) ;;; If these preconditions are ensured by the cover functions, you ;;; can safely change this code to use unsafe fixnum arithmetic and vector ;;; indexing ops, for *huge* speedup. ;;; ;;; We bail out to insertion sort for small ranges; feel free to tune the ;;; crossover -- it's just a random guess. If you don't have the insertion ;;; sort routine, just kill that branch of the IF and change the recursion ;;; test to (< 1 (- r l)) -- the code is set up to work that way. (define (%quick-sort3! c v start end) (define (swap l r n) ; Little utility -- swap the N (if (> n 0) (let ((x (vector-ref v l)) ; outer pairs of the range [l,r). (r-1 (- r 1))) (vector-set! v l (vector-ref v r-1)) (vector-set! v r-1 x) (swap (+ l 1) r-1 (- n 1))))) (define (sort3 v1 v2 v3) (call-with-values (lambda () (if (< (c v1 v2) 0) (values v1 v2) (values v2 v1))) (lambda (little big) (if (< (c big v3) 0) (values little big v3) (if (< (c little v3) 0) (values little v3 big) (values v3 little big)))))) (define (elt< v1 v2) (negative? (c v1 v2))) (let recur ((l start) (r end)) ; Sort the range [l,r). (if (< 10 (- r l)) ; 10: the gospel according to Sedgewick. ;; Choose the median of V[l], V[r-1], and V[middle] for the pivot. ;; We do this by sorting these three elts; call the results LO, PIVOT ;; & HI. Put LO, PIVOT & HI where they should go in the vector. We ;; will kick off the partition step with one elt (PIVOT) in the left= ;; range, one elt (LO) in the < range, one elt (HI) in in the > range ;; & no elts in the right= range. (let* ((r-1 (- r 1)) ; Three handy (mid (quotient (+ l r) 2)) ; common (l+1 (+ l 1)) ; subexpressions (pivot (call-with-values (lambda () (sort3 (vector-ref v l) (vector-ref v mid) (vector-ref v r-1))) (lambda (lo piv hi) (let ((tmp (vector-ref v l+1))) ; Put LO, PIV & HI (vector-set! v l piv) ; back into V (vector-set! v r-1 hi) ; where they belong, (vector-set! v l+1 lo) (vector-set! v mid tmp) piv))))) ; and return PIV as pivot. ;; Everything in these loops is driven by the invariants expressed ;; in the little pictures, the corresponding l,i,j,k,m,r indices, ;; & the associated ranges. ;; =======<<<<<<<<<?????????>>>>>>>======= (picture) ;; l i j k m r (indices) ;; [l,i) [i,j) [j,k] (k,m] (m,r) (ranges ) (letrec ((lscan (lambda (i j k m) ; left-to-right scan (let lp ((i i) (j j)) (if (> j k) (done i j m) (let* ((x (vector-ref v j)) (sign (c x pivot))) (cond ((< sign 0) (lp i (+ j 1))) ((= sign 0) (if (< i j) (begin (vector-set! v j (vector-ref v i)) (vector-set! v i x))) (lp (+ i 1) (+ j 1))) ((> sign 0) (rscan i j k m)))))))) ;; =======<<<<<<<<<>????????>>>>>>>======= ;; l i j k m r ;; [l,i) [i,j) j (j,k] (k,m] (m,r) (rscan (lambda (i j k m) ; right-to-left scan (let lp ((k k) (m m)) (if (<= k j) (done i j m) (let* ((x (vector-ref v k)) (sign (c x pivot))) (cond ((> sign 0) (lp (- k 1) m)) ((= sign 0) (if (< k m) (begin (vector-set! v k (vector-ref v m)) (vector-set! v m x))) (lp (- k 1) (- m 1))) ((< sign 0) ; Swap j & k & lscan. (vector-set! v k (vector-ref v j)) (vector-set! v j x) (lscan i (+ j 1) (- k 1) m)))))))) ;; =======<<<<<<<<<<<<<>>>>>>>>>>>======= ;; l i j m r ;; [l,i) [i,j) [j,m] (m,r) (done (lambda (i j m) (let ((num< (- j i)) (num> (+ 1 (- m j))) (num=l (- i l)) (num=r (- (- r m) 1))) (swap l j (min num< num=l)) ; Swap ='s into (swap j r (min num> num=r)) ; the middle. ;; Recur on the <'s and >'s. Recurring on the ;; smaller range and iterating on the bigger ;; range ensures O(lg n) stack frames, worst case. (cond ((<= num< num>) (recur l (+ l num<)) (recur (- r num>) r)) (else (recur (- r num>) r) (recur l (+ l num<)))))))) ;; To repeat: We kick off the partition step with one elt (PIVOT) ;; in the left= range, one elt (LO) in the < range, one elt (HI) ;; in the > range & no elts in the right= range. (lscan l+1 (+ l 2) (- r 2) r-1))) ;; Small segment => punt to insert sort. ;; Use the dangerous subprimitive. (%vector-insert-sort! elt< v l r)))) ;;; Copyright ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; This code is ;;; Copyright (c) 1998 by Olin Shivers. ;;; The terms are: You may do as you please with this code, as long as ;;; you do not delete this notice or hold me responsible for any outcome ;;; related to its use. ;;; ;;; Blah blah blah. ;;; Code tuning & porting ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; - The quicksort recursion bottoms out in a call to an insertion sort ;;; routine, %INSERT-SORT!. But you could even punt this and go with pure ;;; recursion in a pinch. ;;; ;;; This code is *tightly* bummed as far as I can go in portable Scheme. ;;; ;;; The internal primitive %QUICK-SORT! that does the real work can be ;;; converted to use unsafe vector-indexing and fixnum-specific arithmetic ops ;;; *if* you alter the two small cover functions to enforce the invariants. ;;; This should provide *big* speedups. In fact, all the code bumming I've ;;; done pretty much disappears in the noise unless you have a good compiler ;;; and also can dump the vector-index checks and generic arithmetic -- so ;;; I've really just set things up for you to exploit. ;;; ;;; The optional-arg parsing, defaulting, and error checking is done with a ;;; portable R4RS macro. But if your Scheme has a faster mechanism (e.g., ;;; Chez), you should definitely port over to it. Note that argument defaulting ;;; and error-checking are interleaved -- you don't have to error-check ;;; defaulted START/END args to see if they are fixnums that are legal vector ;;; indices for the corresponding vector, etc.
false
10c1c0de8198af7e390abc4572395fa6fbf41aeb
a5d31dc29c25d1f2c0dab633459de05f5996679a
/benchmark-verification/nth0.sch
366e0ca7dadde25d74090a9d585abc735925e9a8
[]
no_license
jebcat1982/soft-contract
250461a231b150b803df9275f33ee150de043f00
4df509a75475843a2caeb7e235301f277446e06c
refs/heads/master
2021-01-21T22:06:10.092109
2014-05-26T11:51:00
2014-05-26T11:51:00
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
400
sch
nth0.sch
(module nth0 (provide [nth (int? (listof int?) . -> . int?)] [mk-list (int? . -> . (listof int?))] [main (int? . -> . int?)]) (define (nth n xs) (if (= n 0) (car xs) (nth (- n 1) (cdr xs)))) (define (mk-list n) (if (< n 0) empty (cons n (mk-list (- n 1))))) (define (main n) (let [xs (mk-list n)] (if (empty? xs) 0 (nth 0 xs))))) (require nth0) (main •)
false
16603caca4f3d422274ef544e825795e5aea8275
be6fe59e871d13a473c8007d40c97623cda51cf9
/footwm/xlib.sls
73ff5e232b1a12b8c8db1da1b415415e084874d5
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
akce/footwm-chez
b072d64535903bfeb6f1863a325c5449e7cdbd00
a329141a732f96fd273d1e1a99060ab2f7562cab
refs/heads/master
2021-11-19T22:15:33.147720
2021-10-17T05:09:21
2021-10-17T05:09:21
172,157,105
6
0
null
null
null
null
UTF-8
Scheme
false
false
33,257
sls
xlib.sls
;; Footwm Chez scheme XLib layer. ;; ;; Written by Jerry 2019-2021. ;; ;; SPDX-License-Identifier: Unlicense (library (footwm xlib) (export current-display root make-atom-manager ;; Custom geometry record. make-geometry geometry-x geometry-y geometry-width geometry-height geometry=? xconfigureevent-geometry xconfigurerequestevent-geometry ;; XWindowAttributes. window-attributes window-attributes-geom window-attributes-override-redirect window-attributes-map-state XAnyEvent XEvent XErrorEvent make-xerrorevent xerrorevent? xerrorevent-type xerrorevent-d xerrorevent-resourceid xerrorevent-serial xerrorevent-error-code xerrorevent-request-code xerrorevent-minor-code make-xanyevent xanyevent? xanyevent-type xanyevent-serial xanyevent-send-event xanyevent-d xanyevent-wid XClientMessageEvent ClientMessage make-xclientmessageevent xclientmessageevent? xclientmessageevent-xany xclientmessageevent-message-type xclientmessageevent-format xclientmessageevent-data XConfigureEvent ConfigureNotify make-xconfigureevent xconfigureevent? xconfigureevent-xany xconfigureevent-wid xconfigureevent-x xconfigureevent-y xconfigureevent-width xconfigureevent-height xconfigureevent-border-width xconfigureevent-above xconfigureevent-override-redirect XConfigureRequestEvent ConfigureRequest make-xconfigurerequestevent xconfigurerequestevent? xconfigurerequestevent-xany xconfigurerequestevent-wid xconfigurerequestevent-x xconfigurerequestevent-y xconfigurerequestevent-width xconfigurerequestevent-height xconfigurerequestevent-border-width xconfigurerequestevent-above xconfigurerequestevent-detail xconfigurerequestevent-value-mask XCreateWindowEvent CreateNotify make-xcreatewindowevent xcreatewindowevent? xcreatewindowevent-xany xcreatewindowevent-wid xcreatewindowevent-x xcreatewindowevent-y xcreatewindowevent-width xcreatewindowevent-height xcreatewindowevent-border-width xcreatewindowevent-override-redirect XDestroyWindowEvent DestroyNotify make-xdestroywindowevent xdestroywindowevent? xdestroywindowevent-xany xdestroywindowevent-wid KeyReleaseEvent XKeyEvent KeyPressEvent ;; TODO this should be KeyPress but there's already one defined. Need to scope these. make-xkeyevent xkeyevent? xkeyevent-xany xkeyevent-root xkeyevent-subwindow xkeyevent-time xkeyevent-x xkeyevent-y xkeyevent-x-root xkeyevent-y-root xkeyevent-state xkeyevent-keycode xkeyevent-same-screen XMapEvent MapNotify make-xmapevent xmapevent? xmapevent-xany xmapevent-wid xmapevent-override-redirect XMapRequestEvent MapRequest make-xmaprequestevent xmaprequestevent? xmaprequestevent-xany xmaprequestevent-wid XPropertyEvent PropertyNotify make-xpropertyevent xpropertyevent? xpropertyevent-xany xpropertyevent-propatom xpropertyevent-time xpropertyevent-state XUnmapEvent UnmapNotify make-xunmapevent xunmapevent? xunmapevent-xany xunmapevent-wid xunmapevent-from-configure XTextProperty XWindowAttributes XWindowChanges x-atom Success BadAccess ;; XWindowAttributes map-state IsUnmapped IsUnviewable IsViewable NoEvent KeyPress KeyRelease ButtonPress ButtonRelease EnterWindow LeaveWindow PointerMotion PointerMotionHint Button1Motion Button2Motion Button3Motion Button4Motion Button5Motion ButtonMotion KeymapState Exposure VisibilityChange StructureNotify ResizeRedirect SubstructureNotify SubstructureRedirect FocusChange PropertyChange ColormapChange OwnerGrabButton ;; configure-window-request CWX CWY CWWidth CWHeight CWBorderWidth CWSibling CWStackMode ;; stacking method Above Below TopIf BottomIf ;; input focus RevertToNone RevertToPointerRoot RevertToParent Shift Lock Control Mod1 Mod2 Mod3 Mod4 Mod5 GrabModeSync GrabModeAsync AnyModifier None AnyKey CurrentTime NoSymbol PointerRoot UTF8String x-create-simple-window x-change-property x-delete-property x-close-display x-configure-window x-default-root-window x-destroy-window x-flush x-free x-free-string-list x-get-atom-name x-get-text-property x-get-window-attributes x-get-window-property x-grab-key x-grab-server x-intern-atom x-keycode-to-keysym x-keysym-to-keycode x-keysym-to-string x-lower-window x-map-window x-move-resize-window x-next-event x-with-next-event x-open-display x-query-tree x-raise-window x-select-input x-send-event x-set-error-handler x-set-input-focus x-set-text-property x-string-to-keysym x-sync x-ungrab-key x-ungrab-server x-unmap-window xutf8-text-list-to-text-property xutf8-text-property-to-text-list card32 dpy* pixmap status u8* u8** window window* ;; Property helper functions. cardinal-set! property->string property->string* property->ulongs ulongs-property-set! text-property-set! define-root-property send-message-cardinal) (import (chezscheme) (footwm ftypes-util) (footwm util)) (define library-init (load-shared-object "libX11.so.6")) (define current-display (make-parameter #f)) (define root (make-parameter #f)) ;;;; basic atom manager. ;; Just a very thin wrapper around hash tables. (define make-atom-manager (lambda (atom-list) (define atoms (make-eq-hashtable)) (define init-atoms ;; initialise atoms. ;; For those atoms that require display so can only be initialised after a connection to X is made. (lambda () (for-each (lambda (a) (hashtable-set! atoms a (x-intern-atom (symbol->string a) #f))) atom-list))) (define atom-ref (lambda (a) (hashtable-ref atoms a #f))) (lambda (cmd . args) (case cmd [(intern) (init-atoms)] [(ref) (atom-ref (car args))] [(list) atom-list] [(values) (vector->list (hashtable-values atoms))] )))) ;; type aliases. (define-ftype card32 integer-32) (define-ftype dpy* void*) (define-ftype xid unsigned-long) (define-ftype window xid) (define-ftype atom unsigned-long) (define-ftype status int) (define-ftype Colormap xid) (define-ftype pixmap xid) (define-ftype Time unsigned-long) (define-ftype keycode unsigned-8) (define-ftype keysym xid) (define-ftype u8 unsigned-8) (define-ftype u8* (* u8)) (define-ftype u8** (* u8*)) (define-ftype window* (* window)) (define-ftype XAnyEvent (struct [type int] ;; message type id [serial unsigned-long] ;; number of last request handled by server [send-event boolean] ;; #t if this came from a SendEvent [d dpy*] ;; display this was read from [wid window])) (define-record-type xanyevent (fields type serial send-event d wid)) (define-syntax define-xevent (syntax-rules () [(_ name (record idname idval) ((field type) (field* type*) ...)) (begin (define-ftype name (struct [field type] [field* type*] ...)) (define idname idval) (define-record-type record (fields field field* ...)))])) (define-xevent XClientMessageEvent (xclientmessageevent ClientMessage 33) ([xany XAnyEvent] [message-type atom] ;; message type [format int] [data (union [b (array 20 char)] [s (array 10 short)] [l (array 5 long)])])) (define-xevent XConfigureEvent (xconfigureevent ConfigureNotify 22) ([xany XAnyEvent] ; (xany wid) is the parent of the window configured. [wid window] ; window id of the window configured. [x int] [y int] [width int] [height int] [border-width int] [above window] [override-redirect boolean])) (define-xevent XConfigureRequestEvent (xconfigurerequestevent ConfigureRequest 23) ([xany XAnyEvent] ; (xany wid) is the parent of the window to be reconfigured. [wid window] ; window id of the window to be reconfigured. [x int] [y int] [width int] [height int] [border-width int] [above window] [detail int] [value-mask unsigned-long])) ; the components specified in the ConfigureWindow request. (define-xevent XCreateWindowEvent (xcreatewindowevent CreateNotify 16) ([xany XAnyEvent] ; (xany wid) is the parent of the window created. [wid window] ; window id of the window created. [x int] [y int] [width int] [height int] [border-width int] [override-redirect boolean])) (define-xevent XDestroyWindowEvent (xdestroywindowevent DestroyNotify 17) ([xany XAnyEvent] [wid window])) ; wid is the window that was destroyed. (define-record-type xerrorevent (fields type d resourceid serial error-code request-code minor-code)) (define-ftype XErrorEvent (struct [type int] [d dpy*] [resourceid xid] [serial unsigned-long] [error-code u8] [request-code u8] [minor-code u8])) (define KeyReleaseEvent 3) (define-xevent XKeyEvent (xkeyevent KeyPressEvent 2) ;; TODO xkeyevent can also be KeyRelease.. ([xany XAnyEvent] [root window] [subwindow window] [time Time] [x int] [y int] [x-root int] [y-root int] [state unsigned] [keycode unsigned] [same-screen boolean])) (define-xevent XMapEvent (xmapevent MapNotify 19) ([xany XAnyEvent] [wid window] ; wid is the window that was mapped. [override-redirect boolean])) ; usually true for things like pop-up windows. (define-xevent XMapRequestEvent (xmaprequestevent MapRequest 20) ([xany XAnyEvent] [wid window])) ; wid is the window to be mapped. (define-xevent XPropertyEvent (xpropertyevent PropertyNotify 28) ([xany XAnyEvent] [propatom atom] [time Time] [state int])) (define-xevent XUnmapEvent (xunmapevent UnmapNotify 18) ([xany XAnyEvent] [wid window] ; wid is the window that was unmapped. [from-configure boolean])) ; man XUnmapEvent for a description of this param. (define-ftype xevent-size (array 24 long)) (define-ftype XEvent (union [type int] [xany XAnyEvent] [client-message XClientMessageEvent] [xconfigure XConfigureEvent] [xconfigurerequest XConfigureRequestEvent] [xcreatewindow XCreateWindowEvent] [xdestroywindow XDestroyWindowEvent] [xerror XErrorEvent] [xkey XKeyEvent] [xmap XMapEvent] [xmaprequest XMapRequestEvent] [xproperty XPropertyEvent] [xunmap XUnmapEvent] [pad xevent-size])) (define-ftype XTextProperty (struct [value u8*] [encoding atom] [format int] [nitems unsigned-long])) (define-ftype XWindowAttributes (struct [x int] [y int] [width int] [height int] [border-width int] [depth int] [visual void*] [root window] [class int] [bit-gravity int] [win-gravity int] [backing-store int] [backing-planes unsigned-long] [backing-pixel unsigned-long] [save-under boolean] [colormap Colormap] [map-installed boolean] [map-state int] [all-event-masks long] [your-event-mask long] [do-not-propagate-mask long] [override-redirect boolean] [screen void*])) (define-ftype XWindowChanges (struct [x int] [y int] [width int] [height int] [border-width int] [sibling window] [stack-mode int])) ;; X atoms from Xatom.h (define x-atom (make-atom-manager '(ATOM CARDINAL WINDOW))) ;; Error codes. From X.h (enum error-codes (Success 0) (BadAccess 10)) (enum map-state (IsUnmapped 0) (IsUnviewable 1) (IsViewable 2)) (define NoEvent 0) (bitmap input-event-mask (KeyPress 0) (KeyRelease 1) (ButtonPress 2) (ButtonRelease 3) (EnterWindow 4) (LeaveWindow 5) (PointerMotion 6) (PointerMotionHint 7) (Button1Motion 8) (Button2Motion 9) (Button3Motion 10) (Button4Motion 11) (Button5Motion 12) (ButtonMotion 13) (KeymapState 14) (Exposure 15) (VisibilityChange 16) (StructureNotify 17) (ResizeRedirect 18) (SubstructureNotify 19) (SubstructureRedirect 20) (FocusChange 21) (PropertyChange 22) (ColormapChange 23) (OwnerGrabButton 24)) ;; for value-mask in XConfigureRequestEvent (enum configure-window-mask (CWX 0) (CWY 1) (CWWidth 2) (CWHeight 3) (CWBorderWidth 4) (CWSibling 5) (CWStackMode 6)) ;; window stacking method for configuring windows. (enum stacking-method (Above 0) (Below 1) (TopIf 2) (BottomIf 3)) (enum input-focus (RevertToNone 0) (RevertToPointerRoot 1) (RevertToParent 2)) (bitmap key-modifier-mask (Shift 0) (Lock 1) (Control 2) (Mod1 3) (Mod2 4) (Mod3 5) (Mod4 6) (Mod5 7)) (enum grab-mode (GrabModeSync 0) (GrabModeAsync 1)) (enum button-masks ;; skipping unused buttons. (AnyModifier 15)) ;; X.h reserved resources/constants. (define None 0) (define AnyKey 1) (define CurrentTime 0) (define NoSymbol 0) (define PointerRoot 1) ;; Xutil.h XICCEncodingStyle (define UTF8String 4) (c-function (x-free (void*) void) ;; The arg to XFreeStringList should be char** but foreign-ref doesn't support that. ;; void* points to anything so use that for now. (x-free-string-list (void*) void) (x-keysym-to-string (keysym) string) (XOpenDisplay (string) dpy*) ;; XSetErrorHandler prototype returns an int, but it's actually a pointer to the previous error handler. ;; So deviating and marking it as void* instead. (XSetErrorHandler (void*) void*) (x-string-to-keysym (string) keysym)) (c-default-function (dpy* (current-display)) ;; Window XCreateSimpleWindow(parent x y width height border_width border background); (x-create-simple-window (window int int unsigned unsigned unsigned unsigned-long unsigned-long) window) (x-change-property (window atom atom int int void* int) int) (x-delete-property (window atom) int) (x-close-display () int) ;; data should be a u8* but using a void* instead. (XConfigureWindow (window unsigned (* XWindowChanges)) int) (x-default-root-window () window) (x-destroy-window (window) int) (x-flush () int) (XGetAtomName (atom) void*) (x-get-text-property (window (* XTextProperty) atom) status) (XGetWindowAttributes (window (* XWindowAttributes)) status) (x-get-window-property (window atom long long boolean atom (* atom) (* int) (* unsigned-long) (* unsigned-long) (* void*)) int) (x-grab-key (int unsigned window boolean int int) int) (x-grab-server () int) (x-intern-atom (string boolean) atom) (x-keycode-to-keysym (keycode int) keysym) (x-keysym-to-keycode (keysym) keycode) (x-lower-window (window) int) (x-map-window (window) int) (x-move-resize-window (window int int unsigned unsigned) int) (XNextEvent ((* XEvent)) int) (XQueryTree (window (* window) (* window) (* window*) (* unsigned)) status) (x-raise-window (window) int) (x-select-input (window long) int) (x-send-event (window boolean long (* XEvent)) status) (x-set-input-focus (window int Time) int) (x-set-text-property (window (* XTextProperty) atom) void) (XSync (boolean) int) (x-ungrab-key (int unsigned window) int) (x-ungrab-server () int) (x-unmap-window (window) int) ;; TODO void* in Xutf8TextListToTextProperty should be (* u8*). ;; I had troubles with foreign-set! and 'u8* so revisit when I understand ftypes better. (xutf8-text-list-to-text-property (void* int unsigned (* XTextProperty)) int) (xutf8-text-property-to-text-list ((* XTextProperty) (* u8**) (* int)) int)) (define x-configure-window (lambda (wid geo) (let ([change-mask 0]) (fmem ([changes &changes XWindowChanges]) (when (geometry-x geo) (ftype-set! XWindowChanges (x) &changes (geometry-x geo)) (set! change-mask (bitwise-copy-bit change-mask CWX 1))) (when (geometry-y geo) (ftype-set! XWindowChanges (y) &changes (geometry-y geo)) (set! change-mask (bitwise-copy-bit change-mask CWY 1))) (when (geometry-width geo) (ftype-set! XWindowChanges (width) &changes (geometry-width geo)) (set! change-mask (bitwise-copy-bit change-mask CWWidth 1))) (when (geometry-height geo) (ftype-set! XWindowChanges (height) &changes (geometry-height geo)) (set! change-mask (bitwise-copy-bit change-mask CWHeight 1))) (XConfigureWindow wid change-mask &changes) #;(display (format "#x~x x-configure-window change-mask #b~b~n" wid change-mask)))))) (define x-get-atom-name (lambda (a) ;; Unset atom fields from messages will be zero, so account for that here as a convenience to print functions. (if (> a 0) (let* ([ptr (XGetAtomName a)] [str (ptr->string ptr)]) (x-free ptr) str) ""))) (define-record-type geometry (fields x y width height)) (define geometry=? (lambda (lhs rhs) (and (eq? (geometry-x lhs) (geometry-x rhs)) (eq? (geometry-y lhs) (geometry-y rhs)) (eq? (geometry-width lhs) (geometry-width rhs)) (eq? (geometry-height lhs) (geometry-height rhs))))) (define xconfigureevent-geometry (lambda (ev) (make-geometry (xconfigureevent-x ev) (xconfigureevent-y ev) (xconfigureevent-width ev) (xconfigureevent-height ev)))) (define xconfigurerequestevent-geometry (lambda (ev) (make-geometry (xconfigurerequestevent-x ev) (xconfigurerequestevent-y ev) (xconfigurerequestevent-width ev) (xconfigurerequestevent-height ev)))) (define-record-type window-attributes (fields geom override-redirect map-state)) (define x-get-window-attributes (lambda (wid) (fmem ([wa &wa XWindowAttributes]) (let ([rc (XGetWindowAttributes wid &wa)]) (if (= rc 0) ;; failure. #f (let ([x (ftype-ref XWindowAttributes (x) &wa)] [y (ftype-ref XWindowAttributes (y) &wa)] [w (ftype-ref XWindowAttributes (width) &wa)] [h (ftype-ref XWindowAttributes (height) &wa)] [map-state (ftype-ref XWindowAttributes (map-state) &wa)] [override (ftype-ref XWindowAttributes (override-redirect) &wa)]) (make-window-attributes (make-geometry x y w h) override map-state))))))) ;; wraps XOpenDisplay so the connection string is optional. (define x-open-display (case-lambda [() ;; XOpenDisplay will crash unless it has a valid DISPLAY. (unless (getenv "DISPLAY") (raise (condition (make-error) (make-message-condition "DISPLAY not given. Exiting..")))) (XOpenDisplay #f)] [(s) (XOpenDisplay s)])) (define x-query-tree (lambda () (fmem ([root-return &rr window] [parent-return &pr window] [children-return &cr window*] [num-children &nc unsigned]) (let ([rc (XQueryTree (root) &rr &pr &cr &nc)]) (if (and (> rc 0) (> num-children 0)) (let ([ptr (foreign-ref 'void* children-return 0)] [len (foreign-ref 'unsigned num-children 0)]) (let ([wids (ptr->ulongs ptr len)]) (x-free ptr) wids)) '()))))) ;; wraps XSync so discard boolean is optional. (define x-sync (case-lambda [() (XSync #f)] [(s) (XSync s)])) ;; wraps XSetErrorHandler so that the default error handler is installed with no args. ;; Previous error handlers are stored and dealloc when no longer needed. (define x-set-error-handler ;; Store the previous locked lambda so that it can be unlocked if replaced. (let ([previous-lambda #f]) (case-lambda [() ;; Installs a simple one-line printing error handler. (x-set-error-handler (lambda (dpy ev) (display (format "XError: type=~a wid=#x~x error=~d~n" (xerrorevent-type ev) (xerrorevent-resourceid ev) (xerrorevent-error-code ev)))))] [(handler) (when previous-lambda (unlock-object previous-lambda) (set! previous-lambda #f)) (XSetErrorHandler (if (procedure? handler) ;; Wrap the lambda for convenience: ;; - converts c event struct to scheme record ;; - returns int 0 so that connection to X server remains. (let ([f/proc (foreign-callable (lambda (d c/xerrorevent) (let ([ev (make-xerrorevent (ftype-ref XErrorEvent (type) c/xerrorevent) (ftype-ref XErrorEvent (d) c/xerrorevent) (ftype-ref XErrorEvent (resourceid) c/xerrorevent) (ftype-ref XErrorEvent (serial) c/xerrorevent) (ftype-ref XErrorEvent (error-code) c/xerrorevent) (ftype-ref XErrorEvent (request-code) c/xerrorevent) (ftype-ref XErrorEvent (minor-code) c/xerrorevent))]) (handler d ev) 0)) (dpy* (* XErrorEvent)) int)]) (lock-object f/proc) (set! previous-lambda f/proc) (foreign-callable-entry-point f/proc)) ;; Else assume handler is a mem addr, eg as would be returned by the first call to XSetErrorHandler. handler))]))) (define x-next-event (lambda () (fmem ([ev &ev XEvent]) (XNextEvent &ev) (make-event &ev)))) (define x-with-next-event (lambda (func) (fmem ([ev &ev XEvent]) (dynamic-wind (lambda () #t) (lambda () (XNextEvent &ev) #;(x-grab-server) (func (make-event &ev))) (lambda () #f #;(x-ungrab-server)))))) ;; Convert the cevent struct to a scheme record. ;; TODO this c-struct->scheme-record conversion to be done in xlib as part of define-xevent?? (define make-event (lambda (cevent) (let ([evid (ftype-ref XEvent (type) cevent)]) (case-equal? evid (ClientMessage (make-xclientmessageevent (make-xany cevent) (ftype-ref XEvent (client-message message-type) cevent) (ftype-ref XEvent (client-message format) cevent) (ftype-fields client-message cevent ((data l 0) (data l 1) (data l 2) (data l 3) (data l 4))))) (ConfigureNotify (apply make-xconfigureevent (make-xany cevent) (ftype-fields xconfigure cevent (wid x y width height border-width above override-redirect)))) (ConfigureRequest (apply make-xconfigurerequestevent (make-xany cevent) (ftype-fields xconfigurerequest cevent (wid x y width height border-width above detail value-mask)))) (CreateNotify (apply make-xcreatewindowevent (make-xany cevent) (ftype-fields xcreatewindow cevent (wid x y width height border-width override-redirect)))) (DestroyNotify (apply make-xdestroywindowevent (make-xany cevent) (ftype-fields xdestroywindow cevent (wid)))) (KeyPressEvent (apply make-xkeyevent (make-xany cevent) (ftype-fields xkey cevent (root subwindow time x y x-root y-root state keycode same-screen)))) (KeyReleaseEvent (apply make-xkeyevent (make-xany cevent) (ftype-fields xkey cevent (root subwindow time x y x-root y-root state keycode same-screen)))) (MapNotify (apply make-xmapevent (make-xany cevent) (ftype-fields xmap cevent (wid override-redirect)))) (MapRequest (apply make-xmaprequestevent (make-xany cevent) (ftype-fields xmaprequest cevent (wid)))) (PropertyNotify (apply make-xpropertyevent (make-xany cevent) (ftype-fields xproperty cevent (propatom time state)))) (UnmapNotify (apply make-xunmapevent (make-xany cevent) (ftype-fields xunmap cevent (wid from-configure)))) (else (make-xany cevent)))))) (define-syntax ftype-fields (syntax-rules () [(_ type obj ((field name offset) ...)) (list (ftype-ref XEvent (type field name offset) obj) ...)] [(_ type obj (field ...)) (list (ftype-ref XEvent (type field) obj) ...)])) (define make-xany (lambda (cevent) (apply make-xanyevent (ftype-fields xany cevent (type serial send-event d wid))))) (define cardinal-set! (lambda (wid atomprop value) (fmem ([num &num unsigned-32]) (foreign-set! 'unsigned-32 num 0 value) (x-change-property wid atomprop (x-atom 'ref 'CARDINAL) 32 0 num 1)))) (define ulongs-property-set! (lambda (wid atomprop ulongs typeatom) (let ([len (length ulongs)]) (cond [(fx>? len 0) (fmem ([mem &mem unsigned-long len]) (fill-memory/ulongs mem ulongs) (x-change-property wid atomprop typeatom 32 0 mem len))] [else (format (current-error-port) "#x~x deleting property ~a(~a)~n" wid (x-get-atom-name atomprop) atomprop) (x-delete-property wid atomprop)])))) (define property->string (lambda (wid propatom) (fmem ([tp &tp XTextProperty]) (let ([rc (x-get-text-property wid &tp propatom)]) (if (> rc 0) ;; success (let* (#;[enc (ftype-ref XTextProperty (encoding) &tp)] #;[num (ftype-ref XTextProperty (nitems) &tp)] [addr (ftype-pointer-address (ftype-ref XTextProperty (value) &tp))] [str (ptr->string addr)]) #;(display (format "encoding ~d:~s nitems ~d ~n" enc (x-get-atom-name enc) num)) (x-free addr) str) #f))))) (define property->string* (lambda (wid propatom) (fmem ([tp &tp XTextProperty]) (let ([rc (x-get-text-property wid &tp propatom)]) (if (> rc 0) ;; success (fmem ([nitems &nitems int] [text-list &text-list u8**]) (let* ([stat (xutf8-text-property-to-text-list &tp &text-list &nitems)] [res (ptr->utf8s text-list nitems)]) ;; TODO text-list foreign-ref is also calc'd in text-list->utf8s. Need to re-org. (x-free-string-list (foreign-ref 'void* text-list 0)) res)) (list)))))) ;; Return list/pair (address length) of property memory data or #f on failure. ;; Caller *Must* foreign-free returned address. (define get-property-ptr (lambda (wid propatom atomtype) (fmem ([atr &atr atom] ;; atr = actual type return [afr &afr int] ;; afr = actual format return [nir &nir unsigned-long] ;; nir = number of items return [bar &bar unsigned-long]) ;; bar = bytes after return ;; pr = property return ;; declared outside fmem as ownership is transferred to caller. (let* ([pr (foreign-alloc (ftype-sizeof void*))] [&pr (make-ftype-pointer void* pr)] [rc (x-get-window-property wid propatom 0 2048 #f atomtype &atr &afr &nir &bar &pr)]) (cond [(= rc 0) ;; maybe success: make sure there was something returned. (let ([len (foreign-ref 'unsigned-long nir 0)]) (cond [(> len 0) ;; more success: return data ptr and length. (values pr len)] [else ;; nothing back, free memory and return. (x-free (foreign-ref 'void* pr 0)) (foreign-free pr) (values #f #f)]))] [else ;; failure: return false. (values #f #f)]))))) ;; window property to list of unsigned longs. (define property->ulongs (lambda (wid propatom atomtype) (let-values ([(ptr len) (get-property-ptr wid propatom atomtype)]) (cond [ptr (let* ([*ptr (foreign-ref 'void* ptr 0)] [nums (ptr->ulongs *ptr len)]) (x-free *ptr) (foreign-free ptr) nums)] [else ;; failure: return empty. (list)])))) (define text-property-set! (lambda (wid string-list propatom) (fmem ([tp &tp XTextProperty]) (let ([u8mem (str*->u8** string-list)]) (let ([rc (xutf8-text-list-to-text-property u8mem (length string-list) UTF8String &tp)]) (if (fx= rc 0) (x-set-text-property wid &tp propatom)) (free/u8** u8mem (length string-list)) (x-free (ftype-pointer-address (void*-cast (ftype-ref XTextProperty (value) &tp))))))))) (define-syntax first-or-false (syntax-rules () [(_ ls) (let ([als ls]) (and (pair? als) (car als)))])) (define-syntax define-root-property (lambda (x) (syntax-case x () [(_ name prop-sym atom-id atom-type) (case (syntax->datum #'prop-sym) [(ulong/list) #'(define-syntax name (identifier-syntax [id (property->ulongs (root) atom-id atom-type)] [(set! id value) (ulongs-property-set! (root) atom-id value atom-type)]))] [(ulong) #'(define-syntax name (identifier-syntax [id (first-or-false (property->ulongs (root) atom-id atom-type))] [(set! id value) (ulongs-property-set! (root) atom-id (list value) atom-type)]))])] [(_ name prop-sym atom-id) (case (syntax->datum #'prop-sym) [(string/list) #'(define-syntax name (identifier-syntax [id (property->string* (root) atom-id)] [(set! id value) (text-property-set! (root) value atom-id)]))] [(string) #'(define-syntax name (identifier-syntax [id (first-or-false (property->string* (root) atom-id))] [(set! id value) (text-property-set! (root) (list value) atom-id)]))])]))) (define send-message-cardinal (lambda (root wid atom value) (fmem ([ev &ev XEvent]) (let ([event-mask (fxlogor SubstructureNotify SubstructureRedirect)]) (ftype-set! XEvent (client-message xany type) &ev ClientMessage) (ftype-set! XEvent (client-message xany wid) &ev wid) (ftype-set! XEvent (client-message xany send-event) &ev #t) (ftype-set! XEvent (client-message message-type) &ev atom) (ftype-set! XEvent (client-message format) &ev 32) (ftype-set! XEvent (client-message data l 0) &ev value) (ftype-set! XEvent (client-message data l 1) &ev 0) ;; zero out. (x-send-event root #f event-mask &ev))))) )
true
42c498f40d26a3da607d025b88af7e98c7ed4c49
9b2eb10c34176f47f7f490a4ce8412b7dd42cce7
/scripts/nmosh/rip-global-defs.sps
1dfa682a99a88485d13b96a6e6bc87a5a54b9a9d
[ "LicenseRef-scancode-public-domain", "CC0-1.0" ]
permissive
okuoku/yuni
8be584a574c0597375f023c70b17a5a689fd6918
1859077a3c855f3a3912a71a5283e08488e76661
refs/heads/master
2023-07-21T11:30:14.824239
2023-06-11T13:16:01
2023-07-18T16:25:22
17,772,480
36
6
CC0-1.0
2020-03-29T08:16:00
2014-03-15T09:53:13
Scheme
UTF-8
Scheme
false
false
555
sps
rip-global-defs.sps
(import (rnrs) (match) (yuni util files)) #| (import (yuni scheme) (yuni util files) (yuni base match)) |# (define BASELIB-FILE "../../../mosh/boot/baselib.scm") (define baselib (file->sexp-list BASELIB-FILE)) (define names '()) (define (proc e) (match e (('define (name . bogus1) . bogus2) (set! names (cons name names))) (('define name . bogus) (set! names (cons name names))) (else 'do-nothing))) (for-each proc baselib) (for-each (lambda (e) (display e)(newline)) names) (newline)
false
358754cb47d89a5277768263f5fa055111584eab
5653331d0f31dc3cb4a5d67ba6c074235fff7537
/docfiler/tap.scm
93be98543e465d28000689d6f5e5642bb56de580
[]
no_license
mikey-austin/docfiler
46127c6b2e8005fe19be9ab0c5ffb5f57554cfb9
d075e346686d7a4ec9cf98758292bfb6bf7b5c72
refs/heads/master
2020-04-29T22:37:41.119411
2019-03-25T12:47:40
2019-03-25T12:47:40
176,453,824
0
0
null
null
null
null
UTF-8
Scheme
false
false
2,812
scm
tap.scm
;;; Commentary: ;; Super basic TAP class (test anything protocol). ;;; Code: (define-module (docfiler tap) #:use-module (ice-9 textual-ports) #:use-module (oop goops) #:use-module (oop goops describe) #:export (<tap-test-collection> run-tests register-test register-todo register-skip is-ok is-eq)) (define-class <tap-test-collection> () (tests #:init-value '()) (num-ok #:init-value 0) (num-failed #:init-value 0)) (define-method (test-ok (t <tap-test-collection>) (desc <string>) (test-number <number>)) (slot-set! t 'num-ok (+ 1 (slot-ref t 'num-ok))) (format #t "ok ~a - ~a~%" test-number desc)) (define-method (test-failed (t <tap-test-collection>) (desc <string>) (test-number <number>)) (slot-set! t 'num-failed (+ 1 (slot-ref t 'num-failed))) (format #t "not ok ~a - ~a~%" test-number desc)) (define-method (print-tap-header (t <tap-test-collection>)) (let ((num-tests (length (slot-ref t 'tests)))) (format #t "1..~a~%" num-tests))) (define-method (next-test-number (t <tap-test-collection>)) (+ 1 (length (slot-ref t 'tests)))) (define (register-with-diag t desc test-code diag explanation) (register-test t (format #f "~a # ~a ~a" desc diag explanation) test-code)) ;; Exported routines. (define (register-skip t desc test-code explanation) "Do not run the supplied test code, but instead output a SKIP diagnostic and mark as successful" (register-with-diag t desc (lambda () #t) "SKIP" explanation)) (define (register-todo t desc test-code explanation) (register-with-diag t desc test-code "TODO" explanation)) (define-method (register-test (t <tap-test-collection>) (desc <string>) (test-code <procedure>)) "Register a deferred test to be run later by the `run-tests' routine." (let ((test-number (next-test-number t))) (slot-set! t 'tests (cons (lambda () (if (test-code) (test-ok t desc test-number) (test-failed t desc test-number))) (slot-ref t 'tests))))) (define-method (run-tests (t <tap-test-collection>)) "Execute all deferred registered tests and keep track of the number of failed and successful tests. Also output the results in TAP output." (print-tap-header t) (for-each (lambda (t) (t)) (reverse (slot-ref t 'tests)))) (define-syntax is-eq (syntax-rules () ((_ expected expr) (lambda () (equal? expected expr))))) (define-syntax is-ok (syntax-rules () ((_ expr) (is-eq #t expr)))) ;;; tap.scm ends here
true
1b5a28a7cc2288e86d944628ebe6f5f489493ac6
ece1c4300b543df96cd22f63f55c09143989549c
/Chapter4/Exercise4.48.scm
9571d0798ebe3bf6fc0e3a5f2186d2e27863b914
[]
no_license
candlc/SICP
e23a38359bdb9f43d30715345fca4cb83a545267
1c6cbf5ecf6397eaeb990738a938d48c193af1bb
refs/heads/master
2022-03-04T02:55:33.594888
2019-11-04T09:11:34
2019-11-04T09:11:34
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
4,297
scm
Exercise4.48.scm
; Exercise 4.48: Extend the grammar given above to handle more complex sentences. For example, you could extend noun phrases and verb phrases to include adjectives and adverbs, or you could handle compound sentences.257 (load "/Users/soulomoon/git/SICP/Chapter4/zch4-ambeval.scm") (interpret '(define adjectives '(adjective happy sad))) (interpret '(define adverbs '(adverb happily saddly))) (interpret '(define (require p) (if (not p) (amb)))) (interpret '(define nouns '(noun student professor cat class))) (interpret '(define verbs '(verb studies lectures eats sleeps))) (interpret '(define prepositions '(prep for to in by with))) (interpret '(define articles '(article the a))) ; (interpret '(define (parse-sentence) ; (list 'sentence ; (parse-noun-phrase) ; (parse-word verbs))) ; (interpret '(define (parse-noun-phrase) ; (list 'noun-phrase ; (parse-word articles) ; (parse-word nouns))) (interpret '(define (parse-word word-list) (require (not (null? *unparsed*))) (require (memq (car *unparsed*) (cdr word-list))) (let ((found-word (car *unparsed*))) (set! *unparsed* (cdr *unparsed*)) (list (car word-list) found-word)))) (interpret '(define (parse-sentence) (list 'sentence (parse-noun-phrase) (parse-verb-phrase)))) (interpret '(define (parse-prepositional-phrase) (list 'prep-phrase (parse-word prepositions) (parse-noun-phrase)))) ; (interpret '(define (parse-verb-phrase) ; (define (maybe-extend verb-phrase) ; (amb ; verb-phrase ; (maybe-extend ; (list 'verb-phrase ; verb-phrase ; (parse-prepositional-phrase))))) ; (maybe-extend (parse-word verbs)))) ; (interpret '(define (parse-noun-phrase) ; (define (maybe-extend noun-phrase) ; (amb ; noun-phrase ; (maybe-extend ; (list 'noun-phrase ; noun-phrase ; (parse-prepositional-phrase))))) ; (maybe-extend (parse-simple-noun-phrase)))) ; (interpret '(define (parse-simple-noun-phrase) ; (list 'simple-noun-phrase ; (parse-word articles) ; (parse-word nouns)))) (interpret '(define *unparsed* '())) (interpret '(define (parse input) (set! *unparsed* input) (let ((sent (parse-sentence))) (require (null? *unparsed*)) sent))) (define (make-interpret) (let ((try false)) (define (interpret-rm input) (newline ) (if (eq? input 'try-again) (try) (ambeval input the-global-environment ;; ambeval success (lambda (val next-alternative) (set! try next-alternative) val) ;; ambeval failure (lambda () (newline) (display "fail") (newline)))) ) interpret-rm ) ) (define interpret (make-interpret)) (define (try-again) (newline )(interpret 'try-again)) (interpret '(define (parse-noun-phrase) (define (maybe-extend noun-phrase) (amb noun-phrase (maybe-extend (list 'noun-phrase noun-phrase (parse-prepositional-phrase))))) (maybe-extend (parse-simple-noun-phrase)))) (interpret '(define (parse-simple-noun-phrase) (list 'simple-noun-phrase (parse-word articles) (parse-adjective-noun-phrase)))) (interpret '(define (parse-adjective-noun-phrase) (amb (parse-word nouns) (list 'djective-noun-phrase (parse-word adjectives) (parse-adjective-noun-phrase))))) (interpret '(define (parse-verb-phrase) (define (maybe-extend verb-phrase) (amb verb-phrase (maybe-extend (list 'verb-phrase verb-phrase (parse-prepositional-phrase))))) (maybe-extend (parse-adverb-verb-phrase)))) (interpret '(define (parse-adverb-verb-phrase) (amb (parse-word verbs) (list 'adverb-verb-phrase (parse-word adverbs) (parse-adverb-verb-phrase))))) (interpret '(display (parse '(the happy professor saddly lectures to the student in the class with the cat)))) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again) (try-again)
false
57eb00a9567abd123c1fefdbdd4597f5614ebe44
000dbfe5d1df2f18e29a76ea7e2a9556cff5e866
/sitelib/text/markdown/parser/blocks.scm
b5c140bfb2d05854c028b4fbefd36b41ba09f8f8
[ "BSD-3-Clause", "LicenseRef-scancode-other-permissive", "MIT", "BSD-2-Clause" ]
permissive
ktakashi/sagittarius-scheme
0a6d23a9004e8775792ebe27a395366457daba81
285e84f7c48b65d6594ff4fbbe47a1b499c9fec0
refs/heads/master
2023-09-01T23:45:52.702741
2023-08-31T10:36:08
2023-08-31T10:36:08
41,153,733
48
7
NOASSERTION
2022-07-13T18:04:42
2015-08-21T12:07:54
Scheme
UTF-8
Scheme
false
false
18,645
scm
blocks.scm
;;; -*- mode:scheme; coding:utf-8 -*- ;;; ;;; text/markdown/parser/blocks.scm - Block parsers ;;; ;;; Copyright (c) 2022 Takashi Kato <[email protected]> ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributions of source code must retain the above copyright ;;; notice, this list of conditions and the following disclaimer. ;;; ;;; 2. Redistributions in binary form must reproduce the above copyright ;;; notice, this list of conditions and the following disclaimer in the ;;; documentation and/or other materials provided with the distribution. ;;; ;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ;;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ;;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ;;; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ;;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ;;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED ;;; TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ;;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ;;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;; #!nounbound (library (text markdown parser blocks) (export make-parser-state parser-state? parser-state-document parser-state-line parser-state-line-set! parser-state-line-index parser-state-line-index-set! parser-state-index parser-state-index-set! parser-state-next-non-space-index parser-state-next-non-space-index-set! parser-state-column parser-state-column-set! parser-state-indent parser-state-indent-set! parser-state-blank? parser-state-blank?-set! parser-state:active-block-parser block-continue? block-continue-index block-continue-column block-continue-finalize? block-continue:none block-continue:at-index block-continue:at-column block-continue:finished (rename (block-parser <block-parser>)) block-parser? block-parser-block block-parser-container? block-parser-allow-lazy-continuation-line? block-parser:can-contain? block-parser:try-continue block-parser:add-line! block-parser:add-source-location! block-parser:close-block! block-parser:parse-inlines! (rename (default-add-location! block-parser-default-add-location!) (default-parse-inlines! block-parser-default-parse-inlines!) (default-add-line! block-parser-default-add-line!) (default-close-block! block-parser-default-close-block!)) (rename (definition-parser <definition-parser>)) definition-parser? definition-parser:definitions make-matched-block-parser matched-block-parser? matched-block-parser:get matched-block-parser:paragraph-lines make-document-block-parser document-block-parser? make-paragraph-parser paragraph-parser? paragraph-parser-paragraph-lines ;; paragraph-parser-definitions make-heading-parser heading-parser? make-thematic-break-parser thematic-break-parser? make-indented-code-block-parser indented-code-block-parser? make-fenced-code-block-parser fenced-code-block-parser? make-html-block-parser html-block-parser? make-block-quote-parser block-quote-parser? block-quote-parser:marker? make-list-block-parser list-block-parser? make-list-item-parser list-item-parser? ) (import (rnrs) (core misc) (srfi :1 lists) (srfi :13 strings) (srfi :115 regexp) (srfi :117 list-queues) (text markdown parser escaping) (text markdown parser inlines) (text markdown parser nodes) (text markdown parser parsing) (text markdown parser source) (text markdown parser link-reference)) ;; parser state ;; mutaable object passed from document-parser (define-vector-type parser-state (make-parser-state document line line-index index column next-non-space-index indent blank? active-block-parser) parser-state? (document parser-state-document) ;; Markdown document (line parser-state-line parser-state-line-set!) (line-index parser-state-line-index parser-state-line-index-set!) (index parser-state-index parser-state-index-set!) (column parser-state-column parser-state-column-set!) (next-non-space-index parser-state-next-non-space-index parser-state-next-non-space-index-set!) (indent parser-state-indent parser-state-indent-set!) (blank? parser-state-blank? parser-state-blank?-set!) (active-block-parser parser-state-active-block-parser)) (define (parser-state:active-block-parser ps) ((parser-state-active-block-parser ps))) (define-vector-type block-continue (make-block-continue index column finished?) block-continue? (index block-continue-index) (column block-continue-column) (finished? block-continue-finalize?)) (define (block-continue:none) #f) (define (block-continue:at-index index) (make-block-continue index -1 #f)) (define (block-continue:at-column column) (make-block-continue -1 column #f)) (define (block-continue:finished) (make-block-continue -1 -1 #t)) ;; parsers are stateful, so each time we create one (define-record-type block-parser (fields block container? allow-lazy-continuation-line? can-contain? try-continue add-line add-source-location close-block parse-inlines)) (define (block-parser:can-contain? bp child) ((block-parser-can-contain? bp) bp child)) (define (block-parser:try-continue bp parser-state) ((block-parser-try-continue bp) bp parser-state)) (define (block-parser:add-line! bp line) ((block-parser-add-line bp) bp line)) (define (block-parser:add-source-location! bp source-location) ((block-parser-add-source-location bp) bp source-location)) (define (block-parser:close-block! bp) ((block-parser-close-block bp) bp)) (define (block-parser:parse-inlines! bp inline-parser) ((block-parser-parse-inlines bp) bp inline-parser)) (define-record-type matched-block-parser (fields block-parser)) (define (matched-block-parser:get mbs) (matched-block-parser-block-parser mbs)) (define (matched-block-parser:paragraph-lines mbs) (let ((bs (matched-block-parser:get mbs))) (if (paragraph-parser? bs) (paragraph-parser-paragraph-lines bs) (source-lines:empty)))) (define (false . ignore) #f) ;; for convenience (define (true . ignore) #t) ;; for convenience (define (default-add-line! self line) ) (define (default-add-location! self loc) (markdown-node:add-source-location! (block-parser-block self) loc)) (define (default-close-block! self) ) (define (default-parse-inlines! self inline-parser) ) ;;; document block parser (define-record-type document-block-parser (parent block-parser) (protocol (lambda (n) (lambda () ((n (make-markdown-document) #t #f true (lambda (self ps) (block-continue:at-index (parser-state-index ps))) default-add-line! default-add-location! default-close-block! default-parse-inlines!)))))) ;;; paragraph parser (define-record-type definition-parser (parent block-parser) (fields get-definitions)) (define (definition-parser:definitions p) ((definition-parser-get-definitions p) p)) (define-record-type paragraph-parser (parent definition-parser) (fields link-reference-definition-parser) (protocol (lambda (n) (lambda (document) ((n (make-paragraph-node document) #f #t false (lambda (self ps) (if (parser-state-blank? ps) (block-continue:none) (block-continue:at-index (parser-state-index ps)))) (lambda (self line) (let ((p (paragraph-parser-link-reference-definition-parser self))) (link-reference-definition-parser:parse! p line))) (lambda (self loc) (let ((p (paragraph-parser-link-reference-definition-parser self))) (link-reference-definition-parser:add-source-location! p loc))) (lambda (self) (let* ((p (paragraph-parser-link-reference-definition-parser self)) (l* (link-reference-definition-parser:paragraph-lines p)) (b (block-parser-block self))) (if (source-lines:empty? l*) (markdown-node:unlink! b) (markdown-node:source-locations-set! b (link-reference-definition-parser-source-locations p))))) (lambda (bp inline-parser) (let* ((p (paragraph-parser-link-reference-definition-parser bp)) (l* (link-reference-definition-parser:paragraph-lines p))) (unless (source-lines:empty? l*) (inline-parser:parse! inline-parser l* (block-parser-block bp)))))) paragraph-parser-definitions (make-link-reference-definition-parser)))))) (define (paragraph-parser-paragraph-lines pl) (define lrdp (paragraph-parser-link-reference-definition-parser pl)) (link-reference-definition-parser:paragraph-lines lrdp)) (define (paragraph-parser-definitions pl) (define lrdp (paragraph-parser-link-reference-definition-parser pl)) (link-reference-definition-parser:definitions lrdp)) ;;; heading parser (define-record-type heading-parser (parent block-parser) (fields content) (protocol (lambda (n) (lambda (document level content) ((n (make-heading-node document (number->string level)) #f #f false (lambda (self ps) (block-continue:none)) default-add-line! default-add-location! default-close-block! (lambda (self inline-parser) (inline-parser:parse! inline-parser (heading-parser-content self) (block-parser-block self)))) content))))) ;;; thematic break parser (define-record-type thematic-break-parser (parent block-parser) (protocol (lambda (n) (lambda (document) ((n (make-thematic-break-node document) #f #f false (lambda (self ps) (block-continue:none)) default-add-line! default-add-location! default-close-block! default-parse-inlines!)))))) ;;; indented code block parser (define-record-type indented-code-block-parser (parent block-parser) (fields lines) (protocol (lambda (n) (lambda (document) ((n (make-code-block-node document #f) #f #f false (lambda (self ps) (cond ((>= (parser-state-indent ps) +parsing-code-block-indent+) (block-continue:at-column (+ (parser-state-column ps) +parsing-code-block-indent+))) ((parser-state-blank? ps) (block-continue:at-index (parser-state-next-non-space-index ps))) (else (block-continue:none)))) (lambda (self line) (let ((lines (indented-code-block-parser-lines self))) (list-queue-add-back! lines (source-line-content line)))) default-add-location! (lambda (self) (define (strip-last-blanks lines) (let loop ((lines (reverse! (list-queue-list lines)))) (cond ((null? lines) '()) ((string-index (car lines) (lambda (c) (not (char-whitespace? c)))) (reverse! lines)) (else (loop (cdr lines)))))) (let ((lines (strip-last-blanks (indented-code-block-parser-lines self)))) (code-block-node:literal-set! (block-parser-block self) (string-append (string-join lines "\n") "\n")))) default-parse-inlines!) (list-queue)))))) ;;; fenced code block parser (define-record-type fenced-code-block-parser (parent block-parser) (fields (mutable first-line) other-lines) (protocol (lambda (n) (lambda (document fence-char fence-length fence-indent) (define (closing? block line index) (define fc (fenced-code-block-node-fence-char block)) (define fl (fenced-code-block-node-fence-length block)) (define content (source-line-content line)) (define e (string-length content)) (let ((fences (- (or (string-skip content fc index) e) index))) (and (>= fences fl) (let ((after (or (string-skip content parsing:space/tab? (+ index fences)) e))) (= after e))))) (define (adjust-index block line new-index) (define fi (fenced-code-block-node-fence-indent block)) (do ((i fi (- i 1)) (ni new-index (+ ni 1)) (len (source-line:length line))) ((or (<= i 0) (<= len ni) (not (eqv? (source-line:char-at line ni) #\space))) ni))) ((n (make-fenced-code-block-node document #f fence-char fence-length fence-indent) #f #f false (lambda (self ps) (let ((nns (parser-state-next-non-space-index ps)) (ni (parser-state-index ps)) (line (parser-state-line ps)) (block (block-parser-block self))) (if (and (< (parser-state-indent ps) +parsing-code-block-indent+) (< nns (source-line:length line)) (eqv? (source-line:char-at line nns) (fenced-code-block-node-fence-char block)) (closing? block line nns)) (block-continue:finished) (block-continue:at-index (adjust-index block line ni))))) (lambda (self line) (let ((c (source-line-content line))) (if (fenced-code-block-parser-first-line self) (list-queue-add-back! (fenced-code-block-parser-other-lines self) c) (fenced-code-block-parser-first-line-set! self c)))) default-add-location! (lambda (self) (define (get-info first) (let ((escaped (escaping:unescape (or (and (not (string-null? first)) first) "")))) (and (> (string-length escaped) 0) escaped))) (define (get-literal others) (define s* (list-queue-list others)) (if (null? s*) "" (string-append (string-join s* "\n") "\n"))) (let ((block (block-parser-block self)) (first (string-trim-both (fenced-code-block-parser-first-line self))) (others (fenced-code-block-parser-other-lines self))) (code-block-node-info-set! block (get-info first)) (code-block-node:literal-set! block (get-literal others)))) default-parse-inlines!) #f (list-queue)))))) ;;; HTML block parser (define-record-type html-block-parser (parent block-parser) (fields closing-pattern (mutable finished?) content) (protocol (lambda (n) (lambda (document closing-pattern) ((n (make-html-block-node document) #f #f false (lambda (self ps) (if (or (html-block-parser-finished? self) (and (parser-state-blank? ps) (not (html-block-parser-closing-pattern self)))) (block-continue:none) (block-continue:at-index (parser-state-index ps)))) (lambda (self line) (define str (source-line-content line)) (list-queue-add-back! (html-block-parser-content self) str) (let ((re (html-block-parser-closing-pattern self))) (when (and (regexp? re) (regexp-search re str)) (html-block-parser-finished?-set! self #t)))) default-add-location! (lambda (self) (let ((block (block-parser-block self)) (content (html-block-parser-content self))) (html-block-node:literal-set! block (string-join (list-queue-list content) "\n")))) default-parse-inlines!) closing-pattern #f (list-queue)))))) ;;; Container blocks ;;; Block quote parser (define (block-quote-parser:marker? ps index) (let ((line (parser-state-line ps))) (and (< (parser-state-indent ps) +parsing-code-block-indent+) (< index (source-line:length line)) (eqv? (source-line:char-at line index) #\>)))) (define-record-type block-quote-parser (parent block-parser) (protocol (lambda (n) (lambda (document) ((n (make-block-quote-node document) #t #f true (lambda (self ps) (let ((nns (parser-state-next-non-space-index ps))) (if (block-quote-parser:marker? ps nns) (let ((col (+ (parser-state-column ps) (parser-state-indent ps) 1)) (line (parser-state-line ps))) (block-continue:at-column (if (parsing:space/tab? (source-line:char-at line (+ nns 1))) (+ col 1) col))) (block-continue:none)))) default-add-line! default-add-location! default-close-block! default-parse-inlines!)))))) ;;; List block parser (define-record-type list-block-parser (parent block-parser) (fields (mutable had-blank-line?) (mutable lines-after-blank)) (protocol (lambda (n) (lambda (list-block) ((n list-block #t #f (lambda (self block) (define (update! self block) (when (and (list-block-parser-had-blank-line? self) (= (list-block-parser-lines-after-blank self) 1)) (list-node-tight-set! block "false") (list-block-parser-had-blank-line?-set! self #f)) #t) (and (item-node? block) (update! self (block-parser-block self)))) (lambda (self ps) (cond ((parser-state-blank? ps) (list-block-parser-had-blank-line?-set! self #t) (list-block-parser-lines-after-blank-set! self 0)) ((list-block-parser-had-blank-line? self) (let ((n (list-block-parser-lines-after-blank self))) (list-block-parser-lines-after-blank-set! self (+ n 1))))) (block-continue:at-index (parser-state-index ps))) default-add-line! default-add-location! default-close-block! default-parse-inlines!) #f -1))))) (define-record-type list-item-parser (parent block-parser) (fields content-indent (mutable had-blank-line?)) (protocol (lambda (n) (lambda (document content-indent) ((n (make-item-node document) #t #f (lambda (self block) (when (list-item-parser-had-blank-line? self) (let ((parent (markdown-node-parent (block-parser-block self)))) (when (list-node? parent) (list-node-tight-set! parent "false")))) #t) (lambda (self ps) (cond ((parser-state-blank? ps) (let ((block (block-parser-block self))) (if (null? (markdown-node:children block)) (block-continue:none) (let ((active-block (block-parser-block (parser-state:active-block-parser ps)))) (list-item-parser-had-blank-line?-set! self (or (paragraph-node? active-block) (item-node? active-block))) (block-continue:at-index (parser-state-next-non-space-index ps)))))) ((>= (parser-state-indent ps) (list-item-parser-content-indent self)) (block-continue:at-column (+ (parser-state-column ps) (list-item-parser-content-indent self)))) (else (block-continue:none)))) default-add-line! default-add-location! default-close-block! default-parse-inlines!) content-indent #f))))) )
false
2a23c580dff9e6809f5d2a2e2be4e4e33d3d9f88
13b5f31e63477c3db8d3a77ae8c814b16534f684
/network-graph/network-graph.ss
f02f09b24761aa025a3e73c471454bd6dd2edab4
[ "MIT" ]
permissive
hinkelman/dataframe
946163db48e426bbdb504f6ef2b307f640584937
06b370fd1877f1d9ab44dd62166304ebfa799fac
refs/heads/master
2023-09-01T00:03:24.511922
2023-07-10T04:31:18
2023-07-10T04:31:18
249,494,173
16
4
NOASSERTION
2021-04-24T05:34:18
2020-03-23T17:09:28
Scheme
UTF-8
Scheme
false
false
4,234
ss
network-graph.ss
;; procedures ------------------------------------------------------ (define (remove-duplicates ls) (let loop ([ls ls] [results '()]) (cond [(null? ls) (reverse results)] [(member (car ls) results) (loop (cdr ls) results)] [else (loop (cdr ls) (cons (car ls) results))]))) ;; parts must be strings (define (make-rel-path . parts) (let ([ds (string (directory-separator))]) (let loop ([parts parts] [out "."]) (if (null? parts) out (loop (cdr parts) (string-append out ds (car parts))))))) ;; read source code (define (read-sls path) (with-input-from-file path read)) ;; get all procedure definitions (define (get-defs lst) (filter (lambda (x) (and (pair? x) (symbol=? (car x) 'define))) lst)) ;; name is the procedure name ;; def is one element of the list from get-defs (define (get-name def) (if (pair? (cadr def)) (caadr def) ;; cadr version for definitions using lambda or case-lambda (cadr def))) ;; names-nums is list of pairs comprised of a procedure name and its arbitrary id # ;; returns list of pairs using the procedure id numbers (define (get-edges def names-nums) (let* ([name (get-name def)] [num (cdr (assoc name names-nums))] [out (let loop ([body (cddr def)] [results '()]) (cond [(null? body) results] [(not (pair? body)) (let ([name-num (assoc body names-nums)]) (if name-num (cons (cdr name-num) results) results))] [else (loop (car body) (loop (cdr body) results))]))]) (map (lambda (x) (cons num x)) (remove-duplicates out)))) (define (write-pairs lst car-proc cdr-proc path) (let ([p (open-output-file path)]) (let loop ([lst lst]) (cond [(null? lst) (close-port p)] [else (put-string p (string-append (car-proc (caar lst)) (string #\tab) (cdr-proc (cdar lst)))) (newline p) (loop (cdr lst))])))) ;; data processing --------------------------------------------------------- ;; assumes that you are working in main dataframe directory (import (dataframe)) (define fldr "dataframe") (define files (directory-list fldr)) (define defs-by-file (map (lambda (file) (cons file (-> (make-rel-path fldr file) (read-sls) (get-defs)))) files)) (define names-by-file (apply append (map (lambda (dbf) (map (lambda (x) (cons (car dbf) x)) (map get-name (cdr dbf)))) defs-by-file))) ;; a few procedures are constructed and exported without being defined (define exported-names-by-file (apply append (map (lambda (file) (map (lambda (x) (cons file x)) (cdaddr (read-sls (make-rel-path fldr file))))) files))) (define all-names-by-file (remove-duplicates (append exported-names-by-file names-by-file))) ;; names need to be strings for sorting ;; names need to be symbols for lookup in get-edges (define all-names (let* ([an (map cdr all-names-by-file)] [an-str (list-sort (lambda (x y) (string<? x y)) (map symbol->string an))]) (map (lambda (name num) (cons name num)) (map string->symbol an-str) (enumerate all-names-by-file)))) (define defs (apply append (map cdr defs-by-file))) (define edges (apply append (map (lambda (def) (get-edges def all-names)) defs))) (write-pairs edges (lambda (x) (number->string x)) (lambda (x) (number->string x)) (make-rel-path "network-graph" "Edges.tsv")) (write-pairs all-names (lambda (x) (symbol->string x)) (lambda (x) (number->string x)) (make-rel-path "network-graph" "Nodes.tsv")) (write-pairs all-names-by-file (lambda (x) x) (lambda (x) (symbol->string x)) (make-rel-path "network-graph" "NodesByFile.tsv")) (exit)
false
5171073a7f4e044143c775dc59b7b2b7021d19bd
a06c4ebcd2d6fe5999ed5b47403c5d8872be9334
/sitelib/srfi/srfi-38.scm
089ab7943d07f589734b27490221b1cec3592c24
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
objectx/digamma
b5ea911cc62c952e7040e1dff173ea4aee017c11
6c84760620cf578afadbb3fac27f0fd2add3ce3d
refs/heads/master
2020-12-04T07:34:23.927006
2020-02-11T06:06:44
2020-02-11T06:06:44
231,679,411
0
0
BSD-2-Clause
2020-01-03T23:02:57
2020-01-03T23:02:56
null
UTF-8
Scheme
false
false
246
scm
srfi-38.scm
#!nobacktrace (library (srfi srfi-38) (export write-with-shared-structure read-with-shared-structure (rename (write-with-shared-structure write/ss) (read-with-shared-structure read/ss))) (import (core)))
false
0ad3984e76e3eadc5a326dc60f04c01e32333636
e274a2d8e7c094faa086f1f0a2a0530fc1113b90
/ch03/Example/Random.scm
f8af4ece4ff4fd05a30615e5c64487063aeb9a12
[ "MIT" ]
permissive
happyo/sicp
9b4def6f235ff287fd29dc9b42b0f0fea142bdc1
baeca9f87560daac58dacd1d548adfec7eaab260
refs/heads/master
2021-06-24T15:20:53.986908
2020-09-25T07:10:46
2020-09-25T07:10:46
131,562,767
0
1
null
null
null
null
UTF-8
Scheme
false
false
446
scm
Random.scm
(load "Stream.scm") (define rand (let ((x random-init)) (lambda () (set! x (random-update x)) x))) (define random-numbers (cons-stream random-init (stream-map random-update random-numbers))) ;; A functional-programming view of time (define (stream-withdraw balance amount-stream) (cons-stream balance (stream-withdraw (- balance (stream-car amount-stream)) (stream-cdr amount-stream))))
false
84d3bca615996131dcc3dfc015f5471fc66a81d3
9f4da04b0e19af0d4ebeef6eec58c3c2028e96d9
/calysto_scheme/src/scheme-ds.ss
5b70346dd28cdfb366dec1050d77df2b0fb47358
[ "BSD-3-Clause" ]
permissive
Calysto/calysto_scheme
2b740778e2701e2e7ec2334a7fe11ccd01903a51
fab33b57850aa2d86159e3b38c1365f01701b34f
refs/heads/master
2023-09-03T03:53:02.661188
2023-09-02T15:32:38
2023-09-02T15:32:38
33,034,377
277
26
BSD-3-Clause
2023-09-08T22:53:44
2015-03-28T13:29:52
Scheme
UTF-8
Scheme
false
false
30
ss
scheme-ds.ss
(load "source-ds.ss") (start)
false
e84b3c0dc0a73dd7005303fd91271a1ad422c359
b780251bb60ae41f158cff824973c5dba9f3288d
/lambda.yy.scm
339b2cf7004180e625c8ca9302f10c042ea4b5c8
[]
no_license
drewt/Church
2bb742bf37cbe4c95e1386b87dcfe197d5fe4d9d
90b32d12bf65684665b4d87f744ee4ded63418e6
refs/heads/master
2020-06-02T09:08:06.236411
2014-04-19T00:58:40
2014-04-19T01:10:03
18,859,972
0
0
null
null
null
null
UTF-8
Scheme
false
false
3,476
scm
lambda.yy.scm
(require-extension lalr-driver) (define lambda-parser (lr-driver '#(((*default* *error*) (ID 3) (LAMBDA 2) (LPAREN 1)) ((*default* *error*) (ID 3) (LAMBDA 2) (LPAREN 1)) ((*default* *error*) (ID 3)) ((*default* -6)) ((*default* -3)) ((*default* -2)) ((*default* *error*) (*eoi* 11) (ID 3) (LPAREN 10)) ((*default* *error*) (ID 3) (LPAREN 10) (RPAREN 14)) ((*default* *error*) (DOT 15)) ((*default* -7) (ID 3)) ((*default* *error*) (ID 3) (LAMBDA 2) (LPAREN 1)) ((*default* -1) (*eoi* accept)) ((*default* -5)) ((*default* -10)) ((*default* -4)) ((*default* *error*) (ID 3) (LAMBDA 2) (LPAREN 1)) ((*default* -8)) ((*default* *error*) (ID 3) (LPAREN 10) (RPAREN 19)) ((*default* -9) (ID 3) (LPAREN 10)) ((*default* -11))) (vector '((4 . 4) (2 . 5) (1 . 6)) '((4 . 4) (2 . 5) (1 . 7)) '((3 . 8) (2 . 9)) '() '() '() '((5 . 12) (2 . 13)) '((5 . 12) (2 . 13)) '() '((3 . 16) (2 . 9)) '((4 . 4) (2 . 5) (1 . 17)) '() '() '() '() '((4 . 4) (2 . 5) (1 . 18)) '() '((5 . 12) (2 . 13)) '((5 . 12) (2 . 13)) '()) (vector '() (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($2 (vector-ref ___stack (- ___sp 1))) ($1 (vector-ref ___stack (- ___sp 3)))) $1)) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($1 (vector-ref ___stack (- ___sp 1)))) (___push 1 1 $1))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($1 (vector-ref ___stack (- ___sp 1)))) (___push 1 1 $1))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($3 (vector-ref ___stack (- ___sp 1))) ($2 (vector-ref ___stack (- ___sp 3))) ($1 (vector-ref ___stack (- ___sp 5)))) (___push 3 1 $2))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($2 (vector-ref ___stack (- ___sp 1))) ($1 (vector-ref ___stack (- ___sp 3)))) (___push 2 1 (make-app $1 $2)))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($1 (vector-ref ___stack (- ___sp 1)))) (___push 1 2 (make-var $1)))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($1 (vector-ref ___stack (- ___sp 1)))) (___push 1 3 (cons $1 '())))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($2 (vector-ref ___stack (- ___sp 1))) ($1 (vector-ref ___stack (- ___sp 3)))) (___push 2 3 (cons $1 $2)))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($4 (vector-ref ___stack (- ___sp 1))) ($3 (vector-ref ___stack (- ___sp 3))) ($2 (vector-ref ___stack (- ___sp 5))) ($1 (vector-ref ___stack (- ___sp 7)))) (___push 4 4 (make-fun $2 $4)))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($1 (vector-ref ___stack (- ___sp 1)))) (___push 1 5 $1))) (lambda (___stack ___sp ___goto-table ___push yypushback) (let* (($3 (vector-ref ___stack (- ___sp 1))) ($2 (vector-ref ___stack (- ___sp 3))) ($1 (vector-ref ___stack (- ___sp 5)))) (___push 3 5 $2))))))
false
495fd4710b1ad4d2337b2441be51b23763c5e8d4
a7a99f1f9124d23b04558fdac002f9153079b9c0
/tests/modules/spn-equations.ss
58381b922745a64d275c05f7c7db90d4ec43ff0b
[]
no_license
stuhlmueller/sine
a451c3803283de220f3475dba4c6c1fcde883822
ce6ec938e8f46c31925f23b557284405c1ba0b11
refs/heads/master
2016-09-06T10:23:19.360983
2012-07-20T21:09:59
2012-07-20T21:10:11
3,517,254
4
0
null
null
null
null
UTF-8
Scheme
false
false
205
ss
spn-equations.ss
#!r6rs (import (rnrs) (scheme-tools) (sine spn-equations)) (define equations '((= x 1) (= y x) (= z (+ y 2)))) (for-each pretty-print (simplify-equations equations))
false
a8f34a5cbf19eb42ddca4363e3b26d4b5d78f2be
4f6a6e56a909ffdeb9c6a73790200a68f8f0c82c
/lib/tooling/tooling/explode.scm
1cdad3d8eaaeadfb554ade43ecec55fa5176fac6
[ "MIT" ]
permissive
eshoo/detroit-scheme
c5ddda1bc19ce85b87a309a2b36299e607e7da65
84c2333d1e04dd3425c2275da94375aedab34a9e
refs/heads/master
2021-01-24T23:11:27.991392
2010-03-02T02:21:45
2010-03-02T02:21:45
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
314
scm
explode.scm
; Copyright (c) 2009, Raymond R. Medeiros. All rights reserved. ; (explode symbol) ==> list ; ; Explode a symbol into a list of single-character symbols. ; ; Arguments: x - symbol to explode ; (define (explode x) (map (lambda (x) (string->symbol (string x))) (string->list (symbol->string x))))
false
6d2fda603232401515cb0f4cec5f5623dc5cde1f
971e9cb164ca5ca8bcc1b1da4d758b5e958d3c0f
/scheme-tests/torus.scm
254c1dbc61b9d3144b5eafa31ca752ba232a5fe6
[ "BSD-3-Clause" ]
permissive
lassik/upscheme
7c54210eb5172976db38fcfb56a3bb5d2c0be46f
61935bd866acb18902199bc4bc4cdd1760aa1ffc
refs/heads/master
2021-07-21T03:44:49.147081
2020-08-02T20:23:15
2020-08-02T20:23:15
201,488,401
4
0
null
null
null
null
UTF-8
Scheme
false
false
1,182
scm
torus.scm
(define (maplist f l) (if (null? l) () (cons (f l) (maplist f (cdr l))))) ; produce a beautiful, toroidal cons structure ; make m copies of a CDR-circular list of length n, and connect corresponding ; conses in CAR-circular loops ; replace maplist 'identity' with 'copy-tree' for rapdily exploding memory use (define (torus m n) (let* ((l (map-int identity n)) (g l) (prev g)) (dotimes (i (- m 1)) (set! prev g) (set! g (maplist identity g)) (set-cdr! (last-pair prev) prev)) (set-cdr! (last-pair g) g) (let ((a l) (b g)) (dotimes (i n) (set-car! a b) (set! a (cdr a)) (set! b (cdr b)))) l)) (define (cyl m n) (let* ((l (map-int identity n)) (g l)) (dotimes (i (- m 1)) (set! g (maplist identity g))) (let ((a l) (b g)) (dotimes (i n) (set-car! a b) (set! a (cdr a)) (set! b (cdr b)))) l)) (time (begin (write (torus 100 100)) ())) ;(time (dotimes (i 1) (load "100x100.scm"))) ; with ltable ; printing time: 0.415sec ; reading time: 0.165sec ; with ptrhash ; printing time: 0.081sec ; reading time: 0.0264sec
false
784dd11ceaa695c370378e03abbb98fa9ba2ab11
ac2a3544b88444eabf12b68a9bce08941cd62581
/lib/srfi/23/23.sld
e752d3267c39c8f866397729c1b864f6e42b4722
[ "Apache-2.0", "LGPL-2.1-only" ]
permissive
tomelam/gambit
2fd664cf6ea68859d4549fdda62d31a25b2d6c6f
d60fdeb136b2ed89b75da5bfa8011aa334b29020
refs/heads/master
2020-11-27T06:39:26.718179
2019-12-15T16:56:31
2019-12-15T16:56:31
229,341,552
1
0
Apache-2.0
2019-12-20T21:52:26
2019-12-20T21:52:26
null
UTF-8
Scheme
false
false
454
sld
23.sld
;;;============================================================================ ;;; File: "23.sld" ;;; Copyright (c) 1994-2019 by Marc Feeley, All Rights Reserved. ;;;============================================================================ ;;; SRFI 23, Error reporting mechanism (define-library (srfi 23) (namespace "") (export error) (include "23.scm")) ;;;============================================================================
false
24a477188109978c4b92136b143f4f454ee19eae
a66e9532257eb4441ab221ab55c08d5d28efe852
/PFS/scheme/TP_PFS_3bis.scm
dd9612bc28e31bf4ef7455fa682f5c450e9b44cc
[]
no_license
Erathriel/Cours_TP
9884710c61ae7e6a2fab56e50b191cf381913819
8108b447936dcb14d5085c342d38684f63d428e9
refs/heads/master
2022-04-02T10:23:11.405245
2020-02-03T16:18:32
2020-02-03T16:18:32
105,888,718
1
1
null
null
null
null
UTF-8
Scheme
false
false
10,908
scm
TP_PFS_3bis.scm
#!r7rs (import (scheme base) (scheme case-lambda) (scheme cxr) (scheme write)) (define (writeln/return x) ;; Fonction très utile pour pouvoir afficher un résultat suivi d'un passage ;; à la ligne, tout en pouvant récupérer ce résultat dans une variable. Les ;; trois expressions suivantes sont évaluées en séquence et la valeur de la ;; dernière est retournée. (write x) (newline) x) ;;; ========================================================================== ;;; Start (writeln/return (cons 0 1)) (writeln/return (cons 0.1 0.1)) (writeln/return (cons (cons 0.1 0.1) 1)) (writeln/return (cons 0.1 '())) (writeln/return (cons '() 0.1)) (writeln/return (cons '() '())) (define current-year 2017) (define next-year (+ current-year 1)) (define academic-year (cons current-year next-year)) (define academic-year-0 (cons current-year 'next-year)) (define academic-year-1 (cons 'current-year 'next-year)) (define operations (cons + -)) (define symbols (cons '+ '-)) (define two-numbers (cons 0 1)) (define something (cons (cons 0.1 0.1) 1)) (writeln/return academic-year) (writeln/return (quote academic-year)) (writeln/return 'academic-year) (writeln/return 'undefined) ;; (writeln/return undefined) (writeln/return +) (writeln/return '+) ;; (writeln/return (0 . 1)) (writeln/return '(0 . 1)) ;; (writeln/return (+ . 1)) (writeln/return '(+ . 1)) (writeln/return (car academic-year)) (writeln/return (cdr academic-year)) ;; (writeln/return (car next-year)) (writeln/return academic-year-0) (writeln/return (cdr academic-year-0)) (writeln/return academic-year-1) (writeln/return ((car operations) (car two-numbers) (cdr two-numbers))) ;; (writeln/return ((cdr symbols) (cdr two-numbers) (car two-numbers))) (writeln/return (cons (cdr symbols) (car two-numbers))) (writeln/return (cons (cdr operations) (cdr two-numbers))) (writeln/return ((cdr operations) (cdr two-numbers))) (writeln/return (car something)) (writeln/return (cdr (car something))) ;;(writeln/return (car (cdr something))) ;;; ========================================================================== ;;; From Pairs to Lists ; **** ;;; ========================================================================== ;;; Lists (writeln/return '(Sometime . ((to . ()) . ((() . miss) . (now . ()))))) ;;(writeln/return '(Everybody . ()) . (() . wants) . (somebody . ()))) (writeln/return '((Thats . ((() . ()) . why)) . ((() . I) . ((need . (you . baby)) . ())))) (writeln/return (cons (list 'Aint 'nobody 'else 'around) '())) (writeln/return (list 'Someone (cons 'to '(squeeze)))) (writeln/return (list (list 'I 'need 'you) (cons 'you (cons 'you '())))) (writeln/return (append (list 'And 'I) (append '(need) '(you)) (cons 'you '(you)))) (writeln/return (cons 'I-m (append '((so glad)) (list 'to 'be 'here 'tonight)))) ;;; ========================================================================== ;;; Mini data bases (define unknown '??) (define (unknown? x) (eq? x unknown)) (define (mk-recording key-0 title-0 author-list-0 year-0 publisher-0 key-list-0) ;; SYMBOL,STRING,LIST-of[SYMBOL}^,INTEGER,SYMBOL^,LIST-of[SYMBOL]^ -> JAZZ-R (list key-0 title-0 author-list-0 year-0 publisher-0 key-list-0)) (define miles-davis-r (list (mk-recording 'd0 "On the Corner" unknown 1972 unknown '(c40)) (mk-recording 'd1 "New-York Girl" unknown 1972 unknown '(c40)) (mk-recording 'd2 "Thinkin' One Thing and Doin' Another" unknown 1972 unknown '(c40)) (mk-recording 'd3 "One and One" unknown 1972 unknown '(c40)) (mk-recording 'd4 "Well You Needn't" '(Thelonius-Monk) 1954 'Blue-Ribbon-Music '(c41)) (mk-recording 'd5 "Love for Sale" '(Cole-Porter) 1958 'Chappell '(c41)) (mk-recording 'd6 "Something Else" '(Miles-Davis) 1958 'EMI '(c41)) (mk-recording 'd7 "Dear Old Stockholm" '(Stan-Getz P-Golly) 1952 'Windswept-Pacific-Music '(c41)) (mk-recording 'd8 "Black Satin" unknown 1972 unknown '(c40)) (mk-recording 'd9 "Mr. Freedom X" unknown 1972 unknown '(c40)) (mk-recording 'd10 "Helen Butte" unknown 1972 unknown '(c40)) (mk-recording 'd11 "Boplicity" '(Cleo-Henry) 1949 'Campbell '(c40)) (mk-recording 'd12 "Ray's Idea" '(Ray-Bonner W-G-Fuller) 1953 'Bosworth '(c41)) (mk-recording 'd13 "Yesterdays" '(Kern Harbach) 1952 'Universal '(c42)) (mk-recording 'd14 "Vote for Miles" unknown 1972 unknown '(c40)) (mk-recording 'd15 "Deception" '(Miles-Davis) 1950 'Sony '(c41)) (mk-recording 'd16 "Israel" '(John-Carisi) 1949 'EMI '(c41)) (mk-recording 'd17 "How Deep is the Ocean" '(Irving-Berlin) 1952 'EMI '(c41)) (mk-recording 'd18 "Kelo" '(Jay-Jay-Johnson) 1953 'Kensington-Music '(c41)) (mk-recording 'd19 "Woody 'n' You" '(Dizzy-Gillepsie) 1952 'Chappell '(c41)) (mk-recording 'd20 "Chance It" '(Oscar-Petitford) 1952 'Orpheus-Music '(c41)))) (define stan-getz-r (list (mk-recording 'g30 "Autumn Leaves" '(Kosma Prevert) 1980 'Peter-Maurice-Co-Ltd '(c44)) (mk-recording 'g31 "Nature Boy" '(Abbon) 1980 'Chappell '(c44)))) ; **** ;;; ========================================================================== ;;; Operations on mini data bases (writeln/return (map (lambda (x) (+ x 1)) '(26 9 2017))) ;; (writeln/return (unique-keys? miles-davis-r)) ;; (writeln/return (unique-keys? stan-getz-r)) ;;; ========================================================================== ;;; Merge Sort (define (mergesort l rel-2?) ;; La clôture lexicale permet aux fonctions locales d'accéder à la relation ;; d'ordre "rel-2?". ;; (define (merge-2-groups g0 g1) (cond ((null? g0) g1) ((null? g1) g0) (else (let ((first-0 (car g0)) (first-1 (car g1))) (if (rel-2? first-0 first-1) (cons first-0 (merge-2-groups (cdr g0) g1)) (cons first-1 (merge-2-groups g0 (cdr g1)))))))) ;; (define (merge-groups group-list) (if (or (null? group-list) (null? (cdr group-list))) group-list (cons (merge-2-groups (car group-list) (cadr group-list)) (merge-groups (cddr group-list))))) ;; (define (make-groups l0) ;; "l0" est une liste linéaire non vide. (let ((first (car l0)) (rest (cdr l0))) (if (null? rest) (list (list first)) (let ((next-groups (make-groups rest))) (if (rel-2? first (car rest)) (cons (cons first (car next-groups)) (cdr next-groups)) (cons (list first) next-groups)))))) ;; (if (null? l) '() (let iter-merge-groups ((group-list (make-groups l))) (if (null? (cdr group-list)) (car group-list) (iter-merge-groups (merge-groups group-list)))))) (define cp-list-example '((5 . 5) (6 . 0) (3 . 3) (6 . 1) (7 . 7) (1 . 1) (6 . 2))) (define (pretty-writeln/return x) ;; Writes "x", followed by an end-of-line character, and returns "x". If ;; "x" is a linear list, successive lines are used for successive elements. (if (and (pair? x) (list? x)) (begin (write-char #\() (write (car x)) (for-each (lambda (x0) (newline) (write-char #\space) (write x0)) (cdr x)) (write-char #\))) (write x)) (newline) x) ;;; ========================================================================== ;;; Apotheosis (define (position x l) (let thru ((l0 l) (current-position 0)) (cond ((null? l0) #f) ((equal? (car l0) x) current-position) (else (thru (cdr l0) (+ current-position 1)))))) (define add-something (case-lambda ((x) (+ x 1)) ((x y) (+ x y)))) ;;(define free-family ;;(lambda (v w) ;;)) (define key car) (define title cadr) (define authors caddr) (define (year l0) (car(cdddr l0))) (define (publishers l0) (car (cddddr l0))) ;;(car (cddddr l0) (define (cds l0) (list-ref l0 5)) ;;(cadr(cddddr l0))) (writeln/return (key (car miles-davis-r))) (writeln/return (cds (car miles-davis-r))) (writeln/return (cons key cds)) (define (unique-keys-v1 l) (let ((premier (car l)) (suite (cdr l))) (if (null? suite) #t (if (member premier suite) #f (unique-keys-v1 suite))))) (writeln/return (unique-keys-v1 (map key miles-davis-r))) ;;(define (unique-keys l) ;; (define (all-different l) ;; (let ((premier (car l)) ;; (suite (cdr l))) ;; (or (null? suite) ;; (and (not(member premier suite)) ;; (all-different suite))))) ;; (all-different (map key l))) ;;(writeln/return (unique-keys (map key miles-davis-r))) (define (get-information-e key0 sel0 j-list) (if (null? j-list) #f (let ((premier (car j-list)) (suite (cdr j-list))) (if (equal? (key premier) key0) (sel0 premier) (get-information-e key0 sel0 suite))))) (writeln/return (get-information-e 'd14 title miles-davis-r)) (define (get-key x0 sel0 j-list) (if (null? j-list) #f (let ((premier (car j-list)) (suite (cdr j-list))) (if (equal? (sel0 premier) x0) (key premier) (get-key x0 sel0 suite))))) (writeln/return (get-key "Kelo" title miles-davis-r)) (define (those-that p1? j-list f1) (if (null? j-list) '() (let* ((premier (car j-list)) (suite (cdr j-list)) (recursion (those-that p1? suite f1))) (if (p1? premier) (cons (f1 premier) recursion) recursion)))) (writeln/return (those-that (lambda (x) (= (year x) 1972)) miles-davis-r title)) (writeln/return (those-that (lambda (x) (let ((authors0 (authors x))) (and (not (unknown? authors0)) (pair? authors0)))) miles-davis-r key)) (writeln/return (those-that (lambda (x) (let ((authors0 (authors x))) (and (not (unknown? authors0)) (null? (cdr authors0))))) miles-davis-r title)) (writeln/return (those-that (lambda (x) (unknown? (publishers x))) (append miles-davis-r stan-getz-r) title)) (writeln/return (those-that (lambda (x) (equal? (publishers x) 'EMI)) miles-davis-r title)) (writeln/return (those-that (lambda (x) (let ((authors0 (authors x))) (and (not (unknown? authors0)) (member 'Miles-Davis authors0)))) miles-davis-r title)) (writeln/return (those-that (lambda (x) (let ((cds0 (cds x))) (and (not (unknown? cds0)) (pair? (cdr cds0))))) stan-getz-r key))
false
153a86d52cff8fc9b2fb2ada5a17f81972ae26e7
1ed47579ca9136f3f2b25bda1610c834ab12a386
/sec3/sec3.5.4.scm
de5a83ae0a2927e6512b508aa934ebd017520f1a
[]
no_license
thash/sicp
7e89cf020e2bf5ca50543d10fa89eb1440f700fb
3fc7a87d06eccbe4dcd634406e3b400d9405e9c4
refs/heads/master
2021-05-28T16:29:26.617617
2014-09-15T21:19:23
2014-09-15T21:19:23
3,238,591
0
1
null
null
null
null
UTF-8
Scheme
false
false
2,799
scm
sec3.5.4.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 3.5.4. ストリームと遅延評価 (load "./sec3.5.3") ; include stream, my_defs ; (define int ; (cons-stream initial-value ; (add-streams (scale-stream integrand dt) int))) ;; 微分方程式を解く solve 手続きを作ってみるが, ;; yとdyの定義がお互いを参照しているため, 動かない. ; ; (define (solve f y0 dt) ; (define y (integral dy y0 dt)) ; (define dy (stream-map f y)) ; y) ; ;; ところが, 原理的には引数の一部が分かっていれば評価し始めることはできる. ;; 遅延評価の出番. 次のようにintegralを再定義する. ;; delayed-integrandに注目. (define (integral delayed-integrand initial-value dt) (define int (cons-stream initial-value (let ((integrand (force delayed-integrand))) (add-streams (scale-stream integrand dt) int)))) int) ;; このように定義したintegralを使えば, ;; integralに渡すdyにdelayをかけdelayed-objectとして扱うことで solveを動かすことが出来る. (define (solve f y0 dt) (define y (integral (delay dy) y0 dt)) (define dy (stream-map f y)) y) ;; テスト ; (display-stream-n (solve (lambda (y) y) 1 0.001) 20) ; (newline) ; (display (stream-ref (solve (lambda (y) y) 1 0.001) 1000)) ;; fの形が f(y) = y <=> dy/dt = y. 微分しても形が変わらないといえば底がeの指数関数e^x. ;; 1000分の1刻みで1000個目, つまりt=1を取るとeそのもの(2.71...)が求められる. ;; => q3.77.scm, q3.78.scm, q3.79.scm, q3.80.scm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 正規順序の評価 (Normal-order evaluation) ;; delayとforceで柔軟なプログラムが書けるようになったが, そのぶん複雑さも増した. ;; integralの再実装で見たように, 「通常の手続き」と「遅延引数を取る手続き」の2クラスに分けられるようになった. ;; 手続きの種類を統一するための一つの方法は, すべての手続きが遅延引数を取るようにすることである. ;; 手続きのすべての引数が自動的に遅延オブジェクトになり, 本当に必要になったときforceで評価されるような設計. ;; この設計は, 1.1.5. で述べた正規順序の評価に相当し, 実際に 4.2. で言語をこのように変更する. ;; ;; ところがこの設計だと代入システムとうまく共存できない. ;; 問題3.51, 3.52で見たように遅延評価と代入が混在するとかなり複雑になり混乱をもたらす. というわけで2つを同時に扱うのは熱い研究領域らしい.
false
cb977a10df2755b16e24ca5b55556e3f8a5385e1
2c01a6143d8630044e3629f2ca8adf1455f25801
/xitomatl/lists.sls
4c92201b6dd8fce6043b5d81810bb2d5f6d47d8f
[ "X11-distribute-modifications-variant" ]
permissive
stuhlmueller/scheme-tools
e103fac13cfcb6d45e54e4f27e409adbc0125fe1
6e82e873d29b34b0de69b768c5a0317446867b3c
refs/heads/master
2021-01-25T10:06:33.054510
2017-05-09T19:44:12
2017-05-09T19:44:12
1,092,490
5
1
null
null
null
null
UTF-8
Scheme
false
false
6,121
sls
lists.sls
#!r6rs ;; Copyright 2009 Derick Eddington. My MIT-style license is in the file named ;; LICENSE from the original collection this file is distributed with. (library (xitomatl lists) (export make-list last-pair ;; from compat sublist map/left-right/preserving map/filter remp-dups remove-dups remv-dups remq-dups dup? unique? intersperse group-by alist->plist plist->alist) (import (rnrs) (only (xitomatl define) define/? define/AV define/?/AV) (only (xitomatl predicates) exact-non-negative-integer? exact-positive-integer?) (xitomatl lists compat)) (define/?/AV sublist (case-lambda/? ((l start) (sublist l start #F)) ((l (start exact-non-negative-integer?) (end (lambda (x) (or (exact-non-negative-integer? x) (not x))))) (unless (or (not end) (<= start end)) (AV "invalid range" start end)) (let loop ((x l) (i 0) (a '())) (cond ((and end (= i end)) (reverse a)) ((pair? x) (loop (cdr x) (+ 1 i) (if (>= i start) (cons (car x) a) a))) ((null? x) (cond ((> start i) (AV "start index greater than list's length" start i)) (end (AV "end index greater than list's length" end i)) (else (reverse a)))) (else (AV "not a proper list" l))))))) ; Deterministic, left-to-right map ; It preserves sharing as much as possible: that is, if given the pair ; (h . t), (and (eq? h (f h)) ;; (eq? t (map/left-right/preserving f t))) ;; holds, then ; (eq? (map/left-right/preserving f l) l) holds as well. (define/?/AV (map/left-right/preserving (f procedure?) l) ;; TODO: could this be made tail-recursive / constant space? (let loop ((f f) (l l) (orig l)) (cond ((pair? l) (let ((h (car l)) (t (cdr l))) (let* ((h1 (f h)) (t1 (loop f t orig))) (if (and (eq? h1 h) (eq? t1 t)) l (cons h1 t1))))) ((null? l) '()) (else (AV "not a proper list" orig))))) (define/?/AV map/filter ;; map/filter is significantly more effecient than ;; the equivalent (filter values (map f l)) (case-lambda/? (((f procedure?) l) (let loop ((l l) (r '()) (orig l)) (cond ((pair? l) (let ((x (f (car l)))) (loop (cdr l) (if x (cons x r) r) orig))) ((null? l) (reverse r)) (else (AV "not a proper list" orig))))) (((f procedure?) l . ls) (let loop ((ls (cons l ls)) (r '()) (orig (cons l ls))) (cond ((for-all pair? ls) (let ((x (apply f (map car ls)))) (loop (map cdr ls) (if x (cons x r) r) orig))) ((for-all null? ls) (reverse r)) (else (for-each (lambda (l o) (unless (or (pair? l) (null? l)) (AV "not a proper list" o))) ls orig) (for-each (lambda (l) (when (null? l) (AV "length mismatch" orig))) ls))))))) (define (rem-dups rf l who) (let loop ((l l) (r '())) (cond ((pair? l) (let ((h (car l)) (t (cdr l))) (loop (rf h t) (cons h r)))) ((null? l) (reverse r)) (else (assertion-violation who "not a proper list" l))))) (define (remp-dups proc l) (rem-dups proc l 'remp-dups)) (define (remove-dups l) (rem-dups remove l 'remove-dups)) (define (remv-dups l) (rem-dups remv l 'remv-dups)) (define (remq-dups l) (rem-dups remq l 'remq-dups)) (define/AV (dup? pred) (lambda (ls) (let loop ((l ls) (i 0)) (cond ((pair? l) (let ((h (car l)) (t (cdr l))) (if (memp (lambda (x) (pred h x)) t) i (loop t (+ 1 i))))) ((null? l) #F) (else (AV "not a proper list" ls)))))) (define (unique? pred) (define f (dup? pred)) (lambda (l) (not (f l)))) (define/AV (intersperse l sep) (let loop ((l l) (r '()) (sep sep) (orig l)) (cond ((pair? l) (loop (cdr l) (cons* sep (car l) r) sep orig)) ((null? l) (if (null? r) '() (reverse (cdr r)))) (else (AV "not a proper list" orig))))) (define/?/AV group-by (case-lambda/? ((by) (group-by by #F)) (((by exact-positive-integer?) remainders-ok?) (lambda (l) (let loop ((l l) (n 0) (g '()) (r '())) (cond ((pair? l) (if (= n by) (loop (cdr l) 1 (list (car l)) (cons (reverse g) r)) (loop (cdr l) (+ 1 n) (cons (car l) g) r))) ((null? l) (cond ((or (= n by) (and remainders-ok? (> n 0))) (reverse (cons (reverse g) r))) ((= n 0) '()) (else (apply AV "remainder elements" (reverse g))))) (else (AV "not a proper list")))))))) (define/AV (alist->plist x) (let loop ((al x) (pl '())) (cond ((and (pair? al) (pair? (car al))) (loop (cdr al) (cons* (cdar al) (caar al) pl))) ((null? al) (reverse pl)) (else (AV "not a proper alist" x))))) (define/AV (plist->alist x) (let loop ((pl x) (al '())) (cond ((and (pair? pl) (pair? (cdr pl))) (loop (cddr pl) (cons (cons (car pl) (cadr pl)) al))) ((null? pl) (reverse al)) (else (AV "not a proper plist" x))))) #;(define/? (flatten (l list?)) ;; not sure exactly what I want the semantics to be (let loop ((l l)) (if (pair? l) (let ((x (car l)) (r (cdr l))) (if (list? x) (append (loop x) (loop r)) (cons (loop x) (loop r)))) l))) )
false
3f17545052a39ee28b8f6cf5263ddbc4c1bc762f
e358b0cf94ace3520adff8d078a37aef260bb130
/simple/2.37.scm
0f3a98d89a8d8206334878596e798a1f06c5377f
[]
no_license
dzhus/sicp
784766047402db3fad4884f7c2490b4f78ad09f8
090fa3228d58737d3558f2af5a8b5937862a1c75
refs/heads/master
2021-01-18T17:28:02.847772
2020-05-24T19:15:57
2020-05-24T20:56:00
22,468,805
0
0
null
null
null
null
UTF-8
Scheme
false
false
926
scm
2.37.scm
(define (accumulate op initial sequence) (if (null? sequence) initial (op (car sequence) (accumulate op initial (cdr sequence))))) (define (accumulate-n op initial seqs) (if (null? (car seqs)) (list) (cons (accumulate op initial (map car seqs)) (accumulate-n op initial (map cdr seqs))))) (define (sum list) (accumulate + 0 list)) (define (matrix-*-vector m v) (map (lambda (row) (accumulate + 0 (map * row v))) m)) (define (transpose m) (accumulate-n cons (list) m)) (define (matrix-*-matrix m n) (let ((cols (transpose n))) (map (lambda (row) (map (lambda (col) (sum (map * row col))) cols)) m))) (define (matrix-*-vector-2 m v) (map (lambda (row) (car row)) (matrix-*-matrix m (map (lambda (item) (list item)) v))))
false
32c91503cca2d2cfe31374c903c175b2be20aac5
ac587213fe223ddf6d60893b02b7b69a3783a38a
/sl-printf/format/format-char.scm
165834c131332351fcde0ba5ddf4f5ba2880f01c
[]
no_license
BernardBeefheart/bbslib
eef90ca19d6a87f0588029e40be98f15029f2379
d4a199fe53a55bf43446804313b81f97ab637d83
refs/heads/master
2021-01-17T12:42:42.730263
2016-06-12T19:47:46
2016-06-12T19:47:46
20,342,080
1
0
null
null
null
null
UTF-8
Scheme
false
false
461
scm
format-char.scm
;; ======================================================================== ;; format-char.scm ;; ======================================================================== (define-library (format format-char) (export format-char) (import (scheme base) (bbmatch) (exception)) (begin (define format-char (lambda (value) (match value ((? char?) value) (else (raise-exception 'ERROR 'format-char "char expected"))))) ))
false
7f8a11eb9f4eed8fb6948658068c280603c3ca37
e5b2478b8cd1d86152b404488faea88872d4be35
/2.2.3.ss
78f72fb1da0184539a4aef271bed4f515748b5f9
[]
no_license
xiaq/tspl4-ans
e6d7dde3148b086c623140c1c74e8937653cf296
da0f4cb56d0da63d57a739e4c8a578eee650d8ca
refs/heads/master
2020-04-03T06:25:14.087276
2018-11-03T18:49:01
2018-11-03T18:49:01
155,074,083
0
0
null
null
null
null
UTF-8
Scheme
false
false
481
ss
2.2.3.ss
(cons 'car 'cdr) ; => (car . cdr) (list 'this '(is silly)) ; => (this (is silly)) (cons 'is '(this silly?)) ; => (is this silly?) (quote (+ 2 3)) ; => (+ 2 3) (cons '+ '(2 3)) ; => (+ 2 3) (car '(+ 2 3)) ; => + (cdr '(+ 2 3)) ; => (2 3) cons ; => #<procedure cons> (quote cons) ; => cons (quote (quote cons)) ; => 'cons (car (quote (quote cons))) ; => quote (+ 2 3) ; => 5 (+ '2 '3) ; => 5 (+ (car '(2 3)) (car (cdr '(2 3)))) ; => 5 ((car (list + - * /)) 2 3) ; => 5
false
710c4e6bcccaee4eca0b5746d9d4492424355a95
fe0de995a95bcf09cd447349269dc0e550851b5a
/example3.scm
c8018807d500bdd136b1f9c5157bbccefd5a6ba6
[ "MIT" ]
permissive
mugcake/ruse-scheme
4974021858be5b7f2421212ec2eeafd34c53bce8
dd480e17edd9a233fd2bc4e8b41ff45d13fcc328
refs/heads/master
2022-02-12T04:31:55.031607
2019-08-01T21:44:14
2019-08-01T21:44:14
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
107
scm
example3.scm
(define-library (example3) (export example3) (import (example2)) (begin (define example3 1337)))
false
b2a746e1c629976a9ba88acde3db787b39ee88a4
a8e69b82efa3125947b3af219d8f14335e52d057
/test-check.scm
1dc659bff3fd6bc186ffd6a304cc00cc9f4a4714
[ "MIT" ]
permissive
ArunGant8/n-grams-for-synthesis
ad3f14bb082c1220fcea5cfb69029953a2501508
b53b071e53445337d3fe20db0249363aeb9f3e51
refs/heads/master
2023-04-06T05:51:47.903781
2020-05-26T17:09:14
2020-05-26T17:09:14
null
0
0
null
null
null
null
UTF-8
Scheme
false
false
3,791
scm
test-check.scm
(load "pmatch.scm") (load "prelude.scm") (define equal-to? (lambda (expected) (lambda (produced) (equal? expected produced)))) (define one-of? (lambda (expected*) (lambda (produced) (not (not (member produced expected*)))))) (define each-one-of? (lambda (expected*) (lambda (produced*) (andmap (lambda (produced) (not (not (member produced expected*)))) produced*)))) (define-syntax test-p (lambda (stx) (syntax-case stx () ((_ title tested-expression pred-expr) (string? (syntax->datum #'title)) #'(lambda (time-out-in-seconds) (let ((pred pred-expr)) (run-for-max-time time-out-in-seconds (lambda () tested-expression) (lambda (produced stats-diff) (let ((success-indicator (if (pred produced) 'success 'failure))) (list success-indicator title 'tested-expression 'pred-expr produced (time->inexact-seconds (sstats-real stats-diff)) (sstats-bytes stats-diff)))) (lambda (stats-diff) (list 'timeout title 'tested-expression 'pred-expr 'timeout (time->inexact-seconds (sstats-real stats-diff)) (sstats-bytes stats-diff)))))))))) (define-syntax test (syntax-rules () ((_ title tested-expression expected-result) (test-p title tested-expression (equal-to? expected-result))))) (define run-for-max-time (lambda (max-time expr-th success-f timeout-f) (let ((begin-stats (statistics))) (let ((e (make-engine (lambda () (let ((produced (expr-th))) (let ((end-stats (statistics))) (let ((stats-diff (sstats-difference end-stats begin-stats))) (success-f produced stats-diff)))))))) (let loop ((e e)) (e (expt 10 7) ; ticks (lambda (_ value) value) (lambda (e) (let ((end-stats (statistics))) (let ((stats-diff (sstats-difference end-stats begin-stats))) (if (< (time->inexact-seconds (sstats-real stats-diff)) max-time) (loop e) (timeout-f stats-diff))))))))))) (define test-runner (lambda (timeout . test*) (let ((table (test-runner-aux test* '() timeout print-test-result))) (write-data-to-file table *output-table-file-name*)))) (define test-runner-build-table (lambda (timeout . test*) (test-runner-aux test* '() timeout (lambda (_) (void))))) (define test-runner-aux (lambda (tests acc timeout f) (cond ((null? tests) (reverse acc)) (else (let ((res ((car tests) timeout))) (f res) (test-runner-aux (cdr tests) (cons res acc) timeout f)))))) (define print-test-result (lambda (res) (pmatch res [(,status ,title ,tested-expression ,expected ,produced ,stats-real ,stats-bytes) (case status [(success) (printf "~s ~s ~s ~s\n" status title stats-real stats-bytes)] [(failure) (printf "!! ~s ~s ~s ~s\n" status title stats-real stats-bytes) (printf "!! expected predicate: ~s\n" expected) (printf "!! produced value: ~s\n" produced)] [(timeout) (printf "!! ~s ~s ~s ~s\n" status title stats-real stats-bytes)])]))) (define time->inexact-seconds (lambda (time) (let ((s (time-second time)) (ns (time-nanosecond time))) (exact->inexact (+ s (/ ns (expt 10 9)))))))
true
e3305b3e3a3e30da5cbe79bcb1f2dde64de886f4
de5d387aa834f85a1df3bd47bc324b01130f21fb
/ps2/code/generic-sequences.scm
c7ae47414d066ed4d971de76eecc12e20e26675b
[]
no_license
chuchao333/6.945
5ae15980a952bed5c868be03d1a71b1878ddd53d
c50bb28aadf0c3fcda3c8e56b4a61b9a2d582552
refs/heads/master
2020-05-30T20:23:23.501175
2013-05-05T19:59:53
2013-05-05T19:59:53
24,237,118
5
0
null
null
null
null
UTF-8
Scheme
false
false
12,787
scm
generic-sequences.scm
;;;; Generic sequence operator definitions ;;; First we declare the operators we want to be generic. ;;; Each declaration specifies the arity (number of arguments) ;;; and the default operation, if necessary. (define sequence:null (make-generic-operator 1 "sequence:null")) (define sequence:ref (make-generic-operator 2 "sequence:ref")) (define sequence:size (make-generic-operator 1 "sequence:size")) (define sequence:type (make-generic-operator 1 "sequence:type")) (define sequence:null? (make-generic-operator 1 "sequence:null?")) (define sequence:equal? (make-generic-operator 2 "sequence:equal?")) (define sequence:set! (make-generic-operator 3 "sequence:set!")) (define sequence:subsequence (make-generic-operator 3 "sequence:subsequence")) ;;; sequence:append takes multiple arguments. It is defined in terms ;;; of a generic binary append that takes two sequences. (define (sequence:append . sequences) (if (null? sequences) (error "Need at least one sequence for append")) (let ((type? (sequence:type (car sequences)))) (if (not (for-all? (cdr sequences) type?)) (error "All sequences for append must be of the same type" sequences)) (fold-right generic:binary-append (sequence:null (sequence:type (car sequences))) sequences))) (define generic:binary-append (make-generic-operator 2 "generic:binary-append")) ;;; Implementations of the generic operators. (define (any? x) #t) (define (constant val) (lambda x val)) (define (is-exactly val) (lambda (x) (eq? x val))) (defhandler sequence:null (constant "") (is-exactly string?)) (defhandler sequence:null (constant '()) (is-exactly list?)) (defhandler sequence:null (constant #()) (is-exactly vector?)) (defhandler sequence:ref string-ref string? exact-integer?) (defhandler sequence:ref list-ref list? exact-integer?) (defhandler sequence:ref vector-ref vector? exact-integer?) (defhandler sequence:size string-length string?) (defhandler sequence:size length list?) (defhandler sequence:size vector-length vector?) (defhandler sequence:type (constant string?) string?) (defhandler sequence:type (constant list?) list?) (defhandler sequence:type (constant vector?) vector?) (define (vector-null? v) (= (vector-length v) 0)) (defhandler sequence:null? string-null? string?) (defhandler sequence:null? null? list?) (defhandler sequence:null? vector-null? vector?) ;;; To assign to the ith element of a list: (define (list-set! list i val) (cond ((null? list) (error "List does not have enough elements" i)) ((= i 0) (set-car! list val)) (else (list-set! (cdr list) (- i 1) val)))) (defhandler sequence:set! string-set! string? exact-integer? any?) (defhandler sequence:set! list-set! list? exact-integer? any?) (defhandler sequence:set! vector-set! vector? exact-integer? any?) (defhandler sequence:subsequence substring string? exact-integer? exact-integer?) (defhandler sequence:subsequence sublist list? exact-integer? exact-integer?) (defhandler sequence:subsequence subvector vector? exact-integer? exact-integer?) (define (vector-append v1 v2) (let ((n1 (vector-length v1)) (n2 (vector-length v2))) (make-initialized-vector (+ n1 n2) (lambda (i) (if (< i n1) (vector-ref v1 i) (vector-ref v2 (- i n1))))))) (defhandler generic:binary-append string-append string? string?) (defhandler generic:binary-append append list? list?) (defhandler generic:binary-append vector-append vector? vector?) ; problem 2.1 implementations (define (sequence:car seq) (sequence:ref seq 0)) (define (sequence:cdr seq) (sequence:subsequence seq 1 (sequence:size seq))) (define generic:binary-construct (make-generic-operator 2 "generic:binary-construct")) (define (sequence:construct type . args) (if (null? args) (sequence:null type) (fold-right generic:binary-construct (sequence:null type) args))) (define (binary-append-wrapper proc) (lambda (x y) (generic:binary-append (proc x) y))) (define (unquote-func f) (lambda (x) (f `,x))) (defhandler generic:binary-construct (binary-append-wrapper (unquote-func string)) any? string?) (defhandler generic:binary-construct (binary-append-wrapper (unquote-func list)) any? list?) (defhandler generic:binary-construct (binary-append-wrapper (unquote-func vector)) any? vector?) (defhandler sequence:equal? equal? vector? vector?) (defhandler sequence:equal? string=? string? string?) (defhandler sequence:equal? equal? list? list?) (define (sequence:generate type n func) (do ((seq (sequence:null type)) (i 0 (+ i 1))) ((= i n) seq) (set! seq (sequence:append seq (sequence:construct type (func i)))))) (define (pull sequences i) (if (= (length sequences) 1) (list (sequence:ref (car sequences) i)) (append (list (sequence:ref (car sequences) i)) (pull (cdr sequences) i)))) (define (sequence:map func . sequences) (if (null? sequences) (error "Need at least one sequence for map")) (let ((type? (sequence:type (car sequences))) (n (sequence:size (car sequences)))) ; (if (not (for-all? (cdr sequences) type?)) ; (error "All sequences for map must be of the same type" ; sequences)) (if (not (for-all? (cdr sequences) (lambda (x) (= (sequence:size x) n)))) (error "All sequences for map must be of the same length" sequences)) (do ((seq (sequence:null type?)) (i 0 (+ i 1))) ((= i n) seq) (set! seq (sequence:append seq (sequence:construct type? (apply func (pull sequences i)))))))) (define (sequence:for-each func . sequences) (if (null? sequences) (error "Need at least one sequence for map")) (let ((type? (sequence:type (car sequences))) (n (sequence:size (car sequences)))) ; (if (not (for-all? (cdr sequences) type?)) ; (error "All sequences for for-each must be of the same type" ; sequences)) (if (not (for-all? (cdr sequences) (lambda (x) (= (sequence:size x) n)))) (error "All sequences for for-each must be of the same length" sequences)) (do ((i 0 (+ i 1))) ((= i n)) (apply func (pull sequences i))))) (define (sequence:filter seq pred) (let ((arg (sequence:car seq)) (type? (sequence:type seq))) (if (= (sequence:size seq) 1) (if (pred arg) (sequence:construct type? arg) (sequence:null type?)) (let ((ret (sequence:filter (sequence:cdr seq) pred))) (if (pred arg) (sequence:append (sequence:construct type? arg) ret) ret))))) (define (sequence:get-index seq pred) (let ((n (sequence:size seq))) (let loop ((i 0)) (if (= i n) #f (if (pred (sequence:ref seq i)) i (loop (+ i 1))))))) (define (sequence:get-element seq pred) (let ((idx (sequence:get-index seq pred))) (if (eq? idx #f) #f (sequence:ref seq idx)))) (define (sequence:fold-right func init seq) (cond ((sequence:null? seq) (error "sequence:fold-right sequence can't be null!")) ((= (sequence:size seq) 1) (func (sequence:car seq) init)) (else (func (sequence:car seq) (sequence:fold-right func init (sequence:cdr seq)))))) (define (sequence:fold-left func init seq) (cond ((sequence:null? seq) (error "sequence:fold-left sequence can't be null!")) ((= (sequence:size seq) 1) (func init (sequence:car seq))) (else (let ((n (sequence:size seq))) (func (sequence:fold-left func init (sequence:subsequence seq 0 (- n 1))) (sequence:ref seq (- n 1))))))) ; Problem 2.2 generalizations ;(define (sequence? x) (or (string? x) (vector? x) (list? x))) (define (mixable-sequence? x) (or (vector? x) (list? x))) (define (sequence:equal-ta? seq-1 seq-2) (cond ((sequence:null? seq-1) (sequence:null? seq-2)) ((sequence:null? seq-2) (sequence:null? seq-1)) (else (let ((n1 (sequence:size seq-1)) (n2 (sequence:size seq-2)) (arg1 (sequence:car seq-1)) (arg2 (sequence:car seq-2)) (rest1 (sequence:cdr seq-1)) (rest2 (sequence:cdr seq-2))) (cond ((not (= n1 n2)) #f) ((and (mixable-sequence? arg1) (mixable-sequence? arg2)) (and (sequence:equal-ta? arg1 arg2) (sequence:equal-ta? rest1 rest2))) ((and (not (mixable-sequence? arg1)) (not (mixable-sequence? arg2))) (and (equal? arg1 arg2) (sequence:equal-ta? rest1 rest2))) (else #f)))))) ;(define (compose-1st-arg f g) (lambda (x y) (f (g x) y))) (define (compose-2nd-arg f g) (lambda (x y) (f x (g y)))) ; default list->string doesn't handle quoted constants... ;(define (list2string l) (apply string (map (lambda (x) (string (eval x user-initial-environment))) l))) ; mixing with strings sucks! ;(define (vector->string v) (list2string (vector->list v))) ;(define (string->vector s) (list->vector (string->list s))) (define (sequence:append . sequences) (if (null? sequences) (error "Need at least one sequence for append")) (let ((type? (sequence:type (car sequences)))) (fold-right generic:binary-append (sequence:null (sequence:type (car sequences))) sequences))) (defhandler generic:binary-append (compose-2nd-arg vector-append list->vector) vector? list?) (defhandler generic:binary-append (compose-2nd-arg append vector->list) list? vector?) (define (sequence:map func . sequences) (if (null? sequences) (error "Need at least one sequence for map")) (let ((type? (sequence:type (car sequences))) (n (sequence:size (car sequences)))) (if (not (for-all? (cdr sequences) (lambda (x) (= (sequence:size x) n)))) (error "All sequences for map must be of the same length" sequences)) (do ((seq (sequence:null type?)) (i 0 (+ i 1))) ((= i n) seq) (set! seq (sequence:append seq (sequence:construct type? (apply func (pull sequences i)))))))) (define (sequence:for-each func . sequences) (if (null? sequences) (error "Need at least one sequence for map")) (let ((type? (sequence:type (car sequences))) (n (sequence:size (car sequences)))) (if (not (for-all? (cdr sequences) (lambda (x) (= (sequence:size x) n)))) (error "All sequences for map must be of the same length" sequences)) (do ((i 0 (+ i 1))) ((= i n)) (apply func (pull sequences i))))) ; problem 2.5.C implementation (define (list<? list-1 list-2) (let ((len-1 (length list-1)) (len-2 (length list-2))) (cond ((< len-1 len-2) #t) ((> len-1 len-2) #f) ;; Invariant: equal lengths (else (let prefix<? ((list-1 list-1) (list-2 list-2)) (cond ((null? list-1) #f) ; same ((generic:less? (car list-1) (car list-2)) #t) ((generic:less? (car list-2) (car list-1)) #f) (else (prefix<? (cdr list-1) (cdr list-2))))))))) (define generic:less? (make-generic-operator 2 "generic:less?")) (define (boolean<? a b) (and (not a) b)) ;(defhandler sequence:null? null? (any-but string? vector? list?)) (define (any-of . vals) (lambda (x) (any (lambda (type?) (eq? type? x)) vals))) (defhandler generic:less? (constant #f) null? null?) (defhandler generic:less? boolean<? boolean? boolean?) (defhandler generic:less? (constant #f) boolean? null?) (defhandler generic:less? (constant #t) null? boolean?) (defhandler generic:less? char<? char? char?) (defhandler generic:less? (constant #f) char? (any-of null? boolean?) (defhandler generic:less? (constant #t) (any-of null? boolean?) char?) (defhandler generic:less? < number? number?) (defhandler generic:less? (constant #f) number? (any-of null? boolean? char?)) (defhandler generic:less? (constant #t) (any-of null? boolean? char?) number?) (defhandler generic:less? symbol<? symbol? symbol?) (defhandler generic:less? (constant #f) symbol? (any-of null? boolean? char? number?)) (defhandler generic:less? (constant #t) (any-of null? boolean? char? number?) symbol?) (defhandler generic:less? string<? string? string?) (defhandler generic:less? (constant #f) string? (any-of null? boolean? char? number? symbol?)) (defhandler generic:less? (constant #t) (any-of null? boolean? char? number? symbol?) string?) (defhandler generic:less? (lambda (v1 v2) (list<? (vector->list v1) (vector->list v2))) vector? vector?) (defhandler generic:less? (constant #f) vector? (any-of null? boolean? char? number? symbol? string?)) (defhandler generic:less? (constant #t) (any-of null? boolean? char? number? symbol? string?) vector?) (defhandler generic:less? list<? list? list?) (defhandler generic:less? (constant #f) list? (any-of null? boolean? char? number? symbol? string? vector?)) (defhandler generic:less? (constant #t) (any-of null? boolean? char? number? symbol? string? vector?) list?)
false
fa505ea13c043c7ae49b336eb0c886d25b43073c
e8e2b3f22c7e1921e99f44593fc0ba5e5e44eebb
/PortableApps/GnuCashPortable/App/GnuCash/share/gnucash/scm/gnucash/report/report-system/collectors.scm
580ecbaa1b5924993ede2c14a76447402da7f398
[]
no_license
314pi/PortableOffice
da262df5eaca240a00921e8348d366efa426ae57
08a5e828b35ff3cade7c56d101d7f6712b19a308
refs/heads/master
2022-11-25T19:20:33.942725
2018-05-11T07:49:35
2018-05-11T07:49:35
132,839,264
1
2
null
2022-11-02T22:19:00
2018-05-10T02:42:46
Python
UTF-8
Scheme
false
false
10,799
scm
collectors.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2 of ;; the License, or (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, contact: ;; ;; Free Software Foundation Voice: +1-617-542-5942 ;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 ;; Boston, MA 02110-1301, USA [email protected] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-module (gnucash report report-system collectors)) (use-modules (srfi srfi-1)) (export make-filter) (export filter-satisfies) (export filter-id) (export assert-filter) (export make-equal-filter) (export make-predicate-filter) (export make-collector) (export collector-accumulate-from) (export collector-count-from) (export collector-into-list) (export collector-per-property) (export collector-filtered-list) (export collector-split) (export make-mapper-collector) (export make-list-collector) (export collector-from-slotset) (export labelled-collector-from-slotset) (export collector-add) (export collector-end) (export assert-collector) (export collector-add-all) (export collector-where) (export collector-reformat) (export collector-print) (export collector-do) (export function-state->collector) (export make-eq-set-collector) (export make-extreme-collector) (export make-slotset) (export slotset?) (export slotset-slots) (export slotset-slot) (export hashmap->slotset) (export alist->slotset) (export slotset-check) (export slotset-map-input) (export predicate-and) (export predicate-or) (export predicate-not) (export binary-search-lt) ;; Filters (define (make-filter id predicate) (list 'filter id predicate)) (define (filter? filter) (eq? (car filter) 'filter)) (define (assert-filter filter) (if (filter? filter) #t (throw (list "not a filter" filter)))) (define (filter-satisfies filter object) (assert-filter filter) (let ((predicate (third filter))) (predicate object))) (define (filter-id filter) (assert-filter filter) (second filter)) (define (make-predicate-filter id predicate) (make-filter id predicate)) (define (make-equal-filter x) (make-filter x (lambda (value) (equal? x value)))) ;; ;; SlotSet ;; (define (make-slotset value->slot slots) (if (not (procedure? value->slot)) (throw 'not-a-procedure value->slot)) (if (not (pair? slots)) (throw 'not-a-list slots)) (list 'slotset value->slot slots)) (define (slotset? slotset) (eq? (car slotset) 'slotset)) (define (assert-slotset slotset) (if (slotset? slotset) #t (throw (list "not a slotset" slotset)))) (define (slotset-slots slotset) (assert-slotset slotset) (third slotset)) (define (slotset-slot slotset value) (assert-slotset slotset) ((second slotset) value)) (define (slotset-map-input mapfn orig-slotset) (let ((orig-slotset-slot (second orig-slotset)) (orig-slotset-slots (third orig-slotset))) (make-slotset (lambda (v) (orig-slotset-slot (mapfn v))) orig-slotset-slots))) (define (hashmap->slotset hashmap) (make-slotset (lambda (v) (hash-ref hashmap v)) (hashmap->list (lambda (key value) value) hashmap))) (define (alist->slotset alist) (make-slotset (lambda (v) (assoc-ref alist v)) (hash-map->list (lambda (key value) key) (fold (lambda (val h) (hash-set! h val val) h) (make-hash-table) (map cdr alist))))) (define (slotset-check slotset) (assert-slotset slotset) (make-slotset (lambda (value) (let ((result (slotset-slot value))) (if (member result (third slotset)) (throw (list 'slotset-to-non-value)) result))) (third slotset))) ;; ;; Collectors ;; (define (make-collector f1 f2) (list 'collector f1 f2)) (define (collector-add collector value) (assert-collector collector) (let ((result ((second collector) value))) (assert-collector result) result)) (define (collector-end collector) (assert-collector collector) (let ((fn (third collector))) (fn))) (define (collector-print stream name collector) (make-collector (lambda (value) (format stream "(add ~a ~a)\n" name value) (collector-print stream name (collector-add collector value))) (lambda () (let ((result (collector-end collector))) (format stream "(result ~a ~a)\n" name result) result)))) (define (collector? collector) (and (list? collector) (eq? (car collector) 'collector))) (define (assert-collector collector) (if (collector? collector) #t (throw 'error (list "not a collector" collector)))) (define (collector-add-all collector values) (if (null-list? values) (collector-end collector) (collector-add-all (collector-add collector (car values)) (cdr values)))) (define (collector-accumulate-from total) (make-collector (lambda (x) (collector-accumulate-from (+ total x))) (lambda () total))) (define (collector-count-from total) (make-collector (lambda (x) (collector-count-from (+ total 1))) (lambda () total))) (define (collector-into-list) (define (collect-into l) (make-collector (lambda (x) (collect-into (cons x l))) (lambda () (reverse! l)))) (collect-into '())) (define (collector-per-property items make-property-filter make-per-property-collector) (let ((collectors (map (lambda (item) (cons (make-property-filter item) (make-per-property-collector item))) items))) (collector-filtered-list collectors))) (define (collector-filtered-list filter-collector-pairs) (define (mapfn sublist value) (let ((pair (car sublist)) (rest (cdr sublist))) (if (filter-satisfies (car pair) value) (cons (cons (car pair) (collector-add (cdr pair) value)) rest) (cons pair (mapfn rest value))))) (make-collector (lambda (value) (collector-filtered-list (mapfn filter-collector-pairs value))) (lambda () (map (lambda (pair) (cons (filter-id (car pair)) (collector-end (cdr pair)))) filter-collector-pairs)))) ;; Breaks a sequence of items into a list of collectors by property (define (collector-split prop-fn make-per-split-collector) (let ((list '())) (define collector (make-collector (lambda (value) (let* ((prop (prop-fn value)) (elt (assoc prop list))) (if elt (begin (set-cdr! elt (collector-add (cdr elt) value)) collector) (begin (set! list (cons (cons prop (collector-add (make-per-split-collector prop) value)) list)) collector)))) (lambda () (map (lambda (pair) (cons (car pair) (collector-end (cdr pair)))) list)))) collector)) (define (make-eq-set-collector list) (define collector (make-collector (lambda (value) (if (memq value list) collector (make-eq-set-collector (cons value list)))) (lambda () list))) collector) (define (make-extreme-collector ordering current) (define collector (make-collector (lambda (value) (if (ordering value current) (make-extreme-collector ordering value) collector)) (lambda () current))) collector) (define (collector-where pred collector) (define new-collector (make-collector (lambda (value) (if (pred value) (begin ;(format #t "accept ~a\n" value) (collector-where pred (collector-add collector value))) new-collector)) (lambda () (collector-end collector)))) new-collector) (define (make-mapper-collector mapfn collector) (make-collector (lambda (value) (make-mapper-collector mapfn (collector-add collector (mapfn value)))) (lambda () (collector-end collector)))) (define (collector-reformat formatter collector) (make-collector (lambda (value) (collector-reformat formatter (collector-add collector value))) (lambda () (formatter (collector-end collector))))) (define (make-list-collector collectors) (make-collector (lambda (value) (make-list-collector (map (lambda (inner-collector) (collector-add inner-collector value)) collectors))) (lambda () (map collector-end collectors)))) (define (collector-from-slotset slotset slot-collector) (define (make-table) (let ((valuemap (make-hash-table))) (for-each (lambda (slot) (hash-set! valuemap slot (slot-collector slot))) (slotset-slots slotset)) valuemap)) (let ((valuemap (make-table))) (define collector (make-collector (lambda (value) (let* ((slot (slotset-slot slotset value))) (hash-set! valuemap slot (collector-add (hash-ref valuemap slot) value))) collector) (lambda () (map (lambda (slot) (collector-end (hash-ref valuemap slot))) (slotset-slots slotset))))) collector)) (define (labelled-collector-from-slotset slotset slot-collector) (collector-from-slotset slotset (lambda (slot) (collector-reformat (lambda (result) (cons slot result)) (slot-collector slot))))) (define (function-state->collector fn state) (make-collector (lambda (value) (let ((next (fn value state))) (function-state->collector fn next))) (lambda () state))) (define (collector-do collector . other-collectors) (collector-reformat (lambda (final) (car final)) (make-list-collector (cons collector other-collectors)))) ;; ;; Predicates ;; ;; Was thinking about turning these into a real type (just to get a ;; decent predicate-name function). Probably not required. (define (predicate-not p) (lambda (x) (not (p x)))) (define (predicate-and p1 p2) (lambda (x) (and (p1 x) (p2 x)))) (define (predicate-or p1 p2) (lambda (x) (or (p1 x) (p2 x)))) (define (make-predicate fn) fn) (define (predicate-test p value) (p value)) ;; Binary search. Returns highest index with content less than or ;; equal to the supplied value. (define (binary-search-lt <= value vector) (define (search low high) (let* ((midpoint (+ low (ceiling (/ (- high low) 2)))) (midvalue (vector-ref vector midpoint))) (if (= low high) (if (<= midvalue value) low #f) (if (<= midvalue value) (search midpoint high) (search low (- midpoint 1)))))) (if (= 0 (vector-length vector)) #f (search 0 (- (vector-length vector) 1))))
false
1936327165b3d6ef4b552a3ca9621403aff4da63
6c6cf6e4b77640825c2457e54052a56d5de6f4d2
/ch1/miller-rabin.scm
48ac96f0b43ac9bb6c2ea14e6c30ecfdcc5b6d52
[]
no_license
leonacwa/sicp
a469c7bc96e0c47e4658dccd7c5309350090a746
d880b482d8027b7111678eff8d1c848e156d5374
refs/heads/master
2018-12-28T07:20:30.118868
2015-02-07T16:40:10
2015-02-07T16:40:10
11,738,761
0
0
null
null
null
null
UTF-8
Scheme
false
false
722
scm
miller-rabin.scm
; Miller-Rabin (define (square x) (* x x)) (define (expmod b e m) (cond ((= e 0) 1) ((nontrivial-square-root b m) 0) ((even? e) (remainder (square (expmod b (/ e 2) m)) m)) (else (remainder (* b (expmod b (- e 1) m)) m)))) (define (neq? a b) (not (= a b))) (define (nontrivial-square-root a n) (and (neq? a 1) (neq? a (- n 1)) (= 1 (remainder (square a) n)))) (define (miller-rabin n) (define (test) (define (try a) (= (expmod a (- n 1) n) 1)) (try (+ 1 (random (- n 1))))) (define (iter count) (cond ((<= count 0) #t) ((test) (iter (- count 1))) (else #f))) (if (< n 2) #f (iter (min 10 (ceiling (/ n 2)))))) ;尝试10次 (define mr miller-rabin)
false
b004b7b7dda3677abd3640769ecb363fb9357f94
e82d67e647096e56cb6bf1daef08552429284737
/ex2-49.scm
80921fde735dc35193c6417cc05224c589cb4886
[]
no_license
ashishmax31/sicp-exercises
97dfe101dd5c91208763dcc4eaac2c17977d1dc1
097f76a5637ccb1fba055839d389541a1a103e0f
refs/heads/master
2020-03-28T11:16:28.197294
2019-06-30T20:25:18
2019-06-30T20:25:18
148,195,859
6
0
null
null
null
null
UTF-8
Scheme
false
false
773
scm
ex2-49.scm
#lang scheme (define (segments-painter segments) (lambda (frame) (for-each (lambda (segment) (draw-line ((frame-cordinate-map frame) (start-segment segment)) ((frame-cordinate-map frame) (end-segment segment)))) segments))) (define (draw-frame-outline frame) (segments->painter edges) frame) (define edges (list (make-segment (make-vect 0.0 0.0) (make-vect 0.0 0.99)) (make-segment (make-vect 0.0 0.0) (make-vect 0.99 0.0)) (make-segment (make-vect 0.99 0.0) (make-vect 0.99 0.99)) (make-segment (make-vect 0.0 0.99) (make-vect 0.99 0.99))))
false