blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 3
171
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d80fc0f0abf40a176f6dfac2f8e0638a39bd1580 | 804e0b7ef83b4fd12899ba472efc823a286ca52d | /peer/src/net/scurl/impl/peer-utils.rkt | fa9790498fda584f446289bdc8afe97250c62fb9 | [] | no_license | cha63506/CRESTaceans | 6ec436d1bcb0256e17499ea9eccd5c034e9158bf | a0d24fd3e93fc39eaf25a0b5df90ce1c4a96ec9b | refs/heads/master | 2017-05-06T16:59:57.189426 | 2013-10-17T15:22:35 | 2013-10-17T15:22:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 6,586 | rkt | peer-utils.rkt | #lang racket/base
(require racket/contract racket/list)
(require "../common/logging-utils.rkt"
racket/serialize)
(provide list->bytes
bytes->list
monitor-list-out
monitor-bytes-in)
; Create the logger for the peer-validation-impl module.
(define logger (make-logger 'peer-utils-logger (current-logger)))
; Utility to convert a list of primitives to a byte-string.
(define (list->bytes lst in out)
; Write the serialized list to the output.
(write (serialize lst) out)
(flush-output out)
; Read and return bytes
(read-bytes (pipe-content-length in) in))
; Utility to convert a byte-string to a list of primitives.
(define (bytes->list data in out)
; Write the bytes to the output.
(write-bytes data out)
(flush-output out)
; Read and deserialize then return.
(deserialize (read in)))
; Returns a thread handle that monitors the list-in input-port and converts the list to a byte-string
; which is then sent out of the bytes-out output-port.
(define (monitor-list-out list-in bytes-out)
(let-values (((bytes-conversion-in bytes-conversion-out) (make-pipe)))
(letrec ((convert
(lambda ()
(if (port-closed? list-in)
(close-output-port bytes-out)
(begin
(debug logger "Waiting to read from list-in.")
(let ((msg-list (read list-in)))
(debug logger "Received something from list-in.")
; Only continue if we got a list.
(when (or
(list? msg-list)
(bytes? msg-list))
(debug logger "Received a list from list-in, performing conversion to bytes.")
(letrec ((data (list->bytes msg-list bytes-conversion-in bytes-conversion-out))
; Get the length of the payload
(data-length (bytes-length data))
; Concatenate the length and payload.
(out-data (bytes-append
(integer->integer-bytes data-length 2 #f #f)
data)))
; Writing a 2 byte header which specifies the length of the following payload.
(unless (port-closed? bytes-out)
(write-bytes out-data bytes-out)
(flush-output bytes-out)
(debug logger (string-append "Wrote " (number->string data-length) " to bytes-out.")))))
(if (eof-object? msg-list)
(close-output-port bytes-out)
(when (and
(not (eof-object? msg-list))
(not (port-closed? list-in))
(not (port-closed? bytes-out)))
(convert)))))))))
(thread convert))))
; Returns a thread handle that monitors the bytes-in input-port and converts the bytes to a list
; which is then sent out of the list-out output-port.
(define (monitor-bytes-in list-out bytes-in)
(let-values (((bytes-conversion-in bytes-conversion-out) (make-pipe)))
(letrec ((convert
(lambda ()
(if (port-closed? bytes-in)
(close-output-port list-out)
(begin
(debug logger "Waiting to read bytes from bytes-in.")
; Read the message header that is 2 bytes long.
(let ((msg-size-bytes (read-bytes 2 bytes-in)))
(debug logger "Received 2 bytes from bytes-in.")
; When we received 2 bytes of data and not the eof object we can continue.
(when (and
(not (eof-object? msg-size-bytes))
(bytes? msg-size-bytes)
(= (bytes-length msg-size-bytes) 2))
; Convert the header bytes to the size of the incoming message.
(let ((msg-size (integer-bytes->integer msg-size-bytes #f #f)))
(debug logger (string-append
"Read a message header specifing an incoming paylod of "
(number->string msg-size)
"."))
; Only continue if the port is open.
(unless (port-closed? bytes-in)
(let ((msg-bytes (read-bytes msg-size bytes-in)))
(debug logger (string-append "Read the payload of "
(number->string msg-size)
"."))
; Convert the bytes into a list and write it out of list-out.
(when (and
(not (eof-object? msg-bytes))
(bytes? msg-bytes))
(let ((l (bytes->list msg-bytes bytes-conversion-in bytes-conversion-out)))
(unless (port-closed? list-out)
(write l list-out)
(flush-output list-out)
(debug logger "Wrote the received bytes to list-out as a list."))))))))
(if (eof-object? msg-size-bytes)
(close-output-port list-out)
(when (and
(not (eof-object? msg-size-bytes))
(not (port-closed? bytes-in))
(not (port-closed? list-out)))
(convert)))))))))
(thread convert))))
| false |
32119e35c845da72d5053c8659b9074309867e4b | f987ad08fe780a03168e72efce172ea86ad5e6c0 | /plai-doc/scribblings/fake-collector.rkt | 01b7123222a77c0abb6e4b2d5dd9b341fe02845a | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"Apache-2.0"
] | permissive | racket/plai | a76573fdd29b648e04f8adabcdc8fb1f6825d036 | ae42bcb581ab02dcb9ddaea98d5ecded589c8d47 | refs/heads/master | 2023-08-18T18:41:24.326877 | 2022-10-03T02:10:02 | 2022-10-03T02:10:14 | 27,412,198 | 11 | 12 | NOASSERTION | 2022-07-08T19:16:11 | 2014-12-02T02:58:30 | Racket | UTF-8 | Racket | false | false | 270 | rkt | fake-collector.rkt | #lang scheme
(provide (all-defined-out))
(define init-allocator #f)
(define gc:deref #f)
(define gc:alloc-flat #f)
(define gc:cons #f)
(define gc:first #f)
(define gc:rest #f)
(define gc:set-first! #f)
(define gc:set-rest! #f)
(define gc:cons? #f)
(define gc:flat? #f)
| false |
3753d09d38168915d118431941e7cc51f7513d16 | 898dceae75025bb8eebb83f6139fa16e3590eb70 | /pl1/asg2/osx-dist/lib/plt/assignment2-osx/collects/racket/place/distributed/examples/restart/master.rkt | 5738ea9cf16a2012a0005596c48fd16c78daa275 | [] | no_license | atamis/prog-hw | 7616271bd4e595fe864edb9b8c87c17315b311b8 | 3defb8211a5f28030f32d6bb3334763b2a14fec2 | refs/heads/master | 2020-05-30T22:17:28.245217 | 2013-01-14T18:42:20 | 2013-01-14T18:42:20 | 2,291,884 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 482 | rkt | master.rkt | #lang racket/base
(require racket/place/distributed
racket/class
racket/place
syntax/location)
(provide wait-place-thunk)
(provide main)
(define (wait-place-thunk)
(place ch
(printf "BEGINING SLEEP\n")
(sleep 5)
(printf "SLEEP DONE\n")))
(define (main)
(message-router
(spawn-node-with-place-thunk-at "localhost" #:listen-port 6345 (quote-module-name) 'wait-place-thunk #:restart-on-exit #t)
(after-seconds 50
(exit 0))))
| false |
438c0fdacf7abe955bb8cd29928e1f6b83da553b | a148422eee91a5c6105427ef2c48c02bd4e3eaae | /site/stories/tech-coordinators/kate.rkt | 240e4898b2bea0e6100a1668c6a58879b7b46c42 | [] | no_license | thoughtstem/metapolis-stories | 05ddc38843904a05bb43eaccf4af566c5cc901ef | 3e4af8559c98096082e322fda75512274e0e4d8e | refs/heads/master | 2020-08-30T09:45:39.680415 | 2019-12-11T20:15:16 | 2019-12-11T20:15:16 | 218,338,179 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,444 | rkt | kate.rkt | #lang at-exp metapolis-stories/lang/story
(define title "Kate's Story")
(define place places:kates-house)
(define characters (list characters:kate))
(define time (unnamed-time
(moment 2020 9 3 12 00)
(moment 2020 9 3 12 00)))
(define links (list
(story-from "./kate/packing-multiple-locations.rkt")
(story-from "./kate/finding-new-locations.rkt")
(story-from "./kate/packing-training-equipment.rkt")))
@paras{
Kate has been working for 6 months as a Technology Coordinator at MetaCoders. She's a stay-at-home parent and has a degree in Graphic Design. Kate currently handles equipment for two locations Lovelace Elementary and Hopper Library, plus she is working with Victor from Pascal Elementary to start another program.
For the past month Kate has been packing equipment for 2 locations on Thursdays: @(link-to-story (first links))
Kate's son goes to soccer practice on Saturdays. She met Victor, another parent, last weekend. It turns out that Victor is a parent volunteer at Pascal Elementary. This school is close to Kate's house so she had the idea of starting a MetaCoders class there: @(link-to-story (second links))
Kate received an email that Bruce just joined MetaCoders, he will need to pick up equipment to train on some curriculum: @(link-to-story (third links))
}
| false |
6ef36974a93f8064a8332baa3fafd191dea7ff37 | d29c2c4061ea24d57d29b8fce493d116f3876bc0 | /tests/lib-modules-1.rkt | 19bbf26c55a208d4e887b0edbf3958e384e6ca02 | [] | no_license | jbejam/magnolisp | d7b28e273550ff0df884ecd73fb3f7ce78957d21 | 191d529486e688e5dda2be677ad8fe3b654e0d4f | refs/heads/master | 2021-01-16T19:37:23.477945 | 2016-10-01T16:02:42 | 2016-10-01T16:02:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 69 | rkt | lib-modules-1.rkt | #lang magnolisp/2014
(function (int->self x) x)
(provide int->self)
| false |
253536cbe9133de525d7a2afe878bcf9d727de06 | 25bc0adfc98c4ddc06b4400bf95648d02e55efa3 | /intro-to-bionf-algs/intro-to-bioinf-algs.rkt | 860aa0b862f54d653f29165e92eda72b8e219ea3 | [] | no_license | annenkov/racket-samples | 2e9583add2c113aae2a0993e0e8516a09c94a258 | 0813a332e81f03dc705cafc018b3edf71441ac8e | refs/heads/master | 2020-12-20T21:14:07.538883 | 2012-07-19T14:52:28 | 2012-07-19T14:52:28 | 236,211,729 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 3,454 | rkt | intro-to-bioinf-algs.rkt | #lang racket
(require (prefix-in bag:
(planet "bag.ss" ("soegaard" "galore.plt" 4 2)))) ; utils to work with multisets
(require rackunit)
;;;;;; Problem 2.1 ;;;;;;
; not complete - only even item count allowed
(define (min-and-max xs)
(define (max pair)
(let ([a (car pair)]
[b (cadr pair)])
(if (< a b) b
a)))
(define (min pair)
(let ([a (car pair)]
[b (cadr pair)])
(if (> a b) b
a)))
(define (min-and-max-iter xs maybe-min maybe-max)
(if (null? xs) (list maybe-min maybe-max)
(let ([head (take xs 2)]
[tail (drop xs 2)])
(min-and-max-iter tail
(if (> maybe-min (min head))
(min head)
maybe-min)
(if (< maybe-max (max head))
(max head)
maybe-max)))))
(min-and-max-iter (drop xs 2) (min (take xs 2)) (max (take xs 2))))
;;;;;; Problem 4.1 ;;;;;;
; At first, find distances between head and other points
(define (distances-with-head xs)
(define (distances-helper xs head)
(if (null? (cdr xs))
'()
(cons (abs (- head (cadr xs)))
(distances-helper (cdr xs) head))))
(distances-helper xs (car xs)))
; Find all distances using distances-with-head
(define (make-all-distances xs)
(if (null? (cdr xs))
'()
(append (distances-with-head xs) (make-all-distances (cdr xs)))))
; alternative version using list comprehension
(define (make-all-distances-alt xs)
(define (distance x y)
(abs (- x y)))
(if (null? (cdr xs))
'()
(let ([head (car xs)])
(append
(for/list ([x (cdr xs)])(distance x head))
(make-all-distances-alt (cdr xs))))))
; tail-recursive version of make-all-distances-alt
(define (make-all-distances-alt-tail-recur xs)
(define (iter xs res)
(if (null? (cdr xs))
res
(let ([head (car xs)])
(iter
(cdr xs)
(append res (distances (cdr xs) head))))))
(iter xs '()))
(define (distances xs point)
(define (distance x y)
(abs (- x y)))
(for/list ([x xs])
(distance x point)))
;;;;; Problem 4.2 ;;;;;
(define (partial-digest lengths-bag)
(let ([max-length (apply max (bag:elements lengths-bag))])
(place (bag:remove max-length lengths-bag)
(list 0 max-length) max-length)))
(define (place lengths-bag res width)
(if (bag:empty? lengths-bag)
(sort res <)
(letrec ([bag-as-list (bag:elements lengths-bag)]
[max-length (apply max (bag:elements lengths-bag))]
[y-distances (distances res max-length)]
[width-y-distances (distances res (- width max-length))])
(cond [(bag:subbag? (bag:list->eq y-distances) lengths-bag)
(with-handlers ([symbol? (lambda (x) (place (apply bag:remove* lengths-bag width-y-distances) (append res (list (- width max-length))) width))])
(place (apply bag:remove* lengths-bag y-distances) (append res (list max-length)) width))]
[(bag:subbag? (bag:list->eq width-y-distances) lengths-bag)
(place (apply bag:remove* lengths-bag width-y-distances) (append res (list (- width max-length))) width)]
[else (raise 'failed)]))))
;(check-equal? (partial-digest (bag:list->eq '(1 3 2))) '(1 2 4)) | false |
7ab8bc737a442c768a06f117537bec8be92504ea | 98fd4b7b928b2e03f46de75c8f16ceb324d605f7 | /drracket/drracket/info.rkt | a35b0644fb3dc37f0c5ce058dc37d04fe669b632 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | racket/drracket | 213cf54eb12a27739662b5e4d6edeeb0f9342140 | 2657eafdcfb5e4ccef19405492244f679b9234ef | refs/heads/master | 2023-08-31T09:24:52.247155 | 2023-08-14T06:31:49 | 2023-08-14T06:32:14 | 27,413,460 | 518 | 120 | NOASSERTION | 2023-09-11T17:02:44 | 2014-12-02T03:36:22 | Racket | UTF-8 | Racket | false | false | 4,742 | rkt | info.rkt | #lang info
;(define tools '("sprof.rkt"))
;(define tool-names '("Sampling Profiler"))
(define drracket-tools '("syncheck.rkt"))
(define drracket-tool-names '("Check Syntax"))
(define gracket-launcher-names '("DrRacket"))
(define gracket-launcher-libraries '("drracket.rkt"))
(define release-note-files (list (list "DrRacket" "HISTORY.txt")))
(define copy-man-pages '("drracket.1"))
(define binary-keep-files '("private/launcher-mred-bootstrap.rkt"
"private/launcher-mz-bootstrap.rkt"))
;; color-blind friendly palette from Paul Tol:
;; http://www.sron.nl/~pault/
;; using his Scheme for Marking Text colors
(define light-blue #(#x90 #xb3 #xff))
(define light-cyan #(#xcc #xee #xff))
(define light-green #(#xcc #xdd #xaa))
(define light-tan #(#xee #xee #xbb))
(define light-pink #(#xff #xcc #xcc))
(define light-grey #(#xdd #xdd #xdd))
(define dark-blue #(#x22 #x22 #x77))
(define dark-plum #(#x77 #x22 #x77))
(define dark-green #(#x22 #x77 #x22))
(define dark-olive #(#x66 #x66 #x33))
(define dark-red #(#x88 #x11 #x11))
(define sea-green #(#x00 #xb2 #xb2))
(define burnt-orange #(181 102 51))
(define tol-bow-error-color dark-red)
(define tol-bow-constants dark-green)
(define tol-black-on-white-colors
`((framework:paren-match-color ,light-tan)
(framework:syntax-color:scheme:comment ,dark-plum)
(framework:syntax-color:scheme:constant ,tol-bow-constants)
(framework:syntax-color:scheme:error ,tol-bow-error-color)
(framework:syntax-color:scheme:hash-colon-keyword ,tol-bow-constants)
(framework:syntax-color:scheme:keyword ,dark-blue)
(framework:syntax-color:scheme:string ,tol-bow-constants)
(framework:syntax-color:scheme:text ,tol-bow-constants)
(framework:syntax-color:scheme:other ,dark-blue)
(framework:syntax-color:scheme:parenthesis ,sea-green)
(framework:syntax-color:scheme:symbol ,dark-blue)
(drracket:read-eval-print-loop:error-color ,tol-bow-error-color)
(drracket:read-eval-print-loop:out-color ,tol-bow-constants)
(drracket:read-eval-print-loop:value-color ,dark-blue)
(drracket:check-syntax:free-variable ,tol-bow-error-color)
(drracket:check-syntax:set!d ,tol-bow-error-color)
(drracket:check-syntax:unused-require ,tol-bow-error-color)
(drracket:syncheck:matching-identifiers ,light-green)
(drracket:syncheck:unused-identifier ,light-pink)
(drracket:syncheck:document-identifier ,light-green)
(drracket:syncheck:var-arrow ,sea-green)
(drracket:syncheck:template-arrow ,dark-plum)
(drracket:syncheck:tail-arrow ,dark-red)))
(define tol-wob-constants light-blue)
(define tol-wob-error light-pink)
(define tol-white-on-black-colors
`((framework:paren-match-color ,dark-blue)
(framework:syntax-color:scheme:comment ,light-green)
(framework:syntax-color:scheme:constant ,tol-wob-constants)
(framework:syntax-color:scheme:error ,tol-wob-error)
(framework:syntax-color:scheme:hash-colon-keyword ,tol-wob-constants)
(framework:syntax-color:scheme:keyword ,light-blue)
(framework:syntax-color:scheme:string ,tol-wob-constants)
(framework:syntax-color:scheme:text ,tol-wob-constants)
(framework:syntax-color:scheme:other ,light-blue)
(framework:syntax-color:scheme:parenthesis ,sea-green)
(framework:syntax-color:scheme:symbol ,light-blue)
(drracket:read-eval-print-loop:error-color ,tol-wob-error)
(drracket:read-eval-print-loop:out-color ,dark-green)
(drracket:read-eval-print-loop:value-color ,light-blue)
(drracket:check-syntax:free-variable ,tol-wob-error)
(drracket:check-syntax:set!d ,tol-wob-error)
(drracket:check-syntax:unused-require ,tol-wob-error)
(drracket:syncheck:matching-identifiers ,dark-green)
(drracket:syncheck:unused-identifier ,dark-red)
(drracket:syncheck:document-identifier ,dark-green)
(drracket:syncheck:var-arrow ,light-pink)
(drracket:syncheck:template-arrow ,burnt-orange)
(drracket:syncheck:tail-arrow ,light-green)))
(define |Tol's Color-blind-safe| "Tol's Color-blind-safe")
(define |Tol's White on Black| "Tol's White on Black")
(define framework:color-schemes
(list
(hash
'name 'modern-color-scheme
'colors
'((framework:syntax-color:scheme:string #(211 72 255))
(framework:syntax-color:scheme:constant #(211 72 255))
(framework:syntax-color:scheme:comment #(194 158 31))
(framework:syntax-color:scheme:parenthesis #(0 150 255))))
(hash
'name |Tol's Color-blind-safe|
'inverted-base-name |Tol's White on Black|
'colors tol-black-on-white-colors)
(hash
'name |Tol's White on Black|
'inverted-base-name |Tol's Color-blind-safe|
'white-on-black-base? #t
'colors tol-white-on-black-colors)))
| false |
fcad3b2abb67d150592ac5f738fdd72e50da4b9d | d2fc383d46303bc47223f4e4d59ed925e9b446ce | /courses/2012/fall/330/notes/2-23.rkt | c7bed1d2199b8a9906d19f69386136e5588e2936 | [] | no_license | jeapostrophe/jeapostrophe.github.com | ce0507abc0bf3de1c513955f234e8f39b60e4d05 | 48ae350248f33f6ce27be3ce24473e2bd225f6b5 | refs/heads/master | 2022-09-29T07:38:27.529951 | 2022-09-22T10:12:04 | 2022-09-22T10:12:04 | 3,734,650 | 14 | 5 | null | 2022-03-25T14:33:29 | 2012-03-16T01:13:09 | HTML | UTF-8 | Racket | false | false | 5,130 | rkt | 2-23.rkt | #lang plai
;; YESTERDAY
;; - Web style is called CPS---continuation passing style
;; - A continuation is the abstraction that a stack implements
;; -- "The rest of the computation"
;; - CPS can be automated for every program in every programming language
;; -- But is easier with closures
;; -- When you CPS, some functions (like +) are oblivious to the continuation
;; --- But others (like web-prompt/clo) observe it
;; TODAY
;; - What other functions could we write that observe the continuation?
;; - How else could first-class continuation access be available?
;; -- CPS is bad because...
;; --- global,
;; --- doesn't use stack,
;; --- requires proper function call implementations
;; - Examples [0:10]
;; -- call/cc
;; -- let/cc [0:15]
;; -- escaping
;; -- exceptions [0:20]
;; -- threads [0:30]
;; -- generators [0:50]
(+ 1 (+ 2 3))
;; What is the continuation of "(+ 1 (+ 2 3))"?
(λ (x)
(displayln x)
(exit 0))
;; What is the continuation of "(+ 2 3)"?
(λ (five)
(displayln (+ 1 five))
(exit 0))
(+ 1
(call-with-current-continuation
(λ (the-continuation-of-+-2-3)
(+ 2 3))))
(+ 1
(call/cc
(λ (the-continuation-of-+-2-3)
(+ 2 3))))
(+ 1
(let/cc the-continuation-of-+-2-3
(+ 2 3)))
(+ 1
(call-with-current-continuation
(λ (the-continuation-of-+-2-3)
(+ 2 (the-continuation-of-+-2-3 3)))))
(+ 1
(let/cc the-continuation-of-+-2-3
(+ 2 (the-continuation-of-+-2-3 3))))
;;;;;
(define (f x)
(let/cc return
(when (> x 5)
(return -1))
(+ x 2)))
(f 0)
(f 7)
;;;;;
(define the-exn-handler #f)
(define (throw x)
(the-exn-handler x))
(define (try-catch body-f catch-f)
(define old-exn-handler the-exn-handler)
(begin0
(let/cc who-called-try-catch
(set! the-exn-handler
(λ (x)
(who-called-try-catch
(catch-f x))))
(body-f))
(set! the-exn-handler
old-exn-handler)))
(define (h x)
(when (zero? x)
(throw "You can't do that!"))
(/ 10 x))
(define (g x)
(try-catch
(λ () (h (- x 5)))
(λ (x)
(eprintf "~a\n" x)
-1)))
(g 10) "should be 2"
(g 5) "should be -1 + error"
;; threading systems
(define thread-q empty)
(define (spawn thread-f)
(set! thread-q
(append thread-q
(list thread-f))))
(define (context-switch)
(let/cc where-i-am-now-so-i-can-come-back-later
(spawn where-i-am-now-so-i-can-come-back-later)
(define whose-next (first thread-q))
(set! thread-q (rest thread-q))
(whose-next)))
(spawn
(λ ()
(for ([i (in-range 10)])
(printf "him: ~a\n" i)
(context-switch))))
(for ([i (in-range 10)])
(printf "me: ~a\n" i)
(context-switch))
;; generator
;; (define where-i-was #f)
;; (define (whered-they-go)
;; (if where-i-was
;; (where-i-was)
;; (let/cc really-return
;; (define (return the-answer)
;; (let/cc where-i-am
;; (set! where-i-was
;; where-i-am)
;; (really-return the-answer)))
;; ;; where-i-am will go--->
;; (return "Kirtland")
;; ;; ---> right here --->
;; (return "Far West")
;; (return "Nauvoo")
;; (return "SLC")
;; (return "The Celestial Kingdom (aka Provo)")
;; #f)))
(define (make-generator
generator-body)
(define where-i-was #f)
(define (whered-they-go)
(if where-i-was
(where-i-was)
(let/cc really-return
(define (return the-answer)
(let/cc where-i-am
(set! where-i-was
where-i-am)
(really-return the-answer)))
(generator-body return)
#f)))
whered-they-go)
;; (+ (prompt "First")
;; (prompt "Second"))
(define whered-they-go
(make-generator
(λ (return)
(return "Kirtland")
(return "Far West")
(return "Nauvoo")
(return "SLC")
(return "The Celestial Kingdom (aka Provo)"))))
;; Infinite loop:
;; (list (whered-they-go) (whered-they-go))
;; really-return will go --->
(whered-they-go)
;; ---> right here
(whered-they-go)
(whered-they-go)
(whered-they-go)
(whered-they-go)
(whered-they-go)
(whered-they-go)
(whered-they-go)
;; (set! where-i-was #f)
;; (whered-they-go)
(define (list->generator l)
(make-generator
(λ (return)
(for-each (λ (x) (return x)) l))))
(define some-l-g
(list->generator '(1 2 3)))
(some-l-g)
(some-l-g)
(some-l-g)
(define (tree-walk f l)
(cond
[(empty? l)
(void)]
[(cons? l)
(tree-walk f (first l))
(tree-walk f (rest l))]
[else
(f l)]))
(define tree
(list 1
(list 2 3)
(list 5 6 (list 7 8) 9)
(list 10)))
(tree-walk displayln tree)
(define (tree->generator t)
(make-generator
(λ (return)
(tree-walk return t))))
(define tree-g
(tree->generator tree))
(tree-g)
(tree-g)
(tree-g)
(define what-are-the-odds?
(make-generator
(λ (return)
(define (loop i)
(return i)
(loop (+ i 2)))
(loop 1))))
(what-are-the-odds?)
(what-are-the-odds?)
(what-are-the-odds?)
(what-are-the-odds?)
"END"
| false |
8517b018202786dae11efb412228b35c670f3bb7 | 61c9db5add56b5f00f6e089abb005afa1a0e6bdd | /cur-doc/cur/scribblings/ntac.scrbl | 716fa908a7f78e945bf74d4148beff039e40e231 | [
"BSD-2-Clause"
] | permissive | Racket-zh/cur | 016da73b4692603ff519d1e0ddfaaf3cc8ab3601 | 215ff3654e5a083aa63bf5004c5df0ea538a6b20 | refs/heads/master | 2020-03-18T22:08:13.179331 | 2018-05-24T19:57:41 | 2018-05-24T19:57:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 11,945 | scrbl | ntac.scrbl | #lang scribble/manual
@(require
"defs.rkt"
racket/contract
(for-label racket)
scribble/eval)
@title{ntac: The New Tactic System}
@author[@author+email["William J. Bowman" "[email protected]"]]
@author[@author+email["Jay McCarthy" "[email protected]"]]
As Coq has shown, tactics have proven useful for doing complex proofs.
In Cur, tactics are not built-in or provided by the language.
However, any user can use meta-programming to add tactics to Cur.
In fact, a user did.
Cur originally shipped with a proof-of-concept tactic system, but the system did not scale well.
So Jay designed and prototyped a new one over a weekend in 200 lines of code.
Now it's the default system.
@section{The ntac system}
@defmodule[cur/ntac/base]
A @tech{tactic} is used at the top-level of a proof script.
A @deftech{tactic} is a Racket function that satisfies the contact @racket[(-> nttz? nttz?)]
Tactics easily compose, may navigate the proof tree, resolve multiple holes, and
be called recursively.
A @tech{tactical} is used to manipulate the focus of proof tree, such as to
resolve a single hole.
A @deftech{tactical} satisfies the contract @racket[(-> dict? ntt?)]
We will conflate tacticals with functions that produce tacticals from addition
arguments.
I.e. we also call functions that satisfy @racket[(-> syntax? ... (-> dict? ntt?))] tacticals.
Tacticals receive additional arguments as Cur syntax; for technical reasons
these need to be processed by @racket[ntac-syntax] before being used in a
tactical.
Tacticals are usually used by the @racket[fill] tactic, which simply applies a
tactical to the current focus of the proof tree zipper.
We usually provide macros for the surface syntax of tacticals so that users
need not deal with syntax objects directly, or explicitly use the @racket[fill]
tactic.
These macros follow the naming convention @racket[by-_tactical].
@(define curnel-eval (curnel-sandbox "(require cur/ntac/base cur/ntac/standard cur/stdlib/sugar cur/stdlib/nat)"))
@subsection{Usage}
@defform[(ntac type tactic ...)]{
Run the ntac @racket[tactic ...] to produce a term inhabiting @racket[type].
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
by-intro by-assumption)
z)
(eval:alts
((ntac (forall (x : Nat) Nat)
interactive)
z)
((ntac (forall (x : Nat) Nat)
by-obvious)
z))
]
}
@defform[(define-theorem name ty ps ...)]{
Short hand for @racket[(define name (ntac ty ps ...))]
@todo{define-theorem isn't working on the sandbox}
@examples[#:eval curnel-eval
(eval:alts
(define-theorem nat-id (forall (x : Nat) Nat)
by-intro by-assumption)
(void))
]
}
@subsection{Base Tactics}
These tactics are used in the tactic system API, while other other tactics are defined outside the base system.
@defthing[next tactic?]{
Move the focus to the next hole.
}
@subsection{Proof Trees}
The @emph{nt}ac proof @emph{t}ree datatype @racket[ntt] represents a Cur term with holes.
Specifically, the proof tree contains nodes for a hole, an exact term,
a combination of subterms, and a context manipulation.
@defstruct*[ntt ([contains-hole? boolean?] [goal syntax?]) #:transparent]{
An ntac proof tree. Records the current @racket[goal], as syntax representing a Cur type, and whether or not there is a hole.
}
@defstruct*[(ntt-hole ntt) ([contains-hole? boolean?] [goal syntax?]) #:transparent]{
A node in an ntac proof tree representing a hole to be filled.
}
@defproc[(make-ntt-hole [goal syntax?]) ntt?]{
Create a new @racket[ntt-hole?] node whose hole is @racket[goal?].
The resulting @racket[ntt?] does @racket[contains-hole?].
}
@defstruct*[(ntt-exact ntt) ([contains-hole? boolean?] [goal syntax?] [term syntax?]) #:transparent]{
A node in an ntac proof tree holding a Cur @racket[term], as @racket[syntax?], satisfying @racket[goal].
}
@defproc[(make-ntt-exact [goal syntax?] [term syntax?]) ntt?]{
Create a new @racket[ntt-exact?] node that proves @racket[goal] via the Cur
term @racket[term].
The resulting @racket[ntt?] does not @racket[contains-hole?].
}
@defstruct*[(ntt-context ntt) ([contains-hole? boolean?] [goal syntax?] [env-transformer (-> dict? dict?)] [subtree ntt?]) #:transparent]{
A node in an ntac proof tree that records information about the local environment, by manipulating the context of the @racket[subtree] using @racket[env-transformer].
}
@defproc[(make-ntt-context [env-transformer (-> dict? dict?)] [subtree ntt?]) ntt?]{
Create a new @racket[ntt-context?] node that manipulates the @racket[subtree]
according to @racket[env-transformer].
The resulting @racket[ntt?] inherits the @racket[goal] from @racket[subtree] and
only @racket[contains-hole?] if @racket[subtree] does.
}
@defstruct*[(ntt-apply ntt) ([contains-hole? boolean?] [goal syntax?] [subtrees (listof? ntt?)] [f (-> syntax? ... syntax?)]) #:transparent]{
A node in an ntac proof tree that proves @racket[goal] by using @racket[f] to combine the terms that result from @racket[subtrees] into a single Cur term.
}
@defproc[(make-ntt-apply [goal syntax?] [subtrees (listof? ntt)] [f (-> syntax? ... syntax?)]) ntt?]{
Create a new @racket[ntt-apply?] node that uses @racket[f] to build a proof tree out of @racket[subtrees], with @racket[goal] remaining to be proved.
The resulting @racket[ntt?] @racket[contains-hole?] if any @racket[subtrees] do.
}
@defstruct*[(ntt-done ntt) ([contains-hole? boolean?] [goal syntax?] [subtree ntt?]) #:transparent]{
A node in an ntac proof tree that asserts that the @racket[subtree] is complete.
}
@defproc[(make-ntt-done [subtree ntt?]) ntt?]{
Create a new @racket[ntt-done?] node with @racket[subtree].
Results in an error if @racket[subtree] @racket[contains-hole?].
}
@subsection{Proof Tree Zipper}
To navigate the proof tree, we define the @emph{nt}ac @emph{t}ree @emph{z}ipper.
@todo{Actually, these dicts need to be ordered-dicts or envs. Also, right now they're hashes}
@todo{Should we hide the details of this struct?}
@defstruct*[nttz ([context dict?] [focus ntt?] [prev (-> ntt? nttz?)])]{
An ntac tree zipper.
Contains the local environment for the focus of the proof tree,
@racket[context], the subtree being focused on @racket[focus], and a function
that navigates up the tree once the focused subtree is complete @racket[prev].
}
@defproc[(nttz-up [nttz nttz?]) nttz?]{
Navigate up the proof tree.
}
@defproc[(nttz-down-context [nttz nttz?]) nttz?]{
Navigate down when the proof tree when the focus is a context node.
}
@defproc[(nttz-down-apply [nttz nttz?]) nttz?]{
Navigate down when the proof tree when the focus is an apply node.
}
@defproc[(nttz-done? [nttz nttz?]) boolean?]{
Returns @racket[#t] when the focus is complete, and @racket[#f] otherwise.
}
@subsection{Tactic System API}
@defproc[(new-proof-tree [goal syntax?]) ntt?]{
Create a new proof tree with @racket[goal].
}
@defproc[(proof-tree->complete-term [pt ntt?] [err-stx syntax? #f]) syntax?]{
Run a the proof tree @racket[pt] to produce a Cur term, as syntax. Raise an
error if the proof tree @racket[contains-hole?], using @racket[err-stx] for
error location.
}
@defproc[(eval-proof-step [ptz nttz?] [pstep syntax?]) nttz?]{
Evaluate the tactic represented by @racket[pstep] on @racket[ptz],
performing error handling.
}
@defproc[(eval-proof-script [pt ntt?] [psteps (listof syntax?)] [err-stx syntax? #f]) ntt?]{
Evaluate the tactic script represented by @racket[psteps] on the proof tree
@racket[pt], checking that the resulting proof is valid for the goal of
@racket[pt] and producing an error otherwise, using @racket[err-stx] for error location.
}
@defproc[(ntac-proc [goal syntax?] [ps (listof syntax?)]) syntax?]{
A procedure version of @racket[ntac].
Runs the proof script represented by @racket[ps] to produce a Cur term of type
represented by @racket[goal].
}
@defproc[(ntac-syntax [stx syntax?]) syntax?]{
For technical reasons, top-level syntax objects representing Cur terms need to
be processed before being used in a tactical.
This function performs that processing.
Usually, this function is used in a macro that provides surface syntax for a tactical.
}
@section{Standard Tactics and Tacticals}
@defmodule[cur/ntac/standard]
@defstruct*[(exn:fail:ntac exn:fail) ()]{
A phase 1 value; an exception representing an ntac failure.
}
@defstruct*[(exn:fail:ntac:goal exn:fail:ntac) ()]{
A phase 1 value; an exception representing an failure for an ntac tactic or tactical to match against the current goal.
}
@defproc[(raise-ntac-goal-exception [msgf string?] [arg string?] ...) any]{
A phase 1 procedure; raises @racket[exn:fail:ntac:goal], using the format string @racket[msgf] with arguments @racket[arg]s to format the error message.
}
@defform[(ntac-match goal [pattern branch] ...)]{
A phase 0 form; like @racket[cur-match], but implicitly raises @racket[exn:fail:ntac:goal] if none of the @racket[pattern]s match.
}
@todo{Create deftactic and deftactical?}
@defthing[nop tactic?]{
The no-op tactic; does nothing.
}
@defthing[display-focus tactic?]{
Print the focus of the proof tree, and its local environment.
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
display-focus by-intro display-focus by-assumption)
z)
]
}
@defproc[(try [t tactic?]) tactic?]{
Runs the tactic @racket[t] on the proof tree, but ignore any @racket[exn:fail:ntac:goal]s and return the proof tree unchanged if such an exception is raised.
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
by-assumption)
z)
((ntac (forall (x : Nat) Nat)
(try by-assumption))
z)
]
}
@defproc[(fill [t tactical?]) tactic?]{
Runs the tactical @racket[t] on the focus of the proof tree.
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
(fill (intro)) by-assumption)
z)
]
}
@defproc[(intro [name identifier? #f]) tactical?]{
Matches when the current goal has the form @racket[(forall (id : type-expr)
body-expr)], introducing the assumption @racket[name : type-expr] into the
local environment, using @racket[id] if no @racket[name] is provided.
Raises @racket[exn:fail:ntac:goal] if the goal does not have the this form.
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
(fill (intro)) by-assumption)
z)
((ntac (forall (x : Nat) Nat)
(fill (intro (ntac-syntax #'x))) by-assumption)
z)
]
}
@defform*[((by-intro id)
by-intro)]{
Short hand for @racket[(fill (intro #'id))] and @racket[(fill (intro))].
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
by-intro by-assumption)
z)
]
}
@defthing[assumption tactical?]{
Solves the goal by looking for a matching assumption in the local environment.
Raises @racket[exn:fail:ntac:goal] if not assumption matches the goal.
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
by-intro (fill assumption))
z)
]
}
@todo{Maybe just define the macro @racket[by] that expands to @racket[(fill (tactical rest ...))]}
@defform[#:id by-assumption by-assumption]{
Short hand for @racket[(fill (assumption))]
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
by-intro by-assumption)
z)
]
}
@defthing[obvious tactical?]{
Attempts to solve a goal by doing the obvious thing.
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
(fill obvious) (fill obvious))
z)
]
}
@todo{This breaks the naming convention; probably should have obvious-step and obvious}
@defthing[by-obvious tactic?]{
Try to solve all the holes by doing the obvious thing.
@examples[#:eval curnel-eval
((ntac (forall (x : Nat) Nat)
by-obvious)
z)
]
}
@subsection{Interactive Tactic}
In Cur, interactivity is just a user-defined tactic.
@defthing[interactive tactic?]{
Starts a REPL that prints the proof state, reads a tactic (as @racket[ntac] would), evaluates the
tactic, and repeats. Exits when the proof is finished.
Handles @racket[exn:fail:ntac:goal] by printing the message and continuing the REPL.
@examples[#:eval curnel-eval
(eval:alts
((ntac (forall (x : Nat) Nat)
interactive)
z)
((ntac (forall (x : Nat) Nat)
by-obvious)
z))
]
} | false |
f2553c75ea46cb6c56054792c92813ad531541b4 | d07380a8836587ff70fdc001e939e232ee202c80 | /opencl/c/5-5.rkt | b23cf32d00ccaf0ea293eb13a6d4a332dffd1e51 | [] | no_license | jeapostrophe/opencl | 8e21c8fd9a4500bcf9a23a63a17ec6636810f6a0 | f984050b0c02beb6df186d1d531c4a92a98df1a1 | refs/heads/master | 2020-05-17T22:41:00.588267 | 2015-12-19T21:45:10 | 2015-12-19T21:45:10 | 617,896 | 12 | 5 | null | 2015-08-01T10:49:35 | 2010-04-19T15:00:08 | Racket | UTF-8 | Racket | false | false | 9,234 | rkt | 5-5.rkt | #lang at-exp racket/base
(require ffi/unsafe
ffi/unsafe/cvector
(except-in racket/contract ->)
(prefix-in c: racket/contract)
scribble/srcdoc
"include/cl.rkt"
"lib.rkt"
"syntax.rkt"
"types.rkt")
(require/doc racket/base
scribble/manual
(for-label "types.rkt"))
;;;;
(define-opencl clCreateKernel
(_fun [program : _cl_program]
[kernel_name : _bytes]
[errcode_ret : (_ptr o _cl_int)]
-> [kernel : _cl_kernel/null]
->
(cond
[(= errcode_ret CL_SUCCESS)
kernel]
[(= errcode_ret CL_INVALID_PROGRAM)
(error 'clCreateKernel "program is not a valid program object")]
[(= errcode_ret CL_INVALID_PROGRAM_EXECUTABLE)
(error 'clCreateKernel "there is no successfully built executable for program")]
[(= errcode_ret CL_INVALID_KERNEL_NAME)
(error 'clCreateKernel "kernel_name(~e) is not found in the program"
kernel_name)]
[(= errcode_ret CL_INVALID_KERNEL_DEFINITION)
(error 'clCreateKernel "the function definition for __kernel function given by kernel_name such as the number of arguments, the argument types are not the same for all devices for which the program executable has been built")]
[(= errcode_ret CL_INVALID_VALUE)
(error 'clCreateKernel "kernel_name is NULL")]
[(= errcode_ret CL_OUT_OF_HOST_MEMORY)
(error 'clCreateKernel "there is a failure to allocate resources required by the OpenCL implementation on the host")]
[else
(error 'clCreateKernel "Invalid error code: ~e" errcode_ret)])))
(provide/doc
[proc-doc/names
clCreateKernel
(c:-> _cl_program/c bytes? _cl_kernel/c)
(program kernel-name)
@{}])
;;;; clCreateKernelsInProgram
(define-opencl-count
clCreateKernelsInProgram
(clCreateKernelsInProgram:count clCreateKernelsInProgram:vector)
([program : _cl_program _cl_program/c])
_cl_kernel _cl_kernel_vector/c
(error status
(cond [(= status CL_INVALID_PROGRAM)
(error 'clCreateKernelsInProgram "program is a not valid program object")]
[(= status CL_INVALID_PROGRAM_EXECUTABLE)
(error 'clCreateKernelsInProgram "there is no successfully built executable for any device in program")]
[(= status CL_INVALID_VALUE)
(error 'clCreateKernelsInProgram "kernels is not NULL and num_kernels is less than the number of kernels in program")]
[(= status CL_OUT_OF_HOST_MEMORY)
(error 'clCreateKernelsInProgram "there is a failure to allocate resources required by the OpenCL implementation on the host")]
[else
(error 'clCreateKernelsInProgram "Invalid error code: ~e" status)])))
;;;;
(define-opencl clRetainKernel
(_fun [kernel : _cl_kernel]
-> [status : _cl_int]
-> (cond [(= status CL_SUCCESS) (void)]
[(= status CL_INVALID_KERNEL)
(error 'clRetainKernel "kernel is not a valid kernel object")]
[else
(error 'clRetainKernel "Invalid error code: ~e" status)])))
(provide/doc
[proc-doc/names clRetainKernel (c:-> _cl_kernel/c void)
(kernel) @{}])
(define-opencl clReleaseKernel
(_fun [kernel : _cl_kernel]
-> [status : _cl_int]
-> (cond [(= status CL_SUCCESS) (void)]
[(= status CL_INVALID_KERNEL)
(error 'clReleaseKernel "kernel is not a valid kernel object")]
[else
(error 'clReleaseKernel "Invalid error code: ~e" status)])))
(provide/doc
[proc-doc/names clReleaseKernel (c:-> _cl_kernel/c void)
(kernel) @{}])
;;;;
(define (clSetKernelArg-return status)
(cond [(= status CL_SUCCESS)
(void)]
[(= status CL_INVALID_KERNEL)
(error 'clSetKernelArg "kernel is not a valid kernel object")]
[(= status CL_INVALID_ARG_INDEX)
(error 'clSetKernelArg "arg_index is not a valid argument index")]
[(= status CL_INVALID_ARG_VALUE)
(error 'clSetKernelArg "arg_value specified in NULL for an argument that is not declared with the __local qualifier or vice-versa")]
[(= status CL_INVALID_MEM_OBJECT)
(error 'clSetKernelArg "an argument declared to be a memory object when the specified arg_value is not a valid memory object")]
[(= status CL_INVALID_SAMPLER)
(error 'clSetKernelArg "an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object")]
[(= status CL_INVALID_ARG_SIZE)
(error 'clSetKernelArg "arg_size does not match the size of the data type for an argument is not a memory object or if the argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the __local qualitifer or if the argument is a sampler and arg_size != sizeof(cl_sampler)")]
[else
(error 'clSetKernelArg "Invalid error code: ~e" status)]))
(define-syntax-rule (define-clSetKernelArg clSetKernelArg:_type _type _type/c)
(begin
(define-opencl clSetKernelArg:_type
clSetKernelArg
(_fun [kernel : _cl_kernel]
[arg_index : _cl_uint]
[arg_size : _size_t = (ctype-sizeof _type)]
[arg_value : (_ptr i _type)]
-> [status : _cl_int]
-> (clSetKernelArg-return status)))
(provide/doc
[proc-doc/names
clSetKernelArg:_type
(c:-> _cl_kernel/c _cl_uint/c _type/c void)
(kernel arg-num val)
@{}])))
; XXX Make sure this is complete
(define-clSetKernelArg clSetKernelArg:_cl_mem _cl_mem _cl_mem/c)
(define-clSetKernelArg clSetKernelArg:_cl_uint _cl_uint _cl_uint/c)
(define-clSetKernelArg clSetKernelArg:_cl_int _cl_int _cl_int/c)
(define-clSetKernelArg clSetKernelArg:_cl_char _cl_char _cl_char/c)
(define-clSetKernelArg clSetKernelArg:_cl_uchar _cl_uchar _cl_uchar/c)
(define-clSetKernelArg clSetKernelArg:_cl_short _cl_short _cl_short/c)
(define-clSetKernelArg clSetKernelArg:_cl_ushort _cl_ushort _cl_ushort/c)
(define-clSetKernelArg clSetKernelArg:_cl_long _cl_long _cl_long/c)
(define-clSetKernelArg clSetKernelArg:_cl_ulong _cl_ulong _cl_ulong/c)
(define-clSetKernelArg clSetKernelArg:_cl_float _cl_float _cl_float/c)
(define-clSetKernelArg clSetKernelArg:_cl_double _cl_double _cl_double/c)
(define-opencl clSetKernelArg:local
clSetKernelArg
(_fun [kernel : _cl_kernel]
[arg_index : _cl_uint]
[arg_size : _size_t]
[arg_value : _pointer = #f]
-> [status : _cl_int]
-> (clSetKernelArg-return status)))
(provide/doc
[proc-doc/names
clSetKernelArg:local
(c:-> _cl_kernel/c _cl_uint/c _size_t/c void)
(kernel arg-num arg_size)
@{}])
;;;; clGetKernelInfo
(define-opencl-info
clGetKernelInfo
(clGetKernelInfo:length clGetKernelInfo:generic)
_cl_kernel_info _cl_kernel_info/c
(args [kernel : _cl_kernel _cl_kernel/c])
(error status
(cond [(= status CL_INVALID_VALUE)
(error 'clGetKernelInfo "param_name is not valid or if size in bytes specified by param_value_size is < size of return type and param_value is not NULL")]
[(= status CL_INVALID_KERNEL)
(error 'clGetKernelInfo "kernel is not a valid kernel object")]
[else
(error 'clGetKernelInfo "Invalid error code: ~e" status)]))
(variable param_value_size
[_char* (_bytes o param_value_size) #"" bytes?
CL_KERNEL_FUNCTION_NAME])
(fixed [_cl_uint _cl_uint/c CL_KERNEL_NUM_ARGS CL_KERNEL_REFERENCE_COUNT]
[_cl_context _cl_context/c CL_KERNEL_CONTEXT]
[_cl_program _cl_program/c CL_KERNEL_PROGRAM]))
;;;; clGetKernelWorkGroupInfo
(define-opencl-info
clGetKernelWorkGroupInfo
(clGetKernelWorkGroupInfo:length clGetKernelWorkGroupInfo:generic)
_cl_kernel_work_group_info _cl_kernel_work_group_info/c
(args [kernel : _cl_kernel _cl_kernel/c]
[device : _cl_device_id _cl_device_id/c])
(error status
(cond [(= status CL_INVALID_DEVICE)
(error 'clGetKernelWorkGroupInfo "device is not in the list of devices associated with kernel or if device is NULL but there is more than one device associated with kernel")]
[(= status CL_INVALID_VALUE)
(error 'clGetKernelInfo "param_name is not valid or if size in bytes specified by param_value_size is < size of return type and param_value is not NULL")]
[(= status CL_INVALID_KERNEL)
(error 'clGetKernelInfo "kernel is not a valid kernel object")]
[else
(error 'clGetKernelInfo "Invalid error code: ~e" status)]))
(variable param_value_size
; XXX This is guaranteed to be 3
[_size_t* (_cvector o _size_t param_value_size)
(make-cvector _size_t 3)
_size_t_vector/c
CL_KERNEL_COMPILE_WORK_GROUP_SIZE])
(fixed [_size_t _size_t/c CL_KERNEL_WORK_GROUP_SIZE]
[_cl_ulong _cl_ulong/c CL_KERNEL_LOCAL_MEM_SIZE]))
| true |
5d1b4063044e140fbf0c05ac04ce63f70a58be2b | 6483ebb7a03b1d0ef36aa97fd4f45e602ff0f654 | /6_Continuation_Passing_Style.rkt | 53d4c389f888f7513bbd1d8993a922d74c2673cf | [] | no_license | ssyfmei/Lisp-Interperters | a3f5c762a365f2d11581d744f9aa031f7e7d9d83 | c783e8643bf1c466397b1e5bfaebafc8e53ea5bd | refs/heads/master | 2021-09-23T14:08:14.181025 | 2018-09-24T04:17:12 | 2018-09-24T04:17:12 | 110,629,046 | 4 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 5,553 | rkt | 6_Continuation_Passing_Style.rkt | #lang racket
(define empty-k
(lambda ()
(let ((once-only #f))
(lambda (v)
(if once-only
(error 'empty-k "You can only invoke the empty continuation once")
(begin (set! once-only #t) v))))))
(define binary-to-decimal-cps
(λ (n k)
(cond
[(null? n) (k 0)]
[ else (binary-to-decimal-cps
(cdr n) (λ (v)
(k (+ (car n) (* 2 v)))))])))
(define binary-to-decimal
(λ (n)
(binary-to-decimal-cps n (empty-k))))
(define times-cps
(λ (ls k)
(cond
[(null? ls) (k 1)]
[(zero? (car ls)) 0]
[ else (times-cps (cdr ls)
(λ (v) (k (* (car ls) v))))])))
(define times
(λ (ls)
(times-cps ls (empty-k))))
(define plus-cps
(λ (m k)
(λ (n)
(k (+ m n)))))
(define plus
(λ (m)
(plus-cps m (empty-k))))
(define remv-first-9*-cps
(λ (ls k)
(cond
[(null? ls) (k '())]
[(pair? (car ls))
(remv-first-9*-cps
(car ls)
(λ (v) (cond
[(equal? (car ls) v)
(remv-first-9*-cps
(cdr ls)
(λ (w) (k (cons (car ls) w))))]
[else (k (cons v (cdr ls)))])))]
[(eqv? (car ls) '9) (k (cdr ls))]
[else (remv-first-9*-cps
(cdr ls)
(λ (v) (k (cons (car ls) v))))])))
(define remv-first-9*
(λ (ls)
(remv-first-9*-cps ls (empty-k))))
(define cons-cell-count-cps
(λ (ls k)
(cond
[(pair? ls)
(cons-cell-count-cps
(car ls)
(λ(v)
(cons-cell-count-cps
(cdr ls)
(λ(w)
(k (add1 (+ v w)))))))]
[else (k 0)])))
(define cons-cell-count
(λ (ls)
(cons-cell-count-cps ls (empty-k))))
(define find-cps
(λ (u s k)
(let ((pr (assv u s)))
(if pr
(find-cps (cdr pr) s k)
(k u)))))
(define find
(λ (u s)
(find-cps u s (empty-k))))
(define ack-cps
(λ (m n k)
(cond
[(zero? m) (k (add1 n))]
[(zero? n) (ack-cps (sub1 m) 1 k)]
[ else (ack-cps m (sub1 n)
(λ (v) (ack-cps (sub1 m) v k)))])))
(define ack
(λ (m n)
(ack-cps m n (empty-k))))
(define fib-cps
(λ (n k)
((λ(fib)
(fib fib n k))
(λ(fib n k)
(cond
[(zero? n) (k 0)]
[(zero? (sub1 n)) (k 1)]
[else (fib fib (sub1 n)
(λ (v) (fib fib (sub1 (sub1 n))(λ (w)
(k (+ v w))))))])))))
(define fib
(λ (n)
(fib-cps n (empty-k))))
(define unfold-cps
(λ (p f g seed k)
((lambda (h)
((h h) seed '() k))
(lambda (h)
(lambda (seed ans k)
(p seed (λ (pv)
(if pv
(k ans)
(g seed (λ(gv)
(f seed (λ(fv)
((h h) gv (cons fv ans) k)))))))))))))
(define null?-cps
(lambda (ls k)
(k (null? ls))))
(define car-cps
(lambda (pr k)
(k (car pr))))
(define cdr-cps
(lambda (pr k)
(k (cdr pr))))
(define empty-s
(lambda () '()))
(define unify-cps
(λ (u v s k)
(cond
((eqv? u v) (k s))
((number? u) (k (cons (cons u v) s)))
((number? v) (unify-cps v u s k))
((pair? u)
(if (pair? v)
(find-cps
(car u) s
(λ(v1) (find-cps
(car v) s
(λ (w)
(unify-cps v1 w s (λ (uv)
(let ((s uv))
(if s
(find-cps
(cdr u) s
(λ (dv)
(find-cps
(cdr v) s
(λ (dw)
(unify-cps dv dw s k)))))
#f))))))))
(k #f)))
(else (k #f)))))
(define unify
(λ(u v s)
(unify-cps u v s (empty-k))))
(define M-cps
(λ(f)
(λ(ls)
(λ(k)
(cond
((null? ls) (k '()))
(else ((f (car ls))
(λ(v)
(((M-cps f) (cdr ls))
(λ(w)
(k (cons v w))))))))))))
(define use-of-M-cps
(((M-cps (λ(n)(λ(k)(k (add1 n)))))
'(1 2 3 4 5))
(empty-k)))
(define strange
(lambda (x)
((lambda (g) (lambda (x) (g g)))
(lambda (g) (lambda (x) (g g))))))
(define strange-cps
(λ (x k)
((λ (g k) (k (λ (x k) (g g k))))
(λ (g k) (k (λ (x k) (g g k))))
k)))
(define use-of-strange
(let ([strange^ (((strange 5) 6) 7)])
(((strange^ 8) 9) 10)))
(define use-of-strange-cps '())
(define almost-length
(λ(f)
(λ(ls k)
(if (null? ls)
(k 0)
(f (cdr ls) (λ(v) (k (add1 v))))))))
(define why
(λ(al)
((λ(g) (al (λ (x) ((g g) x))))
(λ(g) (al (λ (x) ((g g) x)))))))
(define why-cps
(λ(a1 k)
((λ(g k) (a1 (λ (x k)(g g (λ(v) (v x k)))) k))
(λ(g k) (a1 (λ (x k)(g g (λ(v) (v x k)))) k))
k)))
(define why-cps-cps
(λ(f k1 k2)
((λ(g k1 k2) (f (λ (x k1 k2) (g g (λ(v kk) (v x k1 kk)) k2)) k1 k2))
(λ(g k1 k2) (f (λ (x k1 k2) (g g (λ(v kk) (v x k1 kk)) k2)) k1 k2))
k1
k2))) | false |
e7905aa29652634efc520dda0647e1ce64e20a51 | addad56c020b6f1da5475f65876aa5fffd81ddc3 | /sturgis-lib/parameters.rkt | 7af3104a7ff6fd82b4e4b4e3f2298b2790d663ce | [
"ISC",
"MIT"
] | permissive | jessealama/sturgis | 873adea69c97656ad54b7333c59ba2ca9533499c | 8eddc83b5fdeebf84d97a1727985e7350b498de3 | refs/heads/master | 2023-07-01T17:44:35.638846 | 2021-07-31T05:18:04 | 2021-07-31T05:18:04 | 391,267,878 | 1 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 497 | rkt | parameters.rkt | #lang typed/racket/base
(provide current-node
current-position
current-axis)
(require "types.rkt")
(: current-node (Parameter (Option XDMNode)))
(define current-node (make-parameter #f))
(: current-position (Parameter Exact-Positive-Integer))
(define current-position (make-parameter 1))
(: current-nodes (Parameter (Option (Listof XDMNode))))
(define current-nodes (make-parameter #f))
(: current-axis (Parameter AxisSymbol))
(define current-axis (make-parameter 'child))
| false |
1f5bfee34b3763c0719734934e9f44a7b7aad6b1 | 60b6707dbd61950877e4a7fd8c3cc627efb79a5b | /examples/heap/print_int.rkt | 5f429361cc9de0a0e96c148547921ede09cd049c | [] | no_license | chrisnevers/racket-compiler | 536e2a4aa3e8bc71c5637bc887a1bdb6084d0e43 | 900d190b1ca4046a39047e18682a623324e7f68a | refs/heads/master | 2020-03-28T17:24:06.380557 | 2019-05-03T21:02:58 | 2019-05-03T21:02:58 | 148,785,877 | 7 | 0 | null | 2019-02-04T17:59:34 | 2018-09-14T12:32:58 | OCaml | UTF-8 | Racket | false | false | 31 | rkt | print_int.rkt | (print (let ((x 5)) (+ x 45)))
| false |
628fcce6af4bf14c4a43b400e70787db53c23074 | d29c2c4061ea24d57d29b8fce493d116f3876bc0 | /tests/test-sum2-5.rkt | 0a44cffb1e6affe0fdee40f4c4ae5c9a83b0f41c | [] | no_license | jbejam/magnolisp | d7b28e273550ff0df884ecd73fb3f7ce78957d21 | 191d529486e688e5dda2be677ad8fe3b654e0d4f | refs/heads/master | 2021-01-16T19:37:23.477945 | 2016-10-01T16:02:42 | 2016-10-01T16:02:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 527 | rkt | test-sum2-5.rkt | #lang magnolisp
(require magnolisp/std/list
(prefix-in rkt. racket/base))
(typedef Int #:: ([foreign int]))
(define (add x y) #:: (foreign [type (-> Int Int Int)])
(rkt.+ x y))
(define-syntax-rule (if-empty lst t e)
(if (empty? lst) t e))
(define (sum-2 lst) #:: (export)
(if-empty lst 0
(let ([t (tail lst)])
(if-empty t (head lst)
(add (head lst) (head t))))))
(empty? empty)
(sum-2 empty)
(sum-2 (list))
(sum-2 (cons 2 empty))
(sum-2 (list 4))
(sum-2 (list 3 4))
(sum-2 (list 1 2 3 4))
| true |
617db4e4217a1452925a95d96c804ac41a4e74dd | 94e9923b043132127488bf59887a156d976e2207 | /ex_3_43.rkt | b4e89764b07ad7c4a697705bdb898dc2ddafd362 | [] | no_license | pbruyninckx/sicp | 31b5a76cf9a06a0bb24bd8d7b75353c1eb6358b9 | 133e2ac911a3345594ae265661d7d15f0c1927c9 | refs/heads/master | 2020-04-18T18:27:57.961188 | 2019-10-19T12:14:06 | 2019-10-19T12:14:06 | 167,684,388 | 1 | 1 | null | null | null | null | UTF-8 | Racket | false | false | 801 | rkt | ex_3_43.rkt | #lang racket
; Exercise 3.43
; If they are run sequentially, then nothing odd can happen.
; I suppose this was the trivial case.
; If we would use the simple serialisation (i.e. per account only),
; then all actions operating on single accounts would be correct.
; However, when exchanging several accounts things could go wrong as follows:
; A 10 - B 20 - C 30
; (exchange C A) and (exchange C B)
; diff C A: 20
; diff C B: 10
; withdraw C 20-> C : 10
; withdraw C 10 -> C: 0
; deposit A 20 -> A: 30
; deposit B 10 -> B: 30
; Final result:
; A 30 - B 30 - C 0
; No money was lost or created
; If the individual accounts wouldn't be serialised,
; then there would be the ordinary option
; of having two immediate set! actions
; setting! values computed from out-dated variables | false |
62931f6fadcdd4c6344b498b18435f35f27f086d | ea0e70c7077f135afc8e4e5c9e92bb96542fa37d | /expand-exn.rkt | b221e776db556df0225081d643fffd490088ba67 | [] | no_license | loppy1243/music | 790892f95ec518225c647860c3ddb03b77365ef3 | e7e401e4a3b94b889e4478c1f34924d2e53b592b | refs/heads/master | 2020-03-16T21:01:03.396758 | 2018-05-11T03:20:34 | 2018-05-11T03:20:34 | 132,981,298 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 385 | rkt | expand-exn.rkt | #lang racket
(provide (all-defined-out))
(struct expand-exn:impossible exn:fail:user
())
(define (make-expand-exn:impossible msg)
(expand-exn:impossible (format "IMPOSSIBLE: ~a"
msg)
(current-continuation-marks)))
(define (!raise-impossible msg)
(raise (make-expand-exn:impossible msg)))
| false |
8e876e4c307925ddb03cbd86c63f028f611aed2d | a61d4e2fca31306f5650c640d636c4f86e11530a | /serval/arm/test.rkt | 95e4c152710c5ae55439baec988eddc20d456d3b | [
"MIT"
] | permissive | alastairreid/serval | 034e526081876b593a6e410eba0cbb7ce4e1a16e | 1fabb0316bcad9e8216be9e9da8a63eaab06fef1 | refs/heads/master | 2020-09-20T05:44:03.769577 | 2020-01-09T17:53:58 | 2020-01-09T17:56:08 | 224,391,007 | 0 | 0 | MIT | 2019-11-27T09:17:08 | 2019-11-27T09:17:07 | null | UTF-8 | Racket | false | false | 7,290 | rkt | test.rkt | #lang rosette
; import serval functions with prefix "core:"
(require
serval/lib/unittest
rackunit/text-ui
(prefix-in core:
(combine-in serval/lib/core
serval/spec/refinement
serval/spec/ni))
; import Arm AArch64
"base.rkt" "interp.rkt" "asm.rkt"
)
(provide (all-defined-out))
#|
Sign implementation
|#
; The following absolutely does not implement sign - used for early bringup
(define sign-implementation0 (asm-block 0 (vector
(ret 30)
)))
#|
Version #1: idiomatic AArch64 code that avoids branches
cmp X0, #0 ; NZCV <- cmp(X0, 0)
cset.le X0 ; X0 <- if cond_le(NZCV) then 0 else 1 ; cset is an alias of cinc
cinv.ge X0 ; X0 <- if cond_ge(NZCV) then X0 else NOT(X0)
movz X1, #0 ; X1 <- 0 ; clear (unused) scratch register to match RISC-V version
ret X30 ; return ; X30 is the default if omitted
|#
(define sign-implementation1 (asm-block 0 (vector
(cmp-immediate 1 00 0 0)
(cset 1 00 cond-le)
(csinv 1 00 00 cond-ge)
(movz 1 01 0 0)
(ret 30)
)))
#|
Version #2: variant on version #1 that gratuitiously saves/restores X0 from stack
str X0, [SP, #-8]! ; SP -= 8; [SP] <- X0;
ldr X0, [SP], #8 ; X0 <- [SP]; SP += 8;
cmp X0, #0 ; NZCV <- cmp(X0, 0)
cset.le X0 ; X0 <- if cond_le(NZCV) then 0 else 1 ; cset is an alias of cinc
cinv.ge X0 ; X0 <- if cond_ge(NZCV) then X0 else NOT(X0)
movz X1, #0 ; X1 <- 0 ; clear (unused) scratch register to match RISC-V version
ret X30 ; return ; X30 is the default if omitted
|#
(define sign-implementation2 (asm-block 0 (vector
(str-imm-pre 00 31 -8 3)
(ldr-imm-post 00 31 8 3 #f)
(cmp-immediate 1 00 0 0)
(cset 1 00 cond-le)
(csinv 1 00 00 cond-ge)
(movz 1 01 0 0)
(ret 30)
)))
#|
Version #3: AArch64 code that mirrors some of the branching structure of RISC-V original
0: cmp X0, #0 ; NZCV <- cmp(X0, 0)
1: cset.le X0 ; X0 <- if cond_le(NZCV) then 0 else 1 ; cset is an alias of cinc
2: blt 3 ; branch to 3 if cond_le(NZCV)
3: ret X30 ; return to address in link register (X30)
4: movn X0, #0 ; X0 <- NOT(0)
5: ret X30 ; return to address in link register (X30)
|#
; todo: add asm for version 3
#|
Sign specification
|#
; Note that we mark the struct as mutable and transparent
; for better debugging and interoperability with Serval libraries
(struct state (a0 a1) #:mutable #:transparent) ; specification state
; functional specification for the sign code
(define (spec-sign s)
(define a0 (state-a0 s))
(define sign (cond
[(bvsgt a0 (bv 0 64)) (bv 1 64)]
[(bvslt a0 (bv 0 64)) (bv -1 64)]
[else (bv 0 64)]))
; the following line is what the RISC-V version contained - looks like an
; implementation detail, not a specification requirement to me
; (define scratch (if (negative? a0) 1 0)) ; why is this needed in the specification and why define it this way?
(define scratch (bv 0 64))
(state sign scratch))
; abstraction function: impl. cpu state to spec. state
(define (AF cpu)
(state (cpu-X cpu 64 0) (cpu-X cpu 64 1)))
; Mutable version of sign specification
(define (spec-sign-update s)
(let ([s2 (spec-sign s)])
(set-state-a0! s (state-a0 s2))
(set-state-a1! s (state-a1 s2))))
#| Running interpreter on concrete state and check result |#
(define (check-run program x)
; todo: should initial state require that LR (X30) contains a legal return address or that SP makes sense?
(define cstate (init-cpu-concrete test:symbols test:globals))
(set-cpu-X! cstate 64 0 (bv x 64)) ; test input value for X0
(define astate0 (AF cstate))
; (printf "Concrete state before ~a\n" cstate)
; (printf "Abstract state before ~a\n" astate0)
(interpret cstate program)
(define astate1 (AF cstate))
; (printf "Concrete state after ~a\n" cstate)
; (printf "Result ~a\n" (cpu-X cstate 64 0))
; (printf "Abstract state after ~a\n" astate1)
; (printf "Expected abstract state after ~a\n" (spec-sign astate0))
(check-equal? astate1 (spec-sign astate0))
)
#| Memory map |#
; Note: the following hardwired memory map does not work - any stack
; accesses are likely to fail.
; Also, we somehow have to insert the code contents into the memory map
; as a big table of constants.
(define test:symbols
(list
; an entry for each block of memory
(list #x0000 #x1000 'R "code")
(list #x1000 #x2000 'B "stack")
))
(define test:globals (hash
; treat the stack as an array of 8-byte aligned objects
"stack" (lambda () (core:marray 512 (core:mcell 8)))
))
#| State-machine refinement |#
; Fresh implementation state
(define mstate-init (init-cpu-symbolic test:symbols test:globals))
(define mstate (cpu-copy mstate-init))
; Fresh specification state
(define-symbolic a0 a1 (bitvector 64))
(define s (state a0 a1))
; Counterexample handler for debugging
(define (handle-counterexample sol)
(printf "Verification failed:\n")
(printf "Initial implementation state: ~a\n" (evaluate mstate-init sol))
(printf "Initial specification state: ~a\n" (evaluate (state a0 a1) sol))
(printf "Final implementation state ~a\n" (evaluate mstate sol))
(printf "Final specification state ~a\n" (evaluate s sol)))
; Verify refinement
(define (verify-refinement program)
(core:verify-refinement
#:implstate mstate
#:impl (lambda (cpu) (interpret cpu program))
#:specstate s
#:spec spec-sign-update
#:abs AF
#:ri (const #t)
null
handle-counterexample))
#| Safety property |#
(define (~ s1 s2)
(equal? (state-a0 s1) (state-a0 s2))) ; filter out a1
; note that the safety property is checked on the specification, not on the implementation
(define (verify-safety)
(core:check-step-consistency
#:state-init (λ () (define-symbolic* X Y (bitvector 64)) (state X Y))
#:state-copy (λ (s) (struct-copy state s))
#:unwinding ~
spec-sign-update))
; run a single return instruction
(interpret (init-cpu-concrete test:symbols test:globals) sign-implementation0)
; test sign on three concrete test values
(check-run sign-implementation1 3)
(check-run sign-implementation1 0)
(check-run sign-implementation1 -3)
; test memory-based sign implementation on one concrete test value
(check-run sign-implementation2 -3)
; invoke test directly so that I get a useful stackdump when things fail
; (printf "Started checking refinement\n")
; (verify-refinement sign-implementation1)
; (printf "Finished checking refinement\n")
;
; (printf "Started checking safety\n")
; (verify-safety)
; (printf "Finished checking safety\n")
; the following line makes my laptop fan run - what does test-case+ do?
; (test-case+ "ToyArm Refinement" (verify-refinement sign-implementation1))
(define (rt) (run-tests (test-suite+ "ToyArm tests"
(test-case+ "ToyArm Interpreter -3" (check-run sign-implementation1 -3))
(test-case+ "ToyArm Interpreter 0" (check-run sign-implementation1 0))
(test-case+ "ToyArm Interpreter 3" (check-run sign-implementation1 3))
(test-case+ "ToyArm Refinement" (verify-refinement sign-implementation1))
(test-case+ "ToyArm Safety" (verify-safety))
)))
(rt)
; end
| false |
decd50569429110c09632682739ca72779e76880 | 73abdec467a6717889c8a28dd7196b035e0ef8e8 | /prelude.rkt | d3fa42c12167885936365b3e3b8aae5776e58f42 | [] | no_license | natepisarski/cookbook-rkt | 6d209483651bf35bbb5a4b9b1f3895ac4414b4ad | e5693e2b96ccc80e08052f905e8f13e34e8d5ecd | refs/heads/master | 2023-07-19T12:56:15.252738 | 2023-07-12T22:18:11 | 2023-07-12T22:18:11 | 20,242,285 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,028 | rkt | prelude.rkt | (module prelude racket/base
(provide zip ++ rev dec inc range /= nil elem not-elem last <~>)
(define (zip a b)
"Combine two lists into pairs"
(if (or (null? a) (null? b))
'()
(cons (list (car a) (car b)) (zip (cdr a) (cdr b)))))
(define (++ a b)
"Put a single item in the last part of a list"
(if (null? a)
(cons b '())
(cons (car a) (++ (cdr a) b))))
(define (rev a)
"Reverse a list"
(if (null? a) '() (append (rev (cdr a)) (list (car a)))))
(define (dec a) (- a 1))
(define (inc a) (+ a 1))
(define (range a [b 0])
"Generate a range"
(if (= b a) (list a) (cons a (range (inc a) b))))
(define (/= a b) (not (equal? a b)))
(define nil '())
(define (elem a b)
(if (null? a) #f
(if (equal? (car a) b) #t
(elem (cdr a) b))))
(define (not-elem a b) (not (elem a b)))
(define (last a)
(if (null? (cdr a)) (car a) (last (cdr a))))
(define-syntax-rule (<~> a b c) (b c a))
)
| true |
b9a495f71f38025d52c97be9f7b8b6e5f3827f77 | 7c3e10ddc7a2b3ba288c4aa1dfe97181ba905001 | /symalg/evaluate.rkt | 604aa5abe93c7653f01d58dc666782cfb156f186 | [
"BSD-2-Clause"
] | permissive | pyohannes/racket-symalg | 5010bbf58b1bca6d330e29769a8685c0606aab7a | 5c551e9fcead240dcc70261563c5b981428ca67a | refs/heads/master | 2021-04-06T20:51:37.777548 | 2018-03-31T17:34:45 | 2018-03-31T17:34:45 | 125,351,125 | 8 | 3 | null | null | null | null | UTF-8 | Racket | false | false | 5,142 | rkt | evaluate.rkt | #lang racket/base
;; Evaluation of expressions.
(provide evaluate)
;; ---------------------------------
;; Import and implementation section
(require multimethod
"private/data.rkt")
;; --------
;; evaluate
;; --------
(define-generic (evaluate e))
;; ------------
;; num-evaluate
;; ------------
(module+ test
(require rackunit
racket/math)
(check-equal? ((evaluate (make-num 3))
9)
3)
(check-equal? ((evaluate (make-num 0))
3)
0)
)
(define-instance ((evaluate num) n)
(define (_ . rest)
(num-val n))
_)
;; -------------
;; frac-evaluate
;; -------------
(module+ test
(check-equal? ((evaluate (make-frac 3 3))
9)
1)
(check-equal? ((evaluate (make-frac 3 4))
3)
(/ 3 4))
)
(define-instance ((evaluate frac) f)
(define (_ . rest)
(/ (frac-num f)
(frac-denom f)))
_)
;; -----------------
;; constant-evaluate
;; -----------------
(module+ test
(check-equal? ((evaluate (make-constant 'pi))
9)
pi)
(check-equal? ((evaluate (make-constant 'e))
3)
(exp 1))
)
(define-instance ((evaluate constant) c)
(define (_ . rest)
(constant-value c))
_)
;; ------------
;; sym-evaluate
;; ------------
(module+ test
(check-equal? ((evaluate (make-sym 'x))
9)
9)
(check-equal? ((evaluate (make-sym 'y))
3)
3)
)
(define-instance ((evaluate sym) n)
(define (_ . rest)
(car rest))
_)
;; ------------
;; add-evaluate
;; ------------
(module+ test
(check-equal? ((evaluate (make-add (make-num 3) (make-sym 'x)))
9)
12)
(check-equal? ((evaluate (make-add (make-num 3) (make-sym 'x) (make-num 4)))
9)
16)
)
(define-instance ((evaluate add) a)
(define (_ . rest)
(for/sum ([addend (add-addends a)])
(apply (evaluate addend) rest)))
_)
;; ------------
;; mul-evaluate
;; ------------
(module+ test
(check-equal? ((evaluate (make-mul (make-num 3) (make-sym 'x)))
9)
27)
(check-equal? ((evaluate (make-mul (make-num 3) (make-sym 'x) (make-num 4)))
9)
108)
)
(define-instance ((evaluate mul) m)
(define (_ . rest)
(for/product ([factor (mul-factors m)])
(apply (evaluate factor) rest)))
_)
;; --------------
;; power-evaluate
;; --------------
(module+ test
(check-equal? ((evaluate (make-power (make-num 2) (make-sym 'x)))
4)
16)
(check-equal? ((evaluate (make-power (make-sym 'x) (make-num 3)))
3)
27)
)
(define-instance ((evaluate power) p)
(define (_ . rest)
(expt (apply (evaluate (power-base p)) rest)
(apply (evaluate (power-exponent p)) rest)))
_)
;; --------------
;; logn-evaluate
;; --------------
(module+ test
(check-equal? ((evaluate (make-logn (make-num 2) (make-sym 'x)))
4)
0.5)
(check-equal? ((evaluate (make-logn (make-sym 'x) (make-num 3)))
3)
1.0)
)
(define-instance ((evaluate logn) l)
(define (_ . rest)
(log (apply (evaluate (logn-n l)) rest)
(apply (evaluate (logn-base l)) rest)))
_)
;; --------------
;; cos-evaluate
;; --------------
(module+ test
(check-equal? ((evaluate (make-cos (make-num 2)))
4)
(cos 2))
(check-equal? ((evaluate (make-cos (make-sym 'x)))
3)
(cos 3))
)
(define-instance ((evaluate cos_) c)
(define (_ . rest)
(cos (apply (evaluate (cos_-n c)) rest)))
_)
;; --------------
;; sin-evaluate
;; --------------
(module+ test
(check-equal? ((evaluate (make-sin (make-num 2)))
4)
(sin 2))
(check-equal? ((evaluate (make-sin (make-sym 'x)))
3)
(sin 3))
)
(define-instance ((evaluate sin_) c)
(define (_ . rest)
(sin (apply (evaluate (sin_-n c)) rest)))
_)
;; --------------
;; tan-evaluate
;; --------------
(module+ test
(check-equal? ((evaluate (make-tan (make-num 2)))
4)
(tan 2))
(check-equal? ((evaluate (make-tan (make-sym 'x)))
3)
(tan 3))
)
(define-instance ((evaluate tan_) c)
(define (_ . rest)
(tan (apply (evaluate (tan_-n c)) rest)))
_)
;; ----------------------
;; polynomial/si-evaluate
;; ----------------------
(module+ test
(check-equal? ((evaluate (make-polynomial/si 'x '(0 1 2)))
9)
171)
(check-equal? ((evaluate (make-polynomial/si 'x '(3 3 3 3)))
3)
120)
(check-equal? ((evaluate (make-polynomial/si 'x '()))
3)
0)
)
(define-instance ((evaluate polynomial/si) p)
(define (_ . rest)
(define x (car rest))
(for/sum ([c (polynomial/si-coeffs p)]
[e (in-naturals)])
(* c (expt x e))))
_)
| false |
b5732e45974d17d762a4cf11887a87bb468b6db3 | 71060ffeffa3469ec44ba661b04118b487fc0602 | /ch_3_2D_table.rkt | eb6722198f366992aac8c1c6422c93da887d8c1c | [] | no_license | ackinc/sicp | 18741d3ffc46041ecd08021d57a50702be2e0f92 | 4ee2250f8b7454fb88bc27edb41a1349d7a3016c | refs/heads/master | 2021-09-13T08:55:37.171840 | 2018-04-27T10:02:08 | 2018-04-27T10:02:08 | 114,095,803 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,225 | rkt | ch_3_2D_table.rkt | #lang racket
(require (only-in "./ch_3_1D_table.rkt"
[insert! insert-1D!]
[assoc assoc-1D]
[lookup lookup-1D]))
(define (make-table) (mcons '*table* null))
(define (assoc key1 key2 records)
(let ((subtable (assoc-1D key1 records)))
(if subtable (assoc-1D key2 (mcdr subtable)) #f)))
(define (lookup key1 key2 table)
(let ((record (assoc key1 key2 (mcdr table))))
(if record (mcdr record) #f)))
(define (insert! key1 key2 value table)
(let ((subtable (assoc-1D key1 (mcdr table))))
(if subtable
(let ((record (assoc-1D key2 (mcdr subtable))))
(if record
(set-mcdr! record value)
(insert-1D! key2 value subtable)))
(insert-1D! key1 (mcons (mcons key2 value) null) table))))
; TESTS
(define t (make-table))
(insert! 'letters 'a 1 t)
(insert! 'letters 'b 2 t)
(insert! 'math 'plus '+ t)
(insert! 'math 'minus '- t)
(insert! 'math 'times '* t)
(eq? (lookup 'letters 'a t) 1)
(eq? (lookup 'letters 'b t) 2)
(eq? (lookup 'letters 'c t) #f)
(eq? (lookup 'math 'plus t) '+)
(eq? (lookup 'math 'times t) '*)
(eq? (lookup 'math 'divide t) #f)
(insert! 'math 'plus '++ t)
(eq? (lookup 'math 'plus t) '++) | false |
cdcbe6d2af9f3598f5bba8c2d2978cde8a09e5a0 | 39b7753e3c963b28645beac4c9a0195d8a83a587 | /2020/02.rkt | 1c7ecc5c850ad14742017f098525707940098ea8 | [] | no_license | erkin/advent-of-code | 655a3dd6e4d1bc256c476a51dda758c28419b478 | 5633dddf0eee943f8adc8b606e820fa873f9dd3a | refs/heads/master | 2023-01-25T03:31:20.004118 | 2020-12-08T13:37:22 | 2020-12-08T13:37:26 | 317,776,001 | 1 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 911 | rkt | 02.rkt | #lang racket
(define input (file->lines "input02.txt"))
(define (part-1)
(define substring-count
(compose length regexp-match*))
(define (valid-entry? str)
(define-values (_ min max letter password)
(apply values (regexp-match #rx"([0-9]+)-([0-9]+) ([a-z]): ([a-z]+)" str)))
(<= (string->number min)
(substring-count letter password)
(string->number max)))
(count valid-entry? input))
(define (part-2)
(define (valid-entry? str)
(define-values (_ yes no letter password)
(apply values (regexp-match #rx"([0-9]+)-([0-9]+) ([a-z]):( [a-z]+)" str)))
(let ((positions (regexp-match-positions* letter password)))
(xor (assoc (string->number yes) positions)
(assoc (string->number no) positions))))
(count valid-entry? input))
(module+ main
(display "Day 2, Part 1: ")
(time (part-1))
(display "Day 2, Part 2: ")
(time (part-2)))
| false |
ade7697253c2c9fe812744b4c0ef1bb3ee5ccb1f | c161c2096ff80424ef06d144dacdb0fc23e25635 | /chapter3/example/em3.1.1.rkt | 47c510e9ce7ba75b835a22407089d27c1be4d583 | [] | no_license | tangshipoetry/SICP | f674e4be44dfe905da4a8fc938b0f0460e061dc8 | fae33da93746c3f1fc92e4d22ccbc1153cce6ac9 | refs/heads/master | 2020-03-10T06:55:29.711600 | 2018-07-16T00:17:08 | 2018-07-16T00:17:08 | 129,242,982 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 877 | rkt | em3.1.1.rkt | #lang racket
#|
(define (withdraw amount)
(let([balance 100])
(if(>= balance amount)
(begin
(set! balance (- balance amount))
balance)
"balance is not enough")))
|#
#|
(define (new-withdraw balance)
(lambda(amount)
(if(>= balance amount)
(begin
(set! balance (- balance amount))
balance)
"balance is not enough")))
|#
(define (make-account balance)
(define (withdraw amount)
(if(>= balance amount)
(begin
(set! balance (- balance amount))
balance)
"balance is not enough"))
(define (deposit amount)
(begin
(set! balance (+ balance amount))
balance))
(define (dispatch m)
(cond ((eq? m 'withdraw) withdraw)
((eq? m 'deposit) deposit)
(else (error "unknow request--make-account" m))))
dispatch)
| false |
0faa0f31713fc5ef717c2acbb01a4a2e4387cabd | 3a9bdb233eac708d3bf8d805fbdc4daf5e48d97d | /sugar/unstable/misc.rkt | 448f487a440bd900fd8e209f9a6bd7b697199f43 | [
"MIT"
] | permissive | mbutterick/sugar | 4d95ab21d84dae9e8554bd2037e7927a2c6ba0df | c90834b77afad07f9b02986fc8e157ccf30b753c | refs/heads/master | 2021-07-03T16:02:15.343977 | 2021-05-18T16:43:53 | 2021-05-18T16:43:53 | 16,847,917 | 19 | 6 | null | 2016-04-11T18:23:32 | 2014-02-14T20:01:44 | Racket | UTF-8 | Racket | false | false | 1,054 | rkt | misc.rkt | #lang racket/base
(require "../define.rkt" racket/set "../coerce.rkt")
(define+provide+safe (bytecount->string bytecount)
(integer? . -> . string?)
(define (format-with-threshold threshold suffix)
;; upconvert by factor of 100 to get two digits after decimal
(format "~a ~a" (exact->inexact (/ (round ((* bytecount 100) . / . threshold)) 100)) suffix))
(define threshold-kilobyte 1000)
(define threshold-megabyte (threshold-kilobyte . * . threshold-kilobyte))
(define threshold-gigabyte (threshold-megabyte . * . threshold-kilobyte))
(define threshold-terabyte (threshold-gigabyte . * . threshold-kilobyte))
(cond
[(bytecount . >= . threshold-terabyte) (format-with-threshold threshold-terabyte "TB")]
[(bytecount . >= . threshold-gigabyte) (format-with-threshold threshold-gigabyte "GB")]
[(bytecount . >= . threshold-megabyte) (format-with-threshold threshold-megabyte "MB")]
[(bytecount . >= . threshold-kilobyte) (format-with-threshold threshold-kilobyte "KB")]
[else (format "~a bytes" bytecount)])) | false |
1e4d824e7be1f84c6b2704a224e8460505087204 | 73e08bc49ae7a2dae6ed6b828ff3b504c497f6b8 | /bench/tptp/ALG195-skolem-symmetry-sat.rkt | d4eb86ba79d2097213194ff160a45b489dbc31cb | [
"BSD-2-Clause"
] | permissive | altanh/colocolo | 9d44efba4d1e0d02927fa371c94d0dae59c92e99 | a7a6aeff4d166c0fa3950079f61c7a1da5f17801 | refs/heads/master | 2020-04-22T18:23:11.311752 | 2019-03-15T17:38:11 | 2019-03-15T17:38:11 | 170,575,439 | 2 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 43,897 | rkt | ALG195-skolem-symmetry-sat.rkt | #lang rosette
(require colocolo colocolo/lang/ast colocolo/engine/interpretation colocolo/lang/bounds colocolo/engine/sat/solver colocolo/lib/skolemize-solve colocolo/engine/symmetry)
(define universe$0 (universe (list "e10" "e11" "e12" "e13" "e14" "e15" "e16" "e20" "e21" "e22" "e23" "e24" "e25" "e26")))
(define r$40 (declare-relation 1 "e11"))
(define v$48 (declare-relation 1 "x"))
(define r$14 (declare-relation 2 "h4"))
(define v$53 (declare-relation 1 "y"))
(define r$5 (declare-relation 1 "e2"))
(define v$11 (declare-relation 1 "vh2"))
(define r$28 (declare-relation 1 "e10"))
(define r$3 (declare-relation 3 "op1"))
(define v$25 (declare-relation 1 "x"))
(define r$12 (declare-relation 2 "h3"))
(define r$35 (declare-relation 1 "e25"))
(define v$24 (declare-relation 1 "y"))
(define v$47 (declare-relation 1 "y"))
(define v$2 (declare-relation 1 "y"))
(define v$45 (declare-relation 1 "y"))
(define v$13 (declare-relation 1 "vh3"))
(define v$46 (declare-relation 1 "x"))
(define r$18 (declare-relation 2 "h6"))
(define v$52 (declare-relation 1 "x"))
(define r$7 (declare-relation 3 "op2"))
(define v$23 (declare-relation 1 "x"))
(define v$55 (declare-relation 1 "y"))
(define v$50 (declare-relation 1 "x"))
(define v$15 (declare-relation 1 "vh4"))
(define r$41 (declare-relation 1 "e21"))
(define v$0 (declare-relation 1 "x"))
(define r$38 (declare-relation 1 "e24"))
(define v$22 (declare-relation 1 "x"))
(define v$27 (declare-relation 1 "y"))
(define r$31 (declare-relation 1 "e13"))
(define r$1 (declare-relation 1 "e1"))
(define r$39 (declare-relation 1 "e26"))
(define r$37 (declare-relation 1 "e23"))
(define v$19 (declare-relation 1 "vh6"))
(define r$8 (declare-relation 2 "h1"))
(define v$17 (declare-relation 1 "vh5"))
(define v$43 (declare-relation 1 "y"))
(define r$29 (declare-relation 1 "e15"))
(define v$44 (declare-relation 1 "x"))
(define r$34 (declare-relation 1 "e20"))
(define r$33 (declare-relation 1 "e16"))
(define v$54 (declare-relation 1 "x"))
(define v$9 (declare-relation 1 "vh1"))
(define r$32 (declare-relation 1 "e14"))
(define v$26 (declare-relation 1 "x"))
(define v$42 (declare-relation 1 "x"))
(define v$21 (declare-relation 1 "vh7"))
(define r$16 (declare-relation 2 "h5"))
(define v$51 (declare-relation 1 "y"))
(define v$4 (declare-relation 1 "x"))
(define v$49 (declare-relation 1 "y"))
(define v$6 (declare-relation 1 "y"))
(define r$36 (declare-relation 1 "e22"))
(define r$30 (declare-relation 1 "e12"))
(define r$10 (declare-relation 2 "h2"))
(define r$20 (declare-relation 2 "h7"))
(define decl$7 (cons v$4 r$5 #|one|#))
(define b-ex$154 (join r$30 r$8))
(define b-ex$282 (join r$39 r$7))
(define b-ex$144 (join r$34 r$7))
(define decl$355 (cons v$51 r$1 #|one|#))
(define b-ex$46 (-> r$1 r$5))
(define b-ex$62 (-> r$1 r$5))
(define b-ex$369 (join v$53 r$3))
(define b-ex$54 (-> r$1 r$5))
(define decl$32 (cons v$13 r$1 #|one|#))
(define b-ex$212 (join r$28 r$14))
(define b-ex$175 (join r$40 r$10))
(define b-ex$324 (join v$44 r$10))
(define b-ex$381 (join v$55 r$3))
(define b-ex$184 (join r$33 r$10))
(define b-ex$337 (join v$47 r$12))
(define b-ex$372 (join v$52 r$18))
(define decl$354 (cons v$50 r$1 #|one|#))
(define b-ex$205 (join r$32 r$12))
(define decl$319 (cons v$45 r$1 #|one|#))
(define decl$100 (cons v$26 r$5 #|one|#))
(define decl$367 (cons v$53 r$1 #|one|#))
(define b-ex$127 (join r$35 r$7))
(define b-ex$349 (join v$49 r$14))
(define b-ex$207 (join r$33 r$12))
(define b-ex$274 (join r$32 r$18))
(define b-ex$107 (join v$27 r$7))
(define b-ex$41 (join v$15 r$14))
(define decl$306 (cons v$42 r$1 #|one|#))
(define b-ex$361 (join v$51 r$16))
(define decl$80 (cons v$23 r$1 #|one|#))
(define b-ex$111 (join r$29 r$3))
(define b-ex$244 (join r$40 r$16))
(define b-ex$385 (join v$55 r$20))
(define b-ex$221 (join r$40 r$14))
(define b-ex$190 (join r$36 r$7))
(define b-ex$166 (join r$28 r$10))
(define b-ex$269 (join r$30 r$18))
(define b-ex$230 (join r$33 r$14))
(define b-ex$248 (join r$31 r$16))
(define b-ex$198 (join r$40 r$12))
(define b-ex$333 (join v$47 r$3))
(define b-ex$360 (join v$50 r$16))
(define b-ex$259 (join r$35 r$7))
(define b-ex$22 (-> r$1 r$5))
(define b-ex$294 (join r$31 r$20))
(define b-ex$325 (join v$45 r$10))
(define b-ex$143 (join r$28 r$8))
(define b-ex$384 (join v$54 r$20))
(define b-ex$38 (-> r$1 r$5))
(define decl$101 (cons v$27 r$5 #|one|#))
(define b-ex$57 (join v$19 r$18))
(define b-ex$236 (join r$38 r$7))
(define b-ex$225 (join r$31 r$14))
(define b-ex$312 (join v$42 r$8))
(define decl$1 (cons v$2 r$1 #|one|#))
(define b-ex$336 (join v$46 r$12))
(define b-ex$200 (join r$30 r$12))
(define b-ex$246 (join r$30 r$16))
(define decl$71 (cons v$22 r$1 #|one|#))
(define b-ex$177 (join r$30 r$10))
(define b-ex$292 (join r$30 r$20))
(define decl$307 (cons v$43 r$1 #|one|#))
(define b-ex$299 (join r$33 r$20))
(define b-ex$152 (join r$40 r$8))
(define b-ex$228 (join r$32 r$14))
(define b-ex$276 (join r$33 r$18))
(define b-ex$235 (join r$28 r$16))
(define b-ex$373 (join v$53 r$18))
(define b-ex$17 (join v$9 r$8))
(define b-ex$10 (join v$4 r$7))
(define decl$48 (cons v$17 r$1 #|one|#))
(define decl$16 (cons v$9 r$1 #|one|#))
(define b-ex$271 (join r$31 r$18))
(define b-ex$345 (join v$49 r$3))
(define b-ex$65 (join v$21 r$20))
(define b-ex$167 (join r$41 r$7))
(define b-ex$202 (join r$31 r$12))
(define decl$343 (cons v$49 r$1 #|one|#))
(define b-ex$30 (-> r$1 r$5))
(define b-ex$156 (join r$31 r$8))
(define b-ex$92 (join r$5 r$7))
(define b-ex$213 (join r$37 r$7))
(define decl$366 (cons v$52 r$1 #|one|#))
(define b-ex$95 (join v$25 r$7))
(define decl$24 (cons v$11 r$1 #|one|#))
(define b-ex$258 (join r$28 r$18))
(define b-ex$72 (join r$1 r$3))
(define b-ex$85 (join v$24 r$3))
(define decl$331 (cons v$47 r$1 #|one|#))
(define b-ex$103 (join v$26 r$7))
(define b-ex$105 (join v$27 r$7))
(define decl$56 (cons v$19 r$1 #|one|#))
(define b-ex$87 (join v$24 r$3))
(define decl$64 (cons v$21 r$1 #|one|#))
(define decl$318 (cons v$44 r$1 #|one|#))
(define b-ex$290 (join r$40 r$20))
(define b-ex$159 (join r$32 r$8))
(define b-ex$223 (join r$30 r$14))
(define b-ex$83 (join v$23 r$3))
(define decl$342 (cons v$48 r$1 #|one|#))
(define b-ex$75 (join v$22 r$3))
(define b-ex$321 (join v$45 r$3))
(define b-ex$253 (join r$33 r$16))
(define b-ex$14 (-> r$1 r$5))
(define decl$91 (cons v$25 r$5 #|one|#))
(define b-ex$189 (join r$28 r$12))
(define decl$81 (cons v$24 r$1 #|one|#))
(define decl$378 (cons v$54 r$1 #|one|#))
(define b-ex$161 (join r$33 r$8))
(define b-ex$25 (join v$11 r$10))
(define b-ex$251 (join r$32 r$16))
(define decl$40 (cons v$15 r$1 #|one|#))
(define b-ex$313 (join v$43 r$8))
(define b-ex$348 (join v$48 r$14))
(define decl$330 (cons v$46 r$1 #|one|#))
(define b-ex$33 (join v$13 r$12))
(define b-ex$3 (join v$0 r$3))
(define b-ex$357 (join v$51 r$3))
(define b-ex$182 (join r$32 r$10))
(define b-ex$309 (join v$43 r$3))
(define decl$0 (cons v$0 r$1 #|one|#))
(define b-ex$281 (join r$28 r$20))
(define b-ex$49 (join v$17 r$16))
(define b-ex$267 (join r$40 r$18))
(define b-ex$179 (join r$31 r$10))
(define decl$379 (cons v$55 r$1 #|one|#))
(define b-ex$297 (join r$32 r$20))
(define decl$8 (cons v$6 r$5 #|one|#))
(define b-ex$362 (join b-ex$361 r$7))
(define b-ex$237 (join r$38 b-ex$236))
(define decls$320 (list decl$318 decl$319))
(define cmp-f$31 (in r$12 b-ex$30))
(define decls$380 (list decl$378 decl$379))
(define cmp-f$15 (in r$8 b-ex$14))
(define b-ex$112 (join r$29 b-ex$111))
(define b-ex$314 (join b-ex$313 r$7))
(define b-ex$104 (join v$27 b-ex$103))
(define decls$2 (list decl$0 decl$1))
(define cmp-f$63 (in r$20 b-ex$62))
(define decls$82 (list decl$80 decl$81))
(define b-ex$260 (join r$35 b-ex$259))
(define b-ex$4 (join v$2 b-ex$3))
(define mul-f$58 (multiplicity-formula 'one b-ex$57))
(define b-ex$374 (join b-ex$373 r$7))
(define b-ex$73 (join v$22 b-ex$72))
(define b-ex$128 (join r$35 b-ex$127))
(define decls$332 (list decl$330 decl$331))
(define decls$102 (list decl$100 decl$101))
(define b-ex$214 (join r$37 b-ex$213))
(define b-ex$322 (join v$44 b-ex$321))
(define b-ex$84 (join v$24 b-ex$83))
(define cmp-f$23 (in r$10 b-ex$22))
(define b-ex$76 (join r$1 b-ex$75))
(define b-ex$350 (join b-ex$349 r$7))
(define b-ex$334 (join v$46 b-ex$333))
(define b-ex$283 (join r$39 b-ex$282))
(define cmp-f$39 (in r$14 b-ex$38))
(define b-ex$93 (join v$25 b-ex$92))
(define b-ex$96 (join r$5 b-ex$95))
(define mul-f$26 (multiplicity-formula 'one b-ex$25))
(define b-ex$145 (join r$34 b-ex$144))
(define decls$344 (list decl$342 decl$343))
(define mul-f$18 (multiplicity-formula 'one b-ex$17))
(define mul-f$42 (multiplicity-formula 'one b-ex$41))
(define b-ex$326 (join b-ex$325 r$7))
(define b-ex$382 (join v$54 b-ex$381))
(define cmp-f$47 (in r$16 b-ex$46))
(define decls$308 (list decl$306 decl$307))
(define b-ex$191 (join r$36 b-ex$190))
(define mul-f$34 (multiplicity-formula 'one b-ex$33))
(define decls$368 (list decl$366 decl$367))
(define cmp-f$55 (in r$18 b-ex$54))
(define b-ex$358 (join v$50 b-ex$357))
(define decls$9 (list decl$7 decl$8))
(define mul-f$66 (multiplicity-formula 'one b-ex$65))
(define decls$356 (list decl$354 decl$355))
(define b-ex$370 (join v$52 b-ex$369))
(define b-ex$11 (join v$6 b-ex$10))
(define b-ex$310 (join v$42 b-ex$309))
(define b-ex$346 (join v$48 b-ex$345))
(define b-ex$386 (join b-ex$385 r$7))
(define b-ex$338 (join b-ex$337 r$7))
(define mul-f$50 (multiplicity-formula 'one b-ex$49))
(define b-ex$168 (join r$41 b-ex$167))
(define b-ex$261 (join b-ex$260 b-ex$259))
(define cmp-f$153 (= b-ex$152 b-ex$145))
(define b-ex$113 (join b-ex$112 b-ex$111))
(define b-ex$129 (join b-ex$128 b-ex$127))
(define b-ex$327 (join b-ex$324 b-ex$326))
(define cmp-f$199 (= b-ex$198 b-ex$191))
(define b-ex$375 (join b-ex$372 b-ex$374))
(define b-ex$146 (join b-ex$145 b-ex$144))
(define b-ex$86 (join b-ex$84 b-ex$85))
(define q-f$51 (quantified-formula 'all (list decl$48) mul-f$50))
(define b-ex$192 (join b-ex$191 b-ex$190))
(define q-f$19 (quantified-formula 'all (list decl$16) mul-f$18))
(define b-ex$335 (join b-ex$334 r$12))
(define b-ex$284 (join b-ex$283 b-ex$282))
(define q-f$67 (quantified-formula 'all (list decl$64) mul-f$66))
(define b-ex$169 (join b-ex$168 b-ex$167))
(define b-ex$315 (join b-ex$312 b-ex$314))
(define q-f$59 (quantified-formula 'all (list decl$56) mul-f$58))
(define mul-f$12 (multiplicity-formula 'one b-ex$11))
(define q-f$27 (quantified-formula 'all (list decl$24) mul-f$26))
(define b-ex$371 (join b-ex$370 r$18))
(define b-ex$106 (join b-ex$104 b-ex$105))
(define cmp-f$77 (= r$1 b-ex$76))
(define b-ex$387 (join b-ex$384 b-ex$386))
(define b-ex$311 (join b-ex$310 r$8))
(define b-ex$347 (join b-ex$346 r$14))
(define b-ex$339 (join b-ex$336 b-ex$338))
(define b-ex$359 (join b-ex$358 r$16))
(define cmp-f$245 (= b-ex$244 b-ex$237))
(define cmp-f$97 (= r$5 b-ex$96))
(define cmp-f$176 (= b-ex$175 b-ex$168))
(define cmp-f$222 (= b-ex$221 b-ex$214))
(define b-ex$383 (join b-ex$382 r$20))
(define b-ex$363 (join b-ex$360 b-ex$362))
(define cmp-f$268 (= b-ex$267 b-ex$260))
(define cmp-f$291 (= b-ex$290 b-ex$283))
(define mul-f$5 (multiplicity-formula 'one b-ex$4))
(define b-ex$351 (join b-ex$348 b-ex$350))
(define cmp-f$74 (= r$1 b-ex$73))
(define cmp-f$94 (= r$5 b-ex$93))
(define q-f$43 (quantified-formula 'all (list decl$40) mul-f$42))
(define b-ex$215 (join b-ex$214 b-ex$213))
(define q-f$35 (quantified-formula 'all (list decl$32) mul-f$34))
(define b-ex$238 (join b-ex$237 b-ex$236))
(define b-ex$323 (join b-ex$322 r$10))
(define b-ex$147 (join b-ex$146 r$7))
(define b-f$78 (&& cmp-f$74 cmp-f$77))
(define b-ex$130 (join b-ex$129 r$7))
(define b-ex$193 (join b-ex$192 r$7))
(define b-f$36 (&& cmp-f$31 q-f$35))
(define b-f$20 (&& cmp-f$15 q-f$19))
(define b-ex$285 (join b-ex$284 r$7))
(define b-ex$170 (join b-ex$169 r$7))
(define b-f$28 (&& cmp-f$23 q-f$27))
(define cmp-f$275 (= b-ex$274 b-ex$261))
(define b-ex$108 (join b-ex$106 b-ex$107))
(define cmp-f$252 (= b-ex$251 b-ex$238))
(define b-ex$239 (join b-ex$238 r$7))
(define b-f$68 (&& cmp-f$63 q-f$67))
(define b-f$52 (&& cmp-f$47 q-f$51))
(define b-ex$262 (join b-ex$261 r$7))
(define cmp-f$160 (= b-ex$159 b-ex$146))
(define cmp-f$183 (= b-ex$182 b-ex$169))
(define cmp-f$340 (= b-ex$335 b-ex$339))
(define cmp-f$328 (= b-ex$323 b-ex$327))
(define b-ex$114 (join b-ex$113 r$3))
(define cmp-f$229 (= b-ex$228 b-ex$215))
(define q-f$13 (quantified-formula 'all decls$9 mul-f$12))
(define b-f$44 (&& cmp-f$39 q-f$43))
(define b-ex$88 (join b-ex$86 b-ex$87))
(define b-ex$216 (join b-ex$215 r$7))
(define cmp-f$206 (= b-ex$205 b-ex$192))
(define cmp-f$352 (= b-ex$347 b-ex$351))
(define cmp-f$388 (= b-ex$383 b-ex$387))
(define cmp-f$364 (= b-ex$359 b-ex$363))
(define q-f$6 (quantified-formula 'all decls$2 mul-f$5))
(define cmp-f$376 (= b-ex$371 b-ex$375))
(define cmp-f$316 (= b-ex$311 b-ex$315))
(define cmp-f$298 (= b-ex$297 b-ex$284))
(define b-f$98 (&& cmp-f$94 cmp-f$97))
(define cmp-f$122 (= r$32 b-ex$113))
(define b-f$60 (&& cmp-f$55 q-f$59))
(define cmp-f$138 (= r$38 b-ex$129))
(define b-ex$286 (join b-ex$284 b-ex$285))
(define b-ex$131 (join b-ex$129 b-ex$130))
(define cmp-f$109 (= v$26 b-ex$108))
(define b-ex$115 (join b-ex$113 b-ex$114))
(define b-ex$194 (join b-ex$192 b-ex$193))
(define app$45 b-f$44)
(define b-ex$217 (join b-ex$215 b-ex$216))
(define app$69 b-f$68)
(define q-f$317 (quantified-formula 'all decls$308 cmp-f$316))
(define b-ex$148 (join b-ex$146 b-ex$147))
(define app$61 b-f$60)
(define q-f$377 (quantified-formula 'all decls$368 cmp-f$376))
(define b-ex$240 (join b-ex$238 b-ex$239))
(define q-f$353 (quantified-formula 'all decls$344 cmp-f$352))
(define b-ex$263 (join b-ex$261 b-ex$262))
(define app$21 b-f$20)
(define b-ex$171 (join b-ex$169 b-ex$170))
(define q-f$365 (quantified-formula 'all decls$356 cmp-f$364))
(define q-f$79 (quantified-formula 'all (list decl$71) b-f$78))
(define cmp-f$89 (= v$23 b-ex$88))
(define q-f$341 (quantified-formula 'all decls$332 cmp-f$340))
(define q-f$329 (quantified-formula 'all decls$320 cmp-f$328))
(define app$53 b-f$52)
(define app$37 b-f$36)
(define q-f$389 (quantified-formula 'all decls$380 cmp-f$388))
(define q-f$99 (quantified-formula 'all (list decl$91) b-f$98))
(define app$29 b-f$28)
(define cmp-f$119 (= r$30 b-ex$115))
(define q-f$90 (quantified-formula 'all decls$82 cmp-f$89))
(define n-f$390 (|| q-f$317 q-f$329 q-f$341 q-f$353 q-f$365 q-f$377 q-f$389))
(define q-f$110 (quantified-formula 'all decls$102 cmp-f$109))
(define b-ex$149 (join b-ex$148 r$7))
(define n-f$70 (&& q-f$6 q-f$13 app$21 app$29 app$37 app$45 app$53 app$61 app$69))
(define cmp-f$135 (= r$36 b-ex$131))
(define b-ex$132 (join b-ex$131 r$7))
(define b-ex$218 (join b-ex$217 r$7))
(define cmp-f$270 (= b-ex$269 b-ex$263))
(define cmp-f$224 (= b-ex$223 b-ex$217))
(define b-ex$287 (join b-ex$286 r$7))
(define cmp-f$293 (= b-ex$292 b-ex$286))
(define b-ex$172 (join b-ex$171 r$7))
(define b-ex$116 (join b-ex$115 r$3))
(define cmp-f$247 (= b-ex$246 b-ex$240))
(define b-ex$195 (join b-ex$194 r$7))
(define b-ex$264 (join b-ex$263 r$7))
(define b-ex$241 (join b-ex$240 r$7))
(define cmp-f$178 (= b-ex$177 b-ex$171))
(define cmp-f$155 (= b-ex$154 b-ex$148))
(define cmp-f$201 (= b-ex$200 b-ex$194))
(define b-ex$265 (join b-ex$261 b-ex$264))
(define b-ex$295 (join r$39 b-ex$287))
(define b-ex$133 (join b-ex$129 b-ex$132))
(define !-f$391 (! n-f$390))
(define b-ex$249 (join r$38 b-ex$241))
(define b-ex$136 (join r$35 b-ex$132))
(define b-ex$196 (join b-ex$192 b-ex$195))
(define b-ex$203 (join r$36 b-ex$195))
(define b-ex$242 (join b-ex$238 b-ex$241))
(define b-ex$288 (join b-ex$284 b-ex$287))
(define b-ex$150 (join b-ex$146 b-ex$149))
(define b-ex$219 (join b-ex$215 b-ex$218))
(define b-ex$157 (join r$34 b-ex$149))
(define b-ex$117 (join b-ex$113 b-ex$116))
(define b-ex$226 (join r$37 b-ex$218))
(define b-ex$120 (join r$29 b-ex$116))
(define b-ex$180 (join r$41 b-ex$172))
(define b-ex$173 (join b-ex$169 b-ex$172))
(define b-ex$272 (join r$35 b-ex$264))
(define cmp-f$181 (= b-ex$179 b-ex$180))
(define b-ex$277 (join b-ex$272 r$7))
(define cmp-f$296 (= b-ex$294 b-ex$295))
(define cmp-f$137 (= r$37 b-ex$136))
(define cmp-f$151 (= b-ex$143 b-ex$150))
(define cmp-f$289 (= b-ex$281 b-ex$288))
(define cmp-f$250 (= b-ex$248 b-ex$249))
(define cmp-f$220 (= b-ex$212 b-ex$219))
(define cmp-f$158 (= b-ex$156 b-ex$157))
(define cmp-f$243 (= b-ex$235 b-ex$242))
(define b-ex$300 (join b-ex$295 r$7))
(define b-ex$123 (join b-ex$120 r$3))
(define cmp-f$134 (= r$34 b-ex$133))
(define b-ex$231 (join b-ex$226 r$7))
(define cmp-f$227 (= b-ex$225 b-ex$226))
(define b-ex$139 (join b-ex$136 r$7))
(define cmp-f$197 (= b-ex$189 b-ex$196))
(define cmp-f$266 (= b-ex$258 b-ex$265))
(define b-ex$185 (join b-ex$180 r$7))
(define cmp-f$121 (= r$31 b-ex$120))
(define cmp-f$204 (= b-ex$202 b-ex$203))
(define cmp-f$174 (= b-ex$166 b-ex$173))
(define b-ex$162 (join b-ex$157 r$7))
(define b-ex$254 (join b-ex$249 r$7))
(define cmp-f$273 (= b-ex$271 b-ex$272))
(define cmp-f$118 (= r$28 b-ex$117))
(define b-ex$208 (join b-ex$203 r$7))
(define b-ex$301 (join b-ex$284 b-ex$300))
(define b-ex$163 (join b-ex$146 b-ex$162))
(define b-ex$209 (join b-ex$192 b-ex$208))
(define b-ex$186 (join b-ex$169 b-ex$185))
(define b-ex$278 (join b-ex$261 b-ex$277))
(define b-ex$232 (join b-ex$215 b-ex$231))
(define b-ex$140 (join b-ex$129 b-ex$139))
(define b-ex$255 (join b-ex$238 b-ex$254))
(define b-ex$124 (join b-ex$113 b-ex$123))
(define cmp-f$187 (= b-ex$184 b-ex$186))
(define cmp-f$164 (= b-ex$161 b-ex$163))
(define cmp-f$233 (= b-ex$230 b-ex$232))
(define cmp-f$141 (= r$39 b-ex$140))
(define cmp-f$302 (= b-ex$299 b-ex$301))
(define cmp-f$125 (= r$33 b-ex$124))
(define cmp-f$279 (= b-ex$276 b-ex$278))
(define cmp-f$256 (= b-ex$253 b-ex$255))
(define cmp-f$210 (= b-ex$207 b-ex$209))
(define n-f$211 (&& cmp-f$197 cmp-f$199 cmp-f$201 cmp-f$204 cmp-f$206 cmp-f$210))
(define n-f$142 (&& cmp-f$134 cmp-f$135 cmp-f$137 cmp-f$138 cmp-f$141))
(define n-f$234 (&& cmp-f$220 cmp-f$222 cmp-f$224 cmp-f$227 cmp-f$229 cmp-f$233))
(define n-f$257 (&& cmp-f$243 cmp-f$245 cmp-f$247 cmp-f$250 cmp-f$252 cmp-f$256))
(define n-f$188 (&& cmp-f$174 cmp-f$176 cmp-f$178 cmp-f$181 cmp-f$183 cmp-f$187))
(define n-f$165 (&& cmp-f$151 cmp-f$153 cmp-f$155 cmp-f$158 cmp-f$160 cmp-f$164))
(define n-f$280 (&& cmp-f$266 cmp-f$268 cmp-f$270 cmp-f$273 cmp-f$275 cmp-f$279))
(define n-f$126 (&& cmp-f$118 cmp-f$119 cmp-f$121 cmp-f$122 cmp-f$125))
(define n-f$303 (&& cmp-f$289 cmp-f$291 cmp-f$293 cmp-f$296 cmp-f$298 cmp-f$302))
(define n-f$304 (&& n-f$165 n-f$188 n-f$211 n-f$234 n-f$257 n-f$280 n-f$303))
(define n-f$305 (&& n-f$70 q-f$79 q-f$90 q-f$99 q-f$110 true true n-f$126 n-f$142 n-f$304))
(define b-f$392 (&& n-f$305 !-f$391))
(define ts$21 (list (list "e14")))
(define ts$15 (list (list "e22")))
(define ts$39 (list (list "e15" "e20")))
(define ts$23 (list (list "e24")))
(define ts$51 (list (list "e15" "e24")))
(define ts$37 (list (list "e20" "e20" "e21") (list "e20" "e20" "e22") (list "e20" "e20" "e23") (list "e20" "e20" "e24") (list "e20" "e20" "e25") (list "e20" "e20" "e26") (list "e20" "e21" "e20") (list "e20" "e21" "e21") (list "e20" "e21" "e22") (list "e20" "e21" "e23") (list "e20" "e21" "e24") (list "e20" "e21" "e25") (list "e20" "e21" "e26") (list "e20" "e22" "e20") (list "e20" "e22" "e21") (list "e20" "e22" "e22") (list "e20" "e22" "e23") (list "e20" "e22" "e24") (list "e20" "e22" "e25") (list "e20" "e22" "e26") (list "e20" "e23" "e20") (list "e20" "e23" "e21") (list "e20" "e23" "e22") (list "e20" "e23" "e23") (list "e20" "e23" "e24") (list "e20" "e23" "e25") (list "e20" "e23" "e26") (list "e20" "e24" "e20") (list "e20" "e24" "e21") (list "e20" "e24" "e22") (list "e20" "e24" "e23") (list "e20" "e24" "e24") (list "e20" "e24" "e25") (list "e20" "e24" "e26") (list "e20" "e25" "e20") (list "e20" "e25" "e21") (list "e20" "e25" "e22") (list "e20" "e25" "e23") (list "e20" "e25" "e24") (list "e20" "e25" "e25") (list "e20" "e25" "e26") (list "e20" "e26" "e20") (list "e20" "e26" "e21") (list "e20" "e26" "e22") (list "e20" "e26" "e23") (list "e20" "e26" "e24") (list "e20" "e26" "e25") (list "e20" "e26" "e26") (list "e21" "e20" "e20") (list "e21" "e20" "e21") (list "e21" "e20" "e22") (list "e21" "e20" "e23") (list "e21" "e20" "e24") (list "e21" "e20" "e25") (list "e21" "e20" "e26") (list "e21" "e21" "e20") (list "e21" "e21" "e22") (list "e21" "e21" "e23") (list "e21" "e21" "e24") (list "e21" "e21" "e25") (list "e21" "e21" "e26") (list "e21" "e22" "e20") (list "e21" "e22" "e21") (list "e21" "e22" "e22") (list "e21" "e22" "e23") (list "e21" "e22" "e24") (list "e21" "e22" "e25") (list "e21" "e22" "e26") (list "e21" "e23" "e20") (list "e21" "e23" "e21") (list "e21" "e23" "e22") (list "e21" "e23" "e23") (list "e21" "e23" "e24") (list "e21" "e23" "e25") (list "e21" "e23" "e26") (list "e21" "e24" "e20") (list "e21" "e24" "e21") (list "e21" "e24" "e22") (list "e21" "e24" "e23") (list "e21" "e24" "e24") (list "e21" "e24" "e25") (list "e21" "e24" "e26") (list "e21" "e25" "e20") (list "e21" "e25" "e21") (list "e21" "e25" "e22") (list "e21" "e25" "e23") (list "e21" "e25" "e24") (list "e21" "e25" "e25") (list "e21" "e25" "e26") (list "e21" "e26" "e20") (list "e21" "e26" "e21") (list "e21" "e26" "e22") (list "e21" "e26" "e23") (list "e21" "e26" "e24") (list "e21" "e26" "e25") (list "e21" "e26" "e26") (list "e22" "e20" "e20") (list "e22" "e20" "e21") (list "e22" "e20" "e22") (list "e22" "e20" "e23") (list "e22" "e20" "e24") (list "e22" "e20" "e25") (list "e22" "e20" "e26") (list "e22" "e21" "e20") (list "e22" "e21" "e21") (list "e22" "e21" "e22") (list "e22" "e21" "e23") (list "e22" "e21" "e24") (list "e22" "e21" "e25") (list "e22" "e21" "e26") (list "e22" "e22" "e20") (list "e22" "e22" "e21") (list "e22" "e22" "e23") (list "e22" "e22" "e24") (list "e22" "e22" "e25") (list "e22" "e22" "e26") (list "e22" "e23" "e20") (list "e22" "e23" "e21") (list "e22" "e23" "e22") (list "e22" "e23" "e23") (list "e22" "e23" "e24") (list "e22" "e23" "e25") (list "e22" "e23" "e26") (list "e22" "e24" "e20") (list "e22" "e24" "e21") (list "e22" "e24" "e22") (list "e22" "e24" "e23") (list "e22" "e24" "e24") (list "e22" "e24" "e25") (list "e22" "e24" "e26") (list "e22" "e25" "e20") (list "e22" "e25" "e21") (list "e22" "e25" "e22") (list "e22" "e25" "e23") (list "e22" "e25" "e24") (list "e22" "e25" "e25") (list "e22" "e25" "e26") (list "e22" "e26" "e20") (list "e22" "e26" "e21") (list "e22" "e26" "e22") (list "e22" "e26" "e23") (list "e22" "e26" "e24") (list "e22" "e26" "e25") (list "e22" "e26" "e26") (list "e23" "e20" "e20") (list "e23" "e20" "e21") (list "e23" "e20" "e22") (list "e23" "e20" "e23") (list "e23" "e20" "e24") (list "e23" "e20" "e25") (list "e23" "e20" "e26") (list "e23" "e21" "e20") (list "e23" "e21" "e21") (list "e23" "e21" "e22") (list "e23" "e21" "e23") (list "e23" "e21" "e24") (list "e23" "e21" "e25") (list "e23" "e21" "e26") (list "e23" "e22" "e20") (list "e23" "e22" "e21") (list "e23" "e22" "e22") (list "e23" "e22" "e23") (list "e23" "e22" "e24") (list "e23" "e22" "e25") (list "e23" "e22" "e26") (list "e23" "e23" "e20") (list "e23" "e23" "e21") (list "e23" "e23" "e22") (list "e23" "e23" "e24") (list "e23" "e23" "e25") (list "e23" "e23" "e26") (list "e23" "e24" "e20") (list "e23" "e24" "e21") (list "e23" "e24" "e22") (list "e23" "e24" "e23") (list "e23" "e24" "e24") (list "e23" "e24" "e25") (list "e23" "e24" "e26") (list "e23" "e25" "e20") (list "e23" "e25" "e21") (list "e23" "e25" "e22") (list "e23" "e25" "e23") (list "e23" "e25" "e24") (list "e23" "e25" "e25") (list "e23" "e25" "e26") (list "e23" "e26" "e20") (list "e23" "e26" "e21") (list "e23" "e26" "e22") (list "e23" "e26" "e23") (list "e23" "e26" "e24") (list "e23" "e26" "e25") (list "e23" "e26" "e26") (list "e24" "e20" "e20") (list "e24" "e20" "e21") (list "e24" "e20" "e22") (list "e24" "e20" "e23") (list "e24" "e20" "e24") (list "e24" "e20" "e25") (list "e24" "e20" "e26") (list "e24" "e21" "e20") (list "e24" "e21" "e21") (list "e24" "e21" "e22") (list "e24" "e21" "e23") (list "e24" "e21" "e24") (list "e24" "e21" "e25") (list "e24" "e21" "e26") (list "e24" "e22" "e20") (list "e24" "e22" "e21") (list "e24" "e22" "e22") (list "e24" "e22" "e23") (list "e24" "e22" "e24") (list "e24" "e22" "e25") (list "e24" "e22" "e26") (list "e24" "e23" "e20") (list "e24" "e23" "e21") (list "e24" "e23" "e22") (list "e24" "e23" "e23") (list "e24" "e23" "e24") (list "e24" "e23" "e25") (list "e24" "e23" "e26") (list "e24" "e24" "e20") (list "e24" "e24" "e21") (list "e24" "e24" "e22") (list "e24" "e24" "e23") (list "e24" "e24" "e25") (list "e24" "e24" "e26") (list "e24" "e25" "e20") (list "e24" "e25" "e21") (list "e24" "e25" "e22") (list "e24" "e25" "e23") (list "e24" "e25" "e24") (list "e24" "e25" "e25") (list "e24" "e25" "e26") (list "e24" "e26" "e20") (list "e24" "e26" "e21") (list "e24" "e26" "e22") (list "e24" "e26" "e23") (list "e24" "e26" "e24") (list "e24" "e26" "e25") (list "e24" "e26" "e26") (list "e25" "e20" "e20") (list "e25" "e20" "e21") (list "e25" "e20" "e22") (list "e25" "e20" "e23") (list "e25" "e20" "e24") (list "e25" "e20" "e25") (list "e25" "e20" "e26") (list "e25" "e21" "e20") (list "e25" "e21" "e21") (list "e25" "e21" "e22") (list "e25" "e21" "e23") (list "e25" "e21" "e24") (list "e25" "e21" "e25") (list "e25" "e21" "e26") (list "e25" "e22" "e20") (list "e25" "e22" "e21") (list "e25" "e22" "e22") (list "e25" "e22" "e23") (list "e25" "e22" "e24") (list "e25" "e22" "e25") (list "e25" "e22" "e26") (list "e25" "e23" "e20") (list "e25" "e23" "e21") (list "e25" "e23" "e22") (list "e25" "e23" "e23") (list "e25" "e23" "e24") (list "e25" "e23" "e25") (list "e25" "e23" "e26") (list "e25" "e24" "e20") (list "e25" "e24" "e21") (list "e25" "e24" "e22") (list "e25" "e24" "e23") (list "e25" "e24" "e24") (list "e25" "e24" "e25") (list "e25" "e24" "e26") (list "e25" "e25" "e21") (list "e25" "e26" "e20") (list "e25" "e26" "e21") (list "e25" "e26" "e22") (list "e25" "e26" "e23") (list "e25" "e26" "e24") (list "e25" "e26" "e25") (list "e25" "e26" "e26") (list "e26" "e20" "e20") (list "e26" "e20" "e21") (list "e26" "e20" "e22") (list "e26" "e20" "e23") (list "e26" "e20" "e24") (list "e26" "e20" "e25") (list "e26" "e20" "e26") (list "e26" "e21" "e20") (list "e26" "e21" "e21") (list "e26" "e21" "e22") (list "e26" "e21" "e23") (list "e26" "e21" "e24") (list "e26" "e21" "e25") (list "e26" "e21" "e26") (list "e26" "e22" "e20") (list "e26" "e22" "e21") (list "e26" "e22" "e22") (list "e26" "e22" "e23") (list "e26" "e22" "e24") (list "e26" "e22" "e25") (list "e26" "e22" "e26") (list "e26" "e23" "e20") (list "e26" "e23" "e21") (list "e26" "e23" "e22") (list "e26" "e23" "e23") (list "e26" "e23" "e24") (list "e26" "e23" "e25") (list "e26" "e23" "e26") (list "e26" "e24" "e20") (list "e26" "e24" "e21") (list "e26" "e24" "e22") (list "e26" "e24" "e23") (list "e26" "e24" "e24") (list "e26" "e24" "e25") (list "e26" "e24" "e26") (list "e26" "e25" "e20") (list "e26" "e25" "e21") (list "e26" "e25" "e22") (list "e26" "e25" "e23") (list "e26" "e25" "e24") (list "e26" "e25" "e25") (list "e26" "e25" "e26") (list "e26" "e26" "e20") (list "e26" "e26" "e21") (list "e26" "e26" "e22") (list "e26" "e26" "e23") (list "e26" "e26" "e24") (list "e26" "e26" "e25")))
(define ts$40 (list (list "e10" "e20") (list "e10" "e21") (list "e10" "e22") (list "e10" "e23") (list "e10" "e24") (list "e10" "e25") (list "e10" "e26") (list "e11" "e20") (list "e11" "e21") (list "e11" "e22") (list "e11" "e23") (list "e11" "e24") (list "e11" "e25") (list "e11" "e26") (list "e12" "e20") (list "e12" "e21") (list "e12" "e22") (list "e12" "e23") (list "e12" "e24") (list "e12" "e25") (list "e12" "e26") (list "e13" "e20") (list "e13" "e21") (list "e13" "e22") (list "e13" "e23") (list "e13" "e24") (list "e13" "e25") (list "e13" "e26") (list "e14" "e20") (list "e14" "e21") (list "e14" "e22") (list "e14" "e23") (list "e14" "e24") (list "e14" "e25") (list "e14" "e26") (list "e15" "e20") (list "e16" "e20") (list "e16" "e21") (list "e16" "e22") (list "e16" "e23") (list "e16" "e24") (list "e16" "e25") (list "e16" "e26")))
(define ts$48 (list (list "e15" "e23")))
(define ts$29 (list (list "e16")))
(define ts$52 (list (list "e10" "e20") (list "e10" "e21") (list "e10" "e22") (list "e10" "e23") (list "e10" "e24") (list "e10" "e25") (list "e10" "e26") (list "e11" "e20") (list "e11" "e21") (list "e11" "e22") (list "e11" "e23") (list "e11" "e24") (list "e11" "e25") (list "e11" "e26") (list "e12" "e20") (list "e12" "e21") (list "e12" "e22") (list "e12" "e23") (list "e12" "e24") (list "e12" "e25") (list "e12" "e26") (list "e13" "e20") (list "e13" "e21") (list "e13" "e22") (list "e13" "e23") (list "e13" "e24") (list "e13" "e25") (list "e13" "e26") (list "e14" "e20") (list "e14" "e21") (list "e14" "e22") (list "e14" "e23") (list "e14" "e24") (list "e14" "e25") (list "e14" "e26") (list "e15" "e24") (list "e16" "e20") (list "e16" "e21") (list "e16" "e22") (list "e16" "e23") (list "e16" "e24") (list "e16" "e25") (list "e16" "e26")))
(define ts$58 (list (list "e10" "e20") (list "e10" "e21") (list "e10" "e22") (list "e10" "e23") (list "e10" "e24") (list "e10" "e25") (list "e10" "e26") (list "e11" "e20") (list "e11" "e21") (list "e11" "e22") (list "e11" "e23") (list "e11" "e24") (list "e11" "e25") (list "e11" "e26") (list "e12" "e20") (list "e12" "e21") (list "e12" "e22") (list "e12" "e23") (list "e12" "e24") (list "e12" "e25") (list "e12" "e26") (list "e13" "e20") (list "e13" "e21") (list "e13" "e22") (list "e13" "e23") (list "e13" "e24") (list "e13" "e25") (list "e13" "e26") (list "e14" "e20") (list "e14" "e21") (list "e14" "e22") (list "e14" "e23") (list "e14" "e24") (list "e14" "e25") (list "e14" "e26") (list "e15" "e26") (list "e16" "e20") (list "e16" "e21") (list "e16" "e22") (list "e16" "e23") (list "e16" "e24") (list "e16" "e25") (list "e16" "e26")))
(define ts$17 (list (list "e13")))
(define ts$19 (list (list "e23")))
(define ts$9 (list (list "e11")))
(define ts$31 (list (list "e26")))
(define ts$25 (list (list "e15")))
(define ts$33 (list (list "e15" "e15" "e11")))
(define ts$42 (list (list "e15" "e21")))
(define ts$5 (list (list "e10")))
(define ts$36 (list (list "e25" "e25" "e21")))
(define ts$55 (list (list "e10" "e20") (list "e10" "e21") (list "e10" "e22") (list "e10" "e23") (list "e10" "e24") (list "e10" "e25") (list "e10" "e26") (list "e11" "e20") (list "e11" "e21") (list "e11" "e22") (list "e11" "e23") (list "e11" "e24") (list "e11" "e25") (list "e11" "e26") (list "e12" "e20") (list "e12" "e21") (list "e12" "e22") (list "e12" "e23") (list "e12" "e24") (list "e12" "e25") (list "e12" "e26") (list "e13" "e20") (list "e13" "e21") (list "e13" "e22") (list "e13" "e23") (list "e13" "e24") (list "e13" "e25") (list "e13" "e26") (list "e14" "e20") (list "e14" "e21") (list "e14" "e22") (list "e14" "e23") (list "e14" "e24") (list "e14" "e25") (list "e14" "e26") (list "e15" "e25") (list "e16" "e20") (list "e16" "e21") (list "e16" "e22") (list "e16" "e23") (list "e16" "e24") (list "e16" "e25") (list "e16" "e26")))
(define ts$34 (list (list "e10" "e10" "e11") (list "e10" "e10" "e12") (list "e10" "e10" "e13") (list "e10" "e10" "e14") (list "e10" "e10" "e15") (list "e10" "e10" "e16") (list "e10" "e11" "e10") (list "e10" "e11" "e11") (list "e10" "e11" "e12") (list "e10" "e11" "e13") (list "e10" "e11" "e14") (list "e10" "e11" "e15") (list "e10" "e11" "e16") (list "e10" "e12" "e10") (list "e10" "e12" "e11") (list "e10" "e12" "e12") (list "e10" "e12" "e13") (list "e10" "e12" "e14") (list "e10" "e12" "e15") (list "e10" "e12" "e16") (list "e10" "e13" "e10") (list "e10" "e13" "e11") (list "e10" "e13" "e12") (list "e10" "e13" "e13") (list "e10" "e13" "e14") (list "e10" "e13" "e15") (list "e10" "e13" "e16") (list "e10" "e14" "e10") (list "e10" "e14" "e11") (list "e10" "e14" "e12") (list "e10" "e14" "e13") (list "e10" "e14" "e14") (list "e10" "e14" "e15") (list "e10" "e14" "e16") (list "e10" "e15" "e10") (list "e10" "e15" "e11") (list "e10" "e15" "e12") (list "e10" "e15" "e13") (list "e10" "e15" "e14") (list "e10" "e15" "e15") (list "e10" "e15" "e16") (list "e10" "e16" "e10") (list "e10" "e16" "e11") (list "e10" "e16" "e12") (list "e10" "e16" "e13") (list "e10" "e16" "e14") (list "e10" "e16" "e15") (list "e10" "e16" "e16") (list "e11" "e10" "e10") (list "e11" "e10" "e11") (list "e11" "e10" "e12") (list "e11" "e10" "e13") (list "e11" "e10" "e14") (list "e11" "e10" "e15") (list "e11" "e10" "e16") (list "e11" "e11" "e10") (list "e11" "e11" "e12") (list "e11" "e11" "e13") (list "e11" "e11" "e14") (list "e11" "e11" "e15") (list "e11" "e11" "e16") (list "e11" "e12" "e10") (list "e11" "e12" "e11") (list "e11" "e12" "e12") (list "e11" "e12" "e13") (list "e11" "e12" "e14") (list "e11" "e12" "e15") (list "e11" "e12" "e16") (list "e11" "e13" "e10") (list "e11" "e13" "e11") (list "e11" "e13" "e12") (list "e11" "e13" "e13") (list "e11" "e13" "e14") (list "e11" "e13" "e15") (list "e11" "e13" "e16") (list "e11" "e14" "e10") (list "e11" "e14" "e11") (list "e11" "e14" "e12") (list "e11" "e14" "e13") (list "e11" "e14" "e14") (list "e11" "e14" "e15") (list "e11" "e14" "e16") (list "e11" "e15" "e10") (list "e11" "e15" "e11") (list "e11" "e15" "e12") (list "e11" "e15" "e13") (list "e11" "e15" "e14") (list "e11" "e15" "e15") (list "e11" "e15" "e16") (list "e11" "e16" "e10") (list "e11" "e16" "e11") (list "e11" "e16" "e12") (list "e11" "e16" "e13") (list "e11" "e16" "e14") (list "e11" "e16" "e15") (list "e11" "e16" "e16") (list "e12" "e10" "e10") (list "e12" "e10" "e11") (list "e12" "e10" "e12") (list "e12" "e10" "e13") (list "e12" "e10" "e14") (list "e12" "e10" "e15") (list "e12" "e10" "e16") (list "e12" "e11" "e10") (list "e12" "e11" "e11") (list "e12" "e11" "e12") (list "e12" "e11" "e13") (list "e12" "e11" "e14") (list "e12" "e11" "e15") (list "e12" "e11" "e16") (list "e12" "e12" "e10") (list "e12" "e12" "e11") (list "e12" "e12" "e13") (list "e12" "e12" "e14") (list "e12" "e12" "e15") (list "e12" "e12" "e16") (list "e12" "e13" "e10") (list "e12" "e13" "e11") (list "e12" "e13" "e12") (list "e12" "e13" "e13") (list "e12" "e13" "e14") (list "e12" "e13" "e15") (list "e12" "e13" "e16") (list "e12" "e14" "e10") (list "e12" "e14" "e11") (list "e12" "e14" "e12") (list "e12" "e14" "e13") (list "e12" "e14" "e14") (list "e12" "e14" "e15") (list "e12" "e14" "e16") (list "e12" "e15" "e10") (list "e12" "e15" "e11") (list "e12" "e15" "e12") (list "e12" "e15" "e13") (list "e12" "e15" "e14") (list "e12" "e15" "e15") (list "e12" "e15" "e16") (list "e12" "e16" "e10") (list "e12" "e16" "e11") (list "e12" "e16" "e12") (list "e12" "e16" "e13") (list "e12" "e16" "e14") (list "e12" "e16" "e15") (list "e12" "e16" "e16") (list "e13" "e10" "e10") (list "e13" "e10" "e11") (list "e13" "e10" "e12") (list "e13" "e10" "e13") (list "e13" "e10" "e14") (list "e13" "e10" "e15") (list "e13" "e10" "e16") (list "e13" "e11" "e10") (list "e13" "e11" "e11") (list "e13" "e11" "e12") (list "e13" "e11" "e13") (list "e13" "e11" "e14") (list "e13" "e11" "e15") (list "e13" "e11" "e16") (list "e13" "e12" "e10") (list "e13" "e12" "e11") (list "e13" "e12" "e12") (list "e13" "e12" "e13") (list "e13" "e12" "e14") (list "e13" "e12" "e15") (list "e13" "e12" "e16") (list "e13" "e13" "e10") (list "e13" "e13" "e11") (list "e13" "e13" "e12") (list "e13" "e13" "e14") (list "e13" "e13" "e15") (list "e13" "e13" "e16") (list "e13" "e14" "e10") (list "e13" "e14" "e11") (list "e13" "e14" "e12") (list "e13" "e14" "e13") (list "e13" "e14" "e14") (list "e13" "e14" "e15") (list "e13" "e14" "e16") (list "e13" "e15" "e10") (list "e13" "e15" "e11") (list "e13" "e15" "e12") (list "e13" "e15" "e13") (list "e13" "e15" "e14") (list "e13" "e15" "e15") (list "e13" "e15" "e16") (list "e13" "e16" "e10") (list "e13" "e16" "e11") (list "e13" "e16" "e12") (list "e13" "e16" "e13") (list "e13" "e16" "e14") (list "e13" "e16" "e15") (list "e13" "e16" "e16") (list "e14" "e10" "e10") (list "e14" "e10" "e11") (list "e14" "e10" "e12") (list "e14" "e10" "e13") (list "e14" "e10" "e14") (list "e14" "e10" "e15") (list "e14" "e10" "e16") (list "e14" "e11" "e10") (list "e14" "e11" "e11") (list "e14" "e11" "e12") (list "e14" "e11" "e13") (list "e14" "e11" "e14") (list "e14" "e11" "e15") (list "e14" "e11" "e16") (list "e14" "e12" "e10") (list "e14" "e12" "e11") (list "e14" "e12" "e12") (list "e14" "e12" "e13") (list "e14" "e12" "e14") (list "e14" "e12" "e15") (list "e14" "e12" "e16") (list "e14" "e13" "e10") (list "e14" "e13" "e11") (list "e14" "e13" "e12") (list "e14" "e13" "e13") (list "e14" "e13" "e14") (list "e14" "e13" "e15") (list "e14" "e13" "e16") (list "e14" "e14" "e10") (list "e14" "e14" "e11") (list "e14" "e14" "e12") (list "e14" "e14" "e13") (list "e14" "e14" "e15") (list "e14" "e14" "e16") (list "e14" "e15" "e10") (list "e14" "e15" "e11") (list "e14" "e15" "e12") (list "e14" "e15" "e13") (list "e14" "e15" "e14") (list "e14" "e15" "e15") (list "e14" "e15" "e16") (list "e14" "e16" "e10") (list "e14" "e16" "e11") (list "e14" "e16" "e12") (list "e14" "e16" "e13") (list "e14" "e16" "e14") (list "e14" "e16" "e15") (list "e14" "e16" "e16") (list "e15" "e10" "e10") (list "e15" "e10" "e11") (list "e15" "e10" "e12") (list "e15" "e10" "e13") (list "e15" "e10" "e14") (list "e15" "e10" "e15") (list "e15" "e10" "e16") (list "e15" "e11" "e10") (list "e15" "e11" "e11") (list "e15" "e11" "e12") (list "e15" "e11" "e13") (list "e15" "e11" "e14") (list "e15" "e11" "e15") (list "e15" "e11" "e16") (list "e15" "e12" "e10") (list "e15" "e12" "e11") (list "e15" "e12" "e12") (list "e15" "e12" "e13") (list "e15" "e12" "e14") (list "e15" "e12" "e15") (list "e15" "e12" "e16") (list "e15" "e13" "e10") (list "e15" "e13" "e11") (list "e15" "e13" "e12") (list "e15" "e13" "e13") (list "e15" "e13" "e14") (list "e15" "e13" "e15") (list "e15" "e13" "e16") (list "e15" "e14" "e10") (list "e15" "e14" "e11") (list "e15" "e14" "e12") (list "e15" "e14" "e13") (list "e15" "e14" "e14") (list "e15" "e14" "e15") (list "e15" "e14" "e16") (list "e15" "e15" "e11") (list "e15" "e16" "e10") (list "e15" "e16" "e11") (list "e15" "e16" "e12") (list "e15" "e16" "e13") (list "e15" "e16" "e14") (list "e15" "e16" "e15") (list "e15" "e16" "e16") (list "e16" "e10" "e10") (list "e16" "e10" "e11") (list "e16" "e10" "e12") (list "e16" "e10" "e13") (list "e16" "e10" "e14") (list "e16" "e10" "e15") (list "e16" "e10" "e16") (list "e16" "e11" "e10") (list "e16" "e11" "e11") (list "e16" "e11" "e12") (list "e16" "e11" "e13") (list "e16" "e11" "e14") (list "e16" "e11" "e15") (list "e16" "e11" "e16") (list "e16" "e12" "e10") (list "e16" "e12" "e11") (list "e16" "e12" "e12") (list "e16" "e12" "e13") (list "e16" "e12" "e14") (list "e16" "e12" "e15") (list "e16" "e12" "e16") (list "e16" "e13" "e10") (list "e16" "e13" "e11") (list "e16" "e13" "e12") (list "e16" "e13" "e13") (list "e16" "e13" "e14") (list "e16" "e13" "e15") (list "e16" "e13" "e16") (list "e16" "e14" "e10") (list "e16" "e14" "e11") (list "e16" "e14" "e12") (list "e16" "e14" "e13") (list "e16" "e14" "e14") (list "e16" "e14" "e15") (list "e16" "e14" "e16") (list "e16" "e15" "e10") (list "e16" "e15" "e11") (list "e16" "e15" "e12") (list "e16" "e15" "e13") (list "e16" "e15" "e14") (list "e16" "e15" "e15") (list "e16" "e15" "e16") (list "e16" "e16" "e10") (list "e16" "e16" "e11") (list "e16" "e16" "e12") (list "e16" "e16" "e13") (list "e16" "e16" "e14") (list "e16" "e16" "e15")))
(define ts$45 (list (list "e15" "e22")))
(define ts$54 (list (list "e15" "e25")))
(define ts$57 (list (list "e15" "e26")))
(define ts$13 (list (list "e12")))
(define ts$3 (list (list "e20") (list "e21") (list "e22") (list "e23") (list "e24") (list "e25") (list "e26")))
(define ts$1 (list (list "e10") (list "e11") (list "e12") (list "e13") (list "e14") (list "e15") (list "e16")))
(define ts$49 (list (list "e10" "e20") (list "e10" "e21") (list "e10" "e22") (list "e10" "e23") (list "e10" "e24") (list "e10" "e25") (list "e10" "e26") (list "e11" "e20") (list "e11" "e21") (list "e11" "e22") (list "e11" "e23") (list "e11" "e24") (list "e11" "e25") (list "e11" "e26") (list "e12" "e20") (list "e12" "e21") (list "e12" "e22") (list "e12" "e23") (list "e12" "e24") (list "e12" "e25") (list "e12" "e26") (list "e13" "e20") (list "e13" "e21") (list "e13" "e22") (list "e13" "e23") (list "e13" "e24") (list "e13" "e25") (list "e13" "e26") (list "e14" "e20") (list "e14" "e21") (list "e14" "e22") (list "e14" "e23") (list "e14" "e24") (list "e14" "e25") (list "e14" "e26") (list "e15" "e23") (list "e16" "e20") (list "e16" "e21") (list "e16" "e22") (list "e16" "e23") (list "e16" "e24") (list "e16" "e25") (list "e16" "e26")))
(define ts$43 (list (list "e10" "e20") (list "e10" "e21") (list "e10" "e22") (list "e10" "e23") (list "e10" "e24") (list "e10" "e25") (list "e10" "e26") (list "e11" "e20") (list "e11" "e21") (list "e11" "e22") (list "e11" "e23") (list "e11" "e24") (list "e11" "e25") (list "e11" "e26") (list "e12" "e20") (list "e12" "e21") (list "e12" "e22") (list "e12" "e23") (list "e12" "e24") (list "e12" "e25") (list "e12" "e26") (list "e13" "e20") (list "e13" "e21") (list "e13" "e22") (list "e13" "e23") (list "e13" "e24") (list "e13" "e25") (list "e13" "e26") (list "e14" "e20") (list "e14" "e21") (list "e14" "e22") (list "e14" "e23") (list "e14" "e24") (list "e14" "e25") (list "e14" "e26") (list "e15" "e21") (list "e16" "e20") (list "e16" "e21") (list "e16" "e22") (list "e16" "e23") (list "e16" "e24") (list "e16" "e25") (list "e16" "e26")))
(define ts$46 (list (list "e10" "e20") (list "e10" "e21") (list "e10" "e22") (list "e10" "e23") (list "e10" "e24") (list "e10" "e25") (list "e10" "e26") (list "e11" "e20") (list "e11" "e21") (list "e11" "e22") (list "e11" "e23") (list "e11" "e24") (list "e11" "e25") (list "e11" "e26") (list "e12" "e20") (list "e12" "e21") (list "e12" "e22") (list "e12" "e23") (list "e12" "e24") (list "e12" "e25") (list "e12" "e26") (list "e13" "e20") (list "e13" "e21") (list "e13" "e22") (list "e13" "e23") (list "e13" "e24") (list "e13" "e25") (list "e13" "e26") (list "e14" "e20") (list "e14" "e21") (list "e14" "e22") (list "e14" "e23") (list "e14" "e24") (list "e14" "e25") (list "e14" "e26") (list "e15" "e22") (list "e16" "e20") (list "e16" "e21") (list "e16" "e22") (list "e16" "e23") (list "e16" "e24") (list "e16" "e25") (list "e16" "e26")))
(define ts$11 (list (list "e21")))
(define ts$27 (list (list "e25")))
(define ts$7 (list (list "e20")))
(define bd$10 (bound r$40 ts$9 ts$9))
(define bd$41 (bound r$8 ts$39 ts$40))
(define bd$26 (bound r$29 ts$25 ts$25))
(define bd$50 (bound r$14 ts$48 ts$49))
(define bd$4 (bound r$5 ts$3 ts$3))
(define bd$6 (bound r$28 ts$5 ts$5))
(define bd$8 (bound r$34 ts$7 ts$7))
(define bd$35 (bound r$3 ts$33 ts$34))
(define bd$28 (bound r$35 ts$27 ts$27))
(define bd$47 (bound r$12 ts$45 ts$46))
(define bd$30 (bound r$33 ts$29 ts$29))
(define bd$22 (bound r$32 ts$21 ts$21))
(define bd$53 (bound r$16 ts$51 ts$52))
(define bd$56 (bound r$18 ts$54 ts$55))
(define bd$38 (bound r$7 ts$36 ts$37))
(define bd$16 (bound r$36 ts$15 ts$15))
(define bd$14 (bound r$30 ts$13 ts$13))
(define bd$44 (bound r$10 ts$42 ts$43))
(define bd$12 (bound r$41 ts$11 ts$11))
(define bd$59 (bound r$20 ts$57 ts$58))
(define bd$24 (bound r$38 ts$23 ts$23))
(define bd$18 (bound r$31 ts$17 ts$17))
(define bd$2 (bound r$1 ts$1 ts$1))
(define bd$32 (bound r$39 ts$31 ts$31))
(define bd$20 (bound r$37 ts$19 ts$19))
(define bounds$60 (bounds universe$0 (list bd$10 bd$41 bd$26 bd$50 bd$4 bd$6 bd$8 bd$35 bd$28 bd$47 bd$30 bd$22 bd$53 bd$56 bd$38 bd$16 bd$14 bd$44 bd$12 bd$59 bd$24 bd$18 bd$2 bd$32 bd$20)))
(displayln "-- skolemizing...")
(match-define (cons F bnds) (time (skolemize-merge bounds$60 b-f$392 3)))
(displayln "-- instantiating bounds...")
(define interp (time (instantiate-bounds bnds)))
(displayln "-- breaking symmetry...")
(define sbp (time (generate-sbp interp bnds)))
(displayln "-- making boolean interpretation...")
(define F* (time (interpret* F interp)))
(define SS (make-SAT))
(displayln "-- making optimized SAT call...")
(define sol (time (SAT-solve SS (list (&& F* sbp)))))
| false |
85cf3321788533bb7f505907636ab7cd788e84ec | 0928beb90f44ce415fe913133de58574d8d7725a | /plane/ray.scrbl | fafc9c01100e5bed9dd7622c05d4914728230b0d | [
"Apache-2.0"
] | permissive | jackfirth/euclid | 33f02e0da85d9e83360b2b9312d0741147348ce6 | bd64f8f2c7e60ce6d435c7f0241cf3dfffe6d297 | refs/heads/master | 2023-05-01T08:59:07.490370 | 2021-05-20T22:47:44 | 2021-05-20T22:47:44 | 369,111,716 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,145 | scrbl | ray.scrbl | #lang scribble/manual
@(require (for-label euclid/plane/angle
euclid/plane/point
euclid/plane/ray
racket/base
racket/contract/base)
(submod euclid/private/scribble-evaluator-factory doc)
scribble/example)
@(define make-evaluator
(make-module-sharing-evaluator-factory
#:public (list 'euclid/plane/point
'euclid/plane/ray)
#:private (list 'racket/base)))
@title{2D Rays}
@defmodule[euclid/plane/ray]
A @deftech{2D ray} is half of a line. A ray starts at an initial point and continues infinitely in a
single direction.
@defstruct*[ray
([initial-point point?]
[direction angle?])
#:transparent]{
A @tech{2D ray} structure starting at @racket[initial-point] and pointed in @racket[direction].}
@defproc[(ray-between [initial point?] [target point?]) ray?]{
Returns the ray starting at @racket[initial] and pointed towards @racket[target].
@(examples
#:eval (make-evaluator)
(ray-between (point 1 1) (point 5 5))
(ray-between (point 4 8) (point 4 0)))}
| false |
f3faa7399f1cdc83e534d4c0f3eaadea3e9718b6 | 76df16d6c3760cb415f1294caee997cc4736e09b | /rosette-benchmarks-3/jitterbug/jitterbug/racket/stacklang/sema.rkt | 86d18ada4bd04976c20401d14a68c9f25b544d1e | [
"MIT"
] | permissive | uw-unsat/leanette-popl22-artifact | 70409d9cbd8921d794d27b7992bf1d9a4087e9fe | 80fea2519e61b45a283fbf7903acdf6d5528dbe7 | refs/heads/master | 2023-04-15T21:00:49.670873 | 2021-11-16T04:37:11 | 2021-11-16T04:37:11 | 414,331,908 | 6 | 1 | null | null | null | null | UTF-8 | Racket | false | false | 4,582 | rkt | sema.rkt | #lang rosette
(require (prefix-in core: serval/lib/core)
"../lib/hybrid-memory.rkt")
(provide (all-defined-out))
(define inject-bugs (make-parameter #f))
(struct cpu (pc sp memmgr) #:transparent #:mutable)
(define (init-cpu memmgr)
(define-symbolic* pc (bitvector 32))
(define-symbolic* sp (bitvector 32))
(cpu pc sp memmgr))
(define-generics insn
(opcodeof insn)
(immof insn)
(interpret-insn insn cpu))
(define (@immof insn)
(zero-extend (immof insn) (bitvector 32)))
(struct pop () #:transparent
#:methods gen:insn
[(define (opcodeof insn) 'POP)
(define (immof insn) #f)
(define (interpret-insn insn cpu)
(define mm (cpu-memmgr cpu))
(define sp (cpu-sp cpu))
; Increment sp
(set! sp (bvadd (bv 4 32) sp))
; there is a value on stack to pop
(assert (bvule sp (bvsub (hybrid-memmgr-stackbase mm) (bv 4 32))))
(set-cpu-sp! cpu sp)
(set-cpu-pc! cpu (bvadd1 (cpu-pc cpu))))])
(struct sub () #:transparent
#:methods gen:insn
[(define (opcodeof insn) 'SUB)
(define (immof insn) #f)
(define (interpret-insn insn cpu)
(define mm (cpu-memmgr cpu))
(define sp (cpu-sp cpu))
; At least two stack elements
(assert (bvule sp (bvsub (hybrid-memmgr-stackbase mm) (bv 8 32))))
(define a (core:memmgr-load mm sp (bv 0 32) (bv 4 32) #:dbg #f))
(define b (core:memmgr-load mm sp (bv 4 32) (bv 4 32) #:dbg #f))
(core:memmgr-store! mm sp (bv 0 32) (bvsub a b) (bv 4 32) #:dbg #f)
(set-cpu-pc! cpu (bvadd1 (cpu-pc cpu))))])
(struct swap () #:transparent
#:methods gen:insn
[(define (opcodeof insn) 'SWAP)
(define (immof insn) #f)
(define (interpret-insn insn cpu)
(define mm (cpu-memmgr cpu))
(define sp (cpu-sp cpu))
; At least two stack elements
(assert (bvule sp (bvsub (hybrid-memmgr-stackbase mm) (bv 8 32))))
(define a (core:memmgr-load mm sp (bv 0 32) (bv 4 32) #:dbg #f))
(define b (core:memmgr-load mm sp (bv 4 32) (bv 4 32) #:dbg #f))
(core:memmgr-store! mm sp (bv 0 32) b (bv 4 32) #:dbg #f)
(core:memmgr-store! mm sp (bv 4 32) a (bv 4 32) #:dbg #f)
(set-cpu-pc! cpu (bvadd1 (cpu-pc cpu))))])
(struct push (i) #:transparent
#:methods gen:insn
[(define (opcodeof insn) 'PUSH)
(define (immof insn) (push-i insn))
(define (interpret-insn insn cpu)
(define mm (cpu-memmgr cpu))
(define sp (cpu-sp cpu))
; No overflow
(assert (bvult (bvsub sp (bv 4 32)) sp))
(set! sp (bvsub sp (bv 4 32)))
; Room enough to push
(assert (bvuge sp (bvsub (hybrid-memmgr-stackbase mm)
(hybrid-memmgr-stacksize mm))))
(when (! (inject-bugs))
(core:memmgr-store! mm sp (bv 0 32)
(zero-extend (push-i insn) (bitvector 32)) (bv 4 32)
#:dbg #f))
(set-cpu-sp! cpu sp)
(set-cpu-pc! cpu (bvadd1 (cpu-pc cpu))))])
(struct jump (i) #:transparent
#:methods gen:insn
[(define (opcodeof insn) 'JUMP)
(define (immof insn) (jump-i insn))
(define (interpret-insn insn cpu)
(define i32 (zero-extend (jump-i insn) (bitvector 32)))
(set-cpu-pc! cpu i32))])
(struct jeq (i) #:transparent
#:methods gen:insn
[(define (opcodeof insn) 'JEQ)
(define (immof insn) (jeq-i insn))
(define (interpret-insn insn cpu)
(define mm (cpu-memmgr cpu))
(define i32 (zero-extend (jeq-i insn) (bitvector 32)))
(define sp (cpu-sp cpu))
; At least two stack elements
(assert (bvule sp (bvsub (hybrid-memmgr-stackbase mm) (bv 8 32))))
(define a (core:memmgr-load mm sp (bv 0 32) (bv 4 32) #:dbg #f))
(define b (core:memmgr-load mm sp (bv 4 32) (bv 4 32) #:dbg #f))
(if (equal? a b)
(set-cpu-pc! cpu i32)
(set-cpu-pc! cpu (bvadd1 (cpu-pc cpu)))))])
(struct jlt (i) #:transparent
#:methods gen:insn
[(define (opcodeof insn) 'JLT)
(define (immof insn) (jlt-i insn))
(define (interpret-insn insn cpu)
(define mm (cpu-memmgr cpu))
(define i32 (zero-extend (jlt-i insn) (bitvector 32)))
(define sp (cpu-sp cpu))
; At least two stack elements
(assert (bvule sp (bvsub (hybrid-memmgr-stackbase mm) (bv 8 32))))
(define a (core:memmgr-load mm sp (bv 0 32) (bv 4 32) #:dbg #f))
(define b (core:memmgr-load mm sp (bv 4 32) (bv 4 32) #:dbg #f))
(if (bvult a b)
(set-cpu-pc! cpu i32)
(set-cpu-pc! cpu (bvadd1 (cpu-pc cpu)))))])
; Stop has no source semantics
(struct stop () #:transparent
#:methods gen:insn
[(define (opcodeof insn) 'STOP)
(define (immof insn) #f)
(define (interpret-insn insn cpu) (void))])
| false |
a869e64021e27bedb067c35ea72f76ef6d012a10 | 8ad2a8947e6715fb608082ad4ed06dc90066d0d0 | /Midterm/3_fibber.rkt | f01d658dc25a7fa1ebfb2ce0af1cdc69419044c2 | [] | no_license | aryanvaid2108/CS152 | 08c47830f03dc2fc15ee8baafcec528f6fe65a8e | 8bd14044e33515ab6ae800c9485dee2f4ef35738 | refs/heads/master | 2023-03-14T18:18:33.156487 | 2021-03-08T04:23:06 | 2021-03-08T04:23:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,311 | rkt | 3_fibber.rkt | #lang racket
#|
Problem 3: Fibonacci Sequence counter
This problem is testing your understanding of closures.
For this problem only, you ARE allowed to use "set!".
For tips, you might want to review the make-counter function from
http://www.cs.sjsu.edu/~austin/cs152-spring20/labs/lab06/closures.rkt.
Description: The make-fibber function takes no arguments, and returns
a function that also takes no arguments. We will call this second
function "fib", though the code actually has "fib1" and "fib2".
When the fib function is called, it returns the next number in the
Fibonacci sequence (https://en.wikipedia.org/wiki/Fibonacci_number).
Note that if there are multiple fib functions, each maintains its
own place in the sequence.
|#
(define (make-fibber)
(let ([a 0] [b 0] [counter 0])
(λ ()
(set! counter (+ counter 1))
(if (= counter 2) (set! a 1) (+ counter 1))
(if (= counter 3) (set! b 0) (+ counter 1))
(set! a (+ a b))
(set! b (- a b))
a)))
(displayln "Testing fib functions")
;; Expected output for each call listed in the comment
(define fib1 (make-fibber))
(fib1) ; 0
(fib1) ; 1
(fib1) ; 1
(fib1) ; 2
(fib1) ; 3
(fib1) ; 5
(define fib2 (make-fibber))
(fib2) ; 0
(fib1) ; 8
(fib2) ; 1
(fib2) ; 1
(fib2) ; 2
(fib1) ; 13
(fib2) ; 3
(fib2) ; 5
(fib2) ; 8
| false |
9e6087a09231a20d1b7d913dbd6c7072c1a4c8f5 | 323c4b63da4e4cd9b7236d130a137b479f2597bf | /syndicate/distributed.rkt | 33e00951d0ea9eac8ead9f9386578a488611278f | [] | no_license | frumioj/syndicate-rkt | b177fb55eaca6047c1bd63c024cf4297ee8b80e8 | 3030d1959e4b9bee9b8b6cbb7b8bab2d11f37d7c | refs/heads/master | 2022-10-10T01:15:41.664050 | 2020-06-10T11:38:26 | 2020-06-10T11:38:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 169 | rkt | distributed.rkt | #lang syndicate
(provide (all-from-out "distributed/main.rkt"))
(require/activate "distributed/main.rkt")
(module+ main (require (submod "distributed/main.rkt" main)))
| false |
2325e52f682e99bce8c33f452814b28f7d6b7a05 | 7e500549765a0bdc49d4fcf40158fb9bb5b07e3e | /digivice/wisemon/phony/all.rkt | d8030d503198ecdb53b1a2d0018bea6ce3fb8c69 | [] | no_license | capfredf/digimon | 94f3b3946ce115e8ae4472fc757b5f548c519f04 | 1215bb3b1ab86fd115a6f2e393afa4d8530ed576 | refs/heads/master | 2023-04-05T01:27:59.773661 | 2021-04-14T05:32:44 | 2021-04-14T05:32:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 3,002 | rkt | all.rkt | #lang typed/racket/base
(provide (all-defined-out))
(require racket/list)
(require racket/path)
(require racket/string)
(require "dist.rkt")
(require "../spec.rkt")
(require "../phony.rkt")
(require "../racket.rkt")
(require "../native.rkt")
(require "../parameter.rkt")
(require "../../../dtrace.rkt")
(require "../../../digitama/exec.rkt")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define make~all : Make-Phony
(lambda [digimon info-ref]
(define submakes (filter file-exists? (list (build-path (current-directory) "submake.rkt"))))
(wisemon-make (make-native-library-specs info-ref))
(wisemon-compile (current-directory) digimon info-ref)
(for ([submake (in-list submakes)])
(define modpath `(submod ,submake premake))
(when (module-declared? modpath #true)
(dynamic-require modpath #false)
;;; the next two lines should useless but who knows
(wisemon-make (make-native-library-specs info-ref))
(wisemon-compile (current-directory) digimon info-ref)))
(do-make (make-implicit-dist-specs info-ref))
(for ([submake (in-list submakes)])
(define modpath `(submod ,submake make:files))
(when (module-declared? modpath #true)
(dynamic-require modpath #false)
(parameterize ([current-namespace (module->namespace modpath)])
(do-make (for/fold ([specs : Wisemon-Specification null])
([var (in-list (namespace-mapped-symbols))])
(define maybe-spec (namespace-variable-value var #false (λ _ #false)))
(cond [(list? maybe-spec) (append specs (filter wisemon-spec? maybe-spec))]
[(wisemon-spec? maybe-spec) (cons maybe-spec specs)]
[else specs]))))))
(for ([submake (in-list submakes)])
(define modpath `(submod ,submake make:files make))
(when (module-declared? modpath #true)
(dynamic-require modpath #false)))
(wisemon-make null (current-make-real-targets))
(for ([submake (in-list submakes)])
(define modpath `(submod ,submake postmake))
(when (module-declared? modpath #true)
(dynamic-require modpath #false)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define do-make : (-> Wisemon-Specification Void)
(lambda [specs]
(unless (null? specs)
(let-values ([(imts exts) (partition (λ [[t : Path-String]] (wisemon-spec-ref specs t)) (current-make-real-targets))])
(wisemon-make specs (if (null? (current-make-real-targets)) (wisemon-targets-flatten specs) imts))
(current-make-real-targets exts)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define all-phony-goal : Wisemon-Phony
(wisemon-make-phony #:name 'all #:phony make~all #:desc "Build the entire project without documentation [default]"))
| false |
a0f2d73bec062d05394269c2ca390163e8fb5153 | 3c8992d229b954f2920bc3e14790621a5752c511 | /cesk.rkt | 70238ee9d9b64a8ff5c3a292b7679917841ec8ba | [] | no_license | samth/var | 0997324b9d97f365718d9626557938b65c69dc61 | 6817f7d688bdd3ee4ae8314083e78ca72eba23da | refs/heads/master | 2016-09-05T23:25:43.533316 | 2013-02-04T20:11:48 | 2013-02-04T20:11:48 | 1,740,899 | 3 | 2 | null | null | null | null | UTF-8 | Racket | false | false | 7,142 | rkt | cesk.rkt | #lang racket
(require "lang.rkt" "meta.rkt" "step.rkt" "garbage.rkt" "util.rkt")
(require redex/reduction-semantics)
(test-suite test cesk)
(provide CESK inj CESK-trace-it CESK-run unload)
(current-direct? #f)
(define-metafunction λCESK
inj : EXP -> ς
[(inj EXP)
(ev (↓ EXP (env)) (sto) MT)])
(define-metafunction λCESK
bind : σ K -> (a σ)
[(bind σ K)
(a σ_1)
(where (a) (alloc σ (K)))
(where σ_1 (extend-sto σ a (K)))])
(define-metafunction λCESK
ev : D σ K -> ς
[(ev A σ MT) (A σ)]
[(ev BLAME σ K) (BLAME σ)]
[(ev V σ K) (co K V σ)]
[(ev REDEX σ K) (ap REDEX σ K)]
[(ev PREVAL σ K) (ev (-- PREVAL) σ K)]
[(ev (clos • ρ) σ K) (ev (join-contracts) σ K)]
[(ev (clos (@ EXP ... LAB) ρ) σ K)
(ev (@ (↓ EXP ρ) ... LAB) σ K)]
[(ev (clos (@* EXP ... LAB) ρ) σ K)
(ev (@* (↓ EXP ρ) ... LAB) σ K)]
[(ev (clos (if EXP ...) ρ) σ K)
(ev (if (↓ EXP ρ) ...) σ K)]
[(ev (clos (let ((X EXP) ...) EXP_1) ρ) σ K)
(ev (let ((X (↓ EXP ρ)) ...) (↓ EXP_1 ρ)) σ K)]
[(ev (clos (begin EXP EXP_1) ρ) σ K)
(ev (begin (↓ EXP ρ) (↓ EXP_1 ρ)) σ K)]
[(ev (clos MODREF ρ) σ K)
(ev MODREF σ K)]
[(ev (@ D_1 D_2 ... LAB) σ K)
(ev D_1 σ_1 (APP () (D_2 ...) LAB a))
(where (a σ_1) (bind σ K))]
[(ev (@* D_1 D_2 ... LAB) σ K)
(ev D_1 σ_1 (APP* () (D_2 ...) LAB a))
(where (a σ_1) (bind σ K))]
[(ev (if D_1 D_2 D_3) σ K)
(ev D_1 σ_1 (IF D_2 D_3 a))
(where (a σ_1) (bind σ K))]
[(ev (let () D) σ K)
(ev D σ K)]
[(ev (let ((X D) (X_1 D_1) ...) D_n) σ K)
(ev D σ_1 (LET () X ((X_1 D_1) ...) D_n a))
(where (a σ_1) (bind σ K))]
[(ev (CON ρ <= LAB_1 LAB_2 V LAB_3 D) σ K)
(ev D σ_1 (CHECK CON ρ LAB_1 LAB_2 V LAB_3 a))
(where (a σ_1) (bind σ K))]
[(ev (begin D D_1) σ K)
(ev D σ_1 (BEGIN D_1 a))
(where (a σ_1) (bind σ K))]
[(ev (ANYCON ρ <= LAB_1 LAB_2 V LAB_3 D) σ K)
(ev D σ K)])
(define (ap Ms)
(define r
(union-reduction-relations v c c~ a d (m Ms) (m~ Ms)))
(reduction-relation
λCESK #:domain ς
(--> (ap D_redex σ K)
(gc-state (ev D_contractum σ_1 K))
(where (any_0 ... (any_name (D_contractum σ_1)) any_1 ...)
,(apply-reduction-relation/tag-with-names r (term (D_redex σ))))
(computed-name (term any_name)))))
(define co
(reduction-relation
λCESK #:domain ς
(--> (co (APP (V_1 ...) (D_1 D_2 ...) LAB a) V σ)
(gc-state (ev D_1 σ (APP (V_1 ... V) (D_2 ...) LAB a)))
co-next-@)
(--> (co (APP* (V_1 ...) (D_1 D_2 ...) LAB a) V σ)
(gc-state (ev D_1 σ (APP* (V_1 ... V) (D_2 ...) LAB a)))
co-next-@*)
(--> (co (APP (V_1 ...) () LAB a) V σ)
(gc-state (ap (@ V_1 ... V LAB) σ K))
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))
co-done-@)
(--> (co (APP* (V_1 ...) () LAB a) V σ)
(gc-state (ap (@* V_1 ... V LAB) σ K))
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))
co-done-@*)
(--> (co (IF D_1 D_2 a) V σ)
(gc-state (ap (if V D_1 D_2) σ K))
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))
co-done-if)
(--> (co (LET ((X_1 V_1) ...) X ((X_2 D_2) (X_3 D_3) ...) D_b a) V σ)
(gc-state (ev D_2 σ (LET ((X_1 V_1) ... (X V)) X_2 ((X_3 D_3) ...) D_b a)))
co-next-let)
(--> (co (LET ((X_1 V_1) ...) X () D_b a) V σ)
(gc-state (ap (let ((X_1 V_1) ... (X V)) D_b) σ K))
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))
co-done-let)
(--> (co (BEGIN D a) V σ)
(gc-state (ev D σ K))
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))
co-done-begin)
(--> (co (CHECK CON ρ LAB_1 LAB_2 V_1 LAB_3 a) V σ)
(gc-state (ap (CON ρ <= LAB_1 LAB_2 V_1 LAB_3 V) σ K))
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))
co-done-check)))
(define-metafunction λCESK
unload : ς -> (D σ)
[(unload (A σ)) (gc (A σ))]
[(unload (ap D σ K)) (gc ((stick D K σ) σ))]
[(unload (co K V σ)) (gc ((stick V K σ) σ))])
(test
(test-equal (term (unload ((-- (clos 0 (env))) (sto))))
(term ((-- (clos 0 (env))) (sto))))
(test-equal (term (unload (ap (clos 0 (env)) (sto) MT)))
(term ((clos 0 (env)) (sto))))
(test-equal (term (unload (co MT (-- (clos 0 (env))) (sto))))
(term ((-- (clos 0 (env))) (sto)))))
(define-metafunction λCESK
stick : D K σ -> D
[(stick D MT σ) D]
[(stick D (APP (V ...) (D_1 ...) LAB a) σ)
(stick (@ V ... D D_1 ... LAB) K σ)
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))]
[(stick D (APP* (V ...) (D_1 ...) LAB a) σ)
(stick (@* V ... D D_1 ... LAB) K σ)
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))]
[(stick D (IF D_1 D_2 a) σ)
(stick (if D D_1 D_2) K σ)
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))]
[(stick D (LET ((X V) ...) X_1 ((X_2 D_2) ...) D_1 a) σ)
(stick (let ((X V) ... (X_1 D) (X_2 D_2) ...) D_1) K σ)
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))]
[(stick D (BEGIN D_1 a) σ)
(stick (begin D D_1) K σ)
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))]
[(stick D (DEM CON a) σ)
(stick (dem CON D) K σ)
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))]
[(stick D (CHECK CON ρ LAB_1 LAB_2 V LAB_3 a) σ)
(stick (CON ρ <= LAB_1 LAB_2 V LAB_3 D) K σ)
(where (S_0 ... K S_1 ...)
(sto-lookup σ a))])
(test
(define D (term (clos 0 (env))))
(define D1 (term (clos 1 (env))))
(define D2 (term (clos 2 (env))))
(define V1 (term (-- (clos 1 (env)))))
(define V2 (term (-- (clos 2 (env)))))
(test-equal (term (stick ,D MT (sto)))
D)
(test-equal (term (stick ,D (APP (,V1 ,V2) (,D1 ,D2) f (loc a)) (sto [(loc a) (MT)])))
(term (@ ,V1 ,V2 ,D ,D1 ,D2 f)))
(test-equal (term (stick ,D (APP* (,V1 ,V2) (,D1 ,D2) f (loc a)) (sto [(loc a) (MT)])))
(term (@* ,V1 ,V2 ,D ,D1 ,D2 f)))
(test-equal (term (stick ,D (IF ,D1 ,D2 (loc a)) (sto [(loc a) (MT)])))
(term (if ,D ,D1 ,D2)))
(test-equal (term (stick ,D (LET ((x ,V1) (y ,V2)) z ((p ,D1)) ,D2 (loc a)) (sto [(loc a) (MT)])))
(term (let ((x ,V1) (y ,V2) (z ,D) (p ,D1)) ,D2)))
(test-equal (term (stick ,D (BEGIN ,D1 (loc a)) (sto [(loc a) (MT)])))
(term (begin ,D ,D1)))
(test-equal (term (stick ,D (DEM (∧) (loc a)) (sto [(loc a) (MT)])))
(term (dem (∧) ,D)))
(test-equal (term (stick ,D (CHECK (∧) (env) f g ,V1 h (loc a)) (sto [(loc a) (MT)])))
(term ((∧) (env) <= f g ,V1 h ,D))))
(define (CESK Ms)
(union-reduction-relations co (ap Ms)))
(define (CESK-run P)
(apply-reduction-relation* (CESK (program-modules P))
(term (inj ,(last P)))))
(define-syntax-rule (CESK-trace-it P . rest)
(traces (CESK (program-modules P))
(term (inj ,(last P)))
;; #:pred (colorize (program-modules P))
. rest)) | true |
a8a677709e0ce22cf923a78ba2c7697c0cc8eebe | ddae9f912790ca2fb5eb271ce54a156560ea526e | /cs275/lab3/3.3.rkt | 5427bdf170909595d02e0804441bde04b7325e97 | [] | no_license | cmccahil/Classwork | 489658e06a4f88ac56297a980494a0ced7613184 | 1ed775acfd6e0a9d511ad3bb795e76039d2fbb5a | refs/heads/master | 2020-07-31T18:22:26.034292 | 2020-01-27T19:26:21 | 2020-01-27T19:26:21 | 210,707,952 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 132 | rkt | 3.3.rkt | #lang racket
(define dot-product
(lambda (vec1 vec2)
(cond
((null? vec1) 0)
(else (apply + (map * vec1 vec2)))))) | false |
bc4b6000b3308eafc78e71775316a57672b4653d | 2653ce8a98566e4dde1ed9bc3831ce3c12fd6267 | /db.rkt | 70281816e3c0bc75bf6eba051ca78c9fd15155cf | [] | no_license | rfindler/fully-expanded-store | b2e22a0d63d1773eccaf1b2c34eda88f4f25607c | 974d0cedd79bbd8540b6ab3509debd61dcabe95b | refs/heads/main | 2023-03-21T06:05:25.432310 | 2021-03-09T23:01:36 | 2021-03-09T23:01:36 | 339,505,828 | 1 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 3,078 | rkt | db.rkt | #lang racket
(require db racket/runtime-path)
(provide
(contract-out
[set-mapping! (-> path-string? bytes? bytes? void?)]
[lookup (-> path-string? (or/c bytes? #f))]
[update-dependencies! (-> path-string? (listof bytes?) void?)]
[lookup-deps (-> path-string? (listof bytes?))])
in-db)
(define-runtime-path db.sqlite "db.sqlite")
(define-syntax-rule
(in-db stuff ...)
(in-db/proc (λ () stuff ...)))
(define current-conn (make-parameter #f))
(define (in-db/proc thunk)
(define conn #f)
(dynamic-wind
(λ () (set! conn (sqlite3-connect #:database db.sqlite)))
(λ () (parameterize ([current-conn conn])
;; start transaction(?)
(thunk)
;; end transaction(?)
))
(λ () (disconnect conn) (set! conn #f))))
(define (initialize-db)
(unless (file-exists? db.sqlite)
(define conn
(sqlite3-connect #:database db.sqlite #:mode 'create))
(query-exec
conn
"create table Files (file blob primary key, expanded blob, sha blob);")
(query-exec
conn
"create table Dependencies (requires blob, required blob);")
(disconnect conn)))
(define (set-mapping! filename bytes sha)
(define binding
(query
(get-conn)
"select expanded from Files where file = $1;"
(path->bytes filename)))
(cond
[(null? (rows-result-rows binding))
(query-exec
(get-conn)
"insert into Files(file, expanded, sha) values ($1,$2,$3);"
(path->bytes filename)
bytes
sha)]
[else
(query-exec
(get-conn)
"update Files set expanded = $2, sha = $3 where file = $1;"
(path->bytes filename)
bytes
sha)])
)
(define (update-dependencies! path deps)
(define path-bytes (path->bytes path))
(query-exec
(get-conn)
"delete from Dependencies where requires = $1;"
path-bytes)
(for ([dep (in-list deps)])
(query-exec
(get-conn)
"insert into Dependencies(requires, required) values ($1,$2);"
path-bytes
dep)))
(define (lookup filename)
(define the-rows
(rows-result-rows
(query
(get-conn)
"select expanded from Files where file = $1;"
(path->bytes filename))))
(cond
[(null? the-rows) #f]
[else
(define the-row (list-ref the-rows 0))
(vector-ref the-row 0)]))
(define (lookup-deps filename)
(define the-rows
(rows-result-rows
(query
(get-conn)
"select required from Dependencies where requires = $1;"
(path->bytes filename))))
(for/list ([a-row (in-list the-rows)])
(vector-ref a-row 0)))
(define (get-conn)
(define conn (current-conn))
(unless conn (error 'db.rkt "not in the dynamic-extent of in-db"))
conn)
(module+ main
(initialize-db)
(define tmp1.rkt (build-path "/Users/robby/tmp1.rkt"))
(define tmp2.rkt (build-path "/Users/robby/tmp2.rkt"))
(in-db
(set-mapping! tmp1.rkt #"abcdef" #"sha-abcdef")
(printf "~s\n" (lookup tmp2.rkt))
(printf "~s\n" (lookup tmp1.rkt))
(set-mapping! tmp1.rkt #"abcdefghi" #"sha-abcdefghi")
(printf "~s\n" (lookup tmp1.rkt))))
| true |
6e90323f32e289f68ef3823de5f104ff9a5ac6cc | 124646c7ed230bb411210eba42161da99cd1c3a3 | /16-ready-set-bang!.rkt | 6f191b71eb35bd7514ad097f6d2c23b1dd6f4ead | [] | no_license | lambdaydoty/the-seasoned-schemer | 5b5eae0be9b23ebcf00a03f5427354e1de4e4ab6 | bb13ff9aafd73d9b013c3ee2a0c3eae3e9aaa694 | refs/heads/master | 2020-08-12T10:40:30.991157 | 2020-04-01T10:55:33 | 2020-04-01T10:55:33 | 214,752,163 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 5,497 | rkt | 16-ready-set-bang!.rkt | #lang racket
(require "utils.rkt")
(provide (all-defined-out))
(require racket/trace)
(require rackunit)
(define sweet-tooth
(λ (food)
(list food 'cake)))
(define last 'angelfood)
(check-equal? (sweet-tooth 'chocolate) '(chocolate cake))
(check-equal? last 'angelfood)
(check-equal? (sweet-tooth 'fruit) '(fruit cake))
(check-equal? last 'angelfood)
; sweet-tooth `last`
(define sweet-toothL
(λ (food)
(set! last food)
(list food 'cake)))
(check-equal? (sweet-toothL 'chocolate) '(chocolate cake))
(check-equal? last 'chocolate)
(check-equal? (sweet-toothL 'fruit) '(fruit cake))
(check-equal? last 'fruit)
(check-equal? (sweet-toothL 'cheese) '(cheese cake))
(check-equal? (sweet-toothL 'carrot) '(carrot cake))
; sweet-tooth `remember`
(define ingredients '())
(define sweet-toothR
(λ (food)
(set! ingredients (cons food ingredients))
(list food 'cake)))
(check-equal? (sweet-toothR 'chocolate) '(chocolate cake))
(check-equal? ingredients '(chocolate))
(check-equal? (sweet-toothR 'fruit) '(fruit cake))
(check-equal? ingredients '(fruit chocolate))
(check-equal? (sweet-toothR 'cheese) '(cheese cake))
(check-equal? ingredients '(cheese fruit chocolate))
(check-equal? (sweet-toothR 'carrot) '(carrot cake))
(check-equal? ingredients '(carrot cheese fruit chocolate))
;
(define deep
(λ (m)
(cond [(zero? m) 'pizza]
[else (list (deep (sub1 m)))])))
(check-equal? (deep 3) '(((pizza))))
(check-equal? (deep 7) '(((((((pizza))))))))
(check-equal? (deep 0) 'pizza)
; deep `rembmer`
(define Ns '()) ; `n`s
(define Rs '()) ; `R`esults
(define deepR
(λ (n)
(let ([result (deep n)])
(set! Rs (cons result Rs))
(set! Ns (cons n Ns))
result)))
(check-equal? (deepR 3) '(((pizza))))
(check-equal? Ns '(3))
(check-equal? Rs '((((pizza)))))
(check-equal? (deepR 5) '(((((pizza))))))
(check-equal? Ns '(5 3))
(check-equal? Rs '((((((pizza))))) (((pizza)))))
(check-equal? (deepR 3) '(((pizza))))
(check-equal? Ns '(3 5 3))
(check-equal? Rs '((((pizza))) (((((pizza))))) (((pizza)))))
;
(define find
(λ (n Ns Rs)
(letrec ([A (λ (ns rs)
(cond [(= (car ns) n) (car rs)]
[else (A (cdr ns) (cdr rs))]))])
(A Ns Rs))))
(check-equal? (find 3 Ns Rs) '(((pizza))))
(check-equal? (find 5 Ns Rs) '(((((pizza))))))
; deep `memorized`
(define deepM
(λ (n)
(if (member? n Ns)
(find n Ns Rs)
(deepR n))))
(check-equal? Ns '(3 5 3))
(check-equal? Rs '(
(((pizza)))
(((((pizza)))))
(((pizza)))
))
(set! Ns (cdr Ns))
(set! Rs (cdr Rs))
(check-equal? Ns '(5 3))
(check-equal? Rs '(
(((((pizza)))))
(((pizza)))
))
; mutual recursions of deepM & deep
(set! deepM
(λ (n)
(if (member? n Ns)
(find n Ns Rs)
(let ([result (deep n)])
(set! Rs (cons result Rs))
(set! Ns (cons n Ns))
result))))
(check-equal? (deepM 6) '((((((pizza)))))))
(set! deep
(λ (m)
(cond [(zero? m) 'pizza]
[else (list (deepM (sub1 m)))])))
(check-equal? (deepM 9) '(((((((((pizza))))))))))
(check-equal? Ns '(9 8 7 6 5 3))
; fix deepM by the 16th Commandment
(set! deepM
(let ([Rs '()]
[Ns '()])
(λ (n)
(if (member? n Ns)
(find n Ns Rs)
(let ([result (deep n)])
(set! Rs (cons result Rs))
(set! Ns (cons n Ns))
result)))))
(check-equal? (deepM 16) '((((((((((((((((pizza)))))))))))))))))
(set! find
(λ (n Ns Rs)
(letrec ([A (λ (ns rs)
(cond [(null? ns) #f]
[(= (car ns) n) (car rs)]
[else (A (cdr ns) (cdr rs))]))])
(A Ns Rs))))
(set! deepM
(let ([Rs '()]
[Ns '()])
(λ (n)
(let ([exists (find n Ns Rs)])
(if (atom? exists)
(let ([result (deep n)])
(set! Rs (cons result Rs))
(set! Ns (cons n Ns))
result)
exists)))))
; length
(define length
(λ (l)
(match l
[`() 0]
[`(,x ,_l ...) (add1 (length _l))])))
(check-equal? (length '(1 2 3 4 5 6 7)) 7)
(set! length
(let ([h #f])
(set! h
(λ (l)
(match l
[`() 0]
[`(,x ,_l ...) (add1 (h _l))])))
h))
(check-equal? (length '(1 2 3 4 5 6 7)) 7)
;
; ## The 17th Commandment (final ver.)
;
; > Use `(set! x ...) for `(let ([x ...]) ...)` only if there is
; > at least one `(λ ...` between it and the `(let ...)`, or if
; > the new value for `x` is afunction that refers to `x`.
;
(define L
(λ (length)
(λ (l)
(match l
[`() 0]
[`(,x ,_l ...) (add1 (length _l))]))))
(set! length
(let ([h #f])
(set! h
(L (λ (x) (h x))))
h))
(check-equal? (length '(1 2 3 4 5 6 7)) 7)
; Y! and Y-bang
(define Y!
(λ (L)
(let ([h #f])
(set! h
(L (λ (x) (h x))))
h)))
(define Y-bang
(λ (f)
(letrec
([h (f (λ (x) (h x)))])
h)))
; define length by Y!
(set! length (Y! L))
(check-equal? (length '(1 2 3 4 5 6 7)) 7)
; define length by Y-bang
(set! length (Y-bang L))
(check-equal? (length '(1 2 3 4 5 6 7)) 7)
;
(define D
(λ (depth*)
(λ (s)
(cond [(null? s) 1]
[(atom? (car s)) (depth* (cdr s))]
[else (max (add1 (depth* (car s)))
(depth* (cdr s)))]))))
| false |
750588c3989603db2ac2b554ee36421ef3381d94 | 81ce75c94ec8628cab507770464d7295471462f6 | /sorting/quicksort.rkt | c3cc3a9411764e00e89651666271fdd8cc0b74a9 | [] | no_license | micahcantor/the-algorithm-design-manual | afca2ccdef053201992ad47bd4e034fc0939e15d | 94db6a0b6e0c8c69472addce07b1421a11555762 | refs/heads/master | 2023-05-29T18:47:27.219415 | 2021-06-06T06:01:13 | 2021-06-06T06:01:13 | 359,877,712 | 1 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 823 | rkt | quicksort.rkt | #lang racket/base
(require racket/match)
;;; Partition lst in two, elements that are less than the head
;;; and those that are not. Then recursively sort each side,
;;; appending the result together.
(define (quicksort lst <?)
(match lst
[(list) null]
[(cons head tail)
(define-values (left right)
(partition (λ (n) (<? n head))
tail))
(append (quicksort left <?)
(list head)
(quicksort right <?))]))
;;; Partition lst into elements which pass pred?
;;; and elements that don't
(define (partition pred? lst)
(let loop ([yes null] [no null] [lst lst])
(match lst
[(list) (values yes no)]
[(cons head tail)
(if (pred? head)
(loop (cons head yes) no (cdr lst))
(loop yes (cons head no) (cdr lst)))])))
| false |
125fa957285347160ae570e2630894ef59dde353 | f116e7f063fd4e0c0cb53f34350c258674f7fa59 | /analyze.rkt | c75574ae1ec3fc4a0d5a177023db97ffc4f8c29f | [] | no_license | racket-dep-fixer/drdr | b2ef62f23054878cafce6ef48e6dc6c7547c8b90 | f34e88a151316eaf0850c407ec5871cf6edd352c | refs/heads/master | 2021-01-15T20:19:16.033472 | 2015-09-08T15:43:41 | 2015-09-08T15:43:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 14,524 | rkt | analyze.rkt | #lang racket/base
(require racket/match
racket/file
racket/list
racket/function
racket/contract/base
racket/bool
"diff.rkt"
"scm.rkt"
"list-count.rkt"
"notify.rkt"
"cache.rkt"
"dirstruct.rkt"
"status.rkt"
"metadata.rkt"
"path-utils.rkt"
"rendering.rkt")
(provide (all-from-out "rendering.rkt"))
;; Email
(require net/sendmail
"formats.rkt")
(define list@
(match-lambda
[(and c (cons x y))
(if (lc-zero? x)
empty
(list c))]))
(define (list-limit l n)
(for/list ([e (in-list l)]
[i (in-range n)])
e))
(define responsible-ht-id->str
#hasheq([timeout . "Timeout"]
[unclean . "Unclean Exit"]
[stderr . "STDERR Output"]
[changes . "Changes"]))
(define responsible-ht-severity
'(timeout unclean stderr changes))
(define (rev->responsible-ht rev)
(define log-dir (revision-log-dir rev))
(define top-analyze
(parameterize ([cache/file-mode 'no-cache]
[current-rev rev])
(dir-rendering log-dir)))
(rendering->responsible-ht rev top-analyze))
(define (rendering->responsible-ht rev top-analyze)
(match-define
(struct rendering (_ _ _ timeout unclean stderr _ changes))
top-analyze)
(statuses->responsible-ht rev timeout unclean stderr changes))
(define (statuses->responsible-ht rev timeout unclean stderr changes)
(parameterize ([current-rev rev])
(define log-dir (revision-log-dir rev))
(define base-path
(rebase-path log-dir "/"))
(define responsible->problems (make-hash))
(for ([lc (in-list (list timeout unclean stderr changes))]
[id (in-list responsible-ht-severity)])
(for ([pp (in-list (lc->list lc))])
(define p (bytes->string/utf-8 pp))
(define bp (base-path p))
(for ([responsible
(in-list
(rendering-responsibles (log-rendering p)))])
(hash-update!
(hash-ref! responsible->problems responsible make-hasheq)
id
(curry list* bp)
empty))))
responsible->problems))
(define (2hash-copy ht)
(define 2ht (make-hash))
(for ([(r ht) (in-hash ht)])
(hash-set! 2ht r (hash-copy ht)))
2ht)
(define (responsible-ht-difference old new)
(let ([ht (2hash-copy new)])
(for ([(r rht) (in-hash old)])
(define nrht (hash-ref! ht r make-hash))
(for ([(id ps) (in-hash rht)])
(hash-update! nrht id
(curry remove* ps)
empty)
(when (zero? (length (hash-ref nrht id)))
(hash-remove! nrht id)))
(when (zero? (hash-count nrht))
(hash-remove! ht r)))
ht))
(define responsible-ht/c
(hash/c string? (hash/c symbol? (listof path?))))
(define (responsible-ht->status-ht diff)
(for/hash ([id (in-list responsible-ht-severity)])
(define id-l
(for*/list ([(_ ht) (in-hash diff)]
[f (in-list (hash-ref ht id empty))])
f))
(values id (remove-duplicates id-l))))
(provide/contract
[rendering->responsible-ht
(exact-positive-integer? rendering? . -> . responsible-ht/c)]
[statuses->responsible-ht
(exact-positive-integer? list/count list/count list/count list/count . -> . responsible-ht/c)]
[responsible-ht-severity (listof symbol?)]
[responsible-ht-id->str (hash/c symbol? string?)]
[responsible-ht-difference (responsible-ht/c responsible-ht/c . -> . responsible-ht/c)])
(define ERROR-LIMIT 50)
(define (notify cur-rev
start end
duration
timeout unclean stderr changes)
(define abs-dur (- end start))
(define nums
(map lc->number
(list timeout unclean stderr changes)))
(define totals
(apply
format
"(timeout ~a) (unclean ~a) (stderr ~a) (changes ~a)"
(map number->string nums)))
(define (path->url pth)
(format "http://drdr.racket-lang.org/~a~a" cur-rev pth))
(define responsible-ht
(statuses->responsible-ht
cur-rev
timeout
unclean
stderr
changes))
(define responsibles
(for/list ([(responsible ht) (in-hash responsible-ht)]
#:when (ormap (curry hash-has-key? ht)
(take responsible-ht-severity 3)))
(match responsible
["nobody" "drdr-nobody"]
[x x])))
(define committer
(with-handlers ([exn:fail? (lambda (x) #f)])
(scm-commit-author
(read-cache*
(revision-commit-msg cur-rev)))))
(define diff
(with-handlers ([exn:fail? (lambda (x) #t)])
(define old (rev->responsible-ht (previous-rev)))
(responsible-ht-difference old responsible-ht)))
(define include-committer?
(and ; The committer can be found
committer
; There is a condition
(not (empty? responsibles))
; It is different from before
(hash? diff)
(for*/or ([(r ht) (in-hash diff)]
[(id ps) (in-hash ht)])
(and
(for/or ([p (in-list ps)])
(not (rendering-random?
(log-rendering
(build-path* (revision-log-dir cur-rev)
p)))))
(not (symbol=? id 'changes))))))
(define mail-recipients
(remove-duplicates
(append (if include-committer?
(list committer)
empty)
responsibles)))
; Send messages to everyone...
(unless (andmap zero? nums)
(for ([r (in-list mail-recipients)])
(send-mail-message
"[email protected]"
(format "[DrDr] R~a ~a"
cur-rev totals)
(cond
[(equal? "" r)
(list "[email protected]")]
[(regexp-match (regexp-quote "@") r)
(list r)]
[else
(list (format "[email protected]" r))])
empty empty
(flatten
(list (format "DrDr has finished building push #~a after ~a."
cur-rev
(format-duration-ms abs-dur))
""
(format "http://drdr.racket-lang.org/~a/"
cur-rev)
""
(if (and include-committer? (equal? committer r))
(list
(format "Push #~a (which you did) contained a NEW condition that may need inspecting." cur-rev)
(let ([diff-smash (responsible-ht->status-ht diff)])
(for/list ([(id paths) (in-hash diff-smash)]
#:when (not (symbol=? id 'changes)))
(if (empty? paths)
empty
(list (format " ~a" id)
(for/list ([f (in-list paths)]
[i (in-range ERROR-LIMIT)]
#:when (not
(rendering-random?
(log-rendering
(build-path*
(revision-log-dir cur-rev)
f)))))
(format " ~a" (path->url f)))
""))))
"")
empty)
(if (hash-has-key? responsible-ht r)
(list* "A file you are responsible for has a condition that may need inspecting."
(for/list ([(id files) (in-hash (hash-ref responsible-ht r))]
#:when (not (symbol=? id 'changes)))
(list (format " ~a:" id)
(for/list ([f (in-list files)]
[i (in-range ERROR-LIMIT)])
(format " ~a" (path->url f)))
""))
"")
empty))))))
; Send message to IRC
(send-mail-message "[email protected]"
(format "http://drdr.racket-lang.org/~a/"
cur-rev)
(list "[email protected]")
empty empty
(list* (format " (abs ~a) (sum ~a) ~a"
(format-duration-ms abs-dur)
(format-duration-ms duration)
totals)
(if (empty? responsibles)
empty
(list (apply string-append (add-between responsibles " ")))))))
; End Email
(define (build-path* x y)
(bytes->path
(bytes-append (path->bytes x)
(path->bytes y))))
(define (trunk-path pth)
(define rev (current-rev))
((rebase-path (revision-log-dir rev) (revision-trunk-dir rev))
pth))
(define (analyze-path pth dir?)
(define rev (current-rev))
(define log-dir (revision-log-dir rev))
(define analyze-dir (revision-analyze-dir rev))
(define the-analyze-path
((rebase-path log-dir analyze-dir) pth))
(if dir?
(build-path the-analyze-path "index.analyze")
(path-add-suffix the-analyze-path ".analyze")))
(define (analyze-revision cur-rev)
(cache/file/timestamp
(build-path (revision-dir cur-rev) "analyzed")
(lambda ()
(match (analyze-logs cur-rev)
[(struct rendering (start end duration timeout unclean stderr _ changes))
(notify cur-rev
start end
duration
timeout unclean stderr changes)]
[#f
(void)])
(safely-delete-directory (revision-trunk-dir cur-rev))
(void))))
(define (analyze-logs rev)
(define log-dir (revision-log-dir rev))
(define analyze-dir (revision-analyze-dir rev))
(make-directory* analyze-dir)
(parameterize ([current-rev rev])
(dir-rendering log-dir #:committer? #t)))
(define (log-rendering log-pth)
(if (or #t (file-exists? log-pth))
(cache/file
(analyze-path log-pth #f)
(lambda ()
#;(notify! "Analyzing log: ~S" log-pth)
(match (read-cache log-pth)
[(? eof-object?)
#f]
[(and log (struct status (start end command-line output-log)))
(define dur (status-duration log))
(define any-stderr? (ormap stderr? output-log))
(define random? (calculate-random? output-log))
(define changed?
(if (and (previous-rev)
(not random?))
(with-handlers ([exn:fail?
;; This #f means that new files are
;; NOT considered changed
(lambda (x) #f)])
(define prev-log-pth
((rebase-path (revision-log-dir (current-rev))
(revision-log-dir (previous-rev)))
log-pth))
(log-different? output-log
(status-output-log (read-cache prev-log-pth))))
#f))
(define responsible
(or (calculate-responsible output-log)
""))
(define lc
(list (path->bytes log-pth)))
(make-rendering.v2
start end dur
(if (timeout? log) lc empty)
(if (exit? log)
(if (zero? (exit-code log)) empty lc)
empty)
(if any-stderr? lc empty)
responsible
(if changed? lc empty)
random?)])))
#f))
(define (dir-rendering dir-pth
#:committer? [committer? #f])
(if (or #t (directory-exists? dir-pth))
(cache/file
(analyze-path dir-pth #t)
(lambda ()
(notify! "Analyzing dir: ~S" dir-pth)
(foldl (lambda (sub-pth acc)
(define pth (build-path dir-pth sub-pth))
(define directory? (directory-exists? pth))
(define (next-rendering)
(if directory?
(dir-rendering pth)
(log-rendering pth)))
(match (next-rendering)
[#f
acc]
[(and n
(struct rendering
(pth-start pth-end pth-dur pth-timeouts
pth-unclean-exits pth-stderrs pth-responsible
pth-changed)))
(match acc
[#f n]
[(struct rendering
(acc-start acc-end acc-dur acc-timeouts
acc-unclean-exits acc-stderrs acc-responsible
acc-changed))
(make-rendering.v2
(min pth-start acc-start)
(max pth-end acc-end)
(+ pth-dur acc-dur)
(lc+ pth-timeouts acc-timeouts)
(lc+ pth-unclean-exits acc-unclean-exits)
(lc+ pth-stderrs acc-stderrs)
(responsible-append pth-responsible
acc-responsible)
(lc+ pth-changed acc-changed)
(or (rendering-random? n)
(rendering-random? acc)))])]))
(make-rendering.v2
+inf.0 -inf.0 0
empty empty empty
(or
(and committer?
(with-handlers ([exn:fail? (lambda (x) #f)])
(scm-commit-author
(read-cache
(revision-commit-msg (current-rev))))))
"")
empty
#f)
(directory-list* dir-pth))))
#f))
(provide/contract
[analyze-revision (exact-nonnegative-integer? . -> . void)]
[analyze-logs (exact-nonnegative-integer? . -> . void)]
[log-rendering (path-string? . -> . (or/c rendering? false/c))]
[dir-rendering (path-string? . -> . (or/c rendering? false/c))])
| false |
223ab52012cc7b0f1fa0a70f81e9df529328680c | 25a6efe766d07c52c1994585af7d7f347553bf54 | /gui-lib/racket/gui.rkt | 58531f478675927ee93d01e414e199491af4a5d2 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | racket/gui | 520ff8f4ae5704210822204aa7cd4b74dd4f3eef | d01d166149787e2d94176d3046764b35c7c0a876 | refs/heads/master | 2023-08-25T15:24:17.693905 | 2023-08-10T16:45:35 | 2023-08-10T16:45:35 | 27,413,435 | 72 | 96 | NOASSERTION | 2023-09-14T17:09:52 | 2014-12-02T03:35:22 | Racket | UTF-8 | Racket | false | false | 124 | rkt | gui.rkt | (module gui racket
(require racket/gui/base)
(provide (all-from-out racket)
(all-from-out racket/gui/base)))
| false |
069846ff89a55b35a568252e368923777bea4f0c | 5130312f0f3831ada0801a5b73995c9c501d15f7 | /ex/reflect-distance.rkt | 6126d32a59e8e163cd72a6bb6cf6889006af44c5 | [
"Apache-2.0"
] | permissive | zen3d/ruckus | 5f6ee5f03d764332a889ac7d64e56c11613847f7 | 45c5928376092ca911afabfba73af28877c87166 | refs/heads/master | 2020-04-13T17:23:24.756503 | 2018-12-28T00:36:06 | 2018-12-28T00:36:06 | 163,346,905 | 5 | 0 | NOASSERTION | 2018-12-28T00:14:11 | 2018-12-28T00:14:11 | null | UTF-8 | Racket | false | false | 694 | rkt | reflect-distance.rkt | #lang ruckus
(require ruckus/core/math)
; This (somewhat contrived) example demonstrates the use of reflect-distance
; by surrounding a cube by spheres that graze its faces. The design reflects
; on one of its parts to determine the geometry of other parts, a limited form
; of constraint-based design.
(define (the-cube)
(cube 300))
(define (sphere-cage spacing)
(define distance-to-cube-from (reflect-distance (the-cube)))
(for* ([x '(-1 0 1)]
[y '(-1 0 1)]
[z '(-1 0 1)])
(let ([coord (vec3 (* x spacing) (* y spacing) (* z spacing))])
(at coord
(sphere #:radius (distance-to-cube-from coord))))))
(the-cube)
(color 'red (sphere-cage 200))
| false |
51a6d160d0a4b69faf48ced5a6dbc81860f55e68 | 5236257ca2743b4f6a1446234404218af5c263c1 | /paper-program1.rkt | 0963ce8f4d3f2146ffbbce39c716d7205b9b9a21 | [] | no_license | spall/paper-tree | 4d6a84239fe27a8e93b47edd2d6477dcde4ffc85 | 1c562e919a4e41f240d82efe39ccfb9f06c9f726 | refs/heads/master | 2016-09-13T14:48:25.444497 | 2016-05-04T04:23:34 | 2016-05-04T04:23:34 | 56,183,715 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,152 | rkt | paper-program1.rkt | #lang s-exp "paper-language.rkt"
(define-paper paper1
(make-bib
#:title "Reference: Racket"
#:author (authors "Matthew Flatt" "PLT")
#:date "2010"
#:location (techrpt-location #:institution "PLT Inc."
#:number "PLT-TR-2010-1")
#:url "http://racket-lang.org/tr1/"))
(define-paper paper2
(make-bib
#:title "Racket"
#:author (authors "Matthew Flatt" "PLT")
#:date "2011"
#:location (techrpt-location #:institution "PLT Inc."
#:number "PLT-TR-2010-1")
#:url "http://racket-lang.org/tr1/"))
(define-paper paper4
(make-bib
#:title "Racketeering"
#:author (authors "Matthew Flatt")
#:date "2015"
#:location (techrpt-location #:institution "PLT Inc."
#:number "PLT-TR-2015-1")
#:url "http://racket-lang.org/tr1/"))
(define-graph author-graph authors (list "Matthew Flatt"));; take all of the nodes in the current graph and draw edges between the nodes which share the author(s)
(displayln author-graph)
(draw-graph author-graph)
;;(draw-graph)
| false |
b7d75eecae884393416e1b2daff1bbf1e2002928 | e59c43242b5c41c538d725180a1e57e0254981dc | /morsel-lib/private/essence/pass-injections.rkt | 3381fd54c1f2a6ab9c2e3fdcd2a94cefebe45273 | [
"MIT"
] | permissive | default-kramer/morsel | 9722ded5160740da1e8024b6722a7816637d29c2 | 10cf376f07755f066cbbfc2d242c104f103b33da | refs/heads/master | 2020-12-04T05:33:11.252802 | 2020-06-22T02:10:49 | 2020-06-22T02:10:49 | 231,633,877 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 9,420 | rkt | pass-injections.rkt | #lang racket
(provide calc-injections ; (-> token procedure?)
might-need-injection?
injection? injection-index injection-grouped-join)
(require "model.rkt" "pass.rkt")
; The `calc-injections` pass explores the object and returns a procedure that
; 1) when given a join, returns a list of tokens that should be injected
; 2) when given anything else, returns (or/c #f injection?)
; The SQL renderer uses #1 to add `select` clauses to the join
; The SQL renderer uses #2 to know whether a given token should be replaced by a token
; that refers to an additional `select` clauses from #1.
; We also provide `(might-need-injection? token)` which can quickly say "no, that token
; does not need injection, save yourself the time" which should be faster than the dict
; lookup that would otherwise be needed.
;
; Note that there is a certain "globalness" to this problem - the number of tokens
; that needs to be injected into a join depends on stuff *outside* of that join.
; So it is not possible to make "injections" a property of a join.
; Instead, the injection-registry is a property of any root object.
; An `injection` is
; index : an integer which says "I am the Nth injection into that grouped join"
(struct injection (index grouped-join) #:transparent)
; An `injection-registry` is
; join=>tokens : dictionary that maps a grouped join to a unique list of tokens that
; need to be injected into that grouped join
; token=>injection : dictionary that maps a token to an injection
; Both dictionaries are mutable; we will build them up as we explore.
(struct injection-registry (join=>tokens token=>injection) #:transparent)
(define (new-injection-registry)
(injection-registry (make-hash) (make-hash)))
(define current-injection-registry (make-parameter #f))
; Given a join, return the list of tokens to be injected.
; Given anything else, return (or/c #f injection?)
(define (injection-registry-lookup reg x)
(cond
[(join? x)
(reverse (dict-ref (injection-registry-join=>tokens reg) x (list)))]
[else
(dict-ref (injection-registry-token=>injection reg) x #f)]))
(define aspect-key:might-need-injection (gensym 'might-need-injection))
(define (might-need-injection? x)
(and (token? x)
(get-token-aspect x aspect-key:might-need-injection #f)))
; Mutates the current injection-registry to record the fact that the given
; token should be injected into the given grouped join.
(define (register! token grouped-join)
(set-token-aspect! token aspect-key:might-need-injection #t)
(let* ([registry (or (current-injection-registry)
(error "morsel bug 9gf42as"))]
[join=>tokens (injection-registry-join=>tokens registry)]
[join-tokens (dict-ref! join=>tokens grouped-join (list))])
(if (member token join-tokens)
(void) ; already registered
(let ([index (length join-tokens)]
[token=>injection (injection-registry-token=>injection registry)])
(dict-set! join=>tokens grouped-join (cons token join-tokens))
(dict-set! token=>injection token (injection index grouped-join))))))
; ===
; Aggregate Injection
; ===
; When we see an aggregate, we begin a new agg-tracker
; targets : mutable list of grouped joins this aggregate is targeting
; When we are done, we hope to see one unique grouped join in the list of targets.
(struct agg-tracker (targets) #:transparent #:mutable)
(define (new-agg-tracker)
(agg-tracker (list)))
(define agg-tracker-stack (make-parameter '()))
(define-step (step:agg x)
(cond
[(aggregate-injectable? x)
(let ([tracker (new-agg-tracker)])
(parameterize ([agg-tracker-stack (cons tracker (agg-tracker-stack))])
(next x))
; check if the tracker found exactly 1 target
(let ([targets (remove-duplicates (agg-tracker-targets tracker))])
(match targets
[(list grouped-join)
(register! x grouped-join)]
[else (void)])))]
[(grouped-join? x)
(let* ([stack (agg-tracker-stack)]
[tracker (and (pair? stack) (car stack))])
(if (not tracker)
(next x)
(begin
; add this grouped join to the current tracker
(set-agg-tracker-targets! tracker
(cons x (agg-tracker-targets tracker)))
; pop the current tracker off the stack
(parameterize ([agg-tracker-stack (cdr stack)])
(next x)))))]
[else (next x)]))
; ===
; Scalar Injection
; ===
; When we encounter a scalar, we might start a new scalar-inject-tracker to keep track
; of whether that scalar can be injected. A scalar-inject-tracker is
; grouped-join : the join that we are proposing to inject into
; has-selfref? : a boolean that tracks whether we have seen a self reference (from #f to #t)
; could-inject? : a boolean that tracks if any content prevents injection (from #t to #f)
; We mutate this as we explore the content of the scalar.
(struct scalar-inject-tracker (grouped-join has-selfref? could-inject?) #:transparent #:mutable)
(define (new-si-tracker grouped-join)
(scalar-inject-tracker grouped-join #f #t))
; stack of scalar-inject-tracker
(define sit-stack (make-parameter (list)))
(define (can-inject? tracker)
(and (scalar-inject-tracker-has-selfref? tracker)
(scalar-inject-tracker-could-inject? tracker)))
; Suppress all the proposed injections in the stack
(define (suppress!)
(for ([sit (sit-stack)])
(set-scalar-inject-tracker-could-inject?! sit #f)))
; Is it possible that this scalar might need injection?
(define (should-track-scalar-injection? x)
(and (scalar-injectable? x)
(in-join-clause?)
(in-grouped-join?)))
; All tuples within the scalar must be "resolved". A tuple is resolved if it was created
; by 1) the target grouped join, or 2) a simple join within the target. Example:
#;(from a "A"
; This (attach b ....) is the target grouped join:
(attach b "B"
(group-by (scalar b".Foo"))
; this scalar is not eligible because `a` is unresolved:
(join-on (scalar a".Foo")" = 0")
; this scalar is eligible because `b` is resolved:
(join-on (scalar b".Foo")" = 0")
; this scalar is eligible because `b` and `c` are both resolved:
(join-on (scalar (join c "C" #:to b
(join-on c".CID = "b".CID"))
".Foo")
" = 0")))
(define (resolved? tuple target ctx-stack)
(if (not (pair? ctx-stack))
#f
(let* ([head (car ctx-stack)]
[head (context-base-query head)])
(cond
[(eq? (tuple-query tuple) head)
; resolved because we found the join that introduced this tuple
#t]
[(eq? target head)
; unresolved because we reached the target and should not go higher
#f]
[else
(resolved? tuple target (cdr ctx-stack))]))))
; Mutate the tracker stack if the given content affects the proposed injections
(define (check-tuple! tuple)
; The grouped join should be the same throughout the stack, so just grab the first one.
(define gj (and (pair? (sit-stack))
(let ([sit (car (sit-stack))])
(scalar-inject-tracker-grouped-join sit))))
(when gj
(cond
[(equal? (tuple-query tuple) gj)
(for ([si-tracker (sit-stack)])
(set-scalar-inject-tracker-has-selfref?! si-tracker #t))]
[(not (resolved? tuple gj (context-stack)))
(suppress!)]
[else (void)])))
(define-step (step:scalar x)
(cond
; A scalar containing a simple join could still be injectable...
[(simple-join? x)
(next x)]
; ... but any other kind of base-query is not allowed
[(base-query? x)
(begin
; We don't actually *need* to suppress here. It is valid SQL to inject a
; self-contained subquery. But that could get very confusing.
; So suppress for now, and revisit if any real-world need appears.
(suppress!)
; We need to begin a new sit-stack
(parameterize ([sit-stack (list)])
(next x)))]
[(should-track-scalar-injection? x)
(let* ([grouped-join (context-base-query (car (context-stack)))]
[tracker (new-si-tracker grouped-join)])
(parameterize ([sit-stack (cons tracker (sit-stack))])
(next x)
(when (can-inject? tracker)
(register! x grouped-join)
; Because we are injecting x, we want to suppress everything else up the stack
(suppress!))))]
[(tuple? x)
(begin
(check-tuple! x)
(next x))]
[else
(next x)]))
; ===
; wire up scalar and aggregate injection
; ===
(define aspect-key:injections (gensym 'injections))
(define pass:calc-injections (steps->pass step:scalar step:agg))
(define (calc-injections token)
(let ([cached (get-token-aspect token aspect-key:injections #f)])
(or cached
(let ([reg (new-injection-registry)])
(parameterize ([current-injection-registry reg])
(pass:calc-injections token)
(let ([the-proc (curry injection-registry-lookup reg)])
(set-token-aspect! token aspect-key:injections the-proc)
the-proc))))))
| false |
cad8e0409db6e09c3413e90fbf3c8b4e355ae50f | 8a3ecae10d8cb1d0b3daeb7dce09c182d83cdd79 | /syntax-warn-cli/warn/private/config.rkt | 223427ad2d2c57a0ab3a1c6926f41cf056389e98 | [
"MIT"
] | permissive | jackfirth/syntax-warn | 2b6c3d7b684d3b3f705a738dc693a8882b3756f1 | f17fdd3179aeab8e5275a24e7d091d3ca42960a9 | refs/heads/master | 2020-12-24T06:46:55.112588 | 2019-12-07T05:06:04 | 2019-12-07T05:06:04 | 56,571,931 | 8 | 6 | null | 2017-08-16T21:07:10 | 2016-04-19T06:47:10 | Racket | UTF-8 | Racket | false | false | 2,102 | rkt | config.rkt | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[config-args
(->* () (#:suppress (listof symbol?) #:unsuppress (listof symbol?))
config-args?)]
[config-args? predicate/c]
[config-args->config (-> config-args? warning-config?)]
[submod-args
(->* () (#:name (or/c symbol? #f) #:binding (or/c symbol? #f)) submod-args?)]
[submod-args? predicate/c]
[submod-args-name (-> submod-args? symbol?)]
[submod-args-binding (-> submod-args? symbol?)]
[submod-args-config
(-> (or/c module-path? resolved-module-path? module-path-index?)
submod-args?
warning-config?)]))
(require racket/function
syntax/warn)
(module+ test
(require rackunit))
(struct config-args
(suppressed-names unsuppressed-names)
#:transparent
#:omit-define-syntaxes
#:constructor-name make-config-args)
(define (config-args #:suppress [suppressed '()]
#:unsuppress [unsuppressed '()])
(make-config-args suppressed unsuppressed))
(struct submod-args
(binding name)
#:transparent
#:omit-define-syntaxes
#:constructor-name make-submod-args)
(define (submod-args #:binding [binding #f] #:name [name #f])
(make-submod-args (or binding 'config) (or name 'warning-config)))
(module+ test
(test-case "config-submod-args"
(check-equal? (submod-args) (make-submod-args 'config 'warning-config))
(check-equal? (submod-args #:binding 'foo #:name 'bar)
(make-submod-args 'foo 'bar))))
(define (submod-args-config modpath config-args)
(define submod-name (submod-args-name config-args))
(define submod-binding (submod-args-binding config-args))
(with-handlers ([exn:fail? (const empty-warning-config)])
(dynamic-require (list 'submod modpath submod-name)
submod-binding
(thunk empty-warning-config))))
(define (config-args->config args)
(define suppressed (apply suppress (config-args-suppressed-names args)))
(define unsuppressed (apply unsuppress (config-args-unsuppressed-names args)))
(warning-config-merge suppressed unsuppressed))
| true |
56a330939d20186a9360d96a107d7d21c9f79465 | ddcff224727303b32b9d80fa4a2ebc1292eb403d | /2. Building Abstractions with Data/2.3/2.62.rkt | 0342b995fd85e82360a4bea89b6dddc4f93a2413 | [] | no_license | belamenso/sicp | 348808d69af6aff95b0dc5b0f1f3984694700872 | b01ea405e8ebf77842ae6a71bb72aef64a7009ad | refs/heads/master | 2020-03-22T02:01:55.138878 | 2018-07-25T13:59:18 | 2018-07-25T13:59:18 | 139,345,220 | 1 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 340 | rkt | 2.62.rkt | #lang racket
(define (union-set s1 s2)
(match (cons s1 s2)
[(cons '() _) s2]
[(cons _ '()) s1]
[(cons (cons x xs)
(cons y ys))
(cond
[(= x y) (cons x (union-set xs ys))]
[(x . < . y) (cons x (union-set xs s2))]
[else (cons y (union-set s1 ys))])]))
(union-set '(1 3 6 10) '(1 2 5 6 13))
| false |
75ebc0cb424a24ffc955f5b9719bb5bad25d186a | 2b1821134bb02ec32f71ddbc63980d6e9c169b65 | /lisp/racket/SPD/2/employees-starter.rkt | 7a95bdade74f07e6761434b63da7648ef83358cc | [] | no_license | mdssjc/study | a52f8fd6eb1f97db0ad523131f45d5caf914f01b | 2ca51a968e254a01900bffdec76f1ead2acc8912 | refs/heads/master | 2023-04-04T18:24:06.091047 | 2023-03-17T00:55:50 | 2023-03-17T00:55:50 | 39,316,435 | 3 | 1 | null | 2023-03-04T00:50:33 | 2015-07-18T23:53:39 | Java | UTF-8 | Racket | false | false | 1,564 | rkt | employees-starter.rkt | ;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname employees-starter) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
;; employees-starter.rkt
;; =================
;; Data definitions:
;
; PROBLEM A:
;
; You work in the Human Resources department at a ski lodge.
; Because the lodge is busier at certain times of year,
; the number of employees fluctuates.
; There are always more than 10, but the maximum is 50.
;
; Design a data definition to represent the number of ski lodge employees.
; Call it Employees.
;
;; Employees is Natural(10, 50]
;; interp. number of employees (more than 10 and maximum is 50)
(define E1 11)
(define E2 25)
(define E3 50)
#;
(define (fn-for-employees e)
(... e))
;; Template rules used:
;; - atomic non-distinct: Integer(10, 50]
;; =================
;; Functions:
;
; PROBLEM B:
;
; Now design a function that will calculate the total payroll for the quarter.
; Each employee is paid $1,500 per quarter. Call it calculate-payroll.
;
;; Employees -> Number
;; Produce the total payroll for the quarter based on $1,500/employee
(check-expect (calculate-payroll 11) (* 11 1500))
(check-expect (calculate-payroll 25) (* 25 1500))
(check-expect (calculate-payroll 50) (* 50 1500))
;(define (calculate-payroll e) 0.0) ; Stub
(define (calculate-payroll e)
(* e 1500))
| false |
09ad9b927bf77cac544289f64ad542fcc84fcc42 | 28990d7da0bb83f550e5ec9b3efc3c78aba03b22 | /private/player.rkt | 2aa66f12877322f4f8605d1a9e7b6c43aebf3b8e | [
"Apache-2.0"
] | permissive | samdphillips/mushell | 651b95fd84470346920219c3a66756cc9592ba5b | 71e1abf1f062fbc370a373dc3463f60eeb2a53e1 | refs/heads/main | 2023-03-16T11:56:05.979684 | 2021-03-15T17:51:17 | 2021-03-15T17:51:17 | 342,438,883 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 3,477 | rkt | player.rkt | #lang racket/base
(require racket/match
racket/place
net/url
ffi/unsafe
ffi/unsafe/port
"announcements.rkt"
"gstreamer.rkt")
(provide make-player
player-subscribe!
player-state
set-player-state!
set-player-track!
player-msg?
player-msg-timestamp
(struct-out player-eos-msg)
(struct-out player-state-changed-msg)
(struct-out player-tags-msg))
(struct player [gst-element announcer bus-thread])
(define (make-player)
(unless gst_init?
(gst_init_check))
(define playbin (gst_element_factory_make "playbin" #f))
(define bus-thread (thread (lambda () (run-bus-thread ply))))
(define ply (player playbin (make-announcer) bus-thread))
ply)
(struct player-msg (timestamp) #:transparent)
(struct player-eos-msg player-msg () #:transparent)
(struct player-state-changed-msg player-msg (old new pending) #:transparent)
(struct player-tags-msg player-msg (tags) #:transparent)
(define (gst-message->player-message msg)
(match (GstMessage-type msg)
['GST_MESSAGE_STATE_CHANGED
;; XXX: should these state values be converted from GST values?
(define-values (old new pending) (gst_message_parse_state_changed msg))
(player-state-changed-msg (GstMessage-timestamp msg) old new pending)]
['GST_MESSAGE_TAG
(player-tags-msg (GstMessage-timestamp msg) (convert-gst-tags-message msg))]
['GST_MESSAGE_EOS
(player-eos-msg (GstMessage-timestamp msg))]
[x x]))
;; For now we'll just deal with this set of string valued tags
(define player-tags
'("album" "artist" "genre" "title"))
(define (convert-gst-tags-message msg)
(define taglist (gst_message_parse_tag msg))
(dynamic-wind
void
(lambda ()
(for/hash ([tag (in-list player-tags)])
(values tag (gst_tag_list_get_string taglist tag))))
(lambda ()
(gst_tag_list_unref taglist))))
(define (player-message-evt ply)
(guard-evt
(lambda ()
(define bus
(gst_element_get_bus
(player-gst-element ply)))
(handle-evt
(unsafe-fd->evt (gst_bus_get_pollfd bus) 'read)
(lambda (e)
(define msg
(gst_bus_pop bus))
(cond
[msg (define new-msg (gst-message->player-message msg))
(gst_message_unref msg)
new-msg]
[else #f]))))))
(define (run-bus-thread ply)
(sync
(handle-evt (player-message-evt ply)
(lambda (msg)
(when msg
(announcer-announce (player-announcer ply) msg))
(run-bus-thread ply)))))
(define (player-subscribe! ply selector action)
(define sub (subscription 50 #f selector action))
(announcer-add-subscription! (player-announcer ply) sub))
(define (player-state ply)
(define-values (status state pending-state)
(gst_element_get_state (player-gst-element ply) 0))
(match state
['GST_STATE_NULL 'pause]
['GST_STATE_READY 'pause]
['GST_STATE_PAUSED 'pause]
['GST_STATE_PLAYING 'play]))
(define (set-player-state! ply new-state)
(define new-gst-state
(match new-state
['play 'GST_STATE_PLAYING]
['pause 'GST_STATE_PAUSED]
['null 'GST_STATE_NULL]))
(gst_element_set_state (player-gst-element ply) new-gst-state))
(define (set-player-track! ply url)
(g_object_set (cast (player-gst-element ply) _GstElement _GObject)
"uri" _string/utf-8 (url->string url)))
| false |
4566ce2b6a5ce8e4e5db106163e1165bcec74b9a | a8fd8f18ee59d371858f24283af71b6860d272a3 | /racket/ambient/lang/reader.rkt | d5f060b4cd9c49d64effe88fd524d9bb6e1bf581 | [] | no_license | johankj/shill | b011c5976671c95e44dab23ec162936a21f51b9c | d0391602af9c71fe13971b8b71ec57640e0971ef | refs/heads/master | 2020-03-17T14:06:11.941749 | 2018-02-02T09:08:08 | 2018-06-13T11:03:40 | 133,658,303 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 512 | rkt | reader.rkt | #lang s-exp syntax/module-reader
shill/ambient/main
#:read (lambda ([in (current-input-port)]) (this-read-syntax #f in))
#:read-syntax this-read-syntax
#:whole-body-readers? #t
#:info get-info
#:language-info '#(shill/ambient/language-info get-language-info #f)
(require shill/ambient/parse)
(define (this-read-syntax [src #f] [in (current-input-port)])
(parse-program src in))
(define (get-info s default filter)
(cond [(equal? s 'color-lexer) color-lexer]
[else (filter s default)]))
| false |
993da19a723c9c19def6db6e4fc2c80b47ed283d | 0cbf2786da37f8e7965f6dafdf2bc762c6806a52 | /3.59 q.rkt | a741ed0fae7645940676058ecd5fff11075272fe | [] | no_license | arbores/SICP | 3e0f18662610ea0dca6d85ac69cef569033c5a39 | 69ea1ccadf3a33e3d7e2669ef627b9653503192d | refs/heads/master | 2021-01-19T18:03:43.792241 | 2014-09-18T02:50:50 | 2014-09-18T02:50:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 851 | rkt | 3.59 q.rkt | (define tmp-op1 (current-output-port))
(current-output-port (open-output-string))
(load "3.5.2.rkt")
(current-output-port tmp-op1)
(define (integrate-series s)
(stream-map / s integers))
(define exp-series
(stream-cons 1 (integrate-series exp-series)))
(define cosine-series
(stream-cons 1 (stream-map - (integrate-series sine-series))))
(define sine-series
(stream-cons 0 (integrate-series cosine-series)))
(define (exec-commands commands)
(for-each (lambda (command)
(printf "> ~a\n" command)
(with-handlers ([exn:fail:user? (lambda (e) (print e))])
(display (eval command))
(newline)))
commands))
(exec-commands
'((stream-head (integrate-series ones) 10)
(stream-head exp-series 10)
(stream-head cosine-series 10)
(stream-head sine-series 10)
)) | false |
85dd362897d9010ab66d2f33839b14e94cae9c4a | eb87c8b1ce8591d207643d3924b7939228f1a4fe | /pj-7.1/src/import-tsv.rkt | 23034fea99e546926d6fe7b0c003f428f1737320 | [] | no_license | brownplt/insta-model | 06543b43dde89913c219d476ced0f51a439add7b | 85e2c794ec4b1befa19ecb85f2c8d2509ec8cf42 | refs/heads/main | 2023-08-30T19:06:58.083150 | 2023-05-03T18:53:58 | 2023-05-10T22:29:18 | 387,500,638 | 5 | 0 | null | 2022-04-23T23:06:52 | 2021-07-19T14:53:09 | Racket | UTF-8 | Racket | false | false | 3,545 | rkt | import-tsv.rkt | #lang racket/base
;; Import .tsv data from this folder.
;; (The data is originally from the SP team.)
;;
;; Usage:
;; racket import-tsv.rkt <file.tsv>
;;
;; Prints a TeX version of the file.
;; ---
(provide
tex-escape)
(require
racket/list
racket/string)
(define (parse tsv)
(with-input-from-file
tsv
(lambda ()
(for/list ((ln (in-lines)))
(tab-split ln)))))
(define (tab-split str)
(string-split str "\t"))
(define (comma-split str)
(string-split str ","))
(define (space-join str*)
(string-join str* " "))
(define (print-tex v**)
(if (= 2 (length (car v**)))
(print2 v**)
(printN+ v**)))
(define (print2 v**)
(printf "\\begin{tabular}{ll}~n")
(print-first-row (map colname (car v**)))
(for ((v* (in-list (cdr v**))))
(define-values [tt0 tt1] (format-title2 (car v*)))
(define-values [cm0 cm1]
(let ((cm (cadr v*))
(N (string-length "time ./python -X jit -X jit-list-file=Tools/benchmarks/jitlist_richards_static.txt -X jit-enable-jit-list-wildcards")))
(if (< (string-length cm) N)
(values (format-cmd cm) "")
(values (format-cmd (substring cm 0 N))
(format-cmd (substring cm N))))))
(print-row (list tt0 cm0))
(print-row (list tt1 cm1))
(void))
(printf "\\end{tabular}~n")
(void))
(define (printN+ v**)
(define max-cols 6)
(let loop ((v** v**))
(cond
[(<= (length (car v**)) max-cols)
(printN v**)]
[else
(define-values [fst* rst*]
(for/lists (_1 _2)
((v* (in-list v**)))
(split-at v* max-cols)))
(printN fst*)
(newline)
(loop rst*)])))
(define (printN v**)
(printf "\\begin{tabular}{~a}~n" (make-string (length (car v**)) #\r))
(define-values [fst* snd*]
(for/lists (_1 _2)
((v (in-list (car v**))))
(format-title2 v)))
(print-row fst*)
(print-first-row snd*)
(for ((v* (in-list (cdr v**))))
(print-row (map format-num v*)))
(printf "\\end{tabular}~n")
(void))
(define (colname str)
(format "\\colname{~a}" str))
(define (format-title str)
(define-values [kind bm opt*]
(let* ((m (regexp-match #rx"^([^ ]+) ([^(]*)\\(([^)]*)\\)$" str)))
(if m
(values (cadr m)
(let ((s (string-trim (caddr m))))
(and (< 0 (string-length s)) s))
(map string-trim (comma-split (cadddr m))))
(raise-arguments-error 'format-title "failed to parse" "str" str))))
(define k+ (colname (simpl kind)))
(define o+ (space-join (map colname opt*)))
(if bm
(format "~a ~a (~a)" bm k+ o+)
(format "~a (~a)" k+ o+)))
(define (format-title2 str)
(let ((s* (string-split (format-title str) " (")))
(values (car s*) (string-append "(" (cadr s*)))))
(define (format-cmd str)
(format "\\texttt{~a}" (tex-escape str)))
(define (tex-escape str)
(string-replace str "_" "\\_"))
(define (format-num str)
(format "$~a$" str))
(define (simpl str)
(case str
(("TypedOpt") "T-Max")
(("Typed" "TypedMinOpt" "TypedBasic") "T-Min")
(("TypedBasic2") "T-Min-2")
(("Original") "Orig")
(else (raise-argument-error 'simpl "Carl-name" str))))
(define (print-row str* [extra-tail ""])
(displayln (string-append " " (string-join str* " & ") " \\\\" extra-tail)))
(define (print-first-row str*)
(print-row str* "\\hline"))
(module+
main
(require racket/cmdline)
(command-line
#:program "import-tsv"
#:args (tsv)
(print-tex (parse tsv))))
| false |
c2ee541366e0972b3fd02595233bf805b205ab97 | f1b9ad04e782a5cd14591e3e0b4daafbe2508a69 | /fast-sequence-lib/info.rkt | 96fd01a5b86d3fd3cbbc0900401ea22af3b02e5b | [] | no_license | abolotina/fast-sequence-combinators | 65ad75e4699fc2a9561c075d645d1a18c686a938 | c94b3668494a1c06029f5f62eb666ce3049d0dff | refs/heads/master | 2022-07-03T22:36:18.687647 | 2022-05-31T18:03:53 | 2022-05-31T18:03:53 | 240,076,257 | 7 | 2 | null | 2022-05-31T18:03:54 | 2020-02-12T17:44:14 | Racket | UTF-8 | Racket | false | false | 241 | rkt | info.rkt | #lang info
;; ========================================
;; pkg info
(define collection "fast-sequence")
(define deps
'(["base" #:version "7.4"]))
;; ========================================
;; collect info
(define name "fast-sequence")
| false |
bff5df687f75d0e4db1316aa5a89ed5c67d426b9 | 300e6d41be257872562c2bc177f05bba4592cdb6 | /rocket.rkt | 26421e3902c26fdc02a8f710faf1d417f7b0e685 | [] | no_license | ruliana/cisp | cb08de9f287739a1c00b59c695b8ca45c9c62451 | 6eaa42ab916075d779412aab5d8b1489046d6b1f | refs/heads/master | 2021-07-10T05:45:22.906251 | 2017-10-07T14:09:32 | 2017-10-07T14:09:32 | 106,103,077 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 5,348 | rkt | rocket.rkt | #lang racket/base
; Those are libraries, functions and macros I use on my own projects
(require (for-syntax racket/base
syntax/parse)
racket/function
racket/match
threading
racket/string
racket/format
racket/generator
racket/dict
racket/set
data/collection
match-plus
(only-in racket/list
remove-duplicates
empty))
(provide (all-from-out racket/base
racket/function
racket/match
racket/string
racket/format
racket/generator
racket/set
threading
data/collection)
empty
remove-duplicates
(all-defined-out))
; == Language extensions
; "define" replacement for variable assignment
(define-syntax (given stx)
(syntax-parse stx #:literals (list)
[(_ [(list binds:id ...) exp:expr] rest ...)
#'(begin (match-define (list binds ...) exp) (given rest) ...)]
[(_ [bind:id exp:expr] rest ...)
#'(begin (define bind exp) (given rest) ...)]
[(_ [(binds:id ...) exp:expr] rest ...)
#'(begin (define-values (binds ...) exp) (given rest) ...)]))
; procfy
; Make values acts as procs
(define/match ((λ= value) other)
[((? hash?) _) (hash-ref value other other)]
[((? sequence?) _) (index-of value other)]
[(_ _) (equal? value other)])
(define (filter-map proc seq)
(~>> seq (map proc) (filter identity)))
(define-syntax-rule (define~> (name args ...) body ...)
(define (name args ... last-arg) (~> last-arg body ...)))
(define-syntax-rule (define~>> (name args ...) body ...)
(define (name args ... last-arg) (~>> last-arg body ...)))
(define-syntax-rule (define-with data (lets procs) ...)
(define-values (lets ...) (values (curry procs data) ...)))
(define (vector-allocate size elem)
(vector->immutable-vector (make-vector size elem)))
(define (nth* seq . indexes)
(map (curry nth seq) indexes))
(define (join separator seq)
(define (join* seq rslt)
(if (empty? seq) rslt
(join* (rest seq) (string-append rslt separator (first seq)))))
(if (empty? seq) ""
(join* (rest seq) (first seq))))
; Inclusive range =)
(define (from-to n1 n2)
(if (<= n1 n2)
(in-generator
#:arity 1
(let loop ([current n1])
(when (<= current n2)
(yield current)
(loop (add1 current)))))
(in-generator
#:arity 1
(let loop ([current n1])
(when (>= current n2)
(yield current)
(loop (sub1 current)))))))
; Collections
(define (sum seq #:key [key identity])
(for/sum ([it (in seq)]) (key it)))
(define (in-head-x-tail seq)
(in-generator
#:arity 3
(let loop ([head #()]
[x (first seq)]
[tail (rest seq)])
(yield head x tail)
(unless (empty? tail)
(loop (conj head x) (first tail) (rest tail))))))
; Iterator for N dicts, at each iteration a key and list
; of values is given. The list of values are the ones
; found under the same key in all dicts. If any doesn't
; have the key, the "on-failure" value is given in the
; result.
(define (in-dicts dicts [on-failure #f])
(define keys (list->set (apply append (map dict-keys dicts))))
(in-generator
#:arity 2
(for ([k keys])
(let ([vs (for/list ([d dicts]) (dict-ref d k on-failure))])
(yield k vs)))))
(define ((dict-merger updater [on-failure #f]) . dicts)
(for/hash ([(k vs) (in-dicts dicts on-failure)])
(values k (apply updater vs))))
; Matrix
(struct matrix (row col data) #:transparent)
(define (make-matrix row col)
(matrix row col (make-vector (* col row) 0.0)))
(define (matrix-ref a-matrix row col)
(define-values (data index)
(matrix-data/index a-matrix row col))
(vector-ref data index))
(define (matrix-set! a-matrix row col value)
(define-values (data index)
(matrix-data/index a-matrix row col))
(vector-set! data index value))
(define/match* (matrix-data/index (matrix _ col-size data) row col)
(values data (+ row (* col col-size))))
(define/match (in-matrix . args)
[((list (and a-matrix (matrix row col data)))) (in-matrix a-matrix 0 0)]
[((list (matrix row col data) r-origin c-origin))
(in-generator
#:arity 3
(for ([v (in-vector data)]
[i (in-naturals)])
(define-values (c r) (quotient/remainder i col))
(yield (- r r-origin) (- c c-origin) v)))])
(define/match* (matrix-convolution matrix-a matrix-b)
(given (row-a (matrix-row matrix-a))
(col-a (matrix-col matrix-a))
(rslt (make-matrix row-a col-a)))
(for* ([ra (in-range row-a)]
[ca (in-range col-a)])
(define new-value
(for/sum ([(rb cb vb) (in-matrix matrix-b 1 1)]
#:when (and (< -1 (+ ra rb) row-a)
(< -1 (+ ca cb) col-a)))
(* vb (matrix-ref matrix-a (+ ra rb) (+ ca cb)))))
(matrix-set! rslt ra ca new-value))
rslt)
(define/match* (matrix-display (matrix row col data) format-proc)
(for ([r (in-range row)])
(define line
(for/list ([c (in-range col)])
(format-proc (vector-ref data (+ r (* c col))))))
(displayln (join " | " line))))
| true |
b1d5739430b6de1b859bfba492b340c58dc22633 | 3906b8b073a874350da8914107909a90f87f282f | /digitama/exchange/base.rkt | 11bf2edd1b8c8d9855933bb47828b2d88848e240 | [] | no_license | wargrey/schema | 7d99e4f513b6bac5e35d07d19d1e638972c7aad0 | 860a09a23a01104432be6b990a627afe9d752e66 | refs/heads/master | 2023-07-07T15:39:11.744020 | 2023-06-30T16:33:13 | 2023-06-30T16:33:13 | 76,066,993 | 6 | 2 | null | 2021-04-17T23:30:43 | 2016-12-09T20:14:41 | Racket | UTF-8 | Racket | false | false | 1,820 | rkt | base.rkt | #lang typed/racket/base
(provide (all-defined-out))
(require racket/list)
(require "../misc.rkt")
(define-type Schema-Serialize (-> Symbol (Listof Symbol) (Listof Any) Any))
(define-type Schema-Deserialize (-> Symbol Bytes (Listof Symbol) (Listof (-> Any)) (Listof Any)))
(define check-constraint : (-> Symbol Symbol (Listof Symbol) (Listof Any) (Listof Any) (Listof Any) Void)
(lambda [func table fields literals contracts givens]
(when (memq #false contracts)
(define expected : (Listof Any)
(for/list ([result (in-list contracts)]
[expected (in-list literals)]
#:when (not result))
expected))
(define ?fields : (Listof Symbol) (remove-duplicates (filter symbol? (flatten expected))))
(define given : HashTableTop
(for/hasheq ([f (in-list fields)]
[v (in-list givens)]
#:when (memq f ?fields))
(values f v)))
(schema-throw [exn:schema 'contract `((struct . ,table) (expected . ,expected) (given . ,given))]
func "constraint violation"))))
(define check-default-value : (All (a) (-> Symbol Symbol (U a Void) a))
(lambda [func field defval]
(when (void? defval) (error func "missing value for field '~a'" field))
defval))
(define check-example : (-> Any (-> (Listof Any)) (Listof Any))
(lambda [example mkdefval]
(cond [(null? example) (mkdefval)]
[(list? example) example]
[else (list example)])))
(define field-value : (All (a b c) (-> Symbol Symbol (Option a) (-> a b) (U b Void) (-> (U c Void)) (U b c)))
(lambda [func field self table-field value mkdefval]
(cond [(not (void? value)) value]
[(not self) (check-default-value func field (mkdefval))]
[else (table-field self)])))
| false |
8334df41663b0e731c75efa5366abc84fbc34b74 | 8c057232ff842447f184cc19ddde93626373da30 | /private/text.rkt | 850aa6dc7316b9cb4ef6ca15a9b532c2e812a9d9 | [] | no_license | AlexKnauth/talk-typer | 7816541e4222b35b5fa8f4f5bf920d551b781334 | 24c5779e4d5b9548f96ac66d7c638c9bef0e7428 | refs/heads/master | 2020-05-01T02:41:47.388425 | 2015-10-13T16:05:00 | 2015-10-13T16:05:00 | 177,225,992 | 0 | 0 | null | 2019-03-23T00:32:56 | 2019-03-23T00:32:55 | null | UTF-8 | Racket | false | false | 4,512 | rkt | text.rkt | #lang racket/gui
(require framework)
(define-syntax-rule (cons! x id)
(set! id (cons x id)))
(define-syntax-rule (rest! id)
(let ([tmp (first id)])
(set! id (rest id))
tmp))
(define on-local-char/c
(->m (is-a?/c key-event%) void?))
(define on-paint/c
(->m any/c (is-a?/c dc<%>) real? real? real? real? real? real?
(or/c (one-of/c 'no-caret 'show-inactive-caret 'show-caret)
(cons/c natural-number/c natural-number/c))
void?))
(provide/contract
[talk-typer<%> interface?]
[talk-typer-mixin
(-> (class/c
(inherit insert)
(super on-local-char on-paint))
(class/c
[on-paint on-paint/c]
[on-local-char on-local-char/c]
(override [on-paint on-paint/c]
[on-local-char on-local-char/c])
[talk-typer? (->m boolean?)]
[toggle-talk-typer! (->m any/c)]
[talk-typer-load-buffer! (->m any/c)]))])
(define talk-typer<%>
(interface ()
talk-typer?
toggle-talk-typer!
talk-typer-load-buffer!))
(define-local-member-name super-on-local-char)
(define talk-typer-mixin
(λ (cls)
(class* cls (talk-typer<%>)
(super-new)
;; ==== private state ====
(define off-delegate (new off-delegate% [sup this]))
(define input-delegate (new input-delegate% [sup this]))
(define delegate off-delegate)
;; ==== public state & accessors ====
(define/public-final (talk-typer?) (send delegate insert-mode?))
(define/public-final (toggle-talk-typer!)
(set-delegate!
(if (send delegate insert-mode?) off-delegate input-delegate)))
(define/public-final (talk-typer-load-buffer!)
(send delegate get-buffer!))
;; ==== local methods ====
(define/public (super-on-local-char event)
(super on-local-char event))
;; ==== overrides ====
(define/override (on-local-char event)
(send delegate handle-char event))
;; private methods
(define/private (set-delegate! d)
(set! delegate d)
(send delegate enable!)))))
(define delegate<%>
(interface ()
enable!
handle-char
insert-mode?
record-mode?
get-buffer!))
(define off-delegate%
(class* object% (delegate<%>)
[init-field sup]
(define/public (enable!) (void))
(define/public (handle-char evt)
(send sup super-on-local-char evt))
(define/public (insert-mode?) #f)
(define/public (record-mode?) #f)
(define/public (get-buffer!) (void))
(super-new)))
(define input-delegate%
(class* object% (delegate<%>)
(super-new)
[init-field sup]
;; ==== private fields ====
;; (U #f (List Char)
;; invar: either both are lists, or both are false
(define talk-next-buffer #f)
(define talk-prev-buffer #f)
;; ==== overrides ====
(define/public (enable!)
(unless talk-next-buffer
(get-buffer!)))
(define/public (handle-char event)
(unless (null? talk-next-buffer)
(do-key event)))
(define/public (insert-mode?) #t)
(define/public (record-mode?) #f)
(define/public-final (get-buffer!)
(define path (finder:get-file #f "Select TalkType Source File"))
(and path (do-load-buffer! path)))
;; ==== private functionality ====
(define (do-load-buffer! path)
(set! talk-next-buffer
(file->list path read-char #:mode 'text))
(set! talk-prev-buffer null))
(define (do-key event)
(case (send event get-key-code)
;; todo backspace
[(#\backspace)
(prev-char!)
(send sup super-on-local-char event)]
[(up down left right)
(send sup super-on-local-char event)]
[(release) (void)]
[else (insert-chars!)]))
(define (insert-chars!)
(define c (get-next-char))
(when c
(send sup insert c)
(next-char!)
(when (and (whitespace? c)
(whitespace? (get-next-char)))
(insert-chars!))))
(define (get-next-char)
(and (not (null? talk-next-buffer))
(first talk-next-buffer)))
(define (next-char!)
(define x (rest! talk-next-buffer))
(cons! x talk-prev-buffer))
(define (prev-char!)
(unless (null? talk-prev-buffer)
(define x (rest! talk-prev-buffer))
(cons! x talk-next-buffer)))
(define (whitespace? c)
(case c
[(#\tab #\space #\newline #\linefeed
#\return #\vtab #\page)
#t]
[else #f]))))
| true |
6a19ff2829b768b6e10fb3782ec62847476f8e08 | 62982bc890932a9e787233fefac86075fab0abbb | /tests/program-overflow-1/program.rkt | be1b7500fe518e00bca8dda5f79fc5268752e9aa | [] | no_license | bldl/erda | 3a9fb7af0233b3bac4adaa99392d427a5cfe2b42 | c4cead322b4161307d1548ba3e3ceaaac73150ec | refs/heads/master | 2021-01-10T14:13:47.905628 | 2016-10-13T18:25:06 | 2016-10-13T18:25:06 | 44,308,332 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 868 | rkt | program.rkt | #lang erda/cxx
#|
Integer operations that detect overflow.
|#
(require (only-in racket/base = + - *))
(define #:type Int #:: ([foreign int]))
(declare (= x y)
#:: ([foreign equ] ^(-> Int Int Bool)))
(declare (+ x y) #:direct
#:: ([foreign add] ^(-> (<> Result Int) (<> Result Int) (<> Result Int))))
(declare (- x y) #:direct
#:: ([foreign sub] ^(-> (<> Result Int) (<> Result Int) (<> Result Int))))
(declare (* x y) #:direct
#:: ([foreign mul] ^(-> (<> Result Int) (<> Result Int) (<> Result Int))))
(define (twice x) #:: (export)
(* 2 x))
(define (squared x) #:: (export)
(* x x))
(define (pow3 x) #:: (export)
(* (* x x) x))
(define (add-is-mul x y) #:: (export)
(= (+ x y) (* x y)))
(define (add-is-sub x y) #:: (export)
(= (+ x y) (- x y)))
(define (add-is-sub-is-mul x y) #:: (export)
(and (add-is-mul x y) (add-is-sub x y)))
| false |
f5f063dcc88b6e69ce0d339a6a59b139c78e1c70 | 435734fea3031191e9e00d5d54d8b14d7b01ee48 | /racket/problem_set1_goldbach.rkt | 82dd9e5990fa56687472ccf1407a9e5cf226a4c9 | [] | no_license | sumansourabh26/everyday_codes | 1f4bc4b05fdb51512b68c37371933535d90edf10 | 2a8c097adbb64d103dc823bdb9987e99dfd9943b | refs/heads/master | 2020-05-04T15:22:13.872019 | 2014-11-05T16:11:08 | 2014-11-05T16:11:08 | 17,599,784 | 1 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 344 | rkt | problem_set1_goldbach.rkt | #lang racket
(define (check_prime n)
(check1 n 2 1))
(define (check1 a b c)
(cond((= c 0) #f)
((= b (- a 1)) #t)
(else (check1 a (+ b 1) (remainder a b)))))
(define (goldbach a)
(goldbach1 a 2))
(define(goldbach1 a b)
(if (and (check_prime b) (check_prime (- a b)))
(cons b (- a b))
(goldbach1 a (+ b 1)))) | false |
ae57c72ca42dd7c62f1fec58f8ee864db9c2fb21 | c6fbb0051333f65103e1643a238c250578b70b60 | /dict-closure.rkt | 9c663ddb73981ba46eac72f47ea484b29842a63d | [] | no_license | yashgupta-7/ETAI_Decrypting_Strategy | 4199a54fb76d87f69f634c6641341684992ab5e0 | 5e37f6e54dd5fbc3dab7fd9e9a1376687a9ac037 | refs/heads/master | 2020-07-23T06:52:49.044945 | 2019-09-10T06:46:12 | 2019-09-10T06:46:12 | 207,479,108 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 6,502 | rkt | dict-closure.rkt | #lang racket
;;;;LC
(define-syntax lc
(syntax-rules (: <- @)
[(lc expr : var <- drawn-from) (map (lambda (var) expr) drawn-from)]
[(lc expr : @ guard) (if guard (list expr) `())]
[(lc expr : @ guard qualifier ...)
(append* (lc (lc expr : qualifier ...) : @ guard))]
[(lc expr : var <- drawn-from qualifier ...)
(append* (lc (lc expr : qualifier ... ) : var <- drawn-from))]))
;;;;;;;;;;;;;
;; You can require more modules of your choice.
(require racket/list
racket/string
(prefix-in utils: "utils.rkt")
(prefix-in stats: "statistics.rkt")
(prefix-in strat: "strategies.rkt")
(prefix-in SWE:"secret-word-enumeration.rkt"))
(provide dictionary-closure)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Dictionary Closure ;;
;; ================== ;;
;; ;;
;; A choice of substitution can really trigger more substitutions by looking at the ;;
;; partially decrypted text - surely there will be some words which can be uniquely ;;
;; determined using the dictionary. It is prudent to concretize this "choice" as ;;
;; this purely deterministic (involving absolutely no guess-work). In more ;;
;; technical terms, this is called "maintaining arc-consistency" (look it up on ;;
;; Wikipedia). ;;
;; ;;
;; This function must utilise the dictionary and the cipher-word-list. Decrypt each ;;
;; word (`utils:decrypt`) and check if the dictionary has: ;;
;; ;;
;; 1. a unique completetion! ;;
;; - Extend your key using the information with this match. Continue exploring ;;
;; the words under the extended key. ;;
;; 2. many completions. ;;
;; - Do nothing, just continue exploring the words under the same key. If none ;;
;; of the words fall into (1), return with the key that you have built so far. ;;
;; 3. no completions! ;;
;; - Return `#f` (false), indicating that this partial key is wrong, and we must ;;
;; revert to the original key. ;;
;; ;;
;; Returns either of: ;;
;; a. a (possibly) extended-key. ;;
;; b. `#f` if this key led to case (3) for some word. ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (dictionary-closure key)
(let* ((part-decode-ciphertext (utils:decrypt key utils:ciphertext))
(p-decode-cipher-word-list (utils:cipher-word-list-f part-decode-ciphertext)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(begin (displayln p-decode-cipher-word-list) (displayln new-key)
(define (word-iterator pd-word-list current-key original-key)
(if (null? pd-word-list)
;(let ((swe (SWE:secret-word-enumeration current-key))) (if swe swe (original-key)))
current-key
(match (word-completion (car pd-word-list) utils:dictionary)
[(cons a '()) (if (andmap (lambda(x) (stats:is-uppercase-letter? x)) (string->list (utils:decrypt current-key (car pd-word-list)))) (word-iterator (cdr pd-word-list) current-key original-key) (start-again (car pd-word-list) a current-key))];;unique
[(cons a b) (word-iterator (cdr pd-word-list) current-key original-key)];;multiple
['() #f])));;no completion
(define (start-again cipherword plainword ckey)
(define n-key (utils:add-substitution (remove-duplicates (filter (lambda (x) (not (equal? (car x) (cdr x)))) (map cons (string->list plainword) (string->list cipherword)))) ckey))
(word-iterator p-decode-cipher-word-list n-key key))
(word-iterator p-decode-cipher-word-list key key)))
(define (word-completion word dict)
(word-completion-helper word dict '()))
(define (word-completion-helper cipherword pw-list l-acc)
(if (or (= (length l-acc) 2) (null? pw-list)) l-acc
(let ((pword (word-match cipherword (car pw-list)))) (if pword (word-completion-helper cipherword (cdr pw-list) (cons pword l-acc))
(word-completion-helper cipherword (cdr pw-list) l-acc)))))
(define (word-match cipherword plainword)
(if (not (equal? (string-length cipherword) (string-length plainword))) #f
(let* ((lcw (string->list cipherword))
(lpw (string->list plainword))
(lmap (map cons lpw lcw)))
(if (findf (lambda (x) (and (not (equal? (car x) (cdr x))) (stats:is-uppercase-letter? (cdr x)))) lmap) #f
(let ((lmap2 (remove-duplicates lmap)))
(if (locally-consistent lmap2) plainword #f))))))
(define (locally-consistent substitution)
(not (or
(check-duplicates (for/list ([subst-pair substitution])
(car subst-pair)))
(check-duplicates (for/list ([subst-pair substitution])
(cdr subst-pair))))))
;;;
(define empty-key (build-list 26 (lambda (_) #\_)))
| true |
5113e063529df1586a26657e982faafc30a3dc6b | 9c36ed1e52d7712599a8cb0e80fd5ac94d328bd3 | /src/syntax/syntax.rkt | df19470248a7f28c373bad726906fb6b734f66c7 | [
"MIT"
] | permissive | oflatt/herbie | e7db30968537f9b03430056408babbcca77f411f | cecba081914fb685fcd962a95c6d6fcaa7f063ad | refs/heads/master | 2021-07-30T03:37:47.191038 | 2021-07-23T19:10:19 | 2021-07-23T19:10:19 | 211,983,144 | 0 | 0 | NOASSERTION | 2019-10-01T00:26:43 | 2019-10-01T00:26:43 | null | UTF-8 | Racket | false | false | 24,688 | rkt | syntax.rkt | #lang racket
(require math/flonum math/base math/bigfloat math/special-functions rival)
(require "../common.rkt" "../interface.rkt" "../errors.rkt" "../float32.rkt" "types.rkt")
(provide constant? variable? operator? operator-info operator-exists?
constant-info get-operator-arity
get-parametric-operator parametric-operators parametric-operators-reverse
get-parametric-constant parametric-constants parametric-constants-reverse
*unknown-ops* *loaded-ops*
repr-conv? rewrite-repr-op? get-repr-conv)
(module+ internals
(provide operator-impls constant-impls infix-joiner
define-constant-impl define-operator-impl
register-constant-impl! register-operator-impl!
define-constant define-operator
register-constant! register-operator!))
;; The new, contracts-using version of the above
(define-syntax-rule (define-table name [field type] ...)
(define name (cons (list (cons 'field type) ...) (make-hasheq))))
(define (table-ref tbl key field)
(match-let ([(cons header rows) tbl])
(for/first ([(field-name type) (in-dict header)]
[value (in-list (hash-ref rows key))]
#:when (equal? field-name field))
value)))
(define (table-set! tbl key fields)
(match-let ([(cons header rows) tbl])
(define row (for/list ([(hkey htype) (in-dict header)]) (dict-ref fields hkey)))
(hash-set! rows key row)))
(define (table-remove! tbl key)
(hash-remove! (cdr tbl) key))
(define (table-ref-all tbl key)
(match-let ([(cons header rows) tbl])
(and (hash-has-key? rows key)
(map cons (map car header) (hash-ref rows key)))))
(define ((comparator test) . args)
(for/and ([left args] [right (cdr args)])
(test left right)))
(module+ test (require rackunit))
;; Abstract constant table
;; Implementations inherit attributes
(define-table constants
[bf (->* () bigvalue?)]
[ival (or/c (->* () ival?) #f)])
(define (register-constant! name attrib-dict)
(table-set! constants name (make-hasheq attrib-dict)))
(define-syntax-rule (define-constant name [key value] ...)
(register-constant! 'name (list (cons 'key value) ...)))
(define-constant PI
[bf (λ () pi.bf)]
[ival ival-pi])
(define-constant E
[bf (λ () (bfexp 1.bf))]
[ival ival-e])
(define-constant INFINITY
[bf (λ () +inf.bf)]
[ival (λ () (mk-ival +inf.bf))])
(define-constant NAN
[bf (λ () +nan.bf)]
[ival (λ () (mk-ival +nan.bf))])
(define-constant TRUE
[bf (const true)]
[ival (const (ival-bool true))])
(define-constant FALSE
[bf (const false)]
[ival (const (ival-bool false))])
;; Constant implementations
(define-table constant-impls
[type type-name?]
[bf (->* () bigvalue?)]
[fl (->* () value?)]
[ival (or/c (->* () ival?) #f)])
(define parametric-constants (hash))
(define parametric-constants-reverse (hash))
(define (constant-info constant field)
(with-handlers ([exn:fail?
(λ (e) (error 'constant-info "Unknown constant or field: ~a ~a"
constant field))])
(table-ref constant-impls constant field)))
(define (dict-merge dict dict2)
(for/fold ([dict dict]) ([(key value) (in-dict dict2)])
(dict-set dict key value)))
(define (register-constant-impl! constant name ctype attrib-dict)
(define default-attrib (table-ref-all constants constant))
(unless default-attrib
(error 'register-constant-impl! "Real constant does not exist: ~a" constant))
(define attrib-dict* (dict-merge default-attrib attrib-dict))
(table-set! constant-impls name
(make-hasheq (cons (cons 'type ctype) attrib-dict*)))
(set! parametric-constants
(hash-update parametric-constants constant
(curry cons (list* name ctype))
'()))
(set! parametric-constants-reverse
(hash-set parametric-constants-reverse name constant)))
(define-syntax-rule (define-constant-impl (constant name) ctype [key value] ...)
(register-constant-impl! 'constant 'name 'ctype (list (cons 'key value) ...)))
(define (get-parametric-constant name type)
(for/first ([(true-name rtype) (in-dict (hash-ref parametric-constants name))]
#:when (equal? rtype type))
true-name))
;; binary64 ;;
(define-constant-impl (PI PI.f64) binary64
[fl (const pi)])
(define-constant-impl (E E.f64) binary64
[fl (const (exp 1.0))])
(define-constant-impl (INFINITY INFINITY.f64) binary64
[fl (const +inf.0)])
(define-constant-impl (NAN NAN.f64) binary64
[fl (const +nan.0)])
;; binary32 ;;
(define-constant-impl (PI PI.f32) binary32
[fl (const (->float32 pi))])
(define-constant-impl (E E.f32) binary32
[fl (const (->float32 (exp 1.0)))])
(define-constant-impl (INFINITY INFINITY.f32) binary32
[fl (const (->float32 +inf.0))])
(define-constant-impl (NAN NAN.f32) binary32
[fl (const (->float32 +nan.0))])
;; bool ;;
(define-constant-impl (TRUE TRUE) bool
[fl (const true)])
(define-constant-impl (FALSE FALSE) bool
[fl (const false)])
;; TODO: The contracts for operators are tricky because the number of arguments is unknown
;; There's no easy way to write such a contract in Racket, so I only constrain the output type.
(define (unconstrained-argument-number-> from/c to/c)
(unconstrained-domain-> to/c))
;; Abstract operator table
;; Implementations inherit attributes
(define-table operators
[itype (or/c (listof type-name?) type-name?)]
[otype type-name?]
[bf (unconstrained-argument-number-> bigvalue? bigvalue?)]
[nonffi (unconstrained-argument-number-> value? value?)]
[ival (or/c #f (unconstrained-argument-number-> ival? ival?))])
(define (register-operator! name itypes otype attrib-dict)
(define itypes* (dict-ref attrib-dict 'itype itypes))
(define otype* (dict-ref attrib-dict 'otype otype))
(table-set! operators name
(make-hasheq (append (list (cons 'itype itypes*) (cons 'otype otype*))
attrib-dict))))
(define-syntax-rule (define-operator (name itypes ...) otype [key value] ...)
(register-operator! 'name '(itypes ...) 'otype
(list (cons 'key value) ...)))
(define-operator (neg real) real
[bf bf-] [ival ival-neg] [nonffi -])
(define-operator (+ real real) real
[bf bf+] [ival ival-add] [nonffi +])
(define-operator (- real real) real
[bf bf-] [ival ival-sub] [nonffi -])
(define-operator (* real real) real
[bf bf*] [ival ival-mult] [nonffi *])
(define-operator (/ real real) real
[bf bf/] [ival ival-div] [nonffi /])
;; Operator implementations
(define-table operator-impls
[itype (or/c (listof representation-name?) representation-name?)]
[otype representation-name?]
[bf (unconstrained-argument-number-> bigvalue? bigvalue?)]
[fl (unconstrained-argument-number-> value? value?)]
[nonffi (unconstrained-argument-number-> value? value?)]
[ival (or/c #f (unconstrained-argument-number-> ival? ival?))])
(define parametric-operators (hash))
(define parametric-operators-reverse (hash))
(define (operator-info operator field)
(with-handlers ([exn:fail?
(λ (e) (error 'operator-info "Unknown operator or field: ~a ~a"
operator field))])
(table-ref operator-impls operator field)))
(define (operator-exists? op)
(with-handlers ([exn:fail? (const false)])
(table-ref operator-impls op 'otype)
true))
(define (operator-remove! operator)
(table-remove! operator-impls operator))
(define (*loaded-ops*)
(hash-keys parametric-operators-reverse))
(define (check-operator-types! inherited itypes otype)
(define itypes* (dict-ref inherited 'itype))
(define otype* (dict-ref inherited 'otype))
(define prec->type (compose representation-type get-representation))
(and (equal? (prec->type otype) otype*)
(or (and (type-name? itypes*) (type-name? itypes)
(equal? (prec->type itypes) itypes*))
(map (λ (x y) (equal? (prec->type x) y)) itypes itypes*))))
(define (register-operator-impl! operator name atypes rtype attrib-dict)
(define default-attrib (table-ref-all operators operator))
(unless default-attrib
(error 'register-operator-impl! "Real operator does not exist: ~a" operator))
;; merge inherited and explicit attributes
(define attrib-dict* (dict-merge default-attrib attrib-dict))
(define itypes (dict-ref attrib-dict 'itype atypes))
(define otype (dict-ref attrib-dict 'otype rtype))
(unless (equal? operator 'if) ;; if does not work here
(check-operator-types! default-attrib itypes otype))
;; Convert attributes to hash, update tables
(define fields (make-hasheq attrib-dict*))
(hash-set! fields 'itype itypes)
(hash-set! fields 'otype otype)
(table-set! operator-impls name fields)
(set! parametric-operators
(hash-update parametric-operators operator
(curry cons (list* name otype (operator-info name 'itype)))
'()))
(set! parametric-operators-reverse
(hash-set parametric-operators-reverse name operator)))
(define-syntax-rule (define-operator-impl (operator name atypes ...) rtype [key value] ...)
(register-operator-impl! 'operator 'name '(atypes ...) 'rtype (list (cons 'key value) ...)))
(define (no-complex fun)
(λ xs
(define res (apply fun xs))
(if (real? res) res +nan.0)))
(define (default-nonffi . args)
(raise
(make-exn:fail:unsupported
(format "couldn't find ~a and no default implementation defined" 'operator)
(current-continuation-marks))))
(define (get-parametric-operator name #:fail-fast? [fail-fast? #t] . actual-types)
(or
(for/or ([sig (hash-ref parametric-operators name)])
(match-define (list* true-name rtype atypes) sig)
(and (if (representation-name? atypes)
(andmap (curry equal? atypes) actual-types)
(equal? atypes actual-types))
true-name))
(and fail-fast?
(error 'get-parametric-operator
"parametric operator with op ~a and input types ~a not found"
name actual-types))))
;; mainly useful for getting arg count of an unparameterized operator
;; will break if operator impls have different aritys
;; returns #f for variary operators
(define (get-operator-arity op)
(let ([itypes (table-ref operators op 'itype)])
(if (type-name? itypes) #f (length itypes))))
;; binary64 4-function ;;
(define-operator-impl (neg neg.f64 binary64) binary64 [fl -])
(define-operator-impl (+ +.f64 binary64 binary64) binary64 [fl +])
(define-operator-impl (- -.f64 binary64 binary64) binary64 [fl -])
(define-operator-impl (* *.f64 binary64 binary64) binary64 [fl *])
(define-operator-impl (/ /.f64 binary64 binary64) binary64 [fl /])
;; binary32 4-function ;;
(define-operator-impl (neg neg.f32 binary32) binary32 [fl fl32-])
(define-operator-impl (+ +.f32 binary32 binary32) binary32 [fl fl32+])
(define-operator-impl (- -.f32 binary32 binary32) binary32 [fl fl32-])
(define-operator-impl (* *.f32 binary32 binary32) binary32 [fl fl32*])
(define-operator-impl (/ /.f32 binary32 binary32) binary32 [fl fl32/])
(define *unknown-ops* (make-parameter '()))
(register-reset
(λ ()
(unless (flag-set? 'precision 'fallback)
(for-each operator-remove! (*unknown-ops*)))))
(require ffi/unsafe)
(define-syntax (define-libm-operator stx)
(syntax-case stx (real libm)
[(_ (op opf64 opf32 real ...) real [libm id_d id_f] [key value] ...)
(let* ([num-args (length (cdddr (syntax-e (cadr (syntax-e stx)))))])
#`(begin
(define (fallback prec . args)
(warn 'fallback #:url "faq.html#native-ops"
"native `~a` not supported on your system, using fallback; ~a"
'op
"use --disable precision:fallback to disable fallbacks")
(match prec
['double (apply (operator-info 'opf64 'nonffi) args)]
['float (apply (operator-info 'opf32 'nonffi) args)]))
(define double-proc (get-ffi-obj 'id_d #f (_fun #,@(build-list num-args (λ (_) #'_double)) -> _double)
(lambda () (*unknown-ops* (cons 'opf64 (*unknown-ops*))) (curry fallback #'double))))
(define float-proc (get-ffi-obj 'id_f #f (_fun #,@(build-list num-args (λ (_) #'_float)) -> _float)
(lambda () (*unknown-ops* (cons 'opf32 (*unknown-ops*))) (curry fallback #'float))))
(define-operator (op #,@(build-list num-args (λ (_) #'real))) real [key value] ...)
(define-operator-impl (op opf64 #,@(build-list num-args (λ (_) #'binary64))) binary64
[fl (λ args (apply double-proc args))])
(define-operator-impl (op opf32 #,@(build-list num-args (λ (_) #'binary32))) binary32
[fl (λ args (->float32 (apply float-proc args)))])
))]))
(define-libm-operator (acos acos.f64 acos.f32 real) real
[libm acos acosf] [bf bfacos] [ival ival-acos]
[nonffi (no-complex acos)])
(define-libm-operator (acosh acosh.f64 acosh.f32 real) real
[libm acosh acoshf] [bf bfacosh] [ival ival-acosh]
[nonffi (no-complex acosh)])
(define-libm-operator (asin asin.f64 asin.f32 real) real
[libm asin asinf] [bf bfasin] [ival ival-asin]
[nonffi (no-complex asin)])
(define-libm-operator (asinh asinh.f64 asinh.f32 real) real
[libm asinh asinhf] [bf bfasinh] [ival ival-asinh]
[nonffi (no-complex asinh)])
(define-libm-operator (atan atan.f64 atan.f32 real) real
[libm atan atanf] [bf bfatan] [ival ival-atan]
[nonffi (no-complex atan)])
(define-libm-operator (atan2 atan2.f64 atan2.f32 real real) real
[libm atan2 atan2f] [bf bfatan2] [ival ival-atan2]
[nonffi (no-complex atan)])
(define-libm-operator (atanh atanh.f64 atanh.f32 real) real
[libm atanh atanhf] [bf bfatanh] [ival ival-atanh]
[nonffi (no-complex atanh)])
(define-libm-operator (cbrt cbrt.f64 cbrt.f32 real) real
[libm cbrt cbrtf] [bf bfcbrt] [ival ival-cbrt]
[nonffi (no-complex (λ (x) (expt x (/ 1 3))))])
(define-libm-operator (ceil ceil.f64 ceil.f32 real) real
[libm ceil ceilf] [bf bfceiling] [ival ival-ceil]
[nonffi ceiling])
(define (bfcopysign x y)
(bf* (bfabs x) (bf (expt -1 (bigfloat-signbit y)))))
(define-libm-operator (copysign copysign.f64 copysign.f32 real real) real
[libm copysign copysignf] [bf bfcopysign] [ival ival-copysign]
[nonffi (λ (x y) (if (>= y 0) (abs x) (- (abs x))))])
(define-libm-operator (cos cos.f64 cos.f32 real) real
[libm cos cosf] [bf bfcos] [ival ival-cos]
[nonffi cos])
(define-libm-operator (cosh cosh.f64 cosh.f32 real) real
[libm cosh coshf] [bf bfcosh] [ival ival-cosh]
[nonffi cosh])
(define-libm-operator (erf erf.f64 erf.f32 real) real
[libm erf erff] [bf bferf] [ival ival-erf]
[nonffi (no-complex erf)])
(define-libm-operator (erfc erfc.f64 erfc.f32 real) real
[libm erfc erfcf] [bf bferfc] [ival ival-erfc]
[nonffi erfc])
(define-libm-operator (exp exp.f64 exp.f32 real) real
[libm exp expf] [bf bfexp] [ival ival-exp]
[nonffi exp])
(define-libm-operator (exp2 exp2.f64 exp2.f32 real) real
[libm exp2 exp2f] [bf bfexp2] [ival ival-exp2]
[nonffi (no-complex (λ (x) (expt 2 x)))])
(define (from-bigfloat bff)
(λ args (bigfloat->flonum (apply bff (map bf args)))))
(define-libm-operator (expm1 expm1.f64 expm1.f32 real) real
[libm expm1 expm1f] [bf bfexpm1] [ival ival-expm1]
[nonffi (from-bigfloat bfexpm1)])
(define-libm-operator (fabs fabs.f64 fabs.f32 real) real
[libm fabs fabsf] [bf bfabs] [ival ival-fabs]
[nonffi abs])
(define (bffdim x y)
(if (bf> x y)
(bf- x y)
0.bf))
(define-libm-operator (fdim fdim.f64 fdim.f32 real real) real
[libm fdim fdimf] [bf bffdim] [ival ival-fdim]
[nonffi (λ (x y) (max (- x y) 0))])
(define-libm-operator (floor floor.f64 floor.f32 real) real
[libm floor floorf] [bf bffloor] [ival ival-floor]
[nonffi (λ (x) (floor x))])
(define (bffma x y z)
(bf+ (bf* x y) z))
(define-libm-operator (fma fma.f64 fma.f32 real real real) real
[libm fma fmaf] [bf bffma] [ival ival-fma]
[nonffi (λ (x y z) (bigfloat->flonum (bf+ (bf* (bf x) (bf y)) (bf z))))])
(define-libm-operator (fmax fmax.f64 fmax.f32 real real) real
[libm fmax fmaxf] [bf bfmax] [ival ival-fmax]
[nonffi (λ (x y) (cond [(nan? x) y] [(nan? y) x] [else (max x y)]))])
(define-libm-operator (fmin fmin.f64 fmin.f32 real real) real
[libm fmin fminf] [bf bfmin] [ival ival-fmin]
[nonffi (λ (x y) (cond [(nan? x) y] [(nan? y) x] [else (min x y)]))])
(define (bffmod x mod)
(bf- x (bf* (bftruncate (bf/ x mod)) mod)))
(define-libm-operator (fmod fmod.f64 fmod.f32 real real) real
[libm fmod fmodf] [bf bffmod] [ival ival-fmod]
[nonffi (from-bigfloat bffmod)])
(define-libm-operator (hypot hypot.f64 hypot.f32 real real) real
[libm hypot hypotf] [bf bfhypot] [ival ival-hypot]
[nonffi (from-bigfloat bfhypot)])
(define-libm-operator (j0 j0.f64 j0.f32 real) real
[libm j0 j0f] [bf bfbesj0] [ival #f]
[nonffi (from-bigfloat bfbesj0)])
(define-libm-operator (j1 j1.f64 j1.f32 real) real
[libm j1 j1f] [bf bfbesj1] [ival #f]
[nonffi (from-bigfloat bfbesj1)])
(define-libm-operator (lgamma lgamma.f64 lgamma.f32 real) real
[libm lgamma lgammaf] [bf bflog-gamma] [ival #f]
[nonffi log-gamma])
(define-libm-operator (log log.f64 log.f32 real) real
[libm log logf] [bf bflog] [ival ival-log]
[nonffi (no-complex log)])
(define-libm-operator (log10 log10.f64 log10.f32 real) real
[libm log10 log10f] [bf bflog10] [ival ival-log10]
[nonffi (no-complex (λ (x) (log x 10)))])
(define-libm-operator (log1p log1p.f64 log1p.f32 real) real
[libm log1p log1pf] [bf bflog1p] [ival ival-log1p]
[nonffi (from-bigfloat bflog1p)])
(define-libm-operator (log2 log2.f64 log2.f32 real) real
[libm log2 log2f] [bf bflog2] [ival ival-log2]
[nonffi (from-bigfloat bflog2)])
(define (bflogb x)
(bffloor (bflog2 (bfabs x))))
(define-libm-operator (logb logb.f64 logb.f32 real) real
[libm logb logbf] [bf bflogb] [ival ival-logb]
[nonffi (λ (x) (floor (bigfloat->flonum (bflog2 (bf (abs x))))))])
(define-libm-operator (pow pow.f64 pow.f32 real real) real
[libm pow powf] [bf bfexpt] [ival ival-pow]
[nonffi (no-complex expt)])
(define (bfremainder x mod)
(bf- x (bf* (bfround (bf/ x mod)) mod)))
(define-libm-operator (remainder remainder.f64 remainder.f32 real real) real
[libm remainder remainderf] [bf bfremainder] [ival ival-remainder]
[nonffi remainder])
(define-libm-operator (rint rint.f64 rint.f32 real) real
[libm rint rintf] [bf bfrint] [ival ival-rint]
[nonffi round])
(define-libm-operator (round round.f64 round.f32 real) real
[libm round roundf] [bf bfround] [ival ival-round]
[nonffi round])
(define-libm-operator (sin sin.f64 sin.f32 real) real
[libm sin sinf] [bf bfsin] [ival ival-sin]
[nonffi sin])
(define-libm-operator (sinh sinh.f64 sinh.f32 real) real
[libm sinh sinhf] [bf bfsinh] [ival ival-sinh]
[nonffi sinh])
(define-libm-operator (sqrt sqrt.f64 sqrt.f32 real) real
[libm sqrt sqrtf] [bf bfsqrt] [ival ival-sqrt]
[nonffi (no-complex sqrt)])
(define-libm-operator (tan tan.f64 tan.f32 real) real
[libm tan tanf] [bf bftan] [ival ival-tan]
[nonffi tan])
(define-libm-operator (tanh tanh.f64 tanh.f32 real) real
[libm tanh tanhf] [bf bftanh] [ival ival-tanh]
[nonffi tanh])
(define-libm-operator (tgamma tgamma.f64 tgamma.f32 real) real
[libm tgamma tgammaf] [bf bfgamma] [ival #f]
[nonffi gamma])
(define-libm-operator (trunc trunc.f64 trunc.f32 real) real
[libm trunc truncf] [bf bftruncate] [ival ival-trunc]
[nonffi truncate])
(define-libm-operator (y0 y0.f64 y0.f32 real) real
[libm y0 y0f] [bf bfbesy0] [ival #f]
[nonffi (from-bigfloat bfbesy0)])
(define-libm-operator (y1 y1.f64 y1.f32 real) real
[libm y1 y1f] [bf bfbesy1] [ival #f]
[nonffi (from-bigfloat bfbesy1)])
;; If
(define (if-fn test if-true if-false) (if test if-true if-false))
(define-operator (if real real) real
[bf if-fn] [ival ival-if] [nonffi if-fn])
(define-operator-impl (if if bool real real) real [fl if-fn]) ; types not used
(define ((infix-joiner x) . args)
(string-join args x))
;; real operators
(define-operator (==) real
[itype 'real] [bf (comparator bf=)] [ival ival-==] [nonffi (comparator =)])
(define-operator (!=) real
[itype 'real] [bf (negate (comparator bf=))] [ival ival-!=]
[nonffi (negate (comparator =))])
(define-operator (<) real
[itype 'real] [bf (comparator bf<)] [ival ival-<] [nonffi (comparator <)])
(define-operator (>) real
[itype 'real] [bf (comparator bf>)] [ival ival->] [nonffi (comparator >)])
(define-operator (<=) real
[itype 'real] [bf (comparator bf<=)] [ival ival-<=] [nonffi (comparator <=)])
(define-operator (>=) real
[itype 'real] [bf (comparator bf>=)] [ival ival->=] [nonffi (comparator >=)])
;; binary64 comparators ;;
(define-operator-impl (== ==.f64 binary64 binary64) bool
[itype 'binary64] [otype 'bool] ; Override number of arguments
[fl (comparator =)])
(define-operator-impl (!= !=.f64 binary64 binary64) bool
[itype 'binary64] [otype 'bool] ; Override number of arguments
[fl (negate (comparator =))])
(define-operator-impl (< <.f64 binary64 binary64) bool
[itype 'binary64] [otype 'bool] ; Override number of arguments
[fl (comparator <)])
(define-operator-impl (> >.f64 binary64 binary64) bool
[itype 'binary64] [otype 'bool] ; Override number of arguments
[fl (comparator >)])
(define-operator-impl (<= <=.f64 binary64 binary64) bool
[itype 'binary64] [otype 'bool] ; Override number of arguments
[fl (comparator <=)])
(define-operator-impl (>= >=.f64 binary64 binary64) bool
[itype 'binary64] [otype 'bool] ; Override number of arguments
[fl (comparator >=)])
;; binary32 comparators
(define-operator-impl (== ==.f32 binary32 binary32) bool
[itype 'binary32] [otype 'bool] ; Override number of arguments
[fl (comparator =)])
(define-operator-impl (!= !=.f32 binary32 binary32) bool
[itype 'binary32] [otype 'bool] ; Override number of arguments
[fl (negate (comparator =))])
(define-operator-impl (< <.f32 binary32 binary32) bool
[itype 'binary32] [otype 'bool] ; Override number of arguments
[fl (comparator <)])
(define-operator-impl (> >.f32 binary32 binary32) bool
[itype 'binary32] [otype 'bool] ; Override number of arguments
[fl (comparator >)])
(define-operator-impl (<= <=.f32 binary32 binary32) bool
[itype 'binary32] [otype 'bool] ; Override number of arguments
[fl (comparator <=)])
(define-operator-impl (>= >=.f32 binary32 binary32) bool
[itype 'binary32] [otype 'bool] ; Override number of arguments
[fl (comparator >=)])
;; logical operators ;;
(define (and-fn . as) (andmap identity as))
(define (or-fn . as) (ormap identity as))
(define-operator (not bool) bool
[bf not] [ival ival-not] [nonffi not])
(define-operator (and bool bool) bool
[itype 'bool] ; override number of arguments
[bf and-fn] [ival ival-and] [nonffi and-fn])
(define-operator (or bool bool) bool
[itype 'bool] ; override number of arguments
[bf or-fn] [ival ival-or] [nonffi or-fn])
(define-operator-impl (not not bool) bool
[fl not])
(define-operator-impl (and and bool bool) bool
[itype 'bool] [otype 'bool] ; Override number of arguments
[fl and-fn])
(define-operator-impl (or or bool bool) bool
[itype 'bool] [otype 'bool] ; Override number of arguments
[fl or-fn])
;; Miscellaneous operators ;;
(define (repr-conv? expr)
(and (symbol? expr) (regexp-match? #px"^[\\S]+(->)[\\S]+$" (symbol->string expr))))
(define (rewrite-repr-op? expr)
(and (symbol? expr) (regexp-match? #px"^(<-)[\\S]+$" (symbol->string expr))))
(define (get-repr-conv iprec oprec)
(for/or ([sig (hash-ref parametric-operators 'cast)])
(match-define (list* true-name rtype atypes) sig)
(and (repr-conv? true-name)
(equal? rtype oprec)
(equal? (car atypes) iprec)
true-name)))
;; Conversions
(define-operator (cast real) real
[bf identity] [ival identity] [nonffi identity])
(define-operator-impl (cast binary64->binary32 binary64) binary32
[fl (curryr ->float32)])
(define-operator-impl (cast binary32->binary64 binary32) binary64
[fl identity])
;; Expression predicates ;;
(define (operator? op)
(and (symbol? op) (not (equal? op 'if))
(or (hash-has-key? parametric-operators op)
(dict-has-key? (cdr operator-impls) op))))
(define (constant? var)
(and (symbol? var)
(or (hash-has-key? parametric-constants var)
(dict-has-key? (cdr constant-impls) var))))
(define (variable? var)
(and (symbol? var) (not (constant? var))))
| true |
46565bb94a80fa58cb2cfc24913619979163327e | a18b561b599c8e85d697ecb421fe98cbb41814d1 | /planet/terrain/terrain-data-structs.rkt | b553df1ebf183e402c23a345db2b76de14c2a560 | [] | no_license | his1220/earthgen | f501f1c6b91831adc3072e4dc7bbe5b9f7045793 | 0fd1904905fea41a441e7494388d734e298b77bc | refs/heads/master | 2021-01-18T15:14:11.895611 | 2015-03-20T19:50:30 | 2015-03-20T20:35:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 742 | rkt | terrain-data-structs.rkt | #lang typed/racket
(require vraid/types)
(require/typed/provide "terrain-data.rkt"
[#:struct tile-terrain-data
([elevation : flonum-get]
[elevation-set! : flonum-set!])]
[#:struct corner-terrain-data
([elevation : flonum-get]
[river-direction : integer-get]
[elevation-set! : flonum-set!]
[river-direction-set! : integer-set!])]
[make-tile-terrain-data (Integer -> tile-terrain-data)]
[make-corner-terrain-data (Integer -> corner-terrain-data)])
| false |
e7a5bbb83a580ae668ff48b1cf1926e7baafb562 | 6858cbebface7beec57e60b19621120da5020a48 | /13/4/3/2.rkt | 19140bfda107258b4988ed778238462009e8aa0c | [] | no_license | ponyatov/PLAI | a68b712d9ef85a283e35f9688068b392d3d51cb2 | 6bb25422c68c4c7717b6f0d3ceb026a520e7a0a2 | refs/heads/master | 2020-09-17T01:52:52.066085 | 2017-03-28T07:07:30 | 2017-03-28T07:07:30 | 66,084,244 | 2 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 29 | rkt | 2.rkt | (let ([v #t])
(or #f v))
| false |
91362a40bba4a8503c86fc8562907cf82d2b1454 | be19eecb8bc01be80d7f9e9d95d0d02576bda905 | /scribblings/codespells-live.scrbl | 38dfb6e383af9b198f54fa0b87c5632300de72cc | [
"Apache-2.0",
"MIT"
] | permissive | ldhandley/codespells-live | 8836e076afb6edb067f376f930863c7d03170ca3 | ff1d635bc711b21d6814a5626167dd340f843545 | refs/heads/main | 2023-04-23T20:09:04.784787 | 2021-04-13T19:10:36 | 2021-04-13T19:10:36 | 355,298,672 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,980 | scrbl | codespells-live.scrbl | #lang scribble/manual
@require[@for-label[codespells-live
racket/base]]
@title{codespells-live}
@author{ThoughtSTEM}
@section{Language for the Twitch Chat}
@defmodule[codespells-live/chat]
@(tt "codespells-live/chat") is the language for interacting
with our Twitch stream
@(link "https://www.twitch.tv/codespells" "here"). Any of
commands below can be run inside the Twitch chat preceded by a
@tt{!!} and minus the outer set of parentheses. (E.g. @tt{!!mini})
@defproc[(mini)
void?]{
Spawns a mini of the viewer in the virtual world.
}
@defproc[(color [c color?])
void?]{
Changes the color of the Transcendent Being.
}
@defproc[(say [str string?])
void?]{
Changes the text on any sign that the Transcendent Being
is holding.
}
@defproc[(cheer)
void?]{
Creates an explosion particle effect at the location
of the viewer's mini. Nothing happens if the viewer does
not have a mini yet.
}
@defproc[(face [f face?])
void?]{
Changes the face of the Transcendent Being.
}
@defproc[(run [id integer?])
void?]{
Runs a spell from the spell-sharing server with given id.
}
@section{Language for the Spell Sharing Server}
@defmodule[codespells-live/spell-lang]
@tt{codespells-live/spell-lang} is the extended language that can be used on the Spell Sharing
Server @(link "https://spell-client.vercel.app/" "here").
@defproc[(sleep [s integer?])
void?]{
Pauses for a given number of seconds.
}
@section{Util}
@defmodule[codespells-live/util]
@defproc[(color? [x any/c?])
boolean?]{
Returns true if x is in the allowed color list:
@tt{red}, @tt{orange}, @tt{green}, @tt{blue}.
}
@defproc[(face? [x any/c?])
boolean?]{
Returns true if x is in the allowed face list:
@tt{bernie-sanders}, @tt{doge}, @tt{grumpy-cat},
@tt{polite-cat}, @tt{sad-pepe}, @tt{shocked-cat},
@tt{surprised-cat}, @tt{surprised-pikachu}, @tt{troll-face},
@tt{you-kidding-me}.
} | false |
ba2dc159c597b2758f7305a5e085c4dcf36cdf81 | 1da0749eadcf5a39e1890195f96903d1ceb7f0ec | /a-d6/a-d/graph/examples/directed-weighted.rkt | e4db3917a58573cf0b758bf50aee4de3f80aed06 | [] | no_license | sebobrien/ALGO1 | 8ce02fb88b6db9e001d936356205a629b49b884d | 50df6423fe45b99db9794ef13920cf03d532d69f | refs/heads/master | 2020-04-08T20:08:16.986517 | 2018-12-03T06:48:07 | 2018-12-03T06:48:07 | 159,685,194 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 152,443 | rkt | directed-weighted.rkt | #reader(lib"read.ss""wxme")WXME0108 ##
#|
This file uses the GRacket editor format.
Open this file in DrRacket version 6.0 or later to read it.
Most likely, it was created by saving a program in DrRacket,
and it probably contains a program with non-text elements
(such as images or comment boxes).
http://racket-lang.org/
|#
30 7 #"wxtext\0"
3 1 6 #"wxtab\0"
1 1 8 #"wximage\0"
2 0 8 #"wxmedia\0"
4 1 34 #"(lib \"syntax-browser.ss\" \"mrlib\")\0"
1 0 16 #"drscheme:number\0"
3 0 44 #"(lib \"number-snip.ss\" \"drscheme\" \"private\")\0"
1 0 36 #"(lib \"comment-snip.ss\" \"framework\")\0"
1 0 93
(
#"((lib \"collapsed-snipclass.ss\" \"framework\") (lib \"collapsed-sni"
#"pclass-wxme.ss\" \"framework\"))\0"
) 0 0 43 #"(lib \"collapsed-snipclass.ss\" \"framework\")\0"
0 0 19 #"drscheme:sexp-snip\0"
0 0 36 #"(lib \"cache-image-snip.ss\" \"mrlib\")\0"
1 0 68
(
#"((lib \"image-core.ss\" \"mrlib\") (lib \"image-core-wxme.rkt\" \"mr"
#"lib\"))\0"
) 1 0 29 #"drscheme:bindings-snipclass%\0"
1 0 88
(
#"((lib \"pict-snip.rkt\" \"drracket\" \"private\") (lib \"pict-snip.r"
#"kt\" \"drracket\" \"private\"))\0"
) 0 0 34 #"(lib \"bullet-snip.rkt\" \"browser\")\0"
0 0 25 #"(lib \"matrix.ss\" \"htdp\")\0"
1 0 22 #"drscheme:lambda-snip%\0"
1 0 26 #"drracket:spacer-snipclass\0"
0 0 57
#"(lib \"hrule-snip.rkt\" \"macro-debugger\" \"syntax-browser\")\0"
1 0 26 #"drscheme:pict-value-snip%\0"
0 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0"
1 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0"
2 0 55 #"(lib \"vertical-separator-snip.ss\" \"stepper\" \"private\")\0"
1 0 18 #"drscheme:xml-snip\0"
1 0 31 #"(lib \"xml-snipclass.ss\" \"xml\")\0"
1 0 21 #"drscheme:scheme-snip\0"
2 0 34 #"(lib \"scheme-snipclass.ss\" \"xml\")\0"
1 0 10 #"text-box%\0"
1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0"
1 0 1 6 #"wxloc\0"
0 0 155 0 1 #"\0"
0 75 1 #"\0"
0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9
#"Standard\0"
0 75 7 #"Monaco\0"
0 14 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 2 24
#"framework:default-color\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 255 255 255 -1 -1 2
1 #"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 15
#"text:ports out\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 255 0 0 0 0 0 -1
-1 2 15 #"text:ports err\0"
0 -1 1 #"\0"
1 0 -1 92 93 -1 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 17
#"text:ports value\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1
-1 2 27 #"Matching Parenthesis Style\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1
-1 2 1 #"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 37
#"framework:syntax-color:scheme:symbol\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 38
#"framework:syntax-color:scheme:keyword\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 194 116 31 0 0 0 -1 -1 2
38 #"framework:syntax-color:scheme:comment\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 194 116 31 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 37
#"framework:syntax-color:scheme:string\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 35
#"framework:syntax-color:scheme:text\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 39
#"framework:syntax-color:scheme:constant\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 49
#"framework:syntax-color:scheme:hash-colon-keyword\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 42
#"framework:syntax-color:scheme:parenthesis\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36
#"framework:syntax-color:scheme:error\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 36
#"framework:syntax-color:scheme:other\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 16
#"Misspelled Text\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2
38 #"drracket:check-syntax:lexically-bound\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 28
#"drracket:check-syntax:set!d\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 37
#"drracket:check-syntax:unused-require\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36
#"drracket:check-syntax:free-variable\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 31
#"drracket:check-syntax:imported\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 47
#"drracket:check-syntax:my-obligation-style-pref\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 116 0 0 0 0 -1 -1 2 50
#"drracket:check-syntax:their-obligation-style-pref\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 116 0 0 0 0 -1 -1 2 48
#"drracket:check-syntax:unk-obligation-style-pref\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 139 142 28 0 0 0 -1 -1 2
49 #"drracket:check-syntax:both-obligation-style-pref\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 139 142 28 0 0 0 -1 -1 2
26 #"plt:htdp:test-coverage-on\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 2 27
#"plt:htdp:test-coverage-off\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 4 1
#"\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 4 4 #"XML\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 2 37 #"plt:module-language:test-coverage-on\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 38
#"plt:module-language:test-coverage-off\0"
0 -1 1 #"\0"
1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 4 1
#"\0"
0 71 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 4 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1
-1 4 1 #"\0"
0 71 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1
-1 4 1 #"\0"
0 71 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 100 0 0 0 0 -1
-1 0 1 #"\0"
0 75 7 #"Monaco\0"
0.0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 93 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 128 0 255 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 41 128 38 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 132 60 36 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 81 112 203 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 178 34 34 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 68 0 203 0 0
0 -1 -1 8 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 8 24 #"drscheme:text:ports err\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 0 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 200 0 0 0 0
0 -1 -1 4 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 1 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 0 -1 -1 0 1 #"\0"
0 75 7 #"Monaco\0"
0.0 11 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 2 38 #"drscheme:check-syntax:lexically-bound\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 81 112 203 0
0 0 -1 -1 2 28 #"drscheme:check-syntax:set!d\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 178 34 34 0
0 0 -1 -1 2 31 #"drscheme:check-syntax:imported\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 68 0 203 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
0 0 -1 -1 0 1 #"\0"
0 75 12 #"Courier New\0"
0.0 12 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 150 0 150 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 93 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 175 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 128 0 255 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 128 0 255 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 41 128 38 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 132 60 36 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
0 0 -1 -1 2 41 #"profj:syntax-colors:scheme:block-comment\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
0 0 -1 -1 2 35 #"profj:syntax-colors:scheme:keyword\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 139 0 139 0
0 0 -1 -1 2 37 #"profj:syntax-colors:scheme:prim-type\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 139 0 139 0
0 0 -1 -1 2 38 #"profj:syntax-colors:scheme:identifier\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 34 139 34 0
0 0 -1 -1 2 34 #"profj:syntax-colors:scheme:string\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 34 139 34 0
0 0 -1 -1 2 35 #"profj:syntax-colors:scheme:literal\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 34 139 34 0
0 0 -1 -1 2 35 #"profj:syntax-colors:scheme:comment\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
0 0 -1 -1 2 33 #"profj:syntax-colors:scheme:error\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 2 35 #"profj:syntax-colors:scheme:default\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 2 37 #"profj:syntax-colors:scheme:uncovered\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 2 35 #"profj:syntax-colors:scheme:covered\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 139 0 139 0
0 0 -1 -1 0 1 #"\0"
0 75 12 #"Courier New\0"
0.0 10 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 0 1 #"\0"
0 75 12 #"Courier New\0"
0.0 13 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 41 128 38 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 132 60 36 0
0 0 -1 -1 2 14 #"Html Standard\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 106 1
#"\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 70 1 #"\0"
2.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 70 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 70 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 70 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 34 139 34 0
0 0 -1 -1 106 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 70 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 70 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 178 34 34 0
0 0 -1 -1 106 1 #"\0"
0 75 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 75 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 70 1 #"\0"
1.2 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 70 1 #"\0"
1.6 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
0 -1 106 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 106 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 -1 1 #"\0"
2.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
2 -1 106 1 #"\0"
0 70 1 #"\0"
2.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 75 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 70 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 75 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 75 1 #"\0"
0.8 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
1 -1 106 1 #"\0"
0 70 1 #"\0"
0.8 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.2 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 70 1 #"\0"
1.2 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.2 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 70 1 #"\0"
0.8 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
1 -1 106 1 #"\0"
0 75 1 #"\0"
0.8 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
1 -1 106 1 #"\0"
0 70 1 #"\0"
0.8 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
0 -1 106 1 #"\0"
0 75 1 #"\0"
0.8 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
0 -1 106 1 #"\0"
0 70 1 #"\0"
0.8 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
0 -1 106 1 #"\0"
0 70 1 #"\0"
0.6400000000000001 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0
1.0 0 0 0 0 0 0 1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 106 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
2 -1 106 1 #"\0"
0 75 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
2 -1 106 1 #"\0"
0 75 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 106 1 #"\0"
0 75 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 0 1 #"\0"
0 75 12 #"Courier New\0"
0.0 11 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 0 1 #"\0"
0 75 16 #"Droid Sans Mono\0"
0.0 13 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 2 1 #"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 200 0 0 0 0 0 -1 -1
0 650 0 28 3 10 #"#lang r6rs"
0 0 24 29 1 #"\n"
0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
#"*-*-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
#"*-*-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-* "
#" *-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-* Directed Weighted Graphs "
#" *-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-* "
#" *-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-* Wolfgang De Meuter "
#" *-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-* 2009 Software Languages Lab "
#" *-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-* Vrije Universiteit Brussel "
#" *-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-* "
#" *-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
#"*-*-*-"
) 0 0 24 29 1 #"\n"
0 0 17 3 74
(
#";-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
#"*-*-*-"
) 0 0 24 29 1 #"\n"
0 0 24 29 1 #"\n"
0 0 24 3 1 #"("
0 0 14 3 7 #"library"
0 0 24 29 1 #"\n"
0 0 24 3 2 #" ("
0 0 14 3 8 #"examples"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 2 #" ("
0 0 14 3 6 #"export"
0 0 24 3 1 #" "
0 0 14 3 12 #"weighted-dag"
0 0 24 3 1 #" "
0 0 14 3 6 #"cormen"
0 0 24 3 1 #" "
0 0 14 3 9 #"cormen589"
0 0 24 3 1 #" "
0 0 14 3 4 #"evil"
0 0 24 3 1 #" "
0 0 14 3 13 #"dijkstra-fail"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 2 #" ("
0 0 14 3 6 #"import"
0 0 24 3 2 #" ("
0 0 14 3 4 #"rnrs"
0 0 24 3 1 #" "
0 0 14 3 4 #"base"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 10 #" ("
0 0 14 3 3 #"a-d"
0 0 24 3 1 #" "
0 0 14 3 5 #"graph"
0 0 24 3 1 #" "
0 0 14 3 8 #"weighted"
0 0 24 3 1 #" "
0 0 14 3 6 #"config"
0 0 24 3 2 #"))"
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 7 54 4 0 0 0 1 2 45 2 1 #"\0"
2 -1.0 -1.0 0.0 0.0 0 17 500
(
#"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0Z\0\0\0\244\b"
#"\6\0\0\0\02709k\0\0 \0IDATx\234\355]{XT\325\372"
#"\376\206;\20298\\\2TFQ\260\203\212\n]Q:fj%\232\327p\362"
#"\224\227\214<\221\331q\354)\263~he'MO%\352\261\262\207<f\36\263"
#"\213\267S\246e\31\336EM\304\v\bB\2rQA\af\0gf\277\277?"
#"8{7\303\354={\357\231=\352\241"
#"\336\347Y\317\303\260n\337z\367\332k"
#"\257\313\267\276O\5\0\364\a<\16\257"
#"\233-\300\357\5.\21\3150\f\355\335"
#"\273\227f\317\236M\275{\367\246\220\220"
#"\20\n\b\b \255VK\217>\372(\255\\\271\222\232\232\232\224\226\325#\0@"
#"g\316\234\241\371\363\347S\377\376\375)"
#",,\214\374\374\374(::\232\206\16\35JK\226,\241+W\256\270]\217l"
#"\242\313\312\312h\304\210\0214}\372t"
#"\212\210\210\240/\277\374\222JJJ\250"
#"\241\241\201~\376\371gJOO\247}\373\366Q\217\36=\350\243\217>r[@"
#"O\242\276\276\236\322\323\323\351\201\a\36"
#" \0\364\321G\37\321\251S\247\250\271\271\231\16\35:Dz\275\236JKK)"
#"..\216\262\262\262\310\255Q\0262P"
#"PP\200\360\360p\254\\\271\22f\263"
#"\331i\332c\307\216\241_\277~\330\260a\203\234*n\30jkk\21\e\e\213"
#"\371\363\347\243\241\241\301i\332\363\347\317"
#"\343\221G\36\301\274y\363\\\256O2\321%%% \"l\333\266Mr\341\6"
#"\203\1D\204\245K\227\272$\234\247PWW\a\"\302\273\357\276+9\217\325j"
#"Epp0\236}\366Y\227\352\224D\264\321hD\\\\\34>\370\340\3\331\25"
#"466\"..\16_}\365\225\354\274Bx"
#"\355\265\327\360\324SO!77Wv^\253\325\212"
) 500
(
#"a\303\206!33\323\245\274\303\207\17"
#"\307[o\275%;\257$\242\327\254Y\203!C\206\b\306geeA\253\325B"
#"\247\323\361\16)_\177\3755\22\23\23\3010\214l\1\3710{\366l\20\21\210"
#"\b\261\261\261x\343\2157\360\353\257\277"
#"J\312\273w\357^t\353\326\r\327\257_\27LSXX\210\255[\267\362\306\25"
#"\24\24 ,,Lt\270i\vID'%%\341\307\37\177\344\215\313\310\310\0"
#"\21!77\27\251\251\251 \"^B\373\365\353\207}\373\366\311\22N\b\266D"
#"\333\206\241C\207b\335\272u0\32\215"
#"\202y'O\236\214\325\253W\363\306\231"
#"\315f\24\26\26\202\210\260d\311\22\301"
#"2&N\234\210\217?\376X\226\314\242"
#"D\327\324\324@\243\321\300b\2618\304"
#"\31\215F\20\21\352\352\352~+\360\277"
#"\244\267\305\253\257\276\212\371\363\347\313\22"
#"N\bBD\263!88\230wha\30\6\32\215\6UUU\274\345\256\\\271"
#"\222+\303\31\321\237~\372)&L\230 KfQ\242\17\348\200\273\356\272\213"
#"7\256\264\264\324\241\ak\265Zde"
#"e9\244}\354\261\307\240R\251\234\22"
#"\344\211`;\264\324\325\325\241S\247N"
#"\242\244,Y\262\204\267\r,\362\362\362"
#"0`\300\0\321rl\341#6\375\253\252\252\242\250\250(\3368___\"\""
#"\262Z\255\344\343\363[QAAA\16i;v\354\350\336<\324E466R"
#"}}=\31\f\0062\32\215\202m\221"
#"\203\250\250(\252\256\256\226\225Gt\301"
#"\22\21\21!Z\250\227\227}1F\243\321!\315\320\241C)==\235\320\372\26"
#"\271\25f\317\236\355T\36___\0327n\34m\335\272\225***h\331\262"
#"e\324\247O\37\212\210\210\240\252\252"
#"*\261&\213\242\252\252\212\"\"\"d\345\21\355\3211"
#"11TZZJ\f\3038\20\352\347\347GDd\27"
) 500
(
#"WVVF\343\307\217w(\247\270\270\230\264Z\255,\341\344\"))\211\246L"
#"\231B\217?\3768i4\32\207x\265ZM\0\350\312\225+\274\361RQRR"
#"B111\262\362\210\366\350\350\350h"
#"\212\214\214\244\3\a\168\304\205\205\205"
#"\21\21\321\330\261c\211\210\350\223O>!\"\342%t\363\346\3154r\344HY"
#"\302IADD\4\351\365z\312\317\317\247\274\274<\2325k\226 \211^^^"
#"\364\320C\17\321\346\315\233\335\252\323\225"
#"\266\210\366h\"\242\0313f\320\242E"
#"\213\350\233o\276q\210\253\255\255\245\360"
#"\360pR\251TDDt\344\310\21\352\330\261\243]\232\35;v\220\311d\242\224"
#"\224\24\311\202\275\363\316;\334\20\324\330"
#"\330H\31\31\31\24\27\27GDD\376\376\3764~\374x\2322e\n=\374\360"
#"\303v\337\a)my\366\331gi\352"
#"\324\251\344\355\355-9\37\213\342\342b"
#"\372\356\273\357h\305\212\25\3622J\371b644 &&\6\337|\363\ro"
#"<\30300\30\f\274\213\225\226\226\26"
#"\304\306\306b\335\272u\222\277\320\25\25\25 \"\350\365z\350\365zddd "
#"??\337\256>Wa\261X0h\320 dgg\313\316\3130\fRRR\360"
#"\352\253\257\312\316+y\257\343\330\261c"
#"\b\f\f\24\\\270\360\241\245\245\5\3\a\16\304\214\0313d\tUXX\210\304"
#"\304DYy\344\240\262\262\22\221\221\221"
#"\262\27\35\223'OF\327\256]a\265Ze\327)k\367\356\330\261c \"\344"
#"\344\344\210\246-**BJJ\nt:\235l\241\330\205\203Z\255\6\21a\345"
#"\312\225\262\313\20\303\246M\233@Dx\364\321G\321\322\322\3424muu5&"
#"M\232\204\301\203\a;]\272;\203,\242\1\340\364\351\323HNN"
#"\306\300\201\3\261b\305\n\224\227\227\343\300\201\38|\3700\256^\275"
) 500
(
#"\212\355\333\267c\346\314\231\320h4X"
#"\274x\261KB\351t:n\205\231\223"
#"\223\3\"r\272\200\220\213k\327\256\241K\227. \"$$$@\253\325\342\355"
#"\267\337FQQ\21\366\355\333\207\303\207"
#"\17\243\241\241\1\271\271\271x\351\245\227"
#"\20\22\22\202Y\263f\211n\r;\203l\242\201\326=\201m\333\266a\312\224)"
#"\210\214\214\344Vaj\265\32\367\337\177"
#"?\336z\353-\324\327\327\273,\224\325j\265\e\207W\256\\\t\265Z\355ry"
#"m\361\324SO\201\210p\367\335w\303l6\343\340\301\203\310\314\314DLL\f"
#"\327\226\16\35: 99\31\257\274\362"
#"\n\312\313\313\335\256\323%\242\35\n\371"
#"\257pJ!''\a\315\315\315\334\357\215\e7*F\364\316\235;AD\360\367"
#"\367\307\351\323\247\35\342\225n\vW\256\"\205(,\34\21!--\r\300o\e"
#"W\31\31\31n\227k0\30\270^+"
#"4\254\375\256\210f\267*\331\220\230\230"
#"\350\322\227\276-\236y\346\31\20\21\222"
#"\223\223yw#\201\337\31\321,\232\233"
#"\233\355\206\20w\260{\367n\250T*"
#"\370\371\371\241\240\240@0\335\357\222h"
#"\245\320\330\330\210\356\335\273\203\210\260h"
#"\321\"\247i\377 \332\r<\373\354\263 \"\f\348Pt\212\366\a\321.b"
#"\317\236=P\251T\360\365\365\305\211\23'D\323{\252-\355Z%\314d2\321"
#"\364\351\323\t\0\275\366\332k\324\257_"
#"\277\233'\214\22O\213n\321\36\375\374"
#"\363\317s\263\26\251KgO\265\245\335"
#"\22\275w\357^xyy\301\307\307\a\307\216\35\223\234\317Smi\227CGS"
#"S\23M\237>\235\30\206\241W^y\205\6\f\30p\263Ej\237C\307\2349"
#"s@D\350\323\247\217\350\316\\[x\252-\355\216\350\3\a\16\300\313\313"
#"\v\336\336\336\310\313\313\223\235\337SmiWCGss3M\2336\215"
) 500
(
#"\30\206\241\227^z\211\222\222\222n\266"
#"H\277A\211\247E\267H\217~\361\305"
#"\27AD\370\323\237\376\344\362\322\335S"
#"mi7D\37>|\30\336\336\336\360\366\366\306\241C\207\\.\307Smi\27"
#"C\307\365\353\327i\332\264id\265Z"
#"i\356\334\271t\327]w\335l\221\34"
#"\241\304\323\242\233\334\243\347\315\233\a\""
#"B||<\232\232\232\334*\313Sm\271e\211\316\315\315\205V\253\205V\253u"
#"z\30\234\227\227\a\37\37\37xyya\377\376\375n\327+\265-\25\25\25H"
#"KK\203V\253\225tx|K\22\275k\327.\356\264}\353\326\255\202',-"
#"--\350\333\267/\247\3\242\4\244\264"
#"\205\275\232\221\225\225\205#G\216H:"
#"<\276%\211nK\234\320\341\354k\257\275\6\"B\257^\275`2\231\24\253["
#"\254-\211\211\211v\362\225\226\226\212\252"
#"`\334\222D\347\347\347\333M\317222\34\210>~\3748|}}\241R\251"
#"\\\272\313\"\4)ma\257\221\2607\34\376g\207\16\26f\263\31iii\234"
#"\216\a\213\353\327\257\243\177\377\376 \""
#"\314\236=[\321:\245\264\205M\263d\311\22l\334\270Q\322\341\361-K4;"
#"6\23\21jkk\355\342\26,X\300i\363;\273\257\342\n\304\332\3020\214\303"
#"\230\314\312\352\264\\\261\212srr\240"
#"\325j\221\232\232\212#G\216\270$\234"
#"\\\260\37\303]\273v9\304\345\347\347sC\306O?\375\244X\235,\244\16\35"
#"\266D\263\247\366N\313u\26\251\327\353AD\330\272u+\226,Y\"\330x\245"
#"\211V\253\325HMM\205\301`@EE\5***P[[\v\263\331\214\244"
#"\244$\20\21\236{\3569\305\352\263\205\224\266dee\201\210`0\30`\265Z"
#"\271\216\350\264\\\261Jm{\261\3204FI\242"
#"\331W\263mP\253\325x\363\3157AD\320j\265"
) 500
(
#"\262\357\371I\205\324\266\260\37BV6"
#"\261\275\25\247%\262\231\233\233\233\221\237"
#"\237\357@\274\\\341\334AAA\1\374"
#"\374\374\240R\251\360\303\17?x\254\36"
#"9m1\233\315\2227\257$\225\250\325j9\1***\334\22\316\25X,\26"
#"\334y\347\235 \"\314\2349\323c\365"
#"\0\267\300\22\334j\265\"--\215w"
#"\341\340i\242\337~\373m\20\21\272u"
#"\353\6\203\301\340\261z\200\233@\264\325j\345\6|\269997\234\3503g"
#"\316 \0D\204\357\276\373\316#u\330\342\246\364h\"\202N\247\3\3030"
#"0\32\215\202_WO\tg\265Zq\317=\367\200\210d_\317p\0257\205h"
#"\366\3h\373u\345S\251\362\224p\357"
#"\274\363\16\210\b]\272t\301\265k\327"
#"\24/\237\0177m\214f{\263\263\257\253'\204+,,D`` \210H\360"
#"6\230'p\323?\206N\vQX8\253\325\212\224\224\24\20\21\246N\235\252X"
#"\271R\360\273\"\372\335w\337\5\21!**\312\255\2730\256\340wCtqq"
#"1:t\350\0\"y\366\233\224\302\357\202h\206a\270\245\355\23O<\241\200d"
#"\362\361\273 :;;\eD\204\333o\277\35W\256\\Q@2\371h\367D\237"
#"?\177\36AAA \"|\375\365\327J\210\345\22\3325\321\f\303`\310\220!"
#"\334\2\351f\242]\23\275j\325*\20\21\302\303\303q\371\362e%Dr\31\355"
#"\226\350\262\2622t\354\330\21D\204/"
#"\276\370B\tq\334\202\247\210\226nQ\344\2770\231L\202v\211JJJ\270\277"
#"\3\3\3%\31\212z\372\351\247\251\241"
#"\241\201&N\234\310k\"\250\335@\356"
#"\223\251\254\254\204\267\2677\357)\210m"
#"\220b\343\356\303\17?\4\21!44\324\341\0\366F\300l6\243\274"
#"\274\334.\260\362\333\376\357\342\305\213"
#"n\327\345\322;\362\360\303\17\213\22"
) 500
(
#"}\356\3349\273<3g\316\304\347\237"
#"\177\316\375\276p\341\2n\273\3556\20"
#"\21\376\375\357\177\273\327\n\27\321\322\322"
#"\2\215F#\332\226\261c\307\272]\227KD\263\272\fBa\320\240A\16yn"
#"\277\375v\20\21&L\230\200\232\232\32"
#"<\364\320C \"\214\e7\316\355F"
#"\270\3\366\346\226\263\260e\313\26\267\353"
#"q\211\350\346\346f\316:\f_X\263"
#"f\215]\372\342\342b\273\370\340\340`"
#"\20\0214\32\r\252\253\253\335n\204;"
#"`\255\352\b\205\360\360p\267\f\242\260pI?\332\337\337\237t:\35o\\@"
#"@\0M\2348\321\356\177\373\367\357\267"
#"\373\335\330\330HD\255f\333\0\270\""
#"\202b\0300`\200\323\213\236\223'O"
#"\226e\205L\20\256>\241C\207\16\361"
#"\366\200\311\223';\244e\3157\360\205"
#"\220\220\20Y\26\304<\201\177\374\343\37"
#"\202\362I\271\326,\5nM\30\357\270"
#"\343\16\a\301\370\24l\372\364\351#:"
#"\16\276\376\372\353\356\210\342\26jjjxgRr\r\275:\203[D/^\274"
#"\330N0>Se\365\365\365N\tV\251Tx\345\225W\24\31\a\335\301\350\321"
#"\243\35d{\377\375\367\25+\337\255\301"
#"\347/\177\371\v\315\2337\217\30\206!"
#"\"\242'\237|\322\301~)\237\251M\26QQQ\364\351\247\237\322\220!C$"
#"\327\231\227\227G\333\267o\347~\a\5\5\221\321h$\275^\357`AR\16\246"
#"L\231B[\267n\345~\373\370\370\320"
#"\343\217?\356ry\16p\367I\331\316"
#"\251\213\212\212\34\342\347\317\237\317\333\223"
#"G\217\36\355\322\276Fnn.t:\035222\240\327\3539\345\36>\305\36"
#"9hiiA\347\316\235\25\235;\333\302m\242\3319uJJ\no\374\237\377"
#"\374g;\202\375\375\375\261b\305\nw\253\345\240V\253\25"
#"3@8k\326,E\347\316\266p\233\350\346\346f\204\204"
) 500
(
#"\204\340\243\217>r\2103\233\315\334I"
#"6Q\2531?[\e\243\356\202\265\370"
#"\250\24\216\36=\252\350\334\331\26\212H"
#"\251\327\353y\365.\16\37>\314\221<"
#"s\346L\305\356\231\0\255\17\230\210\24"
#"}p\0\320\267o_\374\355o\177S\264L@!\242\205\b|\357\275\367\320\271"
#"sgE}\260\260P\2727\263X\266l\231bsg[\270<\3530\32\215\364"
#"\303\17?\320\216\35;\250\246\246\206\214"
#"F#EFFR\377\376\375i\304\210\21\324\273wo\362\366\366\246\23'NP"
#"\227.]\\\255F\20\231\231\231\224\223\223\243x\2713g\316\244\16\35:(^"
#"\256\n\220\267\0066\233\315\264x\361b"
#"Z\276|9\365\355\333\227\36}\364Q"
#"\212\212\212\242\333n\273\215\252\252\252("
#"77\227\276\375\366[\272\347\236{h"
#"\341\302\205\324\247O\37\305\2056\231L\24\24\24Duuu\24\22\22\342vy"
#"V\253\225\16\36<H\377\371\317\177\250"
#"\262\262\222\256\\\271B\221\221\221\324\273"
#"woz\350\241\207(!!\301}\241"
#"\345t\377k\327\256\341\276\373\356\303\370"
#"\361\343Q\\\\,\230\316b\261\340\235w\336Ahh\250,3;R\301\272%"
#"Q\2999\210\213\213Cbb\"\26.\\\210\234\234\34l\337\276\35\37|"
#"\360\001233\321\255[7\f\e6\f{\367\356u\253\36\311\322655\201"
#"\210\360\302\v/H.\234\335\17\361\4"
#"\331\356\302b\261\340\311'\237Drr\262\250\361\361\325\253W#**\n\2337"
#"ov\271>ID3\f\203\221#G\212^\210\341\303\241C\207\20\26\26\206\223"
#"'O\312\316+\204\306\306F\267\3623\f\203\1\3\6`\310\220!\2026J\333"
#"\202=}\221c\21\336\26\222\210\376\351\247\237\320\275{w\301\271%\353"
#"\224,55\25\245\245\245\16\361K\227.Ut\245\365\367\277\377\35\375\373"
) 500
(
#"\367\307\252U\253\\R\347}\371\345\227"
#"\21\24\24$\231d\26\245\245\245\350\332"
#"\265\253K\n\361\222\210\0366l\230\340qSbb\"\210Z/\21\261\327\345\332"
#"\222m\261X\20\35\35\315k\257\331\25"
#"\274\376\372\353\334\374<00\20\323\247O\307\301\203\a%\345-//GHH"
#"\b\357\201\203\325j\205N\247\203V\253EFF\6\3575\16W=\331\211\22m"
#"4\32\21\34\34\314\333s\370\256_\b"
#"\371\312\2321c\206,G\215\316\360\352"
#"\253\257\362\356\237\364\353\327\17\331\331\331"
#"\270z\365\252`\336\331\263g\343\377\376"
#"\357\377x\343\210Z\257\326\359r\204"
#"\323\1\3443\247\234\222\222\"\350\206O"
#"\b\242\363\3503g\316P\\\\\34\335v\333m\16q^^^v~W\0P"
#"YY\31\257\303\233\36=z\320'\237|B\r\r\r\344\353\353K\276\276\276\344"
#"\347\347\307\375\315\27\204\342kjjx"
#"e\315\317\317\247Y\263f\321\213/\276"
#"H\351\351\351\224\221\221A\367\335w\237"
#"]\232\357\276\373\216\326\255[\347\220\267"
#"\276\276\236\210ZU&\274\274\274h\317"
#"\236=\244R\251\250\270\270\230\363\377\302"
#"b\364\350\321\264c\307\16\0325j\224"
#"\30}\277A\354Il\333\266\r\243F\215\22}b\254\357\24\"\342\275\35\320v"
#"s\351F\205\204\204\4\274\377\376\373\250"
#"\253\253Ccc#\202\202\202\4\333\300\336+7\30\f\334Ma\276!\342\340\301"
#"\203\270\373\356\273E9\261\205h\217\16"
#"\16\16\246k\327\2569M3j\324(\332\276};\351t:Z\277~=\347e"
#"\310\26\23&L\240\332\332Z\32?~<\231\315f\272~\375:\231\315f\301\340"
#",\276\262\262\222\256^\275*&:\21\21UVV\322\311\223'\351\314\2313\24"
#"\21\21\341T\251\247C\207\16\3040\214\335\333\313\327\226"
#"\310\310H\331\336\337D{\364\351\323\247\321\253W/\301"
) 500
(
#"xv,\263u\36\311\207\354\354l\305.c\316\2349\323i/\16\b\b\300\304"
#"\211\23\361\365\327_\333Yr\274x\361\"\"\"\"$\325\301Z\231\3413xR"
#"PP\200;\356\270C\226\314\242\247\340w\334q\a577\323\2313g\34\342"
#"X_\340\e7n$\242\326\336SVVF&\223\311!\355\226-[h\304\210"
#"\21\362z\201\0\314f\263\303\377\274\274"
#"\274h\370\360\341\264v\355Z\252\255\255"
#"\245\317?\377\234\306\214\31\303y\250#"
#"\"\322h4d0\30x\363\177\377\375\367v\313\371\220\220\20\322j\265TVV"
#"\346\220\266\272\272\232\302\303\303\345\t-"
#"\345i\314\2313\207\327f\221\355\270l"
#"\e\332\316:JJJ\20\32\32\252\330"
#"\255\327'\237|\222\253\353\236{\356\301"
#"\362\345\313QSS#)\357\320\241CyWx\265\265\265v\207\313\354\325?\276"
#"\303\346\347\237\177^\324\204}[H\""
#"\272\274\274\34\241\241\241\274\213\21)\30;v,\26.\\\350R^>dee"
#"\341\3157\337DII\211\354\274+V"
#"\254\20\\<\261\346!\330\300\327\271\214"
#"F#\242\242\242d\257\t$\357u\254"
#"]\273\26\321\321\321\270t\351\222\344\302"
#"\277\375\366[\214\349\22\261\261\261\242Vow\355\332uC\224\320M&\23b"
#"bb\4\3550\261\26\v\204V\301/"
#"\277\3742&M\232\244\374\202\305\26\354"
#"\345\367\363\347\317\213\2465\233\315\334\35"
#"\356\365\353\327;Mk0\30\270\305\302"
#"\215\300\346\315\233\21\24\24${G\216"
#"\365\333%u\230\262\205\354\275\306\265k"
#"\327B\243\321`\356\334\2718s\346\f"
#"\200\326^\302\236\262\30\f\6l\332\264"
#"\t\261\261\261\210\217\217\347f\1\316|"
#"\202\263\257\252']\353\261hllDrr2W\247\220\371\242\266\370\340\203"
#"\17\20\30\30\210\312\312J\227\352ui"
#"S\267\274\274\34/\274\360\2\272t\351"
) 500
(
#"\202\370\370x\4\6\6\"((\bIII\b\16\16\306\3\17<\200\335\273w"
#"\203a\30\3165\207F\243\341UG\310"
#"\310\310\200N\247S\324\37\226\20,\26"
#"\v\36y\344\21\20\265\32\276\332\260a"
#"\3\302\303\3031}\372tnw\261\245"
#"\245\205\e\346,\26\v\366\354\331\203\301"
#"\203\a#!!A\322\233,\4\267w\317O\235:\305\365\216\274\274<\207-L"
#"\213\305\302\231T\353\331\263\247\335\30\317"
#"ZA\4\204MT(\211\0313f\200\250U\361\235}\350\325\325\325\334\356c\317"
#"\236=\21\24\24\204N\235:a\360\340\301\320h4\308p >\371\344\23\267"
#"=\34\335\220;,\215\215\215\234\321\251"
#"{\357\275\27MMM\234\355\244\214\214"
#"\f\324\325\325q\17\303\325\231\215\30X"
#"\23n\35:t\20\334\351;}\3724\327\226\237~\372\t\325\325\325n\271]\265"
#"\305\r\273,TUU\305y^\e?~<\254V+\324j5\257\236\265\22\16"
#"\310l\361\361\307\37\203\210\340\355\355-"
#"\272\353&\245-\256\340\206\336\312:u"
#"\352\24Gl[\335\tv\361\2434\276"
#"\371\346\e\370\370\370\200\210\260z\365j"
#"\321\364\355\202h\0\370\361\307\37\341\347"
#"\347\a\"\262\363d\\QQ\241\370\30"
#"\235\227\227\307\335\306\225\352\371\270\335\20"
#"\r\0\353\326\255\3\21\301\313\313Kq\0357\26%%%\210\210\210\0\21a\312"
#"\224)\222\363\265+\242\1\340\2157\336\340>N\207\17\37VB\f\16\227.]"
#"B\\\\\34\210\b\303\207\17\227\345\371"
#"\270\335\21\r\0\323\247O\a\21!\"\"B\261\331\206\311d\342\f^\r\0300"
#"@\266\305\307vI\264\331l\306\360\341"
#"\303AD\350\335\273\267\350\236\266\30,"
#"\26\v\247\271\257\325jQUU%\273\214vI4\320\252\375\324\257_?"
#"\20\21\356\277\377~\331.\227l\301\36"
#"\bt\356\334\31g\317\236u\251\214v"
) 500
(
#"K4\320\272\244\217\216\216\6\21\341\361"
#"\307\37wi\221\260h\321\"I\373*bh\327D\3\300/\277\374\302Y9\230"
#"7o\236\254\274k\327\256\345f1\356"
#"\252\b\3374\242\245\270\351PJ\270\35;vp\213\v\276\e\4|\330\271s'"
#"|}}\35\346\345\256BN[\30\206AZZ\232\2447\320i\211R\335t("
#"\331\v\326\254Y\3\"\202\217\217\17v"
#"\354\330\3414\355\361\343\307\271\267\340\245"
#"\227^R\244~)ma\30\6\265\265\265\310\310\310\220\274e j\233T\212\233"
#"\16\245_7\366&W\307\216\35\361\313/\277\360\246)++Cdd$\210Z"
#"o\353*\266\371#\241-m\317J\335"
#"&Z\212\233\16\251\302\311\305\344\311\223"
#"AD\210\216\216Fyy\271]\334\225+W\320\273wo\20\21\206\16\35\352\326"
#"L\245-\344\264\205%\334m\242Y\b\271\351pE8\251hii\341\264\233\372"
#"\366\355\313\351\376555a\320\240A j\325\265S\3328,_[jkk"
#"9_\3\266o\216\242D;s\323\341L8%P__\317\3357\0376l\30"
#"\232\233\2331n\3348\20\265^\207v\365X\311\31\370\332b;L\330\256`\25"
#"#\332\231\233\0161\341\224Bii)"
#"\2679\304\222\256V\253q\352\324)\217"
#"\324\307\327\26\253\325\312\5[(F\264\220\233\16)\302)\211#G\216pS8"
#"ooo\354\331\263\307cuyj\214\26Tr\4@W\257^\245\237\177\376\331"
#"N\351O\255Vs*\2567\n\347\316"
#"\235\343\324\270\254V+\375\372\353\2577"
#"\264~E\340f\a\0\340\331\36\275{\367n\356\240\200\35\237}}}\261{\367"
#"n\217\324\347\251\266\334\322D\347\347\347"
#"\243S\247N \"\314\2313\a\300o\336\216<5N\377\356\210\276"
#"p\341\2\267\321\224\236\236\316M\253"
#"\30\206\301\204\t\23@D\210\211\211"
) 500
(
#"qi+\324\31~WD\327\327\327#!!\201\333:m\253S\321\324\324\204\373"
#"\356\273\17D\204\201\3\a\272}\35\316"
#"\26\236\"Z\366]\360\312\312J\372\362"
#"\313/y\343\226/_\316\375\335\263gOz\344\221G\344\26O---4f"
#"\314\30:u\352\24%$$\320\346\315\233\311\337\337\337.M@@\0m\331\262"
#"\205\356\275\367^:v\354\30\245\247\247"
#"\323\226-[\310\333\333[V]&\223\211\326\254Y#\332\26\215FC\223'O"
#"\226\335\26;\310}2&\223\211\263\300"
#"\350,\374\363\237\377\224\375\324\31\206\301"
#"c\217=\306-\275/\\\270\3404\375\271s\347\20\32\32\n\"\302_\377\372W"
#"\331\365\1\322\fk\311\271-,\4\227"
#"\336\221\247\237~\332\251`\376\376\376.9A\2303g\16\210\b\235:u\222l"
#"\207c\377\376\375\234\326\352\342\305\213e"
#"\327\271l\3312Q\242\2056\266\344\300"
#"%\242\367\355\333\347T\260\364\364t\247"
#"\371\27-Z\344`X\225\365T\341\347"
#"\347\307M\335\364z\275$\343\260\2336"
#"m\202J\245\202J\245\302\306\215\e\355"
#"\3426o\336\354\324\24Puu\265S"
#"\243\266\375\373\367\27\255_\n\\\36\365"
#"{\365\352%(\334\267\337~+\230\357"
#"\312\225+\360\363\363C\267n\3358\255"
#"\371\317?\377\234#\352\263\317>\203\321h\344l5I=\35_\272t)\3676"
#"\261z\317\357\277\377>T*\25\22\22"
#"\22\234\346e7\314\370\302{\357\275'\215\20\21\270L4{F\3276DEE"
#"9\275c\315:L\240\377\316\205\263\263"
#"\263\341\357\357\17\242Vg\271\300o\327"
#"\236\345\20\r\0\231\231\231 j=\234"
#"\235:u\252\235\\\316\364\240\277\370\342"
#"\v\336\266\370\370\370(fn\331e\242/\\\270\0\225J\345 \234\330I\a"
#"\353\375\270m\2305k\226]:V\333T\16\321\266\372\317mCff\246`"
) 500
(
#"\276\266\246\330\3300f\314\30\311u\213\301%#\260DD]\273v\245\a\37|"
#"\320\341\377S\247N\25\314s\374\370q"
#"\372\345\227_x\343z\364\350\341\252("
#"\34\352\352\352\350\322\245K\274q\237}"
#"\366\31]\277~\2357\316\317\317\217\327"
#"\230\240\263\266\310\206;Oi\375\372\365"
#"v=@\354\332\356s\317=\347\364#:w\356\\\273\25 \311\350\321EEE"
#"\210\215\215uZ\2763\37\2yyyviCCCe\251\222\211\301-\242M"
#"&\23w8J\"sg1\233\323l`\25\22\345\20}\371\362eDEE\211"
#"\226\235\226\226\346\264\34\3339\265\22s"
#"g[\270\275\326d\347\324bs\347\r\e68%A\245Ra\312\224)\34\261"
#"r{tYY\31\236x\342\t\336\357\6\e\274\275\275\235\32\6gg.\244\320"
#"\334\331\26n\23\315\316\251\305\346\316\303"
#"\206\r\23$`\314\2301(((\260K\357\312\307\20hU\304a\315\332\363\205"
#"e\313\226\t\346e\347\324J\315\235m"
#"\241\310\356I\257^\275\234\316\235\313\312"
#"\312x{\332\220!C$[\216\221\213\335\273ws\236\227mC\337\276}\235\346"
#"KKKSl\356l\vE\210\316\311\311q:wf/\352\260!))\t;"
#"w\356T\242j\247`\30\6\e7nD\317\236=\355\352?z\364\250`\236-"
#"[\266x\304U\211b\373\201B_h\206a8\323\303\361\361\361\330\264i\223b"
#"\312.rd[\271r%\302\303\303y\347\354m\241\244\236\b\v\227\210\266X,"
#"\330\265k\27\236y\346\31h\265Z\370\373\373# \0\21\21\21\30>|8"
#"\226-[\306)\200\177\377\375\367\350\332"
#"\265+\326\254Y#\333*\227\322hhh\300\202\5\v\240\325j\271\216\3010\f"
#"\216\37?\2169s\346 >>\36\301\301\301\b"
#"\b\b@\347\316\235\221\222\222\202\327_\177]\21"
) 500
(
#"\317\32\262\211>w\356\34\6\r\32\204"
#"\204\204\4,]\272\24\347\316\235\203\311"
#"d\2\3030\250\251\251\301\227_~\211\251S\247\"<<\34\331\331\3318q\342"
#"\4\232\232\232\334\26TI\324\324\324\340"
#"\322\245K\270t\351\22F\217\36\215."
#"]\272`\341\302\205\310\317\317\347\24r.]\272\204]\273v\341\205\27^@H"
#"H\b^|\361E\267\256\345\311\"\372"
#"\304\211\23\b\r\r\305\307\37\177,Z"
#"\351\311\223'\221\234\234\214\177\375\353_.\v\347ITWW#&&\6o\276"
#"\371\246\250\271\345\362\362r\214\35;\226"
#"\327\254\204TH&\372\354\331\263 \222"
#"\347m\336d2\201\210\24\265\325\241\4._\276,\272\300j\v\206a\240\321h"
#"0m\3324\227\2761\222\210nllDll,\326\256]+\273\202\246\246&"
#"$$$\310\366\207u\371\362edgg#))\211\367\262\276\253\260X,\30"
#"2d\b\346\316\235+;\257\325j\305\310\221#]re\"\211\350\325\253Wc"
#"\330\260a\274q\205\205\205\310\312\312\342"
#"\202^\257wx\342\333\266mC\237>}D\207\e\263\331\214m\333\266a\374\370"
#"\361\234f\22\21\277\223\6W!f\376\223\205N\247\343U\205;{\366,4\32"
#"\215l\345JID'%%\t\252a\261\366\341X\222322x_\255\1\3"
#"\6\bZ}9y\362$\364z=\247c\3276(I\264N\247\303\207\37~\350"
#"4\rk\0\205\335\37o\213\364\364t\a\177`b\20%\372\342\305\213\b\v\v"
#"\23\234\232%&&\242\260\260P\264\242"
#"\5\v\26\330\335M\261\35\32\3046\203"
#"\224\"\232a\30\250\325j\247\v\22\326"
#"\210\25\21\t\36\201m\330\260A\266\327"
#":\321\375\350\262\2622\352\321\243\207\340Q\376\265k\327(>>\236T"
#"*\25\205\204\204PQQ\21o\272^\275zQII\tm\337\276\235"
) 500
(
#"&L\230@\221\221\2214k\326,:z\364\250\230\b\24\27\27G*\225\312\355"
#"\20\21\21AV\253\225\302\302\302\4\353"
#"\n\17\17\247\374\374|JMM%\243\321(\330\226\322\322RQ\271m!Jt"
#"MM\rEFF\362\3061\fCeee\224\232\232J\205\205\205\364\360\303\17"
#"S||<UVV:\244\215\212\212\242\352\352jB\353[$KH\245\3000"
#"\fEDD\b\306\217\0325\212t:\35\365\355\333\227.\\\270@AAA\274"
#"\351\242\242\242\4\355\243\nB\254\313\357"
#"\337\277\337\351\206~\333\217\212Z\255\346"
#"\265\266\273~\375zL\2324\211\373}\371\362e,_\276\34\3\a\16\274aC"
#"G]]\35:u\352\304\e\227\233\233"
#"\v\242\326\e\r\254\245\205\324\324T\336"
#"\333\274G\217\36\225\275\303'\332\243\265"
#"Z-\235?\177\236\254V\253C\234\311"
#"d\242\257\276\372\312\356\177j\265\232\267"
#"'\234;w\216\272w\357\316\375\326h"
#"4\334\320\221\237\237Os\346\314q\332"
#"\333\224\200Z\255&\225J\305{\334u\361\342E\"\"\32<x0u\351\322\205"
#"SY\0363f\214C\332\242\242\"\371GoR\236FRR\22~\376\371g\207"
#"\377\263f\324\330\331\4k#\211o\17"
#"\331\331\254\203\205\331l\306\326\255[1"
#"n\3348\217M\357t:\235\244;\214Z\255Vp\3261i\322$\345g\35\200"
#"\363y4;\275c\3\237pR\347\321\266\260\35Z\332\22m0\30\220\232\232\312"
#"Y.\227\343nI\352<Z\253\325\362"
#"\316:\316\236=\213\320\320P\247\306\300\371 ye\330\275{wA#&V\253"
#"\25F\243\221\227\310\346\346ft\353\326"
#"\315A\203\310U\30\215F\356\374\357\310\221#\334\26\254T\260+Cg'-B"
#"\260Z\255HNNviKA\262\204\371\371\371\b"
#"\f\f\24\275\315j\v\223\311\204\204\204\4<\377\374"
) 394
(
#"\363\262\5\23\2{K\214\205\331l\6"
#"\221<7{\325\325\325\210\216\216\226\345"
#"5\216a\30\214\e7\16\361\361\361\236\333\353`QPP\0\"\302\252U\253D"
#"\207\201\202\202\2\334y\347\235\2306m"
#"\232l\241\234\301`0\330)@\26\26\26\202\2108k\346R\301n,\351\365z"
#"\311\273w\17>\370\240\313^\341d\357"
#"G\27\25\25a\320\240A\350\323\247\17"
#"\226.]\212\342\342b\273\375\350/\276\370\2\323\246MCXX\30\226/_\356"
#"\222P\2660\32\215\334\215\260\266\n\351"
#"\254~\236\230\32\201\20l\367\243\27,"
#"X\300\273\37={\366ln?\332\235\203\v\227OXv\356\334\211g\236y\6"
#"111v',#F\214\300\322\245Ke\233\330\21\202\255\251av?\230\265"
#"VND\262\275G\264\5{\302\242\327"
#"\353\321\273wo\4\a\a\303\337\337\237\2F#\305\0\0\0\205IDAT;"
#"ay\343\2157\249a\221\355\224L\bf\263\231|}}\225(\312\16\260Y"
#"Izyy\221\305b!___\322\351t\364\331g\237)^\37Q\353\255\203"
#"\266\267\f\334\205bD\337(\254Z\265"
#"\212233\251\242\242\202\373\237\331l"
#"\246\230\230\30^\307\a\267\n\24p\341~cQ[[KD\344\340#\261\264\264"
#"\224\327\377\313\255\202\377\271\36\375\277\n"
#"\227\325v\377\200<\374A\364\r\302\37D\337 \374?\316"
#"^\227\311\262\6}:\0\0\0\0IEND\256B`\202"
) 0 0 0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 2 #" ("
0 0 15 3 6 #"define"
0 0 24 3 1 #" "
0 0 14 3 12 #"weighted-dag"
0 0 24 29 1 #"\n"
0 0 24 3 4 #" ("
0 0 15 3 3 #"let"
0 0 24 3 3 #" (("
0 0 14 3 1 #"g"
0 0 24 3 2 #" ("
0 0 14 3 3 #"new"
0 0 24 3 1 #" "
0 0 21 3 2 #"#t"
0 0 24 3 1 #" "
0 0 21 3 1 #"6"
0 0 24 3 3 #")))"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"5"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"6"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"7"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"5"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 2 #"-1"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"5"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 1 #"5"
0 0 24 3 1 #" "
0 0 21 3 2 #"-2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 5 #" "
0 0 14 3 1 #"g"
0 0 24 3 2 #"))"
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 7 64 4 0 0 0 1 2 55 2 1 #"\0"
2 -1.0 -1.0 0.0 0.0 0 22 500
(
#"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\242\0\0\0\222\b"
#"\6\0\0\0\306\210\21\266\0\0 \0IDATx\234\355]yXU\325\372"
#"~\17\207YT\4\1GDH\221\34\320r\316\353\234\26bj\246\211\325\275Z"
#"]3\257\232\206C\327T\254LsH\275\232i\231YY)jJZ\342Ms"
#"\2662\315J\257\32*\223\202\"\212\n"
#"r\3400\234\363\376\376\340\267W\a\331"
#"g\202}\6\214\367y\366\363\350\331{"
#"\255\365\235\303\267\327\360\r\357\247\"I"
#"\324\240\6\16\206\213\243\5\250A\r\200"
#"\32E\264\nz\275\36\307\217\37Gll,\36|\360A\370\371\371\301\303\303\3"
#"!!!\210\216\216\306\312\225+\221\237\237\357h1\253%j\24\321Bdff"
#"b\320\240A\210\211\211A\335\272u\21"
#"\37\37\217\213\27/B\243\321\340\360\341"
#"\303x\356\271\347p\362\344I\204\205\205"
#"a\325\252U\216\26\267\372\20150\213K\227.\261a\303\206|\367\335wYT"
#"Td\362\3313g\316\260s\347\316\\\267n\235\235\244\273?P\243\210fp\345"
#"\312\25\2`||\274\305m\n\v\v\t\200o\274\361\206\r%\273\277P\2634"
#"\233@qq1\242\242\242\260d\311\22"
#"\214\349\322\342v\236\236\236\320j\265"
#"\370\352\253\257\260q\343F\eJx\377"
#"\240F\21M`\373\366\355\360\362\362\302"
#"\264i\323\214>s\341\302\5\354\332\265"
#"\253\302\347\36\36\36X\272t)\346\317\237\17\235NgK1\357\v\324(\242\t"
#"\254]\273\26s\347\316\225\275WZZ\212\v\27. <<\34\177\374\361\207\354"
#"3\217>\372(\374\375\375\261o\337>[\212y_\240F\21\215 //\17\277"
#"\375\366\e\372\365\353'{\377\303\17?Dxx\270\331~\206\16\35\212"
#"\304\304D\245\305\273\357P\243\210F"
#"\220\236\236\216&M\232\300\323\323S"
) 500
(
#"\366\376\204\t\23@\22\213\27/\206F\2431\332Oxx8RRRl%\346"
#"}\203\32E4\202\254\254,4j\324\250\312\3754j\324\bYYY\nHt"
#"\177\243F\21\215 ((\b\327\256]\253r?\327\256]CPP\220\2\22\335"
#"\337\250QD#h\332\264)222PRRR\245~.]\272\204f\315\232"
#")$\325\375\213\32E4\202z\365\352"
#"\241M\2336\330\277\177\177\225\372IH"
#"H\300\240A\203\24\222\352\376E\215\""
#"\232\300\v/\274\200\5\v\26T\272\375"
#"\261c\307\220\236\236\216\376\375\373+("
#"\325}\nG\273v\234\31\5\5\5l\321\242\5\267m\333fu\333\222\222\22\266"
#"j\325\212\37|\360\201\r$\273\377P3#\32AVV\26\22\22\22\260u\353"
#"V\214\35;\326*[`ii)\372\366\355\213v\355\332\241}\373\3668{\366"
#"\254\r%\275?P\243\210\377\217\222\222"
#"\22\34<x\20\257\275\366\32:t\350\200F\215\32!))\t\221\221\2218q"
#"\342\4\242\242\242\360\376\373\357C\257\327"
#"\233\354'--\r\217?\3768\352\327"
#"\257\217\315\2337\243a\303\206\350\326\255"
#"\e\2325k\206\227_~\31;w\3564iw\374\313\302\321S\262#\221\222\222"
#"\302\367\337\177\237C\206\fa\355\332\265"
#"\t@\\m\333\266eqq\261x\366"
#"\342\305\213\354\332\265+\333\265k\307\245"
#"K\227\362\314\2313,))!I\346\346\346r\343\306\215\34>|8\353\325\253"
#"\3077\337|\223z\275^\264}\357\275"
#"\367\312\365\355\356\356\316\376\375\373\363\335"
#"w\337\345\371\363\347\355\376\275\235\21\177"
#")E\324h4\374\366\333o9y\362d\266l\331\262\234r\30^j\265\232'"
#"N\234\250\320\276\264\264\224{\366\354a@@\0\325j5]]]\351"
#"\343\343\303\272u\353\322\317\317\217*"
#"\225\212\337\177\377}\205vz\275\236="
) 500
(
#"z\364\20\375\253T\252r\343\205\204\204"
#"p\302\204\t\334\265k\0275\32\215=~\n\247\303_F\21w\354\330A\17\17"
#"\217r\np\257BH\327\214\0313\214"
#"\366\223\236\236N\0\364\365\365\245N\247"
#"c~~>Ir\312\224)\4\300\351\323\247\313\266\373\343\217?*\214/wy"
#"xx0&&\246\334\214\372W\300_F\21u:\35\373\364\351cV\21\302\303"
#"\303YXXh\264\237/\277\374\222\0\30\35\35]\356\363#G\216\20\0CC"
#"C\215\266}\373\355\267\315\216\17\200;w\356T\354{W\27\374e\24\221$3"
#"33Y\277~}\331?\276J\245\242\213\213\v\217\36=j\262\217\t\23&\20"
#"\0\337y\347\235r\237\353t:6h\320\200\0\370\353\257\277\312\266-))a"
#"dd\244I%|\365\325W\25\373\276\325\t\177)E$\311w\336y\207*\225"
#"JvY\2364i\222\331\366\355\332\265"
#"#\0Y\205}\371\345\227\t\200\263g"
#"\3176\332\376\344\311\223T\253\325\262\343"
#"\a\a\a\227; \375\225\360\227Q\304\322\322R\316\235;\227...\2623Q"
#"\363\346\315\305~\317\30rss\351\342\342Bwww\331\345{\337\276}\4\300"
#"\210\210\b\223\375L\237>\335\350\2148"
#"d\310\20\346\344\344T\351\273VG\374"
#"%\24\361\362\345\313\374\333\337\376F\0"
#"tqq\341\353\257\277\316\207\37~\270"
#"\234\2\354\333\267\317l?\273w\357&"
#"\0>\362\310#\262\367KJJ\350\357\357O\0<w\356\234\321~\n\n\n\370"
#"\300\3\17T8 \325\253WO\314\214"
#"\307\216\35\253\364\367\255\216p\230\"\246"
#"\246\246222\222\221\221\221\\\275z"
#"\265\315\306\331\261c\a\375\374\374\b\200"
#"\215\e7\346\201\3\aH\226\331\5%\333\341\213/\276hQ_\263f"
#"\315\"\0\316\2349\323\3503\317?"
#"\377<\1\360\255\267\3362\331\327\201\3"
) 500
(
#"\a\304\362\374\362\313/\223$\323\322\322"
#"\330\265kW\2\240\253\253+\27-ZT\345\323\263V\253eHH\210\323\237\302"
#"\35\242\210\331\331\331\4\300\270\2708\356"
#"\335\273W\366\24ZUh\265ZN\2348Q\3148\321\321\321\274y\363f\271g"
#"6n\334\310\306\215\e\363\316\235;\26"
#"\365\331\263gO\2\340\256]\273\214>"
#"\363\355\267\337\22\0\333\267oo\266\277"
#"\177\376\363\237\214\214\214,\267\314\227\224"
#"\224p\372\364\351BI\a\16\34\310\354"
#"\354l\213\344\223\203\257\257/\1P\247"
#"\323U\272\17{\300!\212\30\27\27\307"
#"\220\220\20\361\377\23'NPI'\317"
#"\371\363\347\305\351\324\335\335\235\313\227/"
#"7\372\354\245K\227,\352\263\270\270\230^^^T\251T\25\24\332\20EEE"
#"\254S\247\16\001099\331d\237w"
#"\356\334\341\305\213\27e\357\355\336\275["
#"\234\360\e6l\310\375\373\367[$\247"
#"!\342\342\342\304\213X\243\2102\320\351"
#"t\342\312\316\316fdd\244b3\342\206\r\eX\253V-\2`\213\26-x"
#"\352\324)E\372\375\341\207\37\b\200\255"
#"[\2676\373\3543\317<C\0\\\274"
#"xq\225\306\314\314\314d\257^\275\304\336v\336\274y\26+TRR\22\1P"
#"\243\321\324(\2429\254^\275Z\274\261qqqU\352+77\227111\242"
#"\277\347\236{\216w\357\336UFP\222"
#"\213\27/&\0\276\364\322Kf\237\335\276};\1\260K\227.U\36\267\264\264"
#"\224s\346\314\21\247\375\336\275{333\323d\e\235NG\0LJJ\"I"
#"\2\250\331#Z\202\235;w\22\0\265Zm\245\332\377\374\363\317\f\v\v#\0"
#"\372\370\370\360\263\317>SXB\362\211"
#"'\236 \0n\334\270\321\354\263\5\5\5\254U\253\26U*\25\257\\\271"
#"\242\310\370\373\367\357g\303\206\r\t\200\1\1\1LLL4\372ltt4"
) 500
(
#"\0010##\203\247O\237&\0\369rD\4i8#\34\242\210!!!\345"
#"N\312z\275\236\0\230\232\232jU?"
#"z\275\236K\227.\245\233\233\e\1\360"
#"\241\207\36\342\205\v\27\24\226\266\f\322"
#"~\315R\31\237z\352)\2\340\177\376\363\37\305d\270~\375:\a\f\30 <"
#"A\257\275\366\232\254rEGG\213C\212\341e\355\357kO8D\21\245e."
#"//\217z\275^l\252\255Y>\262\263\263\371\330c\217\211\37\371\225W^1"
#"\313\324UY\234;wN\34\32,\305\246M\233\b\200={\366TT\26\275^"
#"\317\5\v\26\320\325\325\225\0\330\255["
#"7\246\247\247\233|\276fi6\202\222"
#"\222\22\206\204\204\224{[\345\302\256\214"
#"a\337\276}\302\257[\277~}\223\346"
#"\24%\360\341\207\37\22\0\237~\372i"
#"\213\333\344\345\345\321\303\303\203..."
#"\314\312\312R\\\246\243G\217\262i\323\246\4\300z\365\3521!!A\3669I"
#"\21k\16+&\240\321h\254\212\277+"
#"))\341\254Y\263\254\332\270+\201\277"
#"\377\375\357\4\300U\253VY\325n\360"
#"\340\301\4\300\265k\327\332D\256\234\234"
#"\34\261w\265\365\252`k8\305a\305"
#"\22\244\245\245\261[\267n\4\312\2W"
#"\337x\343\r\273\275\345\241\241\241&\243"
#"j\214\341\223O>!\0>\372\350\243"
#"6\222\254\f\313\226-\243\273\273;\1"
#"\360\341\207\37\266\3306\352L\250\26\212"
#"\270m\3336\261\371n\332\264)\217\34"
#"9b\267\261\263\262\262\b\200\265k\327fii\251Umo\335\272EWWW"
#"\272\272\272\332<\220\341\304\211\23\342\205"
#"\251S\247\0167o\336l\323\361\224\206S+bAA\1\307\217\37/\226\236\241"
#"C\207\332=2e\353\326\255\302\325V\31H\247\334\r\e6(+\230\fr"
#"ss9b\304\b\361{\275\364\322K,((\260\371\270J\300i\25\361\177"
) 500
(
#"\377\373\37\333\264iC\0\364\364\364\344"
#"{\357\275\347\209^y\345\25\213\202"
#"\30\214\341\203\17>\260\211/\335\24\326\254YCOOO\2eI`\325!A"
#"\313)\25\361\303\17?\244\227\227\27\1"
#"\260U\253V\374\375\367\337\35&\213\24.V\31_/Yf\373sqq\241\207"
#"\207\a\363\362\362\24\226\3168~\377\375"
#"w\206\207\207\23\0k\325\252\305O>\371\304ncW\6N\245\210w\356\334)"
#"\267\264\214\35;\326\241Ym\371\371\371b\217g.h\326\24$\177\361\227_~"
#"\251\240t\346\221\237\237/N\374\0\370"
#"\367\277\377\275J\337\303\226p\32E\374"
#"\361\307\37\205m\261N\235:v\377\243"
#"\311A\nQ\353\334\271s\225\372Y\271r%\1p\370\360\341\nIf\35\f\3"
#"A\302\303\303\35\272\302\30\203\303\25Q"
#"\257\327\363\235w\336\21\236\202N\235:"
#"\231\r\237\262\27$\217OU\23\232\256\\\271B\225JEooo\207\315\360\347"
#"\317\237g\333\266m\305\236\333V\266\315"
#"\312\302\241\212\230\225\225\305G\37}T\370Nccc\235*y\250_\277~\4"
#"\300\355\333\267W\271/)\362\372\253\257"
#"\276R@\262\312\241\240\240\200\343\306\215"
#"\23K\365\210\21#\230\233\233\3530y\f\3410E\334\263g\17\3\3\3\t\200"
#"\201\201\201&\243I\34\201\322\322R\372"
#"\370\370\20\200\".\272%K\226\20\0"
#"G\217\36\255\200tU\303\346\315\233E\360nhh\250U\356U[\301\356\212X"
#"\\\\\314\0313f\210P\370~\375\372"
#"\361\332\265k\366\26\303,\244\250\361\226"
#"-[*\322_rr\262\330\377:\203\e\356\322\245K\302\"`.\212\335\36\260"
#"\253\"&''\263s\347\316\"9h\301\202\5N\353\214_\276|9\1\360\371"
#"\347\237W\254\317\16\35:\20\0\277\371\346\e\305\372"
#"\254\n\212\212\2128y\362d\261T?\361\304\23\16K"
) 500
(
#"e\265\233\"\32.\a\315\2325\343\17"
#"?\374`\257\241+\205\341\303\207\23\0"
#"?\376\370c\305\372\234?\177\2760K9\23\22\22\22D*k\323\246M\315\262"
#"]\330\0026WD\215F\303\27^xA\274uO=\365\24o\337\276m\353a"
#"\253\f)\32\332T\240\255N\247\23\211`111\274u\353\226\311>\317\237?"
#"O\0\364\363\363s\272h\351\364\364t"
#"\21T\342\352\352\312\205\v\27\3325\206"
#"\321\246\212x\372\364iFDD\20\0\275\274\274\234\316d`\f\27/^\24!"
#"\371\246\340\353\353\313\220\220\20\2368q"
#"B\204\347\233S\260\a\37|\220\0\270w\357^%EV\4%%%\2349s"
#"\246\330\277\17\0300\200\327\257_\267\313"
#"\330f\25\261\244\244\204?\375\364\23w"
#"\355\332\305\35;v\360\350\321\243\269"
#"\322\337\177\377}\341\357l\335\2725\317"
#"\2349\243\210\300\366\300\206\r\e\b\200"
#"O>\371\244\321g\244\200S\303\234c\303\204%c\2303g\16\1p\374\370\361"
#"\212\311\2534\22\23\23\31\20\20`q*\253^\257gzz:\367\357\337\317/"
#"\277\374\222\373\366\355\263:\24\315\250\""
#"\236?\177\236\243G\217\246\257\257/;"
#"v\354\310\250\250(\16\e6\214\335\273"
#"w\247\217\217\17\a\16\34(\273\317\273"
#"u\353\26\207\r\e&\226\342q\343\306U\233\b\20\t\322Vb\331\262e&\237"
#"\v\t\ta\317\236=\231\232\232*\354s\346\16_\277\375\366\e\0010((\310"
#"i\17jdY*k\357\336\275E*\353\334\271s+\204\301\345\345\345q\325\252"
#"Ul\335\2725\e6l\310^\275zq\364\350\321\354\323\247\17\2336m\312V"
#"\255Zq\311\222%\26m\305d\25q\336\274y\f\f\f\344\262e\313dM+"
#"w\356\334\341\347\237\177\316\246M\233\362\305\27_\24"
#"\2\36=z\224\301\301\301\4\300\272u\353r\313\226"
) 500
(
#"-\225\371\r\34\216V\255Z\21\0\177"
#"\376\371g\223\317\31\32\207\2012\362N"
#"K\366UR\306\341\341\303\207\225\22\331"
#"&\220\366\300RD|\257^\275DD"
#"\374\357\277\377\316\220\220\20FEE\361"
#"\247\237~\222\375\336\277\374\362\v\237|"
#"\362I6j\324\210\277\374\362\213\311\261"
#"*(\342\277\377\375ov\350\320\301\"-.**\342\343\217?\316i\323\246q"
#"\301\202\5T\253\325\4\300\256]\273:u\306\230)\334\274yS\270\343Lyy"
#"$\332\224\323\247O\223,\233\35\0\313H6g\314\230!B\373\253\3\356Me"
#"\335\260a\3=<<,&\24\335\277"
#"\177?\1\230\324\251r\212\370\372\353\257"
#"\23\200\325\6Wi\3n*\305\261\272 !!\201\0\330\267o_\223\317ed"
#"d\20(\377\36GFFZD\24p\374\370qa*q\366\354:\t\331\331\331"
#"\348p\240\230\375\255\365\204m\333\266"
#"\215\376\376\376F\3.\304/y\342\304\t6l\330\320(;\202\241\231\342^E"
#"\323\353\365\f\v\v\343\254Y\263\254\22\316\0311m\3324\2\340\2349sL>"
#"'\315\210\361\361\361$\377TLi\2064\5\275^/2\360\216\37?\256\210\334"
#"\326`\314\2301\214\217\217\267\232\320@"
#"\247\323\261u\353\326\262\34\343\222~H"
#"{f9l\331\262\205\35:t\220\235\250\204\"\16\36<\230k\326\254\221\355@"
#"\332\v\359rD0b\335\373&\377\360\303\17\f\r\r\265:\257\303\331 \5"
#"'\374\367\277\3775\373\254t\2726<\230Y\n)\362\333\24q\274\255 -\263"
#"\365\352\325\343\204\t\23\314\356\205%\354"
#"\337\277\237\21\21\21\25\376\306\22\341\325"
#"\211\23'\30\e\eK\300x2\177\227.]\270c\307\216\n\237\203,\v\240\364"
#"\361\361\221\215 \226H|\f\215\265\222R\336\213\226"
#"-[\232\335\224:3\n\v\v\351\356\356N\27\27"
) 500
(
#"\27\213\243Rt:\0355\32\215\325\263"
#"\313\341\303\207\t\200aaa\225\21\265"
#"J\220\24\321\360z\360\301\a\271h\321\"^\275z\325h\273I\223&q\301\202"
#"\5\345>\223xv\fu'$$\304\350\26e\315\2325|\366\331g+|\16"
#"\262\214\323o\300\200\1\262\rSSS+\314\200\306\6\232>}z\5A\253\23"
#"\16\36<H\0\354\320\241\203\315\307\322"
#"\351t\f\n\n\"\0\376\366\333o6\37\317\20r\212(]j\265\232\217?\376"
#"\270\354\322\335\262eKY&\\\303\350"
#"\35\311\276j,Y\354\352\325\253\f\n\n\252\360\271+\0\\\277~\35\r\e6"
#"\204\34\334\334\334\0\0:\235\16\256\256\256\342\363Z\265jUx6 \0{"
#"\366\354AQQ\221l_\316\216#G\216\0\0\334\335\3351o\336<\233\217\327"
#"\264iS\\\277~\35\257\274\362\nz"
#"\367\356m\363\361$\344\347\347\e\275\247"
#"\327\353\221\230\230\210\304\304D\324\253W"
#"\17\243F\215\302\2301c\320\271sgdgg\313\26A\357\330\261#\0 3"
#"3\23M\2324\1\0\304\304\304\310\366"
#"\37\30\30\210\2337oB\257\327\303\305"
#"\345\317\n|\256\0PPP\200\332\265k\233\24\336\260\21\0\331zrW\257^"
#"\305\376\375\373\253\\\343\330\3218~\374"
#"8\216\37?n\267\361\16\35:\204C\207\16\331m<S )\376}\373\366m"
#"l\331\262\5j\265\32\215\0325\202V"
#"\253\205\217\217\217l\273\301\203\a\343\233"
#"o\276ALL\f\276\370\342\v\250T*\331\347\324j5<==\241\325j\341"
#"\355\355->w\5\200\6\r\32\340\373"
#"\357\277\227m\350\356\356\16\0\34548"
#"--\r\303\207\17\257\360l\355\332\265"
#"\21\25\25\205N\235:Y\362\235\235\16\213\26-\202V\253\305\253\257\276"
#"j\366\305T\2$\261d\311\22\24"
#"\26\26b\342\304\211\360\367\367\267\371\230"
) 500
(
#"\0\260l\3312\334\275{\267\334g*\225J(\241\253\253+\36{\3541\214\31"
#"3\6\203\a\17\26:\20\30\30\210\254\254,\4\a\a\227k\333\253W/\34>"
#"|\30\267n\335B\275z\365L\216\235\233\233\v777xyy\225\277A\226"
#"\321y\324\257_\337\250M\v\6y\271\322IQ\356`\323\267o_~\375\365\327"
#"\262}8;$\327[\363\346\315\355:"
#"\356\330\261c\t\200\363\347\317\267\333\230"
#"\306\366\210m\332\264\341\322\245K\215F"
#"\244\17\e6\254\2\367\244d\310\217\217"
#"\217\347\255[\267\230\221\221\301\324\324T"
#"\243\2719\273v\355b\357\336\275+|\16\262l\343\34\21\21a4FP\262\231"
#"I\227\\hyNN\16}}}-&Fw6H\25D\237{\3569\273\216"
#"\373\3157\337\330\355\200$\301P\21\375"
#"\375\3759q\342D\236<y\322l\273"
#"\265k\327r\304\210\21\345>\223\354\247"
#"\367^\306N\315\343\306\215\343\302\205\v"
#"+|.\354\210\e7nd\367\356\335\215\n\241\327\353\231\227\227g\324k2~"
#"\374x\243\5\21\253\3F\215\32E\0v\2578\257\325jE\300pJJ\212]"
#"\306l\332\264)\243\243\243\271m\3336"
#"\253\274hZ\255\226\215\e7\256\264\21"
#"\376\374\371\363\254_\277\276\254iL(bqq1;u\352\304\327_\177\335\352"
#"\1\336{\357=6j\324\210g\317\236u\212|\214\312@\362t\234={\326\356"
#"c\217\36=\232\0\270d\311\22\273\214g.\200\327\24>\373\3543FDDX"
#"\335GAA\1\1\343\f\272\345\234\245"
#"W\257^\245\227\227\227U\304\352\237}"
#"\366\31\0010==\235\311\311\311\f\f"
#"\fd\317\236=\371\372\353\257311\321i\322\25M!--Mx\32\34\341"
#"\373\375\352\253\257D\260Hu\300\324\251S\331\244I"
#"\23\213\377\266\205\205\205l\327\256\235\311\32\205\25\242"
) 500
(
#"o\356\336\275\313\340\340`>\363\3143"
#"&I0\363\363\363\31\35\35\315\240\240"
#"\240r.\242\215\e7\226\333+\270\270"
#"\270\260}\373\366\2344i\22\343\343\343"
#"MZ\356\35\205\317?\377\234\08x"
#"\360`\207\214\257\321h\350\355\355M\225"
#"J\305\214\214\f\207\310`-\26,X\300\6\r\32p\323\246M&\237\333\261c"
#"\a[\265j\305\251S\247\232|\311e"
#"\343\21\363\363\3639w\356\\\372\371\371"
#"\261_\277~\\\261b\5\277\374\362K"
#"n\337\276\235\357\277\377>\207\r\e&"
#"\312\207=\374\360\303\25\332KK\r _\234;44\224\377\370\307?\270n\335"
#":\376\361\307\37V\376\4\312C\252*"
#"\272h\321\"\207\311 %k\255\\\271\322a2X\213\335\273w\263s\347\316l"
#"\321\242\5\247M\233\306u\353\326q\367"
#"\356\335\\\277~=\377\375\357\1773\""
#"\"\202\221\221\221\334\266m\233\331\276T"
#"\244\201\5S\306\346s\360\340A\354\333\267\0177n\334@II\t\2\3\3\321"
#"\275{wt\357\336\35\217<\362\b\256_\277\216-[\266`\304\210\21\242]^"
#"^\36\"##\221\226\226V\241OC{\25\0\324\251S\a\347\316\235C\343\306"
#"\215\215\211as\264k\327\16g\316\234"
#"\301\261c\307\320\275{w\207\310\260i"
#"\323&\214\36=\32\275z\365\302\301\203"
#"\a\35\"Ce\220\231\231\211\354\354l\354\336\275\e)))\310\312\312B``"
#" \2325k\206A\203\6\241c\307\216F\215\333\345P\2257b\315\2325\4\312"
#"*<\335\eDz\354\3301\243u\211a0S\256_\277\276*\"T\31\267o"
#"\337\26\264q\225\255\363\242\4\f\311\337"
#"\355\225\260TU\344\344\344\310\256\210\225"
#"A\225\24\261\244\244Dp\360\311-)\363\346\3153\272<\3\340\343\217?"
#"^\225\341\25\201T\304\261G\217\36\216"
#"\26Ed\2\332\333\204T\31\24\26\26"
) 500
(
#"\262G\217\36\364\361\361Q\244?\227\212"
#"s\244\345puu\305\302\205\v\1\0"
#"o\275\365V\5\267\321\354\331\263\321\275"
#"{\367rK\261\4\27\27\27\f\e6\254*\303+\202\243G\217\2\0z\364\350"
#"\341`I \334\246_}\365\225\203%1\r\275^\217g\237}\26G\217\36\255"
#"\20\203Pi(\241\315\217<\362\b\1\310\332 SSS\205\301\0262\263\343\310"
#"\221#MV\373\2645\244\202\342\316@\3\222\223\223CWWW\272\271\271U\311"
#"\326gkHA\275\370\377$9%\240\210\"J\225;\275\275\275eM>_|"
#"\361E9\345\213\216\216\346\252U\253\4\333VPP\220\321\2025\266DQQ\21"
#"===\251R\251\234\346\17/\321\364"
#"9+\325\360\322\245K\313M(\365\352"
#"\325S\244_\305\230\36\236|\362I\2\340\v/\274 {\377\331g\237\25\202K"
#"\266\304\224\224\24\221;\v\224Q\353\332"
#"S!\216\35;&\234\375\316\202\265k\327:\324\246i\n\2337o\246J\245*"
#"\267\252\371\373\373+\322\267b\212\230\224\224DWWW\252\325jY7Ynn"
#".\2337o\316\317?\377\274\334\347z\275\236+V\254\240\267\2677\2012f\1"
#"[\2274\223\260h\321\"\2\177\262.\2348q\202qqq\342Z\274x1\343"
#"\342\342\354J\302\236\225\225e1\371{"
#"lll\225\252\333[\203C\207\16\321"
#"\303\303\243\302\201\263~\375\372\212\364\257"
#"(\367\315\204\t\23\b\200\203\6\r\222"
#"\275\237\226\226f\264\355\245K\227\304~\r(c\314\2625Y\223T\242Lz9"
#"\216\349\302\230\230\30\216\e7\216\261"
#"\261\261\202\323\333\336\336\16)A\315\230"
#"\327B\243\3210>>\336d\222\222\2228{\366\254l\265S\240\214dU\t("
#"\252\210\327\257_\27\36\227\203\a\17Z\335^\257"
#"\327\363\335w\337\25\245-\0327n\314\335\273w+"
) 500
(
#")b\271\261\374\375\375\t\300\350\v\342"
#"\353\353[\256\234\257\275\360\237\377\374\207"
#"@\31s\232\34\244\2549{(bff\246`\357\220\273\0324h\240\3108\212"
#"\263\201\275\371\346\233\4\312H\331+\e"
#"@p\341\302\5v\357\336]|\331\27_|Q\3618\307\263g\317\ne\227\303"
#"\352\325\253\251\220Q\301jH\344\357\265"
#"j\3252\312\eT\331\32\327\326 7"
#"7\267\234\322\313]\326\224\0166\5\305\177\351\374\374|\21xi\316!n\n:"
#"\235\216\213\27/\26\214bM\2324\341\236={\24\223S\252\b5j\324\250\n"
#"\367\264Z-\1\313\222\345m\205.]\272\0200N$o\17E<s\346\f\237"
#"z\352)QpR\316\374f\354E\266\0266y\345\245\372\306aaaU\256\22"
#"\360\307\37\177\210\244w\240\254\276\234\22"
#"\207\207\347\236{\216\0dK\2539r6\224 \25W\177\346\231gd\357\333C"
#"\21%\334\274y\223+V\254`\335\272u+\314\210M\2324Qd\f\233\374\332"
#"\245\245\245\202\240s\305\212\25\212\364\267"
#"p\341Bqj\v\16\16\2562\321e\363\346\315\t\310\347\24\3\366)\342h\n"
#"\346\310\337\355\251\210d\331i^2\266"
#"?\377\374\363\202\352888X\221\376"
#"m\366\332\357\334\271S\34\357\225\n\216"
#"=w\356\34;u\352$\336\306\t\23&\30\345\3521\205\253W\257\212?\362\275"
#"\34\205r\314\26\216B\373\366\355\t\200"
#"\337~\373m\205{\366VDi\206\0366l\30\3112_\363\246M\233\24#\273"
#"\267\351\372#\231!^{\3555\305\372,--\345\374\371\363\305\276%$$\304"
#"\352\202\215[\266l!\0>\366\330c"
#"\25\356I\314\26\316\200\267\336z\213\200"
#"|e\3{+\242\264\302\331\312\306k\323_\\\242_\363\362\362R\334"
#"\26w\346\314\31Q'D\245Rq\322\244I\26\27<\224J:\3303"
) 500
(
#"\205\26328w\356\234\360^8\222\352Or\3416h\320\300fr\330\374\325\37"
#"9r$\1p\314\2301\212\367]RR\3027\336x\203nnn\4\312\"\277"
#"\17\35:d\266\335C\17=Ti[\247\275!\315D\373\366\355s\230\f/\276"
#"\370\"\1p\346\314\2316\e\303\346\212"
#"x\351\322%\272\271\271\321\305\305\305f"
#"\346\220\337\177\377]\354\247T*\25\247"
#"L\231b4\301\373\356\335\273T\253\325"
#"tss\253\26\334\336\263g\317&\0"
#"\276\374\362\313\16\31_\243\321\b'\205"
#"-\323:\354\262\31\2324i\222\321=\231R(..\346\2349s\304\354\370\300"
#"\3\17\310\26\256\371\356\273\357\b\200]"
#"\272t\261\231,J\342\327_\177\25\313"
#"\242#\310\337?\375\364S\0020\231\363"
#"\256\4\354\242\2107n\334\0201\211\337"
#"\177\377\275M\307\372\365\327_\331\256]"
#";\2e\31\204\261\261\261\345f\276\271s\347\22\0cccm*\207\222\b\r"
#"\r% \317IikHE\317?\372\350#\233\216c\267\343\341\333o\277M\240"
#",\353\317\326\271\303\305\305\305\2345k"
#"\226\250\1\335\262eKA\247\322\267o_\2\220e-uVL\237>\235\08"
#"e\312\24\273\216{\351\322%\341j\264"
#"u\4\222\335\24\261\240\240\200\215\e7"
#"&\0~\361\305\27v\31\363\344\311\223"
#"l\323\246\215\230\35g\314\230!*\271"
#"\333+|J\t\374\364\323O\212\32\217"
#"-\205D\356o\213\203\346\275\260\253\301"
#"l\375\372\365\4\312\30\267\354EMRTT\304\2313g\212\322\e@YQ\312"
#"\352\4\275^\317&M\232\0200_\373E)\350t:1\246=\352\301\330U\21"
#"u:\235\230\241\336}\367]{\16\315"
#"\237\177\376\231\r\0324\20\263\343\254Y\263\24I\37\265\204M_\tH\266"
#"O[\232P\f\221\230\230(\16}\366"
#"\200\335]\bR\372\246\237\237\237\335\253"
) 500
(
#"\224\16\35:T(\"PV#\260*\325\333\255a\323\257*\16\35:dW\305"
#"\0301b\4\1\330\215\23\335!\276\254"
#">}\372\20\200\335i\354$\362\364\255[\267\212|lWWW\316\2313\307\352"
#"\255\202\265l\372U\205!\371\273\261\2429J!''\207\36\36\36T\253\325v"
#"\213Nw\210\"\236<y\222*\225\212"
#"\236\236\236\274|\371\262]\306\274p\341"
#"\2\1\bF\373\302\302BN\235:U"
#"\314\216m\333\266\345\251S\247\254\352\323"
#"\0326}%\360\322K/\21\0\347\316\235k\2631Hr\345\312\225\4\354K\200"
#"\3400\357~LL\f\201\262\314={\340\343\217?&\0\16\37>\274\334\347\307"
#"\216\35c\213\26-\304\3548o\336<\253c(\rYSmI[\"\31\343["
#"\267nm\2631\310?\243~\266n\335j\323q\f\3410ELII\21\305u"
#"\354Qg\344\371\347\237'\0._\276"
#"\274\302\275\202\202\2N\236<Y\314\216"
#"\221\221\221\26\313$\321\204\304\304\304\330"
#"\334>ZRRB???\233\272\333N\235:%\2-\354I\272\352\320x\247"
#"\251S\247\22\200\321bCJ\242e\313\226\342`a\f\207\17\37\26%l\335\334"
#"\334\370\326[o\231\2146\221\302\334\354"
#"\31\2738f\314\30\2\340\333o\277m\223\376'N\234H\300\376\225S\25UD"
#"\255V\313\220\220\20\213g\6\211\0\36"
#"\0\277\373\356;%E)\a\211\214\276"
#"V\255Zf\303\2304\32\r\377\365\257\177\211\334\214\207\36zH6X\303Z6"
#"}\245\260k\327.!\227\322\320j\265"
#"b\3065u \222\362\275\343\342\342\30"
#"\e\e\313\244\244\244*\217\255\250\"JJe\215s^Jro\337\276\275\315\226"
#"\266\35;v\20\0\373\365\353gq\233\3\a\16\210t\2www."
#"X\260\240\234\22[\313\246\257\24\264"
#"Z\255\210\206Q\232\374}\363\346\315"
) 500
(
#"\302\rk\f\322\367\216\215\215ell,\307\215\e\247HT\225b\212\30\27\27"
#"'\376\30\326(baa\241 R\277\267\206\207R\220l|\326*\311\335\273w"
#"9~\374x1;v\354\330\321!d\357\367B:\350-]\272T\321~\a\f"
#"\30@\0&s\271\223\222\222\30\31\31"
#"\251\350\270\244B\212\230\224\224D\0\""
#"\337\303\332p\245O>\371D\370Rmq\352\224R3+\273\374\177\377\375\367l"
#"\326\254\31\1\320\303\303\203\213\26-r"
#"h9\340m\333\266\21\0\273u\353\246X\237\227/_\246\213\213\v===M"
#"\356y\245\fGi\365S\212\200\300jE\324h4\314\310\310`FF\6\265Z"
#"\2550\354J\373\4\240b-gs\320\351t\302K\261x\361bkE2\211\202"
#"\202\2\272\271\271Q\255VW*\321JB^^\36\377\371\317\177\212Y\277K\227"
#".<\177\376\274\202\222Z\16[\220\277K\3711\367\346yggg\213\277\267^"
#"\257\27\263\361\221#GD\0252%\266#V+\242\341\22\34\e\e+\314\27\31"
#"\31\31<}\372\264\20\322\332\334\206={\366\20(c\vS\362\24z\340\300\1"
#"E7\367\337}\367\235\330Jxzzr\351\322\245\16\tX\225\330\327V\255Z"
#"U\345\276\364z\275\210y\274w\3250"
#"\334\377\246\246\246R\247\323\225\233hV"
#"\257^M__\337*\313`\265\"\352\365z\352t:\361\343GGG\313\22\364"
#"T\306\347\332\277\177\177\305\203V\2457"
#"}\362\344\311\212\365\231\233\233+\354\222"
#"\322\22\251\304\311\321\32H\234\223ru"
#"\355\254\205\364\262\6\a\aWx\251\244"
#"\277\265\364\371\206\r\e\312m\237\342\343"
#"\343\35\243\210\246 \271\271*{\372=u\352\24U*\25=<<L2\207Y"
#"\203\201\3\a\22\0\267l\331\242H\177\206HL"
#"L\0241\226^^^\\\276|\271\335f\307\334"
) 500
(
#"\334\\\272\273\273S\255VW9\266Rb\275\260\304u\b\374Y T:\23\214"
#"\e7\256J\343\2236R\304\252\3741$BOcT\e\326@\247\323\211\24\5"
#"[\25\32\272s\347\16\377\361\217\177\210"
#"\331\261G\217\36\274x\361\242M\306\272"
#"\27\203\6\r\"\0~\370\341\207\225\356#77W\3547-1\aI\aS\351"
#"\212\214\214T\344\345s\216Lr\3\244"
#"\245\245\321\303\303\203*\225\312\352 \204"
#"\364\364t\236<yR\234h\245\304\243\320\320P[\210Z\16\337|\363\r\e5"
#"jD\240\214\302y\345\312\2256w\371"
#"I\376\363\201\3\a\226\373\374\362\345\313"
#"\26+\207DF\325\267o_\253\306\326j\265\212Z8\234N\21Ir\332\264i"
#"\262\6h\215F\303\344\344d\243\355\16"
#"\36<H\0\364\361\361a\377\376\375\31\25\25E\0\34=z\264\255E&Y\347"
#"N;\t\0\0\t\316IDATVlQ\232\321\1\260W\257^&\345\255*"
#"\f\311\337O\235:\305\305\213\27\263s"
#"\347\316T\251T\26+\242d\332\272\227"
#"\311\327\336pJE\274u\353\226 \371ILLdii)?\372\350#6j"
#"\324\310d\365\324\313\227/\313z;\324j5;v\354\310)S\246p\333\266m"
#"6\367\r\177\375\365\327\"\32\274V\255"
#"Z\\\275z\265Mf\307s\347\316\t\337\270\341\345\355\355mQ{\211#\262n"
#"\335\272\16\317\361vJE$\377d\257o\336\2749[\267n-~\344\221#G"
#"\32m\243\323\351D^\263\341e\310\351"
#"W\267n]^\271r\305\346\362\347\344"
#"\344\b\233\e\0\366\351\323G\221\350\355"
#"\344\344d\316\236=\233\255Z\2652\372"
#"\35-\245\23\226V\236\227^z\251\312rU\25N\253\210?\374\360\203 \3514"
#"\274\314\331\3\37x\340\1\331Y\321Q%\327\266o"
#"\337\316\300\300@\261eX\273vm\225\372\313\310\310"
) 500
(
#"\20\221\332\306\256\346\315\233\233\355\247\244"
#"\244D\364S\331B\340J\302\351\024199\231\243F\215\22\212s/Ci\235"
#":uL\266\227\352\224\310]\216*\271"
#"v\343\306\r\301\1\4\200\375\373\367gzzz\245\373;|\370\260\354\314/]"
#"m\333\2665\333GBB\2\1\333\a\331Z\n\247R\304\244\244$\221wl\352"
#"2U4q\334\270q\262m\354\265$\233\302\326\255[\31\20\20@\0\254]\273"
#"6\327\255[W\351\276V\255Z%\373\242\2\226\25 \177\342\211'\b\330?\233"
#"\322\30\234J\21Ir\357\336\275\262\24"
#"\271\206\327\261c\307\214\266_\270p\241"
#"\354\222\374\361\307\37\333\361[\30Gv"
#"v\266\250\315,\231^*\373\202\30\332"
#"/\r\257\376\375\373\233lg\310\376\352"
#",\225P\235N\21I\362\177\377\373\237"
#"\311\222\n\246\312\203I1u\316\260$"
#"\233\302\246M\233Dy\215\272u\353V\352E),,\24\34\221\206\327\220!C"
#"L\266\273\227\375\325\31\340\224\212H\222"
#"\327\256]c\307\216\35e\227\237\331\263"
#"g\em'\221\203\32.\311\366.\330c)\262\262\262D\2565\0FEE\311"
#"\32624\205\364\364t\261\334K\2279"
#"\257\224\255\331_+\3\247UD\262\314"
#"\200=d\310\220\n\312\370\364\323O\e"
#"m#\245\5H\227\243I\331-\301\347\237\177.B\364}}}\371\351\247\237Z"
#"\325~\377\376\375\345(UL\371~\355"
#"\301\376Z\318\265\"\222e\266A\303"
#"\262\254\200\351Pv\222\242\352iTT\224\315\344\332\271s'###\31\31\31"
#"\251H\250\374\325\253WEI6\240\254"
#"(\2445\376\361e\313\226\211\266\257\276"
#"\372\252\321\347\244\230\312\0313fTY"
#"f%\341\364\212(a\325\252U\342\2557W#\270m\333\266\364\365\365\265"
#"\331\222,E)\357\335\273W\354\267\224"
#"b\27\373\364\323OEX\235\237\237\237"
) 500
(
#"U\256\267\321\243G\0230\36Ec/\366\327\312\240\332(\"Y\226\301f\t\255"
#"\334\23O<a\263z\307R\204\221\241\222o\330\260AQ\267aff\246\360\223"
#"\3\340\320\241C\231\225\225e\266\235F\243add$\27-Z${\337^\354"
#"\257\225A\265RD\222\374\345\227_\330\260aCA\274)\a%K\245\335\v)"
#"\215T\212L\16\t\t\261YP\354\307"
#"\37\177,LY\376\376\376\334\274y\263\3316)))F\237\263\27\373keP"
#"\355\24\221,\vn8~\3748\177\374\361GN\237>\235\355\332\265cPP\20"
#"k\327\256\315\360\360p>\375\364\323\\"
#"\277~\275M\230\n\f\323H\367\356\335"
#"+\f\350\266R\306+W\256\210\340^"
#"\240\2142\305\324j\220\231\231\311E\213"
#"\26\261g\317\236\f\16\16\246\207\207\a"
#"\2335k\306\336\275{\333\215\375\2652"
#"\250\266\212\30\25\25\305\320\320P\316\235"
#";\227'O\236\344\325\253W\231\237\237"
#"\317\244\244$~\364\321G\0346l\30"
#"\203\203\203\25g\247\225\24\321P\31|"
#"}}m\236\317\274n\335:\21\344\e"
#"\20\20P\201\227F\253\325\362_\377\372\27}}}9q\342D~\367\335wL"
#"MM\245V\253eJJ\nw\357\336\315n\335\272\321\307\307\207\323\246Msh"
#"\26\242\34\252\235\"\236;w\216AAA\\\276|\271Y\262\244c\307\216\261U"
#"\253V\212\362eK\346!\303\240P[\322\321\31\"==]\344\365\0e\221H"
#"7n\334`AA\1\273t\351\302\261c\307\362\332\265k&\373\270|\3712G"
#"\216\34\311g\237}\326\346\362Z\203j"
#"\245\210Ry2c\245c\345\220\223\223C\0\\\263f\215brH\266:\275^"
#"/fH{\226\324]\273v\2550QI\221=\23'N\264\270\275^"
#"\257gpp0\307\216\35\35343c\265QD\215F\303\360\360\360J"
) 500
(
#"\245O\346\346\346244\224\273w\357VD\226{\215\346U\315:\374\366\333o"
#"\255\246\302KMM\25\25\22\372\364\351"
#"c\365\230z\275\236\243F\215\342\324\251S\255nk\vT\eE\\\277~}\225"
#"R'7o\336\314N\235:)(Q\331\313\241\204w\302\333\333\233\1\1\1\234"
#"2e\212U\24}\311\311\311\364\365\365eNN\216\354\375\r\e6\b~o9"
#"\26\264\314\314L\372\372\372\232]\316\355"
#"\201j\241\210z\275\236\17?\374\260E"
#"u\366L!\"\"\302n\254\374\326\300"
#"\333\333\273\334\f\333\276}{\256X\261\2027n\3340\331n\306\214\31FS'"
#"$\276\237\235;w\n\243\273\\\215\353"
#"\311\223'\333\214\342\316\32T\vE\274"
#"v\355\32\353\327\257ov?\23\23\23"
#"c\262\240\370\314\23139o\336<\245"
#"\305\2532\f\25\321\320\247\356\346\346\306"
#"\241C\2072!!Av\351n\327\256\235\321\27\v(\317\5\t\310S\203\354\335"
#"\273\227\217<\362\210b\337\245\262pE5@rr2Z\264h\1\265Zm\364"
#"\231O>\371\4\2336mB\207\16\35"
#"\320\277\177\177\331g\"\"\"\360\301\a"
#"\37\200\244\255D\255\24JJJ\304\277\re+--EBB\2\22\22\22\20"
#"\20\20\200g\236y\6c\306\214Add$\0\340\302\205\vh\335\272\265l\237"
#"Z\255\26\36\36\36(**\302\205\v"
#"\27\0\0\321\321\321\25\236{\360\301\a"
#"\221\234\234\254\344\327\251\34\34\375&X"
#"\202m\333\266\361\251\247\2362z\337\360"
#"\360`\212\235J*8T\335\257\201\3\a299\331\254\317\235,3-I\355"
#"\344|\357z\275\236\356\356\356\16\341\357"
#"1D\265\230\21\3\2\2\220\225\225e\364~`` N\237>\215\211\23'B"
#"\243\321\30}\316\335\335\35]\273v\305\300\201\3m"
#"!f\245\261`\301\202r\263\242\4\225J%fH7"
) 500
(
#"77DGGc\314\2301\210\212\212\202\253\253+\n\v\v\241\325j\341\351\351"
#"i\264\357\324\324T\350\365z\f\0312"
#"\4m\332\264\301\355\333\267\313\335\317\316"
#"\316F\335\272u\341\342\342\242\354\227\262"
#"\22\325B\21\203\203\203\221\222\222\"{"
#"o\360\340\301\210\211\211A\333\266mq\371\362e\324\252U\313h?)))\350"
#"\335\2737\346\315\233g#I+\207%K\226\310*\"It\350\320\1c\306\214"
#"\301\350\321\243Q\277~\375r\367\2335"
#"k\206\344\344\344\n\313\263^\257\207Z"
#"\255F^^\36j\327\256\r\27\27\27\f\37>\34G\217\36\2550FJJ\n"
#"\202\203\203\225\375B\225\201C\347c+\320\266m\333\ni\217G\216\34!PF"
#"\203\227\221\221A___\366\354\331\323h$L\207\16\35dk8;\32\367\236"
#"\232\3\3\39u\352T\263\205}\246"
#"N\235\312\371\363\347\313\336\3\376\254t"
#"\240\321h\204\31\347^\314\2301\303.^!s\2506\212\270t\351\322\n9\26"
#"\361\361\361\262{(\271\37|\317\236="
#"l\325\252\225\323x\22\f\341\355\355M"
#"777\16\e6\214_\177\375\265\305\266\311\337~\373\215AAA\262\4\362\22"
#"W\245t\371\372\372V\350\367\326\255["
#"\364\363\363\343\245K\227\24\371\36UA"
#"\265Q\304\333\267o\263I\223&<p\340\200\321gBBBd\31g\213\213\213"
#"\31\36\36\316\215\e7\332P\302\312c\315\2325fm\206r\320\353\365\34:t"
#"\250\321@Xi64F\226\24\23\23c\267\202K\346Pm\24\221$\177\374\361"
#"Gz{{\363\307\37\177\224\275\37\22"
#"\22R\341\324\\\\\\\314\366\355\333;"
#"U\306\232\222\270u\353\26\303\302\302\254"
#"\316O\236;w.\1\330\274\34\207\245\250V\212H\376\231\374\263i\323"
#"&\263\317\246\246\246\262W\257^&"
#"M?\367\3\244\300\216\361\343\307\233%"
) 271
(
#"S\272{\367.\247O\237\316\210\210\210"
#"*q\212+\r\307\236\331+\201n\335"
#"\272\341\327_\177\305\302\205\v\321\243G\17\254_\277\36999\342~QQ\21"
#"\366\355\333\207W^y\5\17=\364\20\6\f\30\200\255[\267:Pb\333\303\317"
#"\317\17w\356\334Aff&\302\302\302\260d\311\22\\\274x\21:\235\16\0\240"
#"\323\351p\356\3349,\\\270\20aaaHKK\303\361\343\307\341\343\343\343`"
#"\311\r\340\3507\241\262(..\346\226-[\370\364\323O\323\317\317\217nnn"
#"\364\367\367\247\227\227\27\273v\355\312\270"
#"\2708\336\274y\323\321b\332\25z\275"
#"\236\277\374\362\v'L\230\300\340\340`\252\325j6h\320\200j\265\232aaa"
#"\2344i\22\317\2349\343h1e\241\"\235\314\337U\t\220Dqq1\362\363"
#"\363\341\347\347\a\225J\345h\221\234\2z\275\0367n\334@@@\200\303\r"
#"\326\346\360\177\235c\317`y*\226\373\0\0\0\0IEND\256B`\202"
) 0 0 0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 2 #" ("
0 0 15 3 6 #"define"
0 0 24 3 1 #" "
0 0 14 3 6 #"cormen"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 4 #" ("
0 0 15 3 3 #"let"
0 0 24 3 3 #" (("
0 0 14 3 1 #"g"
0 0 24 3 2 #" ("
0 0 14 3 3 #"new"
0 0 24 3 1 #" "
0 0 21 3 2 #"#t"
0 0 24 3 1 #" "
0 0 21 3 1 #"5"
0 0 24 3 3 #")))"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"8"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 2 #"-4"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 1 #"7"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 2 #"-5"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"6"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 5 #" "
0 0 14 3 1 #"g"
0 0 24 3 2 #"))"
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 7 66 4 0 0 0 1 2 57 2 1 #"\0"
2 -1.0 -1.0 0.0 0.0 0 23 500
(
#"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\246\0\0\0\212\b"
#"\6\0\0\0 \3461:\0\0 \0IDATx\234\355}y\\Te\373"
#"\3765\3.)\b\b\202\273\200\212\226"
#"&f\230\232\273\342\353\256\271kin\211\32\365\342^~5\360M37\322T"
#"\264\264\322T,\327\\P!4M2\27\334 \265\302}\1eTd\ed\233"
#"\271~\177\360;\247\31fg6$\256"
#"\317\347\371\300\3149\347~\3563\347:"
#"\317r?\367s\337\22\222D9\312Q\312 \265\267\2\345(\2076\224\23\263\34"
#"\245\22\345\304,G\251\204\243\275\25("
#"\207&\226/_\16\271\\\16\0\310\316"
#"\316FPP\20\374\374\374\354\254\225mQ\336b\2262$''c\316\2349\310"
#"\316\316Fvv6\262\262\262\220\227\227go\265l\16I\371\254\274t!))"
#"\t\303\207\17\307\345\313\227\355\255\212]Q\336b\2262\34=z\24\t\t\tp"
#"ss\203D\"\301\272u\353\354\255\222]P>\306,e\370\355\267\337\0\0\a"
#"\17\36\304\215\e70~\374x\310d2,X\260\300\276\212\331\30\345]y)"
#"\203R\251\204D\"\201D\"\1\0\254"
#"[\267\16\363\346\315\303\263g\317\354\254"
#"\231mQ\336\225\2272l\331\262\5\371\371\371\342g\17\17\17;jc?\224\23"
#"\263\224a\374\370\361\30:t(\0 ''\a#F\214\300\360\341\303\355\254\225"
#"\355Q\336\225\2272$%%\241I\223&\342g\177\177\177\\\274x\21R\351\277"
#"\253\r\371w\335\355\v\0???\220Dnn.rssq\371\362e\233\220"
#"2%%\5\241\241\241P*\225V\257"
#"\313\30\224\317\312\355\214\274\274<\221\204"
#"\302\377\n\205\2J\245R\374K\22\16\16\16\220J\245ppp\200"
#"\203\203\3*U\252\204\312\225+\213\245R\245Jf\351\261\177\377~"
) 500
(
#",\\\270\20\347\316\235Cdd$\334\335\335-t\207%CyWn\5<z"
#"\364\b\267n\335\302\255[\267p\347\316\35<z\364\b\217\37?\206L&CZ"
#"Z\032233\305RXXh\221:\35\35\35\341\354\354\214j\325\252\241Z\265"
#"j\250^\275:j\324\250\1OOOxyy\241a\303\206\360\363\363C\343\306"
#"\215\341\352\352\252q}\317\236=\361\363"
#"\317?\3\0\0324h\200\335\273w# \300\"\272\225\4\345\3044\23YY"
#"Y8q\342\4\316\2349\203\370\370x\\\270p\1iiiF_/\264|\252"
#"\177\35\35\35\305\326Q*\225B\"\221\250\265\242\n\205B\255\245\25Z[cQ"
#"\243F\r\274\372\352\253\350\320\241\3:"
#"v\354\210\227_~\31\336\336\336j/I\305\212\25\261v\355ZL\2324\311\244"
#"\337\303R('f\t\220\230\230\210\250"
#"\250(\304\304\304\340\364\351\323((("
#"P;\356\341\341\1___\370\372\372\302\307\307\a\265j\325\22[/www"
#"\270\270\270\210\255[\205\n\25,\242Saa!233\221\225\225\205\314\314L"
#"<y\362Dl\245\37=z\204\353\327\257#))\t7n\334@vv\266\332"
#"\265R\251T\347\330r\302\204\t\210\210"
#"\210@\345\312\225-\242\247\261('\246"
#"\2218w\356\34v\355\332\205\275{\367"
#"\342\326\255[\342\367\216\216\216h\323\246"
#"\r:w\356\214\326\255[\243u\353\326"
#"\250S\247\216\03555\214\224\224\24\304"
#"\307\307#..\16qqq\210\217\217\207>\32\274\366\332k\330\263g\17||"
#"|l\246\343\277\206\230O\237>\305\241C\207p\357\336=<~\374\0305k\326"
#"D\243F\215\320\243G\17\255c.\222"
#"\"\31w\357\336\215\273w\357\212"
#"\307\274\274\274\320\277\177\177\364\356\335\e\335\273w\207"
#"\213\213\213-o\305\242\310\317\317\207\273\273\273F+Z"
) 500
(
#"\34\256\256\256\330\276};z\367\356\255"
#"\365xff&\342\342\342p\365\352U<|\370\20nnn\250U\253\26\372\366"
#"\355\213\332\265k\233\254W\2317\27\235"
#"={\26\3\a\16D\243F\215p\344\310\21<\177\376\34\r\e6DFF\6"
#"\266n\335\nooo\214\e7\16\177\375\365\27\344r9\16\36<\210\367\337\177"
#"\37\365\352\325C\333\266m\21\36\36\216"
#"\273w\357\242n\335\272\b\t\tA\\\\\34RRR\260q\343F\f\36<\370"
#"\205&%\0\34;v\314 )\1 ==\35}\372\364\301\202\5\v\324\272\375"
#"\373\367\357#$$\4\365\353\327\307\312"
#"\225+\361\370\361c\370\370\370\240\240\240"
#"\0\247N\235B\363\346\315\321\255[7\34;v\3144\305X\206\261j\325*\326"
#"\252U\213+W\256d~~\276\326s\262\263\263\31\32\32J'''V\250P"
#"\201\0\304R\277~}N\2336\215\247N\235\242R\251\264\261\366\266APP\220"
#"\332=\eS\372\365\353\307\314\314L\36;v\214\236\236\236\f\t\tazz\272"
#"V\371\205\205\205\334\274y3\e4h\300\271s\347\32\255W\231\355\312###"
#"1g\316\34$$$\30\265\336<{\366l\254X\261\2-Z\264\300\320\241C"
#"\321\247O\37\274\376\372\3536\320\324\276\30?~<rrrP\255Z5\270\270"
#"\270\210\346&m\377\v\177\253V\255\212\263g\317\242m\333\2668y\362$:v"
#"\354h\260\236\347\317\237\243M\2336\370"
#"\354\263\317\320\277\177\177\303\212Y\346\275"
#"+]\370\361\307\37\t\200\217\37?6\351\272\370\370xzyy1..\316J"
#"\232\225\r\\\273v\215\0L\376\235\236"
#"?\177\316f\315\232q\305\212\25\6\317"
#"-s\304\224\313\345\254U\253\26/^\274\250\363\34\245R\311~\375"
#"\372i\355\236\367\356\335\313\226-[\226\331\256\333\22\350\333\267/W"
) 500
(
#"\255Z\245\361}\\\\\34\275\275\275\351"
#"\355\355\315M\2336i\275\366\376\375\373"
#"tss\343\243G\217\364\326Q\346\210\31\36\36\3161c\306h=\246T*)"
#"\223\311\304q\225B\241\320z^\207\16"
#"\35\270g\317\36k\252\371\302\342\354\331"
#"\263l\324\250\21\v\v\v\325\276\217\215"
#"\215%\0n\332\264\211\a\16\34 \0\6\5\5i\2251w\356\\N\237>]"
#"o=e\216\230\201\201\201\374\351\247\237"
#"\264\36{\360\340\201\332 ^\0271W"
#"\256\\\311\367\336{\317\232j\276\260X"
#"\260`\1g\316\234\251\361=\0\265\357"
#"#\"\"\350\352\352\252U\306\371\363\347"
#"\331\244I\23\275\365\224)b\26\26\26"
#"\322\311\311\211r\271\\\357y\2Au"
#"\21\363\352\325\253l\332\264\2515T|"
#"\341\21\30\30\310\230\230\30\215\357\23\23"
#"\23\231\233\233+~\16\n\n\322IL\222tww\347\223'Ot\36/S\336"
#"E999\220J\245\250R\245\212Yr\274\274\274\360\344\311\23\viU\266 "
#",N\24\307\253\257\276\n\240hit\320\240A\210\212\212B\\\\\234N9^"
#"^^\220\311d:\275\230\312\f1\177\374\361G\4\4\4h\254[\227\4\n\205"
#"\302\2\32\225MH$\22\235\36Q\a\17\36\304\200\1\3\0\0002\231\f5j"
#"\324\320)\247\240\240@\257\237\351\v\277"
#"\362s\376\374yt\350\320\1aaa"
#"\360\361\361A\205\n\25\220\225\225e\226"
#"\314\324\324TxzzZH\303\262\205\0325j\340\361\343\307\32\337\37=z\24"
#"\3\6\f@ll,H\352%%\0<y\362D\257}\371\205%\346\243G\217"
#"0a\302\4\264n\335\32\247N\235\302"
#"\310\221#\341\340\340\200\366\355\333#:"
#":\332,\331G\216\34A\227.],\243h\31C\327\256]q\350\320!"
#"\215\357\207\r\e\206N\235:\241M\2336HNNFrr\262V\2\3\300"
) 500
(
#"\351\323\247Q\267n]\375\316\310f\215"
#"\204\355\200\334\334\\~\376\371\347trrR\233a_\273v\215$\271v\355Z"
#"\16\35:T\257\f}\223\37\245R\311"
#"\200\200\0\36>|\330*\372\227\4\306"
#"\330\am\205\313\227/\263~\375\372\314\313\313\23\277S*\225Z\227.uM~"
#"BBB\f.O\276P\304\334\273w/}}}5~\200\26-Z\210\347\344"
#"\346\346\262A\203\6<}\372\264\311\362"
#"322\270e\313\26\266k\327\256\324"
#"\30\330M\261\17\332\nC\206\f\341\247"
#"\237~\252a\3134\0067o\336\244\207"
#"\207\a\237>}\252\367\274\27\202\230\t"
#"\t\t\354\332\265\253N\247\202\317?\377"
#"\\\355\374\250\250(\326\256]\233w\357"
#"\3365\272\216\320\320P:88\20\0"
#"\217\37?\316\344\344d\336\270q\203\177"
#"\374\361\a\343\343\343y\362\344I\306\304"
#"\304p\337\276}\374\341\207\37\270i\323"
#"&\256[\267\216\341\341\341\\\274x1\v\n\n,}\333$M\263\17Z\ei"
#"ii\\\277~=_\177\375u\2`\257^\275L\272\376\331\263g\4\300\215\e"
#"7\32<\267T\23S&\223q\362\344\311\224J\245z\275]n\335\272\245q\355"
#"\327_\177M\0\274~\375\272Qu-X\260\300d/\e\241\264o\337\336\322\267"
#".\302T\373\240\245\241T*y\364\350"
#"Q\216\0325\212\225*U\22\357Y\360\304\332\274y\263Qr\236>}J\37\37"
#"\37\316\2325\313\250\363K-1\v\n\n\330\256];\203\244h\323\246\215N\31"
#";v\354\240\207\207\a\347\315\233\307g"
#"\317\236\221$\217\36=\312\243G\217\212"
#"\347\244\246\246r\352\324\251\364\364\364\344"
#"\330\261c\t\200\216\216\216\6_\6\325\362\345\227_Z\354\276e2\31\37<x"
#"\300\a\17\36\250\r'\n\n\n\330\257_\277\229O"
#"\224\4\217\36=\342\222%K\330\260aC\361>%\22"
) 500
(
#"\t\235\234\234\350\354\354\314\264\2644^"
#"\277~\235u\352\324\341;\357\274\303;"
#"w\356h\225\223\225\225\305\360\360pz"
#"zz\32\345\274!\240\324\22\223,\32\363\365\351\323G/)V\256\\\251W\306"
#"_\177\375\305\t\23&\320\305\305\205\335"
#"\273w\247\243\243#+T\250\300\t\23"
#"&\260m\333\266\254^\275:g\315\232\305\a\17\36\220$?\374\360C\2\340K"
#"/\275D\27\27\27\203\244\224H$LNN\266\330=\253\312\276}\3736I\212"
#"cK\0\224\311d\26\253\2538\n\v\vy\370\360a\16\0312D\3157\325\303"
#"\303\2035k\326\24?\177\364\321G\3425O\236<\341\247\237~JOOO\266"
#"h\321\202\343\306\215\343\374\371\3639e"
#"\312\24\366\355\333\227NNN\0346l\30/\\\270`\222.\245\232\230$\251P"
#"(8s\346L\263I\361\374\371s\36>|X\274v\343\306\215<~\374\270Z"
#"7I\26u]c\306\214\21g\225M\2324\321KLggg\206\207\207\2334"
#"\2365t\277B!\377\231\374\304\306\306ZD\2766\\\272t\211\263g\317f\235"
#":u\304\373rttd\2336m\264N6o\336\274\251!\243\240\240\200g\317"
#"\236\345\2325k8t\350PFDDp\337\276}\314\312\312*\221N\245\236\230"
#"$\371\311'\237h%E\347\316\235M\226%\\\253\17\5\5\5\354\337\277?\1"
#"\260V\255Z\6[m\241\274\361\306\e\\\272t)\257^\275Z\302;\325\204\253"
#"\253+;u\352\304\314\314L\261\2137\267\325T(\24<w\356\34\27,X\300"
#"\246M\233\252\335\203\237\237\37\307\216\35"
#"\313\26-Zh\275\307\236={\352\225"
#"\275a\303\6\276\371\346\233f\351G\276"
#"\0\304\334\271s'%\22\t\35\34\34\270r\345Jzzz\212?"
#"\322\372\365\353M\226g\f1\311\242\26\266K\227.\4\300F\215\32"
) 500
(
#"\361\243\217>\322\332bo\334\270\221#F\214\320\260\253z{{388\230\a"
#"\16\34`ZZZIn\335d\373\240.\310\345r\236:u\212\253V\255\342\250"
#"Q\243\350\341\341\241&\317\323\323\223\301"
#"\301\301\\\261b\5[\267n\255\367\345"
#"\333\267o\237\336\272:t\350@\0\374\363\317?Kt\317\2J51/\\\270"
#"\300*U\252\250M0\356\335\273\307\327"
#"^{\215\16\16\16&{\250\223\306\23\223$333E\323\210\277\277?##"
#"#\325\b\330\245K\27\361\334\234\234\34"
#"\356\335\273\227\343\306\215S{y\4\0027o\336\234S\246L\341W_}\305\270"
#"\270\270\22\223U\27rrrx\345\312"
#"\25\356\333\267\217+V\254\340\224)S\30\30\30Hooo\255\239\37\37\37"
#"N\235:\225\321\321\321LIIa\2336m\f\366\bu\352\324\321k\273\274y"
#"\363\246x\356\354\331\263\315\272\237R\353"
#"\304\361\350\321#\f\348\20999"
#"\2308q\"\376\373\337\377\2\0\352\325"
#"\253\207\337~\373\r\337~\373\255\325cG:;;#::\32\35;vDB"
#"B\2\326\255[\207\23'N`\344\310\221\270q\343\206Zx\300\227^z\t\203"
#"\6\r\302\240A\203@\22\347\317\237\307"
#"\241C\207p\374\370q\234;w\16W\256\\\301\225+W4\344{zz\242F"
#"\215\32b\361\364\364\204\223\223\23\0\200"
#"E\r\207\370\277R\251Dzz:\236"
#"<y\202\247O\237\252\375\325\347\37\340\350\350\210\26-Z \0\1\1\1"
#"\350\332\265\253F\26\214\321\243G\343\354"
#"\331\263z\177\217I\223&\301\301\301A"
#"\347\361m\333\266\211\377o\331\262\5\213"
#"\27/\206\243c\t)f\26\255\255\204"
#"\334\334\\\266m\333\226\0\330\261cG\265\345/s\1\23ZL\1\367"
#"\357\337g\375\372\365\t\24\31\225SSS\331\273wo\246\246\246\32u}"
) 500
(
#"^^\36O\235:\305\25+Vp\334\270ql\335\2725\253V\255j\324\270\325"
#"\330R\261bE6i\322\204}\373\366eHH\b\327\254Y\303\303\207\0173)"
#")I\347\16\321\342\210\214\214\244\243\243"
#"\243V\371R\251T\264\\\350B\243F"
#"\215\324\256\331\277\177\277Q\365jC\251"
#"\334%9v\354Xl\331\262\5\r\0324@||\274AO\25S \204\2206"
#"\365\266\223\222\222\320\261cG\310d2\214\0301\2\333\267o7;<`FF"
#"\6\36?~,\206r\21\376\227\313\345"
#"\242\236\252a\257\245R)\\\\\\\340\341\341\1www\270\273\273\213\377[j"
#"\177\373\2301c\324Z>\1o\275\365"
#"\26~\372\351'\235\327\375\376\373\357h"
#"\337\276\275\332w\3\6\f\300\376\375\373K\246H\211)m$\4s\217\277\277?"
#"\373\365\353\247a\236)\216\245K\227\22"
#"\0\235\234\234\230\220\220`q}P\202"
#"\26S\300\245K\227D\333\346\344\311\223"
#"-\254\231\375\261~\375z\261u\24\306"
#"\366B\211\216\216\326{\355\224)S4"
#"ZY\a\a\a\203\233\316t\301\352\304\304\377\237\241&&&\322\337\337_/)"
#"\242\242\242(\225J)\221Ht\356\333"
#"\261\204>\346\274\217'O\236\344K/"
#"\275D\0\374\370\343\217-\250\231}\261c\307\16q\222\264q\343F&$$\320"
#"\313\313\213\0\350\353\353\253\327\251%/"
#"/\217\256\256\256Z\207\0\313\226-+\221>V%fbb\242\6\tf\316\234"
#"\251\365&\257^\275\312j\325\252\21\0\27-Zd5\235\314%&I\36:t"
#"H\\\31)\356@\362\"\"&&F\274\237%K\226\210\337\337\274y\223\276\276"
#"\276\\\272t\251\336\353w\357\336\255s"
#"\354[\322\275SV%\346\262e\313\b\200aaa\4\212B\213h\363"
#"\302y\372\364\251\270&;r\344Hk\252d\21b\222\344\366\355\333\325Z"
) 500
(
#"\230\27\25\247O\237\26'b\332\34,\36>|\250w\323\30I\16\348P\357"
#"\304\354\324\251S&\353eUbFDD\20\0;u\352\304\270\2708\261\271/"
#"\356\234 \270\264\5\4\0040''\307\232*Y\214\230$\271n\335:qL\266"
#"k\327.\213\310\264%\256\\\271\302\352"
#"\325\253\23\0\307\217\37_\"\31\217\37"
#"?\3269\223\27\312\304\211\23M\226k\23b\n((( \360\217s\2IN"
#"\235:\225@\321\322\237!s\204%`Ib\222\344\347\237\177.\232k\264mk"
#"-\255\270}\3736k\327\256M\0|\353\255\267J\344\364K\222k\326\2541h"
#"\312rrrbvv\266Ir\255j`\227\313\345j\261'\5c\253\20Ew"
#"\335\272uX\277~=*W\256\214}"
#"\373\366\225\372\200\247\332\360\361\307\37\343"
#"\361\343\307\370\342\213/0x\360`\304\306\306\242]\273v\366VK/d2\31"
#"z\364\350\201\224\224\24t\355\332\25?"
#"\376\370\243^\303\271>\370\370\370`\355"
#"\332\265\220H$\220J\245\210\210\210\300"
#"\225+W\20\22\22\202\226-[B*\225B*\225\";;\eU\253V5^"
#"p\211^\23#!\223\311\b\374\343?"
#"(\264\240J\245\222\277\374\362\213\330\5"
#"l\333\266\315\232j\250\1\26n1\5"
#"L\2300\201\0\350\346\346\306\304\304D"
#"\213\313\267\24\322\323\323\331\262eK\2"
#"\340\353\257\277\316\314\314L\213\312\27|"
#"F\17\36<h\226\34\253\233\2136m"
#"\332\244\326\254\307\307\307\363\306\215\e\342"
#"\330\306\326&\27k\21\263\260\260\220\203"
#"\a\17&\0\326\254Y\2237n\334\260"
#"x\35\346\342\371\363\347\354\324\251\23\1"
#"\260I\223&V\361\355\0340`\200\331\253>\244\215\2348\24\n\5sss\251"
#"T*\231\221\221\301W^y\205\0\330\277\177\177\235a"
#"Z\254\5k\21\223,\262\347\5\6\6\22(r\222\260"
) 500
(
#"\244\3\261\271Pu\345\253[\267\256\305"
#"\374G\213\343\255\267\336\"\0\263\355\320"
#"6]+W(\24\354\333\267/\1\260y\363\346\26\357F\214\2015\211I\26m"
#"%\20<u\2325kfp7\240-\240T*\371\356\273\357\22\0\335\335\335\305"
#"\255\316\326\200\320k\230\e-\317\246\304\234={6\201\"W}m\e\310l\1"
#"k\23\223,\262\3136k\326\214@\321\236\244\222zq[\n\323\246M\23g\307"
#"\347\316\235\263j]C\207\16%\0\263\315g6#\346\226-[\b\24\355\256;"
#"q\342\204\255\252\325\200-\210I\222\311"
#"\311\311\364\361\361!\0\6\6\6\32\364"
#"\21\260\26\26.\\(\232\263\254\271="
#"C\300\360\341\303\t\200;v\3540K\216M\210y\372\364iq\353\347W_}"
#"e\213*u\302V\304$\311\e7n\210\233\270\6\17\36\\b[aI\241\352"
#"\224\261{\367n\233\3249r\344H\2"
#"\340\17?\374`\226\34\253?\241\373\367"
#"\357\213\17\347\203\17>\260vu\6aKb\222E\376\2nnn\342\352\212\255"
#"\"|\250:el\330\260\301&u\222\344\333o\277M\0\214\214\2144K\216U"
#"\237\220\\.g\253V\255\b\200\335\273w\267Z\264\nS`kb\222\344\357\277"
#"\377.\256G\317\2301\303\352\365\305\304"
#"\304\260b\305\212\32N\31d\321\212\217"
#"\277\277?\375\375\375\31\21\21a\361\272"
#"G\217\36M\0\334\272u\253Yr\254"
#"\366\204\224J\2458\336h\324\250\221\305"
#"\367\270\30Bll\254\370\0\342\343\343"
#"\305\357\355ALR\235,\237~\372\251\325\3529s\346\214\370\22\24\17I-,"
#"x\204\205\205\211\333\202\373\365\353g\321"
#"\372\205\331\377\367\337\177o\226\34\253="
#"\241\377\375\357\177\4@\27\27\27\263w\314\231\212\35;v\210\3pa"
#"\265I\30\370\333\213\230$\271k\327.\261{]\267n\235\305\345\27w\312"
) 500
(
#"(>l\b\v\v\243\267\267\267\3709"
#">>\336\342\277\305\270q\343\b\300\354\250tVyB{\366\354\241D\"\241T"
#"*\265K8?\177\177\177\206\205\205\211"
#"\237\1\210\335\226=\211I\222\e7n"
#"\24'$\333\267o\267\230\334\333\267o\213\1\vt9e\250\6S\220\311d\342"
#"\256\2KBX\232\375\366\333o\315\222c\361't\351\322%\261+\t\17\17\267"
#"\264x\243 \264\230\361\361\361bx\25"
#"a\275\336\336\304$\377\361S\255P\241"
#"\2\17\35:d\266\274\324\324T6n"
#"\334\230@\321\226\342\347\317\237\223,\32"
#"\343\vA\22T\315UB/\"t\353\226\304{\357\275G\300|\37U\213>\241"
#"\324\324Tq7\341\270q\343,)\332$\334\276}[\303\365Jp\251\263%1"
#"ccc9j\324(\255\307\376\357\377"
#"\376\217@Q\214\244\223'O\226\270\216"
#"\214\214\f\276\366\332k\4\300V\255Z"
#"\251\255\246\t\16\332\332\306\233\344?1\221,ic\2354i\222E,\1\26{"
#"Byyyl\337\276=\1\360\3157\337\264\350\226[S\1\250\a7\355\327\257"
#"\237\30\275\302V\304\314\314\314$\0\265"
#"1]qL\236<Y\34\207\353\313\344\246\v\252N\31~~~\32N\31J\245"
#"R-\16\222\267\267\267\332L\\\210\364\241\352\37k.\204{2\327^m\324\23"
#"JMM\345\225+W\230\220\220\300\224"
#"\224\24\255\347\214\37?\236@Q\306\332"
#"\222\356\214\263\4\24\n\205Z\vI\26"
#"\265\f\266&\246P\217\277\277\277^]"
#"G\214\30A\240(L\313\337\177\377m"
#"\264\374\202\202\2\321\223\307X\247\fa"
#"\b\221\231\231I\245R)\266\250\226\264"
#"\255\n\216\337\346N\356t>!\231L\3069s\346\360\225W^\241\207\207\a_"
#"~\371e\372\373\373\263f\315\232\364\361\361\341\373\357\277"
#"/>\374\360\360p\2`\225*Ux\351\322%\263\24"
) 500
(
#"\262\4\200\242\355\34\n\205\202\5\5\5"
#"\364\367\367g\247N\235\304c\326&fPP\20G\215\32\305\35;v\30\2143"
#"\224\237\237\317^\275z\211/\365\375\373"
#"\367\r\312/\251SFAA\1\275\275"
#"\2755\334\20-\211\340\340`\2\340\332"
#"\265k\315\222\243\365\tm\334\270\221\36\36\36\234>}:\317\236=\253q<1"
#"1\221\v\26,\240\253\253+'N\234H\a\a\aJ$\22\233-{\31\202`"
#"\257S-\202q\337\322\304,\36hU\325\4\263i\323&\243\2`\311\345rq"
#"\30\324\264iS\2031\231\246O\237.:eh{>\306\324g({\\I!"
#"\304\27]\275z\265Yr4\236\320\274y\363\330\250Q#\243\274\177\36=z\304"
#"z\365\352\21\0\27.\\h\226\"\326"
#"\200\266\a`ib\252\222\377\326\255[\342\3706--M\364\3466f\f\367\354"
#"\3313q\337\275>\317\362E\213\26\331"
#"\324)\303T\204\204\204\20\200\326\354\274"
#"\246@m\317\317\252U\253\360\331g\237!--\rnnn0\4///\\"
#"\277~\35\225+W\306\323\247O\r\236ok\230\233\272\317\30\250fQ\223H$"
#"puu\305\316\235;\261a\303\6\361{\37\37\37(\24\n\275!e\\]]"
#"\21\23\23\203\16\35:\340\302\205\v\30"
#"0`\0\216\349\202\312\225+\213\347|\375\365\327\230?\177>\244R)\"#"
#"#\21\30\30h\235\2332\3\302=*\225J\361\273\363\347\317#**J\374\\"
#"\265jU\310\345r\314\2349\23\316\316"
#"\316\332\5\t\f\275|\3712\275\274\274"
#"t\272\333\v\253\6\243F\215\322X\363"
#"\316\315\315e\243F\215,b\223\2636"
#"`Cs\221\220O\310\24\250\32\312\373"
#"\367\357/\376\326;w\356\264\213S"
#"\206\251\20\242?\253\306[\217\213\213\343\250Q\243\30"
#"\24\24\304\2313g\212\343\\}\273b\305_m\344\310"
) 500
(
#"\221:\303y\b\371\275\343\342\342D\363"
#"D\361\231\334\316\235;\331\266m[s"
#"\357\313\352\26051K\222a\342\352\325\253tww'\0\216\0313Fm\235\275"
#"\264G\376\20\234\301\365\205\206quu"
#"5\350@\2\262(\350g\325\252U\231\221\221\241q\202\\.'\0005'\f\201"
#"\244\252P*\225\254Q\243\206Emb\326\200-\211i\16\316\235;'\6\211\25"
#"v\223j3\222\2276\b\221\227\213{5\t(\36k@\27\244\0\360\313/\277"
#"\240}\373\366\250V\255\232FW/\223"
#"\311\0@m\177\270\267\2677\216\36="
#"\252v\236D\"\301\240A\203\264\346\31"
#"\264$~\373\3557\370\370\370\300\307\307"
#"\a\2337o\266j]\366D\353\326\255"
#"\361\345\227_\2(J\265\354\357\357\217"
#"\345\313\227\333Y+\303\3206\306\24\220"
#"\227\227\207\340\340`$&&\32\226\3\0)))\250W\257\236\326\23\204\340\4"
#"\305S%k\333\274^\257^=\244\244\244\30\254\264\2448z\364(:v\354\210"
#"\260\2600\254^\275\32\343\307\217\307\344"
#"\311\223\255V\237=q\367\356]\204\206"
#"\206\212\237\23\22\22\260f\315\32;jd\34\364\21\363\333o\277\5\360Ons"
#"\275r\0 ==\335`\330\350\3423J\271\\\256q\216\207\207\a\322\323\323\r"
#"VZR\364\350\321\0033g\316\304\270"
#"q\343\320\277\177\177DDD`\347\316\235V\253\317^\20\"e$''\243K"
#"\227.\330\260a\3$\22\t\246M\233\206-[\266\330[=\275\320G\314\340\340"
#"`l\332\264\311(9\216\0P\273vm\\\272tI\353\t\25+V\24+\22"
#"*\275s\347\16\206\f\31\242q\356\275"
#"{\367P\273vm\243*\316\317\317\307"
#"\263g\317\360\354\3313\244\245\245\241"
#"~\375\372\250[\267\256\336k\22\23\23\325b\207'$"
#"$\30U\327\213\204\314\314L\364\352\325\v\327\257_G"
) 500
(
#"\253V\255\260\177\377~T\253V\rr"
#"\271\34\323\247O\307\304\211\23\341\342\342"
#"\202\201\3\a\332[U\255\320E\314\234\234\34\0000ZoG\0h\326\254\31\26"
#".\\\250\365\4!\314\364\240A\203p"
#"\360\340Aq\\\347\355\355\255q\356\305"
#"\213\27\321\251S'\254[\267N\215t\332\376/\336\342\2369s\306 1\205."
#"\240\260\260\20\203\6\rBTT\24\342"
#"\342\342\214\272\321\27\1\271\271\271\0300`\0.]\272\4???DGG\213"
#"\343\376i\323\246!==\35\377\373\337\3770r\344H\34>|\30]\273v\265"
#"\263\306\232\320ELa\256b\214}\34"
#"@\321\364\250\240\240\200u\352\324aR"
#"R\222\326\31R\361%>m\353\253\31\31\31tuu\345\315\2337\305\265_c"
#"\213\247\247\247\321\216\4\346\246\257C)"
#"\235\225\253:e\324\251SGgn\306\17>\370\200@QF6K\257s[\2"
#"\302v\341\371\363\347\233%G|B\313\226-\343\220!Ct\236\250T*\231\231"
#"\231\251sC\331\214\0313\30\34\34,"
#"\236\273h\321\"\243\23\205\32\e\233\321"
#"\22\351\353J#1\225J\245\230`\325\335\335]of5\245R\311w\336y\207"
#"@Q\340\bkF\325(\t\204%\323y\363\346\231%G|B\351\351\351\364\366"
#"\3666\331\335?99\231\335\272u\243"
#"\213\213\213\306[\376\313/\277h$c\322V\246O\237n\324f5K\244\257+"
#"\215\304\2341c\206IN\31\252\231x\353\326\255\253\263u\265\a\26/^L\0"
#"\234;w\256Yr\324\236Pbb\"%\22\tw\356\334i\264\0\341\rqp"
#"p\320\2723\356\341\303\207b\352;}\305\321\321\221]\273vexx8\377\372"
#"\353/\r9\226J_W\332\210\371\331g\237\225\310)\343\371\363\347"
#"\354\334\2713\1\260q\343\306F\347\34\2626\226,YB@=Co"
) 500
(
#"I\240\361\204\4\17\231\320\320P\275."
#"\367\205\205\205\374\362\313/\351\351\351)"
#":\273J$\22\255\201\344\v\v\v\305\255\4\305K\223&M\330\265kW\2654"
#"\304@\321\226\337Y\263f\361\304\211\23"
#"\26\335\217^\232\210\371\325W_\21("
#"y\250\354\214\214\fq\337~\313\226-"
#"\231\236\236n\5-M\203\340\214ln\312>\255O\350\301\203\a|\347\235wX"
#"\253V-N\236<\231\a\16\34\340\2313gx\361\342E\36>|\230\323\246M"
#"\243\257\257/\373\365\353'\216q\326\254"
#"Y#\216)\247M\233\246u2s\350\320!q{\251P\4\207\322\214\214\f\376"
#"\370\343\217|\347\235w\304ub\325V"
#"\361\355\267\337\346\366\355\333\315\216\236V"
#"Z\210\251\352\224\361\365\327_\227X\216"
#"L&\23SWw\350\320\301\3521\354\ra\305\212\25\26Y>\325\373\204\256]"
#"\273\306\25+V\260O\237>l\335\2725[\265j\305\236={r\341\302\205<"
#"\177\376\274\306\371;w\356\24\235\rF"
#"\216\34\251u\337\317\335\273w\305t|"
#"\0\264\216\217\n\v\vy\362\344I\316"
#"\236=[#m\261\203\203\3\273t\351\302\25+V\230\264\25A\274\341R@\314"
#"\237\177\376Y\374\235\26/^l\266\274"
#"{\367\356\211\233\0{\367\356mt\212"
#">k\340\213/\276\20\347\r\346\300\342O\350\227_~\21\363\365\4\6\6ju"
#"x\315\317\317gHH\b[\264ha\224\314\2337or\345\312\225\354\326\255\233"
#"\326.\177\306\214\31<~\374\270Q]"
#"\276\275\211\251\32)\303\222\341b\376\376"
#"\373o\326\250QCl\24l\35\20W\300\252U\253\b\200!!!f\311\261\312"
#"\23\272t\351\222\30H\253U\253V:"
#"\a\346\306\354o)\216\214\214\f\356"
#"\330\261\203\243G\217\326\310\273\355\342\342\302\221#G2"
#"22Rg\227oOb^\275zU\34\312\214\e7\316"
) 500
(
#"\342\1\266.^\274(6\nS\246L\261\250lc\261z\365j\2\340\207\37~"
#"h\226\34\253=\241[\267n\211\233\360\e6lh\225\230\344\n\205\202qqq"
#"\2343g\16_~\371e\215.\277s\347\316\\\276|\271\332,\337^\304\274s"
#"\347\216\350\0<p\340@\253\205$\374"
#"\365\327_\305\224\202\346\232lJ\202\265"
#"k\327\22\200h\323.)\254\236\265\" @\\\335\271p\341\2025\253\343\255"
#"[\267\270j\325*v\357\336]\34\303\t\245a\303\206\342&.[\023355"
#"\225~~~\4\300\316\235;\213\2212"
#"\254\205\250\250(\321\207s\371\362\345V"
#"\255\2538\204\244\\S\247N5K\216\325\237PVV\26{\366\354).\243\331"
#"j\3Uff&w\356\334\3111c\306\210c/\3252b\304\bn\333\266\315"
#"`::s\241j\322i\325\252\225Vglk 22\222\22\211\204\0\370\315"
#"7\337\330\244N\362\37\23\230\271\331\211"
#"m\322t\344\347\347\213q\23+V\254h\321`R\306@\241P\360\267\337~\23"
#"\275\253\213w\371\35;v\344\262e\313"
#",\36\225N\325\b\356\347\347gs#\270\340-\356\340\340`\263\255\325\e6l"
#" \0N\2324\311,96\353\323\224J\245\270QI\"\221p\345\312\225\266\252"
#"Z\r\2!\277\374\362K\6\6\6jt\371\276\276\276\2346m\32\217\35;f"
#"\226\331\245\260\260PL\376\251\317)\303"
#"\332P\335\356\373\363\317?[\275\276o"
#"\276\371\206@\311\362G\252\302\346\263\200"
#"\25+V\210]\314\2349sl\26\372Y@\3611fVV\26w\355\332\305w"
#"\337}W\243\313\257V\255\32\207\17\37"
#"\316\255[\267\32\fB\240\nU\247\214"
#"\352\325\253\353u\312\260\5\204\261u\325\252Uy\372\364i\253\326\365"
#"\335w\337\21(y\322T\1v\261\233l\333\266M\264G\276\373\356\273"
) 500
(
#"6\r\201\255o\362\243P(x\352\324)~\374\361\307l\336\274\271\32I\245R"
#");t\350\300\245K\227\32\364\350\21\2342\252V\255\3123g\316X\3436L"
#"\202R\251\24\3\252\272\271\271\361\217?"
#"\376\260Z]\2337o&\0\216\35;\326,9v\2634\307\304\304\210\273\0{"
#"\367\356mrv\326\222\302\224Y\371\235"
#";w\270z\365j\376\347?\377\21\263n\b\305\307\307\207!!!<z\364\250"
#"\332\n\227\340]c\253\256\323X\24\26"
#"\26r\320\240A\4\2122\35\337\274y\323*\365\bis\306\214\31c\226\34\273"
#"\256\315\305\307\307\213\335g\2336mL"
#"\352.K\212\222\232\213\262\262\262\270{"
#"\367n\216\e7N\303\225\317\331\331\231"
#"\303\206\r\23#\336I\245R\223<\264"
#"l\205\334\334\\v\357\336]\34K\353\212\334g\16\266n\335J\0\34=z\346"
#"Sa\3\0\0\v\313IDAT\264Yr\354\356\315\220\224\224$&jj\322"
#"\244\211\325'\t\226\260c*\24\n\376\376\373\357\234;w._}\365U\215\231"
#"~\303\206\r\271d\311\22\273\217-\265"
#"!++\213o\274\361\6\201\242\264\211"
#"\226N\332\20\31\31I\0|\373\355\267\315\222cwb\222E>\233B\252\342\332"
#"\265k3!!\301juY\303\300\276m\3336:88\210\246\31U\222z{"
#"{\363\277\377\375/ccc\355\32\314V\25\252)\5\333\266mk\321a\324\17"
#"?\374 \256\327\233\3\253\0223>>\236aaabY\266l\31\303\302\302\264"
#":vddd\260[\267n\342\232\267%\322\372\25\24\24\260q\343\306tss"
#"\23\213@\30\325\357\272t\351R\342:"
#"\316\236=+\216\225g\314\230\301\354\354"
#"l\356\331\263\207\343\307\217\247\227\227\227F\227?t\350P~\377\375"
#"\367VI\311l\n\222\223\223\305\30B=z\364\260\330K#\304\277\37"
) 500
(
#">|\270Yr\254JLS\203)\345\345\345\211\271\201*U\252d\21\243\260\20"
#"\257Q_)\251MU5\306\320\330\261c5L_J\245\222\247O\237\346\274y"
#"\363\330\242E\v\215Y\376\233o\276\311\317?\377\334\252\263d}PM)8d"
#"\310\20\213\254\337\357\332\265\213\08t"
#"\350P\263\344\330\264+7&\230\222B"
#"\241\20\311$\225J\315\16\231|\341\302"
#"\5\275\244ttt,Q\353\245\352\2241`\300\0\243L^\367\356\335cDD"
#"\4{\365\352\2451\313\367\366\366\346\207"
#"\37~\310\230\230\30\233v\371\t\t\ttuu\265\210Q\234,J\245\3\24\345"
#"\3164\a6#\246\261\301\224\4\bf"
#"\27\0\374\344\223O\264\236c\254\307\222\266\t\212P\6\16\34h\264N\2d2"
#"\231\331N\31\331\331\331\334\273w/'L\230 \266ZBqrr\342\220!C"
#"\270y\363f\233,c\236:u\212U\252T!\0\316\2325K\355Xrr\262"
#"I3\354\237~\372\211@Q\256!s`\23b\346\346\346\22\0\23\23\23M\272"
#"\356\273\357\276\23\275d&M\232\244\326"
#"\325\304\306\306\322\311\311\311\250Y\274\20"
#"#^[\371\351\247\237L\322I\325)"
#"\343\265\327^\263\210S\206R\251\344\231"
#"3g8\177\376|1\252\260j\227\337\256];.^\274\330\344\337\317\24DG"
#"Gkx\325\337\270qC\264\230\30\273b\264\177\377~\261\0271\a6!\246\251"
#"\255\245*\16\36<(\276\315\3\a\16dNN\16/\\\270 N8&L\230"
#"`PFjj\252\306l\31(\332\303"
#"m\312z\370\363\347\317\305\35\237\326\334"
#"\231x\357\336=\256[\267\216\275{\367"
#"f\345\312\225\325tn\320\240\1?\370\340\3FGG[<\a\272\352>\244\371"
#"\363\347\253M\336\2145\230\37<x\220\200\3719"
#"*mBL\300\274\334\202\277\377\376\273\350\371\335\252"
) 500
(
#"U+\2655m\251Tj\324\336\237\376\375\373k\20\323\24\367\177{9e\310\345"
#"r\356\333\267\217\23'N\324\332\345\17"
#"\36<\230\337}\367\235\305^\22\301;"
#"\250x\251T\251\222Q.\202\207\16\35\"\0\366\351\323\307,=\254NLm\201"
#"_K\202k\327\256\211\223\215\342EW\3661U\b\203r\325bl\352\27\325\265"
#"f{:e(\225J\236;w\216\237|\362\211h\367\25\212D\"a\333\266m"
#"\271h\321\"\263\354\300111\32\373\252\204\242/J\260\200#G\216\20\0{"
#"\365\352Ub\35H\e\20SH\237g.\262\262\262\364Nb\f\215\277\362\362\362"
#"\324\266\16\e\273\21\216\374'\256xi"
#"q\312\20p\377\376}\256_\277\236}"
#"\372\364\321\350\362\353\327\257\317\340\340`"
#"\369r\304\350.\177\327\256]:I\t\24\255h\31\362\6\213\211\211!\0\376"
#"\347?\3771\353\336J\305\312\217!\344"
#"\347\347\263G\217\36z\315>\306\314\2Um\232_|\361\205Qu\227V\247\214"
#"\342\220\313\345\334\277\177?\337{\357="
#"\326\252UK\355\267\251Z\265*\a\r\32\304o\277\375Vg\326\272-[\266\30"
#"\25k*::Z\257\36B|\251\300\300@\263\356\247\324\23S\251Tr\324\250"
#"Q\6\1770\0<w\356\234^Y\202M\323\301\301\301\2501\2310\336*\255N"
#"\31\272 $\302\n\r\r\25\23\240\252"
#"v\371m\332\264\341\302\205\vy\371\362e\361\232\264\2644~\362\311'tvv"
#"\326\373\e\e2\257\35;v\214\0\330"
#"\255[7\263\356\241\324\23S\241P\360"
#"\300\201\3\354\337\277\277\3017\272g\317"
#"\236\6\345\275\372\352\253F\331.U\223"
#"\336\233\233\260\323\336x\360\340\1\277\372"
#"\352+\366\355\333W\334A)\224z\365\352q\352\324\251<|\3700\237"
#"?\177n\220\240R\251\224\367\356\335\323Y\327\361\343\307\t\300\254e^"
) 500
(
#"\362\5 \246*\222\223\223\271h\321\""
#"\321\266\246\255\30J\261\34\36\36\316\275"
#"{\367\352='66V\264\351}\366\331g\226\274\5\273#''\207\a\16\34"
#"\340\244I\223X\273vm\215.\177\340"
#"\300\201\374\346\233o\370\347\237\17724"
#"4T\334\247\256Z\364\305\276\374\365\327"
#"_\t@\314\335YR\274P\304\24\240T*\371\363\317?s\330\260a\32\203u"
#"C?\310\343\307\217\365z\323\250:e"
#"\230\e\346\244\264C\251T\362\374\371\363"
#"\f\v\vc\253V\255\304-/B\227\377\306\eop\356\334\271\f\n\nR#"
#"h\315\2325u\332\177O\236<I\0l\337\276\275Y\272\275\220\304T\205L&"
#"\343\362\345\313\305\300R\0\30\23\23\243"
#"v\316\265k\327\370\321G\37\261y\363"
#"\346tvvf\245J\225\350\346\346\306"
#"\200\200\0\206\206\206\212\21A\256]\273"
#"&:e\274\373\356\2736\337\217do$''\363\353\257\277f\277~\3754\272"
#"\374\332\265k\363\365\327_\27\27;v\354\330!^\247P(x\362\344I\6\a"
#"\a\323\333\333\233\22\211\204\16\16\16\364"
#"\362\362b\267n\335\270t\351R\223#"
#"\321\275\360\304T\305\257\277\376\312\321\243"
#"G\213\255fFF\6\207\17\37N\17"
#"\17\17\206\206\206\362\302\205\v\342\17\364"
#"\344\311\23\306\305\305q\366\354\331tss\343\307\37\177l\262SFYFNN"
#"\16\17\36<\310\240\240 \r\373\261\243"
#"\243#k\326\254\311-[\266\360\316\235"
#";\354\336\275;\375\374\374\270d\311\22"
#"\376\365\327_\224\313\345T*\225LMM\345\376\375\373\31\24\24Dwww\235"
#"I\251\264\241L\21S\300\263g\317\370"
#"\360\341C\372\371\371\361\243\217>\322\231"
#"\311V\300\243G\217\304\250r\235:u\262z\244\214\27\21\27.\\\340\202\5"
#"\v\30\20\20\240\326\345\273\271\2711\""
#"\"\302\340\213\374\367\337\177\263s\347\316"
) 500
(
#"\\\263f\215Q\365\225Ibfff\0220-\357bbb\"\253W\257^\336"
#"Z\32\201\224\224\24\321\276\373\303\17?"
#"\30}]^^\36\201\242m\333\206P\346\210\251T*9p\340@\243\234;\264"
#"\341\355\267\3376;\327\366\213\200\253W"
#"\257\262u\353\326\214\210\2100y\2718"
#"77\227\315\2325\343\352\325\253M\2567??\237\1\1\1\6\303\326\2249b"
#"\n!\20\345r\271\326\343\2336m\242"
#"\267\2677;u\352\2445\35\311\203\a"
#"\17\350\346\346\306\207\17\37Z[U\273\342\352\325\253bw\\\261bE\16\e6"
#"\214\207\16\0352\312\213=22Ro"
#"\246\345\330\330X\275\376\v\277\376\372+}||\364zv\2259b\6\a\ak"
#"\215\3O\376\263\346}\340\300\0011V\270\266 _S\247N\265y\2244[C"
#"\225\230\252\245f\315\232\234={\266^"
#"G\225.]\272\350\314M/\f\243\274\275\275\365\326\337\251S'\36>|X\347"
#"\3612GLooo\255Y/\310\"\367;\325V\22\0\303\302\3024\316\213\216"
#"\216f\327\256]\255\245b\251\200.b\252\26m]}zz:]]]un"
#"\377\20\256\365\367\367\327[\177xx8"
#"?\370\340\3\235\307\313\0241\25\n\5\245R\251\3160\317\202\227Mnn.\23"
#"\23\0235\210*\240]\273vF\255\315"
#"\377[\212jW\177\371\362e\276\362\312"
#"+Z\177\337\240\240 \216\0325\212;"
#"v\3540\230\346\346\300\201\3\354\333\267"
#"\257\316\343\216(C\220\311d\360\364\364"
#"\324\310\24,\240R\245J\0\200\246M"
#"\233\342\316\235;\0\200Z\265j\351<\257\34E`Q\3\6\222HMM\325\232"
#"\310\366\374\371\363\330\260a\3H\32\225"
#"G\276v\355\332HMM\325[i\231\201\241\26\263\370\271\375\372\365\323"
#"\372f\337\272u\213\r\0324\260\202\206\245\a\306t\345\1\1\1\\\273v"
) 500
(
#"\255Z<\373?\376\370C\243\305\24\222\203\5\5\0051--M\314\332v\373\366"
#"m\235\365\ej1\2657-/(\244R)\352\327\257\217\353\327\257k\34S*"
#"\225\220H$\310\312\312\22\317\325\226\332"
#"\32\0\222\222\222\340\353\353kU]\365"
#"\341\340\301\203h\331\262%Z\266l)\266\354\266B\315\23251k\326,\\\271"
#"r\5\361\361\361\b\16\16F\365\352\325"
#"\305\343\365\352\325CJJ\n\362\363\363\325\256suu\305\316\235;Q\275zu"
#"DEE\1\0|||\264\346-\a\200\353\327\257\303\307\307G\267\"f\277z"
#"\245\f\357\277\377\276\316-\0@\3216"
#"\f\245RI\271\\.\232\215\212\303\236"
#"\263\362M\2336\211k\321\202\345@W\200\bs\240\332bV\250P\201C\207\16"
#"eTT\224Q\346\242.]\2720**J\347\361\a\17\36\320\20\265\376u\263"
#"r}vLa\302#\24WWW\215U\36{\3331QlB\26\24\24d\266"
#"\v\2316\\\275zUkWm\f\f\3311\37<x\240w\362\363\257\264c*"
#"\225J\276\365\326[:}\6\205\326R\327>\230n\335\272q\332\264i\326TQ"
#"/Pll\26\26\26fr\"WkCX\371\331\272u\253\311\327\346\347\347\263"
#"Q\243F\377\276\225\37\262\310\211\243q"
#"\343\306&y\263\220\344{\357\275\307*"
#"U\252\330u\255\\\230\220\311\345r\376"
#"\375\367\337F\31\253\355\201\244\244$:"
#";;s\317\236=F_\223\237\237\317\266m\333\32\25\242\260L\22\223,2\4"
#"\3E\361x\fy\27\245\246\246\362\213/\276`\273v\355,\36D\300T(\24"
#"\n1\370\230PJ#1\311\242T\212@\321\266^C/sRR\22;w\356"
#"\314\341\303\207\e\345\347Z\246f\345\252pqqAff&\262\262"
#"\262\340\353\353\213\320\320P\\\274x\21\31\31\31\0\200\247O\237\""
) 280
(
#"..\16\263g\317F\323\246Mq\375\372u\2348q\302\3566\314{\367\356\341"
#"\372\365\353P*\225 \211Q\243F\351"
#"\264\36\330\e\276\276\276\270s\347\16\242"
#"\243\243\321\254Y3,]\272\24III\310\311\311\1I\310d2\354\337\277\37"
#"AAAh\327\256\35z\365\352\205\35;v@\"\221\30\26n\231w\247t\343"
#"\332\265kb\300\177gggV\256\\\231nnnl\335\2725CCC\365n"
#"\256\2625\200\177\28\b{\362\2551+\267$T=\330}||X\271re"
#"V\256\\\231^^^\354\336\275;\227-[\306g\317\236\231$SB\222\326~"
#"\263J\e\362\363\363Q\261bE{\253\241\25IIIh\322\244\211\3709\"\""
#"\2\357\277\377\276\0355*\31\n\n\nP\241B\205\22_\377\257$fi\aI"
#"dgg\343\245\227^\202\243c\231Z56\32\345\304,G\251D\231\235\374\224"
#"\343\305F91\313Q*\361\377\0\260&\312\315"
#"y\362Q>\0\0\0\0IEND\256B`\202"
) 0 0 0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 2 #" ("
0 0 15 3 6 #"define"
0 0 24 3 1 #" "
0 0 14 3 9 #"cormen589"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 4 #" ("
0 0 15 3 3 #"let"
0 0 24 3 3 #" (("
0 0 14 3 1 #"g"
0 0 24 3 2 #" ("
0 0 14 3 3 #"new"
0 0 24 3 1 #" "
0 0 21 3 2 #"#t"
0 0 24 3 1 #" "
0 0 21 3 1 #"5"
0 0 24 3 3 #")))"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"6"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"7"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"8"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"5"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 2 #"-4"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 2 #"-2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 1 #"9"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 2 #"-3"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"7"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 5 #" "
0 0 14 3 1 #"g"
0 0 24 3 2 #"))"
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 7 38 4 0 0 0 1 2 29 2 1 #"\0"
2 -1.0 -1.0 0.0 0.0 0 9 500
(
#"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0j\0\0\0a\b"
#"\6\0\0\0>\3464T\0\0\17\327IDATx\234\355\235{LSW\34"
#"\307\277-\210\310\4Zy\24\301\312-\0230Fa\316g$):]\2668\300"
#"\241nKq\17\335\242\230\251\177l\316-Y2\37\3136\27qK\266E\343\234"
#"\23t\342c*s\16\343x\f\25\320l\3039'Ne(/Q\240U\260\260"
#"\226b\341\376\366\207kc\351-\264\267\267-E>\311Mz\357y\374~\347\376"
#"z\316=\347\334s~WDD\204!\6<bO+0\204}\f\31\312K\30"
#"2\224\2270\350\fU^^\16\205B\1\205B\201\234\234\34O\253#\0344\210"
#"(**\"\0\224\235\235M\307\217\37'\0\264b\305\nO\253%\b\203\312P"
#"\0h\355\332\265\346\363m\333\266\221D"
#"\"\361\240F\302\341\353\341\n-(\227"
#".]B\\\\\234\371\374\257\277\376\362"
#"\2406\302\342\325\206\322h4\270\177\377>\0 22\22\223&M\2\0tw"
#"w#==\35\371\371\371(++\363\244\212\202!\"\362\336\1\257H$2\377"
#"\256\255\255\5\3030\370\351\247\237\220\226"
#"\226\6\0P\253\325\b\v\v\363\224z"
#"\202\342\325\275\276\236\236\36\363\3010\f"
#"\212\213\213\221\226\226\206\242\242\"\20\321"
#"\2401\22\340\3455\2527R\251\24\t\t\t\310\317\317G{{;\0\300\317\317"
#"oP\30l\320\30\212\210 \26[7\20\22\211\4mmm\36\320HX\6\224"
#"\2414\32\r\264Z-\306\215\e\347iU\6\34\36\177F\31\215F\34;v\f"
#"\317?\377<\"##\361\363\317?{Z\245\1\211\307\272\347\27/^DNN"
#"\16\366\355\333\207\273w\357zJ\r\257\301\255\206\322h4\310\315"
#"\315ENN\316\240\32\214\272\3\227\e\312h4\342\304\211\23\310\311"
) 500
(
#"\311A~~>zzz\\-rP\"xg\302`0\240\242\242\2j\265\32"
#"\305\305\3058p\340\0\264Z\255\220\""
#"\6<\276\276\276x\375\365\327\241R\2510y\362d\4\a\a;\237\251P\223\206"
#"\27.\\\240\224\224\24\n\f\f\244\244\244$JOO\247\305\213\27\323\23O<"
#"A\276\276\2764l\3300\2\360H\34\"\221\210\246O\237N\263g\317\246\221#"
#"GRRR\22\25\26\26\22\313\262\274"
#"\357\257\323\206\352\356\356\2465k\326P"
#"dd$}\363\3157\324\332\332j\25G\253\325Rvv6\205\204\204\220\\."
#"'\37\37\37\233\205\374\352\253\257\234U"
#"\311\255l\336\274\231\302\302\302h\313\226"
#"-\324\324\324d\25\256\327\353\351\307\37"
#"\177\244\270\2708\232?\177>\31\f\6^r\2342\24\313\2624y\362dz\352"
#"\251\247H\257\327\367\e\337`0\320s"
#"\317=G\353\326\255\243\254\254,\2328"
#"q\242W\e\352\303\17?\244\211\23'"
#"\322\335\273w\373\215\333\335\335M\313\226-#\225JEF\243\321aYN\31j"
#"\371\362\345\4\200zzz\354N\303\262,\305\307\307SFF\6\21\21\235?\177"
#"\236V\257^M\243F\215\362*C}\362\311'\4\200t:\235C\351\236y\346"
#"\31R*\225t\377\376}\207\322\3616Taa!\305\306\306RWW\227\3158"
#"k\327\256%\265Zmu\275\247\247\207\22\22\22\350\350\321\243\346k]]]t"
#"\344\310\21:u\352\24_\225\334\306\225+W(<<\334fM\332\260a\0031"
#"\fCJ\245\222jkk\255\302SRR\350\273\357\276sH&oC\315\2325"
#"\213\16\37>\314\31\246\323\351\350\320\241C\4\200SQ\"\242\223'ORBB"
#"\2_\361\36e\311\222%\224\225\225\305\31\226\230\230H\0\250\242\242"
#"\202\326\256]\313y\17\256]\273F2\231\214:;;\355\226\311\313"
) 500
(
#"P---\24\24\24d\263\2555)\333\227\241X\226%\231LF7n\334\340"
#"\243\202\3070\32\215\24\24\24D---Va===\4\200\332\333\333\315\327"
#"\30\206\241\r\e6X\305\2351c\6\25\27\27\333-\227\327\\_aa!\346"
#"\317\237\17__\356\361\362\305\213\27\301"
#"\262l\237y\210D\"\244\245\245\241\240"
#"\240\200\217\n\36\343\327_\177\305\204\t"
#"\23\20\36\36n\25&\26\213QQQ\201\300\300@\0\17f\364\353\352\352\3000"
#"\214U\334\5\v\26\240\260\260\320n\271"
#"\274\f\245V\253\21\21\21\301'\251\5"
#"\21\21\21P\253\325N\347\343N4\32\rd2\231\315\360\251S\247\2\0n\335"
#"\272e~\355\242R\251\254\342\311d2"
#"\207\312\316\313P\235\235\235\309r$"
#"\237\244\26\4\6\6\242\263\263\323\351|\334\211=eOMM\305\2301c\240R"
#"\251\300\262,\206\17\37n\25g\344\310"
#"\221\16\225\235\327\\\337\350\321\243q\366"
#"\354Y>I-\270}\3736\242\243\243\235\316\307\235\310d2455\331\fO"
#"NNFii)Z[[!\225Jm\306kjj\352\263f\366\206W\215\232"
#":u*N\237>\315'\251\5\247N"
#"\235\302\264i\323\234\316\307\235<\371\344"
#"\223\250\250\250\200\301`\260\n\353\350\350@ii)\16\35:\4\340A\363WW"
#"W\a\275^o\25\367\364\351\323\216\225"
#"\235o\317G.\227\323\345\313\227m\306"
#"aY\266\317^_]]\35\205\206\206\362\236Rq\aW\257^\345\234\237\2339"
#"s&\345\347\347[]oll\344\234\26\353\335\353\323\351t$\225J9\247\234"
#"l\301{\34\265m\3336z\366\331g\371&\247\27^x\201>\375\364S\336\351"
#"\335\301\314\2313)&&\2066m\332d\361\207;q\342\4M\2300"
#"\301\241\31\231\207Y\267n\35\255\\"
#"\271\322\2414\274\r\245\327\353i\322"
) 500
(
#"\244I\364\361\307\37;\234\366\275\367\336"
#"\243\330\330X\322j\265|\305\273\205\231"
#"3gZ\324\2149s\346\320\236={\250\275\275\235\236~\372i\207o6\21Q"
#"AA\1\215\0325\212\32\32\32\34J\347\324\\_mm-\211\305b\332\262e"
#"\213\335i\276\375\366[\2\3009\2654\320\350m(\323\361\330c\217QFF\6"
#"I$\22\312\314\314\264;\277c\307\216\21\0\252\256\256vX\27\247_sh\265"
#"Z\222\313\345\264t\351\322>\333\334;w\356Pff&)\24\n\272v\355\232"
#"\263b\335\202-C=|\370\371\371Q||<\225\224\224\230\323544X\324"
#"\30\235NG\357\276\373.EDDPii)/]\4yq\250\325j\351\203"
#"\17> \251TJs\347\316\245U\253"
#"V\221\277\277\277\307_\340\271\373\b\16"
#"\16\246\267\336z\213\202\203\203I\"\221"
#"\320\227_~I\351\351\351$\225J)33\223\352\353\353y\337cA_\305\337"
#"\273w\17g\316\234Ann.\362\362"
#"\362\36\231\365\21\321\321\321\310\310\310@"
#"||<._\276\214\255[\267\2\0\326\254Y\203i\323\246a\336\274y\30="
#"z\264sB\204\250Q\275\321\351t\24\36\36Nmmm\256\310\336m\364\325\364"
#"\5\4\4\320\253\257\276J%%%V]xS\34!q\311\2\314\274\274<\250"
#"\325j\34<x\320\25\331{\24\245R"
#"\211\335\273w\243\245\245\5{\366\354\301"
#"\2349s,v\225\270\fA\315\376?s\347\316%\0004c\306\fWd\3576"
#"L5\212a\30Z\277~\275\335\257d\340\202\32%\370r\261\206\206\0060\f\3"
#"S\266W\257^\305\370\361\343\205\24\341"
#"6\262\262\2620u\352T\314\236=\333"
#"\241Zc\212+\344\255\25\274\351\333\273w\257\205\202\336\2743}\335"
#"\272u\356k\332\372A\360\32\25\e\e\213\353\327\257\233\317###\321"
) 500
(
#"\320\320\0\37\37\37!\305\fh\6|\215*//\2670\22\360\340UFQQ"
#"\221\220b\36I\0045\224\255f\316\233\233\277\201\202`M\237^\257GDD\4"
#":::\254\302\206\17\37\216\346\346fH$\22!D\rx\6t\323\227\227\227"
#"\307i$\0\350\352\352r\333\230*''\a\n\205\2\311\311\3118\177\376\274["
#"d\272\5\241\372\371\246\261\223\255\303\35"
#"c*\323:\272\343\307\217\323\226-[\b\0\25\25\25\271\\no\340\202q\224"
#" \271\325\327\327\223H$\352w\322\362"
#"\352\325\253B\210\263\t\360`\341\343\303"
#"\347\\k\352\\\215+\f%\310F\266\372\372zdffZ\\\333\261c\a\0"
#"`\345\312\225\346k7o\336t\351\340"
#"\327`0`\370\360\341\350\352\352\302?\377\374\3\0HIIq\231<w\342\262"
#"]\361\256x\240\366\246\267\213\35\223L"
#"\205B\201\272\272:\0@cc#\242\242\242\\\246\3\27\256(\273W\e\212\313"
#"\305\216\t\226e\261`\301\2\224\227\227"
#"\273\335\317\304\200\356\365y\202\207]\354"
#"\214\35;\26\"\221\310\334\363\24\213\305"
#"X\264h\221\2075\24\16\2576\224X,\2668\0 33\23D\4\275^\217"
#"M\2336!!!\301\303Z\n\203W7}\275\251\254\254\2640\214D\"\201F"
#"\243\261\271\231\301U\f=\243\354\200\210"
#"\320\331\331\t\37\37\37\3165\337\356\300"
#"#\317(os\246+\22\211\20\20\20\3401#\331\313\306\215\e\3153(\246\36"
#"j\237\3645\310r\306\231.\\0\350"
#"\363\26\372+\273=\273\22\255\362\354O"
#" _g\272C\206\342.\273#\273\22"
#"\37\246\317\247\354`v\246\353)\34\331\225h\201=\377\20\243\321H)))\4"
#"\200\312\312\312\234\376W\rv\354-\373\303\273?\372\333\325\322o\277u"
#"\260:\323\25\212\272\272:\233{qw\356\334i\376\35\37\37\217\344\344"
) 500
(
#"d\363yjj*\362\363\363\241R\251"
#"\220\233\233\333\377\272\214\276\254h\352L"
#"\360yU\200G\244Fi4\32\362\363"
#"\363\353\367\315\301\276}\373\314i\224J%\1\340tGd\213>\357\244D\"!"
#"\245RI\355\355\355\324\330\330H\215\215"
#"\215v\357\302xT\fED\264p\341\302>\215\24\30\30hvA\324\336\336N"
#"\0\350\320\241C\324\332\332J\215\215\215"
#"T[[\333\257\a\30\233w\322\264c\260\3671\324\353\263\3064t\261u,_"
#"\276\334\34\327\336]\211\275\31t3\23"
#"\236\240\273\273\eQQQ6\335\21\234={\26\263f\315rJ\206WO\312\16"
#"\24|}}\361\362\313/s\206\305\306\306:m$`\310P\202\261t\351R\207"
#"\256;\312P\323' S\246L\301\205"
#"\v\27\314\347\"\221\b\365\365\365\220\313"
#"\345N\347=T\243\4\244w\355\231;w\256 F\2\206\f%(\31\31\31\30"
#"6l\230\371\\\250f\17\0302\224\240\204\204\204 55\25\300\3?O\v\27"
#".\24,\357!C\t\214\251\26\275\364\322K\0301b\204`\371\16u&\4\306"
#"4\246\312\313\313CRR\222`\371\16"
#"\325(\201\361\365\365\305\246M\233\0045"
#"\22\340\302\32\25\24\24\4\0\346\17n"
#"\r\341\34\202\325(\"\302\321\243G\261l\3312\304\304\304\300h4\302h4B"
#"\241P\340\225W^\301\301\203\a\am"
#"3\310\262,\212\212\212\260j\325*\304\305\305!88\30#F\214@tt4"
#"\26/^\214\235;w\232W\364\362E\20C\235;w\16S\246L\301\27_|"
#"\201)S\246\240\250\250\bj\265\32w\357\336EII\t\222\222\222\260k\327."
#"$&&\242\244\244D\b\221\3\206k"
#"\327\256a\366\354\331x\347\235w\20"
#"\35\35\215\343\307\217\243\276\276\36Z\255\26eee"
#"HMMEaa!\306\215\e\207\3\a\16\360\27\344"
) 500
(
#"\354\314\361\341\303\207)44\224\216\35"
#";\326o\334\23'N\220L&\243\312\312Jg\305\16\b~\373\3557\n\r\r"
#"\245\335\273w\367\353\22\356\334\271s\24"
#"\27\27G'O\236\344%\313)C\225\224\224\20\0\372\373\357\277\355NS]]"
#"M\08\35\23z\23\225\225\225\4\300"
#"!\207\372\32\215\206\0\320\327_\177\355"
#"\260<\336\206\252\251\251\241\320\320P\372\375\367\337\35N[]]Maaat"
#"\345\312\25\276\342=J[[\e\311\345"
#"r\372\376\373\357\35N\333\332\332Jr"
#"\271\334\302\e\231=\3606\324\252U\253"
#"\350\355\267\337\346\f\323\351t\244T*"
#"I\"\221Pvv6g\234\365\353\327\323k\257\275\306W\274G\331\272u+\245"
#"\247\247s\206\365\364\364\220J\245\"\206"
#"ah\305\212\25\26\313\302Ldgg\223R\251tH&/C\351\365z\n\16"
#"\16\346\3746\205\351\315\260R\251\244\262"
#"\2622\253\265\201&t:\35\5\6\6"
#"\322\275{\367\370\250\3401X\226\245q"
#"\343\306\321\237\177\376\311\31\216\377]\362"
#"TTT\230\327Fp=\277\344r\271C-\n/C\25\24\24Prr2g"
#"\330\266m\333,^\301WUU\21\0N'\272)))t\344\310\21>*x"
#"\214\252\252*\32;v,gXkk\253\225a\0PUU\225U\334\325\253W"
#"\333\374\276\a\27\274\272\3477n\334\350"
#"s\213\347\303\213\tM\337\324\275}\373"
#"\266U\274\361\343\307\343\306\215\e|T"
#"\360\0305556\313.\225J\241\323"
#"\351 \26\213\321\321\321\201\254\254,\0"
#"\17\336\362\366f\374\370\361\250\251\251\261"
#"[.\257\375(\315\315\3156\35\5\356"
#"\334\271\23o\276\371\246\371\3344\347\247"
#"\323\351\254\342FFF\342\346\315\233|"
#"T\360\30\315\315\315\210\214\214\264\31\36\20\20\0\226e\315"
#"33\08\327\354EEE\341\227_~\261[.\257\32"
) 500
(
#"%\223\311\320\334\334\314\0316o\336<"
#"\264\264\264X]\0373f\214\3255G"
#"\275\351\17\4\302\303\303m\226\335\204X"
#",\6\21\241\265\265\25\0\267\347\232\246"
#"\246&\316\17\261\330\314\323!-\377\207a\30+\237G&bbb\360\331g\237"
#"\231\317\357\334\271\3\0\360\367\367\267\212"
#"{\375\372u\257\373\344C_e/..\266\370\314\203T*\5\3030\234\333j"
#"\252\253\253\35+\273\303OSz\320\353"
#"\v\n\n\342\354\261\251\325j\363\32u"
#"\226e)11\221\30\206\261\212\327\331\331IAAA^\347\316\224eYb\30"
#"\206s\220o*\273ie\361\245K\227l\2564V(\24\16\315\320\360\36G\275"
#"\361\306\e\364\376\373\357s\206\231z~"
#"\246\203\353\203`\2337o\246\27_|"
#"\221\257x\217\362\321G\37\221J\245\342"
#"\f\333\260a\203E\331\271\206&\a\16"
#"\34\240\351\323\247;$\223\267\241\252\252"
#"\252($$\204\256_\277\316\31n0\308\a{D\17<\275\204\205\205\321\305"
#"\213\27\371\212\367(\32\215\206F\217\36"
#"M\345\345\345\234\341F\243\221\f\6\3"
#"\347\37\364\337\177\377\245\261c\307:<"
#"\205\346\324\\\337\376\375\373)00\220"
#"jjj\354Ns\353\326-\2\340\360"
#"\307\30\a\32\245\245\245\344\357\357\357\320"
#"\24\232V\253\245\230\230\30\332\270q\243"
#"\303\362\234\236=\337\275{\267\335\223\223"
#"\347\316\235\243\250\250(\372\374\363\317\235"
#"\25; 8s\346\f\1\260k\316\257\262\262\222&O\236\354\320'\"\36F\220"
#"U\374\5\5\5\364\370\343\217Sjj"
#"*\355\335\273\2274\32\215y&\342\316\235;\264\177\377~Z\264h\0211\fc"
#"\327\353\20o\342\217?\376\240\304\304D"
#"JJJ\242\35;v\320\355\333\267\3153\23mmm\364\303\17?\320\262e"
#"\313(<<\234\266o\337\316[\216`"
#"\333-\356\337\277O\273v\355\242\364\364t"
) 112
(
#"\n\r\r%\37\37\37\362\363\363\243\220"
#"\220\20JMM\245\355\333\267;\374\221"
#"`o\301h4\322\341\303\207i\311\222%\24\36\36Nb\261\230\2\2\2H*"
#"\225\322\274y\363(++\213:::\234\222\341\2225\23Dd\376\334\303\303^"
#"U\36\5\350\301\237\37]]]\360\367\367\27\314\303\363\177\363"
#"\232\367]\213\243o\352\0\0\0\0IEND\256B`\202"
) 0 0 0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 2 #" ("
0 0 15 3 6 #"define"
0 0 24 3 1 #" "
0 0 14 3 4 #"evil"
0 0 24 29 1 #"\n"
0 0 24 3 4 #" ("
0 0 15 3 3 #"let"
0 0 24 3 3 #" (("
0 0 14 3 1 #"g"
0 0 24 3 2 #" ("
0 0 14 3 3 #"new"
0 0 24 3 1 #" "
0 0 21 3 2 #"#t"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 3 #")))"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 2 #"-2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 2 #"-3"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 5 #" "
0 0 14 3 1 #"g"
0 0 24 3 2 #"))"
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 7 42 4 0 0 0 1 2 33 2 1 #"\0"
2 -1.0 -1.0 0.0 0.0 0 11 500
(
#"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\202\0\0\0`\b"
#"\6\0\0\0\321\217\252t\0\0\24\360IDATx\234\355\235{PT\327\35"
#"\307\277,\2\n\201\205\360^\25\26\221\0205\21&\32I\253`5\243!-\246"
#"\230\306\a\246\30\202\332F\r#UC\32I\203H\3066$\266c\e\337\r\232"
#"\326L$e \5\253A\321\16\206\304*X\237)\1\37\30]P\21y,,"
#"\273\262\354~\373\a\335-\353.\317\275\313.f?3;p\357\371\335s~w"
#"\357w\317=\347\334s~\327\201$a"
#"\347{\217\310\332\16\330\261\r\354B\260"
#"\3\300.\4;\377c\204\265\35\30\256\220\304\v/\274\200\302\302B888X"
#"\333\35\0@KK\v\212\212\212p\350"
#"\320!\324\326\326\242\251\251\t\201\201\201"
#"\2308q\"\236{\3569\314\235;\27"
#"\"\221\351\337\276\203\275\26180H\242"
#"\241\241\1o\277\3756v\357\336\r\215"
#"F\323\343\227;T\250\325jl\332\264"
#"\t;w\356\304\214\0313\20\37\37\217"
#"\340\340`\370\370\370@&\223\341\354\331\263(**Bkk+233\361\342"
#"\213/\32gB;\3B&\223\21\200\376\243\321h\254\352O[[\ecbb"
#"\370\322K/\361\352\325\253\275\332\26\25"
#"\0251,,\214\373\366\3553J\263\va\220\350\4aM!\334\277\177\237\0\370"
#"\332k\257\365\373\230\346\346f\2\340'\237|b\260\337\336F\30\306$%%a"
#"\361\342\305\330\261cG\277\217\21\213\305"
#"hjjBTT\24\234\234\234\260`\301\202\256\4\241U\372}\301\3325\302\205"
#"\v\27\350\347\347\307\266\2666\223\351\31"
#"\31\31\224J\245\214\211\211aMM\215Qzqq1\303\303\303\331\331\331I\322"
#"~k\0304\326\26\302+\257\274\302\255[\267\232"
#"L\213\210\210 \0\226\227\227s\335\272u\4`R"
) 500
(
#"\f\263f\315b~~>I\322>\216`E\362\363\363q\344\310\21TWWC"
#"\245R\r\350\330\243G\217\"..\316"
#"h\277V\253\305\371\363\347!\227\3131"
#"u\352T|\360\301\a\220J\245\330\267o\237\221m\\\\\34JJJ\0\330\307"
#"\21\254\312g\237}\206\334\334\\\375v@@\0\202\203\203!\225J\21\34\34l"
#"\360\277T*\205\233\233\e\0\340\336\275{P*\225\0307n\234Q\236\"\221\b"
#"\345\345\345pww\a\320\325\335\275~\375:\244R\251\221\355\324\251SQPP"
#"\0\235\241\35+\261m\3336\203\256h_\37ooo.^\274\230_}\365\25"
#"#\"\"\372\314\277{WW\245R\31"
#"\245_\275z\225\241\241\241$\355\267\6"
#"\253\22\23\0233 \373%K\226\340\243"
#"\217>\302\330\261c\321\320\320\320\253\355"
#"\274y\3630f\314\30$$$@\253"
#"\325\302\305\305\305\310\246\261\261\21b\261"
#"\30\200\375\326`5\256]\273\206\212\212"
#"\n8;;\243\243\243\243W\333\340\340"
#"`\354\335\273\27\263f\315\2\320U\375"
#"755\241\243\243\3\316\316\316F\3663g\316\304\211\23'\320\330\330\b//"
#"\257\36\363\275y\363&$\22I\327\206"
#"\340\365\235\35#\264Z-/^\274\310"
#"\355\333\2673!!\201\22\211\244\337\267\203\25+VP.\227\e\3459g\316\34"
#"}\213\277;r\271\234\0\230\233\233\313"
#"\306\306F\312d2\326\324\324P\241P\30\331.]\272\224\333\266m#I\16\253"
#"g\r7n\334@QQ\21\352\352\352p\357\336=H$\22L\2300\1\263g"
#"\317\206\267\267\267\265\335\323\323\331\331\211"
#"\263g\317\342\313/\277Dii)\312"
#"\312\312\320\330\330h`\343\353\353\213\351"
#"\323\247C\243\321\240\250\250\310(\17"
#"\211D\202\217>\372\b\261\261\261&\313\310\311\311\301\201"
#"\3\ap\344\310\21\203\375\265\265\265\0303f\214\221}F"
) 500
(
#"F\0066n\334\250\337\256\257\257\307\304"
#"\211\23q\361\342E\4\6\6\16\217\32"
#"\341\310\221#\214\216\216\246\267\2677W"
#"\254X\301\254\254,\356\332\265\213o\277"
#"\3756\343\342\342(\26\213\231\234\234\314"
#"\352\352j\253\370\247T*YZZ\312"
#"\254\254,\316\235;\227\217<\362\210\321"
#"/{\354\330\261\\\262d\tw\356\334"
#"\311o\276\371F\177\354\251S\247\214l"
#"\23\23\23\331\324\324\324k\231\355\355\355"
#"\f\v\v\343\27_|1(\237_~\371e\276\376\372\353\372m\233\26\202V\253"
#"\345\233o\276I\251T\312\375\373\367S"
#"\253\325\232\264S(\24LOO\247\257"
#"\257/\277\376\372k\213\373\325\322\322\302"
#"\303\207\17s\303\206\r\2341c\6\235"
#"\235\235\215.\346c\217=\306e\313\226"
#"\361\343\217?69\230\243C\255V\323"
#"\325\325\225\0\350\353\353\313\202\202\202~"
#"\373Q^^\316G\37}\224\247N\235\32\220\377o\276\371&\1\30\334.lZ"
#"\b\v\27.\344\344\311\223\331\336\336\336"
#"/\3733g\316\20\0+++\5\365\243\276\276\236\371\371\371LMM\345\224)"
#"S\350\350\350hp\321E\"\21#\""
#"\"\230\222\222\302\277\375\355o\274}\373"
#"\366\200\362\2373g\16\27,X\300\273"
#"w\357\16\330\267\177\375\353_\4\300\277"
#"\377\375\357}\332vtt\360\255\267\336"
#"bpp\260\321\320\264\315\n\341\203\17> \200~\213@GYY\31\375\375\375"
#"YQQ1\350\262o\334\270\301\375\373\367\363\227\277\374%'L\230`\364kw"
#"rr\342\17~\360\3\246\245\245\361\340\301\203lnn\36tY$y\363\346M"
#"\263\216?}\3724CBB\30\e\e\313C\207\16Q\255V\e\244\337\275{\227"
#"\373\366\355cPP\20cccM\336vlR\b\365\365\365\364\362\362\342w"
#"\337}\327\243MUU\25\v\v\vM"
#"\246\345\344\344p\346\314\231\375.\257\252\252"
) 500
(
#"\212{\366\354abb\"\245R\251\321\205wuu\345\354\331\263\271q\343F\36"
#"?~|\300\342\34\n\332\332\332\270k\327.FGGS,\0263,,\214\323"
#"\247O\347\330\261c\351\351\351\311\371\363"
#"\347\263\254\254\254\307g#6)\204\264"
#"\2644\276\361\306\e&\323\324j5\253"
#"\252\252\b\200\331\331\331&m\264Z-\237|\362I\376\363\237\3774J\323h4"
#"<{\366,\267n\335\312\227^z\211\376\376\376F\27\336\313\313\213qqq|"
#"\357\275\367x\362\344Ivtt\by"
#"z\26\247\271\271\231\337~\373-\277\376\372k^\277~]\377\204\2617lr@"
#"\351\360\341\303\330\265k\227\311\264\335\273"
#"wc\365\352\325\275\36\357\340\340\200\370\370x\34>|\30\323\247OGEE\5"
#"N\2348\201\23'N\340\253\257\276BKK\213\201}@@\0\242\243\243\21\23"
#"\23\203\230\230\30<\361\304\23V\237~f\16b\261X?b\330_ln\34\241"
#"\265\265\25\22\211\4\255\255\255\275\332\275"
#"\377\376\373P(\24\6}\343\356\244\245"
#"\245a\367\356\335\350\350\350\200R\2514"
#"H\v\t\t\321_\364\350\350h\204\205"
#"\205\t\345\376\260\305\346j\204\273w\357"
#"\302\337\337\337\254<\356\337\277\217\337\377"
#"\376\367\320h4ppp\300\244I\223"
#"\f~\361\243G\217\26\310\333\207\a\233"
#"\23\202\243\243c\237c\357}\341\342\342"
#"\202\234\234\34\244\247\247\343\334\271s6"
#"5\352h\253\330\334\215\320\307\307\a\r"
#"\r\r0\367\2165f\314\30\214\e7\316.\202~bsBpssCDD"
#"\4\216\35;fV>\207\16\35\302\354"
#"\331\263\5\362\352\341\307\346\204\0tM"
#"\241\352>sg\240\250\325j\344\347\347c\336\274y\2z\365pcs\275\6\0"
#"\220\313\345\b\17\17GII\t&M\2324\340\343\263"
#"\263\263q\362\344I\344\347\347\333\314r4\233\307\262C"
) 500
(
#"\e\203\347\323O?epp\360\200\307\355\17\36<H\0\274v\355\232\205<{"
#"8\261\311[\3\0\214\e7\16\211\211"
#"\211\b\b\b\200L&\353\3271\205\205\205\2307o\36JJJ\20\22\22ba"
#"\17\0372\254\255DS\374\345/\177\241"
#"\253\253+\333\333\333\271g\317\36\372\370"
#"\370033\223\367\356\3353i\177\345\312\25.Z\264\210\243G\217fNN\16"
#"\275\274\274\370\371\347\237\17\261\327\303\e"
#"\233\22\202F\243\341\372\365\353\t\200\343"
#"\307\217\327\357\257\254\254dRR\22\335\335\3359k\326,&%%1--\215"
#"\t\t\t\2340a\2\3\3\3\271y\363f666R\251T\322\311\311\211\0"
#"\270f\315\32\336\277\177\337\212g4|\260\231\306bKK\v\26/^\214/\276"
#"\370\2\0\20\37\37\377\3779\367\377\343\376\375\373(--\205L&Ccc\243"
#"~\355\377\344\311\223\341\350\350\250\267{"
#"\372\351\247QQQ\1\240k\356~nn\256\3115\0v\272am%\222]\217"
#"\201\303\303\303\r\236\0\246\247\247\17:"
#"\277\327_\177\335 /\17\17\17~\366\331g\2z\374\360a\365\306bqq1"
#"\246M\233\206\252\252*\203\375\203\3516"
#"\352\210\212\2122\330\226\313\345X\270p"
#"!V\255Z5\340\245e\337\e\254\251\302-[\266P$\22\231\234\306}\376\374"
#"\371A\347{\371\362\345\36\247\207GD"
#"D\260\252\252J\300\263x8\260\212\20T*\25\227.]\332\343\305\22\211D&"
#"\227h\r\4oo\357\36\363wss\343\376\375\373\5:\233\207\203!\27B]"
#"]\35\243\242\242z]\324\21\36\36nv9?\376\361\217\373\\<\222\222\222\""
#"\300\31=\34\fy\e!//\17g"
#"\317\236\355\325\306\234\366\201\216\a\333\t\0172{\366l\254Y\263\306"
#"\354r\36\26\206\\\b)))\250\254\254D|||\2176B\b\341"
) 500
(
#"\231g\2361\271\337\325\325\25\177\376\363"
#"\237q\354\3301\204\206\206\232]\316\276"
#"}\373\20\22\22\202\2313g\352\273\254\303\22kVG\313\226-3Ye\347\346"
#"\346\232\235wSS\223\311\274\375\374\374"
#"\372\\E\324_t\321H\n\v\v\231\235\235M\0<z\364\250 y\0175V"
#"\23B]]\235~i\330\352\325\253\351"
#"\351\351\251\277X\227.]\22\244\214\307"
#"\37\177\234\0\30\20\20\300\274\274<\316"
#"\2301\203\0\270|\371rA\362\a\272"
#"\302\323t\337\316\310\310\20$\357\241\306"
#"jB\320\365\32\346\317\237O\222lhh\340\252U\2538r\344H\301\246\217'"
#"%%q\331\262e\372\32\240\262\262\222"
#"...\4\300\343\307\217\233\235\277\256g\243R\251x\341\302\5#a\f'\314"
#"\26\202\\.gLL\f\245R)\177\361\213_\30\255\2621\305\251S\247\350\340"
#"\340@\27\27\27\243 \221B>>nmm5\332\367\356\273\357\22\0CCC"
#"\a\274P\245\276\276\2362\231\2142\231"
#"\314`\35f\367E12\231\314l\277\255\201YBP(\24\4\300\270\2708\226"
#"\227\227\353\277\220\336\320j\265\372\356\343"
#"\206\r\e\314)~Ptttp\362\344\311\4\320\343\"\232\236\350\336\326xp"
#"a\253F\243a\\\\\34===\5\364v\3500K\b\205\205\205\6\27^\255"
#"V\367\371\253\370\370\343\217\t\200\22\211"
#"\304\344/v((//\247\243\243#\35\35\35\a\264FR\243\321\30|\0\30"
#"\4\261\330\273w\357\367S\br\271\234"
#"\27.\\\320o\353\226\242\231\212\316A"
#"vU\325\201\201\201\4\300\277\376\365\257"
#"\346\24m6\272\26\177DDD\277ng\246\0\300\204\204\4j\265Z*\24\n"
#"}\200\313\341\210`\215\305\334\334\\\375m\242'~\375\353_\23\0\237"
#"y\346\231\36c\35\f\25\n\205\202\343\306\215#\0n\336\274yPy\350"
) 500
(
#"\32\210\272\217\247\247\347\240Eem\314\26Bcc\243\376\213\350iu2\3315"
#"\213\310\305\305\205\16\16\16<}\372\264"
#"\271\305\nBII\t\1p\344\310\221\203~\20\245\253\r\314}6bm\314\22"
#"\202\256M\220\220\220\320\247\355O\177\372S\2`RR\2229E\nNrr2"
#"\0010::\332\352\265\22451K\b"
#"\272\200\221\272.\225.\202\327\203_\350"
#"\321\243G\t\200\356\356\356\274u\353\226Y\16\vMSS\23\3\2\2\b\200;"
#"v\354\260\266;V\303,!ddd\230\34\306\355\336\265R\253\325\2348q\""
#"\1\360\275\367\3363\327_\213\220\227\227"
#"\247\237\311dn\364\222\341\212\305G\26"
#"\267n\335\252\237\214j\313\23I\347\317"
#"\237O\0\2347o\236\265]\261\n\26\25BCC\3\275\274\274\372lH\332\2"
#"uuu\372\347\35\a\16\34\260\266;"
#"C\216E\205\360\332k\257\21\0\347\316"
#"\235k\311b\4c\317\236=\372'\224\r\r\r\326vgH\261\230\20\316\237?"
#"OGGG\216\0301\202\377\371\317\177,U\214\340\314\2325\213\0\270t\351R"
#"k\2732\244XL\b?\372\321\217\b"
#"\200\251\251\251\226*\302\"\\\271r\205"
#"\243F\215\"\200AG5\35\216Xd\201K^^\36\26,X\0\37\37\37\\"
#"\276|\31\236\236\236B\27aQ\336\177"
#"\377}\244\245\245!88\30\337|\363\215\376\205\0315558x\360 \216\35"
#";\206\372\372zttt\300\337\337\37"
#"QQQ\210\215\215\305\264i\323\254\354"
#"\271\31\b\255,\245R\311\340\340`\2"
#"\340\256]\273\204\316~H\350\354\354\344"
#"\224)S\364\313\346\352\353\353\231\234\234"
#"L___\276\372\352\253\314\317\317g"
#"YY\31\377\375\357\177\363\37\377\370"
#"\a\327\256]\313\361\343\307\363\371\347\2377k\32\2765"
#"\21\\\b\2336m\"\0FFFZ\375\345\230\346p\356"
) 500
(
#"\3349\216\0301\202\16\16\16\34=z4\337z\353\255^\237\226j4\32~\370"
#"\341\207\364\367\367\37Vm\"\35\202\n"
#"\341\346\315\233\372\0\323\245\245\245Bf"
#"m\25\266l\331B\0\334\263gO\277\2179q\342\4\1\230\25\2\330\32\b*"
#"\204\204\204\4\2\340\302\205\v\205\314\326"
#"*(\24\n>\376\370\343\334\270q\343\200\217=}\3724}||\254\366\332\200"
#"\301 \230\20\312\312\312\b\200\243F\215"
#"\3525\206\362pa\347\316\235\2343g"
#"\216\3114\215F\303\204\204\4\375\364<SoXy\347\235w\370\312+\257X\330"
#"K\341\20D\b\32\215\206O=\365\324"
#"\260\236\305\333\35\215F\303\307\36{\254"
#"\307\352\35\0\245R)\313\313\313\31\23\23C\300\370E\240J\245\222^^^6"
#"\367\220\255'\4\21\202nD.((\310&#\227\17\224\253W\257R\"\221\230"
#"L\323\315\277\350~\341\1\230\234\317\360\342\213/\16\2335\226fG^mii"
#"Azz:\200\256hf\243F\21527K\253s\351\322%<\365\324S&\323"
#"\274\274\274\240P( \22\211\320\332\332"
#"\212\235;w\2\200\311x\316S\246L\301\245K\227,\352\253P\230-\204M\233"
#"6\241\276\276\36\321\321\321X\264h\221"
#"\20>Y\235\332\332Z\4\5\5\365\230\356\352\352\n\255V\v\17\17\17\375>S"
#"a\374\202\202\202p\364\350Q\213\370("
#"4f\255}\254\252\252\302\237\376\364'"
#"\210D\"\374\361\217\177\24\312'\253\343"
#"\345\345\325\347\v6E\"\21H\352\337\336f\352\335\313\r\r\r\303fT\265W"
#"!\324\325\325\341\335w\337\305\214\0313"
#"\20\30\30\b'''\370\373\373c\332"
#"\264i\310\314\314\304\372\365\353\241V\253"
#"\261|\371rDFF\16\225\317\203\342w\277\373\35N\237>\335\257\30"
#"\317\275\205\364+))1x\251\246\227\227\27\244R)\256_\277nd["
) 500
(
#"[[\333\365*\275\341\200\251\206CGG\aSRR\350\351\351\3115k\326\360"
#"\330\261c\254\255\255\245V\253\345\255["
#"\267\370\345\227_r\355\332\265tqqa`` o\334\2701\264-\233A\240"
#"[|#\221H\270r\345J\26\27\27"
#"\367\270\264N\255V\323\303\303\203w\356"
#"\3341J\253\257\2577X\354\252\233\311lj\361kHH\210\301t\177[\306H"
#"\b*\225\212?\374\341\17\231\230\230\330"
#"g\327\247\241\241\201+W\256\344\263\317"
#">k1\a\205B\267\272\251\373\307\335"
#"\335\235\213\27/\346\201\3\a\330\322\322"
#"b`\237\234\234\334\343`\322\203S\364\326\255[gdS\\\\\314I\223&\r"
#"\233\t\261\6BP\253\325\349r\344\200W\vGEE\361\205\27^\240R\251"
#"\24\3249!\211\216\216\3565z\212\223"
#"\223\23ccc\271c\307\16\326\325\325"
#"\361\333o\277\245\257\257/\353\352\352L"
#"\346\247V\253\251R\251L\256c\350\354\354dDD\4?\375\364SK\237\226`"
#"\30<\206NII\201\263\2633\266l\3312\340[LJJ\n\202\202\202\360\306"
#"\eo\230s\247\32\20\32\215\6r\271\34r\271\34---\275\376-((@"
#"mmm\277\362upp@TT\24bbb\360\311'\237\340\334\271s\360\361"
#"\361\351\327\261Z\255\26\216\216\216x\365"
#"\325W\221\223\223c\316\351\r)z!\324\325\325a\322\244I\250\254\254D@@"
#"\200\221aEE\5\26,X\0\261X\214\317?\377\34R\251\324 \275\271\271\31"
#"\343\307\217\307\311\223'\373\365\216\244\266"
#"\266\266~]\300\336\376*\24\na\276\205n8;;\343\347?\3779RSS"
#"\361\344\223O\"++\v\357\274\363\16"
#"\252\253\253\373<\257\306\306F\374\354g?C{{;N\235:%\270"
#"o\226D?\216\220\223\223\203\245K\227\232\24Auu5\236~\372i"
) 500
(
#"\354\335\273\27\355\355\355\b\t\tAMM\215\201\30<==\261|\371r\254X"
#"\261\2QQQ}^H\255Vk\266\363\216\216\216pww\207X,\206\207\207"
#"G\257\177\v\n\np\374\370\361\36\363"
#"\362\365\365\305\352\325\253\261r\345J\370"
#"\371\371\351\367\377\3467\277\201T*\305"
#"\364\351\323\261h\321\"\274\374\362\313F"
#"ay\252\253\253QPP\200\354\354l$''#;;\333\354s\ej\364B"
#"(..Fff\246I\243\347\236{\16\353\326\255CRR\22\0\340\332\265k"
#"\210\217\217\307\271s\347\f\354T*\25JKKQZZ\332g\301nnn\375"
#"\272\200\275\375}\344\221G\372}\2422"
#"\231\314\244\20&O\236\214\324\324T,Y\262\4...&\217MLL\304\363"
#"\317?\217?\374\341\17X\261b\5\356\334\271\3???\214\0325\n\267o\337"
#"\206V\253Ell,\312\313\313\207m\250_\375\255!00\20g\316\234\201D"
#"\"10 \t\221HdP\3l\337\276\35\351\351\351hjj2\260\375\356\273"
#"\357\20\32\32\212\315\2337\367z\1=<<\fb'\17\5\2337o\326\17\205"
#"\3]o\211IMM\305\263\317>;\340\274\356\334\271c0Um\314\2301B"
#"\272j\35t\255\306\21#F\230\354\352\350\342\0t_\275$\223\311z\f\210!"
#"\26\213\5\vV%$\37~\370!]]]\271j\325*{\344U\23\350o\r"
#"\336\336\336\270}\373v\217#aNNN\372\377kjjL\16\235\252T*("
#"\225J\233\34V\375\311O~\202%K\226\30\214\n\332\371?\372!f\251T\212"
#"+W\256\30\e\374\357\325\270\225\225\225"
#"\372}%%%&/\366\345\313\227\215z\23Bq\375\372uDFF\"22"
#"\22\333\267o\37\360\361R\251\324.\202\336\320"
#"U\r\231\231\231\\\273v\255\311jC7\222"
) 417
(
#"\246R\251\364C\254\246\226\260eee"
#"Yd\35\203\256\314\214\214\f\375\312\352"
#"\336\2r\330\318z!\324\324\324\360\321G\37\345\335\273wM\32v\217\34f"
#"*\36Bkk+\375\374\374x\361\342"
#"E\301\235\314\310\310\240T*\325o\227"
#"\227\227\367\31\264\313\316\3000\30Y\\"
#"\266l\31F\216\34\211m\333\266\231\254"
#"=\332\333\333\1t=\217\177\220\344\344"
#"d\310\345r\344\345\345\t]i\31\214"
#"9\334\273w\17s\346\314\301\330\261cQTT$xY\337[\272\253\242\275\275"
#"\235\221\221\221\3\16;\367\333\337\376\326"
#"(\302\230%\320\5\346\300C27\322"
#"\2260\252_\333\332\332\364\21Q\373\352"
#"\6\266\266\266r\303\206\r\f\v\vcss\263\305\234|\20]X\277\341\36\267"
#"\310\2260\232\230\342\346\346\6\245R\t777\214\37?\36\31\31\318s\346"
#"\f\224J%\200\256.\342\305\213\27\221"
#"\225\225\205\320\320PTUU\241\242\242\2b\261\330b\265VHH\210AO!"
#"..\16\0p\353\326-\213\225\371\275\2437\225TWWs\375\372\365|\342\211"
#"'\350\342\342B\261XLggg\206"
#"\207\207\363W\277\372\225E\32\206\246\320"
#"E>\227\313\345\324j\265\372^\314py\326?\34\30\320jh\271\\n0a"
#"s\250\350\354\354DXX\230\301t\260\362\362rL\235:u\310}yX\261\231"
#"\367>\366\207\336z-v\314cX\t\301\216\345\260\372{\37\355\330\6v!"
#"\330\1\0\374\27b$\334\214\327\306\316\364\0\0\0\0IEND\256B`\202"
) 0 0 0 0 24 29 1 #"\n"
0 0 24 3 1 #" "
0 0 24 29 1 #"\n"
0 0 24 3 2 #" ("
0 0 15 3 6 #"define"
0 0 24 3 1 #" "
0 0 14 3 13 #"dijkstra-fail"
0 0 24 29 1 #"\n"
0 0 24 3 4 #" ("
0 0 15 3 3 #"let"
0 0 24 3 3 #" (("
0 0 14 3 1 #"g"
0 0 24 3 2 #" ("
0 0 14 3 3 #"new"
0 0 24 3 1 #" "
0 0 21 3 2 #"#t"
0 0 24 3 1 #" "
0 0 21 3 1 #"4"
0 0 24 3 3 #")))"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 1 #"2"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"1"
0 0 24 3 1 #" "
0 0 21 3 2 #"-3"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 6 #" ("
0 0 14 3 9 #"add-edge!"
0 0 24 3 1 #" "
0 0 14 3 1 #"g"
0 0 24 3 1 #" "
0 0 21 3 1 #"0"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #" "
0 0 21 3 1 #"3"
0 0 24 3 1 #")"
0 0 24 29 1 #"\n"
0 0 24 3 5 #" "
0 0 14 3 1 #"g"
0 0 24 3 3 #")))"
0 0
| false |
1404f462b707cb08de0c10cfac4a8ebebb5acf22 | e1cc058e1d24f98ccdf112f9ccc8b90adc24401c | /ROT13-20161021.rkt | d446427c0a6ec5c034264c07ff4579be7dfb4457 | [] | no_license | bctnry/RosettaCodeTasks | 09a230ee80d4200402c05da2f81a71aea2bc248c | 60762f731db539b0247814cf4f1d0c6475c397c9 | refs/heads/master | 2021-01-11T05:46:38.038160 | 2016-12-09T07:56:25 | 2016-12-09T07:56:25 | 71,572,540 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 595 | rkt | ROT13-20161021.rkt | #lang racket
(define (rot-13 str)
(let* ([determine (λ (t)
(cond ((and (char>=? t #\a) (char<=? t #\z)) #T)
((and (char>=? t #\A) (char<=? t #\Z)) #F)
(#T '())))]
[c13By (λ (t y) (+ t (remainder (+ y (- t) 13) 26)))]
[trans (λ (t) (case (determine t)
((#T) (integer->char (c13By 97 (char->integer t))))
((#F) (integer->char (c13By 65 (char->integer t))))
(('()) t)))])
(list->string (map trans (string->list str)))))
| false |
c1532cd421a32d7e755dd9960f4b8e1aad09a02e | 3c8992d229b954f2920bc3e14790621a5752c511 | /examples/snake-modules/slither.rkt | 8839a5d45496ca5192c9799e5a811a3ef5865f46 | [] | no_license | samth/var | 0997324b9d97f365718d9626557938b65c69dc61 | 6817f7d688bdd3ee4ae8314083e78ca72eba23da | refs/heads/master | 2016-09-05T23:25:43.533316 | 2013-02-04T20:11:48 | 2013-02-04T20:11:48 | 1,740,899 | 3 | 2 | null | null | null | null | UTF-8 | Racket | false | false | 2,567 | rkt | slither.rkt | #lang var cesk
(define-contract posn/c (struct/c posn exact-nonnegative-integer? exact-nonnegative-integer?))
(define-contract direction/c #;symbol? (one-of/c 'up 'down 'left 'right))
(define-contract snake/c
(struct/c snake
direction/c
(non-empty-listof posn/c)))
(module data racket
(struct posn (x y))
(struct snake (dir segs))
(struct world (snake food))
;; posn=? : Posn Posn -> Boolean
;; Are the posns the same?
(define (posn=? p1 p2)
(and (= (posn-x p1) (posn-x p2))
(= (posn-y p1) (posn-y p2))))
(provide/contract
[posn (exact-nonnegative-integer? exact-nonnegative-integer? . -> . posn/c)]
[posn? (any/c . -> . boolean?)]
[posn-x (posn/c . -> . exact-nonnegative-integer?)]
[posn-y (posn/c . -> . exact-nonnegative-integer?)]
[posn=? (posn/c posn/c . -> . boolean?)]
[snake (direction/c (cons/c posn/c (listof posn/c)) . -> . snake/c)]
[snake? (any/c . -> . boolean?)]
[snake-dir (snake/c . -> . direction/c)]
[snake-segs (snake/c . -> . (non-empty-listof posn/c))]))
(module cut-tail racket
(require 'data)
;; NeSegs is one of:
;; - (cons Posn empty)
;; - (cons Posn NeSegs)
;; cut-tail : NeSegs -> Segs
;; Cut off the tail.
#;
(define (cut-tail segs)
(cond [(empty? (cdr segs)) empty]
[else
(cons (car segs)
(cut-tail (cdr segs)))]))
(provide/contract [cut-tail ((non-empty-listof posn/c) . -> . (listof posn/c))]))
(module slither racket
(require 'data 'cut-tail)
;; snake-slither : Snake -> Snake
(define (snake-slither snk)
(let ([d (snake-dir snk)])
(snake d
(cons (next-head (car (snake-segs snk))
d)
(cut-tail (snake-segs snk))))))
;; next-head : Posn Direction -> Posn
;; Compute next position for head.
(define (next-head seg dir)
(cond [(symbol=? 'right dir) (posn (add1 (posn-x seg)) (posn-y seg))]
[(symbol=? 'left dir) (posn (sub1 (posn-x seg)) (posn-y seg))]
[(symbol=? 'down dir) (posn (posn-x seg) (sub1 (posn-y seg)))]
[else (posn (posn-x seg) (add1 (posn-y seg)))]))
(provide/contract [snake-slither (snake/c . -> . snake/c)]))
(module S racket
(require 'data)
(provide/contract [S snake/c]
[L (non-empty-listof posn/c)]
[L2 (listof posn/c)]))
(require 'S 'slither)
(snake-slither S)
#;
(begin #;(cut-tail L)
(reverse L2 L2)
#;
(cut-tail/acc L L2)) | false |
131083ad7f320e3524f85a33b72a25cdecba5944 | 9db1a54c264a331b41e352365e143c7b2b2e6a3e | /code/chapter_2/super-map.rkt | c27ee970b79dcd550d8598800b1479435159cb56 | [] | no_license | magic3007/sicp | 7103090baa9a52a372be360075fb86800fcadc70 | b45e691ae056410d0eab57d65c260b6e489a145b | refs/heads/master | 2021-01-27T10:20:28.743896 | 2020-06-05T15:17:10 | 2020-06-05T15:17:10 | 243,478,192 | 4 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 912 | rkt | super-map.rkt | #lang racket
; http://lisp.test.openjudge.org/2019hw3/2/
; super-map过程以一个取n个参数的过程p和n个表为参数,将过程p应用与所有表
; 的第一个元素,而后应用于所有表的第二个元素....如此下去,然后将所有应用的结
; 果收集成一张表返回
(define (exit) #f)
(define (map op lst)
(if (null? lst)
'()
(cons (op (car lst))
(map op (cdr lst)))))
(define (super-map op . w)
(if (= 0 (length (list-ref w 0)))
'()
(let ((tmp1 (map car w))
(tmp2 (cons op (map cdr w))))
(cons (apply op tmp1)
(apply super-map tmp2)))))
(define (myloop)
(let ((a (read))
(b (read))
(c (read)))
(if (eq? a eof)
(void)
(begin (displayln (super-map + a b c))
(displayln (super-map (lambda (x y) (+ x (* 2 y) )) a b ))
(myloop)))))
(myloop) | false |
b174b53506a60e8f1e59e8d564248225f282a689 | 166682ad09ff59a36ee9159abd0f937c45d244a1 | /nextbutton.rkt | 349a5fc4ca21178594d458f6f4f40dd94d6b3222 | [] | no_license | cemcutting/forgeOld | 01b03686e6fac6c09cd858fc3b61a738ea841d5d | 1d32f797b374d8236fe89d79dcaa88cf0e8bd044 | refs/heads/master | 2020-06-23T16:03:44.781834 | 2019-07-24T16:29:55 | 2019-07-24T16:29:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 3,022 | rkt | nextbutton.rkt | #lang rosette
(require br/datum)
(require forged-ocelot)
(require "rosettemodels.rkt")
(provide model->constraints bind-universe mk-rel get-model get-next-model sneaky-and)
(define prev-constraints null)
(define constraints-list '())
(define solvers-map (make-hash))
(define constraints-map (make-hash))
; Provides a syntax for defining a universe of discourse an binding each atom
; to a singleton relation. These relations aren't exposed to the forge user
; but are used to parse a model back into constraints
(define-syntax (bind-universe stx)
(syntax-case stx ()
[(_ u bound singletons (id ...)) #'(begin
(define lst (list 'id ...))
(define-values (u id ...) (values (universe '(id ...)) (declare-relation 1 (string-append "atomic-" (symbol->string 'id))) ...))
(define singletons (list (list 'id id) ...))
(define bound (map (lambda (x y) (make-exact-bound x (format-datum `((~a)) y))) (list id ...) lst)))]))
; Helper that wraps the ocelot 'and' macro into a function for unrolling
(define (sneaky-and l r)
(and l r))
; Takes an ocelot model (#hash from relations to lists of tuples) and returns
; a list of constraints. This is used by get-next-model to generate a sequence
; of unique instances.
(define (model->constraints hashy singletons)
(define constraints (map (lambda (rel)
(map (lambda (tuple)
(in (mk-rel tuple singletons) rel)) (hash-ref hashy rel))) (hash-keys hashy)))
(foldl sneaky-and (= none none) (flatten constraints)))
; Returns a function
(define (sym-to-sin-func singletons)
(define (sym-to-sin sym)
(define filtered (filter (lambda (x) (eq? (car x) sym)) singletons))
(car (cdr (car filtered))))
sym-to-sin)
(define (mk-rel tuple singletons)
(define sts (sym-to-sin-func singletons))
(define ret
(case (length tuple)
([1] (sts (car tuple)))
(else (apply -> (map sts tuple)))))
ret)
; Gets the current (or initial) model and caches it as constraints
(define (get-model constraints model-bounds singletons name)
(define solvy (solve+))
(hash-set! solvers-map name solvy)
(define ros-model (solvy (interpret* constraints model-bounds)))
(if (sat? ros-model)
(begin
(hash-set! constraints-map name (matrix->constraints (model ros-model)))
(define fin-model (interpretation->relations (evaluate model-bounds ros-model)))
fin-model) ros-model))
; Gets the next model and caches it as constraints
(define (get-next-model model-bounds singletons name)
(define ros-model ((hash-ref solvers-map name) (hash-ref constraints-map name)))
(if (sat? ros-model)
(begin
(hash-set! constraints-map name (matrix->constraints (model ros-model)))
(define fin-model (interpretation->relations (evaluate model-bounds ros-model)))
fin-model) ros-model))
| true |
ba69dfd75a17e2d990fc67fb561e956479933529 | 9e2df25fd9c724abd5445eae6b0b4c5409b2935b | /Inclass3.rkt | e075ae6ce77ab28c51b6f6adb5fae391c515f94f | [] | no_license | Eddy-Rogers/Comp3351 | 65e32d065b5ca5d3c636dfdbac20ee8a43b3b6f6 | a75a0a74828fca48f5dded0e1848ca9760b20f2f | refs/heads/master | 2020-09-13T14:09:16.790498 | 2019-11-22T05:49:28 | 2019-11-22T05:49:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 949 | rkt | Inclass3.rkt | #lang racket
(define (myForce 🤔)
(cond
[(mcar 🤔) (mcdr 🤔)]
[else
(set-mcar! 🤔 #t)
(set-mcdr! 🤔 ((mcdr 🤔)))
(mcdr 🤔)]))
(define ones (lambda () (cons 1 ones)))
(define nats
(letrec ([f (lambda (x)
(cons x (lambda ()
(f (+ x 1)))))]))
(define powersoftwo
(letrec ([f (lambda (stream answer)
(let ([pr (stream)])
(if (predicate (car pr))
answer
(f (cdr pr) (+ answer 1)))))])
(f stream 1)))
(define (streamUntil stream predicate)
(letrec ([f (lambda (stream answer)
(let ([pr (stream)])
(if (predicate (car pr))
answer
(f (cdr pr) (append answer (list (car pr)))))))])
(f stream '())))
(define ones* (streammaker (lambda (a b) 1) 1))
(define nats* (streammaker (lambda (a b) (+ a 1))))
| false |
71bbeb661b56d0a977d061e471026adf45e5c023 | fc6465100ab657aa1e31af6a4ab77a3284c28ff0 | /results/all/let-poly-1-enum.rktd | 6cac99be124938f5e7f9877ad4e3e49aca62ec7f | [] | no_license | maxsnew/Redex-Enum-Paper | f5ba64a34904beb6ed9be39ff9a5e1e5413c059b | d77ec860d138cb023628cc41f532dd4eb142f15b | refs/heads/master | 2020-05-21T20:07:31.382540 | 2017-09-04T14:42:13 | 2017-09-04T14:42:13 | 17,602,325 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 26,034 | rktd | let-poly-1-enum.rktd | (start 2015-06-21T22:36:25 (#:model "let-poly-1" #:type enum))
(counterexample 2015-06-21T22:36:34 (#:model "let-poly-1" #:type enum #:counterexample ((λ Ⴤ (λ c (λ c +))) 20932547) #:iterations 627 #:time 9048))
(new-average 2015-06-21T22:36:34 (#:model "let-poly-1" #:type enum #:average 9047.0 #:stderr +nan.0))
(counterexample 2015-06-21T22:36:45 (#:model "let-poly-1" #:type enum #:counterexample (((λ a a) +) hd) #:iterations 787 #:time 11413))
(new-average 2015-06-21T22:36:45 (#:model "let-poly-1" #:type enum #:average 10229.5 #:stderr 1182.5))
(counterexample 2015-06-21T22:37:00 (#:model "let-poly-1" #:type enum #:counterexample (((λ c (λ a a)) (let ((b +)) (λ a a))) -1622) #:iterations 1030 #:time 14851))
(new-average 2015-06-21T22:37:00 (#:model "let-poly-1" #:type enum #:average 11770.0 #:stderr 1685.0051434145041))
(counterexample 2015-06-21T22:37:05 (#:model "let-poly-1" #:type enum #:counterexample (let ((b +)) ((λ a a) +)) #:iterations 338 #:time 4865))
(new-average 2015-06-21T22:37:05 (#:model "let-poly-1" #:type enum #:average 10043.75 #:stderr 2097.5128674615244))
(counterexample 2015-06-21T22:37:06 (#:model "let-poly-1" #:type enum #:counterexample (let ((% (let ((b (λ a a))) (λ a a)))) ((λ a (λ a a)) cons)) #:iterations 84 #:time 1276))
(new-average 2015-06-21T22:37:06 (#:model "let-poly-1" #:type enum #:average 8290.2 #:stderr 2390.5383786921307))
(counterexample 2015-06-21T22:37:14 (#:model "let-poly-1" #:type enum #:counterexample (((λ a a) +) nil) #:iterations 498 #:time 7295))
(new-average 2015-06-21T22:37:14 (#:model "let-poly-1" #:type enum #:average 8124.333333333334 #:stderr 1958.9012850178146))
(counterexample 2015-06-21T22:37:17 (#:model "let-poly-1" #:type enum #:counterexample ((λ b (λ a (λ a a))) (λ t 1)) #:iterations 269 #:time 3942))
(new-average 2015-06-21T22:37:17 (#:model "let-poly-1" #:type enum #:average 7526.857142857143 #:stderr 1760.0858667983791))
(counterexample 2015-06-21T22:37:19 (#:model "let-poly-1" #:type enum #:counterexample ((let ((g +)) new) 1784) #:iterations 120 #:time 1773))
(new-average 2015-06-21T22:37:19 (#:model "let-poly-1" #:type enum #:average 6807.625 #:stderr 1685.444027310438))
(counterexample 2015-06-21T22:37:41 (#:model "let-poly-1" #:type enum #:counterexample (let ((ᙟ (let ((d cons)) tl))) (λ (let ((c +)) (let ((a +)) a)))) #:iterations 1503 #:time 21872))
(new-average 2015-06-21T22:37:41 (#:model "let-poly-1" #:type enum #:average 8481.444444444445 #:stderr 2238.553470876965))
(counterexample 2015-06-21T22:37:49 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a (λ a a))) a) -3) #:iterations 530 #:time 7638))
(new-average 2015-06-21T22:37:49 (#:model "let-poly-1" #:type enum #:average 8397.1 #:stderr 2003.9988270677427))
(counterexample 2015-06-21T22:38:19 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) (let ((a +)) a)) #:iterations 2087 #:time 29992))
(new-average 2015-06-21T22:38:19 (#:model "let-poly-1" #:type enum #:average 10360.272727272728 #:stderr 2672.054375096262))
(counterexample 2015-06-21T22:38:41 (#:model "let-poly-1" #:type enum #:counterexample (let ((c (λ a a))) ((λ a a) +)) #:iterations 1598 #:time 21794))
(new-average 2015-06-21T22:38:41 (#:model "let-poly-1" #:type enum #:average 11313.083333333334 #:stderr 2618.7293745722322))
(counterexample 2015-06-21T22:38:46 (#:model "let-poly-1" #:type enum #:counterexample (let ((Q (let ((a +)) a))) ((λ a a) (let ((a +)) +))) #:iterations 460 #:time 5298))
(new-average 2015-06-21T22:38:46 (#:model "let-poly-1" #:type enum #:average 10850.384615384615 #:stderr 2452.9158513022862))
(counterexample 2015-06-21T22:38:48 (#:model "let-poly-1" #:type enum #:counterexample (let ((Ռ (let ((a +)) a))) (λ l 42)) #:iterations 160 #:time 1770))
(new-average 2015-06-21T22:38:48 (#:model "let-poly-1" #:type enum #:average 10201.785714285714 #:stderr 2361.7651021146708))
(counterexample 2015-06-21T22:38:52 (#:model "let-poly-1" #:type enum #:counterexample (let ((⟺ (let ((d +)) (λ c +)))) (λ ଣ ((λ a a) (let ((a +)) +)))) #:iterations 439 #:time 4879))
(new-average 2015-06-21T22:38:52 (#:model "let-poly-1" #:type enum #:average 9846.933333333332 #:stderr 2227.1349360764075))
(counterexample 2015-06-21T22:39:04 (#:model "let-poly-1" #:type enum #:counterexample (new (let ((a +)) (λ a a))) #:iterations 852 #:time 11762))
(new-average 2015-06-21T22:39:04 (#:model "let-poly-1" #:type enum #:average 9966.625 #:stderr 2086.7294663240373))
(counterexample 2015-06-21T22:39:06 (#:model "let-poly-1" #:type enum #:counterexample ((λ a (let ((a a)) a)) 5) #:iterations 126 #:time 1469))
(new-average 2015-06-21T22:39:06 (#:model "let-poly-1" #:type enum #:average 9466.764705882353 #:stderr 2022.8724962897873))
(counterexample 2015-06-21T22:39:07 (#:model "let-poly-1" #:type enum #:counterexample (((λ a a) +) (λ d cons)) #:iterations 109 #:time 1141))
(new-average 2015-06-21T22:39:07 (#:model "let-poly-1" #:type enum #:average 9004.222222222223 #:stderr 1962.4705244121856))
(counterexample 2015-06-21T22:39:11 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a (λ a a))) (λ a a)) 5) #:iterations 264 #:time 3885))
(new-average 2015-06-21T22:39:11 (#:model "let-poly-1" #:type enum #:average 8734.789473684212 #:stderr 1875.7626606106683))
(counterexample 2015-06-21T22:39:12 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) +) #:iterations 122 #:time 1448))
(new-average 2015-06-21T22:39:12 (#:model "let-poly-1" #:type enum #:average 8370.45 #:stderr 1816.4196252880495))
(counterexample 2015-06-21T22:39:14 (#:model "let-poly-1" #:type enum #:counterexample ((((λ a a) +) nil) 238) #:iterations 154 #:time 1576))
(new-average 2015-06-21T22:39:14 (#:model "let-poly-1" #:type enum #:average 8046.904761904762 #:stderr 1757.7926741401475))
(counterexample 2015-06-21T22:39:21 (#:model "let-poly-1" #:type enum #:counterexample (((λ a a) (let ((a +)) +)) (λ u 1)) #:iterations 601 #:time 6787))
(new-average 2015-06-21T22:39:21 (#:model "let-poly-1" #:type enum #:average 7989.636363636364 #:stderr 1676.9676967791981))
(counterexample 2015-06-21T22:39:22 (#:model "let-poly-1" #:type enum #:counterexample (let ((b (let ((a +)) a))) (λ b +)) #:iterations 180 #:time 1865))
(new-average 2015-06-21T22:39:22 (#:model "let-poly-1" #:type enum #:average 7723.347826086957 #:stderr 1624.3735145153273))
(counterexample 2015-06-21T22:39:26 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) +) #:iterations 312 #:time 3531))
(new-average 2015-06-21T22:39:26 (#:model "let-poly-1" #:type enum #:average 7548.666666666667 #:stderr 1564.9985237140172))
(counterexample 2015-06-21T22:39:26 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) hd) #:iterations 1 #:time 21))
(new-average 2015-06-21T22:39:26 (#:model "let-poly-1" #:type enum #:average 7247.56 #:stderr 1530.9957457811565))
(counterexample 2015-06-21T22:39:26 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) +) #:iterations 7 #:time 81))
(new-average 2015-06-21T22:39:26 (#:model "let-poly-1" #:type enum #:average 6971.923076923077 #:stderr 1496.5359991281168))
(counterexample 2015-06-21T22:39:30 (#:model "let-poly-1" #:type enum #:counterexample (let ((a (λ a a))) (let ((a +)) (λ a a))) #:iterations 344 #:time 3692))
(new-average 2015-06-21T22:39:30 (#:model "let-poly-1" #:type enum #:average 6850.444444444444 #:stderr 1445.157180829457))
(counterexample 2015-06-21T22:39:32 (#:model "let-poly-1" #:type enum #:counterexample (((λ a a) +) (λ a a)) #:iterations 235 #:time 2664))
(new-average 2015-06-21T22:39:32 (#:model "let-poly-1" #:type enum #:average 6700.928571428572 #:stderr 1400.5917257897524))
(counterexample 2015-06-21T22:39:39 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) nil) #:iterations 533 #:time 6271))
(new-average 2015-06-21T22:39:39 (#:model "let-poly-1" #:type enum #:average 6686.103448275862 #:stderr 1351.514063706378))
(counterexample 2015-06-21T22:39:50 (#:model "let-poly-1" #:type enum #:counterexample (let ((ѱ (let ((a (λ a a))) (λ b +)))) (let ((e 1)) (λ l (λ a +)))) #:iterations 993 #:time 11076))
(new-average 2015-06-21T22:39:50 (#:model "let-poly-1" #:type enum #:average 6832.433333333333 #:stderr 1313.8607290592047))
(counterexample 2015-06-21T22:39:55 (#:model "let-poly-1" #:type enum #:counterexample (new 7) #:iterations 481 #:time 5238))
(new-average 2015-06-21T22:39:55 (#:model "let-poly-1" #:type enum #:average 6781.0 #:stderr 1271.8119848197623))
(counterexample 2015-06-21T22:39:56 (#:model "let-poly-1" #:type enum #:counterexample ((λ |{| (λ a (λ a +))) 31853) #:iterations 117 #:time 1239))
(new-average 2015-06-21T22:39:56 (#:model "let-poly-1" #:type enum #:average 6607.8125 #:stderr 1243.54554685051))
(counterexample 2015-06-21T22:39:59 (#:model "let-poly-1" #:type enum #:counterexample (((λ a (let ((a a)) a)) +) -2550) #:iterations 193 #:time 2670))
(new-average 2015-06-21T22:39:59 (#:model "let-poly-1" #:type enum #:average 6488.484848484848 #:stderr 1211.1659953992214))
(counterexample 2015-06-21T22:40:01 (#:model "let-poly-1" #:type enum #:counterexample (let ((b (let ((a +)) a))) (b 0)) #:iterations 124 #:time 1821))
(new-average 2015-06-21T22:40:01 (#:model "let-poly-1" #:type enum #:average 6351.2058823529405 #:stderr 1182.9957695165856))
(counterexample 2015-06-21T22:40:01 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) cons) #:iterations 30 #:time 437))
(new-average 2015-06-21T22:40:01 (#:model "let-poly-1" #:type enum #:average 6182.228571428571 #:stderr 1161.0607625192165))
(counterexample 2015-06-21T22:40:03 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) cons) #:iterations 156 #:time 2242))
(new-average 2015-06-21T22:40:03 (#:model "let-poly-1" #:type enum #:average 6072.777777777777 #:stderr 1133.6442263436968))
(counterexample 2015-06-21T22:40:18 (#:model "let-poly-1" #:type enum #:counterexample (let ((a (λ a a))) (a +)) #:iterations 1046 #:time 14646))
(new-average 2015-06-21T22:40:18 (#:model "let-poly-1" #:type enum #:average 6304.486486486486 #:stderr 1126.6634952655547))
(counterexample 2015-06-21T22:40:20 (#:model "let-poly-1" #:type enum #:counterexample (let ((⼎ ((let ((b (λ a a))) b) -32))) (let ((ȧ (λ k cons))) 46970)) #:iterations 201 #:time 2444))
(new-average 2015-06-21T22:40:20 (#:model "let-poly-1" #:type enum #:average 6202.894736842105 #:stderr 1101.3094635710581))
(counterexample 2015-06-21T22:40:26 (#:model "let-poly-1" #:type enum #:counterexample (let ((⫤ (let ((h (λ a a))) 2))) (let ((|`| hd)) 1221)) #:iterations 537 #:time 5615))
(new-average 2015-06-21T22:40:26 (#:model "let-poly-1" #:type enum #:average 6187.820512820513 #:stderr 1072.805044006164))
(counterexample 2015-06-21T22:40:30 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) cons) #:iterations 395 #:time 4284))
(new-average 2015-06-21T22:40:30 (#:model "let-poly-1" #:type enum #:average 6140.224999999999 #:stderr 1046.7236799477985))
(counterexample 2015-06-21T22:40:33 (#:model "let-poly-1" #:type enum #:counterexample (let ((ğ -29)) (new -6)) #:iterations 211 #:time 2230))
(new-average 2015-06-21T22:40:33 (#:model "let-poly-1" #:type enum #:average 6044.829268292682 #:stderr 1025.3221051909582))
(counterexample 2015-06-21T22:40:40 (#:model "let-poly-1" #:type enum #:counterexample (let (( (let ((b (λ a a))) (λ a a)))) ((λ a (λ a a)) (λ c +))) #:iterations 635 #:time 7855))
(new-average 2015-06-21T22:40:40 (#:model "let-poly-1" #:type enum #:average 6087.928571428571 #:stderr 1001.5396941093856))
(counterexample 2015-06-21T22:40:47 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a (λ a a))) (let ((a a)) a)) (let ((b (λ a a))) cons)) #:iterations 485 #:time 7049))
(new-average 2015-06-21T22:40:47 (#:model "let-poly-1" #:type enum #:average 6110.279069767441 #:stderr 978.2261180951813))
(counterexample 2015-06-21T22:40:53 (#:model "let-poly-1" #:type enum #:counterexample ((λ a (λ a +)) 18) #:iterations 344 #:time 5085))
(new-average 2015-06-21T22:40:53 (#:model "let-poly-1" #:type enum #:average 6086.977272727272 #:stderr 956.0191735190144))
(counterexample 2015-06-21T22:41:06 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a +)) +) ((λ a a) +)) #:iterations 969 #:time 13402))
(new-average 2015-06-21T22:41:06 (#:model "let-poly-1" #:type enum #:average 6249.533333333333 #:stderr 948.5652986793191))
(counterexample 2015-06-21T22:41:07 (#:model "let-poly-1" #:type enum #:counterexample (((let ((a +)) (λ a a)) nil) ((λ a +) nil)) #:iterations 80 #:time 866))
(new-average 2015-06-21T22:41:07 (#:model "let-poly-1" #:type enum #:average 6132.499999999999 #:stderr 935.0680327363408))
(counterexample 2015-06-21T22:41:12 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) +) #:iterations 377 #:time 4749))
(new-average 2015-06-21T22:41:12 (#:model "let-poly-1" #:type enum #:average 6103.063829787233 #:stderr 915.4300826751632))
(counterexample 2015-06-21T22:41:21 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) +) #:iterations 751 #:time 9837))
(new-average 2015-06-21T22:41:21 (#:model "let-poly-1" #:type enum #:average 6180.854166666665 #:stderr 899.525650700057))
(counterexample 2015-06-21T22:41:22 (#:model "let-poly-1" #:type enum #:counterexample ((λ b b) hd) #:iterations 98 #:time 1010))
(new-average 2015-06-21T22:41:22 (#:model "let-poly-1" #:type enum #:average 6075.326530612243 #:stderr 887.2745317642555))
(counterexample 2015-06-21T22:41:27 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) -23) #:iterations 364 #:time 4960))
(new-average 2015-06-21T22:41:27 (#:model "let-poly-1" #:type enum #:average 6053.019999999998 #:stderr 869.6340795051299))
(counterexample 2015-06-21T22:41:43 (#:model "let-poly-1" #:type enum #:counterexample (((λ a a) cons) -39) #:iterations 1211 #:time 15497))
(new-average 2015-06-21T22:41:43 (#:model "let-poly-1" #:type enum #:average 6238.196078431371 #:stderr 872.2936562651803))
(counterexample 2015-06-21T22:41:45 (#:model "let-poly-1" #:type enum #:counterexample ((λ ƾ (λ f (λ a (λ a a)))) 1417185) #:iterations 122 #:time 2000))
(new-average 2015-06-21T22:41:45 (#:model "let-poly-1" #:type enum #:average 6156.692307692306 #:stderr 859.2286355029266))
(counterexample 2015-06-21T22:41:50 (#:model "let-poly-1" #:type enum #:counterexample (let (( (let ((b +)) cons))) (let ((e +)) (let ((a +)) (λ a a)))) #:iterations 473 #:time 5442))
(new-average 2015-06-21T22:41:50 (#:model "let-poly-1" #:type enum #:average 6143.20754716981 #:stderr 842.9687398364365))
(counterexample 2015-06-21T22:41:51 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a +)) (λ a a)) (λ b +)) #:iterations 53 #:time 561))
(new-average 2015-06-21T22:41:51 (#:model "let-poly-1" #:type enum #:average 6039.833333333332 #:stderr 833.6450941988209))
(counterexample 2015-06-21T22:41:52 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) cons) #:iterations 43 #:time 639))
(new-average 2015-06-21T22:41:52 (#:model "let-poly-1" #:type enum #:average 5941.636363636362 #:stderr 824.218032170273))
(counterexample 2015-06-21T22:42:04 (#:model "let-poly-1" #:type enum #:counterexample (((λ a a) cons) (let ((a +)) +)) #:iterations 1045 #:time 12747))
(new-average 2015-06-21T22:42:04 (#:model "let-poly-1" #:type enum #:average 6063.160714285713 #:stderr 818.4384858068813))
(counterexample 2015-06-21T22:42:05 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) -2) #:iterations 81 #:time 1166))
(new-average 2015-06-21T22:42:05 (#:model "let-poly-1" #:type enum #:average 5977.245614035086 #:stderr 808.5293730242867))
(counterexample 2015-06-21T22:42:11 (#:model "let-poly-1" #:type enum #:counterexample ((((λ a a) +) 0) (let ((f (λ a +))) (λ b (λ a a)))) #:iterations 506 #:time 5813))
(new-average 2015-06-21T22:42:11 (#:model "let-poly-1" #:type enum #:average 5974.413793103447 #:stderr 794.4719667867278))
(counterexample 2015-06-21T22:42:17 (#:model "let-poly-1" #:type enum #:counterexample (let ((Ɉ (let ((a +)) a))) (let ((g (λ a a))) (λ a (λ a a)))) #:iterations 572 #:time 5983))
(new-average 2015-06-21T22:42:17 (#:model "let-poly-1" #:type enum #:average 5974.559322033897 #:stderr 780.8902621759245))
(counterexample 2015-06-21T22:42:17 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a (λ a a))) (a +)) (let ((b (λ a a))) b)) #:iterations 23 #:time 268))
(new-average 2015-06-21T22:42:17 (#:model "let-poly-1" #:type enum #:average 5879.449999999999 #:stderr 773.6336760036319))
(counterexample 2015-06-21T22:42:28 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a (λ a a))) (a +)) 257) #:iterations 938 #:time 10596))
(new-average 2015-06-21T22:42:28 (#:model "let-poly-1" #:type enum #:average 5956.770491803278 #:stderr 764.7641957351193))
(counterexample 2015-06-21T22:42:28 (#:model "let-poly-1" #:type enum #:counterexample (let ((a (λ a a))) (a +)) #:iterations 22 #:time 350))
(new-average 2015-06-21T22:42:28 (#:model "let-poly-1" #:type enum #:average 5866.338709677419 #:stderr 757.7437513950117))
(counterexample 2015-06-21T22:42:29 (#:model "let-poly-1" #:type enum #:counterexample (let ((¨ (let ((a (λ a a))) (λ a +)))) (λ |\| (let ((a +)) (λ a a)))) #:iterations 22 #:time 352))
(new-average 2015-06-21T22:42:29 (#:model "let-poly-1" #:type enum #:average 5778.809523809523 #:stderr 750.7390722219997))
(counterexample 2015-06-21T22:42:43 (#:model "let-poly-1" #:type enum #:counterexample ((let ((c +)) (λ a a)) (let ((b +)) b)) #:iterations 1133 #:time 14571))
(new-average 2015-06-21T22:42:43 (#:model "let-poly-1" #:type enum #:average 5916.187499999999 #:stderr 751.5777250710112))
(counterexample 2015-06-21T22:42:43 (#:model "let-poly-1" #:type enum #:counterexample (new -12) #:iterations 7 #:time 89))
(new-average 2015-06-21T22:42:43 (#:model "let-poly-1" #:type enum #:average 5826.538461538461 #:stderr 745.335790057628))
(counterexample 2015-06-21T22:42:45 (#:model "let-poly-1" #:type enum #:counterexample (let ((ᦚ -4863)) (((λ a a) ((λ a a) +)) -1055)) #:iterations 143 #:time 1668))
(new-average 2015-06-21T22:42:45 (#:model "let-poly-1" #:type enum #:average 5763.530303030302 #:stderr 736.6555258319768))
(counterexample 2015-06-21T22:42:49 (#:model "let-poly-1" #:type enum #:counterexample (let ((ò ((λ a +) +))) (let ((b 0)) (λ e +))) #:iterations 303 #:time 3881))
(new-average 2015-06-21T22:42:49 (#:model "let-poly-1" #:type enum #:average 5735.432835820895 #:stderr 726.1211914850029))
(counterexample 2015-06-21T22:42:53 (#:model "let-poly-1" #:type enum #:counterexample (let ((𩕔 (let ((g (λ a +))) (λ a (let ((a a)) a))))) -688891474) #:iterations 322 #:time 3856))
(new-average 2015-06-21T22:42:53 (#:model "let-poly-1" #:type enum #:average 5707.794117647059 #:stderr 715.8969703459383))
(counterexample 2015-06-21T22:43:02 (#:model "let-poly-1" #:type enum #:counterexample (new (λ d (λ a a))) #:iterations 754 #:time 9522))
(new-average 2015-06-21T22:43:02 (#:model "let-poly-1" #:type enum #:average 5763.072463768116 #:stderr 707.6078360695454))
(counterexample 2015-06-21T22:43:05 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a (λ a a))) (λ a a)) -28) #:iterations 238 #:time 2554))
(new-average 2015-06-21T22:43:05 (#:model "let-poly-1" #:type enum #:average 5717.228571428572 #:stderr 698.9310016006738))
(counterexample 2015-06-21T22:43:17 (#:model "let-poly-1" #:type enum #:counterexample (let ((M (let ((a +)) a))) (λ r (λ a (λ a a)))) #:iterations 1031 #:time 12368))
(new-average 2015-06-21T22:43:17 (#:model "let-poly-1" #:type enum #:average 5810.901408450704 #:stderr 695.3549122468949))
(counterexample 2015-06-21T22:43:29 (#:model "let-poly-1" #:type enum #:counterexample (new 12) #:iterations 977 #:time 11637))
(new-average 2015-06-21T22:43:29 (#:model "let-poly-1" #:type enum #:average 5891.819444444444 #:stderr 690.387655139268))
(counterexample 2015-06-21T22:43:39 (#:model "let-poly-1" #:type enum #:counterexample ((hd ((λ a a) +)) (λ q nil)) #:iterations 933 #:time 10118))
(new-average 2015-06-21T22:43:39 (#:model "let-poly-1" #:type enum #:average 5949.712328767123 #:stderr 683.3214500802837))
(counterexample 2015-06-21T22:43:42 (#:model "let-poly-1" #:type enum #:counterexample (let ((マ (((λ a a) +) (λ b (λ a a))))) 14057428) #:iterations 292 #:time 3106))
(new-average 2015-06-21T22:43:42 (#:model "let-poly-1" #:type enum #:average 5911.283783783783 #:stderr 675.1187125360917))
(counterexample 2015-06-21T22:43:47 (#:model "let-poly-1" #:type enum #:counterexample (let ((C (λ d +))) (let ((a (λ a +))) (λ a (let ((a a)) a)))) #:iterations 453 #:time 4956))
(new-average 2015-06-21T22:43:47 (#:model "let-poly-1" #:type enum #:average 5898.546666666666 #:stderr 666.1780814029695))
(counterexample 2015-06-21T22:43:48 (#:model "let-poly-1" #:type enum #:counterexample (((λ b (λ a a)) (λ c +)) -539) #:iterations 126 #:time 1333))
(new-average 2015-06-21T22:43:48 (#:model "let-poly-1" #:type enum #:average 5838.473684210526 #:stderr 660.0933494520045))
(counterexample 2015-06-21T22:43:51 (#:model "let-poly-1" #:type enum #:counterexample ((λ a a) -172) #:iterations 231 #:time 2516))
(new-average 2015-06-21T22:43:51 (#:model "let-poly-1" #:type enum #:average 5795.324675324675 #:stderr 652.8917065374094))
(counterexample 2015-06-21T22:43:53 (#:model "let-poly-1" #:type enum #:counterexample (((λ y (λ a (λ a a))) (λ f f)) (λ cons)) #:iterations 164 #:time 1881))
(new-average 2015-06-21T22:43:53 (#:model "let-poly-1" #:type enum #:average 5745.141025641025 #:stderr 646.417853404632))
(counterexample 2015-06-21T22:43:54 (#:model "let-poly-1" #:type enum #:counterexample (let ((c (let ((a +)) (λ a a)))) (+ c)) #:iterations 107 #:time 1116))
(new-average 2015-06-21T22:43:54 (#:model "let-poly-1" #:type enum #:average 5686.544303797468 #:stderr 640.8673677576561))
(counterexample 2015-06-21T22:44:03 (#:model "let-poly-1" #:type enum #:counterexample ((λ a (let ((b a)) a)) 507) #:iterations 803 #:time 9056))
(new-average 2015-06-21T22:44:03 (#:model "let-poly-1" #:type enum #:average 5728.65 #:stderr 634.2050915381484))
(counterexample 2015-06-21T22:44:13 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a +)) +) ((λ a a) +)) #:iterations 767 #:time 10155))
(new-average 2015-06-21T22:44:13 (#:model "let-poly-1" #:type enum #:average 5783.296296296296 #:stderr 628.7058566209795))
(counterexample 2015-06-21T22:44:23 (#:model "let-poly-1" #:type enum #:counterexample ((λ f (λ a a)) ((λ a +) +)) #:iterations 802 #:time 9770))
(new-average 2015-06-21T22:44:23 (#:model "let-poly-1" #:type enum #:average 5831.914634146341 #:stderr 622.891675579743))
(counterexample 2015-06-21T22:44:26 (#:model "let-poly-1" #:type enum #:counterexample ((λ ǣ ((λ a a) +)) 101878) #:iterations 328 #:time 3428))
(new-average 2015-06-21T22:44:26 (#:model "let-poly-1" #:type enum #:average 5802.951807228916 #:stderr 616.0224272585988))
(counterexample 2015-06-21T22:44:38 (#:model "let-poly-1" #:type enum #:counterexample (let ((㦈 (let ((f (λ a a))) (λ a (let ((a a)) a))))) 63605760) #:iterations 1133 #:time 11870))
(new-average 2015-06-21T22:44:38 (#:model "let-poly-1" #:type enum #:average 5875.178571428572 #:stderr 612.9151750507028))
(counterexample 2015-06-21T22:44:39 (#:model "let-poly-1" #:type enum #:counterexample (new (λ e (λ a a))) #:iterations 95 #:time 1024))
(new-average 2015-06-21T22:44:39 (#:model "let-poly-1" #:type enum #:average 5818.105882352941 #:stderr 608.3445790810888))
(counterexample 2015-06-21T22:44:45 (#:model "let-poly-1" #:type enum #:counterexample ((let ((a (λ a a))) (λ a a)) cons) #:iterations 447 #:time 5808))
(new-average 2015-06-21T22:44:45 (#:model "let-poly-1" #:type enum #:average 5817.988372093023 #:stderr 601.2292045131859))
(counterexample 2015-06-21T22:44:46 (#:model "let-poly-1" #:type enum #:counterexample ((λ ῞ (λ n (λ a (λ a a)))) 8397251) #:iterations 114 #:time 1220))
(new-average 2015-06-21T22:44:46 (#:model "let-poly-1" #:type enum #:average 5765.137931034483 #:stderr 596.623767198657))
(counterexample 2015-06-21T22:44:47 (#:model "let-poly-1" #:type enum #:counterexample ((let ((e (λ a a))) (λ a a)) 71) #:iterations 42 #:time 454))
(new-average 2015-06-21T22:44:47 (#:model "let-poly-1" #:type enum #:average 5704.784090909091 #:stderr 592.8849023476499))
(counterexample 2015-06-21T22:44:56 (#:model "let-poly-1" #:type enum #:counterexample ((λ a (λ a a)) -66) #:iterations 906 #:time 9430))
(new-average 2015-06-21T22:44:56 (#:model "let-poly-1" #:type enum #:average 5746.640449438202 #:stderr 587.6778919703573))
(counterexample 2015-06-21T22:45:03 (#:model "let-poly-1" #:type enum #:counterexample ((let ((b (λ a a))) b) (λ b +)) #:iterations 540 #:time 7199))
(new-average 2015-06-21T22:45:03 (#:model "let-poly-1" #:type enum #:average 5762.777777777777 #:stderr 581.3354741692054))
(counterexample 2015-06-21T22:45:04 (#:model "let-poly-1" #:type enum #:counterexample (let ((㎓ (((λ a a) +) (λ a (λ a a))))) (let ((q (λ c (λ a a)))) 300)) #:iterations 44 #:time 676))
(new-average 2015-06-21T22:45:04 (#:model "let-poly-1" #:type enum #:average 5706.879120879121 #:stderr 577.6228010787381))
(counterexample 2015-06-21T22:45:07 (#:model "let-poly-1" #:type enum #:counterexample (let ((¢ (λ d (λ a +)))) ((λ b (λ a a)) (let ((a (λ a a))) a))) #:iterations 282 #:time 3173))
(new-average 2015-06-21T22:45:07 (#:model "let-poly-1" #:type enum #:average 5679.336956521739 #:stderr 571.9732962046666))
(counterexample 2015-06-21T22:45:15 (#:model "let-poly-1" #:type enum #:counterexample ((λ a (+ a)) (let ((a +)) (let ((a a)) +))) #:iterations 671 #:time 8358))
(new-average 2015-06-21T22:45:15 (#:model "let-poly-1" #:type enum #:average 5708.139784946236 #:stderr 566.522282349226))
(finished 2015-06-21T22:45:15 (#:model "let-poly-1" #:type enum #:time-ms 530876 #:attempts 42256 #:num-counterexamples 93 #:rate-terms/s 79.59674198871299 #:attempts/cexp 454.36559139784947))
| false |
96f92c502eaf328c63a5e84af027b35fe6b8d5ed | a18b561b599c8e85d697ecb421fe98cbb41814d1 | /planet-color.rkt | 5dad6a46a66a532a10b6b546868a28b21904e946 | [] | no_license | his1220/earthgen | f501f1c6b91831adc3072e4dc7bbe5b9f7045793 | 0fd1904905fea41a441e7494388d734e298b77bc | refs/heads/master | 2021-01-18T15:14:11.895611 | 2015-03-20T19:50:30 | 2015-03-20T20:35:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 7,834 | rkt | planet-color.rkt | #lang typed/racket
(provide (all-defined-out))
(require vraid/types
vraid/color
"planet/planet.rkt")
(: planet-color-valid? (Any planet-geometry -> Boolean))
(define (planet-color-valid? f planet)
(let ([validate (cond
[(member f (list color-topography)) planet-terrain?]
[(member f (list color-temperature
color-humidity
color-aridity
color-precipitation
color-vegetation)) planet-climate?]
[else (lambda ([p : Any])
#f)])])
(validate planet)))
(define color-undefined
(flcolor3 0.7 0.7 0.7))
(define color-neutral
(flcolor3 0.95 0.95 0.85))
(define-type flcolor-list (Listof flcolor))
(: find-color (Flonum (Listof Flonum) flcolor-list -> flcolor))
(define (find-color tile-value intervals colors)
(: rec-find ((Listof Flonum) flcolor-list (U Flonum Boolean) flcolor -> flcolor))
(define (rec-find intervals colors last-interval last-color)
(cond [(empty? intervals) color-undefined]
[(< tile-value (first intervals))
(if (boolean? last-interval)
color-undefined
(flcolor-interpolate last-color
(first colors)
(/ (- tile-value last-interval)
(- (first intervals) last-interval))))]
[else (rec-find (rest intervals)
(rest colors)
(first intervals)
(first colors))]))
(if (< tile-value (first intervals))
color-undefined
(rec-find intervals
colors
#f
color-undefined)))
(: filter-intervals ((Listof Any) -> (Listof Flonum)))
(define (filter-intervals ls)
(filter flonum? ls))
(: filter-colors ((Listof Any) -> flcolor-list))
(define (filter-colors ls)
(filter flcolor? ls))
(define topography-intervals/colors
(list -10000.0 (flcolor3 0.0 0.0 0.0)
-3000.0 (flcolor3 0.0 0.02 0.08)
-200.0 (flcolor3 0.09 0.27 0.49)
0.0 (flcolor3 0.09 0.27 0.49)
0.0 (flcolor3 0.66 0.59 0.45)
1500.0 (flcolor3 0.41 0.35 0.22)
3000.0 (flcolor3 0.09 0.13 0.04)))
(define topography-intervals
(filter-intervals
topography-intervals/colors))
(define topography-colors
(filter-colors
topography-intervals/colors))
(: color-topography (planet-terrain integer -> flcolor))
(define (color-topography p n)
(find-color (if (tile-land? p n)
(- (tile-elevation p n) (planet-sea-level p))
(- (tile-water-depth p n)))
topography-intervals
topography-colors))
(define vegetation-color (flcolor3 0.09411764705882353 0.1568627450980392 0.03137254901960784))
(define snow-color (flcolor3 0.9 0.9 0.9))
(define water-surface
(flcolor3 0.06862745098039216 0.17450980392156862 0.37058823529411766))
(define water-deep
(flcolor3 0.0 0.01568627450980392 0.06274509803921569))
(define water-mid
(flcolor3 0.03137254901960784 0.0784313725490196 0.19215686274509802))
(define barren-land-low
(flcolor3 0.6588235294117647 0.5686274509803921 0.4196078431372549))
(define barren-land-high
(flcolor3 0.11764705882352941 0.10980392156862745 0.050980392156862744))
(define barren-land-low-level 0.0)
(define barren-land-high-level 3000.0)
(define vegetation-topography-intervals/colors
(list -10000.0 water-deep
-2000.0 water-deep
-800.0 water-mid
0.0 water-surface
0.0 barren-land-low
2000.0 barren-land-high
4000.0 barren-land-high))
(define vegetation-topography-intervals
(filter-intervals
vegetation-topography-intervals/colors))
(define vegetation-topography-colors
(filter-colors
vegetation-topography-intervals/colors))
(: color-vegetation-topography (planet-climate integer -> flcolor))
(define (color-vegetation-topography p n)
(find-color (if (tile-land? p n)
(- (tile-elevation p n) (planet-sea-level p))
(- (tile-water-depth p n)))
vegetation-topography-intervals
vegetation-topography-colors))
(: color-vegetation (planet-climate integer -> flcolor))
(define (color-vegetation p n)
(if (< 0.0 (tile-snow-cover p n))
snow-color
(flcolor-interpolate (color-vegetation-topography p n)
vegetation-color
(if (tile-water? p n)
0.0
(vegetation-cover (supported-vegetation
(tile-sunlight p n)
(tile-temperature p n)
(tile-humidity p n)))))))
(define temperature-intervals/colors
(list (- freezing-temperature) (flcolor3 1.0 1.0 1.0)
-70.0 (flcolor3 1.0 0.0 1.0)
-50.0 (flcolor3 0.5 0.0 0.5)
-30.0 (flcolor3 0.0 0.0 0.5)
-10.0 (flcolor3 0.0 0.0 1.0)
10.0 (flcolor3 1.0 1.0 0.0)
30.0 (flcolor3 1.0 0.0 0.0)
50.0 (flcolor3 0.5 0.0 0.0)
70.0 (flcolor3 0.0 0.0 0.0)))
(: temperature-intervals (Listof Flonum))
(define temperature-intervals
(map (curry + freezing-temperature)
(filter-intervals
temperature-intervals/colors)))
(define temperature-colors
(filter-colors
temperature-intervals/colors))
(: color-temperature (planet-climate integer -> flcolor))
(define (color-temperature p n)
(find-color (tile-temperature p n)
temperature-intervals
temperature-colors))
(define humidity-min (flcolor3 1.0 1.0 1.0))
(define humidity-max (flcolor3 0.0 1.0 0.0))
(define humidity-water (flcolor3 0.0 0.0 0.5))
(: color-humidity (planet-climate integer -> flcolor))
(define (color-humidity p n)
(if (tile-water? p n)
humidity-water
(flcolor-interpolate humidity-min
humidity-max
(tile-relative-humidity p n))))
(define precipitation-min (flcolor3 1.0 1.0 1.0))
(define precipitation-max (flcolor3 0.0 1.0 0.0))
(define 3-meters-per-year (/ 3.0 seconds-per-year))
(: color-precipitation (planet-climate integer -> flcolor))
(define (color-precipitation p n)
(if (tile-water? p n)
humidity-water
(flcolor-interpolate precipitation-min
precipitation-max
(/ (tile-precipitation p n)
3-meters-per-year))))
(define aridity-min color-neutral)
(define aridity-medium (flcolor3 1.0 1.0 0.0))
(define aridity-max (flcolor3 1.0 0.0 0.0))
(define aridity-water humidity-water)
(: color-aridity (planet-climate integer -> flcolor))
(define (color-aridity p n)
(if (tile-water? p n)
aridity-water
(let ([aridity (aridity (tile-temperature p n)
(tile-humidity p n))])
(if (> 1.0 aridity)
(flcolor-interpolate aridity-min
aridity-medium
(/ aridity 1.0))
(flcolor-interpolate aridity-medium
aridity-max
(/ (- (min 2.0 aridity)
1.0)
1.0))))))
(define area-min (flcolor3 0.0 0.0 0.0))
(define area-max (flcolor3 1.0 1.0 1.0))
(: color-area (Flonum -> (planet-geometry integer -> flcolor)))
(define ((color-area largest-area) p n)
(flcolor-interpolate area-min
area-max
(/ (tile-area p n)
largest-area)))
| false |
d145dfa49feb358ff0a8ec0b94400a8d93d5df50 | f1f9cf164e2270f70979170a73bd27aeaba5c642 | /tests.rkt | c3eeca57eb83ab167685fe89e3a00aaa8d6a36ed | [] | no_license | siddk/cyk-parser | 0d70a13d59157454c93d73d69bbfa7916a1e2e99 | 146c95cac15a6f2cdbdadf412697816ffce79662 | refs/heads/master | 2016-09-06T07:51:09.232218 | 2015-06-12T23:48:21 | 2015-06-12T23:48:21 | 30,164,761 | 1 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 816 | rkt | tests.rkt | #lang racket
(require "grammar.rkt" "parse-tree.rkt" "parser.rkt")
;; Test with an arithmetic expression grammar.
(define (arith-test)
(define-grammar arith
((Expr -> Var OpExpr)
(OpExpr -> Op Expr))
((Expr -> Var)
(Var -> "x")
(Var -> "y")
(Op -> "+")
(Op -> "*")))
(parse arith '("x" "+" "y" "*" "y")))
(define (nlp-test)
(define-grammar nlp
((S -> NP VP)
(NP -> ART ADJNOUN)
(ADJNOUN -> ADJ NOUN)
(VP -> V NP))
((ART -> "a")
(ART -> "the")
(ADJ -> "red")
(ADJ -> "green")
(ADJ -> "smelly")
(NOUN -> "dog")
(NOUN -> "cat")
(NOUN -> "book")
(NOUN -> "martian")
(V -> "saw")
(V -> "killed")
(V -> "ate")))
(parse nlp '("the" "smelly" "dog" "ate" "the" "red" "book")))
(arith-test)
(nlp-test) | false |
060972fdf9a07b1f8041d3aba1626ff43e14f24a | 82c76c05fc8ca096f2744a7423d411561b25d9bd | /typed-racket-test/succeed/match-expander-problem.rkt | 4adecb673dc29b95f94576ac38bde901588b556a | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | racket/typed-racket | 2cde60da289399d74e945b8f86fbda662520e1ef | f3e42b3aba6ef84b01fc25d0a9ef48cd9d16a554 | refs/heads/master | 2023-09-01T23:26:03.765739 | 2023-08-09T01:22:36 | 2023-08-09T01:22:36 | 27,412,259 | 571 | 131 | NOASSERTION | 2023-08-09T01:22:41 | 2014-12-02T03:00:29 | Racket | UTF-8 | Racket | false | false | 404 | rkt | match-expander-problem.rkt | #lang typed-scheme
#;(require mzlib/etc)
;(require "prims.rkt")
(require mzlib/match)
(define-typed-struct pt ([x : Number] [y : Number]))
(require (for-syntax scheme/base))
(define-match-expander blah #:match (lambda (stx) (syntax-case stx ()
[(_ . a) #'($ . a)])))
(define: (pt-add/match/blah [v : Any]) : Number
(match v
[(blah pt #{x : Number} #{y : Number}) (+ x y)]
[_ 0]))
| false |
abc29936f4e1df161661feefb7871ac84f97bdac | d755de283154ca271ef6b3b130909c6463f3f553 | /htdp-doc/teachpack/2htdp/scribblings/shared.rkt | ee23a8049d02705e08836db59822864adf82e19e | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | racket/htdp | 2953ec7247b5797a4d4653130c26473525dd0d85 | 73ec2b90055f3ab66d30e54dc3463506b25e50b4 | refs/heads/master | 2023-08-19T08:11:32.889577 | 2023-08-12T15:28:33 | 2023-08-12T15:28:33 | 27,381,208 | 100 | 90 | NOASSERTION | 2023-07-08T02:13:49 | 2014-12-01T13:41:48 | Racket | UTF-8 | Racket | false | false | 103 | rkt | shared.rkt | #lang scheme/base
(require "../../htdp/scribblings/shared.rkt")
(provide teachpack beginner-require)
| false |
2018b42db3588fdc9fc59ba32c373feae5ada4a1 | 25a6efe766d07c52c1994585af7d7f347553bf54 | /gui-lib/mred/lang/main.rkt | e59173cc42fb02f4dc01f3274341dc6de22e1a48 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | racket/gui | 520ff8f4ae5704210822204aa7cd4b74dd4f3eef | d01d166149787e2d94176d3046764b35c7c0a876 | refs/heads/master | 2023-08-25T15:24:17.693905 | 2023-08-10T16:45:35 | 2023-08-10T16:45:35 | 27,413,435 | 72 | 96 | NOASSERTION | 2023-09-14T17:09:52 | 2014-12-02T03:35:22 | Racket | UTF-8 | Racket | false | false | 156 | rkt | main.rkt | (module main mzscheme
(require mzlib/class
mred)
(provide (all-from mzscheme)
(all-from mzlib/class)
(all-from mred)))
| false |
5b18b474cad31012a98163cb0556d999db735830 | 98fd12cbf428dda4c673987ff64ace5e558874c4 | /paip/will/faster-miniKanren/main.rkt | 222bd47cb10105fc5fa275397868379651c3b8f5 | [
"MIT",
"Unlicense"
] | permissive | CompSciCabal/SMRTYPRTY | 397645d909ff1c3d1517b44a1bb0173195b0616e | a8e2c5049199635fecce7b7f70a2225cda6558d8 | refs/heads/master | 2021-12-30T04:50:30.599471 | 2021-12-27T23:50:16 | 2021-12-27T23:50:16 | 13,666,108 | 66 | 11 | Unlicense | 2019-05-13T03:45:42 | 2013-10-18T01:26:44 | Racket | UTF-8 | Racket | false | false | 168 | rkt | main.rkt | #lang racket/base
(require "mk.rkt")
(provide (all-from-out "mk.rkt")
quote quasiquote unquote
define
#%datum
#%app
let)
| false |
f8897a342ce7402beee7b0cbbcefb5d5ce264712 | 56eb33a0ec85c89cf7dedf15ec53b87899e2142a | /wk02 interp - conditionals and functions with substitution.rkt | 26d8772af905b68d35cc24be2a52c9028542237f | [] | no_license | chobits/PLAI | f0c990d261435e3b9aaefcf06b175d86c6daf6a2 | 3a7dc604dab78f4ebcfa6f88d03242cb3f7f1113 | refs/heads/master | 2023-09-02T21:56:59.029167 | 2013-08-22T15:09:32 | 2013-08-22T15:09:32 | 52,072,990 | 0 | 0 | null | 2016-02-19T08:27:02 | 2016-02-19T08:27:02 | null | UTF-8 | Racket | false | false | 6,137 | rkt | wk02 interp - conditionals and functions with substitution.rkt | #lang plai
;;; TEST DATA ;;;
; unparsed test cases
; arithmetic
(define-values
(err num pl mul bmin umin)
(values '(&err 3 4) 5 '(+ 3 7) '(* 5 (+ 3 7)) '(- 10 4) '(- (- 1))))
; conditionals
(define-values
(tbool fbool ift iff)
(values
true false (list 'if '(- 2 5) true false) (list 'if false true false)))
;;; DATA ;;;
; Defining functions
(define-type FunDefC
[fdC (name symbol?) (arg symbol?) (body ExprC?)])
; ExprC core language representation
(define-type ExprC
[numC (n number?)]
[boolC (e boolean?)]
[idC (s symbol?)]
[appC (fun symbol?) (arg ExprC?)]
[plusC (l ExprC?) (r ExprC?)]
[multC (l ExprC?) (r ExprC?)]
[ifC (test ExprC?) (t ExprC?) (f ExprC?)])
; ExprS extended language representation
(define-type ExprS
[numS (n number?)]
[boolS (e boolean?)]
[idS (s symbol?)]
[appS (fun symbol?) (arg ExprS?)]
[plusS (l ExprS?) (r ExprS?)]
[multS (l ExprS?) (r ExprS?)]
[uminusS (e ExprS?)]
[bminusS (l ExprS?) (r ExprS?)]
[ifS (test ExprS?) (t ExprS?) (f ExprS?)])
;;; PARSER ;;;
; Racket s-expr -> ExprS
(define parse
(λ (e)
(cond
[(number? e) (numS e)]
[(boolean? e) (boolS e)]
[(symbol? e) (idS e)]
[(list? e)
(case (first e)
[(+) (plusS (parse (second e)) (parse (third e)))]
[(*) (multS (parse (second e)) (parse (third e)))]
[(-) (if (> (length e) 2)
(bminusS (parse (second e)) (parse (third e)))
(uminusS (parse (second e))))]
[(if) (ifS (parse (second e))
(parse (third e))
(parse (fourth e)))]
[else (cond
[(symbol? (first e)) (appS (first e)
(parse (second e)))]
[else (error ":function name in application must be a symbol")])])]
[else (error ":unrecognized datatype")])))
;;; DESUGAR ;;;
; minus-helper
; for a-b = a + -1*b
; for unary -b = 0 + -1*b
(define minus-helper
(λ (ac bc)
(plusC ac (multC (numC -1) bc))))
; ExprS -> ExprC
(define desugar
(λ (as)
(type-case ExprS as
[numS (n) (numC n)]
[boolS (e) (boolC e)]
[idS (s) (idC s)]
[appS (f e) (appC f (desugar e))]
[plusS (l r) (plusC (desugar l) (desugar r))]
[multS (l r) (multC (desugar l) (desugar r))]
[bminusS (l r) (minus-helper (desugar l) (desugar r))]
[uminusS (e) (minus-helper (numC 0) (desugar e))]
[ifS (test t f) (ifC (desugar test)
(desugar t)
(desugar f))])))
;;; INTERPRETER ;;;
; symbol (listof FunDefC) -> FunDefC
(define get-fundef
(λ (s fds)
(cond
[(empty? fds) (error (format ":unknown function ~v" s))]
[(cons? fds) (cond
[(symbol=? s (fdC-name (first fds))) (first fds)]
[else (get-fundef s (rest fds))])])))
; ExprC symbol ExprC -> ExprC
(define subst
(λ (what for in)
(type-case ExprC in
[numC (n) in]
[boolC (e) in]
[idC (s) (if (symbol=? s for)
what
in)]
[appC (f a) (appC f (subst what for a))]
[plusC (l r) (plusC (subst what for l)
(subst what for r))]
[multC (l r) (multC (subst what for l)
(subst what for r))]
[ifC (test t f) (ifC (subst what for test)
(subst what for t)
(subst what for f))])))
; number? or boolean? -> ExprC
; wraps the result of interpretation into ExprC so it can be fed to interp again
; need this wrapper for eager eval of arg in function applications
(define val->ExprC
(λ (a)
(cond
[(number? a) (numC a)]
[(boolean? a) (boolC a)]
[else (error ":can't produce ExprC not number or boolean")])))
; ExprC (listof FunDefC) -> (or number? boolean?)
(define interp
(λ (ex fds)
(type-case ExprC ex
[numC (n) n]
[boolC (e) e]
[idC (_) (error (format ":unbound identifier ~v" _))]
[appC (f a) (local ([define fd (get-fundef f fds)]
[define a-interped (val->ExprC (interp a fds))])
(interp (subst a-interped
(fdC-arg fd)
(fdC-body fd))
fds))]
[plusC (l r) (+ (interp l fds) (interp r fds))]
[multC (l r) (* (interp l fds) (interp r fds))]
[ifC (test t f)
(local ([define test-result (interp test fds)])
(if test-result
(interp t fds)
(interp f fds)))])))
;;; TESTS ;;;
; parsed and desugared test cases
(define pnum (desugar (parse num)))
(define ppl (desugar (parse pl)))
(define pmul (desugar (parse mul)))
(define pbmin (desugar (parse bmin)))
(define pumin (desugar (parse umin)))
(define ptbool (desugar (parse tbool)))
(define pfbool (desugar (parse fbool)))
(define pift (desugar (parse ift)))
(define piff (desugar (parse iff)))
(printf "~n--- Testing ---")
(printf "\nBasic arithmetic\n")
(test (interp pnum '()) 5)
(test (interp ppl '()) 10)
(test (interp pmul '()) 50)
(test (interp pbmin '()) 6)
(test (interp pumin '()) 1)
(printf "\nBooleans and if\n")
(test (interp ptbool '()) true)
(test (interp pfbool '()) false)
(test (interp pift '()) true)
(test (interp piff '()) false)
(printf "\nFunctions with substitution\n")
(define pfinc (fdC 'incr 'x (desugar (parse '(+ x 1)))))
(define pfaddxy (fdC 'addxy 'x (desugar (parse '(+ x y))))) ;unbound 'y
(define lof (list pfinc pfaddxy))
(test (interp (desugar (parse (list 'incr '(+ 3 (incr 5))))) lof) 10) ;(incr (+ 3 (incr 5)))
(test/exn (interp (desugar (parse (list 'nofun 5))) lof) ":unknown function") ;(nufun 5)
(test/exn (interp (desugar (parse (list 'addxy 5))) lof) ":unbound identifier") ;(addxy 5)
;(define (f1 x) (f2 4))
;(define (f2 y) (+ x y))
;(f1 3)
(test/exn (interp (appC 'f1 (numC 3))
(list (fdC 'f1 'x (appC 'f2 (numC 4)))
(fdC 'f2 'y (plusC (idC 'x) (idC 'y)))))
":unbound identifier")
| false |
130b27f2759f3a1df8023e96f1ae8f101803ce47 | 64c38c8590a158911942f465b33d942136323299 | /test/DrawInteractive/interactive-data.rkt | db4bcc9715ce25f33686123f6f57729aa65cdc6b | [] | no_license | OnRoadZy/QuickBIM | 7589d2625ff23f48745dc80000844499443cce5f | 5802ea55806928c2cf9305d5202926fa29c2a1f9 | refs/heads/master | 2020-04-26T15:54:32.306336 | 2019-06-11T14:17:08 | 2019-06-11T14:17:08 | 173,661,123 | 3 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 6,508 | rkt | interactive-data.rkt | #lang racket
(require "draw-data.rkt"
"draws.rkt")
(provide interactive-context
cur-draw
reset-interactive-context
interactive-context-reset?
set-interactive-context
get-prompt
get-prompt-style
get-prompt-vector
get-prompt-number
get-current-int
add-current-int
get-end-str
analyze-answer
save-point
init-cur-draw)
;数据结构============================================
;会话环境全局变量:
(define interactive-context void)
;定义绘图对象:
(define cur-draw (init-draws))
;会话结构:
(struct interactive
(style ;会话类型。包括:两点线2p-line,多段线poly-line,半径圆‘circle-radius,圆弧arc
current-int ;当前会话序号。对应会话向量序号
prompt-vector ;会话提示向量
end-str) #:mutable) ;会话结束语。如:“线段绘制结束。”
;会话提示结构:
(struct interactive-prompt
(style ;需要取得的值类型。包括:点'point,选项'select,数值'number
prompt)) ;提示内容
;绘图结构:
(struct draw
(style ;绘图类型。同会话结构的style项
ls) #:mutable) ;绘图值向量
;绘图值类型:
(struct draw-value
(style ;值类型。包括:点'point,角度'angle,长度'length
value)) ;绘图值
;交互数据:=============================================
;绘图命令与绘图交互环境类型对应表:
(define draw-style-hash
(hash "line" 'line/2p
"poly-line" 'line/poly
"radius-circle" 'circle/radius
"3p-arc" 'arc/3p))
;定义交互环境散列表:
(define interactive-hash
(hash
;两点线交互环境:
'line/2p
(interactive
'line/2p
0
(vector
(interactive-prompt
'point
"请输入线段的第一点")
(interactive-prompt
'point
"请输入线段的第二点"))
"绘制两点线结束。")
;多段线交互环境:
'line/poly-context
(interactive
'line/poly
0
(vector
(interactive-prompt
'point
"请输入多段线的起点")
(interactive-prompt
'select
"请选择多段线当前线的类型(L两点线/A圆弧)"))
"绘制多段线结束。")
;圆交互环境:
'circle/radius-context
(interactive
'circle/radius
0
(vector
(interactive-prompt
'point
"请输入圆心坐标")
(interactive-prompt
'number
"请输入半径"))
"绘制圆结束。")
;三点圆弧交互环境:
'arc/3p-context
(interactive
'arc/3p
0
(vector
(interactive-prompt
'point
"请输入圆弧第一点")
(interactive-prompt
'point
"请输入圆弧第二点")
(interactive-prompt
'point
"请输入圆弧第三点"))
"绘制圆弧结束。")))
;数据操作===============================================
;重置会话环境:
(define (reset-interactive-context)
(set! interactive-context void))
;检查会话环境重置状态:
(define (interactive-context-reset?)
(equal? interactive-context void))
;是否为会话输入状态:
;interactive-context?->boolean?
(define (command-char/command? context)
context)
;为画图命令?
(define (command/draw? str)
(hash-ref draw-style-hash str #f))
;设置交互环境:
(define (set-interactive-context str)
(if (command/draw? str)
(set! interactive-context
(hash-ref interactive-hash
(hash-ref draw-style-hash str)))
#f))
;取得当前会话序号:
(define (get-current-int)
(interactive-current-int interactive-context))
;增加当前会话序号:
(define (add-current-int)
(set-interactive-current-int!
interactive-context
(+ (get-current-int) 1)))
;取得会话总次数:
(define (get-prompt-number)
(vector-length
(interactive-prompt-vector interactive-context)))
;取得会话结束语:
(define (get-end-str)
(interactive-end-str interactive-context))
;取得交互类型:
(define (get-style)
(interactive-style interactive-context))
;取得会话提示类型:
(define (get-prompt-style current-int)
(interactive-prompt-style
(get-prompt-vector current-int)))
;取得会话提示向量表:
(define (get-prompt-vector current-int)
(if
(< (get-current-int)
(get-prompt-number))
(vector-ref
(interactive-prompt-vector interactive-context)
current-int)
#f))
;取得会话提示:
(define (get-prompt current-int)
(string-append
(interactive-prompt-prompt
(get-prompt-vector current-int))
":"))
;设置绘图结构类型:
(define (init-cur-draw)
(set! cur-draw
(draw (get-style) null)))
;是否为坐标格式,
;坐标格式有两种:(number,number),(number<degree)
(define (value/point? str)
(when (or
(regexp-match #rx"," str)
(regexp-match #rx"<" str))
(let* ([ls-str (regexp-split #rx"[<,]" str)]
[first-str (list-ref ls-str 0)]
[second-str (list-ref ls-str 1)])
(and (string->number first-str)
(string->number second-str)))))
;解析回答文本:
(define (analyze-answer str)
(let ([value-style
(get-prompt-style (get-current-int))])
(cond
[(equal? value-style 'point) (get-answer/point str)]
[(equal? value-style 'number) (string->number str)]
[(equal? value-style 'string) str])))
;解析点字串为点结构:
(define (get-answer/point str)
;点对形式:
(if (regexp-match #rx"," str)
(analyze-number-point str) ;数值点形式
(analyze-angle-point str)));角度点形式
;解析数值点:
(define (analyze-number-point str)
(let* ([ls-str (string-split str ",")]
[v1 (string->number (list-ref ls-str 0))]
[v2 (string->number (list-ref ls-str 1))])
(point v1 v2)))
;解析角度点:
(define (analyze-angle-point str)
(let* ([ls-str (string-split str "<")]
[v1 (string->number (list-ref ls-str 0))]
[v2 (string->number (list-ref ls-str 1))])
(values v1 v2)))
;保存点值:
(define (save-point str)
(when (value/point? str)
(set-draw-ls! cur-draw
(cons
(draw-value
'point
(analyze-answer str))
(draw-ls cur-draw)))))
;画图元:
(define (draw-pel dc value)
(let ([style (get-style)])
(cond
[(equal? style 'line/2p)
(draw-line/2p dc value)]))) | false |
0b3ea1385e17b7cf7db7c88372c47f9e01a0df66 | 99da27c5fd0f4d56ef39a3122d6bb92b93d6115e | /racket/little-prover.rkt | 982e766d87a36fe5ac57dbe31f39e0b6fd4758d6 | [
"BSD-2-Clause"
] | permissive | wllsena/j-bob | 7fcba6deb22ebadac96ef7a46c010412296eb5c4 | 703bcf1f5436711f7435b2d97c70f193655ebf89 | refs/heads/master | 2023-03-31T21:22:53.545656 | 2021-04-09T14:31:02 | 2021-04-09T14:31:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 45,525 | rkt | little-prover.rkt | #lang racket/base
(require "j-bob-lang.rkt")
(require "j-bob.rkt")
(provide (all-defined-out))
;——
;; Chapter 1
(defun chapter1.example1 ()
(J-Bob/step (prelude)
'(car (cons 'ham '(eggs)))
'(((1) (cons 'ham '(eggs)))
(() (car '(ham eggs))))))
(defun chapter1.example2 ()
(J-Bob/step (prelude)
'(atom '())
'((() (atom '())))))
(defun chapter1.example3 ()
(J-Bob/step (prelude)
'(atom (cons 'ham '(eggs)))
'(((1) (cons 'ham '(eggs)))
(() (atom '(ham eggs))))))
(defun chapter1.example4 ()
(J-Bob/step (prelude)
'(atom (cons a b))
'((() (atom/cons a b)))))
(defun chapter1.example5 ()
(J-Bob/step (prelude)
'(equal 'flapjack (atom (cons a b)))
'(((2) (atom/cons a b))
(() (equal 'flapjack 'nil)))))
(defun chapter1.example6 ()
(J-Bob/step (prelude)
'(atom (cdr (cons (car (cons p q)) '())))
'(((1 1 1) (car/cons p q))
((1) (cdr/cons p '()))
(() (atom '())))))
(defun chapter1.example7 ()
(J-Bob/step (prelude)
'(atom (cdr (cons (car (cons p q)) '())))
'(((1) (cdr/cons (car (cons p q)) '()))
(() (atom '())))))
(defun chapter1.example8 ()
(J-Bob/step (prelude)
'(car (cons (equal (cons x y) (cons x y)) '(and crumpets)))
'(((1 1) (equal-same (cons x y)))
((1) (cons 't '(and crumpets)))
(() (car '(t and crumpets))))))
(defun chapter1.example9 ()
(J-Bob/step (prelude)
'(equal (cons x y) (cons 'bagels '(and lox)))
'((() (equal-swap (cons x y) (cons 'bagels '(and lox)))))))
(defun chapter1.example10 ()
(J-Bob/step (prelude)
'(cons y (equal (car (cons (cdr x) (car y))) (equal (atom x) 'nil)))
'(((2 1) (car/cons (cdr x) (car y))))))
(defun chapter1.example11 ()
(J-Bob/step (prelude)
'(cons y (equal (car (cons (cdr x) (car y))) (equal (atom x) 'nil)))
'(((2 1) (car/cons (car (cons (cdr x) (car y))) '(oats)))
((2 2 2) (atom/cons (atom (cdr (cons a b))) (equal (cons a b) c)))
((2 2 2 1 1 1) (cdr/cons a b))
((2 2 2 1 2) (equal-swap (cons a b) c)))))
(defun chapter1.example12 ()
(J-Bob/step (prelude)
'(atom (car (cons (car a) (cdr b))))
'(((1) (car/cons (car a) (cdr b))))))
;; Chapter 2
(defun chapter2.example1 ()
(J-Bob/step (prelude)
'(if (car (cons a b)) c c)
'(((Q) (car/cons a b))
(() (if-same a c))
(()
(if-same
(if (equal a 't) (if (equal 'nil 'nil) a b) (equal 'or (cons 'black '(coffee))))
c))
((Q E 2) (cons 'black '(coffee)))
((Q A Q) (equal-same 'nil))
((Q A) (if-true a b))
((Q A) (equal-if a 't)))))
(defun chapter2.example2 ()
(J-Bob/step (prelude)
'(if (atom (car a))
(if (equal (car a) (cdr a)) 'hominy 'grits)
(if (equal (cdr (car a)) '(hash browns))
(cons 'ketchup (car a))
(cons 'mustard (car a))))
'(((E A 2) (cons/car+cdr (car a)))
((E A 2 2) (equal-if (cdr (car a)) '(hash browns))))))
(defun chapter2.example3 ()
(J-Bob/step (prelude)
'(cons 'statement
(cons (if (equal a 'question) (cons n '(answer)) (cons n '(else)))
(if (equal a 'question) (cons n '(other answer)) (cons n '(other else)))))
'(((2)
(if-same (equal a 'question)
(cons (if (equal a 'question) (cons n '(answer)) (cons n '(else)))
(if (equal a 'question) (cons n '(other answer)) (cons n '(other else))))))
((2 A 1) (if-nest-A (equal a 'question) (cons n '(answer)) (cons n '(else))))
((2 E 1) (if-nest-E (equal a 'question) (cons n '(answer)) (cons n '(else))))
((2 A 2)
(if-nest-A (equal a 'question) (cons n '(other answer)) (cons n '(other else))))
((2 E 2)
(if-nest-E (equal a 'question)
(cons n '(other answer))
(cons n '(other else)))))))
;; Chapter 3
(defun defun.pair ()
(J-Bob/define (prelude)
'(((defun pair (x y)
(cons x (cons y '())))
nil))))
(defun defun.first-of ()
(J-Bob/define (defun.pair)
'(((defun first-of (x)
(car x))
nil))))
(defun defun.second-of ()
(J-Bob/define (defun.first-of)
'(((defun second-of (x)
(car (cdr x)))
nil))))
(defun dethm.first-of-pair ()
(J-Bob/define (defun.second-of)
'(((dethm first-of-pair (a b)
(equal (first-of (pair a b)) a))
nil
((1 1) (pair a b))
((1) (first-of (cons a (cons b '()))))
((1) (car/cons a (cons b '())))
(() (equal-same a))))))
(defun dethm.second-of-pair ()
(J-Bob/define (dethm.first-of-pair)
'(((dethm second-of-pair (a b)
(equal (second-of (pair a b)) b))
nil
((1) (second-of (pair a b)))
((1 1 1) (pair a b))
((1 1) (cdr/cons a (cons b '())))
((1) (car/cons b '()))
(() (equal-same b))))))
(defun defun.in-pair? ()
(J-Bob/define (dethm.second-of-pair)
'(((defun in-pair? (xs)
(if (equal (first-of xs) '?) 't (equal (second-of xs) '?)))
nil))))
(defun dethm.in-first-of-pair ()
(J-Bob/define (defun.in-pair?)
'(((dethm in-first-of-pair (b)
(equal (in-pair? (pair '? b)) 't))
nil
((1 1) (pair '? b))
((1) (in-pair? (cons '? (cons b '()))))
((1 Q 1) (first-of (cons '? (cons b '()))))
((1 Q 1) (car/cons '? (cons b '())))
((1 Q) (equal-same '?))
((1) (if-true 't (equal (second-of (cons '? (cons b '()))) '?)))
(() (equal-same 't))))))
(defun dethm.in-second-of-pair ()
(J-Bob/define (dethm.in-first-of-pair)
'(((dethm in-second-of-pair (a)
(equal (in-pair? (pair a '?)) 't))
nil
((1 1) (pair a '?))
((1) (in-pair? (cons a (cons '? '()))))
((1 Q 1) (first-of (cons a (cons '? '()))))
((1 Q 1) (car/cons a (cons '? '())))
((1 E 1) (second-of (cons a (cons '? '()))))
((1 E 1 1) (cdr/cons a (cons '? '())))
((1 E 1) (car/cons '? '()))
((1 E) (equal-same '?))
((1) (if-same (equal a '?) 't))
(() (equal-same 't))))))
;; Chapter 4
(defun defun.list0? ()
(J-Bob/define (dethm.in-second-of-pair)
'(((defun list0? (x)
(equal x '()))
nil))))
(defun defun.list1? ()
(J-Bob/define (defun.list0?)
'(((defun list1? (x)
(if (atom x) 'nil (list0? (cdr x))))
nil))))
(defun defun.list2? ()
(J-Bob/define (defun.list1?)
'(((defun list2? (x)
(if (atom x) 'nil (list1? (cdr x))))
nil))))
(defun dethm.contradiction ()
(J-Bob/prove
(list-extend (prelude)
'(defun partial (x)
(if (partial x) 'nil 't)))
'(((dethm contradiction () 'nil)
nil
(() (if-same (partial x) 'nil))
((A) (if-nest-A (partial x) 'nil 't))
((E) (if-nest-E (partial x) 't 'nil))
((A Q) (partial x))
((E Q) (partial x))
((A Q) (if-nest-A (partial x) 'nil 't))
((E Q) (if-nest-E (partial x) 'nil 't))
((A) (if-false 'nil 't))
((E) (if-true 't 'nil))
(() (if-same (partial x) 't))))))
(defun defun.list? ()
(J-Bob/define (defun.list2?)
'(((defun list? (x)
(if (atom x) (equal x '()) (list? (cdr x))))
(size x)
((Q) (natp/size x))
(() (if-true (if (atom x) 't (< (size (cdr x)) (size x))) 'nil))
((E) (size/cdr x))
(() (if-same (atom x) 't))))))
(defun defun.sub ()
(J-Bob/define (defun.list?)
'(((defun sub (x y)
(if (atom y) (if (equal y '?) x y) (cons (sub x (car y)) (sub x (cdr y)))))
(size y)
((Q) (natp/size y))
(()
(if-true
(if (atom y)
't
(if (< (size (car y)) (size y)) (< (size (cdr y)) (size y)) 'nil))
'nil))
((E Q) (size/car y))
((E A) (size/cdr y))
((E) (if-true 't 'nil))
(() (if-same (atom y) 't))))))
;; Chapter 5
(defun defun.memb? ()
(J-Bob/define (defun.sub)
'(((defun memb? (xs)
(if (atom xs) 'nil (if (equal (car xs) '?) 't (memb? (cdr xs)))))
(size xs)
((Q) (natp/size xs))
(()
(if-true
(if (atom xs) 't (if (equal (car xs) '?) 't (< (size (cdr xs)) (size xs))))
'nil))
((E E) (size/cdr xs))
((E) (if-same (equal (car xs) '?) 't))
(() (if-same (atom xs) 't))))))
(defun defun.remb ()
(J-Bob/define (defun.memb?)
'(((defun remb (xs)
(if (atom xs)
'()
(if (equal (car xs) '?) (remb (cdr xs)) (cons (car xs) (remb (cdr xs))))))
(size xs)
((Q) (natp/size xs))
(() (if-true (if (atom xs) 't (< (size (cdr xs)) (size xs))) 'nil))
((E) (size/cdr xs))
(() (if-same (atom xs) 't))))))
(defun dethm.memb?/remb0 ()
(J-Bob/define (defun.remb)
'(((dethm memb?/remb0 ()
(equal (memb? (remb '())) 'nil))
nil
((1 1) (remb '()))
((1 1 Q) (atom '()))
((1 1)
(if-true '()
(if (equal (car '()) '?) (remb (cdr '())) (cons (car '()) (remb (cdr '()))))))
((1) (memb? '()))
((1 Q) (atom '()))
((1) (if-true 'nil (if (equal (car '()) '?) 't (memb? (cdr '())))))
(() (equal-same 'nil))))))
(defun dethm.memb?/remb1 ()
(J-Bob/define (dethm.memb?/remb0)
'(((dethm memb?/remb1 (x1)
(equal (memb? (remb (cons x1 '()))) 'nil))
nil
((1 1) (remb (cons x1 '())))
((1 1 Q) (atom/cons x1 '()))
((1 1)
(if-false '()
(if (equal (car (cons x1 '())) '?)
(remb (cdr (cons x1 '())))
(cons (car (cons x1 '())) (remb (cdr (cons x1 '())))))))
((1 1 Q 1) (car/cons x1 '()))
((1 1 A 1) (cdr/cons x1 '()))
((1 1 E 1) (car/cons x1 '()))
((1 1 E 2 1) (cdr/cons x1 '()))
((1)
(if-same (equal x1 '?)
(memb? (if (equal x1 '?) (remb '()) (cons x1 (remb '()))))))
((1 A 1) (if-nest-A (equal x1 '?) (remb '()) (cons x1 (remb '()))))
((1 E 1) (if-nest-E (equal x1 '?) (remb '()) (cons x1 (remb '()))))
((1 A) (memb?/remb0))
((1 E) (memb? (cons x1 (remb '()))))
((1 E Q) (atom/cons x1 (remb '())))
((1 E)
(if-false 'nil
(if (equal (car (cons x1 (remb '()))) '?)
't
(memb? (cdr (cons x1 (remb '())))))))
((1 E Q 1) (car/cons x1 (remb '())))
((1 E E 1) (cdr/cons x1 (remb '())))
((1 E) (if-nest-E (equal x1 '?) 't (memb? (remb '()))))
((1 E) (memb?/remb0))
((1) (if-same (equal x1 '?) 'nil))
(() (equal-same 'nil))))))
(defun dethm.memb?/remb2 ()
(J-Bob/define (dethm.memb?/remb1)
'(((dethm memb?/remb2 (x1 x2)
(equal (memb? (remb (cons x2 (cons x1 '())))) 'nil))
nil
((1 1) (remb (cons x2 (cons x1 '()))))
((1 1 Q) (atom/cons x2 (cons x1 '())))
((1 1)
(if-false '()
(if (equal (car (cons x2 (cons x1 '()))) '?)
(remb (cdr (cons x2 (cons x1 '()))))
(cons (car (cons x2 (cons x1 '())))
(remb (cdr (cons x2 (cons x1 '()))))))))
((1 1 Q 1) (car/cons x2 (cons x1 '())))
((1 1 A 1) (cdr/cons x2 (cons x1 '())))
((1 1 E 1) (car/cons x2 (cons x1 '())))
((1 1 E 2 1) (cdr/cons x2 (cons x1 '())))
((1)
(if-same (equal x2 '?)
(memb?
(if (equal x2 '?) (remb (cons x1 '())) (cons x2 (remb (cons x1 '())))))))
((1 A 1)
(if-nest-A (equal x2 '?) (remb (cons x1 '())) (cons x2 (remb (cons x1 '())))))
((1 E 1)
(if-nest-E (equal x2 '?) (remb (cons x1 '())) (cons x2 (remb (cons x1 '())))))
((1 A) (memb?/remb1 x1))
((1 E) (memb? (cons x2 (remb (cons x1 '())))))
((1 E Q) (atom/cons x2 (remb (cons x1 '()))))
((1 E)
(if-false 'nil
(if (equal (car (cons x2 (remb (cons x1 '())))) '?)
't
(memb? (cdr (cons x2 (remb (cons x1 '()))))))))
((1 E Q 1) (car/cons x2 (remb (cons x1 '()))))
((1 E E 1) (cdr/cons x2 (remb (cons x1 '()))))
((1 E) (if-nest-E (equal x2 '?) 't (memb? (remb (cons x1 '())))))
((1 E) (memb?/remb1 x1))
((1) (if-same (equal x2 '?) 'nil))
(() (equal-same 'nil))))))
;; Chapter 6
(defun dethm.memb?/remb ()
(J-Bob/define (dethm.memb?/remb2)
'(((dethm memb?/remb (xs)
(equal (memb? (remb xs)) 'nil))
(list-induction xs)
((A 1 1) (remb xs))
((A 1 1)
(if-nest-A (atom xs)
'()
(if (equal (car xs) '?) (remb (cdr xs)) (cons (car xs) (remb (cdr xs))))))
((A 1) (memb? '()))
((A 1 Q) (atom '()))
((A 1) (if-true 'nil (if (equal (car '()) '?) 't (memb? (cdr '())))))
((A) (equal-same 'nil))
((E A 1 1) (remb xs))
((E A 1 1)
(if-nest-E (atom xs)
'()
(if (equal (car xs) '?) (remb (cdr xs)) (cons (car xs) (remb (cdr xs))))))
((E A 1)
(if-same (equal (car xs) '?)
(memb?
(if (equal (car xs) '?) (remb (cdr xs)) (cons (car xs) (remb (cdr xs)))))))
((E A 1 A 1)
(if-nest-A (equal (car xs) '?) (remb (cdr xs)) (cons (car xs) (remb (cdr xs)))))
((E A 1 E 1)
(if-nest-E (equal (car xs) '?) (remb (cdr xs)) (cons (car xs) (remb (cdr xs)))))
((E A 1 A) (equal-if (memb? (remb (cdr xs))) 'nil))
((E A 1 E) (memb? (cons (car xs) (remb (cdr xs)))))
((E A 1 E Q) (atom/cons (car xs) (remb (cdr xs))))
((E A 1 E)
(if-false 'nil
(if (equal (car (cons (car xs) (remb (cdr xs)))) '?)
't
(memb? (cdr (cons (car xs) (remb (cdr xs))))))))
((E A 1 E Q 1) (car/cons (car xs) (remb (cdr xs))))
((E A 1 E E 1) (cdr/cons (car xs) (remb (cdr xs))))
((E A 1 E) (if-nest-E (equal (car xs) '?) 't (memb? (remb (cdr xs)))))
((E A 1 E) (equal-if (memb? (remb (cdr xs))) 'nil))
((E A 1) (if-same (equal (car xs) '?) 'nil))
((E A) (equal-same 'nil))
((E) (if-same (equal (memb? (remb (cdr xs))) 'nil) 't))
(() (if-same (atom xs) 't))))))
;; Chapter 7
(defun defun.ctx? ()
(J-Bob/define (dethm.memb?/remb)
'(((defun ctx? (x)
(if (atom x) (equal x '?) (if (ctx? (car x)) 't (ctx? (cdr x)))))
(size x)
((Q) (natp/size x))
(()
(if-true
(if (atom x)
't
(if (< (size (car x)) (size x))
(if (ctx? (car x)) 't (< (size (cdr x)) (size x)))
'nil))
'nil))
((E Q) (size/car x))
((E A E) (size/cdr x))
((E A) (if-same (ctx? (car x)) 't))
((E) (if-true 't 'nil))
(() (if-same (atom x) 't))))))
(defun dethm.ctx?/sub ()
(J-Bob/define (defun.ctx?)
'(((dethm ctx?/t (x)
(if (ctx? x) (equal (ctx? x) 't) 't))
(star-induction x)
((A A 1) (ctx? x))
((A A 1) (if-nest-A (atom x) (equal x '?) (if (ctx? (car x)) 't (ctx? (cdr x)))))
((A Q) (ctx? x))
((A Q) (if-nest-A (atom x) (equal x '?) (if (ctx? (car x)) 't (ctx? (cdr x)))))
((A A 1 1) (equal-if x '?))
((A A 1) (equal-same '?))
((A A) (equal-same 't))
((A) (if-same (equal x '?) 't))
((E A A A 1) (ctx? x))
((E A A A 1)
(if-nest-E (atom x) (equal x '?) (if (ctx? (car x)) 't (ctx? (cdr x)))))
((E)
(if-same (ctx? (car x))
(if (if (ctx? (car x)) (equal (ctx? (car x)) 't) 't)
(if (if (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't)
(if (ctx? x) (equal (if (ctx? (car x)) 't (ctx? (cdr x))) 't) 't)
't)
't)))
((E A Q) (if-nest-A (ctx? (car x)) (equal (ctx? (car x)) 't) 't))
((E A A A A 1) (if-nest-A (ctx? (car x)) 't (ctx? (cdr x))))
((E E Q) (if-nest-E (ctx? (car x)) (equal (ctx? (car x)) 't) 't))
((E E A A A 1) (if-nest-E (ctx? (car x)) 't (ctx? (cdr x))))
((E A A A A) (equal-same 't))
((E E)
(if-true
(if (if (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't)
(if (ctx? x) (equal (ctx? (cdr x)) 't) 't)
't)
't))
((E A A A) (if-same (ctx? x) 't))
((E A A) (if-same (if (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't) 't))
((E A) (if-same (equal (ctx? (car x)) 't) 't))
((E E A Q) (ctx? x))
((E E A Q)
(if-nest-E (atom x) (equal x '?) (if (ctx? (car x)) 't (ctx? (cdr x)))))
((E E A Q) (if-nest-E (ctx? (car x)) 't (ctx? (cdr x))))
((E E)
(if-same (ctx? (cdr x))
(if (if (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't)
(if (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't)
't)))
((E E A Q)(if-nest-A (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't))
((E E A A)(if-nest-A (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't))
((E E E Q)(if-nest-E (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't))
((E E E A)(if-nest-E (ctx? (cdr x)) (equal (ctx? (cdr x)) 't) 't))
((E E E) (if-same 't 't))
((E E A A 1) (equal-if (ctx? (cdr x)) 't))
((E E A A) (equal-same 't))
((E E A) (if-same (equal (ctx? (cdr x)) 't) 't))
((E E) (if-same (ctx? (cdr x)) 't))
((E) (if-same (ctx? (car x)) 't))
(() (if-same (atom x) 't)))
((dethm ctx?/sub (x y)
(if (ctx? x) (if (ctx? y) (equal (ctx? (sub x y)) 't) 't) 't))
(star-induction y)
(()
(if-same (ctx? x)
(if (atom y)
(if (ctx? x) (if (ctx? y) (equal (ctx? (sub x y)) 't) 't) 't)
(if (if (ctx? x)
(if (ctx? (car y)) (equal (ctx? (sub x (car y))) 't) 't)
't)
(if (if (ctx? x)
(if (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't)
't)
(if (ctx? x) (if (ctx? y) (equal (ctx? (sub x y)) 't) 't) 't)
't)
't))))
((A A) (if-nest-A (ctx? x) (if (ctx? y) (equal (ctx? (sub x y)) 't) 't) 't))
((A E Q)
(if-nest-A (ctx? x) (if (ctx? (car y)) (equal (ctx? (sub x (car y))) 't) 't) 't))
((A E A Q)
(if-nest-A (ctx? x) (if (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't) 't))
((A E A A) (if-nest-A (ctx? x) (if (ctx? y) (equal (ctx? (sub x y)) 't) 't) 't))
((E A) (if-nest-E (ctx? x) (if (ctx? y) (equal (ctx? (sub x y)) 't) 't) 't))
((E E Q)
(if-nest-E (ctx? x) (if (ctx? (car y)) (equal (ctx? (sub x (car y))) 't) 't) 't))
((E E A Q)
(if-nest-E (ctx? x) (if (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't) 't))
((E E A A) (if-nest-E (ctx? x) (if (ctx? y) (equal (ctx? (sub x y)) 't) 't) 't))
((E E A) (if-same 't 't))
((E E) (if-same 't 't))
((E) (if-same (atom y) 't))
((A A A 1 1) (sub x y))
((A A A 1 1)
(if-nest-A (atom y)
(if (equal y '?) x y)
(cons (sub x (car y)) (sub x (cdr y)))))
((A A A) (if-same (equal y '?) (equal (ctx? (if (equal y '?) x y)) 't)))
((A A A A 1 1) (if-nest-A (equal y '?) x y))
((A A A E 1 1) (if-nest-E (equal y '?) x y))
((A A A A 1) (ctx?/t x))
((A A A A) (equal-same 't))
((A A A E 1) (ctx?/t y))
((A A A E) (equal-same 't))
((A A A) (if-same (equal y '?) 't))
((A A) (if-same (ctx? y) 't))
((A E A A A 1 1) (sub x y))
((A E A A A 1 1)
(if-nest-E (atom y)
(if (equal y '?) x y)
(cons (sub x (car y)) (sub x (cdr y)))))
((A E A A A 1) (ctx? (cons (sub x (car y)) (sub x (cdr y)))))
((A E A A A 1 Q) (atom/cons (sub x (car y)) (sub x (cdr y))))
((A E A A A 1 E Q 1) (car/cons (sub x (car y)) (sub x (cdr y))))
((A E A A A 1 E E 1) (cdr/cons (sub x (car y)) (sub x (cdr y))))
((A E A A A 1)
(if-false (equal (cons (sub x (car y)) (sub x (cdr y))) '?)
(if (ctx? (sub x (car y))) 't (ctx? (sub x (cdr y))))))
((A E A A Q) (ctx? y))
((A E A A Q)
(if-nest-E (atom y) (equal y '?) (if (ctx? (car y)) 't (ctx? (cdr y)))))
((A E)
(if-same (ctx? (car y))
(if (if (ctx? (car y)) (equal (ctx? (sub x (car y))) 't) 't)
(if (if (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't)
(if (if (ctx? (car y)) 't (ctx? (cdr y)))
(equal (if (ctx? (sub x (car y))) 't (ctx? (sub x (cdr y)))) 't)
't)
't)
't)))
((A E A Q) (if-nest-A (ctx? (car y)) (equal (ctx? (sub x (car y))) 't) 't))
((A E A A A Q) (if-nest-A (ctx? (car y)) 't (ctx? (cdr y))))
((A E E Q) (if-nest-E (ctx? (car y)) (equal (ctx? (sub x (car y))) 't) 't))
((A E E A A Q) (if-nest-E (ctx? (car y)) 't (ctx? (cdr y))))
((A E A A A)
(if-true (equal (if (ctx? (sub x (car y))) 't (ctx? (sub x (cdr y)))) 't) 't))
((A E E)
(if-true
(if (if (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't)
(if (ctx? (cdr y))
(equal (if (ctx? (sub x (car y))) 't (ctx? (sub x (cdr y)))) 't)
't)
't)
't))
((A E A A A 1 Q) (equal-if (ctx? (sub x (car y))) 't))
((A E A A A 1) (if-true 't (ctx? (sub x (cdr y)))))
((A E A A A) (equal-same 't))
((A E A A) (if-same (if (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't) 't))
((A E A) (if-same (equal (ctx? (sub x (car y))) 't) 't))
((A E E)
(if-same (ctx? (cdr y))
(if (if (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't)
(if (ctx? (cdr y))
(equal (if (ctx? (sub x (car y))) 't (ctx? (sub x (cdr y)))) 't)
't)
't)))
((A E E A Q) (if-nest-A (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't))
((A E E A A)
(if-nest-A (ctx? (cdr y))
(equal (if (ctx? (sub x (car y))) 't (ctx? (sub x (cdr y)))) 't)
't))
((A E E E Q) (if-nest-E (ctx? (cdr y)) (equal (ctx? (sub x (cdr y))) 't) 't))
((A E E E A)
(if-nest-E (ctx? (cdr y))
(equal (if (ctx? (sub x (car y))) 't (ctx? (sub x (cdr y)))) 't)
't))
((A E E E) (if-same 't 't))
((A E E A A 1 E) (equal-if (ctx? (sub x (cdr y))) 't))
((A E E A A 1) (if-same (ctx? (sub x (car y))) 't))
((A E E A A) (equal-same 't))
((A E E A) (if-same (equal (ctx? (sub x (cdr y))) 't) 't))
((A E E) (if-same (ctx? (cdr y)) 't))
((A E) (if-same (ctx? (car y)) 't))
((A) (if-same (atom y) 't))
(() (if-same (ctx? x) 't))))))
;; Chapter 8
(defun defun.member? ()
(J-Bob/define (dethm.ctx?/sub)
'(((defun member? (x ys)
(if (atom ys) 'nil (if (equal x (car ys)) 't (member? x (cdr ys)))))
(size ys)
((Q) (natp/size ys))
(()
(if-true
(if (atom ys) 't (if (equal x (car ys)) 't (< (size (cdr ys)) (size ys))))
'nil))
((E E) (size/cdr ys))
((E) (if-same (equal x (car ys)) 't))
(() (if-same (atom ys) 't))))))
(defun defun.set? ()
(J-Bob/define (defun.member?)
'(((defun set? (xs)
(if (atom xs) 't (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))))
(size xs)
((Q) (natp/size xs))
(()
(if-true
(if (atom xs)
't
(if (member? (car xs) (cdr xs)) 't (< (size (cdr xs)) (size xs))))
'nil))
((E E) (size/cdr xs))
((E) (if-same (member? (car xs) (cdr xs)) 't))
(() (if-same (atom xs) 't))))))
(defun defun.add-atoms ()
(J-Bob/define (defun.set?)
'(((defun add-atoms (x ys)
(if (atom x)
(if (member? x ys) ys (cons x ys))
(add-atoms (car x) (add-atoms (cdr x) ys))))
(size x)
((Q) (natp/size x))
(()
(if-true
(if (atom x)
't
(if (< (size (car x)) (size x)) (< (size (cdr x)) (size x)) 'nil))
'nil))
((E Q) (size/car x))
((E A) (size/cdr x))
((E) (if-true 't 'nil))
(() (if-same (atom x) 't))))))
(defun defun.atoms ()
(J-Bob/define (defun.add-atoms)
'(((defun atoms (x)
(add-atoms x '()))
nil))))
(defun dethm.set?/atoms.attempt ()
(J-Bob/prove (defun.atoms)
'(((dethm set?/add-atoms (a)
(equal (set? (add-atoms a '())) 't))
(star-induction a)
((E A A 1 1) (add-atoms a '())))
((dethm set?/atoms (a)
(equal (set? (atoms a)) 't))
nil
((1 1) (atoms a))
((1) (set?/add-atoms a))
(() (equal-same 't))))))
(defun dethm.set?/atoms ()
(J-Bob/define (defun.atoms)
'(((dethm set?/t (xs)
(if (set? xs) (equal (set? xs) 't) 't))
(list-induction xs)
((A A 1) (set? xs))
((A A 1)
(if-nest-A (atom xs) 't (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))))
((A A) (equal-same 't))
((A) (if-same (set? xs) 't))
((E A A 1) (set? xs))
((E A A 1)
(if-nest-E (atom xs) 't (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))))
((E A Q) (set? xs))
((E A Q)
(if-nest-E (atom xs) 't (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))))
((E A)
(if-same (member? (car xs) (cdr xs))
(if (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))
(equal (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))) 't)
't)))
((E A A Q) (if-nest-A (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))))
((E A A A 1) (if-nest-A (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))))
((E A E Q) (if-nest-E (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))))
((E A E A 1) (if-nest-E (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))))
((E A A) (if-false (equal 'nil 't) 't))
((E)
(if-same (set? (cdr xs))
(if (if (set? (cdr xs)) (equal (set? (cdr xs)) 't) 't)
(if (member? (car xs) (cdr xs))
't
(if (set? (cdr xs)) (equal (set? (cdr xs)) 't) 't))
't)))
((E A Q) (if-nest-A (set? (cdr xs)) (equal (set? (cdr xs)) 't) 't))
((E A A E) (if-nest-A (set? (cdr xs)) (equal (set? (cdr xs)) 't) 't))
((E E Q) (if-nest-E (set? (cdr xs)) (equal (set? (cdr xs)) 't) 't))
((E E A E) (if-nest-E (set? (cdr xs)) (equal (set? (cdr xs)) 't) 't))
((E E A) (if-same (member? (car xs) (cdr xs)) 't))
((E E) (if-same 't 't))
((E A A E 1) (equal-if (set? (cdr xs)) 't))
((E A A E) (equal-same 't))
((E A A) (if-same (member? (car xs) (cdr xs)) 't))
((E A) (if-same (equal (set? (cdr xs)) 't) 't))
((E) (if-same (set? (cdr xs)) 't))
(() (if-same (atom xs) 't)))
((dethm set?/nil (xs)
(if (set? xs) 't (equal (set? xs) 'nil)))
(list-induction xs)
((A Q) (set? xs))
((A Q)
(if-nest-A (atom xs) 't (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))))
((A) (if-true 't (equal (set? xs) 'nil)))
((E A E 1) (set? xs))
((E A E 1)
(if-nest-E (atom xs) 't (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))))
((E A Q) (set? xs))
((E A Q)
(if-nest-E (atom xs) 't (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))))
((E A)
(if-same (member? (car xs) (cdr xs))
(if (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs)))
't
(equal (if (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))) 'nil))))
((E A A Q) (if-nest-A (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))))
((E A A E 1) (if-nest-A (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))))
((E A E Q) (if-nest-E (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))))
((E A E E 1) (if-nest-E (member? (car xs) (cdr xs)) 'nil (set? (cdr xs))))
((E A A E) (equal-same 'nil))
((E A A) (if-same 'nil 't))
((E)
(if-same (set? (cdr xs))
(if (if (set? (cdr xs)) 't (equal (set? (cdr xs)) 'nil))
(if (member? (car xs) (cdr xs))
't
(if (set? (cdr xs)) 't (equal (set? (cdr xs)) 'nil)))
't)))
((E A Q) (if-nest-A (set? (cdr xs)) 't (equal (set? (cdr xs)) 'nil)))
((E A A E) (if-nest-A (set? (cdr xs)) 't (equal (set? (cdr xs)) 'nil)))
((E E Q) (if-nest-E (set? (cdr xs)) 't (equal (set? (cdr xs)) 'nil)))
((E E A E) (if-nest-E (set? (cdr xs)) 't (equal (set? (cdr xs)) 'nil)))
((E A A) (if-same (member? (car xs) (cdr xs)) 't))
((E A) (if-same 't 't))
((E E A E 1) (equal-if (set? (cdr xs)) 'nil))
((E E A E) (equal-same 'nil))
((E E A) (if-same (member? (car xs) (cdr xs)) 't))
((E E) (if-same (equal (set? (cdr xs)) 'nil) 't))
((E) (if-same (set? (cdr xs)) 't))
(() (if-same (atom xs) 't)))
((dethm set?/add-atoms (a bs)
(if (set? bs) (equal (set? (add-atoms a bs)) 't) 't))
(add-atoms a bs)
((A A 1 1) (add-atoms a bs))
((A A 1 1)
(if-nest-A (atom a)
(if (member? a bs) bs (cons a bs))
(add-atoms (car a) (add-atoms (cdr a) bs))))
((A A 1) (if-same (member? a bs) (set? (if (member? a bs) bs (cons a bs)))))
((A A 1 A 1) (if-nest-A (member? a bs) bs (cons a bs)))
((A A 1 E 1) (if-nest-E (member? a bs) bs (cons a bs)))
((A A 1 A) (set?/t bs))
((A A 1 E) (set? (cons a bs)))
((A A 1 E Q) (atom/cons a bs))
((A A 1 E E Q 1) (car/cons a bs))
((A A 1 E E Q 2) (cdr/cons a bs))
((A A 1 E E E 1) (cdr/cons a bs))
((A A 1 E) (if-false 't (if (member? a bs) 'nil (set? bs))))
((A A 1 E) (if-nest-E (member? a bs) 'nil (set? bs)))
((A A 1 E) (set?/t bs))
((A A 1) (if-same (member? a bs) 't))
((A A) (equal-same 't))
((A) (if-same (set? bs) 't))
((E)
(if-same (set? bs)
(if (if (set? (add-atoms (cdr a) bs))
(equal (set? (add-atoms (car a) (add-atoms (cdr a) bs))) 't)
't)
(if (if (set? bs) (equal (set? (add-atoms (cdr a) bs)) 't) 't)
(if (set? bs) (equal (set? (add-atoms a bs)) 't) 't)
't)
't)))
((E A A Q) (if-nest-A (set? bs) (equal (set? (add-atoms (cdr a) bs)) 't) 't))
((E A A A) (if-nest-A (set? bs) (equal (set? (add-atoms a bs)) 't) 't))
((E E A Q) (if-nest-E (set? bs) (equal (set? (add-atoms (cdr a) bs)) 't) 't))
((E E A A) (if-nest-E (set? bs) (equal (set? (add-atoms a bs)) 't) 't))
((E E A) (if-same 't 't))
((E E)
(if-same
(if (set? (add-atoms (cdr a) bs))
(equal (set? (add-atoms (car a) (add-atoms (cdr a) bs))) 't)
't)
't))
((E A)
(if-same (set? (add-atoms (cdr a) bs))
(if (if (set? (add-atoms (cdr a) bs))
(equal (set? (add-atoms (car a) (add-atoms (cdr a) bs))) 't)
't)
(if (equal (set? (add-atoms (cdr a) bs)) 't)
(equal (set? (add-atoms a bs)) 't)
't)
't)))
((E A A Q)
(if-nest-A (set? (add-atoms (cdr a) bs))
(equal (set? (add-atoms (car a) (add-atoms (cdr a) bs))) 't)
't))
((E A E Q)
(if-nest-E (set? (add-atoms (cdr a) bs))
(equal (set? (add-atoms (car a) (add-atoms (cdr a) bs))) 't)
't))
((E A E)
(if-true
(if (equal (set? (add-atoms (cdr a) bs)) 't)
(equal (set? (add-atoms a bs)) 't)
't)
't))
((E A A A Q 1) (set?/t (add-atoms (cdr a) bs)))
((E A E Q 1) (set?/nil (add-atoms (cdr a) bs)))
((E A A A Q) (equal 't 't))
((E A E Q) (equal 'nil 't))
((E A A A) (if-true (equal (set? (add-atoms a bs)) 't) 't))
((E A E) (if-false (equal (set? (add-atoms a bs)) 't) 't))
((E A A A 1 1) (add-atoms a bs))
((E A A A 1 1)
(if-nest-E (atom a)
(if (member? a bs) bs (cons a bs))
(add-atoms (car a) (add-atoms (cdr a) bs))))
((E A A A 1) (equal-if (set? (add-atoms (car a) (add-atoms (cdr a) bs))) 't))
((E A A A) (equal-same 't))
((E A A)
(if-same (equal (set? (add-atoms (car a) (add-atoms (cdr a) bs))) 't) 't))
((E A) (if-same (set? (add-atoms (cdr a) bs)) 't))
((E) (if-same (set? bs) 't))
(() (if-same (atom a) 't)))
((dethm set?/atoms (a)
(equal (set? (atoms a)) 't))
nil
((1 1) (atoms a))
(() (if-true (equal (set? (add-atoms a '())) 't) 't))
((Q) (if-true 't (if (member? (car '()) (cdr '())) 'nil (set? (cdr '())))))
((Q Q) (atom '()))
((Q) (set? '()))
((A 1) (set?/add-atoms a '()))
((A) (equal-same 't))
(() (if-same (set? '()) 't))))))
;; Chapter 9
(defun defun.rotate ()
(J-Bob/define (dethm.set?/atoms)
'(((defun rotate (x)
(cons (car (car x)) (cons (cdr (car x)) (cdr x))))
nil))))
(defun dethm.rotate/cons ()
(J-Bob/define (defun.rotate)
'(((dethm rotate/cons (x y z)
(equal (rotate (cons (cons x y) z)) (cons x (cons y z))))
nil
((1) (rotate (cons (cons x y) z)))
((1 1 1) (car/cons (cons x y) z))
((1 1) (car/cons x y))
((1 2 1 1) (car/cons (cons x y) z))
((1 2 1) (cdr/cons x y))
((1 2 2) (cdr/cons (cons x y) z))
(() (equal-same (cons x (cons y z))))))))
(defun defun.align.attempt ()
(J-Bob/prove (dethm.rotate/cons)
'(((defun align (x)
(if (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
(size x)
((Q) (natp/size x))
(()
(if-true
(if (atom x)
't
(if (atom (car x))
(< (size (cdr x)) (size x))
(< (size (rotate x)) (size x))))
'nil))
((E A) (size/cdr x))
((E E 1 1 1) (cons/car+cdr x))
((E E 2 1) (cons/car+cdr x))
((E E 1 1 1 1) (cons/car+cdr (car x)))
((E E 2 1 1) (cons/car+cdr (car x)))
((E E 1 1) (rotate/cons (car (car x)) (cdr (car x)) (cdr x)))))))
(defun defun.wt ()
(J-Bob/define (dethm.rotate/cons)
'(((defun wt (x)
(if (atom x) '1 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))))
(size x)
((Q) (natp/size x))
(()
(if-true
(if (atom x)
't
(if (< (size (car x)) (size x)) (< (size (cdr x)) (size x)) 'nil))
'nil))
((E Q) (size/car x))
((E A) (size/cdr x))
((E) (if-true 't 'nil))
(() (if-same (atom x) 't))))))
(defun defun.align ()
(J-Bob/define (defun.wt)
'(((dethm natp/wt (x)
(equal (natp (wt x)) 't))
(star-induction x)
((A 1 1) (wt x))
((A 1 1) (if-nest-A (atom x) '1 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))))
((A 1) (natp '1))
((A) (equal-same 't))
((E A A 1 1) (wt x))
((E A A 1 1)
(if-nest-E (atom x) '1 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))))
((E A A)
(if-true (equal (natp (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))) 't) 't))
((E A A Q) (equal-if (natp (wt (car x))) 't))
((E A A A)
(if-true (equal (natp (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))) 't) 't))
((E A A A Q) (natp/+ (wt (car x)) (wt (car x))))
((E A A Q) (equal-if (natp (wt (car x))) 't))
((E A A Q) (equal-if (natp (wt (cdr x))) 't))
((E A A A A 1) (natp/+ (+ (wt (car x)) (wt (car x))) (wt (cdr x))))
((E A A A A) (equal-same 't))
((E A A A) (if-same (natp (+ (wt (car x)) (wt (car x)))) 't))
((E A A) (if-same (natp (wt (cdr x))) 't))
((E A) (if-same (equal (natp (wt (cdr x))) 't) 't))
((E) (if-same (equal (natp (wt (car x))) 't) 't))
(() (if-same (atom x) 't)))
((dethm positive/wt (x)
(equal (< '0 (wt x)) 't))
(star-induction x)
((A 1 2) (wt x))
((A 1 2) (if-nest-A (atom x) '1 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))))
((A 1) (< '0 '1))
((A) (equal-same 't))
((E A A 1 2) (wt x))
((E A A 1 2)
(if-nest-E (atom x) '1 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))))
((E A A)
(if-true (equal (< '0 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))) 't) 't))
((E A A Q) (equal-if (< '0 (wt (car x))) 't))
((E A A A)
(if-true (equal (< '0 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))) 't) 't))
((E A A A Q) (positives-+ (wt (car x)) (wt (car x))))
((E A A Q) (equal-if (< '0 (wt (car x))) 't))
((E A A Q) (equal-if (< '0 (wt (cdr x))) 't))
((E A A A A 1) (positives-+ (+ (wt (car x)) (wt (car x))) (wt (cdr x))))
((E A A A A) (equal-same 't))
((E A A A) (if-same (< '0 (+ (wt (car x)) (wt (car x)))) 't))
((E A A) (if-same (< '0 (wt (cdr x))) 't))
((E A) (if-same (equal (< '0 (wt (cdr x))) 't) 't))
((E) (if-same (equal (< '0 (wt (car x))) 't) 't))
(() (if-same (atom x) 't)))
((defun align (x)
(if (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
(wt x)
((Q) (natp/wt x))
(()
(if-true
(if (atom x)
't
(if (atom (car x)) (< (wt (cdr x)) (wt x)) (< (wt (rotate x)) (wt x))))
'nil))
((E A 2) (wt x))
((E A 2) (if-nest-E (atom x) '1 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))))
((E A)
(if-true (< (wt (cdr x)) (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))) 't))
((E A Q) (natp/wt (cdr x)))
((E A A 1) (identity-+ (wt (cdr x))))
((E A A) (common-addends-< '0 (+ (wt (car x)) (wt (car x))) (wt (cdr x))))
((E A Q) (natp/wt (cdr x)))
((E A Q) (positive/wt (car x)))
((E A A) (positives-+ (wt (car x)) (wt (car x))))
((E A) (if-same (< '0 (wt (car x))) 't))
((E E 1 1) (rotate x))
((E E 1) (wt (cons (car (car x)) (cons (cdr (car x)) (cdr x)))))
((E E 1 Q) (atom/cons (car (car x)) (cons (cdr (car x)) (cdr x))))
((E E 1)
(if-false '1
(+ (+ (wt (car (cons (car (car x)) (cons (cdr (car x)) (cdr x)))))
(wt (car (cons (car (car x)) (cons (cdr (car x)) (cdr x))))))
(wt (cdr (cons (car (car x)) (cons (cdr (car x)) (cdr x))))))))
((E E 1 1 1 1) (car/cons (car (car x)) (cons (cdr (car x)) (cdr x))))
((E E 1 1 2 1) (car/cons (car (car x)) (cons (cdr (car x)) (cdr x))))
((E E 1 2 1) (cdr/cons (car (car x)) (cons (cdr (car x)) (cdr x))))
((E E 1 2) (wt (cons (cdr (car x)) (cdr x))))
((E E 1 2 Q) (atom/cons (cdr (car x)) (cdr x)))
((E E 1 2)
(if-false '1
(+ (+ (wt (car (cons (cdr (car x)) (cdr x))))
(wt (car (cons (cdr (car x)) (cdr x)))))
(wt (cdr (cons (cdr (car x)) (cdr x)))))))
((E E 1 2 1 1 1) (car/cons (cdr (car x)) (cdr x)))
((E E 1 2 1 2 1) (car/cons (cdr (car x)) (cdr x)))
((E E 1 2 2 1) (cdr/cons (cdr (car x)) (cdr x)))
((E E 2) (wt x))
((E E 2) (if-nest-E (atom x) '1 (+ (+ (wt (car x)) (wt (car x))) (wt (cdr x)))))
((E E 2 1 1) (wt (car x)))
((E E 2 1 1)
(if-nest-E (atom (car x))
'1
(+ (+ (wt (car (car x))) (wt (car (car x)))) (wt (cdr (car x))))))
((E E 2 1 2) (wt (car x)))
((E E 2 1 2)
(if-nest-E (atom (car x))
'1
(+ (+ (wt (car (car x))) (wt (car (car x)))) (wt (cdr (car x))))))
((E E 1)
(associate-+
(+ (wt (car (car x))) (wt (car (car x))))
(+ (wt (cdr (car x))) (wt (cdr (car x))))
(wt (cdr x))))
((E E)
(common-addends-<
(+ (+ (wt (car (car x))) (wt (car (car x))))
(+ (wt (cdr (car x))) (wt (cdr (car x)))))
(+ (+ (+ (wt (car (car x))) (wt (car (car x)))) (wt (cdr (car x))))
(+ (+ (wt (car (car x))) (wt (car (car x)))) (wt (cdr (car x)))))
(wt (cdr x))))
((E E 1)
(associate-+
(+ (wt (car (car x))) (wt (car (car x))))
(wt (cdr (car x)))
(wt (cdr (car x)))))
((E E 1)
(commute-+
(+ (+ (wt (car (car x))) (wt (car (car x)))) (wt (cdr (car x))))
(wt (cdr (car x)))))
((E E)
(common-addends-<
(wt (cdr (car x)))
(+ (+ (wt (car (car x))) (wt (car (car x)))) (wt (cdr (car x))))
(+ (+ (wt (car (car x))) (wt (car (car x)))) (wt (cdr (car x))))))
((E E)
(if-true
(< (wt (cdr (car x)))
(+ (+ (wt (car (car x))) (wt (car (car x)))) (wt (cdr (car x)))))
't))
((E E Q) (natp/wt (cdr (car x))))
((E E A 1) (identity-+ (wt (cdr (car x)))))
((E E A)
(common-addends-<
'0
(+ (wt (car (car x))) (wt (car (car x))))
(wt (cdr (car x)))))
((E E Q) (natp/wt (cdr (car x))))
((E E Q) (positive/wt (car (car x))))
((E E A) (positives-+ (wt (car (car x))) (wt (car (car x)))))
((E E) (if-same (< '0 (wt (car (car x)))) 't))
((E) (if-same (atom (car x)) 't))
(() (if-same (atom x) 't))))))
(defun dethm.align/align ()
(J-Bob/define (defun.align)
'(((dethm align/align (x)
(equal (align (align x)) (align x)))
(align x)
((A 1 1) (align x))
((A 1 1)
(if-nest-A (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
((A 2) (align x))
((A 2)
(if-nest-A (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
((A 1) (align x))
((A 1)
(if-nest-A (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
((A) (equal-same x))
((E A A 1 1) (align x))
((E A A 1 1)
(if-nest-E (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
((E A A 1 1)
(if-nest-A (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x))))
((E A A 2) (align x))
((E A A 2)
(if-nest-E (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
((E A A 2)
(if-nest-A (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x))))
((E A A 1) (align (cons (car x) (align (cdr x)))))
((E A A 1 Q) (atom/cons (car x) (align (cdr x))))
((E A A 1 E Q 1) (car/cons (car x) (align (cdr x))))
((E A A 1 E A 1) (car/cons (car x) (align (cdr x))))
((E A A 1 E A 2 1) (cdr/cons (car x) (align (cdr x))))
((E A A 1)
(if-false (cons (car x) (align (cdr x)))
(if (atom (car x))
(cons (car x) (align (align (cdr x))))
(align (rotate (cons (car x) (align (cdr x))))))))
((E A A 1)
(if-nest-A (atom (car x))
(cons (car x) (align (align (cdr x))))
(align (rotate (cons (car x) (align (cdr x)))))))
((E A A 1 2) (equal-if (align (align (cdr x))) (align (cdr x))))
((E A A) (equal-same (cons (car x) (align (cdr x)))))
((E A) (if-same (equal (align (align (cdr x))) (align (cdr x))) 't))
((E E A 1 1) (align x))
((E E A 1 1)
(if-nest-E (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
((E E A 1 1)
(if-nest-E (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x))))
((E E A 2) (align x))
((E E A 2)
(if-nest-E (atom x)
x
(if (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x)))))
((E E A 2)
(if-nest-E (atom (car x)) (cons (car x) (align (cdr x))) (align (rotate x))))
((E E A 1) (equal-if (align (align (rotate x))) (align (rotate x))))
((E E A) (equal-same (align (rotate x))))
((E E) (if-same (equal (align (align (rotate x))) (align (rotate x))) 't))
((E) (if-same (atom (car x)) 't))
(() (if-same (atom x) 't))))))
| false |
6af127ba3581ac6ec3408eebfd465ec4e4d886bb | a1791edada0da7a1f0938b433be063ec0fb06475 | /xsmith/private/spec-component-struct.rkt | 11451aaaae6c98b10b4f93052ea9e9bf7be3c551 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | pmatos/xsmith | 2bfae1b4ac493e9fc684a398c2daf22fa390bcb0 | 6786830221aab31d2ab12edcba03448c54c2acf6 | refs/heads/master | 2022-12-28T13:46:26.698237 | 2020-10-05T17:40:21 | 2020-10-05T17:40:21 | 303,690,503 | 5 | 1 | null | null | null | null | UTF-8 | Racket | false | false | 3,078 | rkt | spec-component-struct.rkt | #lang clotho/racket/base
;; -*- mode: Racket -*-
;;
;; Copyright (c) 2017-2020 The University of Utah
;; All rights reserved.
;;
;; This file is part of Xsmith, a generator of highly effective fuzz testers.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are met:
;;
;; * Redistributions of source code must retain the above copyright notice,
;; this list of conditions and the following disclaimer.
;;
;; * 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.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(provide
(struct-out spec-component-struct)
set-spec-component-struct-grammar-info
set-spec-component-struct-attribute-info
set-spec-component-struct-choice-method-info
set-spec-component-struct-property-info
set-spec-component-struct-refiner-info
spec-component
spec-component-struct-ref
spec-component-struct-ref-ref
)
(require syntax/parse)
(struct spec-component-struct
(grammar-info attribute-info choice-method-info property-info refiner-info)
#:transparent
)
(define (set-spec-component-struct-grammar-info s v)
(struct-copy spec-component-struct s
[grammar-info v]))
(define (set-spec-component-struct-attribute-info s v)
(struct-copy spec-component-struct s
[attribute-info v]))
(define (set-spec-component-struct-choice-method-info s v)
(struct-copy spec-component-struct s
[choice-method-info v]))
(define (set-spec-component-struct-property-info s v)
(struct-copy spec-component-struct s
[property-info v]))
(define (set-spec-component-struct-refiner-info s v)
(struct-copy spec-component-struct s
[refiner-info v]))
(struct spec-component-struct-ref (ref))
(define-syntax-class spec-component
(pattern component-name:id
#:when (let ([slv (syntax-local-value #'component-name (λ () #f))])
(spec-component-struct-ref? slv))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; End of file.
| true |
db74766f1b1413898122523f4a8826d0f21a19ad | 537789710941e25231118476eb2c56ae0b745307 | /ssh/digitama/assignment/disconnection.rkt | 3fc4b6b85c37632de3bd4e21594888bf3d3ae1df | [] | no_license | wargrey/lambda-shell | 33d6df40baecdbbd32050d51c0b4d718e96094a9 | ce1feb24abb102dc74f98154ec2a92a3cd02a17e | refs/heads/master | 2023-08-16T22:44:29.151325 | 2023-08-11T05:34:08 | 2023-08-11T05:34:08 | 138,468,042 | 0 | 1 | null | null | null | null | UTF-8 | Racket | false | false | 1,284 | rkt | disconnection.rkt | #lang typed/racket/base
(provide (all-defined-out))
(require "../assignment.rkt")
; Symbols in [0xFE000000, 0xFFFFFFFF] are left for private use.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-ssh-symbols SSH-Disconnection-Reason #:as Index
; https://tools.ietf.org/html/rfc4250#section-4.2.2
([SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT 1]
[SSH_DISCONNECT_PROTOCOL_ERROR 2]
[SSH_DISCONNECT_KEY_EXCHANGE_FAILED 3]
[SSH_DISCONNECT_RESERVED 4]
[SSH_DISCONNECT_MAC_ERROR 5]
[SSH_DISCONNECT_COMPRESSION_ERROR 6]
[SSH_DISCONNECT_SERVICE_NOT_AVAILABLE 7]
[SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED 8]
[SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE 9]
[SSH_DISCONNECT_CONNECTION_LOST 10]
[SSH_DISCONNECT_BY_APPLICATION 11]
[SSH_DISCONNECT_TOO_MANY_CONNECTIONS 12]
[SSH_DISCONNECT_AUTH_CANCELLED_BY_USER 13]
[SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE 14]
[SSH_DISCONNECT_ILLEGAL_USER_NAME 15])
#:fallback SSH-DISCONNECT-RESERVED)
| false |
4b58a7704e42170d514a74f4c3295a2c8089d919 | e4d80c9d469c9ca9ea464a4ad213585a578d42bc | /lessons/Intro-to-Programming/exercises/coe-code-matching1.scrbl | aa1b7807b46e2d68c40931906c68a4542983fcd5 | [] | no_license | garciazz/curr | 0244b95086b0a34d78f720e9cae1cb0fdb686ec5 | 589a93c4a43967b06d7a6ab9d476b470366f9323 | refs/heads/master | 2021-01-17T19:14:21.756115 | 2016-02-24T22:16:26 | 2016-02-24T22:16:26 | 53,657,555 | 1 | 0 | null | 2016-03-11T09:58:01 | 2016-03-11T09:58:01 | null | UTF-8 | Racket | false | false | 1,072 | scrbl | coe-code-matching1.scrbl | #lang curr/lib
@(define exprs '((* (- 4 24) (+ 13 25))
(- (- 14 13) 14)
(* (- 6 16) 14)
(* 16 (- 14 6))
(+ (- 8 11) 5)
(- (+ 8 11) 5)
(* (+ 19 20) (- (+ 12 10) 22))
))
@(define permuted-exprs
'((- (+ 8 11) 5)
(- (- 14 13) 14)
(* 16 (- 14 6))
(* (- 6 16) 14)
(+ (- 8 11) 5)
(* (- 4 24) (+ 13 25))
(* (+ 19 20) (- (+ 12 10) 22))
))
@(define expr-coes (map sexp->coe exprs))
@(exercise-handout
#:title "Matching Circles of Evaluation and Code"
#:instr "Draw a line from each Circle of Evaluation on the left to the corresponding code on the right."
#:forevidence (exercise-evid-tags "BS-CE&1&4")
@(matching-exercise expr-coes (map sexp->code permuted-exprs))
@(exercise-answers
(matching-exercise-answers #:compare-with equal?
#:content-of-ans exprs
expr-coes (map sexp->code exprs) permuted-exprs))
)
| false |
c36544b07589c6d5ab6ddfe7a60445b37fdc268d | bc38b888675e831a3ec99268be7f5f90a3b5ac9a | /fontland/table/prep.rkt | f032422f8b7f757d0cfc67dd616dce5ac52be244 | [
"MIT"
] | permissive | mbutterick/fontland | c3dd739a5c36730edeca3838225dc8a0c285051b | 1c1d7db48f2637f7a226435c4fef39a7037204b7 | refs/heads/master | 2022-02-03T19:48:29.543945 | 2022-01-08T15:58:14 | 2022-01-08T15:58:14 | 157,796,528 | 12 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,218 | rkt | prep.rkt | #lang racket/base
(require sugar/unstable/dict xenomorph)
(provide prep)
#|
approximates
https://github.com/mbutterick/fontkit/blob/master/src/tables/prep.js
|#
(define prep (x:struct 'controlValueProgram (x:array #:type uint8)))
(module+ test
(require rackunit racket/dict racket/serialize "../helper.rkt")
(define ip (open-input-file charter-path))
(define dir (deserialize (read (open-input-file charter-directory-path))))
(define offset (hash-ref (hash-ref (hash-ref dir 'tables) 'prep) 'offset))
(define len (hash-ref (hash-ref (hash-ref dir 'tables) 'prep) 'length))
(check-equal? offset 4512)
(check-equal? len 78)
(file-position ip 0)
(define table-bytes #"\270\0\0+\0\272\0\1\0\1\0\2+\1\272\0\2\0\1\0\2+\1\277\0\2\0C\0007\0+\0\37\0\23\0\0\0\b+\0\277\0\1\0\200\0i\0R\0;\0#\0\0\0\b+\0\272\0\3\0\5\0\a+\270\0\0 E}i\30D")
(check-equal? table-bytes (peek-bytes len offset ip))
(define ds (open-input-bytes (peek-bytes len offset ip)))
(check-equal? (dict-ref (decode prep ds) 'controlValueProgram) '(184 0 0 43 0 186 0 1 0 1 0 2 43 1 186 0 2 0 1 0 2 43 1 191 0 2 0 67 0 55 0 43 0 31 0 19 0 0 0 8 43 0 191 0 1 0 128 0 105 0 82 0 59 0 35 0 0 0 8 43 0 186 0 3 0 5 0 7 43 184 0 0 32 69 125 105 24 68)))
| false |
2c3d809c8c3291a7f2099fdff98efff7a53b414a | ec65ae8f1c9326112386326bd6aa1eb5ebfad708 | /parsack-test/parsack/examples/csv-parser-basic.rkt | fadff8e4b291fb2ee42af6c841fa1e39aa05b886 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | stchang/parsack | 84d3b90a17b51c8dc507efa865a481c6b21e5b66 | 57b21873e8e3eb7ffbdfa253251c3c27a66723b1 | refs/heads/master | 2022-12-12T02:47:51.709492 | 2022-07-11T00:48:34 | 2022-07-12T15:56:35 | 11,594,281 | 44 | 9 | MIT | 2022-12-03T03:52:37 | 2013-07-22T22:46:20 | Racket | UTF-8 | Racket | false | false | 986 | rkt | csv-parser-basic.rkt | #lang racket
(require parsack)
(provide (all-defined-out))
;; csv parser using basic combinators (ie not sepBy)
;; - does not support quoted cells
;; many1 means cells cannot be empty
(define $cellContent (many (noneOf ",\n\r")))
(define $remainingCells
(<or> (>>= (char #\,) (λ _ $cells))
(return null)))
(define $cells
(parser-cons $cellContent $remainingCells)
#;(parser-compose (x <- $cellContent )
(xs <- $remainingCells)
(return (cons x xs))))
;; a line must end in \n
(define $line
(parser-one (~> $cells) $eol) ; deliberately not using endBy
#;(parser-compose (res <- $cells) $eol (return res)))
;; result is list of list of chars
(define $csv
(parser-one (~> (many $line)) $eof)
#;(>>= (many1 line) (λ (result) (>>= (char #\null) (λ _ (return result)))))
#;(parser-compose (res <- (many $line)) $eof (return res)))
;; csvFile : Path -> Parse Result
(define (csvFile filename)
(parse $csv filename))
| false |
da34ce18acc7bc1226a8106eac373c007212ba4e | ef61a036fd7e4220dc71860053e6625cf1496b1f | /algorithms/intermediate/006/pig-latin.rkt | 452f744d2c40a42ed87d296ed386a62b537d085c | [] | no_license | lgwarda/racket-stuff | adb934d90858fa05f72d41c29cc66012e275931c | 936811af04e679d7fefddc0ef04c5336578d1c29 | refs/heads/master | 2023-01-28T15:58:04.479919 | 2020-12-09T10:36:02 | 2020-12-09T10:36:02 | 249,515,050 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 2,355 | rkt | pig-latin.rkt | #lang racket
; String -> String
; translates the given str from English to Pig Latin
(define (pig-latin str)
(cond [(starts-vowel? str) (vowel-rule str)]
[(not (has-vowel? str)) (string-append str "ay")]
[else (consonant-rule str)]))
; String -> Boolean
; produces #t if the give string begin with vowel
(define (starts-vowel? str)
(or (string-prefix? str "a")
(string-prefix? str "e")
(string-prefix? str "i")
(string-prefix? str "o")
(string-prefix? str "u")))
; String -> String
; conacatinates "way" to the end of the given str
(define (vowel-rule str)
(string-append str "way"))
; String -> Boolean
(define (has-vowel? str)
(or (string-contains? str "a")
(string-contains? str "e")
(string-contains? str "i")
(string-contains? str "o")
(string-contains? str "u")))
; String -> String
; conacatinates first character of the given str and suffix "ay" to the str
(define (consonant-rule str)
(letrec [(f (lambda (str)
(if (starts-vowel? str)
(string-append str "ay")
(f (string-append (substring str 1)
(substring str 0 1))))))]
(f str)))
;
;
;
;
;
; ;;;;;;;;;
; ; ; ; ;
; ; ;
; ; ;;; ;;; ;;;;; ;;; ;
; ; ; ; ; ; ; ; ; ;
; ; ;;;;; ; ; ;
; ; ; ;; ; ;;
; ; ; ; ; ; ; ;
; ; ;; ; ; ; ; ; ; ;
; ;;; ;;;; ;;;; ;;;; ;;;; ;
;
;
;
;
(pig-latin "california") ;"aliforniacay"
(pig-latin "paragraphs") ;"aragraphspay"
(pig-latin "glove") ;"oveglay"
(pig-latin "eight") ;"eightway"
(pig-latin "algorithm") ;"algorithmway"
(pig-latin "schwartz") ; "artzschway"
(pig-latin "rythm") ; "rythmwy"
(pig-latin "tryptyk") ; "tryptykay"
| false |
c48c5abd47cf39107434fa4a49901ed93da1954e | 821e50b7be0fc55b51f48ea3a153ada94ba01680 | /project-euler/27.rkt | f1298c1e4ab63a0c8a447ce64d543f5fd33d1b11 | [] | no_license | LeifAndersen/experimental-methods-in-pl | 85ee95c81c2e712ed80789d416f96d3cfe964588 | cf2aef11b2590c4deffb321d10d31f212afd5f68 | refs/heads/master | 2016-09-06T05:22:43.353721 | 2015-01-12T18:19:18 | 2015-01-12T18:19:18 | 24,478,292 | 1 | 0 | null | 2014-12-06T20:53:40 | 2014-09-25T23:00:59 | Racket | UTF-8 | Racket | false | false | 6,531 | rkt | 27.rkt | #lang racket/base
(require racket/contract
racket/set
racket/list)
;; n^2 + n + 41 gives 40 consecutive primes starting at zero
;; find the coefficients a,b (in range -1000, 1000) such that
;; n^2 + an + b produces the most consecutive primes starting from n=0
(define primes (list->set (list 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 509 521 523 541 547 557 563 569 571 577 587 593 599 601 607 613 617 619 631 641 643 647 653 659 661 673 677 683 691 701 709 719 727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 839 853 857 859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991 997 1009 1013 1019 1021 1031 1033 1039 1049 1051 1061 1063 1069 1087 1091 1093 1097 1103 1109 1117 1123 1129 1151 1153 1163 1171 1181 1187 1193 1201 1213 1217 1223 1229 1231 1237 1249 1259 1277 1279 1283 1289 1291 1297 1301 1303 1307 1319 1321 1327 1361 1367 1373 1381 1399 1409 1423 1427 1429 1433 1439 1447 1451 1453 1459 1471 1481 1483 1487 1489 1493 1499 1511 1523 1531 1543 1549 1553 1559 1567 1571 1579 1583 1597 1601 1607 1609 1613 1619 1621 1627 1637 1657 1663 1667 1669 1693 1697 1699 1709 1721 1723 1733 1741 1747 1753 1759 1777 1783 1787 1789 1801 1811 1823 1831 1847 1861 1867 1871 1873 1877 1879 1889 1901 1907 1913 1931 1933 1949 1951 1973 1979 1987 1993 1997 1999 2003 2011 2017 2027 2029 2039 2053 2063 2069 2081 2083 2087 2089 2099 2111 2113 2129 2131 2137 2141 2143 2153 2161 2179 2203 2207 2213 2221 2237 2239 2243 2251 2267 2269 2273 2281 2287 2293 2297 2309 2311 2333 2339 2341 2347 2351 2357 2371 2377 2381 2383 2389 2393 2399 2411 2417 2423 2437 2441 2447 2459 2467 2473 2477 2503 2521 2531 2539 2543 2549 2551 2557 2579 2591 2593 2609 2617 2621 2633 2647 2657 2659 2663 2671 2677 2683 2687 2689 2693 2699 2707 2711 2713 2719 2729 2731 2741 2749 2753 2767 2777 2789 2791 2797 2801 2803 2819 2833 2837 2843 2851 2857 2861 2879 2887 2897 2903 2909 2917 2927 2939 2953 2957 2963 2969 2971 2999 3001 3011 3019 3023 3037 3041 3049 3061 3067 3079 3083 3089 3109 3119 3121 3137 3163 3167 3169 3181 3187 3191 3203 3209 3217 3221 3229 3251 3253 3257 3259 3271 3299 3301 3307 3313 3319 3323 3329 3331 3343 3347 3359 3361 3371 3373 3389 3391 3407 3413 3433 3449 3457 3461 3463 3467 3469 3491 3499 3511 3517 3527 3529 3533 3539 3541 3547 3557 3559 3571 3581 3583 3593 3607 3613 3617 3623 3631 3637 3643 3659 3671 3673 3677 3691 3697 3701 3709 3719 3727 3733 3739 3761 3767 3769 3779 3793 3797 3803 3821 3823 3833 3847 3851 3853 3863 3877 3881 3889 3907 3911 3917 3919 3923 3929 3931 3943 3947 3967 3989 4001 4003 4007 4013 4019 4021 4027 4049 4051 4057 4073 4079 4091 4093 4099 4111 4127 4129 4133 4139 4153 4157 4159 4177 4201 4211 4217 4219 4229 4231 4241 4243 4253 4259 4261 4271 4273 4283 4289 4297 4327 4337 4339 4349 4357 4363 4373 4391 4397 4409 4421 4423 4441 4447 4451 4457 4463 4481 4483 4493 4507 4513 4517 4519 4523 4547 4549 4561 4567 4583 4591 4597 4603 4621 4637 4639 4643 4649 4651 4657 4663 4673 4679 4691 4703 4721 4723 4729 4733 4751 4759 4783 4787 4789 4793 4799 4801 4813 4817 4831 4861 4871 4877 4889 4903 4909 4919 4931 4933 4937 4943 4951 4957 4967 4969 4973 4987 4993 4999 5003 5009 5011 5021 5023 5039 5051 5059 5077 5081 5087 5099 5101 5107 5113 5119 5147 5153 5167 5171 5179 5189 5197 5209 5227 5231 5233 5237 5261 5273 5279 5281 5297 5303 5309 5323 5333 5347 5351 5381 5387 5393 5399 5407 5413 5417 5419 5431 5437 5441 5443 5449 5471 5477 5479 5483 5501 5503 5507 5519 5521 5527 5531 5557 5563 5569 5573 5581 5591 5623 5639 5641 5647 5651 5653 5657 5659 5669 5683 5689 5693 5701 5711 5717 5737 5741 5743 5749 5779 5783 5791 5801 5807 5813 5821 5827 5839 5843 5849 5851 5857 5861 5867 5869 5879 5881 5897 5903 5923 5927 5939 5953 5981 5987 6007 6011 6029 6037 6043 6047 6053 6067 6073 6079 6089 6091 6101 6113 6121 6131 6133 6143 6151 6163 6173 6197 6199 6203 6211 6217 6221 6229 6247 6257 6263 6269 6271 6277 6287 6299 6301 6311 6317 6323 6329 6337 6343 6353 6359 6361 6367 6373 6379 6389 6397 6421 6427 6449 6451 6469 6473 6481 6491 6521 6529 6547 6551 6553 6563 6569 6571 6577 6581 6599 6607 6619 6637 6653 6659 6661 6673 6679 6689 6691 6701 6703 6709 6719 6733 6737 6761 6763 6779 6781 6791 6793 6803 6823 6827 6829 6833 6841 6857 6863 6869 6871 6883 6899 6907 6911 6917 6947 6949 6959 6961 6967 6971 6977 6983 6991 6997 7001 7013 7019 7027 7039 7043 7057 7069 7079 7103 7109 7121 7127 7129 7151 7159 7177 7187 7193 7207 7211 7213 7219 7229 7237 7243 7247 7253 7283 7297 7307 7309 7321 7331 7333 7349 7351 7369 7393 7411)))
;; all the possible a,b choices
(define/contract (all-coefficients lo hi)
(-> integer? integer? (listof (cons/c integer? integer?)))
(for*/list ([a (in-range lo (add1 hi))]
[b (in-range lo (add1 hi))])
(cons a b)))
;; #t if n is a prime number
(define/contract (is-prime? n)
(-> integer? boolean?)
(set-member? primes n))
;; count the number of consecutively-generated primes
(define/contract (count-primes-aux f acc n)
(-> (-> integer? integer?) integer? integer? integer?)
(if (is-prime? (f n))
(count-primes-aux f (add1 acc) (add1 n))
acc))
;; Set up polynomial, start counting consecutive primes
(define/contract (count-primes pair)
(-> (cons/c integer? integer?) exact-nonnegative-integer?)
;; \ n . n^2 + an + b
(define/contract (gen-num n)
(-> integer? integer?)
(+ (* n n) (* (car pair) n) (cdr pair)))
(count-primes-aux gen-num 0 0))
;; find the number of primes generated by each coefficient pair
(define/contract (check-all best-pair max-primes coefficients)
(-> (cons/c integer? integer?) integer? (listof (cons/c integer? integer?)) (cons/c integer? integer?))
(cond [(empty? coefficients) best-pair]
[else (let* ([curr-pair (car coefficients)]
[num-primes (count-primes curr-pair)]
[update? (> num-primes max-primes)])
(check-all (if update? curr-pair best-pair)
(if update? num-primes max-primes)
(cdr coefficients)))]))
;; check all coefficients in range
(define/contract (main)
(-> (cons/c integer? integer?))
(check-all (cons 0 0) 0 (all-coefficients -1000 1000)))
(time (begin (main) (void)))
| false |
b917018650c5e6721af5369b7d98f75880161ce9 | 5bbc152058cea0c50b84216be04650fa8837a94b | /paper/popl-2016/intro.scrbl | d1a7454a95d4c65ec8f095c0fc0d2ccb11f3df30 | [] | no_license | nuprl/gradual-typing-performance | 2abd696cc90b05f19ee0432fb47ca7fab4b65808 | 35442b3221299a9cadba6810573007736b0d65d4 | refs/heads/master | 2021-01-18T15:10:01.739413 | 2018-12-15T18:44:28 | 2018-12-15T18:44:28 | 27,730,565 | 11 | 3 | null | 2018-12-01T13:54:08 | 2014-12-08T19:15:22 | Racket | UTF-8 | Racket | false | false | 5,909 | scrbl | intro.scrbl | #lang scribble/base
@require["common.rkt"]
@title[#:tag "sec:intro"]{Gradual Typing and Performance}
Over the past couple of decades dynamically-typed languages have become a
staple of the software engineering world. Programmers use these languages
to build all kinds of software systems. In many cases, the systems start
as innocent prototypes. Soon enough, though, they grow into complex,
multi-module programs, at which point the engineers realize that they are
facing a maintenance nightmare, mostly due to the lack of reliable type
information.
Gradual typing@~cite[st-sfp-2006 thf-dls-2006] proposes a language-based
solution to this pressing software engineering problem. The idea is to
extend the language so that programmers can incrementally equip programs
with types. In contrast to optional typing,
gradual typing provide programmers with soundness guarantees.
Realizing type soundness in this world requires run-time checks that watch
out for potential impedance mismatches between the typed and untyped
portions of the programs. The granularity of these checks determine
the peformance overhead of gradual typing. To reduce the frequency of
checks, @emph{macro-level} gradual typing forces programmers to annotate entire
modules with types and relies on behavioral contracts@~cite[ff-icfp-2002]
between typed and untyped modules to enforce soundness.
In contrast, @emph{micro-level} gradual
typing instead assigns an implicit type @tt{Dyn}@~cite[TypeDynamic] to all
unannotated parts of a program; type annotations can then be added to any
declaration. The implementation must insert casts at the
appropriate points in the code. Different language designs use slightly
different semantics with different associated costs and limitations.
Both approaches to gradual typing come with two implicit claims. First, the
type systems accommodate common untyped programming idioms. This allows
programmers to add types with minimal changes to existing
code. Second, the cost of soundness is tolerable, meaning programs remain
performant even as programmers add type annotations. Ideally, types should
improve performance as they provide invariants that an optimizing compiler
can leverage. While almost every publication on
@; The whole point of the Thorn/StrongScript design is to tackle that second
@; claim. This done by adding restricitions (e.g. nominal...) but we definitely
@; have no allocation of wrappers. Tests boil down to constant time checks.
gradual typing validates some version of the first claim, no projects
tackle the second claim systematically. Most publications come with qualified remarks about the
performance of partially typed programs. Some plainly admit that such mixed
programs may suffer performance degradations of up to two orders of magnitude
@~cite[vksb-dls-2014 rsfbv-popl-2015 tfdffthf-ecoop-2015].
This paper presents a single result: a method for systematically evaluating the
performance of a gradual type system. It is illustrated with an application
to Typed Racket, a mature implementation of
macro-level gradual typing. We find that Typed Racket's cost of soundness is @emph{not}
tolerable. If applying our method to other gradual
type system implementations yields similar results, then sound gradual typing is dead.
The insight behind the method is that to
understand the performance of a gradual type system, it is necessary to
simulate how a maintenance programmer chooses to add types to an existing
software system. For practical reasons, such as limited developer resources or access to source
code, it may be possible to add types to only a part of the system.
Our method must therefore simulate all possibilities.
Thus, applying our method to Typed Racket requires annotating
all @exact{$n$} modules with types. The resulting collection of @exact{$2
\cdot n$} modules is then used to create @exact{$2^n$}
configurations. The collection of these configurations forms a complete
lattice with the untyped configuration at the bottom and the fully typed one
at the top. The points in between represent configurations in which some
modules are typed and others are untyped. Adding types to an untyped module
in one of these configurations yields a configuration at the next level of
the lattice. In short, the lattice mimics all possible choices of single-module
type conversions a programmer faces when a maintenance task comes up.
A performance evaluation of a system for gradual typing must time these
configurations of a benchmark and extract information from these
timings. Section@secref{sec:fwk} introduces the evaluation method in
detail, including the information we retrieve from the lattices and how we
parameterize these retrievals. The timings may answer basic questions
such as how many of these configurations could be deployed without
degrading performance too much.
We apply our method to Typed Racket, the gradually typed sister language of
Racket. With nine years of development, Typed Racket is the oldest and
probably most sophisticated implementation of gradual typing.
Furthermore, Typed Racket has also acquired a fair number of users, which
suggests adequate performance for these commercial and open source
communities. The chosen benchmark programs originate from these
communities and range from 150 to 7,500 lines of code. @Secref{sec:bm}
presents these benchmarks in detail.
Section@secref{sec:tr} presents the results from running all configurations
of the Typed Racket benchmarks according to the metrics spelled out in
section@secref{sec:fwk}. We interpret the ramifications of these rather
negative results in section@secref{sec:death} and discuss the threats to
validity of these conclusions. The section also includes our report on a
preliminary investigation into the possible causes of the slowdowns in our
benchmark configurations.
| false |
1ea3bd1bcd7da194d6a088051e8514134704e6ad | cce7569795ef6aa32f0ed1d1a5f0798d41f734d4 | /underconstruction/13-macros.scrbl | b9329fe271889de8d606269093425dcbf5a052c6 | [] | no_license | klauso/KdP2012 | 09ab42ceb0e89881ebfccc1e8daf1f1e715695c3 | c0d0c34d3a7816c6aeb93d29d09822b151f44b86 | refs/heads/master | 2020-04-25T11:35:10.526171 | 2012-07-12T07:41:03 | 2012-07-12T07:41:03 | 3,492,527 | 1 | 0 | null | null | 2012-02-20T10:02:45 | Racket | UTF-8 | Racket | false | false | 57,775 | scrbl | 13-macros.scrbl | #lang scribble/manual
@(require scriblib/footnote)
@(require "scribbleUtilities.rkt")
@title[#:version ""]{Pattern Macroing}
So far, you have "penned your thoughts within nests of parentheses", and
perhaps @emph{Lots of Irritating Superflous Parentheses} @note{"We toast the
Lisp programmer who pens his thoughts within nests of parentheses.", Alan J.
Perlis,
@hyperlink["http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-5.html#%_chap_Temp_2"]{Foreword}
of @hyperlink["http://mitpress.mit.edu/sicp/"]{Structure and Interpretations
of Computer Programs}. @(linebreak) @(linebreak) "Lots of Irritating
Superflous Parentheses", a wild nickname for LISP which actually abbreviates
@emph{LISt Processing},
@hyperlink["http://www.catb.org/~esr/jargon/html/L/LISP.html"]{The Jargon
File-LISP}}. The essense of the Racket syntax is that every compound
expression should be enclosed by a pair of parentheses @litchar{(}
@litchar{)}. Not many people have a sense of the simplicity of this uniform
syntax. In one way, the syntax indeed looks confusing. Not everything
appearing in the operator position is a function. Instead it may be one of
the so-called @emph{syntactic keywords}, such as @racket[lambda], @racket[if],
@racket[let], @racket[cond], @racket[and], @racket[or], and so on. Moreover,
it seems some identifiers like @racket[and] and @racket[or] should designate
functions but somehow do not. All these mysteries will be dispelled in this
lecture. In particular, we will introduce to you another abstraction
mechanism, macros. In contrast to functions which abstract over
@emph{computations}, macros abstract over @emph{code} that @emph{describes}
some computations. This new abstraction mechanism allows us to avoid code
repetition, to abbreviate common coding patterns @note{@(linebreak) Be aware
that "pattern" here has little to with @emph{data structures}. If it does
with any structure, then say, @emph{code structure}.}, and to extend the
language with customized (but compatible) syntax. All these possibilities
make the language and eventually ourselves more expressive, since we can write
@emph{less} but say @emph{more}. Unfortunately, those people who failed to
sense the simplicity of the uniform syntax usually cannot also appreciate the
power of macros. In a large degree, the extremely regular syntax facilitates
the work of macros, that is, manipulating @emph{code}, though @emph{as data}.
@section{Code and Data}
A program is composed of code and data. Code @emph{expresses how} to compute.
Data @emph{expresses what} to compute. For example, code @racket[(define (inc
x) (+ x 1))] expresses a function definition, and @racket[(inc 2)] expresses a
function application; data @racket[3] expresses a number, and @racket[(list 1
2 3)] expresses a list of three numbers. Racket, as with other Lisp-family
languages, are expressions-oriented. Thus both code and data are expressions.
Many languages maintain a clear distinction between code and data in syntax.
Racket, and its Lisp relatives, blur the boundaries between the two so that
all expressions are written in a uniform syntax. Expressions "in this
uniform" are called @emph{s-expressions}.
@subsection{S-expressions}
The name "s-expression" stands for @emph{symbolic expression} for some
historical reasons. It was invented in the birth of the Lisp programming
language. Originally it was used only as a notation for data. Later it was
also adopted for code. Since then, the Lisp-family languages maintain this
tradition of using the same notation for both code and data. An s-expression
is defined @emph{inductively} (or @emph{recursively}) as
@itemlist[#:style 'ordered
@item{a literal: @racket[true], @racket[false], @racket[0], @racket[1],
@racket[0.618], @racket[3.14], @racket["hello"], @racket["world"], ...,
or}
@item{an identifier: @racket[define], @racket[if], @racket[struct],
@racket[+], @racket[empty], @racket[cons], @racket[posn],
@racket[posn-x], @racket[double], @racket[iamavariable], ..., or}
@item{the terminator: @litchar{()}, or}
@item{a juxtaposition of two s-expressions, enclosed by parentheses
@litchar{(} @litchar{)} and separated by a dot @litchar{.}: @litchar{(0
. false)}, @litchar{(1 . (2 . 3))}, @litchar{((1 . 2) . 3)},
@litchar{(+ . (1 . (2 . 3)))}, @racket[(* . ((+ . (1 . (2 . ()))) . ((-
. (5 . (1 . ()))) . ())))], ...}
]
The first three forms of s-expressions are said to be @emph{atomic}, the last
form be @emph{compound}. This compound form of s-expression is traditionally
called a pair. But to not confuse with the pair data structure, we will
called it s-pair. Note that in an s-pair, the dot @litchar{.} is
non-assocciative. Thus @litchar{(1 . (2 . 3))} and @litchar{((1 . 2) . 3)}
are different s-expressions. It turns out that if we stick to the dotted
notation, we will soon be overwhelmed by the dots and parentheses. To
overcome this verbosity, a right-deviating abbreviation for the dotted
notation is allowed, for example, @litchar{(1 . (2 . 3))} can be abbreviated
as @litchar{(1 2 . 3)}, and similarly @litchar{(+ . (1 . (2 . 3)))} as
@litchar{(+ 1 2 . 3)}, @litchar{(* . ((+ . (1 . (2 . ()))) . ((- . (5 . (1 .
()))) . ())))} as @litchar{(* (+ 1 2 . ()) (- 5 1 . ()) . ())}. This last
example shows that we can build very complex s-expressions by nesting. In
particular, if the rightmost element of such a nesting, in other words the
most deeply nested element, is @litchar{()}, @litchar{()} itself and the dot
@litchar{.} preceeding it can be completely omitted, so the last example can
be further abbreviated as simply @racket[(* (+ 1 2) (- 5 1))]. This
maximally abbreviated form of s-expression is traditionally called list. But
to not confuse with the list data structure, we will call it s-list.
@litchar{()} is used as an end marker, terminating an s-list, thus its name.
Traditionally it is called nil or NIL. s-lists are what we write most.
Actually, if you type directly in a Racket interactive session any of these
s-expressions invovling dots and parentheses you have seen so far, except
@litchar{(* . ((+ . (1 . (2 . ()))) . ((- . (5 . (1 . ()))) . ())))},
@litchar{(* (+ 1 2 . ()) (- 5 1 . ()) . ())} and @racket[(* (+ 1 2) (- 5
1))], and ask Racket to evaluate it, you will surprisingly get a syntax error.
@eg[
(1 . (2 . 3))
]
@eg[
((1 . 2) . 3)
]
@eg[
(+ 1 2 . 3)
]
@eg[
(* . ((+ . (1 . (2 . ()))) . ((- . (5 . (1 . ()))) . ())))
]
@eg[
(* (+ 1 2 . ()) (- 5 1 . ()) . ())
]
@eg[
(* (+ 1 2) (- 5 1))
]
It suggests that Racket accepts only a subset of compound s-expressions,
namely, those that always end up with the terminator @litchar{()} in the
deepest position of a nesting. They form one part of the syntax of Racket
@emph{expressions}. Those atomic s-expressions, except @litchar{()} form the
other part. The status of @litchar{()} is rather embarrassing. On one hand,
it enables further abbreviation of notation. On the other hand, it is not
accepted as a valid Racket expression.
@eg[
()
]
Now you see no matter it is code like @racket[(define (inc x) (+ x 1))] and
@racket[(inc 2)], or data like @racket[3] and @racket[(list 1 2 3)], both code
and data are written in a uniform syntax, that is, an abbreviated
s-expresssion syntax. Should this uniformity only lie on the surface syntax,
it would be rather shallow. Nevertheless it turns out that this seeming
superficial uniformity is actually a reflection of that inside the language
processor. It is this latter uniformity that enables code to be manipulated
as data.
@subsection{Code as Data}
A language processor does not directly manipulate code and data, i.e.,
expressions. We, programmers do---we type in them, delete them, copy and
paste them in our favorite text editors. Instead, a language processor
manipulates the @emph{internalization} of code and data. Thus code and data
must first be @emph{internalized}. @note{Internalization is usually done by a
@emph{reader} or @emph{parser}.}
We mentioned earlier that in Lisp-family languages, code and data are in the
s-expression uniform. One even special feature of these languages is that
after internalization, code and data are still in uniform, no longer of
s-expression but with almost isomorphic structure. More precisely, code
resides in the language processor in the form of the internalization of one
primitive data. This primitive data are supported by all Lisp-family
languages. It represents a @emph{pair}. A pair is internalized as two
@racket[cons]-cells, with each cell holding one component of the pair. The
name comes from @racket[cons], the primitive operation to @emph{cons}truct a
pair. The other two primitive operations are @racket[car] and @racket[cdr].
@note{@hyperlink["http://en.wikipedia.org/wiki/Car_and_cdr"]{@racket[car] and
@racket[cdr]} are historical names.} They are accessor functions that extract
respectively the first and second component of a pair.
@eg[
(cons 1 (cons 2 3))
]
@eg[
(car (cons 1 (cons 2 3)))
]
@eg[
(cdr (cons 1 (cons 2 3)))
]
Thus code are internalized as @racket[cons]-cells, in fact, @racket[cons]-cells
ended by the internalization of the terminator @litchar{()}.
@racket[cons]-cells of this kind is actually the internalization of data that
represents a list. Nevertheless, code is code, it expresses some computation.
When Racket sees code, it will always try to perform the computation the code
describes, and deliver the result of the computation back to you.
@eg[
(+ 1 2 3)
]
@eg[
(list (+ 0 1) (+ 1 1) (+ 1 2))
]
You see when you write an expression like these, Racket see them as code.
Note in the second example, what you get as result is indeed data
(representing a list of @racket[1], @racket[2] and @racket[3]), but the
expression you type in, @racket[(list (+ 0 1) (+ 1 1) (+ 1 2))], contains
sub-expressions (@racket[(+ 0 1)], @racket[(+ 1 1)], @racket[(+ 1 2)]) that
describe computation. That means the whole expression is still code, not
data, because pure data should not contain any sub-expression that describe
any computation, such as @racket[1], @racket["hi"], etc. Racket, more
precisely, the reader, expects all compound s-expressions as code. This is
why you get error when you type in something like @litchar{(+ 1 2 . 3)}
because the reader cannot internalize it. It is not in valid code syntax,
that is, it does not end with the terminator @litchar{()}.
What if we just want to get @racket[(+ 1 2 3)] or @racket[(list (+ 0 1) (+ 1
1) (+ 1 2))] as (resulting) data? A first attempt is
@eg[
(list + 1 2 3)
]
@eg[
(list (list + 0 1) (list + 1 1) (list + 1 2))
]
We are one step closer, but the results are still not what we want. We want
the symbol @racket[+] in place but it still gets evaluated,\footnote{Actually
so do @racket[0], @racket[1], @racket[2]. Since they evaluate to themselves,
they remain the same in the result. But be aware something still happens
behind the scene.} @litchar{#<procedure:+>} representing its value. What we
need is a mechanism to mention some code to Racket, so that it understands
that it should not evaluate the internalization of this piece of code. We
meet this situation fairly often in our writing. When writing an article, we
often needs to mention a word, a phrase or a sentence, so that our reader know
that we are talking about the word, phrase or sentence itself, instead of what
it expresses. What do we dd? We quote it! For example, the sentence--- "Get
out of here!" is a rude expression---quotes the rude expression we are talking
about. When you read this sentence, you know that you are not asked to get
out of here, but told that "get out of here!" is a rude expression. Inspired
by this mechanism we employ in writing, the inventor of Lisp introduced an
operator called @racket[quote]. Using @racket[quote] we can tell Racket not
to evaluate the quoted code, for example, @racket[(code:quote (+ 1 2 3))],
@racket[(code:quote (list (+ 0 1) (+ 1 1) (+ 1 2)))]. Racket also provides a
shorthand for @racket[quote], instead of @racket[(code:quote (+ 1 2 3))], you
can write @racket['(+ 1 2 3)], that is, you just put a single quotation mark
@litchar{'} before the code you want to quote. Be aware that there is no more
@litchar{'} after the code you quote.
In addition to quoting code, you can also quote other data.
@eg[
'1
]
@eg[
'"hi"
]
The outcome suggests that @racket[quote] has no effect on literals. Racket
simply return the quoted literal as is, and no prefixing @litchar{'}.
Furthermore, you can also quote identifiers and s-pairs. In otherwords, you
can quote any s-expression.
@eg[
'x
]
@eg[
'lambda
]
@eg[
'()
]
@eg[
'(+ 1 2 . 3)
]
@eg[
'(+ 1 2 3)
]
A quoted identifier represents a symbol. A quoted s-pair represents a pair
and a quoted s-list represents a list, so @racket[(quote (+ 1 2 . 3))] is
equivalent to @racket[(cons '+ (cons '1 (cons '2 '3)))], @racket['(+ 1 2 3)]
equivalent to @racket[(list '+ '1 '2 '3)] and also to @racket[(cons '+ (cons
'1 (cons '2 (cons '3 '()))))].
So @racket[quote] provides a fast way to construct instances of pairs and
lists. These instances can be used as usual.
@eg[
(car '(1 2 . 3))
]
@eg[
(cdr '(1 2 . 3))
]
@eg[
(first '(+ 1 2 3))
]
@eg[
(rest '(+ 1 2 3))
]
If @racket[quote] is only used for this purpose, you are using a sledgehammer
to crack a nut. Recall that @racket[quote] is introduced because we want to
have quoted code treated as data. But what is this good for? The answer is
with it, we can write code that manipulates code. Its meaning is well
illustrated by the following example.
@#reader scribble/comment-reader
(racketblock
;; parse : sexp -> aexp
;; parses an s-expression to an arithmetic expression
(define (parse sexp)
(match sexp
[(list '+ x y) (make-add (parse x) (parse y))]
[(list '- x y) (make-sub (parse x) (parse y))]
[(list '* x y) (make-mul (parse x) (parse y))]
[(list '/ x y) (make-div (parse x) (parse y))]
[_ (if (number? sexp)
(lit sexp)
(error "Invalid syntax: " sexp) ) ] ) )
;; reduce : aexp -> aexp
;; reduces an arithmetic expression in one step
(define (reduce aexp)
(match aexp
[(struct add (lhs rhs)) (reduce-op make-add + lhs rhs)]
[(struct sub (lhs rhs)) (reduce-op make-sub - lhs rhs)]
[(struct mul (lhs rhs)) (reduce-op make-mul * lhs rhs)]
[(struct div (lhs rhs)) (reduce-op make-div / lhs rhs)] ) )
;; evaluate : aexp -> number
;; evaluates an arithmetic expression to a number
(define (evaluate aexp)
(match aexp
[(struct lit (n)) n]
[_ (evaluate (reduce aexp))] ) )
)
Both @racket[reduce] and @racket[evaluate] together are responsible for
arithmetic expression evaluations. But with them only, whenever we want to
evaluate an arithmetic expression, we have to type something like
@racket[(evaluate (make-mul (make-add (make-lit 1) (make-lit 2)) (make-mul
(make-lit 5) (make-lit 3))))]. This is just too much. Life becomes simpler
with the @racket[parse] function. Essentially, it makes an arithmetic
expression from an s-expression. So that we can first feed a quoted
s-expression to @racket[parse], and let @racket[parse] build the corresponding
arithmetic expression, then feed this arithmetic expression to
@racket[evaluate]. In other words, we compose @racket[evaluate] and
@racket[parse]. For example, we can now write @racket[(evaluate (parse '(* (+
1 2) (- 5 3))))] which is way much simpler. Note the quoted s-expression
@racket[(* (+ 1 2) (- 5 3))] is itself valid Racket code. If we do not quote
it, Racket will evaluate it to 6. Quoting it turns it to data. We say
(Racket) functions like @racket[parse] manipulate (Racket) code as (Racket)
data.
Yet this still does not reach far enough. The inital and ultimate purpose of
the existence of @racket[quote], and in turn this "code as data" magic is to
allow one to write an interpreter in Racket for Racket, so called
self-interpreter. Below is the @racket[parse] and @racket[reduce] function
from
@hyperlink["https://github.com/klauso/KdP2012/blob/master/islinterpreterwostructs.rkt"]{islinterpreterwostructs.rkt}
in previous lectures, refactored to use pattern matching instead.
@#reader scribble/comment-reader
(racketblock
;; parse : sexp -> Exp
;; parses an s-expression to an abstract syntax tree
(define (parse sexp)
(match sexp
[(list 'lambda args body) (make-lam args (parse body))]
[(list 'define name e) (make-var-def name (parse e))]
[(list 'local defs e) (make-locl (map parse defs) (parse e))]
[(list 'cond (list test body) ...)
(make-cnd (map make-cnd-clause test body)) ]
[(list rator rand ...) (make-app (parse rator) (map parse rand))]
[_ (if (symbol? sexp)
(make-var sexp)
(make-primval sexp) ) ] ) )
; reduce : Exp Env -> Exp
; reduces an expression in an environment
(define (reduce e env)
(match e
[(struct app (fun args)) (reduce-app fun args env)]
[(struct lam (args body)) (make-closure args body env)]
[(struct var (x)) (lookup-env env x)]
[(struct locl (defs e)) (reduce-local defs e env)]
[(struct cnd (list (struct cnd-clause (c e)) clauses ...))
(reduce-cond c e clauses env) ]
[_ (error "Cannot reduce: " e)] ) )
)
Although the interpreted language is just a subset of Racket, it illustrates
how @racket[quote] and "code as data" has rendered the language
self-contained. Not many languages have this feature. It is one part that
makes Lisp-family languages unique. The other part is their powerful macro
systems.
@section{Pattern-based Macros}
Lisp-family languages are well known for their powerful macro systems.
Similar to functions, macros are also abstractions. While functions abstract
over run-time computations, macros abstract over compile-time code. This new
dimention of abstraction provides us a new perspective to view what we code
and how we code. Do we repeat some piece of code too many times? Do we keep
applying some coding patterns? Do we sometimes find the need of one specific
piece of syntax that is unfortunately unavailable but could express our ideas
more naturally? Refecting for a while, we will probably answer "yes" to
almost all these questions. Then the natural question is this: can we do
something to improve the situation? The answer is also "yes". This is
exactly where macros come into play. With macros, typical code repetitions
can be avoided; common coding patterns can be abbreviated; specific (but
compatible @note{It will become clear soon what "compatible" means.}) can be
invented. In a word, macros can ease our work.
A traditional Lisp macro takes as inputs s-expressions and produce as ouput an
s-expression which is supposed to be valid code. Note that the input
s-expressions do not have to be quoted, even if they are code. A macro does
not distinguish code and data at all. From its point of view, they are both
s-expressions and that is all it cares about. On the other hand, since macros
are often defined to accept code as input and produce code as output, macros
are also called code transformers. Due to this transformation property,
writing macros is also considered as a form of programming, called macro
programming, or simply macroing. This is why some Lisp programmers describe
macro programming as "writing programs that write programs". Nevertheless
traditional Lisp macro systems lack both high-level abstractions to manipulate
s-expressions and automatic mechanisms to resolve name capturing. @note{Name
capturing occurs when some names in the prduced code by a macro no longer
retain their inital binding. The produced code is said to be
@emph{unhygienic}.} This makes macro programming in these systems both tedious
and error-prone. These two dimentions of complexity make macro programming
almost inaccessible to junior, even senior Lisp programmers. To remove these
barriers, @emph{high-level} @emph{hygienic} macro systems were developped.
These systems provide high-level abstractions, namely, patterns and templates,
to access and construct s-expressions. More importantly, they also resolve to
their greatest extent the name capturing problem under the scene without
programmers' concern, so that the produced code is hygienic. Scheme features
this kind of pattern-based macro system. Racket inherits and refines it. In
the following subsections, we will explore the three use cases of macros
inside Racket's macro system.
@subsection{Avoiding Code Repetition}
In
@hyperlink["https://github.com/klauso/KdP2012/tree/master/underconstruction/card.rkt"]{card.rkt},
we try to represent the 52 poker cards using our
@racket[card]-@racket[struct]. For example, we would like to have the
following definition for the card called "Ace of Spades".
@racketblock[
(define 🂡 (make-card "A" "♠"))
]
We use the unicode identifier 🂡 to name the @racket[card] instance. It is
clear that we have to write 51 more such definitions. Even we can copy and
paste, it is actually still quite some work. Moreover, all the work is just
boring repetition. Let us be explicit what pieces of code will be repeated:
for each suit , we have to repeat @litchar{(define}, @litchar{(make-card}, the
string represents the suit (one of @racket["♠"], @racket["♥"], @racket["♦"]
and @racket["♣"]), and @litchar{))}, regardless of spaces; for all suits, we
have to repeat strings that represent ranks (one of @racket["A"], @racket["2"]
to @racket["10"], @racket["J"], @racket["Q"] and @racket["K"]). Clearly we
do not want to do this.
Racket's macro system can free us from this kind of boring task. For it to
work, we give Racket a template that specifies the form of code that should be
produced. Then Racket will automatically generate code following the
template. Such a template usually contains holes to be fill in. We can label
these holes using the same or different names according to whether they are
supposed to be filled by the same or different code pieces. A moment's
thinking suggests that these code pieces cannot be those repeated. So other
parts of the template than its holes must have those repeated code pieces.
Now a template for our example can be formed like this:
@racketblock[
(begin (define cs (make-card r "♠")) ...
(define ch (make-card r "♥")) ...
(define cd (make-card r "♦")) ...
(define cc (make-card r "♣")) ... )
]
Since we are going to generate a sequence of top-level definitions, we collect
them in a @racket[begin] expression. The main reason for this is that Racket
expects a fully-filled template to be a valid single s-expression, not a
sequence of s-expressions. @racket[cs], @racket[ch], @racket[cd], @racket[cc]
and @racket[r] are names that label the holes. The ellipsis @litchar{...}
indicates that the sub-template preceeding it will be repeated. Now that we
have the template, but there still remains the question how should we tell
Racket this is a template. Obviously just giving this template to Racket to
evaluate will not work. What we are assured is only that after fully-filled,
the template will be valide code. Before it gets filled, it is of course not
because those names labelling the holes are not bound to anything at all.
Also, ellipses are not allowed in expressions that Racket can directly
evaluate. What should we do?
Actually when we introduced functions we encountered a similar situation. We
have some expression containing some unknowns, for example, @racket[(+ x y
1)], we wanted to tell Racket we would later fill in the holes in the
expression labelled by @racket[x] and @racket[y]. What did we do? We define
a function that paremeterizes the expression.
@racketblock[
(define (f x y)
(+ x y 1) )
]
We can do similar things for templates. But we cannot use @racket[define]
since it is used to give names to an expression that represents some
computation. @note{This is probably the most general description of
@racket[define]. To see that it indeed covers all its uses we have seen so
far, simply note that (1) if the named expression actually builds data, it can
be considered to represent a trivial computation that simply returns the data
as is; (2) a function definition using a function header can always be
rewritten in a form that uses @racket[define] to name a @racket[lambda]
abstraction.} Racket provides @racket[define-syntax-rule]. Using it, we can
define a macro that parameterizes a template that represents some code. For
example, we can define a macro called @racket[make-cards] that abstract our
example template as follows.
@racketblock[
(define-syntax-rule (make-cards (r ...)
(cs ...)
(ch ...)
(cd ...)
(cc ...) )
(begin (define cs (make-card r "♠")) ...
(define ch (make-card r "♥")) ...
(define cd (make-card r "♦")) ...
(define cc (make-card r "♣")) ... ) )
]
The only thing new is in the macro header @racket[(make-cards (r ...) (cs ...)
(ch ...) (cd ...) (cc ...))]: those names labelling holes in the template are
followed by ellipses. They do not look like parameters in function headers.
Because they are not. If we say this whole header specifies a pattern, does
it remind you of something? Yes, pattern matching, though is no longer on
data structures but on code structures. Essentially a macro header specifies
the macro's call pattern. The names that labelling holes in the template are
also called pattern variables. Ellipses in the pattern act similarly. But be
aware that you must make sure that if a name in the pattern is followed
(immediately or not) by some ellipses, exactly the same number of ellipses
must follow the name (immediately or not) in the template. Otherwise, you
will get an error complaining that ellipses are missing. Check yourself that
our macro definition above satisfies this requirement. To see how it could
fail, just delete one ellipsis in the pattern or the template to make them not
match.
Now we can call this macro in the same way we call a function.
@racketblock[
(make-cards ("A" "2" "3" "4" "5" "6" "7" "8" "9" "10" "J" "Q" "K")
( 🂡 🂢 🂣 🂤 🂥 🂦 🂧 🂨 🂩 🂪 🂫 🂭 🂮)
( 🂱 🂲 🂳 🂴 🂵 🂶 🂷 🂸 🂹 🂺 🂻 🂽 🂾)
( 🃁 🃂 🃃 🃄 🃅 🃆 🃇 🃈 🃉 🃊 🃋 🃍 🃎)
( 🃑 🃒 🃓 🃔 🃕 🃖 🃗 🃘 🃙 🃚 🃛 🃝 🃞) )
]
When Racket's macro processor sees this s-expression, it first decides that
its head names a macro, then it tries to match the whole call with the pattern
of the macro definition, if it matches successfully, a binding for the pattern
variabels will be generated and what they are bound to will be substituted
into the template. For our example, the match goes like this: first, the
macro name @racket[make-cards] matches as if it a literal; then the @racket[(r
...)] matches @racket[("A" "2" "3" "4" "5" "6" "7" "8" "9" "10" "J" "Q" "K")];
similarly for other pattern variables. So the two indeed match perfectly,
resulting in a binding in which @racket[r] is bound to the s-expression
@racket[("A" "2" "3" "4" "5" "6" "7" "8" "9" "10" "J" "Q" "K")] and similarly
for others. Then the macro processor starts to substitute these s-expressions
for these pattern variables. But note that, @racket[r] in the template will
not be substituted for @racket[("A" "2" "3" "4" "5" "6" "7" "8" "9" "10" "J"
"Q" "K")], neither do others due to the ellipses coming after them. We
mentioned before an ellipsis in a template indicates repetition of the
sub-template preceeding it. But we did not make it explicit how many times
the repetition should be. Now we can be clear that the sub-template
preceeding an ellipsis will be repeated as many times as the number of
elements contained in the s-list bound to the pattern variable, and the
pattern variable in the repeated sub-templates will be substituted for
elements of the bound s-list in a one-to-one fashion. Note that, if in the
pattern there exist several pattern variables followed by ellipses, and two or
more of them appear together inside a sub-template followed by ellipses, their
bound s-lists must be of the same length. Otherwise, we get an error
complaining that their counts do not match. All ellipsis-followed
sub-templates in our example contain two ellipsis-followed pattern variables.
It is easy to see that the s-lists bound to these pattern variables are indeed
of the same length. To see how it could cause an error, try to call
@racket[make-cards] with s-lists of different lengths. Now it should be clear
that after all the substitutions are done, we will have a sequence of card
definitions inside @racket[begin]. The process of replacing a macro call with
the fully substituted template from the macro definition is called @emph{macro
expansion}.
@subsection{Abbreviating Coding Patterns}
Not all code repetitions are as plain as that is shown in the previous
subsection. Sometimes we find that what we are repeating actually appears in
a structural form. Programmers notice these kinds of code structures. They
call them coding patterns or coding idioms. They collect them into their
coding dictionaries and practice using them whenever possible. One day when
they become seasoned, they teach these idioms or patterns to their disciples,
and so on. This is after all how knowledge is usually conveyed. But it is
clear that the recurrence of these coding patterns is definitely a form of
repetition. Why should we be forced to repeat them? Why does not the
programming language provide some more convenient constructs to ease our
coding task? The answer is that language designers cannot predict these
coding patterns beforehand. These patterns emerge in our coding practice.
The crux of the problem is that the programming language does not provide any
or any sophisticated enough way that allows the programmer to abbreviate or
abstract over these coding patterns. Lisp-family languages do, via their
powerful macro systems. So does Racket.
Let's first see a simple example, which is an immediate application of a
@racket[lambda]-expression to some arguments, for instance,
@racketblock[
((lambda (x y z)
(* (+ x y) (- x z)) )
(/ 8 4) 6 3 )
]
This coding pattern is useful when we want to avoid repeated computations. In
the above example, the varaible @racket[x] will get bound to the value of
@racket[(+ 1 2)]. In the body exrepssion, even though @racket[x] appears
twice, the expression @racket[(+ 1 2)] will be evaluated only once before
entering the body of the @racket[lambda]-expression. When the expression
@racket[(* (+ x y) (- x z))] is evaluated, @racket[x] is already bound to the
value @racket[3], no computation is need at all.
It seems this coding pattern is quite handy. It indeed recurs whenver we want
to introduce local variable bindings. But it has a drawback. For the simple
example above, it is not that obvious. We can still manage to the binding
relations between the variables and the arguments. But it will be difficult
if the body of the @racket[lambda]-expression becomes more complex. Then the
variables and the arguments will be so far that, we can no longer easily see
their binding relations. Therefore, it is reasonable to abstract it away.
Let's start again with the template.
@racketblock[
((lambda (var ...) body)
arg ... )
]
Now we need to design the macro call pattern, which is its user-interface.
Since we want not to separate the variables and arguments far away, we should
gather them to one place that is easy to find. Two good choices may be either
before or after the body expression. Without loss of generality, we choose
the former. If we name the macro @racket[with], its header look likes this
@racket[(with [(var arg) ...] body)]. Its definition is shown below:
@racketblock[
(define-syntax-rule (with [(var arg) ...] body)
((lambda (var ...) body)
arg ... ) )
]
Now we can rewrite the simple example using @racket[with].
@racketblock[
(with [(x (/ 8 4))
(y 6)
(z 3) ]
(* (+ x y) (- x z)) )
]
This time, it is clear to the binding relations between the variables and
arguments. The benefit will of course be more obvious for larger examples.
Racket provide @racket[let] that can do the same thing and more.
In the example above, the coding pattern is actually quite simple. It just
shows one basic usage of macros to abbreviate coding patterns. Macros can
also be used to abstract over more complicated coding patterns. One typical
example is nested @tt{if}-@tt{else} statements found in C-family languages.
In programs written in these languages, you can easily find code of the
following structure:
@verbatim|{
if ( ... ) {
...
}
else if ( ... ) {
...
}
...
else {
...
}
}|
This coding pattern essentially expresses multi-conditional analysis. In
Racket, we use @racket[cond] for that purpose. It proves convenient. But so
far you have been told that it is a primitive control construct.
@note{@racket[cond] is indeed provided as a primitive control construct in
original Lisp. But it is not in Scheme, neither in Racket.} It is actually
not. The primitive control construct to form a conditional expression in
Racket is @racket[if]. Now suppose, Racket does not provide @racket[cond] but
only @racket[if] out of the box, what would happen? Does it mean that you
have to, as programmers of other languages do, identify nested @racket[if]
expressions as a coding pattern and fron now on write every multi-conditional
expression that way? Fortunately not. Racket allows us to define our own
@racket[cond] as a macro and use it as if it is provided out of box.
To see how @racket[cond] can be defined as a macro, let's start again with a
template. The template should cover the coding pattern, that is, it may
contain nested @racket[if] sub-templates.
@racketblock[
(if test-expr1
then-expr1
(if test-expr2
then-expr2
??? ) )
]
Note the above piece is neither valid code nor valid template. We use
@litchar{???} to indicate that some repetition is needed to complete the
template. Since we know that ellipsis @litchar{...} is used for repetition in
a template, a first attempt to build the template may be just replacing
@litchar{???} with ellipsis @litchar{...}, parameterizing the pattern
variables, and defining a macro like this:
@eg[
(define-syntax-rule (condition (test-expr1 then-expr1)
(test-expr2 then-expr2) ... )
(if test-expr1
then-expr1
(if test-expr2
then-expr2
... ) ) )
]
Unfortunately it does not work. Not only because an ellipsis is missing after
@racket[test-expr2]; but also because during expansion, @racket[then-expr2]
together with the ellipsis in the template will be substituted by all the
then-expressions in a call of @racket[condition], yet lined in sequence,
leaving out any nested @racket[if] and other test-expressions. Convince
yourself that a template like
@racketblock[
(if test-expr1
then-expr1
(if test-expr2
then-expr2 ) ... )
]
does not work either. What we wish @litchar{???} could do is to say that
repeating the sub-template @litchar{(if test-expr2 then-expr2} as many times
as required and supplying as many closing parentheses as needed.
Unfortunately, this is out of the reach of ellipses @litchar{...}. But notice
that what we wish ellipsis to do is exactly what @racket[conditonal] is
designed to do. This suggests that if we can call @racket[condition]
recursively, we are done. Racket supports recursive macro calls in a macro
definition. The way to write a recursive macro call is similar to the way to
write a recursive function call. But you must make sure that the recursive
macro call will actually match the call pattern:
@eg[
(define-syntax-rule (condition (test-expr1 then-expr1)
(test-expr2 then-expr2) ... )
(if test-expr1
then-expr1
(condition (test-expr2 then-expr2) ...) ) )
]
This time it looks good. The macro definiton is accepted. Nevertheless, it
fails when we use it:
@racketblock[
(define (absolute n)
(condition
[(< n 0) (- n)]
[(>= n 0) n] ) )
]
When Racket's macro processor tries to expand the macro call in the above
definition, it will complain that the macro call @racket[(condition)] does
not match the call pattern. The problem is that since both
@racket[test-expr2] and @racket[then-expr2] are supposed to to bound to an
sequence of s-expressions, in particular, these sequences may be empty; but if
you look at the macro header carefully, you will notice that it expects at
least one couple of test-exression and then-expression. We can see the point
more clearly from the fully expanded code for the definiton of
@racket[absolute]:
@racketblock[
(define (absolute n)
(if (< n 0)
(- n)
(if (>= n 0)
n
(condition) ) ) )
]
Because of the recursive call of @racket[condition], the expansion continues
until the bottom case is hit, that is, when both @racket[test-expr2] and
@racket[then-expr2] become @litchar{()}. At this point, there is no
s-expression fed to @racket[condition], thus the recursive macro call becomes
@racket[(condition)], which fails to match the call pattern. The solution is
to provide a pattern that would cover this base case. Thus we need a
@racket[match]-like construct that allows us to supply multiple patterns to
cover different cases. Racket provides us @racket[syntax-rules] which allows
us to define an anonymous macro, then we can use @racket[define-syntax] to
give the macro a name. They work tegother in a similar way that
@racket[lambda] and @racket[define] do. Using @racket[syntax-rules] and
@racket[define-syntax], the macro @racket[condition] will be defined as
follows:
@racketblock[
(define-syntax condition
(syntax-rules ()
[(condition) (void)]
[(condition (test-expr then-expr) clause ...)
(if test-expr
then-expr
(condition clause ...) ) ] ) )
]
The body of @racket[syntax-rules] looks similar to the body of @racket[match].
For each clause, the left hand side is a pattern specifying the form that a
macro call could take; the right hand side is the template corresponding to
this pattern. Matching also goes from top down, favoring the template
corresponding to the first pattern that matches a macro call. Note the
macro name acts as if it is a literal. In other words, in pattern matching,
macro names must match exactly, equivalent to equality test.
For the base case @racket[(condition)], we choose to return nothing, which is
what @racket[(void)] does. For the recursive case, we simplify the
ellipsis-pattern @racket[(test-expr2 then-expr2) ...] to just @racket[clause
...]. The reason is the corresponding template and this ellipsis-pattern
appears exactly the same. That means their structure actually does not
matter. We can simply use a pattern variable instead.
The pair of parentheses folling immediately @racket[syntax-rules] are used to
introduce some extra keywords. We know that inside @racket[cond], we can use
the keyword @racket[else] to take care of all othercases. We can do similar
thing for our @racket[condition], to introduce a keyword, say
@racket[otherwise], we simply put it in the parentheses following
@racket[syntax-rules].
@racketblock[
(define-syntax condition
(syntax-rules (otherwise)
[(condition) (void)]
[(condition (otherwise othw-expr)) othw-expr]
[(condition (test-expr then-expr) clause ...)
(if test-expr
then-expr
(condition clause ...) ) ] ) )
]
We can rewrite @racket[absolute] as
@racketblock[
(define (absolute n)
(condition
[(< n 0) (- n)]
[otherwise n] ) )
]
It get expanded to
@racketblock[
(define (absolute n)
(if (< n 0)
(- n)
n ) )
],
exactly what we want.
Note the position of the clause @racket[[(condition (otherwise othw-expr))
othw-expr]] matters. If we put it after the clause that deals with the
recursive case, pattern matching could never reach it. Since the pattern
variable @racket[test-expr] can match anything, the clause handling the
recursive case will always be taken. The call of @racket[conditon] in
@racket[absolute] gets expanded by the macro processor to:
@racketblock[
(define (absolute n)
(if (< n 0)
(- n)
(if otherwise
n
(condition) ) ) )
]
The problem of this expanded code is that, the identifier @racket[otherwise]
may not evaluate to a boolearn value and it may even be unbound at all.
Therefore, always be careful about the order of the clauses.
@;{ The following block is commented out for future consideration.
Another coding pattern commonly appears in functional programming languages
is an immediate application of a lambda abstraction to bind some value to some
variables, for example,
@eg[
(((lambda (x)
(lambda (y)
(* (+ x y)
(- x y) ) ) )
(* 3 4) )
(* 2 3) )
]
This coding pattern is useful when we try to avoid repeated computation. In
the above example, the varaibles @racket[x] and @racket[y] will get bound to
the values of @racket[(* 3 4)] and @racket[(* 2 3)], that is, 12 and 6
respectively. Inside the the exrepssion @racket[(* (+ x y) (- x y))], even
though both @racket[x] and @racket[y] appear twice, @racket[(* 3 4)] and
@racket[(* 2 3)] will not be evaluated since @racket[x] and @racket[y] have
already bound to the values of these two expressions respectively.
This coding pattern recurs whenver we want to introduce local variable
bindings. But note that the more local variables we introduce, the deeper the
nesting of @racket[lambda]-expressions goes; the more complicated the
innermost expression is, the farther the local variables and their bound
values are separated. Both cause readability problems. Therefore, it is
reasonable to abbreviate it, and more importantly to abstract it away. Let's
start again with the template. It must have the following shape.
@racketblock[
(??? (((lambda (var1)
(lambda (var2)
???
body ) ??? )
exp1 )
exp2 )
??? )
]
Lessons learned from the definition of @racket[condition] tells us to be
careful about the @litchar{???}s, not to blindly replace them with
@litchar{...}s. Indeed the first and third of them just specify repeated
openning and closing parentheses, which is not our concern. If we watch the
shape carefully, we will realize there is something similar to that of the
template of @racket[condition], namely, nested repetetion. This again
suggests a recursive macro definition. Let's name the macro @racket[with].
Now comes the design of the macro call pattern which is its user-interface.
One way to avoid the two problems of the coding pattern demonstrated above is
to gather the local variables and their bound values together, and put them
either before or after the main expression that references these local
variables. Without loss of generality, we choose the former. The natural and
default way to put s-expressions together is to use s-list. Fruthermore, we
would like also to allow the s-list to be empty in which case, no local
variable is introduced. All that said, our macro header can be either
@racket[(with [] body)] or @racket[(with [(var1 exp1) binds ...] body)]. The
former is obviously the base case. It is easy to see a macro call like that
should simply be replaced by @racket[body]. The latter is of course the
recursive case. We need to form a @racket[lambda]-expression with the local
variable @racket[var1] as parameter, with a recursive call to @racket[with] as
its body, and then apply it to the expression @racket[exp1]. Below is the
defintion.
@racketblock[
(define-syntax with
(syntax-rules ()
[(with [] body) body]
[(with [(var1 exp1) binds ...] body)
((lambda (var1)
(with [binds ...] body) )
exp1 ) ] ) )
]
Now we can use @racket[with] to rewrite the above example.
@eg[
(with [(x (* 3 3))
(y (* 4 4)) ]
(+ x y) )
]
It expands to
@racketblock[
((lambda (x)
(with [(y (* 4 4))]
(+ x y) ) )
(* 3 3) )
]
It seems the expansion does not reach the bottom since there is still an
@racket[with]-call inside the @racket[lambda]-expression.
}
@subsection{Extending Language Syntax}
In the previous subsection, we have seen the macro @racket[with] and
@racket[condition] allow us to write code in a new way. In a sense, we have
extended the language syntax. Both @racket[with] and @racket[condition] are
already provided by Racket, but under different names: @racket[let] for
@racket[with], and @racket[cond] for @racket[condition]. They are indeed
pre-defined as macros. Their definitions subsume ours. The call for
@racket[with] and @racket[condition] comes from our observation of some
recurring coding patterns. But macros can also be used to make some syntax
out of our imagination.
When imperative programmers moves to the functional programming world, they
usually miss those loop constructs provided by the imperative language, if no
such construct is provided by the functional language. For a functional
language with no syntax extensibility, all they can do is to hope such
construct would be supported in future version of the language. @note{This is
almost hopeless, since for a non-extensible functional language, if it omits
such constructs from the very beginning, it suggests a strong favor of
recursion.} But for Lisp-family languages, this is no problem. If programmers
want, they can always build such constructs as macros.
A proper loop construct maintains a set of iteration variables (or loop
variabels). Some of them are tested in a boolean condition in order to
control the entering and exiting of the loop. All the iteration variables
should have already been initialized before entering the loop. When entering
the loop, an iteration starts. During the iteration, some iteration variables
may be modified. These modifications will affect the next boolean condition
test, which in turn will determine whether to reenter the loop and start a new
iteration or to terminate the current iteration and exit the loop.
In the imperative programming world, there are several variants of loop
constructs. C provides @tt{while}-loop and @tt{for}-loop. The latter is
actually a better organized version of the former, encouraging the programmer
to put initializations and modifications of these iteration variables
together along with the boolean condition, before the body of the loop. Python
provides slightly different @tt{for}-loop and @tt{while}-loop, each allowing
an optional @tt{else} branch that does something default when the boolean
condition is no longer met, that is, when control exits the loop. We will try
to design a macro that brings together all the goods of these loop constructs.
Therefore, this time, we will start with the macro call pattern. Let's call
our macro @racket[loop]. Furthermore, we would like to introduce two more
keywords for special purpose: one is @racket[when] which labels the boolean
expression, the other is @racket[else] which labels the default expression.
Eventually, we decide our macro call pattern to be:
@racketblock[
(loop [(ivar init step) ...]
[when test]
body ...
[else just] )
]
We collect an iteration variable @racket[ivar], its initialization
@racket[init] and its modification @racket[step] into an s-list. In
particular, the ellipsis following the s-list indicates that our loop
construct can have zero or more such collections. The @racket[body] of the
loop can also be an arbitrary number of expressions. These expressions are
usually evaluated in sequence but their values are ignored. The boolean
expression @racket[test] follows the extra keyword @racket[when]. The default
expression @racket[just] follows the extra keyword @racket[else]. This
default expression is evaluated when the loop is exitted, and its value
becomes the value of the whole @racket[loop]-expression.
The next step is to design the code template. Recall that in Racket, the
recommended way of expressing loops is via recursion. Thus, since a call of
@racket[loop] is supposed to be transformed away, in our template, we should
use recursion. Here is the template:
@racketblock[
(local [(define (iterate ivar ...)
(if test
(begin body ...
(iterate step ...) )
just ) ) ]
(iterate init ...) )
]
Essentially we define a @racket[local] recursive function @racket[iterate]
that takes all the iterative variables as parameters. Inside its body,
@racket[if] @racket[test] evaluates to @racket[true], we @racket[begin] to
evaluate the expressions of the loop @racket[body] in sequence, ignoring their
values, and then we recursively call @racket[iterate] with new arguments that
are supposed to push the initial values of the iterative variables one step
further, that is, get them bound to new values. When @racket[test] evaluates
to @racket[false], we know that the iteration is done, we should return the
value of the default expression @racket[just]. Putting the macro call pattern
and the template together, we get the following macro definition:
@racketblock[
(define-syntax loop
(syntax-rules (when else)
[(loop [(ivar init step) ...]
[when test]
body ...
[else just] )
(local [(define (iterate ivar ...)
(if test
(begin body ...
(iterate step ...) )
just ) ) ]
(iterate init ...) ) ] ) )
]
Now we can use our @racket[loop] macro to define a fucntion that sums a list
of numbers.
@racketblock[
(define (sum nums)
(loop [(ns nums (rest ns))
(s 0 (+ s (first ns))) ]
[when (not (empty? ns))]
[else s] ) )
]
In this example, the body of the loop is empty. Another classic example of
using loop is to print out the times table.
@racketblock[
(loop [(i 1 (+ i 1))]
[when (<= i 9)]
(loop [(j 1 (+ j 1))]
[when (<= j i)]
(printf "~a * ~a = ~a\t" i j (* i j))
[else (newline)] )
[else (void)] )
]
For more detail of the function @racket[printf], @racket[newline] and
@racket[void], please refer to the Racket documentation.
@exercise[] Some C-family languages also provide another form of loop, called
@hyperlink["http://en.wikipedia.org/wiki/Do_while_loophttp://en.wikipedia.org/wiki/Do_while_loop"]{@tt{do-while}-loop}.
Write a macro that can do the same.
Racket is a descendant of Scheme. In Scheme, a few identifiers are reserved,
sometimes called @emph{syntactic keywords}. Their use cases are in the Lisp
tradition called @emph{special forms}. They are special for both syntax and
semantics. Let's take a look at @racket[lambda]. It is special in syntax
because if you use it incorrectly you will get a syntax error. It is special
in semantics because it (when used correctly) @emph{creates} an anonymous
function. Due to their special status, these syntactic keywords need special
support from the language implementation. Implementing a language is not an
easy and cheap task. It takes a lot of efforts and resources. Generally, the
richer the language syntax is, the more convenient to program in the language,
but on the other hand the more efforts and resources needs to be put into the
language implementation. Clearly the language designers must make a
trade-off. The choice of Scheme, and in turn Racket, is to keep the core
language syntax minimum but leaves open the possibility to extend it. This
follows the design philosophy stated in the Scheme language report:
@emph{Programming languages should be designed not by piling feature on top of
feature, but by removing the weaknesses and restrictions that make additional
features appear necessary.} @note{This passage has been replicated at the very
beginning of every @emph{Revised@superscript{n} Report on the Algorithmic
Language Scheme} since n = 3.}
Scheme has only a few syntactic keywords, two of them are @racket[lambda] and
@racket[if]. They render the primitive syntax of the language. Of course,
with them, it can hardly be convenient to program anything in the language.
For example, to write a multi-conditional expression, you have to write deep
nested @racket[if]-expressions. Fortunately Scheme provides a powerful macro
system. New macros can be defined on the fly. Moreover, a macro call is
indistinguishable from a special form, due to the uniform s-expression syntax.
@note{In parallel, in Scheme and Racket, the call of a user-defined function
is also indistinguishable from that of a primitive function. This is not by
coincidence but by intention, intention for a simple, uniform look and feel.}
This gives us a feeling that we are extending the core language syntax in a
compatible way, which means we do not introduce some alien syntax. Since
macros can be used to extend the language syntax, they are sometimes also
called @emph{syntactic extensions}. Actually, Racket goes much further than
Scheme, everything is a macro, including all seeming syntactic keywords, even
@racket[lambda] and @racket[if]. Their uses are replaced by code in Racket's
core language syntax during macro expansion. @note{The way how Racket's macro
expansion works is out of the scope of this lecture. If you are interested,
please refer to the Racket documentation.} At the end of this subsection, we
use one example to demonstrate how the extensibility macros bring to the
language can influence its design.
We have claimed that everything in Racket is a macro. Then it should be easy
to accept that @racket[match], the construct we have focused on in our
previous lecture is also just a macro. Racket chooses to build @racket[match]
as a macro on top of equality test on literals and isomorphism test on data
structures. Another perspective is to view pattern matching as a more general
and more primitive mechanism that should be supported out of the core
language. The reason turns out to be that the most basic conditional
construct @racket[if] can be simply defined as a macro on top of pattern
matching! Here you go:
@racketblock[
(define-syntax-rule (if test-expr then-expr else-expr)
(match test-expr
[#t then-expr]
[#f else-expr] ) )
]
Thus every conditinoal expression is essentially a pattern matching
expression.
@subsection{The Use or Abuse of Macros}
Macro system holds the power to create languages and fill them with syntax.
But like all great power, it can be used for good, also for evil. And so
arises the question, a question that will trap our mind until it finds the
balance.
In this final subseciton, we will uncover the mask of @racket[and] and
@racket[or]. They are not functions but macros. Thus you can not pass them
as an argument to a higher-order function, since they are not functions at
all. The reason why they are defined as macros instead of functions is
deeper. In the following discussion, we focus on @racket[and], the case for
@racket[or] is similar. Below is a function definition that can do what
@racket[and] can:
@racketblock[
(define (andf . bs)
(match bs
[(list) true]
[(list b) b]
[(list b bs ...) (if b (andf bs) false)] ) )
]
This function looks correct. The problem with it is that before entering the
function body, all arguments have already been evaluated. This is due to how
Racket evaluates an application: arguments to a function are always evaluated
before the evaluation of the function body. For regular functions, this
evaluate strategy is demanded, since it will save repeated evaluation is the
arguments have to be substituted for several occurences of their corresponding
parameters inside the function body, improving the efficiency of the
computation. But for @racket[andf], it causes inefficiency because it
conflicts with the so-called @emph{short-circuit} evaluation for
@racket[andf]: whenever we find an argument to @racket[andf] evaluates to
@racket[false], we can stop and return @racket[false] immediately,
disregarding all other arguments, no matter how many they are. Now comes the
conflict: Racket's evaluation strategy requires all arguments to a function
being evaluated; short-circuit evaluation suggests that all arguments should
only be evaluated if necessary. Instead of changing the regular evaluation
strategy for regular function application, which is the common case, Racket
takes away the function status of @racket[andf] and turn it into a macro:
@racketblock[
(define-syntax and
(syntax-rules ()
[(and) true]
[(and e) e]
[(and e es ...) (if e (and es ...) false) ] ) )
]
Since a macro takes its argument expressions unevaluated, the conflict
disappears, and it can embrace the benefit of short-circuit evaluation. On
the other hand, it also means @racket[and] can no longer be used in place
where first-class function status is required. In particular, @racket[and]
can never see the light of run-time again.
@exercise[] Give the macro definition of @racket[or].
We leave this usage of macros to you to decide whether it is use or abuse.
The general advice is this: whenever you want to build abstractions, try
functions first; only if one of situations described above occurs, should you
try macros instead. Remember, macros are powerful, so powerful if you abuse
them, you may shoot yourself in the foot.
| true |
f3b215999709402a37956c47c6d491fba39a7b8f | d300efc89cb6505cf2dfdb41fa9dfc914187ce82 | /datatype.rkt | df6973818d4adf6c5e8fe85f2bc4316629facece | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | racket/eopl | cc2b3d6905ab4f7c8fccdf59c61693ce0f2fa5df | 2e7d541a61b9c3f8111ad809e5c0535962f07f42 | refs/heads/master | 2023-08-18T11:25:35.134860 | 2022-07-07T20:29:10 | 2022-07-14T14:01:43 | 27,354,924 | 39 | 11 | null | 2014-12-18T14:51:43 | 2014-12-01T00:00:12 | Racket | UTF-8 | Racket | false | false | 12,553 | rkt | datatype.rkt | ;; NOTE: datatypes are currently transparent, for the sake of EoPL's
;; use of `equal?'
#lang racket/base
(require (for-syntax racket/base "private/utils.rkt"))
(define-syntax (define-datatype stx)
(syntax-case stx ()
[(_ name pred-name
(variant-name (field-name field-pred) ...)
...)
(let ([variant-names (syntax->list #'(variant-name ...))])
;; More syntax checks...
(unless (identifier? #'name)
(raise-syntax-error
#f "expected an identifier for the datatype name" stx #'name))
(unless (identifier? #'pred-name)
(raise-syntax-error
#f "expected an identifier for the predicate name" stx #'pred-name))
(for ([vt (in-list variant-names)]
[fields (in-list (syntax->list #'((field-name ...) ...)))])
(unless (identifier? vt)
(raise-syntax-error
'cases "expected an identifier for the variant name" stx vt))
(for ([field (in-list (syntax->list fields))])
(unless (identifier? field)
(raise-syntax-error
'cases "expected an identifier for the field name" stx field))))
;; Count the fields for each variant:
(with-syntax ([(variant-field-count ...)
(for/list ([x (in-list (syntax->list
#'((field-name ...) ...)))])
(datum->syntax (quote-syntax here)
(length (syntax->list x))
#f))]
[(variant? ...)
(for/list ([vn (in-list variant-names)])
(datum->syntax
vn
(string->uninterned-symbol
(format "~a?" (syntax-e vn)))))]
[(variant-accessor ...)
(for/list ([vn (in-list variant-names)])
(datum->syntax
vn
(string->uninterned-symbol
(format "~a-accessor" (syntax-e vn)))))]
[(variant-mutator ...)
(generate-temporaries variant-names)]
[(make-variant ...)
(generate-temporaries variant-names)]
[(struct:variant ...)
(generate-temporaries variant-names)]
[(make-variant-name ...)
(for/list ([vn (in-list variant-names)])
(datum->syntax
vn
(string->symbol
(format "make-~a" (syntax-e vn)))))])
#'(begin
(define-syntax name
;; Note: we're back to the transformer environment, here.
;; Also, this isn't a transformer function, so any direct
;; use of the name will trigger a syntax error. The name
;; can be found by `syntax-local-value', though.
(let ([cert (syntax-local-certifier #t)])
(make-dt (cert #'pred-name)
(list (make-vt (cert #'variant-name)
(cert #'variant?)
(cert #'variant-accessor)
variant-field-count)
...))))
;; Bind the predicate and selector functions:
(define-values (pred-name
variant-name ...
variant? ...
variant-accessor ...)
;; Create a new structure for the datatype (using the
;; datatype name in `struct', so it prints nicely).
(let-values ([(struct:x make-x x? acc mut)
(make-struct-type 'name #f 0 0 #f null (make-inspector))])
(let-values ([(struct:variant make-variant variant?
variant-accessor variant-mutator)
(make-struct-type 'variant-name struct:x variant-field-count 0
#f
null
(make-inspector))]
...)
;; User-available functions:
(values
x? ;; The datatype predicate
;; Create the constructor functions:
(let* ([vname 'variant-name]
[variant-name
(lambda (field-name ...)
(unless (field-pred field-name)
(error vname "bad value for ~a field: ~e"
'field-name field-name))
...
(make-variant field-name ...))])
variant-name)
...
variant? ...
variant-accessor ...))))
;; Compatibility bindings
(define-values (make-variant-name ...) (values variant-name ...)))))]
[(_ name pred-name variant ...)
;; Must be a bad variant...
(for ([variant (in-list (syntax->list #'(variant ...)))])
(syntax-case variant ()
[(variant-name field ...)
(let ([name #'variant-name])
(unless (identifier? name)
(raise-syntax-error
#f "expected an identifier for the variant name" stx name))
;; Must be a bad field:
(for ([field (in-list (syntax->list #'(field ...)))])
(syntax-case field ()
[(field-name field-pred)
(let ([name #'field-name])
(unless (identifier? name)
(raise-syntax-error
#f "expected an identifier for the field name" stx name)))]
[_else
(raise-syntax-error
#f "expected a field name followed by a predicate expression, all in parentheses" stx field)])))]
[_else
(raise-syntax-error
#f "expected a variant name followed by a sequence of field declarations, all in parentheses" stx variant)]))]
[(_ name)
(raise-syntax-error
#f "missing predicate name and variant clauses" stx)]))
(define-syntax (cases stx)
(syntax-case stx ()
[(_ datatype expr
clause
...)
;; Get datatype information:
(let ([dt (and (identifier? #'datatype)
(syntax-local-value #'datatype (lambda () #f)))])
(unless (dt? dt)
(raise-syntax-error 'cases "not a datatype name" stx #'datatype))
;; Parse clauses:
(define-values (vts field-idss bodys else-body)
(let loop ([clauses (syntax->list #'(clause ...))]
[saw-cases null])
(if (null? clauses)
(values null null null #f)
(let ([clause (car clauses)])
(syntax-case* clause ()
(lambda (a b)
(and (eq? (syntax-e b) 'else)
(not (identifier-binding b))))
[(variant (field-id ...) body0 body1 ...)
(let* ([variant #'variant]
[vt (ormap (lambda (dtv)
(define vt-name (vt-name-stx dtv))
(and (free-identifier=? variant vt-name)
dtv))
(dt-variants dt))]
[orig-variant (and vt (vt-name-stx vt))])
(unless orig-variant
(raise-syntax-error
#f
(format "not a variant of `~a'"
(syntax->datum #'datatype))
stx
variant))
(let ([field-ids (syntax->list #'(field-id ...))])
(for ([fid (in-list field-ids)])
(unless (identifier? fid)
(raise-syntax-error
#f "expected an identifier for a field" stx fid)))
(let ([dtv (variant-assq variant (dt-variants dt))])
(unless (= (length field-ids) (vt-field-count dtv))
(raise-syntax-error
#f
(format
"variant case `~a' for `~a' has wrong field count (expected ~a, found ~a)"
(syntax->datum variant)
(syntax->datum #'datatype)
(vt-field-count dtv)
(length field-ids))
stx
clause)))
;; Check for duplicate local field ids:
(let ([dup (check-duplicate-identifier field-ids)])
(when dup
(raise-syntax-error
#f "duplicate field identifier" stx dup)))
;; Check for redundant case:
(when (memq orig-variant saw-cases)
(raise-syntax-error #f "duplicate case" stx clause))
;; This clause is ok:
(let-values ([(vts idss bodys else)
(loop (cdr clauses) (cons orig-variant saw-cases))])
(values (cons vt vts)
(cons field-ids idss)
(cons #'(begin body0 body1 ...) bodys)
else))))]
[(else body0 body1 ...)
(begin
(unless (null? (cdr clauses))
(raise-syntax-error
#f "else clause must be last" stx clause))
(values null null null #'(begin body0 body1 ...)))]
[_else (raise-syntax-error #f "bad clause" stx clause)])))))
;; Missing any variants?
(unless (or else-body (= (length vts) (length (dt-variants dt))))
(define here (map vt-name-stx vts))
(define missing
(let loop ([l (dt-variants dt)])
(cond [(null? l) ""]
[(ormap (lambda (i) (free-identifier=? (vt-name-stx (car l)) i)) here)
(loop (cdr l))]
[else (format " ~a~a"
(syntax-e (vt-name-stx (car l)))
(loop (cdr l)))])))
(raise-syntax-error
#f
(format "missing cases for the following variants:~a" missing)
stx))
;; Create the result:
(with-syntax ([pred (dt-pred-stx dt)]
[(variant? ...) (map vt-predicate-stx vts)]
[((field-extraction ...) ...)
(for/list ([vt (in-list vts)])
(with-syntax ([accessor (vt-accessor-stx vt)])
(let loop ([n 0])
(if (= n (vt-field-count vt))
null
(cons #`(accessor v #,n)
(loop (add1 n)))))))]
[((field-id ...) ...) field-idss]
[(body ...) bodys]
[else-body (or else-body
#'(error 'cases "no variant case matched"))])
#'(let ([v expr])
(if (not (pred v))
(error 'cases "not a ~a: ~s" (quote datatype) v)
(cond
[(variant? v)
(let ([field-id field-extraction] ...)
body)]
...
[else else-body])))))]))
(define-syntax (provide-datatype stx)
(syntax-case stx ()
[(_ datatype)
(let ([dt (syntax-local-value #'datatype (lambda () #f))])
(unless (dt? dt)
(raise-syntax-error #f "not a datatype name" stx #'datatype))
(with-syntax ([pred (dt-pred-stx dt)]
[(orig-variant ...) (map vt-name-stx (dt-variants dt))])
#'(provide datatype pred orig-variant ...)))]))
(provide define-datatype cases provide-datatype)
| true |
7333284ccd046db0969e04ccfa6e15f9708d11eb | e6969e1cc53363c196847adad7b64210c73b454e | /2020/day11.rkt | 52d3035a31ff36d92cff85be6950167ddf224169 | [] | no_license | hencq/advent | 885cc76ecaec3f1ffc08a3a6f935ae2110d64ead | 1673446fbaff56a34cfcabdf2df34546e5b803b6 | refs/heads/master | 2022-12-24T20:20:33.900535 | 2022-12-20T03:54:35 | 2022-12-20T03:54:35 | 194,719,469 | 0 | 1 | null | 2020-03-12T23:25:15 | 2019-07-01T17:57:08 | Racket | UTF-8 | Racket | false | false | 2,449 | rkt | day11.rkt | #lang racket
(require "../utils.rkt")
(define test (string-split "L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL"
"\n"))
(define test-area (read-area test ))
(area-dimensions test-area)
(define (adj-occupied area sq)
(define x (car sq))
(define y (cdr sq))
(for/sum ([dx (in-list (list -1 0 1 1 1 0 -1 -1))]
[dy (in-list (list -1 -1 -1 0 1 1 1 0))]
#:when (equal? (hash-ref area (cons (+ x dx) (+ y dy)) #f) #\#))
1))
(adj-occupied test-area (cons 0 0))
(define (seat-step area [adj-fun adj-occupied] [max-adj 4])
(for/hash ([(k v) (in-hash area)])
(cond
[(and (eq? v #\L) (= (adj-fun area k) 0)) (values k #\#)]
[(and (eq? v #\#) (>= (adj-fun area k) max-adj)) (values k #\L)]
[else (values k v)])))
(define (seat-run area [adj-fun adj-occupied] [adj-max 4] #:max [max #f])
(let loop ([area area]
[i 0])
(if (and max (> i max))
area
(let ([new-area (seat-step area adj-fun adj-max)])
(if (equal? area new-area)
new-area
(loop new-area (add1 i)))))))
(define (count-occupied area)
(length (filter (lambda (s) (eq? s #\#)) (hash-values area))))
(print-area (seat-step (seat-step test-area)))
(print-area test-area)
(adj-occupied (seat-step test-area) (cons 3 0))
(print-area (seat-run test-area))
(count-occupied (seat-run test-area))
(define input (read-area (file->lines "input11.txt")))
(count-occupied (seat-run input))
;;(count-occupied (seat-run input 1))
;; part 2
(define (cast-ray area sq dir)
(let loop ([sq sq])
(define new-sq (cons (+ (car sq) (car dir)) (+ (cdr sq) (cdr dir))))
(if (not (hash-has-key? area new-sq))
0
(let ([occ (hash-ref area new-sq)])
(cond
[(eq? occ #\#) 1]
[(eq? occ #\L) 0]
[(eq? occ #\.) (loop new-sq)])))))
(define (count-cast-adj area sq)
(for/sum ([i (in-list (list -1 0 1 1 1 0 -1 -1))]
[j (in-list (list -1 -1 -1 0 1 1 1 0))])
(cast-ray area sq (cons i j))))
(count-occupied (seat-run input count-cast-adj 5))
(define test-area2 (read-area (string-split ".......#.
...#.....
.#.......
.........
..#L....#
....#....
.........
#........
...#....." "\n")))
(define test-area3 (read-area (string-split ".##.##.
#.#.#.#
##...##
...L...
##...##
#.#.#.#
.##.##." "\n")))
(define test-area4 (read-area))
| false |
c8f715892b4d6b147b26040195ec00badffa8937 | 82c76c05fc8ca096f2744a7423d411561b25d9bd | /typed-racket-lib/typed/racket/no-check.rkt | f738ffa1fc37d1f6b6c7d8a3e64a730a5982ff3c | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | racket/typed-racket | 2cde60da289399d74e945b8f86fbda662520e1ef | f3e42b3aba6ef84b01fc25d0a9ef48cd9d16a554 | refs/heads/master | 2023-09-01T23:26:03.765739 | 2023-08-09T01:22:36 | 2023-08-09T01:22:36 | 27,412,259 | 571 | 131 | NOASSERTION | 2023-08-09T01:22:41 | 2014-12-02T03:00:29 | Racket | UTF-8 | Racket | false | false | 288 | rkt | no-check.rkt | #lang typed-racket/minimal
(require racket/require typed/private/no-check-helper
(subtract-in typed/racket typed/private/no-check-helper)
(for-syntax racket/base))
(provide (all-from-out typed/racket typed/private/no-check-helper)
(for-syntax (all-from-out racket/base)))
| false |
ed3996b863b363c571333a1096d89947da78ec99 | 06fae4363351f7623b27bee0e9a4f04edf8601d1 | /noapp-reader.rkt | c4b79365a9b4f674e9b55494bf6bbc81daa8cd92 | [] | no_license | rntz/noapp | 2bcb8ab6e22441126c8dfac5d90566fe28903780 | 76f183363f2b7afeff6535f623daf5b82e69ee74 | refs/heads/master | 2021-01-18T22:15:45.019036 | 2017-03-09T00:00:19 | 2017-03-09T00:00:19 | 84,375,307 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 1,517 | rkt | noapp-reader.rkt | #lang racket
(provide noapp-read noapp-read-syntax use-noapp-reader! make-noapp-readtable)
(require syntax/readerr)
(define (use-noapp-reader!)
(current-readtable (make-noapp-readtable)))
(define (noapp-read in)
(parameterize ([current-readtable (make-noapp-readtable)])
(read in)))
(define (noapp-read-syntax src in)
(parameterize ([current-readtable (make-noapp-readtable)])
(read-syntax src in)))
(define (make-noapp-readtable)
(make-readtable (current-readtable)
#\{ 'terminating-macro (brackets-reader #\} '#%call)
#\[ 'terminating-macro (brackets-reader #\] '#%call)))
(define ((brackets-reader end-char symbol-to-add)
char in src line col pos)
;; keep reading until I find `end-char`.
(let loop ([so-far '()])
(skip-whitespace in)
;; TODO: make error messages match up with racket defaults.
(cond
[(equal? end-char (peek-char in))
(read-char in)
(define-values (_a _b end-pos) (port-next-location in))
(datum->syntax #f
(cons symbol-to-add (reverse so-far))
(vector src line col pos (and pos (- end-pos pos))))]
[#t
(define next (read-syntax src in))
(if (eof-object? next)
;; TODO: proper error here.
(raise-read-eof-error "unexpected EOF" src line col pos #f)
;; keep going
(loop (cons next so-far)))])))
(define (skip-whitespace in) (regexp-match #px"^\\s*" in))
(define (test s) (noapp-read (open-input-string s)))
| false |
ef9e33c239431eec20b5b8d3e623a917305e269c | a2382cc68a29984b21ad2bd8a43048b2776472a2 | /lib/uinput.rkt | 99c9305cce3ed02406665d23b049d7d051a30896 | [] | no_license | JacobGinsparg/yomi-lang | 5d0710554c53d15db25b27db1c02e44a6aa34648 | 24fd2b282d341ce698f75fdd716c97cb17670868 | refs/heads/master | 2021-01-25T10:01:01.379800 | 2018-04-17T03:12:39 | 2018-04-17T03:12:39 | 123,335,388 | 0 | 0 | null | 2018-04-17T03:12:40 | 2018-02-28T19:58:33 | null | UTF-8 | Racket | false | false | 3,634 | rkt | uinput.rkt | ; Device that emulates a keyboard using the Linux kernel's uinput module.
#lang racket
(require ffi/unsafe
ffi/unsafe/define)
(provide setup
press
hold
release
teardown)
; EventType and EventCode values are lifted from:
; https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h
; An EventType is an Integer
(define EV-KEY #x1)
(define EV-SYN #x0)
; An EventCode is an Integer
(define SYN-REPORT 0)
(define KEY-Q 16)
(define KEY-W 17)
(define KEY-E 18)
(define KEY-R 19)
(define KEY-T 20)
(define KEY-Y 21)
(define KEY-U 22)
(define KEY-I 23)
(define KEY-O 24)
(define KEY-P 25)
(define KEY-UP 103)
(define KEY-LEFT 105)
(define KEY-RIGHT 106)
(define KEY-DOWN 108)
; A KeyState is either 1 or 0; signifies whether a key is pressed or released.
; A FileDescriptor is an Integer representing a file descriptor.
; ------------------------------------------------------------------------------
; uinput FFI bindings
(define-ffi-definer define-uinput (ffi-lib "linux_uinput"))
; setup_uinput_device: Void -> FileDescriptor
; Initializes the uinput device and returns a file descriptor to /dev/uinput
(define-uinput setup_uinput_device (_fun -> _int))
; teardown_uinput_device: FileDescriptor -> Void
; Closes the given file descriptor
(define-uinput teardown_uinput_device (_fun _int -> _void))
; emit: FileDescriptor EventType EventCode KeyState
; Write an input event
(define-uinput emit (_fun _int _int _int _int -> _void))
; ------------------------------------------------------------------------------
; Implementation of device interface
; File descriptor
(define fd -1)
(define INPUT-KEY-MAPPING
(hash
'b1 KEY-Q
'b2 KEY-W
'b3 KEY-E
'b4 KEY-R
'b5 KEY-T
'b6 KEY-Y
'b7 KEY-U
'b8 KEY-I
'start KEY-O
'select KEY-P
'up KEY-UP
'down KEY-DOWN
'back KEY-LEFT
'forward KEY-RIGHT))
; setup: Void -> Void
; Initializes the uinput device and sets up the file descriptor
(define (setup)
(set! fd (setup_uinput_device))
(when (< fd 0)
(error 'setup "failed to initialize uinput device")))
; press: . Input -> Void
; Instantaneously hold and release the given Inputs
(define (press . inputs)
(error-if-uninitialized 'press)
(let ([keys (map input->key inputs)])
(for-each (lambda (k) (emit fd EV-KEY k 1)) keys)
(for-each (lambda (k) (emit fd EV-KEY k 0)) keys)
(emit fd EV-SYN SYN-REPORT 0)))
; hold: . Input -> Void
; Start holding all of the given Inputs
(define (hold . inputs)
(error-if-uninitialized 'hold)
(let ([keys (map input->key inputs)])
(for-each (lambda (k) (emit fd EV-KEY k 1)) keys)
(emit fd EV-SYN SYN-REPORT 0)))
; release: . Input -> Void
; Release all of the given Inputs
(define (release . inputs)
(error-if-uninitialized 'release)
(let ([keys (map input->key inputs)])
(for-each (lambda (k) (emit fd EV-KEY k 0)) keys)
(emit fd EV-SYN SYN-REPORT 0)))
; teardown: Void -> Void
; Removes the uinput device and closes the file descriptor
(define (teardown)
(error-if-uninitialized 'teardown)
(teardown_uinput_device fd)
(set! fd -1))
; error-if-uninitialized: Symbol -> Void
; Throw an error if the uinput device isn't running
(define (error-if-uninitialized sym)
(when (< fd 0)
(error sym "device not initialized; run setup")))
; input->key: Input -> EventCode
; Return the kernel input event code that corresponds to the given Input
(define (input->key i)
(hash-ref INPUT-KEY-MAPPING i)) | false |
6f057d29ada3f4667c29eaca9e7c0fca7545cdf5 | 98fd12cbf428dda4c673987ff64ace5e558874c4 | /sicp/v3/1.1/xiyang/ex1.5.rkt | ff7076af7fc64a9ac2c0e5357e62d20976f3a706 | [
"Unlicense"
] | permissive | CompSciCabal/SMRTYPRTY | 397645d909ff1c3d1517b44a1bb0173195b0616e | a8e2c5049199635fecce7b7f70a2225cda6558d8 | refs/heads/master | 2021-12-30T04:50:30.599471 | 2021-12-27T23:50:16 | 2021-12-27T23:50:16 | 13,666,108 | 66 | 11 | Unlicense | 2019-05-13T03:45:42 | 2013-10-18T01:26:44 | Racket | UTF-8 | Racket | false | false | 196 | rkt | ex1.5.rkt | ;; Ex1.5
#lang racket
(define (p) (p))
(define (test x y)
(if (= x 0) 0 y))
(define (normal-test x y)
((if (= (x) 0)
(lambda () 0)
y)))
(test 0 (normal-test (lambda () 0) p)) | false |
e308d439fe6ec9287d30ccccef12105b0b1028d8 | f5da4884c236512f9a945100234e213e51f980d3 | /serval/arm64/interp/define.rkt | a1e693551e8bd9338695b609a5fc7445f80ba4e7 | [
"MIT"
] | permissive | uw-unsat/serval | 87574f5ec62480463ae976468d4ae7a56e06fe9f | 72adc4952a1e62330aea527214a26bd0c09cbd05 | refs/heads/master | 2022-05-12T23:19:48.558114 | 2022-01-20T18:53:26 | 2022-01-20T18:53:26 | 207,051,966 | 45 | 12 | MIT | 2022-03-21T14:05:50 | 2019-09-08T02:40:10 | Racket | UTF-8 | Racket | false | false | 2,619 | rkt | define.rkt | #lang rosette
(require
(for-syntax
(only-in racket/syntax format-id))
"../base.rkt"
"../decode.rkt")
(provide define-insn)
; The main macro for defining instructions.
(define-syntax (define-insn stx)
(syntax-case stx ()
[(_ (arg ...) #:encode encode [(field ...) op interp] ...)
#'(begin
(struct op (arg ...)
#:transparent
#:guard (lambda (arg ... name)
(values
; split for type checking
(for/all ([arg arg #:exhaustive])
(guard arg)
arg) ...))
#:methods gen:instruction
[(define (instruction-encode insn)
(define lst
(match-let ([(op arg ...) insn])
((lambda (arg ...) (encode field ...)) arg ...)))
(apply concat (map (lambda (x) (if (box? x) (unbox x) x)) lst)))
(define (instruction-run insn cpu)
(match-let ([(op arg ...) insn])
(interp cpu arg ...)))]) ...
(add-decoder op
((lambda (arg ...) (encode field ...)) (typeof arg) ...))
... )]))
; Type checking guards.
(define-syntax-rule (guard v)
(let ([type (typeof v)])
(define expr
(cond
[(box? type)
(set! type (unbox type))
(and (box? v) (type (unbox v)))]
[else
(type v)]))
(assert expr (format "~a: expected type ~a" v type))))
(define-syntax (typeof stx)
(syntax-case stx ()
[(_ arg)
(with-syntax ([type (format-id stx "typeof-~a" (syntax-e #'arg))])
#'type)]))
(define typeof-cond (bitvector 4))
(define typeof-hw (bitvector 2))
(define typeof-imm6 (bitvector 6))
(define typeof-imm7 (bitvector 7))
(define typeof-immr (bitvector 6))
(define typeof-imms (bitvector 6))
(define typeof-imm12 (bitvector 12))
(define typeof-imm16 (bitvector 16))
(define typeof-imm19 (bitvector 19))
(define typeof-imm26 (bitvector 26))
(define typeof-op2 (bitvector 2))
(define typeof-opc (bitvector 2))
(define typeof-option (bitvector 3))
(define typeof-sf (bitvector 1))
(define typeof-sh (bitvector 1))
(define typeof-shift (bitvector 2))
(define typeof-size (bitvector 2))
(define typeof-A (bitvector 1))
(define typeof-N (bitvector 1))
(define typeof-R (bitvector 1))
(define typeof-Ra (box (bitvector 5)))
(define typeof-Rd (box (bitvector 5)))
(define typeof-Rm (box (bitvector 5)))
(define typeof-Rn (box (bitvector 5)))
(define typeof-Rs (box (bitvector 5)))
(define typeof-Rt (box (bitvector 5)))
(define typeof-Rt2 (box (bitvector 5)))
(define typeof-S (bitvector 1))
| true |
7274f804bc6e44486b88253f0614ba122d7a97df | 1b502c13db43a671b92d72298abcd172f856207d | /keyword-lambda/kw-apply.rkt | 68a4aa0ae85b64582657cd2ccb99fd377bf934bf | [
"MIT"
] | permissive | AlexKnauth/hash-lambda | cbf79bc80d049e94432ff8cd889372c087b1197f | 0f7a89d7056c8d9f86497e0eff159d142f74aed7 | refs/heads/master | 2022-08-08T09:43:40.057434 | 2022-07-23T16:37:50 | 2022-07-23T16:37:50 | 18,124,318 | 0 | 1 | null | 2015-08-05T23:38:31 | 2014-03-26T02:24:29 | Racket | UTF-8 | Racket | false | false | 89 | rkt | kw-apply.rkt | #lang racket/base
(require kw-utils/kw-apply)
(provide (all-from-out kw-utils/kw-apply))
| false |
8ba99ddbda1f92c45adace6cdb2346d58a254b23 | 260f6f881a0964c3981186bb290b014882710a10 | /2021/racket/day11.rkt | 7f1a5726d818eb67da566fa702e27660a59df4aa | [] | no_license | brprice/advent-of-code | 3a03e780fe18fb6eb58a83c5c13d5b1e1558b9e7 | e2e83e035edb0a1de2cd3de31aabde79f6aa8585 | refs/heads/master | 2023-04-28T22:34:37.414670 | 2021-12-25T17:24:06 | 2021-12-25T17:27:17 | 228,043,018 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 2,590 | rkt | day11.rkt | #lang racket
(define (string->numbers s)
(map (lambda (c) (string->number (list->string (list c)))) (string->list s)))
(define (with-data f)
(call-with-input-file
"../data/day11"
(let ([g (lambda (l) (map (compose string->number list->string list)
(string->list l)))])
(lambda (p)
(let* ([ls (in-lines p)]
[l1 (g (sequence-ref ls 0))]
[w (length l1)]
[res (sequence-fold (lambda (acc l) (cons (add1 (car acc)) (append (cdr acc) (g l))))
(cons 1 l1) ls)]
[h (car res)]
[v (list->vector (cdr res))])
(f (vec2 w h v)))))))
(define (with-test-data f)
(let ([data '(5 4 8 3 1 4 3 2 2 3
2 7 4 5 8 5 4 7 1 1
5 2 6 4 5 5 6 1 7 3
6 1 4 1 3 3 6 1 4 6
6 3 5 7 3 8 5 4 7 8
4 1 6 7 5 2 4 6 4 5
2 1 7 6 8 4 1 7 2 1
6 8 8 2 8 8 1 1 3 4
4 8 4 6 8 4 8 5 5 4
5 2 8 3 7 5 1 5 2 6)])
(f (vec2 10 10 (apply vector data)))))
(define (vec2 x y v)
(list v x y (lambda (i j) (+ i (* x j)))))
(define (vec2-width xs) (cadr xs))
(define (vec2-height xs) (caddr xs))
(define (vec2-lookup xs i j) (vector-ref (car xs) ((cadddr xs) i j)))
(define (vec2-set! xs i j v) (vector-set! (car xs) ((cadddr xs) i j) v))
(define (vec2-data xs) (car xs))
(define (adjacent-idx v2 i j)
(for*/list ([u '(-1 0 1)]
[v '(-1 0 1)]
#:unless (and (eq? u 0) (eq? v 0))
[iu (list (+ i u))]
[jv (list (+ j v))]
#:unless (> 0 iu)
#:unless (> 0 jv)
#:unless (>= iu (vec2-width v2))
#:unless (>= jv (vec2-height v2)))
(list iu jv)))
(define (step v2)
(let* ([flashes 0]
[sparks '()]
[inc (lambda (i j)
(let ([x (vec2-lookup v2 i j)])
(if (<= 9 x)
(begin (set! sparks (cons (list i j) sparks))
(vec2-set! v2 i j -100))
(vec2-set! v2 i j (add1 x)))))])
(for* ([i (vec2-width v2)]
[j (vec2-height v2)])
(inc i j))
(do ()
((null? sparks))
(let ([ij (car sparks)])
(set! flashes (add1 flashes))
(set! sparks (cdr sparks))
(map (curry apply inc) (apply adjacent-idx v2 ij))))
(for* ([i (vec2-width v2)]
[j (vec2-height v2)]
[x (list (vec2-lookup v2 i j))])
(when (> 0 x) (vec2-set! v2 i j 0)))
(cons flashes v2)))
(define (part1 xs)
(let ([flashes 0])
(do ([i 0 (add1 i)])
((eq? i 100) flashes)
(set! flashes (+ flashes (car (step xs)))))))
(printf "part 1: ~a\n"
(with-data part1))
(define (part2 xs)
(do ([i 0 (add1 i)])
((eq? (vector-length (vec2-data xs)) (vector-count (curry eq? 0) (vec2-data xs))) i)
(step xs)
))
(printf "part 2: ~a\n"
(with-data part2))
| false |
dfaf8f21af8f2931417a2f3412f144feca541ad4 | 00ff1a1f0fe8046196c043258d0c5e670779009b | /doc/guide/scribble/datatypes/boxes.scrbl | cf642c94d91c7ead2247d636cb3a912fad54a2b2 | [
"BSD-2-Clause"
] | permissive | edbutler/rosette | 73364d4e5c25d156c0656b8292b6d6f3d74ceacf | 55dc935a5b92bd6979e21b5c12fe9752c8205e7d | refs/heads/master | 2021-01-14T14:10:57.343419 | 2014-10-26T05:12:03 | 2014-10-26T05:12:03 | 27,899,312 | 1 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 572 | scrbl | boxes.scrbl | #lang scribble/manual
@(require (for-label
rosette/base/define racket)
scribble/core scribble/html-properties scribble/eval racket/sandbox
"../util/lifted.rkt")
@(define box-ops (select '(box? box box-immutable unbox set-box! box-cas!)))
@title[#:tag "sec:box"]{Boxes}
A box is a single (im)mutable storage cell, which behaves like a one-element (im)mutable @seclink["sec:vec"]{vector}.
Lifted box operations are shown below.
@tabular[#:style (style #f (list (attributes '((id . "lifted")(class . "boxed")))))
(list (list @box-ops))]
| false |
428b886ff23d1fd923bb6dcca65f9e2c45daa1d0 | d5aa82d7071cfbe382ecc4d6621137fb385181e6 | /eval_tasks/weather-average.rkt | a4d72de6787961c8d82403328d0dfed81a97d1e8 | [
"MIT"
] | permissive | schuster/aps-conformance-checker | ff809d238047fbf327cb9695acb51b91a0f5272f | d9bf0c93af2c308f453d9aaf17a2eed9b6606a89 | refs/heads/master | 2021-01-19T11:41:56.847873 | 2019-03-11T12:56:52 | 2019-03-11T12:56:52 | 87,989,503 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 123 | rkt | weather-average.rkt | #lang racket
(require
"../check-pair.rkt"
"../examples/weather-average.rkt")
(check-pair weather-program manager-spec)
| false |
5579ec36953eb9ec0a6d478dd556fe21875ec481 | 13b4b00dde31010c4a0bd6060d586172beea97a5 | /turnstile/examples/tests/rosette/rosette2-tests.rkt | efedb3afd9b485b66f881700bdd43ee1f23a3932 | [] | no_license | michaelballantyne/macrotypes | 137691348f15b6e663596dd7296e942c2febe82a | d113663b55d04995b05defb6254ca47594f9ec05 | refs/heads/master | 2021-07-14T11:06:53.567849 | 2018-02-08T19:17:07 | 2018-02-08T19:17:07 | 106,596,122 | 0 | 0 | null | 2020-10-04T19:18:55 | 2017-10-11T18:53:33 | Racket | UTF-8 | Racket | false | false | 15,285 | rkt | rosette2-tests.rkt | #lang s-exp "../../rosette/rosette2.rkt"
(require "../rackunit-typechecking.rkt"
"check-type+asserts.rkt")
;; subtyping among concrete
(check-type ((λ ([x : CPosInt]) x) ((λ ([x : CPosInt]) x) 1)) : CPosInt -> 1)
(check-type ((λ ([x : CZero]) x) ((λ ([x : CZero]) x) 0)) : CZero -> 0)
(check-type ((λ ([x : CNegInt]) x) ((λ ([x : CNegInt]) x) -1)) : CNegInt -> -1)
(check-type ((λ ([x : PosInt]) x) ((λ ([x : PosInt]) x) 1)) : PosInt -> 1)
(check-type ((λ ([x : Zero]) x) ((λ ([x : Zero]) x) 0)) : Zero -> 0)
(check-type ((λ ([x : NegInt]) x) ((λ ([x : NegInt]) x) -1)) : NegInt -> -1)
(check-type ((λ ([x : CNat]) x) ((λ ([x : CZero]) x) 0)) : CNat -> 0)
(check-type ((λ ([x : CNat]) x) ((λ ([x : CPosInt]) x) 1)) : CNat -> 1)
(check-type ((λ ([x : CNat]) x) ((λ ([x : CNat]) x) 1)) : CNat -> 1)
(typecheck-fail ((λ ([x : CPosInt]) x) ((λ ([x : CNat]) x) 1)))
(check-type ((λ ([x : Nat]) x) ((λ ([x : Zero]) x) 0)) : Nat -> 0)
(check-type ((λ ([x : Nat]) x) ((λ ([x : PosInt]) x) 1)) : Nat -> 1)
(check-type ((λ ([x : Nat]) x) ((λ ([x : Nat]) x) 1)) : Nat -> 1)
(typecheck-fail ((λ ([x : PosInt]) x) ((λ ([x : Nat]) x) 1)))
(check-type ((λ ([x : CInt]) x) ((λ ([x : CNegInt]) x) -1)) : CInt -> -1)
(check-type ((λ ([x : CInt]) x) ((λ ([x : CZero]) x) 0)) : CInt -> 0)
(check-type ((λ ([x : CInt]) x) ((λ ([x : CPosInt]) x) 1)) : CInt -> 1)
(check-type ((λ ([x : CInt]) x) ((λ ([x : CNat]) x) 1)) : CInt -> 1)
(check-type ((λ ([x : CInt]) x) ((λ ([x : CInt]) x) 1)) : CInt -> 1)
(typecheck-fail ((λ ([x : CPosInt]) x) ((λ ([x : CInt]) x) 1)))
(typecheck-fail ((λ ([x : CNat]) x) ((λ ([x : CInt]) x) 1)))
(check-type ((λ ([x : Int]) x) ((λ ([x : NegInt]) x) -1)) : Int -> -1)
(check-type ((λ ([x : Int]) x) ((λ ([x : Zero]) x) 0)) : Int -> 0)
(check-type ((λ ([x : Int]) x) ((λ ([x : PosInt]) x) 1)) : Int -> 1)
(check-type ((λ ([x : Int]) x) ((λ ([x : Nat]) x) 1)) : Int -> 1)
(check-type ((λ ([x : Int]) x) ((λ ([x : Int]) x) 1)) : Int -> 1)
(typecheck-fail ((λ ([x : PosInt]) x) ((λ ([x : Int]) x) 1)))
(typecheck-fail ((λ ([x : Nat]) x) ((λ ([x : Int]) x) 1)))
;; illustrates flattening
(define-type-alias A Int)
(define-type-alias B CString)
(define-type-alias C Bool)
(define-type-alias AC (U A C))
(define-type-alias BC (U B C))
(define-type-alias A-BC (U A BC))
(define-type-alias B-AC (U B AC))
(check-type ((λ ([x : A-BC]) x) ((λ ([x : B-AC]) x) "1")) : A-BC -> "1")
(check-type ((λ ([x : A-BC]) x) ((λ ([x : AC]) x) #t)) : A-BC -> #t)
(check-type ((λ ([x : B-AC]) x) ((λ ([x : A-BC]) x) "1")) : A-BC -> "1")
(check-type ((λ ([x : B-AC]) x) ((λ ([x : BC]) x) "1")) : A-BC -> "1")
(typecheck-fail ((λ ([x : BC]) x) ((λ ([x : B-AC]) x) "1")))
(typecheck-fail ((λ ([x : AC]) x) ((λ ([x : B-AC]) x) "1")))
;; subtyping between concrete and symbolic types
(check-type ((λ ([x : Int]) x) ((λ ([x : CInt]) x) 1)) : Int -> 1)
(typecheck-fail ((λ ([x : CInt]) x) ((λ ([x : Int]) x) 1)))
(check-type ((λ ([x : Bool]) x) ((λ ([x : CBool]) x) #t)) : Bool -> #t)
(typecheck-fail ((λ ([x : CBool]) x) ((λ ([x : Bool]) x) #t)))
(check-type ((λ ([x : (U CInt CBool)]) x) ((λ ([x : (CU CInt CBool)]) x) 1)) : (U CInt CBool))
(typecheck-fail ((λ ([x : (CU CInt CBool)]) x) ((λ ([x : (U CInt CBool)]) x) 1)))
(check-type ((λ ([x : (U Int Bool)]) x) ((λ ([x : (U CInt CBool)]) x) 1)) : (U CInt CBool))
(check-type ((λ ([x : (U CInt CBool)]) x) ((λ ([x : (U Int Bool)]) x) 1)) : (U CInt CBool))
;; add1 has a case-> type with cases for different subtypes of Int
;; to preserve some of the type information through the operation
(check-type (add1 9) : CPosInt -> 10)
(check-type (add1 0) : CPosInt -> 1)
(check-type (add1 -1) : (CU CNegInt CZero) -> 0)
(check-type (add1 -9) : (CU CNegInt CZero) -> -8)
(check-type (add1 (ann 9 : PosInt)) : PosInt -> 10)
(check-type (add1 (ann 0 : Zero)) : PosInt -> 1)
(check-type (add1 (ann 9 : Nat)) : PosInt -> 10)
(check-type (add1 (ann 0 : Nat)) : PosInt -> 1)
(check-type (add1 (ann -1 : NegInt)) : (U NegInt Zero) -> 0)
(check-type (add1 (ann -9 : NegInt)) : (U NegInt Zero) -> -8)
(check-type (add1 (ann 9 : Int)) : Int -> 10)
;; sub1 has a similar case-> type
(check-type (sub1 10) : CNat -> 9)
(check-type (sub1 0) : CNegInt -> -1)
(check-type (sub1 -1) : CNegInt -> -2)
(check-type (sub1 (ann 10 : PosInt)) : Nat -> 9)
(check-type (sub1 (ann 0 : Zero)) : NegInt -> -1)
(check-type (sub1 (ann -1 : NegInt)) : NegInt -> -2)
(check-type (+ 1 10) : CNat -> 11)
(check-type (+ -10 10) : CInt -> 0)
(check-type (+ (ann 1 : PosInt) (ann 10 : PosInt)) : Nat -> 11)
(check-type (+ (ann -10 : NegInt) (ann 10 : PosInt)) : Int -> 0)
;; if tests
;; if expr has concrete type only if test and both branches are concrete
(check-type (if #t 1 #f) : (CU CBool CInt))
(check-type (if #t 1 #f) : (U CBool CInt))
(check-type (if #t 1 #f) : (U Bool CInt))
(check-type (if #t 1 #f) : (U Bool Int))
(check-type (if #t 1 2) : CInt)
(check-type (if #t 1 2) : Int)
(check-type (if #t 1 2) : (CU CInt CBool))
(check-type (if #t 1 2) : (U Int Bool))
;; non-bool test
(check-type (if 1 2 3) : CInt)
;; else, if expr produces symbolic type
(define-symbolic b0 boolean? : Bool)
(define-symbolic i0 integer? : Int)
(check-type (if b0 1 2) : Int)
(check-not-type (if b0 1 2) : CInt)
(check-type (if #t i0 2) : Int)
(check-not-type (if #t i0 2) : CInt)
(check-type (if #t 2 i0) : Int)
(check-not-type (if #t 2 i0) : CInt)
(check-type (if b0 i0 2) : Int)
(check-type (if b0 1 #f) : (U CInt CBool))
(check-type (if b0 1 #f) : (U Int Bool))
;; slightly unintuitive case: (U Int Bool) <: (U CInt Bool), ok for now (see notes)
(check-type (if #f i0 #f) : (U CInt CBool))
(check-type (if #f i0 #f) : (U CInt Bool))
(check-type (if #f i0 #f) : (U Int Bool))
(check-type (if #f (+ i0 1) #f) : (U Int Bool))
;; BVs
(check-type bv : (Ccase-> (C→ CInt CBVPred CBV)
(C→ CInt CPosInt CBV)))
(typecheck-fail (bv "1" 2) #:with-msg "expected.*Int.*given.*String")
(check-type (bv 1 2) : CBV -> (bv 1 (bitvector 2)))
(check-type (bv 1 (bitvector 2)) : CBV -> (bv 1 (bitvector 2)))
(typecheck-fail (bv (ann 1 : Int) 2) #:with-msg "expected.*CInt")
(typecheck-fail (bv (ann 1 : Int) (bitvector 2)) #:with-msg "expected.*CInt")
(typecheck-fail (bv 0 0) #:with-msg "expected.*PosInt.*given.*Zero")
(check-type bitvector : (C→ CPosInt CBVPred))
(check-type (bitvector 3) : CBVPred)
(typecheck-fail ((bitvector 4) 1))
(check-type ((bitvector 4) (bv 10 (bitvector 4))) : Bool)
(check-type (bitvector? "2") : Bool -> #f)
(check-type (bitvector? (bitvector 10)) : Bool -> #t)
;; bvops
(check-type (bveq (bv 1 3) (bv 1 3)) : Bool -> #t)
(typecheck-fail (bveq (bv 1 3) 1))
(check-type (bveq (bv 1 2) (bv 1 3)) : Bool) ; -> runtime exn
(check-runtime-exn (bveq (bv 1 2) (bv 1 3)))
(clear-asserts!)
(check-type (bvand (bv -1 4) (bv 2 4)) : BV
-> (bv 2 4))
(check-type (bvor (bv 0 3) (bv 1 3)) : BV
-> (bv 1 3))
(check-type (bvxor (bv -1 5) (bv 1 5)) : BV
-> (bv -2 5))
;; examples from rosette guide
(check-type (bvand (bv -1 4) (bv 2 4)) : BV -> (bv 2 4))
(check-type (bvor (bv 0 3) (bv 1 3)) : BV -> (bv 1 3))
(check-type (bvxor (bv -1 5) (bv 1 5)) : BV -> (bv -2 5))
(define-symbolic b boolean? : Bool)
(check-type (bvand (bv -1 4) (if b (bv 3 4) (bv 2 4))) : BV
-> (if b (bv 3 4) (bv 2 4)))
(check-type (bvshl (bv 1 4) (bv 2 4)) : BV -> (bv 4 4))
(check-type (bvlshr (bv -1 3) (bv 1 3)) : BV -> (bv 3 3))
(check-type (bvashr (bv -1 5) (bv 1 5)) : BV -> (bv -1 5))
;; TODO: see rosette issue #23 --- issue closed, won't fix
(check-type (bvshl (bv -1 4) (if b (bv 3 4) (bv 2 4))) : BV)
(check-type (bvneg (bv -1 4)) : BV -> (bv 1 4))
(check-type (bvneg (bv 0 4)) : BV -> (bv 0 4))
(define-symbolic z (bitvector 3) : BV)
(check-type (bvneg z) : BV)
(check-type (bvadd (bv -1 4) (bv 2 4)) : BV -> (bv 1 4))
(check-type (bvsub (bv 0 3) (bv 1 3)) : BV -> (bv -1 3))
(check-type (bvmul (bv -1 5) (bv 1 5)) : BV -> (bv -1 5))
;; TODO: see rosette issue #23 --- issue closed, won't fix
(check-type (bvadd (bvadd (bv -1 4) (bv 2 4)) (if b (bv 1 4) (bv 3 4))) : BV)
(check-type (bvsdiv (bv -3 4) (bv 2 4)) : BV -> (bv -1 4))
(check-type (bvudiv (bv -3 3) (bv 2 3)) : BV -> (bv 2 3))
(check-type (bvsmod (bv 1 5) (bv 0 5)) : BV -> (bv 1 5))
(check-type (bvsrem (bv -3 4) (if b (bv 2 4) (bv 3 4))) : BV
-> (if b (bv -1 4) (bv 0 4)))
(check-type (concat (concat (bv -1 4) (bv 0 1)) (bv -1 3)) : BV -> (bv -9 8))
(check-type (concat (concat (bv -1 4) (if b (bv 0 1) (bv 0 2))) (bv -1 3)) : BV
-> (if b (bv -9 8) (bv -25 9)))
(check-type (extract 2 1 (bv -1 4)) : BV -> (bv -1 2))
(check-type (extract 3 3 (bv 1 4)) : BV -> (bv 0 1))
(define-symbolic i j integer? : Int)
(check-type (extract i j (bv 1 2)) : BV)
; -> {[(&& (= 0 j) (= 1 i)) (bv 1 2)] ...})
(check-type (sign-extend (bv -3 4) (bitvector 6)) : BV -> (bv -3 6))
(check-type (zero-extend (bv -3 4) (bitvector 6)) : BV -> (bv 13 6))
(define-symbolic c boolean? : Bool)
(check-type (zero-extend (bv -3 4) (if b (bitvector 5) (bitvector 6)))
: BV -> (if b (bv 13 5) (bv 13 6)))
(check-type+asserts
(zero-extend (bv -3 4) (assert-type (if b (bitvector 5) "bad") : BVPred))
: BV -> (bv 13 5) (list b))
(check-type+asserts (zero-extend (bv -3 4) (if c (bitvector 5) (bitvector 1)))
: BV -> (bv 13 5) (list c))
(check-type (bitvector->integer (bv -1 4)) : Int -> -1)
(check-type (bitvector->natural (bv -1 4)) : Int -> 15)
(check-type (bitvector->integer (if b (bv -1 3) (bv -3 4)))
: Int -> (if b -1 -3))
(check-type+asserts
(bitvector->integer (assert-type (if b (bv -1 3) "bad") : BV))
: Int -> -1 (list b))
(check-type (integer->bitvector 4 (bitvector 2)) : BV -> (bv 0 2))
(check-type (integer->bitvector 15 (bitvector 4)) : BV -> (bv -1 4))
(check-type+asserts (integer->bitvector (assert-type (if b pi 3) : Int)
(if c (bitvector 5) (bitvector 6)))
: BV -> (integer->bitvector 3 (if c (bitvector 5) (bitvector 6)))
(list (not b)))
;; TODO: check that CInt also has the right pred (do we want this?)
#;(check-type+asserts (integer->bitvector (assert-type (if b pi 3) : CInt)
(if c (bitvector 5) (bitvector 6)))
: BV -> (integer->bitvector 3 (if c (bitvector 5) (bitvector 6)))
(list (not b)))
(check-type (integer->bitvector 3
(if c (bitvector 5) (bitvector 6)))
: BV -> (if c (bv 3 5) (bv 3 6)))
;; case-> subtyping
(check-type ((λ ([f : (C→ Int Int)]) (f 10)) add1) : Int -> 11)
(check-type ((λ ([f : (Ccase-> (C→ Int Int))]) (f 10)) add1) : Int -> 11)
(check-type ((λ ([f : (Ccase-> (C→ Nat Nat)
(C→ Int Int))]) (f 10)) add1) : Int -> 11)
(check-not-type ((λ ([f : (Ccase-> (C→ Int Int))]) (f 10)) add1) : Nat)
(check-type ((λ ([f : (Ccase-> (C→ Nat Nat)
(C→ Int Int))]) (f 10)) add1) : Nat -> 11)
(typecheck-fail ((λ ([f : (Ccase-> (C→ Zero Zero)
(C→ Int Int))]) (f 10)) add1)
#:with-msg
(string-append "expected \\(Ccase-> \\(C→ Zero Zero\\) \\(C→ Int Int\\)\\), "
"given \\(Ccase-> .*\\(C→ NegInt \\(U NegInt Zero\\)\\) .*\\(C→ Zero PosInt\\) "
".*\\(C→ PosInt PosInt\\) .*\\(C→ Nat PosInt\\) .*\\(C→ Int Int\\)\\)"))
;; applying symbolic function types
(check-type ((λ ([f : (U (C→ CInt CInt))]) (f 10)) add1) : Int -> 11)
;; it's either (→ CInt CInt) or (→ CInt CBool), but not both, so
;; add1 can have this type even though it never returns a boolean
(check-type ((λ ([f : (U (C→ CInt CInt) (C→ CInt CBool))]) (f 10)) add1) : (U Int Bool) -> 11)
(check-type ((λ ([f : (U (C→ CInt CInt) (C→ CInt Bool))]) (f 10))
(if #t add1 positive?))
: (U CInt Bool) -> 11)
(check-type ((λ ([f : (U (C→ CInt CInt) (C→ CInt Bool))]) (f 10))
(if #t add1 positive?))
: (U Int Bool) -> 11)
;; concrete union of functions
(check-type ((λ ([f : (CU (C→ CInt CInt) (C→ CInt CBool))]) (f 10)) add1) : (CU CInt CBool) -> 11)
(check-type ((λ ([f : (CU (C→ CInt CInt) (C→ CInt CBool))]) (f 10))
(if #t add1 positive?))
: (CU CInt CBool) -> 11)
;; check BVPred as type annotation
;; CBV input annotation on arg is too restrictive to work as BVPred
(typecheck-fail ((λ ([bvp : BVPred]) bvp) (λ ([bv : CBV]) #t))
#:with-msg "expected BVPred.*given.*CBV")
(check-type ((λ ([bvp : BVPred]) bvp) (λ ([bv : BV]) #t)) : BVPred)
;; this should pass, but will not if BVPred is a case->
(check-type ((λ ([bvp : BVPred]) bvp) (λ ([bv : BV]) ((bitvector 2) bv))) : BVPred)
;; assert-type tests
(check-type+asserts (assert-type (sub1 10) : PosInt) : PosInt -> 9 (list))
(check-runtime-exn (assert-type (sub1 1) : PosInt))
(define-symbolic b1 b2 boolean? : Bool)
(check-type (clear-asserts!) : CUnit -> (void))
;; asserts directly on a symbolic union
(check-type+asserts (assert-type (if b1 1 #f) : Int) : Int -> 1 (list b1))
(check-type+asserts (assert-type (if b2 1 #f) : Bool) : Bool -> #f (list (not b2)))
;; asserts on the (pc)
(check-type+asserts (if b1 (assert-type 1 : Int) (assert-type #f : Int)) : Int
-> 1 (list b1))
(check-type+asserts (if b2 (assert-type 1 : Bool) (assert-type #f : Bool)) : Bool
-> #f (list (not b2)))
;; asserts on a define-symbolic value
(define-symbolic i1 integer? : Int)
(check-type+asserts (assert-type i1 : PosInt) : PosInt -> i1 (list (< 0 i1)))
(check-type+asserts (assert-type i1 : Zero) : Zero -> i1 (list (= 0 i1)))
(check-type+asserts (assert-type i1 : NegInt) : NegInt -> i1 (list (< i1 0)))
;; TODO: should this assertion be equivalent to (<= 0 i1) ?
(check-type+asserts (assert-type i1 : Nat) : Nat -> i1 (list (not (< i1 0))))
;; asserts on other terms involving define-symbolic values
(check-type+asserts (assert-type (+ i1 1) : PosInt) : PosInt -> (+ 1 i1) (list (< 0 (+ 1 i1))))
(check-type+asserts (assert-type (+ i1 1) : Zero) : Zero -> (+ 1 i1) (list (= 0 (+ 1 i1))))
(check-type+asserts (assert-type (+ i1 1) : NegInt) : NegInt -> (+ 1 i1) (list (< (+ 1 i1) 0)))
(check-type+asserts (assert-type (if b1 i1 b2) : Int) : Int -> i1 (list b1))
(check-type+asserts (assert-type (if b1 i1 b2) : Bool) : Bool -> b2 (list (not b1)))
;; asserts on the (pc)
(check-type+asserts (if b1 (assert-type i1 : Int) (assert-type b2 : Int)) : Int
-> i1 (list b1))
(check-type+asserts (if b1 (assert-type i1 : Bool) (assert-type b2 : Bool)) : Bool
-> b2 (list (not b1)))
;; TODO: should assert-type cause some predicates to return true or return false?
(check-type+asserts (integer? (assert-type (if b1 i1 b2) : Int)) : Bool -> #t (list b1))
(check-type+asserts (integer? (assert-type (if b1 i1 b2) : Bool)) : Bool -> #f (list (not b1)))
(check-type+asserts (boolean? (assert-type (if b1 i1 b2) : Int)) : Bool -> #f (list b1))
(check-type+asserts (boolean? (assert-type (if b1 i1 b2) : Bool)) : Bool -> #t (list (not b1)))
(check-type (asserts) : (CListof Bool) -> (list))
| false |
504f04a257b9733fe3dff33758b01afd21e3fab4 | 9101470cfbfc3c91e240e2a963fb3760744d9d25 | /guide/module.rkt | ed305a42a7dd5106836571a3002266a85d887439 | [
"MIT"
] | permissive | sylsaint/racket | 49e2fc01ccec8538d0d9b9d35f73b4b6772bfd93 | 5c11113e5247502e6e0ea877f2538dce508c36f2 | refs/heads/master | 2020-12-21T22:17:32.873776 | 2016-12-19T09:32:14 | 2016-12-19T09:43:25 | 59,442,778 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 336 | rkt | module.rkt | #lang slideshow
(require "graph.rkt")
(rainbow (square 10))
(require slideshow/code)
(code (circle 10))
(define-syntax pict+code
(syntax-rules ()
[(pict+code expr)
(hc-append 10
expr
(code expr))]))
(pict+code (square 10))
(provide pict+code) | true |
5876ef8e3cae3e9a6aa4beedac8611dcd4da555d | 811c9a224ba8db1b33a5d52771a2ffd2b8761a54 | /Sudoku.rkt | a80bdff6d6710cef0313a9eda4d80caff1cbc8ac | [] | no_license | IbrahimFazili/Sudoku-Solver | 27911b0797d1cd517cd8b74e9f2f98f2aa1e7732 | ddec920be294ecfb40465052891dc80f2ef2c6f0 | refs/heads/master | 2022-12-04T18:18:30.490566 | 2020-08-18T18:20:41 | 2020-08-18T18:20:41 | 288,048,223 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 3,096 | rkt | Sudoku.rkt | #lang racket
(require racket/control)
; This is the implementation of -< by the end of Lecture 14.
(define choices (box '()))
(define (add-choice! val) (set-box! choices (cons val (unbox choices))))
(define (get-choice!) (let* ([unboxed (unbox choices)]
[val (car unboxed)])
(begin (set-box! choices (cdr unboxed))
val)))
(define-syntax -<
(syntax-rules ()
[(-< expr) ; "when there's only candidate, there's only one choice"
expr]
; Multiple choices: return the first one and store the amb
; that produces all the others in choices.
[(-< expr1 expr2 ...)
(shift k
(begin (add-choice! (thunk (k (-< expr2 ...))))
(k expr1)))]))
(define (next!)
(if (empty? (unbox choices))
(shift k 'done)
(reset ((get-choice!)))))
(define (backtrack!)
(shift k (next!)))
(define (?- pred expr)
(if (pred expr)
expr
(backtrack!)))
(define (sudoku4 grid)
(?- (λ (x) (sudoku-matching x)) (map-grid grid '())))
(define (sudoku-matching grid)
(define (all-unique-rows? grid)
(match grid
['() #t]
[(cons row rest) (and (all-unique? row) (all-unique-rows? rest))]))
(define (all-unique? array)
(equal? (remove-duplicates array) array))
(define (all-unique-cols? grid)
(match grid
['(() () () ()) #t]
[(list first-row second-row third-row fourth-row)
(and
(all-unique? (list (car (first grid)) (car (second grid)) (car (third grid)) (car (fourth grid))))
(all-unique-cols? (list (cdr (first grid)) (cdr (second grid)) (cdr (third grid)) (cdr (fourth grid)))))]))
(define (quarters? grid)
(let ([first-quarter (takes-first-quarter grid)]
[second-quarter (takes-second-quarter grid)]
[third-quarter (takes-third-quarter grid)]
[fourth-quarter (takes-fourth-quarter grid)])
(and
(all-unique? first-quarter)
(all-unique? second-quarter)
(all-unique? third-quarter)
(all-unique? fourth-quarter))))
(define (takes-first-quarter grid)
(list (car(first grid)) (car(second grid)) (second(first grid)) (second(second grid))))
(define (takes-second-quarter grid)
(list (car(third grid)) (car(fourth grid)) (second(third grid)) (second(fourth grid))))
(define (takes-third-quarter grid)
(list (third(first grid)) (third(second grid)) (fourth(first grid)) (fourth(second grid))))
(define (takes-fourth-quarter grid)
(list (third(third grid)) (third(fourth grid)) (fourth(third grid)) (fourth(fourth grid))))
(and
(quarters? grid)
(all-unique-cols? grid)
(all-unique-rows? grid)
))
(define (map-grid grid acc)
(match grid
['() acc]
[(cons row rest-rows) (map-grid rest-rows (append acc (list (map-row row '()))))]))
(define (map-row row acc)
(match row
['() acc]
[(cons x xs) (map-row xs (append acc (list (check-double-quote x))))]))
(define (check-double-quote x)
(match x
["" (-< 1 2 3 4)]
[_ x])) | true |
ed79801469517524d905ae38268ae0edf5aa7f62 | cefc91be4ae854a1f368f8ecc69cbd68df7e36b0 | /tester.rkt | 0cadbb88763f8ca46ba24bcb56fbed1964f0618b | [] | no_license | schwers/RedRacket | 5be689cb01e43dde8cd79d0c618d607c0de836c6 | 8d29dc81e1eb2de39a2e9d298af60777b7e29a0e | refs/heads/master | 2021-03-12T20:46:55.692508 | 2011-04-20T01:11:44 | 2011-04-20T01:11:44 | 1,321,011 | 3 | 2 | null | null | null | null | UTF-8 | Racket | false | false | 6,147 | rkt | tester.rkt | ;; Tester suite functions
(module tester racket
(provide (all-defined-out))
(define (id x) x)
(define (square x) (* x x))
(define (num-elements lo hi inc) (add1 (/ (- hi lo) inc)))
(define (make-elements lo hi inc)
(build-list (num-elements lo hi inc) (lambda (x) (+ lo (* inc x)))))
(define (build-by-twos str pow)
(if (<= pow 0) str
(build-by-twos (string-append str str) (- pow 1))))
;; Adapter from mean-variance found at nklein.com
(define (mean-variance lon)
(if (null? lon)
(cons 0 0)
(let loop ([n 1] [xs (car lon)] [x2s (square (car lon))] [lon (cdr lon)])
(if (null? lon)
(let ([mean (/ xs n)])
(cons mean (- (/ x2s n) (square mean))))
(loop (+ n 1) (+ xs (car lon)) (+ x2s (square (car lon))) (cdr lon))))))
;; Particulary useful
(define (doall proc stuff) (map (lambda (x) (apply proc x)) stuff))
;; TEST FLAGS
(define all-tests (box empty))
(define test-lo 10)
(define test-hi 20)
(define test-inc 1)
(define num-tests 20)
;; Mutationy stuff
(define (set-app! place value) (set-box! place (append (unbox place) (list value))))
(define (set-inc! place inc) (set-box! place (+ (unbox place) inc)))
(define (reset! place) (set-box! place empty))
(define (add-test! test) (set-app! all-tests test))
(define (add-stats! place results)
(set-app! place (mean-variance results)))
;; Printing CSV stuff
(define (doublequote str) (string-append "\"" str "\""))
(define (seperate str) (string-append (doublequote str) ";"))
(define end (string-append (doublequote "") "~n"))
(define (print-seperated nums title type)
(define (make-str x) (seperate (number->string (exact->inexact x))))
(define (print-seperated* nums means varies)
(if (null? nums)
(begin (printf (string-append means end)) (printf (string-append varies end)))
(let ([mean (make-str (caar nums))] [vari (make-str (cdar nums))])
(print-seperated* (cdr nums)
(string-append means mean)
(string-append varies vari)))))
(if (null? nums)
(printf "HUH?")
(print-seperated* nums
(seperate (string-append type title "MEAN"))
(seperate (string-append type title "VARIANCE")))))
(define (print-test-stats cpus rels gbcs test type)
(doall print-seperated (list (list (unbox cpus) "CPU" type)
(list (unbox rels) "REAL" type)
(list (unbox gbcs) "GARBAGE" type))))
(define (bool->string b) (if b "Passed" "Failed"))
(define (print-as-expect lob)
(define (print-as-expected* lob)
(if (null? lob) (printf end)
(begin (printf (seperate (bool->string (car lob))))
(print-as-expected* (cdr lob)))))
(if (null? lob) (printf "HUH?") (print-as-expected* lob)))
(define (->all_at_once test times)
(lambda (string)
(for-each (lambda (run) (test string))
(build-list times id))))
(define (make-test-matcher matcher all_at_once? times)
(if all_at_once? (->all_at_once matcher times) matcher))
(define (normalize num all_at_once? times) (if all_at_once? (/ num times) num))
;; The actual test thats run
;; (: build-test : (String -> Bool) (Natrual-> String) String Naturalx3)
(define (build-test matcher input type test lo hi inc should-be repeated? times)
(lambda ()
(printf (string-append "~n" (doublequote test) "~n"))
(printf (seperate "Size of Input"))
(let ([isexpect? (box empty)] [cpu-stats (box empty)]
[rel-stats (box empty)] [gbc-stats (box empty)]
[sizes (make-elements lo hi inc)]
[expects (box true)]
[cpus (box empty)] [rels (box empty)] [gbcs (box empty)]
[test-runs (build-list num-tests id)]
[matcher (make-test-matcher matcher repeated? times)])
(for-each (lambda (size)
(let ([string (list (input size))])
(printf (seperate (number->string (string-length (car string)))))
(for-each (lambda (run)
(let-values ([(res cpu rel gbc) (time-apply matcher string)])
(set-box! expects (and (unbox expects)
(equal? (car res) should-be)))
(doall set-app! (list (list cpus (normalize cpu repeated? times))
(list rels (normalize rel repeated? times))
(list gbcs (normalize gbc repeated? times))))))
test-runs)
(doall add-stats! (list (list cpu-stats (unbox cpus))
(list rel-stats (unbox rels))
(list gbc-stats (unbox gbcs))))
(set-app! isexpect? expects)
(map reset! (list cpus rels gbcs))
(set-box! expects true)))
(make-elements lo hi inc))
(printf (string-append (doublequote " ") "~n"))
(print-test-stats cpu-stats rel-stats gbc-stats test type)
(print-as-expect (unbox isexpect?)))))
;; (: test : (String -> Bool) (String -> Bool) (-> String) String)
(define (test dfa rgx input test expect #:repeated? [repeated? #t] #:times [times 20])
(add-test! (build-test dfa input "DFA: " test test-lo test-hi test-inc expect repeated? times))
(add-test! (build-test rgx input "RGX: " test test-lo test-hi test-inc expect repeated? times)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Running tests, with optional file output
(define (run-tests)
(map (lambda (x) (x)) (unbox all-tests))
(printf "ALL tests completed"))
(define (log-to name)
(with-output-to-file name
(lambda ()
(run-tests))))
) | false |
245e51991e5e1c7c3324152a8195b5ac97b245db | 1da0749eadcf5a39e1890195f96903d1ceb7f0ec | /a-d6/a-d/graph/examples/undirected-weighted.rkt | 8bab09632f75d1a568a8880a7b339ddbb9c8c606 | [] | no_license | sebobrien/ALGO1 | 8ce02fb88b6db9e001d936356205a629b49b884d | 50df6423fe45b99db9794ef13920cf03d532d69f | refs/heads/master | 2020-04-08T20:08:16.986517 | 2018-12-03T06:48:07 | 2018-12-03T06:48:07 | 159,685,194 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 87,402 | rkt | undirected-weighted.rkt | #reader(lib"read.ss""wxme")WXME0108 ##
#|
This file uses the GRacket editor format.
Open this file in DrRacket version 5.0 or later to read it.
Most likely, it was created by saving a program in DrRacket,
and it probably contains a program with non-text elements
(such as images or comment boxes).
http://racket-lang.org/
|#
28 7 #"wxtext\0"
3 1 6 #"wxtab\0"
1 1 8 #"wxmedia\0"
4 1 8 #"wximage\0"
2 0 34 #"(lib \"syntax-browser.ss\" \"mrlib\")\0"
1 0 16 #"drscheme:number\0"
3 0 44 #"(lib \"number-snip.ss\" \"drscheme\" \"private\")\0"
1 0 36 #"(lib \"comment-snip.ss\" \"framework\")\0"
1 0 43 #"(lib \"collapsed-snipclass.ss\" \"framework\")\0"
0 0 19 #"drscheme:sexp-snip\0"
0 0 40 #"(lib \"image-core.ss\" \"2htdp\" \"private\")\0"
1 0 36 #"(lib \"cache-image-snip.ss\" \"mrlib\")\0"
1 0 33 #"(lib \"bullet-snip.ss\" \"browser\")\0"
0 0 29 #"drscheme:bindings-snipclass%\0"
1 0 25 #"(lib \"matrix.ss\" \"htdp\")\0"
1 0 22 #"drscheme:lambda-snip%\0"
1 0 56
#"(lib \"hrule-snip.ss\" \"macro-debugger\" \"syntax-browser\")\0"
1 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0"
1 0 26 #"drscheme:pict-value-snip%\0"
0 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0"
2 0 55 #"(lib \"vertical-separator-snip.ss\" \"stepper\" \"private\")\0"
1 0 18 #"drscheme:xml-snip\0"
1 0 31 #"(lib \"xml-snipclass.ss\" \"xml\")\0"
1 0 21 #"drscheme:scheme-snip\0"
2 0 34 #"(lib \"scheme-snipclass.ss\" \"xml\")\0"
1 0 10 #"text-box%\0"
1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0"
1 0 15 #"test-case-box%\0"
2 0 1 6 #"wxloc\0"
0 0 129 0 1 #"\0"
0 75 1 #"\0"
0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9
#"Standard\0"
0 75 7 #"Monaco\0"
0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 2 24
#"framework:default-color\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 15
#"text:ports out\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 255 0 0 0 0 0 -1
-1 2 15 #"text:ports err\0"
0 -1 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 255 0 0 0 0 0 -1
-1 2 1 #"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 17
#"text:ports value\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1
-1 2 27 #"Matching Parenthesis Style\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1
-1 2 1 #"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 255 0 0 0 -1 -1 2 37
#"framework:syntax-color:scheme:symbol\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 255 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 38
#"framework:syntax-color:scheme:keyword\0"
0 -1 1 #"\0"
1 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 90 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 128 0 255 0 0 0 -1 -1 2 38
#"framework:syntax-color:scheme:comment\0"
0 -1 1 #"\0"
1 0 90 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 128 0 255 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 37
#"framework:syntax-color:scheme:string\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 39
#"framework:syntax-color:scheme:constant\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 42
#"framework:syntax-color:scheme:parenthesis\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36
#"framework:syntax-color:scheme:error\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 36
#"framework:syntax-color:scheme:other\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2
38 #"drracket:check-syntax:lexically-bound\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 28
#"drracket:check-syntax:set!d\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 31
#"drracket:check-syntax:imported\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 4 1
#"\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 4 4 #"XML\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 8 1 #"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 8 24
#"drscheme:text:ports err\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 4 1
#"\0"
0 71 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 4 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1
-1 4 1 #"\0"
0 71 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1
-1 4 1 #"\0"
0 71 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 100 0 0 0 0 -1
-1 0 1 #"\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 200 0 0 0 0 0 -1 -1 4 1
#"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 255 255 0 -1 -1 0
1 #"\0"
0 75 7 #"Monaco\0"
0.0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 0 1 #"\0"
0 75 7 #"Monaco\0"
0.0 11 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 2 38 #"drscheme:check-syntax:lexically-bound\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2
28 #"drscheme:check-syntax:set!d\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 31
#"drscheme:check-syntax:imported\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
0 0 -1 -1 0 1 #"\0"
0 75 12 #"Courier New\0"
0.0 12 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 150 0 150 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 93 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 175 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 128 0 255 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 128 0 255 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 41 128 38 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 132 60 36 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
0 0 -1 -1 2 41 #"profj:syntax-colors:scheme:block-comment\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
0 0 -1 -1 2 35 #"profj:syntax-colors:scheme:keyword\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
#"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 139 0 139 0
0 0 -1 -1 2 37 #"profj:syntax-colors:scheme:prim-type\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 139 0 139 0
0 0 -1 -1 2 38 #"profj:syntax-colors:scheme:identifier\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 34 139 34 0
0 0 -1 -1 2 34 #"profj:syntax-colors:scheme:string\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 34 139 34 0
0 0 -1 -1 2 35 #"profj:syntax-colors:scheme:literal\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 34 139 34 0
0 0 -1 -1 2 35 #"profj:syntax-colors:scheme:comment\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
0 0 -1 -1 2 33 #"profj:syntax-colors:scheme:error\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 35
#"profj:syntax-colors:scheme:default\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 37
#"profj:syntax-colors:scheme:uncovered\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 35
#"profj:syntax-colors:scheme:covered\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 139 0 139 0
0 0 -1 -1 0 1 #"\0"
0 75 12 #"Courier New\0"
0.0 10 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 0 1 #"\0"
0 75 12 #"Courier New\0"
0.0 13 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 41 128 38 0
0 0 -1 -1 2 1 #"\0"
0 -1 1 #"\0"
1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 132 60 36 0
0 0 -1 -1 2 14 #"Html Standard\0"
0 -1 1 #"\0"
1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 81 1
#"\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 70 1 #"\0"
2.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 70 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 70 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 70 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 34 139 34 0
0 0 -1 -1 81 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 70 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 70 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 178 34 34 0
0 0 -1 -1 81 1 #"\0"
0 75 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 75 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 70 1 #"\0"
1.2 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 70 1 #"\0"
1.6 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
0 -1 81 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
0 -1 -1 81 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 -1 1 #"\0"
2.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
2 -1 81 1 #"\0"
0 70 1 #"\0"
2.0 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 75 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 70 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 70 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 75 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 75 1 #"\0"
0.8 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
1 -1 81 1 #"\0"
0 70 1 #"\0"
0.8 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.2 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 70 1 #"\0"
1.2 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.2 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 70 1 #"\0"
0.8 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
1 -1 81 1 #"\0"
0 75 1 #"\0"
0.8 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
1 -1 81 1 #"\0"
0 70 1 #"\0"
0.8 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
0 -1 81 1 #"\0"
0 75 1 #"\0"
0.8 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
0 -1 81 1 #"\0"
0 70 1 #"\0"
0.8 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
0 -1 81 1 #"\0"
0 70 1 #"\0"
0.6400000000000001 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0
1.0 0 0 0 0 0 0 1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 81 1 #"\0"
0 -1 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
2 -1 81 1 #"\0"
0 75 1 #"\0"
1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
2 -1 81 1 #"\0"
0 75 1 #"\0"
1.5 0 92 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
0 -1 -1 81 1 #"\0"
0 75 1 #"\0"
1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
-1 -1 0 1 #"\0"
0 75 12 #"Courier New\0"
0.0 11 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 0 1 #"\0"
0 75 16 #"Droid Sans Mono\0"
0.0 13 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
255 255 1 -1 0 546 0 27 3 10 #"#lang r6rs"
0 0 4 29 1 #"\n"
0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
#"*-*-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
#"*-*-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-* "
#" *-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-* Undirected Weighted Graphs "
#" *-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-* "
#" *-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-* Wolfgang De Meuter "
#" *-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-* 2009 Software Languages Lab "
#" *-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-* Vrije Universiteit Brussel "
#" *-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-* "
#" *-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
#"*-*-*-"
) 0 0 4 29 1 #"\n"
0 0 18 3 74
(
#";-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
#"*-*-*-"
) 0 0 4 29 1 #"\n"
0 0 4 29 1 #"\n"
0 0 23 3 1 #"("
0 0 14 3 7 #"library"
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 14 3 8 #"examples"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 14 3 6 #"export"
0 0 4 3 1 #" "
0 0 14 3 9 #"cormen571"
0 0 4 3 1 #" "
0 0 14 3 9 #"city-plan"
0 0 4 3 1 #" "
0 0 14 3 8 #"triangle"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 14 3 6 #"import"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 14 3 4 #"rnrs"
0 0 4 3 1 #" "
0 0 14 3 4 #"base"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 9 #" "
0 0 23 3 1 #"("
0 0 14 3 4 #"rnrs"
0 0 4 3 1 #" "
0 0 14 3 2 #"io"
0 0 4 3 1 #" "
0 0 14 3 6 #"simple"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 9 #" "
0 0 23 3 1 #"("
0 0 14 3 3 #"a-d"
0 0 4 3 1 #" "
0 0 14 3 5 #"graph"
0 0 4 3 1 #" "
0 0 14 3 8 #"weighted"
0 0 4 3 1 #" "
0 0 14 3 6 #"config"
0 0 23 3 2 #"))"
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 7 58 4 0 0 0 1 3 49 2 1 #"\0"
2 -1.0 -1.0 0.0 0.0 0 19 500
(
#"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\324\0\0\0j\b"
#"\2\0\0\0K|\350J\0\0 \0IDATx\234\355}{\\\24\345\376"
#"\377g\227\253\"\261\\\26\20P\27/"
#"\264\206\272\211X\246\270\212B\307\243\213"
#"\327H\327\322\314\v\332\261\373\246vL"
#"\363\322\0353K\243\274T\30\251\205i\31p\322\16\4\32d\2470RT.\""
#"\2\266\334Eta\227\205eg\276\177"
#"|N\373\233\366\306\354\314\354\254\277\327"
#"\351\375\27\314\316<\317g\236\34733"
#"\317\363\271\274?\2\222$\341/\374\5"
#"W@\350j\1\376\302\377.\376R\276"
#"\277\3402\334Y\312\367\377\321\32\240\273"
#"\273\333\325\"8\214;mx]\251|\4A\34>|x\361\342\305\21\21\21\356"
#"\356\356\236\236\236\341\341\341\311\311\311\237"
#"|\362Ioo/']\350t\272\372\372zN\232\2\200\332\332\332M\2336\215"
#"\e7\316\337\337\337\317\317\317\317\317O"
#"&\223m\334\270\261\252\252\212\223\366{"
#") \b\202ek8\274J\245\22\207"
#"\327\313\313\3134\274F\243\221\23\201Y"
#"\302e\312w\346\314\2311c\306\244\247"
#"\247\307\307\307\377\374\363\317]]]:"
#"\235\356\334\271s\263f\315\372\372\353\257"
#"\245R\351\311\223'Yv\261u\353\326"
#"\360\360\3605k\326\b\4\2\235N\307"
#"\246)\275^\237\222\2222n\334\270\336"
#"\336\336={\366TWW\353\365\372\272\272\272\217>\372H(\24N\2300a\347"
#"\316\235,\273hoo\367\360\360\0301bDll\254\207\207G`` \233\326"
#"px\17\36<8}\372t\34^\255VK\35\336o\277\375\226M\373\334\200t"
#"\5\216\349\22\34\34|\362\344I["
#"'\344\347\347\207\207\207\377\366\333o\214"
#"\273\3007\207\321h$IR\241Pdee1nJ\247"
#"\323\215\37?~\345\312\225\255\255\255VO\270u\353\326s"
) 500
(
#"\317=7e\312\24\306]P\201\257%"
#"\203\301\300\270\205>\207\267\240\240 ,"
#",\214\315\360r\2\27(\337\251S\247"
#"\0\240\242\242\302\376i\345\345\345\0\360"
#"\345\227_2\356H\251TJ$\22\225J\5\0z\275\236Y#\270\266{\362\311"
#"'\373<3>>>!!A\253\3252\353\310\4\231L\226\236\236\316\370r\232"
#"\303[[[\313rx\331\203o\345\253\256\256\16\n\n\262|\346\b\202P(\24"
#"\4AP\17\326\325\325\5\a\a\227\226\2262\353K\"\221(\24\212\264\2644\0"
#"(..f\326\310\352\325\253\327\255[G=\242\321h\344r\271D\"III"
#"1{?\251T\252\324\324Tf\35!ZZZ\330|\216\252\253\253\305b1\315"
#"WZ]]\235X,f<\274\354\301\267\362=\361\304\23/\274\360\2\365\bA"
#"\20---)))\246\257$\25\257\276\372\252R\251d\320\21u\26\263\262\262"
#"T*\25\203F\256_\277\356\357\357\337\334\334l:\242\325j\1@\241P\24\27"
#"\27K$\0223E\271}\373vPPPyy9\203\276\20,\325\327rxI"
#"\222LOO\227H$r\271\334\362\t"
#"d<\274\234\200W\345\353\352\352\362\363"
#"\363\273y\363&\365\240Z\2556-@-\225O\247\323Y^B\a\250%\370\21"
#"T\251T[\266la \360+\257\274\362\334s\317Q\217dee\231\24\316`"
#"0\0\200Z\255\246\236\260}\373\366\347"
#"\237\177\236A_\b\0`p\263\b\253"
#"\303\213\253\216\254\254\254\324\324T\0\310"
#"\315\315\245\376\312xx9\1\257\312w"
#"\352\324\251\251S\247Z\375\tU\320R"
#"\371H\222\2347o\336\347\237\177\316\240"
#";\34n\4\263\245\330\204\t\23\n\n\n\250G4\32\215\351;UYYi\331"
#"\362\371\363\347\245R)\203\276\310?\266\32fk"
#"\17\372\260:\274\324%\a\0X>\204s\347\316e"
) 500
(
#"6\274\354\341\356\264m\264\25\324\324\324DEE9zUEE\205R\251T*"
#"\225l\272\366\361\361q\364\22___"
#"ww\367\273\357\276\333\354\340\350\321\243"
#"\1\340\350\321\243\v\27.T(\24\375"
#"\373\367\247\236\320\321\321QQQ!\20"
#"\b\30\213*\0242\264\177\215\0325j\342\304\211f\a\365z\275\227\227Www"
#"\367\225+W\0@\241P\230\235\20\25"
#"\25\205\233\17\376\301\253\362577\207"
#"\205\2059zU\277~\375\234!\f\35\334\276};44\324\354`{{{@"
#"@\0\0dee%%%\231\375\352\345\345%\20\bHW\370\22\272\273\273-"
#"\207\327\313\313\v\0\244R)j\330\300\201\3\315N\b\v\vs\225\362\361jd"
#"\16\t\tihhp\364\252\204\204\204"
#"7\336x\203\377\217\202F\243\21\213\305MMMTaz{{\3\2\2p\221"
#"n\251y\0000z\364h\17\17\17\376\245%I\362\371\347\237\2675\274555"
#"F\243Q\241P\214\0325\312\354\247\206"
#"\206\206\220\220\20G'\205\23\360\252|"
#"\221\221\221\370\362w\bUUU\270\257"
#"\344\37\221\221\221\270\2603a\377\376\375"
#"\0\260c\307\216\372\372\372\372\372\372\332"
#"\332Z\362\317/\271\312\312\312\241C\207"
#"\362*\345\37\260\34^\202 \4\2AGG\a\0\b\205\302\5\v\26X^u"
#"\345\312\25W\r\257\vv\273mmm\226?\331\332p\270v;f\271\333\335\262"
#"e\213\331\0\326\324\324PO\330\266m\e3\263\16{X\35^\0P*\225\4"
#"Ah\265Z4\270P\177\375\37\332\355\2226\fQv\340ZC\224\245\235\317>"
#"\330\333\371X\302rxKKKM\317\211H$2\263\212\377\17\331\371\310?<"
#"\34\227/_\246y2\e\17\a'X\275z\365\212\25+h\236\254T"
#"*\27-Z\344Ty\354\3\207\267\254\254\214z\20_{\226\16\306\362"
) 500
(
#"\362\362\377-\17\207N\247\213\215\215\25"
#"\n\205}\352\37{\337.'\320\353\365\261\261\261\213\27/\266o~+--\335"
#"\264i\02305(r\210\257\276\372\252_\277~}\276}\37|\360A\0\330\261"
#"c\a?RY\5\257\312g0\30f\316\234\t\0h\277\370\327\277\376e\353L"
#"\214j\331\263g\17\237\342\331\302\322\245"
#"K\1`\354\330\261\266\242Z\262\263\263"
#"\1\300\327\327W\243\321\360,\233Ud"
#"ff\332\37\336\202\202\0024O\212\305"
#"b\263\327$\237\340O\371\b\202x\364"
#"\321G\1 ((\250\242\242\342\364\351"
#"\323\321\321\321\323\247O\337\277\177\277Z\255.((8}\372t}}\375'\237"
#"|2k\326\254a\303\206}\373\355\267"
#"\274\311f\a\237\177\3769\0\364\353\327"
#"\357\341\207\37\16\b\bX\277~}Q"
#"Q\21.\352\333\333\333\177\371\345\227\215"
#"\e7\372\373\373{zz\2\300\35\362"
#"\264\220$\211\303\233\220\220\260\177\377\376"
#"\332\332\332O?\375\364\367\337\177\307\341"
#"U(\24\303\207\17?q\342\304\337\377"
#"\376w\0\b\17\17\257\256\256v\211\220"
#"\374)\3373\317<\203\257\a\223\267\307"
#"h4\36:tH\251T\206\207\207\343\2128,,,99\371\343\217?f\23"
#"\315\306!jjj\374\374\374\0`\337\276}\370\357K/\275\24\e\e+\22\211"
#"\274\274\274\356\272\353.\214d\276r\345"
#"\312\261c\307\0\300\333\333\333\265+T"
#"*L\303\213q\251B\241\3204\274\275\275\275$I\352t\272\251S\247\2\200D"
#"\"\371\375\367\337\371\227\220'\345{\345"
#"\225W\0\300\313\313+//\317\272\34"
#"\0\300\302\255\351\f\30\f\206\a\36x"
#"\0\0\346\317\237o\371kww\267\331\221\325\253W\3@tt\264N\247\343E"
#"@\2728~\3748\336\205\345\360vttL\2300\1\0"
#"\242\242\242\232\232\232x\26\214\17\345\333\273w/>y\307"
) 500
(
#"\216\35\263)\a\357F\307>\201\e\210A\203\6\3214\203i\265\332\221#G\2"
#"\300\352\325\253\235-\233C\370\346\233o\0`\366\354\331V\177moo\37;v"
#",\0\214\36=\332\252\t\226\n\202 "
#"\262\262\262\30\aG\232\201\371|\347\346"
#"\346\322\371\304\34=z\24=\345\373\367"
#"\357\267'\a\217\312w\363\346M\271\\"
#"\256R\251\354\274h\317\2349#\24\n"
#"\205B\341\2313g\350\267|\376\374y\364\245~\375\365\327\\H\312\rrrr"
#"\0`\326\254Y\266Nhmm\275\347\236{\0`\374\370\361\267o\337\266u\232"
#"^\257\a\200\264\2644\225J\225\222\222\302^0\346\363]XX\b\0\366\365/"
#"77\27W\342\257\277\376z\37r\360\245|Z\255V$\22i\265\332\254\254,"
#"3s\277\t7o\336\0344h\20\0l\336\274\331\321\366w\357\336\r\0\1\1"
#"\1.YEY\5\246b\315\2301\303\3169\r\r\r\303\206\r\3\200\311\223'"
#"\333\262\26m\331\262\245\260\260\20\377\26"
#"\211DV\343\337\34\2\363\371\256\251\251"
#"\311\315\315\225H$\305\305\305z\275\336"
#"R\224_~\371e\300\200\1\0`\346\241\262.\a_\312\227\232\232jr\210I"
#"$\22\253\347\314\237?\37\0&N\234\210\vsG1k\326,\0\2302e\n"
#"\373\351\341\4\377\376\367\277\1 11"
#"\321\376i\265\265\265\370\310%&&\232Y\244\325juiiizz\272I\371"
#"8Y\2403\237o\203\301\200\1\337\350\2266\23\245\274\274<((\b\0\226."
#"]JGJ\336\224\257\262\262R\241P\220$i4\32Mo>\252\226\340\n\325"
#"\317\317\317\314iK\37---\30\271"
#"\264}\373v\326\362r\200\374\374|\0"
#"\210\217\217\357\363\314+W\256\240\tv\366\354\331T\203\203J\245\252"
#"\254\254$IR\241P\240w\233M6\240\t\254\346;%%\5\247P"
) 500
(
#".\227S\245\271~\375:>C\n\205\202\246\321\204\3175_KK\vI\2225"
#"55(sZZ\232)m\242\254\254\f\303\a\277\370\342\v6]\344\346\346\n"
#"\4\2ww\367\263g\317\262\27\230%\316\2349\3\0\266\326\30f\270x\361\""
#"\232f\26-Zdz&\361\211%\b\2\343?2339\21\214\325|+\225"
#"J\323\267\337\264\370kmm\225J\245"
#"\270z\240ot\340\177\267\233\226\226\246"
#"V\253\263\262\262L\236u\275^?f"
#"\314\30\0x\374\361\307\331\267\277a\303\0064\241\335\272u\213}klPTT"
#"\4\0\223&M\242y\376\271s\347\356\272\353.\0X\276|\271\351\253UXX"
#"\210\t{\34\372\17Y\315\267F\2431"
#"\23\245\243\243c\374\370\361\0 \223\311"
#"\34\32t\376\225O\255V\213D\"\352\256\355\351\247\237\6\200\21#Ftvv"
#"\262o\277\247\247\a\207\302\265\241\6$"
#"I\376\364\323O\0000a\302\4\372\227"
#"\24\25\25a\342\1\235\204e\306\340r"
#"\276\273\273\273\23\22\22\0`\350\320\241"
#"\215\215\215\216\311\341\n;\03757\e"
#"\355\21\236\236\236\347\316\235\343\252\375\253"
#"W\257\372\372\372\2\300\307\37\177\314U"
#"\233\fP\\\\\f\0\261\261\261\16]\225\227\227\207f\243\r\e68I0\316"
#"\346\333h4&''c\320\0\3_\241k\215\314\215\215\215b\261\30\0\336~"
#"\373mn[\316\310\310\0\0\37\37\37"
#"\\\260\273\4%%%\30\30\341\350\205"
#"\331\331\331\36\36\36\316\3339q6\337"
#"\350\\\22\211D\27.\\`\"\207\353"
#"\224\217 \210\304\304D\0x\360\301\a"
#"\235\341\337\303p\212\230\230\30K\217\34"
#"?\270p\341\2\0\214\0313\206\301\265\231\231\231nnn\0\360\316;\357p."
#"\0307\363\375\322K/a\350\207\311\16\344\260\34\256S"
#">L\357\r\16\16vt\251@\23\32\215\6\263:\350"
) 500
(
#"\330;\235\201K\227.\241\323\231\331\345"
#"\351\351\351\230\t\212\321\25\34\202\203\371"
#"~\367\335w\1\300\335\335=;;\233\271\34.R\276\342\342b\17\17\17\201@"
#"`'\372\215=~\376\371gwww\201@p\352\324)\347\365b\v\25\25\25"
#"\0p\367\335w3n\1\371n\204B\341\241C\2078\24\214\355|\177\366\331g"
#"\2\201@ \20ddd\260\222\303\25\312\327\321\3211b\304\b\0x\346\231g"
#"\234\335\327\233o\276\t\0!!!\3643B\270\2rW\16\37>\234M#\370"
#"}pss;~\3748W\202\261\232\357\234\234\34wwwN\26\4.Q\276"
#"\307\36{\f\255B\214\t\324\350\303h4N\2336\r}\254<G\216]\273v"
#"\r\0\"##Y\266\203\276\rOOO;\314\177\16\201\371|\27\25\25\2413"
#"`\343\306\215\34\310\301\273\362\359r"
#"\4\0\372\367\357\317[\262Y}}=\272\349\337S\333G]]\35\0\f\36"
#"<\230}SH;\324\257_?3\n\ef`8\337\245\245\245\"\221\b\08"
#"\t\255!yW\276k\327\256\241\21\337~\240\27\347@\222+OO\317\222\222\22"
#"\336:EV\352\260\2600NZ[\263f\r\0\f\0300\340\247\237~b\331\24"
#"\223\371\276v\355\32:\316\37z\350!"
#"\256\0027\370T>S\210\362\202\5\v"
#"\370\351\221\212\247\236z\n\0\242\242\242"
#"8\361\243\320\0012~\204\204\204p\322\32A\20K\226,A\263\32Kb]+"
#"\363M\20DNN\316\2325k\356\271"
#"\347\236\300\300\300\300\300@\251T\272r"
#"\345\312\343\307\217\23\4\321\324\324\204\201"
#"_\323\247O\347\320p\305\271\362\331\271\213\227_~\31\34\tQ\346\26]]]"
#"\310s\305\211\a\231\16Z[[\1 ((\210\253\6{{{\221"
#"y\203e\362\233\371|\237;wn\302\204\t\261\261\261;v\354\270"
) 500
(
#"t\351RKK\313\215\e7\312\312\312"
#"v\355\3325i\322\244\261c\307\342\300"
#"\305\306\306vtt\260\273\205?\313\301"
#"\251\362\331\277\v\37\37\37\241P\370\303"
#"\17?p\325\235\243\270|\3712'\261"
#"34q\363\346M\0\360\367\367\347\260"
#"\315\236\236\36\314\202\r\v\v\273z\365*\263F\3764\337999AAAv"
#"\250\2\217\37?\356\341\341\21\35\35m"
#"+\203\22518T\276>\357\342\300\201"
#"\3\201\201\2014Y\23\234\204}\373\366"
#"\1\273\250A\372\320h4\0\340\353\353"
#"\313m\263]]]\361\361\361\0000d"
#"\310\220\353\327\257\343\301\253W\257\276\376"
#"\372\353qqqC\207\16\365\367\367\217"
#"\216\216^\270p\341\307\37\177\334\325\325"
#"e\331\302\377\233\357\263g\317\2\300\257"
#"\277\376j\277K\364R\233\261\253\262\a"
#"W\312\347\332\273p\b,\343\245\351\3"
#"\31\202\373\367\357\317y\313\35\35\35\270z\216\212\212jiiY\262dIpp"
#"\360SO=\365\375\367\337WUU\335"
#"\274y\23\343\237\347\317\237\37\26\26\366"
#"\341\207\37\232]\376\337\371\276~\375\272X,\246\231,SVV&\26\213\373$"
#"\333w\b\234(\237\313\357\302!\334\274y3\"\"\2\0006m\332\344\324\2160"
#"\361\307\313\313\313\31\215\337\272uk\334"
#"\270q\356\356\356\221\221\221\353\326\255\263"
#"\25GW\\\\\34\e\e\233\226\226F=\370\337\371~\356\271\347,#\267\220p"
#"]&\223Y~\0326m\332\304\355z\231\23\345\263z\27\271\271\2712\231L&"
#"\223Y&\374q~\27\216\302\224#w\372\364i\263\237\n\v\vU*\225B\241"
#"P(\24r\271\34XTs@\342rwww\326\362Z\307\215\e7\0`\347"
#"\316\235\366O\303\nMTv\30 IR\257\327\213D\"\f.7\1I\21"
#"\323\323\323\321\257g\246\177\35\35\35~"
#"~~\355\355\355\16I\231\225\225\205\243"
) 500
(
#"\211\332 \221HD\"\21\6\325\261W>\253w\201\254%\231\231\231x\27f\337"
#"Yfw\301-p\353\35\21\21a\2263\253T*1\270\337h4\212D\"f"
#"9\23\250\257X\214\t\311z9Gooo||\374\2325k\350\234\334\325\325"
#"%\223\311\16\36<\210\377\2I\222\337"
#"\177\377\275e\2145\326\356\301\277U*\225L&3;a\326\254Yv\222\300\255"
#"B\257\327\313d2\271\\^ZZZ\\\\\\ZZZZZ\212\366\16\366\312"
#"g\365.d2\231\211\177\35\0\314^"
#"\373$\243\273\340\26\275\275\275\310\342="
#"o\336<\263\237\344rynn.\364\225\237J\205\301`(--\255\254\254,"
#"..\306umfffqq1\246N;#\233.??\177\330\260aV3"
#"u\224J\245\345\252\372\314\2313\22\211"
#"\4\317\a\222$\367\355\333\267r\345J"
#"\352\31\370\254\230\336viii\"\221"
#"\310\254\225u\353\326\275\371\346\233\216\312"
#"ZSSc\225\270\223\275\362Y\336\5"
#"\371\307\233\257\270\270\30]\v\226\21_"
#"\314\356\202[\324\326\326\"#\214\331\222"
#"\274\246\246\306\252\314v\200\245o\0@\251T\"\361<\346\233aLhOO\17"
#"\327\262\223s\347\316\265\32S\222\236\236"
#"\16\0V\v\332L\237>\35\223\352\205"
#"\0\320\324\324\204+_\23\310?\363\f"
#"\317\2313\347\326\255[\360g\204\207\207777\203\203\220H$;v\354p\364"
#"*:\260\274\v\0\270\357\276\373\0`"
#"\374\370\361\263g\317\6\200\310\310H\263"
#"\23\230\335\5\267\0302d\bR=?\377\374\363eeex\260\273\273;22"
#"\262\245\245\305!\nu\261X\214V\275"
#"\270\270\270\354\354l\231L\226\235\235\275"
#"u\353V\f\b\345\274\322ioooAA\1\346)S\321\332\332\372\370"
#"\343\217\203\215\n\24III\337}\367\35 !\270X,nll\264<"
) 500
(
#"\t\37\27\0\250\251\251AO.\25MMM\350&w\24ljT\330\201\325\273"
#"\210\214\2144y\237\255r\2613\276\v"
#"n\361\360\303\17\257X\261\242\253\253k"
#"\321\242E\324\315\251X,~\370\341\207\35j\n\215\311\27.\\\20\b\4\27."
#"\\\300\217\30\6\37qU\305\330\204\206\206\6___,\fA\5\362\311\312\345"
#"r\264\362\230a\324\250Q\270\243\20\2"
#"\300\340\301\203\253\253\253\251?\343\22\1"
#"\271A\1 //\317R\371\256]\2736x\360`\207d\315\316\316NJJJ"
#"JJ\272\367\336{\357\275\367\336\310\310"
#"H\177\177\377\203\a\17:\324\210-X"
#"\336\5\216;\256\350\1\0\313\273\231\201"
#"\301]8\t\357\275\367\336\335w\337}"
#"\361\342\305\27^x\201}k\373\366\355"
#"\253\254\254\224\311d\370\250;\351\315g"
#"\365k\223\224\224\244T*G\217\36}"
#"\375\372u\253o\276\360\360\360\377\26\230"
#" I\262\253\253\313\327\327\327\214!\6"
#"\203\267\364z=.#\314v[\335\335"
#"\335\"\221\350\306\215\e\16\255\17\234\272"
#"\341\260z\27\0 \227\313\215F\243\301"
#"`\300\256\331\337\205\363PRR\202\3246\234\360\1P\201/\247>I\250\34E"
#"uu\265\31\345\b2\370\24\26\26bf\252\\.\267t\240\237>}z\362\344"
#"\311\244\311\316\367\370\343\217[\232:M"
#"\345\31,\t\313w\356\3349w\356\\\6\342:o\303AZ\273\v\323\2\34a"
#"\266)c|\27\316\303\256]\273\0 ((\250\276\276\236\301\345\4A\310\345r"
#"\245R)\227\313\251\366,\\Z\230\331"
#"\241\330C\253\325\16\0300\200\352:\303"
#"\35\36\25\226L\t\a\17\36\\\274x1iR>\244V\2614&k\265Z\313"
#"\f\365\246\246\246\320\320P\3066O\253q\274\234(\37\237w\341$\20\4"
#"1c\306\f\0\2306m\0323\313\bZg\220E\317\364y\301\20\270\206\206"
) 500
(
#"\6\316\5\2361c\306W_}e\365'\211Dbu\267;w\356\334#G\216"
#"\220T\337nFF\206\277\277\277\311C"
#"l\25\355\355\355\357\275\367\36\0\354\335"
#"\273\227\235\314\346\340D\371H\222\314\310"
#"\310\20\211D\327\256]\263\177\332\357\277"
#"\377\356\214\273\340\4\315\315\315X\217\252"
#"O^9[\20\211DfO8\256\314\234\301\332v\350\320\241\a\36x\300\352O"
#"\22\211\304\322\260Z^^\36\30\30\210"
#"\314\351\177\232\357\17?\374\20\0~\374\361G[==\373\354\263\0 \225J9"
#"\317B\340J\371:;;\221\341\271\250\250\310\352\tMMMQQQ\1\1\1"
#"\257\276\372*\373\356\234\204S\247N!"
#"\317\320\177\376\363\37\6\227[\316\316\220!C\0\0\213uq\v\275^/\225J"
#"iV\254 \bb\362\344\311\333\266m\303\177\315\347;;;[\"\221,X\260"
#" 33\323D\354\337\331\331\371\325W"
#"_=\362\310#b\261\30\367/\234\247\260s\245|+W\256\4\200\21#F\330"
#"\272\v4\370\t\205B\226Q\270\316\6\356y\207\16\35j\207*\224>0q\330"
#"I\254\363\307\216\35\363\360\360\240C\t"
#"\222\234\234,\221HL\313\t+\363\255"
#"\327\353\323\322\322f\316\234\351\353\353\353"
#"\355\355\355\353\353;`\300\200\304\304\304"
#"\235;w\352t\272\223'O\242/\234"
#"\253\24\246\377\312\301\205\362!\371\260\267"
#"\267\367\245K\227\354\334\305\223O>\t"
#"\000111\316\216eb\203\356\356\356"
#"\230\230\30\0x\344\221G\330\267\206e"
#"\216\235A\331q\365\352Ud\32\1\200\3\a\16\330:\255\255\255-55u\342"
#"\304\211\324=\237\275\371\356\355\355\325j"
#"\265\32\215\306l\345\373\332k\257\1\200"
#"\277\277?\207O\22{\345kjj\302Qx\367\335w\251\307-\357\242\263"
#"\263\0237\362.w\254\331\307\225+W\220\332\365\323O?e\331\0242\225s"
) 500
(
#"^\357\245\265\265\25\23\237g\314\230q"
#"\351\322\245\230\230\230\230\230\230\217>\372"
#"\310d^1\32\215%%%\333\266m\v\b\bX\275z\265\231\177\217\311|\23"
#"\0041g\316\34\0\0303f\fWlm\354\225\17\235<\t\t\tt\326\243\350"
#"\336\351\327\257_UU\25\233N\235\r"
#"\364\220\16\0300\200\245\234\350\332\271x"
#"\361\"W\202\221$\251\323\351\260\214B"
#"LL\f\346T\364\364\364|\363\3157"
#"\v\27.\364\363\363\353\337\277\377\340\301"
#"\203\335\335\335G\216\34\371\364\323O["
#"}O1\234\357\333\267oc\375w4\330X\205Z\255\246\37*\314R\371p\253"
#"\24\20\20\240V\253i^\262l\3312\0\230:u\252}e\305\267&c\301\330"
#"c\321\242E\0\20\e\e\313&,@&\223\1\300\371\363\347\271\222\312h4\316"
#"\235;\27\0$\22\211%\307\215\321h"
#"\354\350\350\270~\375\272}^Z\346\363]VV\206\344sV\351\nL\341\200\226"
#"\333~\353r\260P\276\312\312J\254$"
#"v\364\350Q\372W\265\265\265\241E\303\26\377\215V\253E;\255\\.\347*="
#"\231\1n\335\272\205\213\204u\353\3261"
#"nd\334\270q\0\300!\365\340\332\265k\361ig\223r\317\352K\207\245m\334"
#"\335\335\251\201\270Z\255\26y=\320\236N\2450\267'\aS\3453\30\fH\0"
#"\272t\351RG\257=z\364(\0\370\371\371Y\272\23\360\3411Y\347SRR"
#"x\310\364\261\205\263g\317\"\317\20\343"
#"\244\23\214\356\371\371\347\237\351_\242V"
#"\253SSS\255:E\336z\353-\334\3301&%C\260\335`\376\363\237\377\4"
#"\200\340\340`4`\242/?77\27\253\\`uk:\261\220v\224O\255V"
#"\333ywn\336\274\31\0\206\f\31\302\314$\201\213\3279s\346X\312"
#"SSS\203\374\327\4A\310d2\316}S\16\341\325W_\5\200\320"
) 500
(
#"\320Pfb`\232\17}v\362\342\342b\205BQSS\203<\314\324\237\216\34"
#"9\"\20\b\204B!\373j\264l\225\317h4b\345\326\373\356\273O\257\327\327"
#"\324\324\230dU\251T\22\211\204&s"
#"\271-\345\303\200J[o\235\263g\317"
#"\272\271\2719Z'\210\212\372\372z\f\344\244\312YYYir@\247\246\246\226"
#"\226\226\272\274\20\241\321h\304\"}v\n\t\331A\\\\\348\22\227\252T*"
#"M\306\201-[\266\230\234\373\5\5\5\30\372\260k\327.\6b\230\201\3\273n"
#"[[\e.JV\255Z\205o>|QI$\22\372\224\0V\225\17_<\225"
#"\225\225V\243<:::\220;\341\305\27_d#?\6r\206\204\204\230\202>"
#"4\32\215)m\0\0\\Bl`\t\265Z\215\301)f\266$:@\305\245\317"
#"\356\223\226\226F}\32\345r\271Z\255"
#"\276t\351\22F\326q\305r\311M\236"
#"\366o\277\375\206)\370\373\366\355\303w"
#"\25\0X\215^\261)\207\205\362\231>y$IZ\255!\261|\371r\0\30;"
#"v,K\326\16\202 pn\250\253FSt\6W5'8\301\327_\177\r\0"
#"^^^\216\356[\247O\237\16\0\266J~\232@5\234\1%\nF\243\321<"
#"\362\310#X[\205K\202\36NZ!\377`\276\366\362\362\302U\255\243\316_K"
#"\345\323h4\246\217\35\306\344Q\177\305"
#"i\360\366\366\346\204x\240\252\252\n\37"
#"\236\357\276\373\216}kN\305\23O<\1\0R\251\324!\v+.\215\372\274\273"
#"\264\2644\323\252\t\3\252q\213\363\301"
#"\a\37\340\307-..\316*\367\0003p\311\315\203u,\"\"\"\30\220o\332"
#"\337\355\26\26\26R\343#\32\e\e1@m\367\356\335\fe\265\0\356\320%\22"
#"\to\344Q\314\240\323\351\242\243\243\1\3002"
#"[\312\16\260\250x\237\305\333\321\246M\335a\250"
) 500
(
#"T*???\264\351J\245Rn\303Q\271T\276\236\236\236\311\223'\3\300\224"
#")S\34]\241\367ij\1\0\23\177(R\324pK\36\337\333\333\213\276T\36"
#"(rY\342\342\305\213\336\336\336\0@"
#"\177\277\231\224\224\0044\2\2441\374\16"
#"\223\325M\a\227.]\212\em\316\215M\34S\342566\206\205\2051\230\302"
#">\225\257\260\260\0207k\230\376\35\30"
#"\30\310,\326\327\16~\373\3557ww"
#"w\241P\310\236\366\320\331\300A\20\211Duuut\316Go\4\375*\300["
#"\266l\301u6\326\31\0300`@\237\3647\f\300=\37\343\331\263gq7~"
#"\370\360a\a\344\240gd\256\250\250@"
#"g\206\2232\275\321l\31\35\35\355\252"
#"\232\31\364\201\26\312\270\2708:\2619"
#"H\247\347\320\240\245\246\246\256Z\265\n"
#"\235\b\334F0\231\340\0242P\254\32\332\277\177\177\372\5a\350(_OOO"
#"ll,\0,[\266\214\265\214\326\321\325\325\205\321G&\236\203;\0267n\334"
#"\300\260Y:\242b\376\245C;\367\234"
#"\234\34\314y\373\350\243\217\230Ki\27"
#"\316b\242E;\310\320\241Ci\32\311\350(\37~\2$\22\211S=\375?\374"
#"\360\203@ \360\364\364\274t\351\222\363"
#"z\341\4\371\371\371B\241\320\315\315\255"
#"O\353\361\342\305\213\35\372\26\25\27\27"
#"c\324\260S\37Bg)\237^\257\307"
#"\267\324\214\0313\350\230\205\372T\276\37"
#"\177\374\21\235\31,\375\211t\200\346\214"
#"\373\357\277\377\16)\25n\a\e7n\4\200\301\203\a\333\247;B\26e\232\265"
#"R\252\253\253\203\203\203\301\371\304\275N"
#"\344\340F\266<\0x\351\245\227\372\226\303\256\362\231*HqRv\241Oh4"
#"\32\314\270\341\304\211\344T\30\f\6"
#"\f\252{\350\241\207\354\234\206\361c\324*\233\266p\343"
#"\306\r\\x\374\355o\177s\266S\321\271\4\360\371\371\371"
) 500
(
#"nnn\2\201\340\304\211\23}\310aW\371\220\370#&&\306\31T7V\221"
#"\235\235\r\0>>>.\ff\241\t:e\35V\254XAg\365\246\323\351\220"
#"2k\354\330\261\334rn[\205\323\253"
#"\17\274\375\366\333\0p\327]w\331\347"
#"\0\265\243|\30\270\325\257_?\336\252\265 \224J%\0$&&\362\331)3"
#"\364Y\320\6k\202\332O\0255\32\215"
#"\363\346\315\3\200!C\2068#\303\327\22|\224\276X\270p!\0\214\349\322"
#"\316F\301\226\362544\4\6\6\2"
#"\300\373\357\277\357L\31\255\240\245\245\5"
#"\273\246\363\265r9\354\227\362\372\307?"
#"\376\1\326\350\t\251\300\2!\376\376\376"
#"\234\247z\330\2\37\312\327\331\331\2119"
#"\4\363\347\317\267)\207\r\345\303\364\375"
#"\0313f8S@\233\370\354\263\317\0 \240\251\251\311%\2\320\207\375\""
#"\206\250Xv\274\221\310[\347\345\345\305"
#"g\205\b\236\212\376TUUa4\216\255,|\253\312\267g\317\36tf\360\363"
#"\25\260\n\364\212&''\273J\0\372"
#"8w\356\34\262\332\345\344\344\230\375\204"
#"\331\376\266\366O_|\361\5\226\16\3459\204\207\277rg999\30\1k5"
#"\266\302R\371\312\313\3131\322\304\26\25"
#"\b?\250\253\253\303\374\305>\367Lw"
#"\2\360\5\206T\205\324\343\230\202N%"
#"\3436\341\364\351\323^^^@\203\321"
#"\233s\360Z\350q\333\266m\370\25\263"
#"\334Bb\"\272\351\337\236\236\36t\363"
#"\273\226-\36\201/\340\260\2600[<"
#"\377w\16\b\202\300\350\251\304\304Dj"
#"\324\5\272\r-\225\357\362\345\313\370E"
#"z\372\351\247\371\225\224$yV>\202 0\274\342\336{\357\325\351t$I6"
#"77\37>|x\325\252UR\251T*\225\256X\261\342\340\301\203\365\365\365"
#"8XC\207\16\345\312\231\301&\277\230 \b4@<\361\304\23$I\236;"
) 500
(
#"w\356\225W^Y\262dIbb\242R\251\\\277~\375\17?\374\300\225IL"
#"\243\321\250\325j6\306\355\306\306F4\21c\210J[[[ff\346C\17="
#"\24\36\36\36\37\37\277b\305\212\3\a\16 \35TCC\3\22c.X\260\300"
#"%\346t\1\371g\372eg\343\366\355"
#"\333\343\307\217\257\252\252\332\264i\223N"
#"\247\373\344\223O\344r\371\314\2313\203"
#"\203\203\335\334\334\232\233\233\277\373\356\273"
#"\374\374\374\356\356n\275^_XX\210"
#"\263\316\6\4A\224\224\224\214\37?\236"
#"\315\235\226\227\227\307\306\306FDD\4"
#"\6\6\266\265\265\315\236={\324\250Q\21\21\21MMM\265\265\265'N\234h"
#"oo\337\270q#:\25\31\343\203\17>X\273v\255R\251\374\374\363\3171y"
#"\207Y;'O\236\2345k\226X,^\261b\305\336\275{\37x\340\1\205B"
#"\21\34\34\354\355\355\335\330\330\370\375\367"
#"\337\347\345\345\315\2313\a\t\324&M"
#"\232\224\227\227\2071Z|\203\177}///\2372e\312\300\201\3\327\256]k"
#"\325\363\253\321h\222\223\223\305b1'\tc\310\206kF\240\311\0\e6l\b"
#"\17\17?t\350\220\325_\363\363\363\307"
#"\215\e\347P\200\247\31\220\263\26\337@"
#"\230\373\307\270)\222$\367\356\335;h"
#"\320\240\345\313\227[\335\247\353t\272\r"
#"\e6\b\205\302\250\250(\316\351J\351"
#"\303\5\312\207l\241vHe\20\357\277\377\276X,\346$h\17{d\323\302\221"
#"#GBCC\355\317\23\26\372a\303\371gZ\eP\313\2070\0\226\16\260\272"
#"\275\240\"##\303\323\323\263O.C"
#"\347\201o\345\353\354\354\224J\2454\223"
#"\357\323\323\323%\22\t\373G\23s\232\30_~\354\3301\0\240C\335l0\30"
#"\36|\360\301\315\23373\356\v\323\246\250<b\216"
#"\242\273\273{\334\270q\313\227/\247s\362\361\343\307\303"
) 500
(
#"\302\302\\e\311\342{\315\267{\367\356"
#"\334\334\\\364\234\"\266n\335\n\0>>>Z\255688X\253\325\276\360\302"
#"\v\246r\tK\226,\0311b\204\211Q\236\31\352\353\353#\"\"\230\335io"
#"o\357\310\221#\367\355\3337m\3324"
#"\323A\202 \326\257_\237\227\2277h"
#"\320\240c\307\216\241\251\302\324\327\350\321"
#"\243\313\312\312BCC\35\355+///111777!!\201\201\250\210"
#"\214\214\214\3\a\16 1\267\t;v\354\300\252\4\235\235\235)))\30:\200"
#"x\352\251\247<<<\336y\347\35\306"
#"=2\a\237\232n0\30\302\303\303\315\374\217)\177@\245R\241HT\eA}"
#"}}@@\0n\215\31\203\315\233\357\310\221#\226\376\25\0@&\6$\3401"
#"\373\365\305\27_\\\277~\275\243\35a\3123R\350\31\f\6f\351)\4\265\206"
#"|\377\0\0\4#IDATAH\245R\2634\0|\233\252T*\225J\225"
#"\222\222bF \321\336\336.\22\211\\"
#"\222\233\314\253\362\235?\177~\330\260a\266~\305G\323r\24bcc\351g;"
#"[\5\322\3623\273v\331\262e{\366\354\241\36)--\245*\234J\2452S"
#"\224\242\242\"\313Ru}\2K2\233`\225J\273O\324\326\326\6\5\5\231\311"
#"\203\59\354\\\225\220\220@?\275\203"
#"C\360\252|\351\351\351v\"\340m\215"
#"\270T*\345\363S@E\377\376\375\207\f\31b\226\f\200I\226X\247D\241P"
#"XZ\370._\276\354*\201\245R\251e\1AS\266\21\330\210-\330\276}\373"
#"\313/\277Lw\26\271\203\220\317\241ihh\300\264\3K\340*\320j\361\35t"
#"\262\271\n\355\355\355\230\217g\2\306\227"
#"\27\24\24\24\26\26\26\25\25yxx\220\177^M\242\27\221W)"
#"\377\200\301`\300\252\aT\24\25\25\1@vvvzz\372\332\265"
) 500
(
#"kq\221MEXX\230\325\372g\316\6\257c\344\343\343c\366q1a\366\354"
#"\331\251\251\251V\313\262%%%\271*"
#"\235G\253\325\6\4\4X\225\371\314\2313qqq\255\255\255\0PWWG\375"
#"i\344\310\221>>>.\361\305m\336"
#"\274\271\243\243\303L\324C\207\16\21\4"
#"\21\27\27\267l\331\262\264\2644,f"
#"A\305\355\333\267\255\326\251r6xU"
#"\276\320\320P\253O\30\216\27\362\rZ"
#"\242\241\241\201\301\316\221+\204\204\204\230"
#"\325}\324j\265\246JtXP\317T!\21\201\234\a\30\216\3003BBB,"
#"G8##\243\247\247\a\377\266Z\345"
#"\260\251\251\ty2\371\6\237\317\345\215\e7|}}-Sb\221\225\307\352%"
#"\4A\4\a\a\273\320\20\372\362\313/\233Y%\321dM\315`7[\340\37>"
#"|x\366\354\331\274J\371\at:\235\217\217\217e\1:d \300-\235%\313"
#"\352\210\21#JJJ\370\223\322$\30\317\375\305\307\307[z\250\24\n\205-J"
#"\253\354\354\354\230\230\30\347\313e\23\347"
#"\317\237\0374h\220\31;\16r\232 ,\vhM\237>\235f\236\23030o"
#"\336<\263\3559\262\254\"d2\231\231"
#"\371\272\250\250h\370\360\341.\251\n\301"
#"\267\362\235>}Z\"\221\320d:\352"
#"\355\355\275\347\236{\\\eHG\20\304"
#"\374\371\363-c`\215F\243^\257\267"
#"\264\306\2358qB*\225\272\220\360\240"
#"\244\244$44\324\222\247U\257\327["
#"F\330\23\0041a\302\204\203\a\17\362"
#"%\335\237\340\2\337\356\263\317>;q"
#"\342\304>\363\320\320\350z'\304\363\341"
#"&\35k\325\331\307\257\277\376\n\16R"
#"\37;\3[\267n\275\377\376\373\351X"
#"\346\1`\376\374\371\234\0273\243\t\27"
#"(\237\321h\214\217\217\a\0;\373\301\216\216\216\373\356\273"
#"o\314\2301\256\32\0273TUU\1\300[o\275e\347"
) 320
(
#"\234\242\242\"\37\37\37\226\366p\256\200"
#"\24\5\255\255\255\266N\350\352\352R*"
#"\225\301\301\301.\34a\27(\37\342\305\27_\24\213\305\273v\3552\363j77"
#"7\177\370\341\207\301\301\301O>\371\344"
#"\35U\236\252\276\276>::z\322\244I\371\371\371f\206\345_~\371%99"
#"y\340\300\201|f\337\364\211\327^{"
#"M,\26\277\361\306\ef\225D\333\332"
#"\332\322\323\323\a\16\34\370\330c\217\271"
#"\226\17\211\357\300\2****\266o"
#"\337~\362\344I\211D\"\26\213\335\334"
#"\334ZZZ\252\253\253\247M\233\266}"
#"\373vLx\273\243\240\327\353\277\374\362"
#"\313={\366\\\273vm\370\360\341H\203Y[[+\22\211\36}\364\321U\253"
#"V!g\362\235\203\252\252\252\327^{-''',,,$$\304\333\333\273"
#"\251\251\251\262\262r\312\224)[\267n\305\342\34.\204+\225\17a4\32/\\"
#"\270\320\332\332\212V\2251c\306\230\231"
#"\315\356@\340C\322\320\320 \26\213#"
#"\"\"\220\312\343\216\5A\20\245\245\245---\6\203!$$d\364\350\321\324"
#"0\34\27\342\377\0\211\206\341\235\n\vo\256\0\0\0\0IEND\256B`\202"
) 0 0 0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 16 3 6 #"define"
0 0 4 3 1 #" "
0 0 14 3 9 #"cormen571"
0 0 4 29 1 #"\n"
0 0 4 3 3 #" "
0 0 23 3 1 #"("
0 0 16 3 3 #"let"
0 0 4 3 1 #" "
0 0 23 3 2 #"(("
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 14 3 3 #"new"
0 0 4 3 1 #" "
0 0 21 3 2 #"#f"
0 0 4 3 1 #" "
0 0 21 3 1 #"9"
0 0 23 3 3 #")))"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"1"
0 0 4 3 1 #" "
0 0 21 3 1 #"4"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 4 3 1 #" "
0 0 21 3 1 #"8"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"1"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 4 3 1 #" "
0 0 21 3 2 #"11"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"1"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 4 3 1 #" "
0 0 21 3 1 #"8"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 4 3 1 #" "
0 0 21 3 1 #"6"
0 0 4 3 1 #" "
0 0 21 3 1 #"1"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"6"
0 0 4 3 1 #" "
0 0 21 3 1 #"5"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 4 3 1 #" "
0 0 21 3 1 #"8"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"8"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 4 3 1 #" "
0 0 21 3 1 #"5"
0 0 4 3 1 #" "
0 0 21 3 1 #"4"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"6"
0 0 4 3 1 #" "
0 0 21 3 1 #"8"
0 0 4 3 1 #" "
0 0 21 3 1 #"6"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 4 3 1 #" "
0 0 21 3 1 #"5"
0 0 4 3 1 #" "
0 0 21 3 2 #"14"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 4 3 1 #" "
0 0 21 3 1 #"4"
0 0 4 3 1 #" "
0 0 21 3 1 #"9"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"5"
0 0 4 3 1 #" "
0 0 21 3 1 #"4"
0 0 4 3 1 #" "
0 0 21 3 2 #"10"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 14 3 1 #"g"
0 0 23 3 2 #"))"
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 7 66 4 0 0 0 1 3 57 2 1 #"\0"
2 -1.0 -1.0 0.0 0.0 0 23 500
(
#"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\225\0\0\0\222\b"
#"\2\0\0\0\303\305\37\240\0\0 \0IDATx\234\355]y\\\23\327\332"
#">I\20\20\4\202\204\0\2\22\264W\251\242qA\255UPq\2536\324\5\301"
#"\306\265\37*\242\3265\242E{\213\373\202U\264\32\353\216KE\343\2\nHU"
#"\\@\250\ej+\270\24\\\20e\t\213\200H \0202\363\375\361^\3477\235"
#"\2040Y\361\366\366\371\203_893"
#"s&\317\2343\347\274\357\363\276\207\201"
#"\3438\372\a\377\265`\266t\3\376\201"
#"^\370_\341\17\303\260\204\204\204\2313"
#"g~\362\311'666\326\326\326\236\236\236\223&M:v\354\230R\251l\351"
#"\326\351\216\377\t\376\356\335\273\327\257_"
#"\277\215\e7v\353\326\355\342\305\213\205"
#"\205\205\345\345\345\327\256]\e2dHlll\327\256]/]\272\324\322m\324"
#"\25\370\337\35\311\311\311\16\16\16\247O"
#"\237n\252\302\245K\227\\]]\357\335\273g\312V\31\n\177s\376~\373\3557"
#"\204\320\357\277\377\256\271ZNN\16B"
#"\350\354\331\263\246i\225\1\361w\346\257"
#"\240\240\200\313\345\336\270q\203N\345\374"
#"\374|GG\307?\376\370\303\330\2552"
#",\376\316\357\277\35;v\214\37?\336"
#"\327\327\227\\\230\221\221\341\351\351\351\351"
#"\351y\370\360ary\373\366\355E\""
#"\321\372\365\353M\332D\375\321\322\17\220"
#"\261\240P(\354\355\355\213\212\212\310\205"
#")))\b\241\230\230\230\204\204\4\204Phh(\371\333\372\372z6\233]R"
#"Rb\332\226\352\205\277-\177\351\351\351"
#"}\372\364\241\24\"\204D\"\21|\26\213\305l6\233R!88\370\350\321\243"
#"\246h\237\201\360_0~\356\336\275"
#"\233\301`\330\333\333\327\326\326\322?\352\305\213\27^^"
#"^\224\302\254\254,b\204|\370\360\241\352Q\235;w~"
) 500
(
#"\371\362\245\316M5=\314Z\272\1\315 ##c\345\312\225J\245\362\332\265k"
#"\326\326\3268mk\237T*uuu\245\24v\353\326\r!\324\330\3308n\334"
#"\270\244\244\244\364\364tJ\5WW\327\337\177\377]\377f\233\f\37c\377;|"
#"\3700\203\301`0\30W\256\\9w"
#"\356\334\351\323\247\231L\346\260a\303\330"
#"l6e\322\241\1\\.\267\270\270X\265<11\261U\253VIII\245\245"
#"\245\3\a\16\244|[\\\\\354\344\344"
#"\244g\373M\212\226\36\300\251\310\312\312"
#"B\ba\30VZZ\212\20\272q\343\0064\22\376\345\361x\315\236\241\250\250("
#"::z\300\200\1\335\273w\247|\5"
#"\363\227\224\224\224\246\216\235<y\362\241"
#"C\207\364\274\5S\342\243\343/**\212\230b \204\224Jehh(B\210"
#"\315fWTT\0\265j\17\254\256\256>|\370\360\360\341\303Y,\26<\232\255"
#"[\267\246L&\331l\266\237\237_uuuAAAAAAii)\371["
#"\230\262\26\27\27\e\351\326\214\201\217\216"
#"\277\212\212\212\314\314L\34\307%\22\t"
#"\237\317\207\302\352\352j\370\240:`444$$$\4\a\a\267n\335\32h"
#"\263\260\260\0307n\334\331\263g\277\375"
#"\366\333E\213\26\02151\f\243\214="
#"\224\371\347\366\355\333\3\2\2\214xoF@K\362\227\227\227\a\277#\20F\6"
#"\245\253!\204\374\374\374\20B\22\211\4"
#"J0\f\313\310\310\b\v\vk\333\266-\234\204\301`\f\0324h\337\276}\225"
#"\225\225\304\371\35\34\34\236<yB\247"
#"1R\251\324\305\305\345\366\355\333\6\272"
#"9\23\241\305\370\203\336PQQ\1TQ\2062\201@\220\231\231\211a\230H$"
#"\2\"srr\240\27>~\374x\305\212\25\36\36\36D7\352\326\255"
#"\333\346\315\233\337\274y\243z\225\370\370xkk\353?\377\374Ssc"
) 500
(
#"\336\274y\203\20\332\277\177\277\1o\320"
#"4h1\376\344r91|\301\264\202"
#"\374-\217\307\343\363\371\b\241\250\250("
#"\245R\211\343xAA\301\217?\376\330"
#"\243G\17\202\266\366\355\333/_\276<;;[\363\205$\22\tB\350\322\245K"
#"MU\270s\347N\207\16\35\326\254Y\243\367=\265\0Z\270\377\221GH\231L"
#"\206\3438\237\317\317\311\311\1\23\27\216"
#"\343UUU\a\17\36\364\367\367g2\377\263\324\261\267\267\17\r\rMKKk"
#"j\"\243\212\353\327\257{yy}\361\305\027111%%%\360@\274}\373"
#"V\"\221L\2348\321\325\325\365\324\251"
#"S\306\271K\243\243%\337\177|>\37"
#"H\302q\\(\24\346\344\344\3408\236\236\236^]]]__\37\37\37\37\30"
#"\30haa\1\264YZZN\2300!>>\276\276\276^\207k)\24\212\303"
#"\207\17O\2300\301\321\321\221\305b\231"
#"\233\233\267m\333v\364\350\321;w\356"
#"\224\313\345\206\274+\323\242%\371\203%\35\374|\320\3550\fKMM\2355k"
#"\26\233\315\6\332\230L\246\277\277\377\241"
#"C\207\336\275{g\220\213b\30\326\330"
#"\330\330\320\320@\277\373~\314\320\327~"
#"&\227\313\323\323\323_\276|\t\226\v\17\17\17\177\177\177KKK:\307::"
#":J$\22\250\334\251S\247C\207\16"
#"\305\306\306\302T\2!\324\263g\317\311"
#"\223'\v\205\302v\355\332\351\331H2"
#"\30\f\6\213\305\"\326\210\377\355`\340"
#"\272\352\a\363\363\363\267n\335z\364\350"
#"\321\356\335\273{yy\271\272\272\26\27"
#"\27\277x\361\342\356\335\273\301\301\301\341"
#"\341\341\235:uj\366$o\336\2749z\364hll\354\223'O\240\304\323\323"
#"S(\24N\2312\345\323O?\325\255a\377[\320\255\333&%%q8"
#"\234E\213\26\225\227\227S\276\252\254\254"
#"\214\210\210\340p8\347\316\235k\352\360"
) 500
(
#"\212\212\212}\373\366\r\0324\210\301`"
#"@3\34\34\34\346\314\231\223\221\221\361\367\30\326L\6]\370KLL477"
#"\327,5x\366\354\31B\210\262\360\252"
#"\253\253;}\372\364\330\261c\315\315\315"
#"\201\266\326\255[O\2348111\261"
#"\241\241A\207\226\374\3\255\371\273y\363&B(++\253\331\232\17\37>tr"
#"r\272|\371\262R\251\274z\365jHH\210\235\235\35\320\306b\261F\214\30q"
#"\344\310\21\3020\366\17t\203v\374a"
#"\30\326\263gO\212NK&\223\371\371"
#"\371\261\331\354\230\230\30J\375\324\324T"
#"\16\207\343\342\342B\f\327>>>\333\267oo\21\e\261\\.\347\361xl6"
#";==\335\364W7\22\264\343\357\314\2313\3\6\f \227\3002\334\317\317\17"
#"|\241\204\353\200\0\230\225;v\354\370"
#"\303\17?\300\n\257\245\200\20\212\211\211"
#"\1s\35\271\337+\24\n\270\205\250\250"
#"(UK\354G\16\355\370\v\t\t\331\261c\a\271D,\26\23\223 PQR"
#"& \333\266m\e<x\260\236\255\324"
#"\37`+\207\317\221\221\221\204\35\34\307"
#"\361\364\364t\241P\230\227\227\27\25\25"
#"E\330\23p\34\27\n\205\37\377dJ;\377{jj\352\350\321\243)\205<\36"
#"\17>|\362\311'\b\241\242\242\"\362"
#"\267S\247N}\364\350\21\336\322QN\247O\237\216\214\214$\376%Ki6o"
#"\336<p\340@kk\353\360\360\360\200"
#"\200\0\204\320\322\245K\355\355\355O\2348AL\217?Zh\267~/--\345"
#"r\271\344\222}\373\366\315\235;\27>"
#"\303\335\312d2r\5\34\307\337\276}"
#"\273v\355\332v\355\3329::\272\272\272:999::\322\\\343\e\3;"
#"v\354 \213\\\222\222\222\336\274y\263e\313\226W\257^)\24\n33"
#"\263\225+Wz{{/^\274\270\245ZH\37\332\361\207a\230\231\331_"
) 500
(
#"\16\0316lXII\t\271\304\315\315\215\374\357\205\v\27p\34'?\373\0{"
#"{{ggggggGG\307v\355\3329;;;99\21\1779\34N"
#"\253V\255\264j\233f\310d\262\232\232\32\204\20\216\343UUUnnn\215\215"
#"\215p/\30\206\301\2237h\320\240\270\270\270\340\340`{{{++\253\0313"
#"f\30\260\1F\202v\374999\225\224\224xzz\22%\35:t\2307o"
#"\336\217?\376\210\20*//G\bQ:\326\310\221#\255\255\255\347\317\237_R"
#"RRRR\"\225JKJJ\312\312\312*+++++\237>}\252\366B"
#"\f\6\243m\333\266\4\257\\.\327\305"
#"\305\5\370\6\202\35\34\34\b\217\4\35\210D\"[[\333\276}\373\316\236=["
#"$\22\231\231\2311\30\214\234\234\234\2337o\276z\365j\325\252U\b![["
#"[\242~~~~\213\b\231p\34\217\213\213KJJJKK\3\237(\227\313"
#"\358p\340\250Q\243\276\376\372k\325"
#"[\326\316~6m\332\264\376\375\373\317"
#"\2313\207()++\343r\271\351\351"
#"\351\3\6\f\350\331\263\347\273w\357\b"
#"\257:\340\344\311\223\307\217\37OLL"
#"\244\234\252\274\274\34\350\4F\211\277\360"
#"\241\274\274\\sX\36\223\311$\367W\325\17l6\233\362\366*++\23\213\305"
#"\275{\367\206\227\\}}\275\205\205\305"
#"\373\367\357mmm\243\242\242d2\331"
#"\352\325\253\225J%\374F\366\366\366\277"
#"\377\376;\361j7\rn\335\2725o\336<++\253\257\277\376z\324\250Q\\"
#".\227\305b\225\224\224\\\272t\351\314"
#"\2313\305\305\305;w\356\364\367\367'"
#"\37\242\35\177'N\2348x\360\340\225+W\310\205\273w\357\2367o\36|\206"
#"\367\a\371[OOO\f\303\242\243\243\307\217\37"
#"O\377B\240?S\345\225\370PQQ\241\271\345\255"
) 500
(
#"Z\265R\313+\361\257\215\215\r\324\254"
#"\255\255=u\352Tmm\355\214\0313\bw\25\203\301(--utt\244\337"
#"f=\21\27\27\27\26\26\266o\337\276"
#"\261c\307\252\255\220\234\234<c\306\214"
#"\313\227/\203\212\25\240\35\177\30\206y"
#"{{o\335\272u\324\250Q\344\362\372"
#"\372\372\206\206\6\342\27!p\353\326-"
#"\177\177\177\271\\\216\20\352\333\267\357\306"
#"\215\e)\217\217\316hllT\313+\361\367\335\273w\232\317`ii\tc\262"
#"\332~\374\362\345\313\241C\207\32\244\251"
#"t\220\226\2266x\360\340\354\354lo"
#"oo\r\325\262\263\263\273w\357\236\224"
#"\224\364\345\227_B\211\326\376\207k\327"
#"\256M\236<\231\362\24\250Eqqq\273v\355\316\2349SZZ\272v\355Z"
#"P\323\16\37>|\343\306\215\275{\367"
#"\326\352\242:\240\276\276^\372\1j\373"
#"1e\236\254\2126m\332\270\270\2704"
#"5>s\271\\\242\263\352\211\374\374|"
#"\37\37\237\v\27.\364\355\333\267\331\312"
#"\317\237?\357\337\277\177ZZZ\227."
#"]\220n\376\243\375\373\367\207\206\206>~\374\30N\241\26EEE|>?\""
#"\"b\311\222%\b\241\332\332\332\35;vDEEUUU1\30\214\t\23&"
#"\254[\267\216\216\203\t!TXX\370"
#"\333o\277\215\0313\306P\277\27\240\266"
#"\266\266\270\270\270\251\361\271\244\244\4\206"
#"\r\r\200)tS\343\263\243\243#\345"
#"U\322\24\26,X\300b\261\242\243\243"
#"\311\205\205\205\205aaa\217\36=\n\17\17'Vh\200\325\253W\277x\361\342"
#"\350\321\243\b\351\347?Z\265jUmm-\271\374\301\203\a/_\276\334\264i"
#"\23\227\313\335\273w/\345\250\212\212\212"
#"e\313\226\201E\315\314\314l\326\254Y"
#"\5\5\5\232/\4\366\235\250\250(\204\20\274\363L\206\252"
#"\252\252?\377\374355U\"\221\354\330\261#\"\"\"$"
) 500
(
#"$d\364\350\321\275{\367vuumvy\303`0\34\35\35\273u\3536l"
#"\330\260)S\246\210D\242-[\266\34;v\354\362\345\313YYY\245\245\245 "
#"\303\251\253\253\263\263\263\243\270\341\300\310"
#"\27\31\31\231\231\231\t\37\310\337\326\326"
#"\326\332\330\330\200LRw\375\304\343\307"
#"\217\247N\235jcc#\20\b>\375\364\323^\275z-X\260\0!\304d2"
#"\203\202\202\36<x\320\324\201\205\205\205"
#"\241\241\241\360l\266n\335:<<\374"
#"\355\333\267jk\202\300B\241P\3408\236\222\222\242j\\mA`\30V^^"
#"\376\370\361\343+W\256\34?~|\353"
#"\326\255\313\226-\2336m\332\210\21#"
#"\370|\276\223\223S\263.~\26\213\345"
#"\342\342\362\345\227_\372\372\372RN\316"
#"\347\363\211\233\315\313\313Su\f\4\4\4\200\346J_\375Kee\345\2313g"
#"\240A\353\327\257o\323\246\rB\350\351"
#"\323\247\315\36\230\233\233\e\34\34\fS"
#"|;;\273\365\353\327\203\376\214\f6\233M\304*DEE\211\305b=[k"
#"J(\225J\251T\372\307\37\177\\\272t\351\310\221#\2337o^\262d\311\244"
#"I\223\374\375\375\273v\355\352\340\340\0"
#"\367\316\341pf\315\232E9\226\307\343"
#"\t\205B\220,\253\275\353\360\360\360M"
#"\2336\341\206\322/\1\1778\216O\237"
#">\35!\4\247\246\203\373\367\357\217\0301\2\16wvv\26\213\305\204#WU"
#"`H\326\370VWWGFF\376W{\202\32\32\32\n\n\n\276\377\376\373\37"
#"~\370\201\362\25\374 QQQ ^\245\304\t\3438\36\35\35\275p\341B\334"
#"\340\374\305\305\305!\204\372\367\357\257\325"
#"\341\327\256]\353\327\257\37\234\244c\307"
#"\216\307\217\37\3070\f\326\357PA,\26\223#\217`\352(\26\213\375\374"
#"\374\374\374\374\fr\v-\205\237\177\376\231B\17<\270\304;\17B\275)"
) 500
(
#"G-_\276|\303\206\r\270\301\371\253"
#"\251\251\261\264\264d2\231R\251\224R"
#"G.\227\347\345\345\345\345\3455u\222"
#"\270\2708B\263\304\347\363/\\\270\0\317 \330N\341-H\200\30lU\277\372"
#"o\301\355\333\267\27/^\354\345\345\245"
#"\32\347\315\343\361\b\376\300+G\251\20"
#"\30\30x\374\370q\334\340\374\3418.\20\b\320_c\t\n\n\n\240\2\233\315"
#"\6\213TS~\265\306\306\306C\207\16"
#"\265o\337\36\352\17\348p\305\212\25"
#"\204\204\236\214\212\212\np\343\301u\305"
#"b\261X,\346\363\371d\307\336\307\211"
#"\254\254\254\210\210\b\262\r\271u\353\326"
#"D\314\r\0\36\331\352\352j\245R\311"
#"\343\361(c\214\\.\267\265\265\375\217"
#"\5\312 m\"\363\267\177\377~\204\220@ \232\213\20JHH 8#\244"
#"\326MA.\227o\333\266\215\303\341\300i\3\2\2\262\263\263+**\340M\316"
#"\347\363\301{\16\241-\320\371\24\n\5"
#"\204\t\32\344v\214\201\334\334\3345k"
#"\326\220E\221\256\256\256\213\27/\316\314"
#"\314\2345k\326w\337}G\251\17\223\27x\350)\n\361M\2336\5\5\5\301"
#"g\303\363'\225J\31\f\206\245\245%\fq<\36\217\"v\362\363\363\243#\244"
#"\250\256\256\376\341\207\37`B\313d2\307\215\e\367\23776i\300$we\201"
#"@\240:\317nq\274~\375z\313\226-d{\223\243\243cXXXjj*"
#"\321\362\334\334\\\a\a\207g\317\236Q"
#"\216U(\24\252\332\376\327\257_s\271\\byfx\376p\34\357\337\277?B"
#"(..\16\307q\221H\4\375F\251T\202F\206N\f4\201\222\222\222\5\v"
#"\26\200\336\320\334\334|\376\374\371;v\354@\beee\t\4\2b`\201\5"
#"\257A\356\305 ())\331\265k\327\300\201\3\t"
#"\37\210\235\235\335\364\351\323\177\375\365W\265o\353\223'"
) 500
(
#"O\332\330\330\274x\361B\363i!7\69\303\211Q\370\333\264i\23Bh\372"
#"\364\351\370_\243^\311\3539\255\220\227"
#"\2277m\3324\360\354\264i\323f\356"
#"\334\271\23&L\210\212\212\"*\370\371"
#"\371}\fo\276\312\312\312\203\a\17\222"
#"c\270\255\254\254\202\203\203\343\342\342\232"
#"\215\222\201\324\f'N\234h\252\346\315"
#"\2337\335\335\335\267l\331B.4\n"
#"\177\340\225\345p8\215\215\215P\242:"
#"\1\321\1\331\331\331_}\365\25\\\313"
#"\301\301a\353\326\255p\2530?\322\377"
#"\374:\243\246\246&66\366\253\257\276"
#"\"t\311\346\346\346\1\1\1\307\217\37"
#"\257\251\251\241\177\0360\23zzz\36"
#"9r\244\254\254\f\6\330\267o\337\306"
#"\306\306\6\6\6\272\273\273\253J\332\215"
#"\302\37\216\343`\233NKK\303q\\.\227\v\205B\203\\\b\307\361\2337o"
#"\22\357vww\367\203\a\17\312d\262"
#"\26Q&\312\345\362\370\370\370\211\23'ZYYA{X,\326\260a\303\16\34"
#"8@\231O\322\4\2302\202\202\202\306\217\37\317\341pX,V\253V\2558\34"
#"N@@\300\356\335\273\325\6\316\31\213"
#"\277\360\360p\204\320\222%Kp\34W"
#"*\225\24\376\322\323\323\3113R\35\220"
#"\234\234L\304\342~\372\351\247tR?"
#"\326\325\325]\276|y\317\236=\221\221"
#"\221\273w\357\276p\341B]]\235\16\227V(\24\27/^\374\346\233o\b9"
#"9\203\301\0300`\300\256]\273\310\351.\264\225\226?}\372\224\301`XYY"
#"\301\302\0\3030\205B\241P(4\377J\306\342/##\3!\324\261cG\242"
#"D\241P\20o\254\310\310H>\237O"
#"\244\227\320\r\30\206\305\306\306v\354\330"
#"\21\256\336\267o\337\253W\257\252\255\371"
#"\352\325\253\371\363\347\333\331\331\371\372\372\316\2325k\325\252"
#"U\263g\317\0366l\230\255\255\355\314\2313i\366]\f\303"
) 500
(
#"\322\322\322\346\314\231C,l\20B\275"
#"z\365\332\262e\313\353\327\257\311\325\210"
#"\264N\252\26]\r\200\365\317\334\271s"
#"\351\37\202\e\217?\245R\t\342\3\20"
#"\177B\35\350\205\204\t\6}\b\336\324\a\r\r\r\273w\357vvv\2066\f"
#"\37>\234\222IW\317P)\34\307\357\336\275\273d\311\22r6\256.]\272\254"
#"Y\263&77W\2652\230\24\232\365\213Q\360\366\355[+++\6\203A\307"
#"\364O\206\261\370\303q<$$\4!\264~\375z\34\307\311\306L\241P(\221"
#"H\240\304P\361+2\231l\303\206\r"
#"\20\265\313`0\202\202\202\240W\351\34"
#"*\205\343xvv\366\312\225+\211\376\r3\213\210\210\210\207\17\37Rj\2g"
#"\b\241\224\224\224\212\212\n\201@\240P(D\"\221Z\313\221Zl\330\260\1!"
#"4z\364hmn\32\307\215\312\337\371\363\347aX#\352\200\3\1\6\n\244\316"
#"\254\256'(\376a\370Q\264\n\225\302"
#"q\374\331\263g\353\326\255\353\332\265+A[\273v\355\26-Z\324Tj\0300"
#"0)\225J\360V\22\262\271\224\224\24"
#"\201@\240\232\242R\25\n\205\2D\263:,\256\214\310_mm-\214\t\220D"
#"\25\356\23\240P(\224Jeff\246"
#"\6s\266\316\0\377\260\205\205E\373\366"
#"\355\311\363\232\314\314\314\310\17\0\2638"
#"\271\367\247\246\246:;;\367\352\325\213"
#"h\244\203\203\303\354\331\263\257_\277\256"
#"\271\17\251&\374\22\n\205\344\204Q\315"
#"v\301\343\307\217\303\230\254\303\315\32\221"
#"?\34\307\307\214\31\203\20\332\263g\17"
#"\374+\227\313\245R)L\250***\300\226M\16\0311 TC\245 N%"
#"44T$\22\301\245)o)X\6\330\332\332N\2336-99\231\246[\243"
#"\272\272\32\236B\211DB\230\226\310\356\221f\371\3"
#"\331\222n\331\203\214\313\337\241C\207\20B\243F\215\202"
) 500
(
#"\177a}\212\20\"\246|\240\0212H\e(P\r\225\"\203\315f\253\372\2657"
#"l\330\360\331g\237iXT\344\345\345\301+VuL\6\3252<\232\325\325\325"
#"0YC\b\221\215Dj\1\31\362\35\34\34(J\"\2320.\177\245\245\245L"
#"&\23d\3168\216\27\24\24\200\367\0}\310d\6\261w\272Yg0\f\323\360"
#"\6\355\320\241\203\252E\30@\216y#"
#"\243\254\254\214\303\3414\265\336\2C`ii)\274\347(b*6\233]ZZ"
#"\212a\230X,\16\r\r\225\311dYYYt\326\17AAA\b\241\225+W"
#"6[S-\214\313\37\216\343\220#\225\330>\3\36R\2626^gU\22\374\240"
#"M\275\363\333\264i\2436e\f\364x\265\223\32\f\303X,VS\303fuu"
#"51\31!\347F\304?\314\256!\341Whh(\375I\365\353\327\257\315\314\314"
#"Z\265jUXXH\363\20\n\214\316\337\226-[\20BS\246L\201\177CC"
#"C\tCsNN\216\266\353$2\204B!\214Qj\27\221VVVj\37\377"
#"\246:\37\240U\253VM\361\a$A\357\204GG\251TVWW\303;/4"
#"4T\a1\316\322\245K\311?\216\0160:\177\271\271\271\b!{{{\370]"
#"JKK)jF\372\0g4B\b\334F\360\230\247\244\244\250\235\243{zz"
#"\276|\371RmS\233r\23\276}\373\326\301\301A\203\275\212\334q\331lvA"
#"A\201B\241\320\331\351XSSco"
#"o\217\324\245\317\244\17\243\363\207\3438"
#"8\235\257]\273\246\347U\330l6\374|\24W-\237\317W\375\21\247N\235\272"
#"{\367nJ!\b\237\232\322\1\2378q\202\220\r\250\5,\201\3403R\311y"
#"\251-v\355\332\205\20\328p\240>'1\5\177\337}\367"
#"\35B\b\274\347:\3\206,\370\f+9\342+\30\331\310\254\274"
) 500
(
#"x\361b\344\310\221\252\366Ur\24\274"
#"*\2\3\3\233\225\230\302\210\ry\230"
#"\265\275\00520\f\3\27\315\2313g"
#"\3649\217)\370\273u\353\26\322\322\355"
#"\256\26\2\201\0\306L\36\217G\351C"
#"\204\34\375\375\373\367\21\21\21\20)a"
#"kk\233\234\234L\363\344\340\35\245\223\334\260\264\264T\177%?\4Dzxx"
#"\20.R\335`\n\3760\f\3\373\262\252\345P\3@\203\245\272B\200E\b\376"
#"W\207\6\\\345\330\261c\220\354\216\301"
#"`L\2336\355\354\331\263\316\316\316t"
#"\354g\220sA\263\25\333\260\200\340\264"
#"\255[\267\352y\36S\360\207\343\370\254"
#"Y\263\20B\364s\334\306\304\304\300\272\"44\2242=\21\211D999\240"
#"\212$\26\17w\356\334!\24\300\375\372"
#"\365\273s\347\16\224\357\333\267\17!\364"
#"\370\361c\r\327*,,\344p8\372\377\224\364\361\350\321#\204P\2336mt"
#"s\363\222a\"\376\222\222\222\20B\275{\367\246yB\221HD\230F\5\2\1"
#"\371m\a\v\0\36\217\a\23\332\242\242"
#"\242\351\323\247\203L\250]\273vG\216"
#"\34\241L \325\206J544\224\227"
#"\227\313\345\362\246B\245\214\n\310\2140"
#"\177\376|\375Oe\"\376\352\352\352\254"
#"\255\255\21Bj\263\214\253\"!!\201p\331\23\201\20 2\223\311d0\333\224"
#"\313\345\e7n\4\201\241\205\205EDD\4XyTA\16\225\n\17\17\217\216"
#"\216\366\366\366f2\231m\332\264\321\34*e\f\224\225\225YZZ2\30\f\265"
#"\356Cma\"\376p\34\207\370w\2321D\204\261\n\376%$\277\304z\377\334"
#"\271s\35:t\200\353\216\35;\266Y\345\35\376!Tj\323\246M\213\27/\6"
#"\355\5E\313e\32\254]\273\26!d\250\215&L\307\337\221#G\20B"
#"#F\214\240yN\230\353\23y\n\210)\337\243G\217\206\r\e\6W\364"
) 500
(
#"\366\366\276r\345\212\16\r\336\263g\17"
#"\372\240\a0%\32\32\32 \233\237\376"
#"\253a\200\351\370+//\207\304\341\3643Y\303$\5}\3601\275}\373\366\333"
#"o\277\205\300\317\266m\333\356\332\265K"
#"\347\311\367\343\307\217\21B\355\333\267\327"
#"\355p\235\1A\317\335\272u3\324\t\265\343\257\242\242\2b\210(&G:\374"
#"\3418>h\320 \204\320\311\223'\265k#\216766\212\305b\330j\205\305"
#"b\315\2337\257\251\220]\232\3000\f"
#"lW\257^\275\322\347<\332\2\204\364"
#"\6\334\"\213.\1770w\0\323\3\370"
#"\300\310\6\b\232\374m\333\266\r!\24\22\22\2.\b\245RIGBx\365\352"
#"U\"\253\306\320\241C\tA\224\236\200"
#",>\277\374\362\213A\316F\a\260\227"
#"\232\243\243\243n\272E\265\240\313\237j\332S>\237O\30^i\362'\225J!"
#"\334\r\302\303\315\314\314\270\\\356\330\261"
#"c\367\356\335\2536\177\362\313\227/\307"
#"\215\e\a'\357\320\241C||<\315\326\322\301\346\315\233\21Baaa\6<"
#"\247f\300\fN5\332V\37\320\345\17"
#"\251h\305D\"\21a5\246\303\337\325"
#"\253W\275\274\274F\216\34\31\23\23#\225J\e\e\e1\f+))9v\354"
#"\330\2301cx<^bb\"Q\371\375\373\367+V\254\0003X\2336m6"
#"l\330`\360]6\300\361\355\355\355m\330\3236\205\274\274<x\375\e6\3670"
#"]\376@\"'\22\211RRR$\22\t(\330\211\337\264Y\376\216\35;\346\344"
#"\344\244A_u\343\306\r77\267\373"
#"\367\357c\30v\364\350Q\262\31\214\262"
#"\207\264\241 \227\313-,,\30\f\206\376F\20:\200l\224\20\323c@h1"
#"\177)((\210\214\214\24\b\4\340\276!\37395\363\a\306\227f\227"
#"\253\240\303$\"\34\311f0#\1\236Br\277\a\224\226\226\22\333\235\31"
) 500
(
#"\4\357\337\277\a\261\275\301m\5Z\360\207a\30L7\362\362\362233i\362"
#"\367\354\3313\16\207\243\272K\30\206a"
#"\2\201\2002\177y\360\340\1\274\341U"
#"\315`\306\300\212\25+\20B\313\227/'J\210<\245 \2060\2246\16b\26"
#"\a\r\32d\220\263\221A\227?\20\355"
#"\24\24\24\200\372\26\374\340\204}D\3"
#"\177\263g\317^\266l\31\271\4r\v\302yT\225K+W\256\f\f\f\324\362"
#".tDrr2B\210\220\31\262\331l>\237O\30\n\f\245\215S*\225\220"
#"Y\2322\377\2k\224V1\22\252\240\333\276\310\310Hx\30\321\a\rHff"
#"&a\277h\212?H\16E\361\226\21\351\f\324\362\a\207\230\346\235TYY\t"
#"\3628\271\\\16\17(\371[\325\22\335p\356\3349\204\220\247\247'\345f!7"
#"\26,\311\322\323\323u\eo\264Ha\373\366\355[\370\0\306~[[\333\367\357"
#"\337k>$--\255W\257^\260R&\340\352\352\212\377\225E2,--\207"
#"\16\35z\361\342E\372\r\323\31l6"
#"\333\333\333\273\276\276>33\23\32\331"
#"\330\330\210\20\252\254\254\\\272t)\227"
#"\313%~b}\260}\373v\204\320\302\205\v)\331s-,,\300\273\231\230\230"
#"\30\20\20\300d2!\r\260v\240\3113(G\340\205\317f\263a\364#d\270"
#"M\235J59\r\1\340O\255\362\223HNc\2@\346Y\270\34d\312\1\200"
#"\206S\377\363?|\370\20!dcc\243j5\4\v\6\361ouu5\35W"
#"3\5t\363_[YY)\225\312k\327\256edd\324\324\324899\311d"
#"2\"\356\264)\224\224\224\350\260\373\233"
#"\213\213\313\253W\257\264=J7\f\348P,\26C\264b@@\0\370=\f"
#"\270m\0d\205\2341c\69\271\366\341\303"
#"\207\313\312\312 \304\225\200\215\215M\263)U\325"
) 500
(
#"@\347'\213\230\216\342M\367\277={"
#"\366\250&g\3h\350\177\313\226-\333"
#"\270q\243\316\r\323\n\257_\277F\b\331\333\333\303\275H$\22\3\346T+)"
#")\261\260\260`2\231\24\367\26\372\220"
#"\233G\325\22\251-\264\333\277\203\214\360"
#"\360\360\260\2600\315u<==A\377"
#"\251\25rss\t\337\236\261\341\356\356"
#"\356\341\341QYY\t\232\206\332\332Z"
#"\3nL\361\363\317?\327\327\327\177\365\325W\344\333),,d\263\331666"
#"C\206\fY\277~\275\\.wuu\5\313\276.\320\212m\231L\6\376\207\352"
#"\352j:\375\17&\223j}\5M\365\277\332\332Z\"9\224i0y\362d\204"
#"\20Y,\n\252j\261X\254\317\22\276\276\276\36v \200$\16\4`ND\16"
#"V\302q\234N\230\240Z\320\345\17\3030bOZ\342\3\35\373\331\274y\363 "
#"\213\1M\254Y\263f\362\344\311\364\353"
#"\353\17U_.\bJ\23\22\22\374\374\374 \225\234\16\317SLL\fB\250G"
#"\217\36\252_)\225J\362\362\27.\244"
#"[\343\351\362G\216R\4\210\305\342f"
#"\327\1778\216\347\345\345\251\265\277\250E"
#"NN\216\243\243#\315\312\206\2\214\234\24_\256@ (--\225\311d\220\216"
#"O\333\201\n\307q\220h\349r\244\251\n\360\364Sz\202\266\320z\375N "
#"''\207\208k\276\303\363\347\317[ZZj\26\361\341\37|\342\206u\22\321"
#"\1\341\313\315\317\317\207\222\352\352j\""
#"\305LTT\224\16\243\350\365\353\327\21"
#"BNNN\315\n\202\365L~\251\235\375L(\24&$$$$$@\367'"
#"\326+\315>\241\361\361\361H\243@\366\362\345\313...\252\21\v\246\1t2"
#"\310\250\211\3438\233\315\6C(\216\343\20d\244-\205\20x\274z\365"
#"\352fk\352i%\327bX\220\311db\261\30\374\17\224\247\222\316\b"
) 500
(
#"\223\236\236\336\275{\367A\203\6\211\305"
#"\342W\257^\325\325\325\311\345\362\374\374"
#"\374}\373\366\215\349\262S\247N\220"
#">\240E\0\t\333\346\314\231C.\314\312\312\0023/\361\276\247y\266\27/^"
#"\200Y\216\234\316\a\307q\30\215\5\2\201D\"\201n\aV\21}\\\233\246\323"
#"/\3418\216a\330\311\223'\247M\233\326\276}{sssH1 \24\n\217"
#"\36=\252g\30\200\236P\365\345\202\372\rR4\203zX$\22\321tG@\36"
#"\376\220\220\20J9\314\211RRR\300"
#"\271\1\342\177=\335,&\345\357\243\5\370r\231L&a7\27\b\4\304B\36"
#"!\204a\230\352\fN-\336\275{\a\373\bQ\202=\n\n\n\310\v\6pn"
#"\350\34\nI\340\37\376\376\3___\204PRR\22\374K\3646\370\241\341/"
#"\35\213(h\264\374\375\375)\345`\231"
#"#\347\352\"G\304\351\214\177\370\373\17"
#"\"\"\"\20BD\36c\362\3469\315\346\220 \240T*!\261\265\332\221\26V"
#"\356|>?++K\241P\300\340\254g\263\265\333\277\321\250x\371\362err"
#"\362\365\353\327!\221\3\227\313\355\337\277"
#"\377\350\321\2435o\311e(@\236\0050d#\204,,,`\207\25[[["
#"\372\373.\235;w.//\357\223O>!\366\a#\303\307\307\a\303\260\323\247"
#"O\373\371\371UUU\361x<\310\247"
#"\253\27\364\344\37\240\347\251\244R\351\214"
#"\0313\270\\\3567\337|s\372\364\351"
#"\264\264\264\2337o\306\307\307\317\235;"
#"\327\335\335}\302\204\tMe\0021 *++\31\f\6\370ru>\t\f\302"
#";w\3564`\3034\243\345\371{\362"
#"\344\211\253\253\353\212\25+\324\276]\24"
#"\n\305\346\315\233\271\\\256\t\204\322"
#"\335\273wG\b\351\354\177\270\177\377>B\310\316\316"
#"\256\2510(c\240\205\371\3+\366\211\23'4W\3"
) 500
(
#"\317\352\223'Otj\35]\3006m:\273\256\246N\235\212\364Hg\243\eZ"
#"\222\277\352\352\352\16\35:l\336\274\231"
#"N\345+W\256p\271\\r\246T\203#66\26!\364\345\227_\352plq"
#"q\261\271\2719\213\3052FF>\rhI\376\266m\3336f\314\30\372\365\27"
#".\\\270`\301\2m\257B\37\24_\256V\370\367\277\377\215\0202\231r\216@"
#"\213\361\327\330\330\350\356\356\256:$\306"
#"\304\304\300\2161\252Ym*++\331lvUU\225^m\325\b\330\272G["
#"\aH]]\35$\e\316\310\3100R\303\232\202\356\376w=\361\364\351Sss"
#"s\362~2\b\241\245K\227\376\337\377"
#"\375\337O?\375$\20\b\372\364\351C"
#"\331\350\232\315f\373\370\370@\24\217Z"
#"\220\367\232\320\r0\201$\22X\323\304"
#"\361\343\307\313\312\312z\367\356=`/\312v\354\0\0\n\342IDAT\300\0"
#"=\e\240-Z\214\277\254\254\254>}"
#"\372P\n\267n\335\232\231\231\31\20\20\0\332\36b5F\240O\237>\344<\260"
#"\4\312\312\312\30\f\6\213\305\322]\210"
#"\200\20RY\5\322\4\310\253!\302\301"
#"\304h1\376\212\212\212\334\335\335)\205"
#"r\271\334\307\307\247\276\276>;;\e"
#"!D\370N\t\270\271\271\301>\326d\324\327\327s\271\\0M\r\0312\0046"
#"2\321\r:\360w\365\352\325\354\354l"
#"\27\27\227\340\340`\235\257\2533Z\214"
#"?\320eS\n\301\322\341\345\345\5K1\b\25'\243\262\262\222,\304\3xy"
#"y\305\304\304@:\252.]\272\350\243"
#"=\354\332\265\253\275\275\375\353\327\257\337"
#"\274yC\363\20\220\347\316\2337\257\331"
#"\35\215\215\2\203\274E\351\234*''G(\24\22!\23\211\211\211_|\361E"
#"S\225\225J\245\332\344\337aaa?\375\364\23\271"
#"\204\22\245\200\376\232\25Y\251Tj+\303\5\323Wl"
) 500
(
#"l,\235\312\271\271\271\260\331ZYY\231VW1\24L\304_zz\272@ "
#" oT$\223\311\254\255\255\311N`\312\216\002111\24\376^\274x\301\341"
#"p\236?\177N.\314\311\311!$\336\t\t\t\344C\210i\210V\e\205\250\365"
#"\3456\5\220o7\245q5\1L\304"
#"\37\341\372\212\214\214\204\375\37p\34\17"
#"\f\f\334\276};\345<B\241\20\3030\231L\246\272\357$\250T&N\234H"
#"\16%$\222\372\0[d\353eVV\26\374\v\t\347i\336\v\274\374\350\244\210"
#"\250\254\254\204\354A\206\n\311\327\1&\342/22\22<j\220C044T"
#",\26?x\360\300\311\311\211,\315#\317-\331l6Y\333S__\357\350\350"
#"\b\357\03033\263\320\320Pb\234\204"
#"\243\370|\276\352P\t\223\32\3303\200"
#"\346\275\250\372r\233\2\244\26\36>|"
#"8\3153\e\3\306\345\217<<\202\234"
#"\2040m\360x\274\273w\357\332\332\332r8\34r5\350|\24'\0\2449\237"
#"3g\316\2337of\316\234\t)`,--\303\303\303)\342\340\224\224\24\205"
#"B\221\236\236\16\261\332\240\263\342\363\371"
#"d\2410\344\315\325p;0\v\275p\341\202\206:\215\215\215\36\36\36\315V3"
#"6\214\313\37\237\317'\233\363\5\2\1"
#"H\326$\22\311\262e\313 \244\30\304"
#" \32\362\242\225\227\227\367\351\323\207\354"
#"\321\316\311\311\t\n\n\202(\23;;\273u\353\326\21\333\354A~{\221HD"
#"V?\20]\34\222-#\2044[)!\341lDD\204\206:\247N\235B\b"
#"u\356\334\331\4q\302\32`\\\376@EI\244-P(\24\360\363\315\2349\23"
#"\310\v\n\nR(\24;w\356\344p8\313\227/\247lT\224\233\233\273q\343"
#"F{{\373\25+V\250\376L\367\357\337\379"
#"r$\\\232\313\345\376\364\323O\204\330\22FT"
) 500
(
#"\205B\1{\25\324\324\324@\326B\211"
#"D\"\22\211\232M\233\5\1\373\276\276"
#"\276\32\352|\376\371\347\350\257\252\373\26"
#"\201\21\371\223\311d #`\263\331d=\301\235;w\200\274\340\340`b\34+"
#"..^\264hQ\307\216\35]]]{\366\354\331\257_?\17\17\17\27\27\227"
#"\0313fh\356+\251\251\251\260\335."
#"B\310\303\303\343\310\221#0T\22\223"
#"\317\364\364t\220\262\313\345r\"o\274"
#"\346\333\1_\256\245\245eS\276\334\273"
#"w\357\"\204\354\355\355\265\332^\323\30"
#"0\335\374\23\346\234j\311##??"
#"\377\336\275{w\356\334\321\312\21s\376"
#"\374y\"x\256K\227.\252\"n\"\225\32\315mr\341lM\331\243'M\232"
#"\204\20\242\304\365\267\bL\267~\347\361"
#"x)))\232\311\323\aJ\245\362\330\261cD\244V\277~\375(\3339\202\244"
#"\223f\244\317\2349s\20B\2336mR\375\252\260\260\260U\253VfffF"
#"uF\322\204!\371\223\313\345QQQM\5\1\337\276}\e\310\2338q\242\361"
#"\324\272\r\r\r\273v\355\"o\347H\370\241x<\36\375\355B`O0\265\333"
#"\t@\326\221\340\340`\2035Z\17\30"
#"\222?6\233\235\227\227\a\31\253)\323"
#"\215\333\267o\203\335\322\250\344\21 o"
#"\347\210\20\n\f\f\324v_\313\374\374"
#"|\244\316\227[[[\353\340\340\200\20"
#"\272u\353\226A\233\254#\f\311\37!N\5\241#|\26\b\4\247N\235\2\362"
#"\276\376\372kS\352\344+**\226/_\16A\372,\26+$$\204\2100\242"
#"\3\265\276\334\275{\367\302\340l\350\306\352\bC\362G6wI$\0220Y\375"
#"\366\333o-B\36\201\242\242\2429s"
#"\346\200\341\306\302\302b\321\242E4\367M\201I\312\317?\377L.\354\322"
#"\245\v\242!\2702\31\364\345\17\303"
#"\260\242\242\242\366\355\333\267k\327\216\317"
) 500
(
#"\347\223\323[\363x\274[\267n\265,y\4\236?\177>i\322$X\362\333\330"
#"\330P6\337T\213\203\a\17\"\204\302"
#"\302\302\256^\275\32\27\27w\373\366\355"
#"K\227.!\204\334\334\334\f>\371\322\31\272\363WSS\263w\357\336\36=z"
#"p8\234\276}\373\216\e7n\300\200\1,\26\213\303\341DGG?}\372t"
#"\300\200\1@\236P(lY\362\b<|\370\220\360\t\303\236\17M\245R-*"
#"*\n\17\17\347p8\35:t\30<x\360\370\361\343\373\364\351cmmma"
#"a!\22\211>\222\333\301u\346\357\361\343\307\35;v\0346lXFF\6y"
#"9\214a\330\332\265k[\267n\335\272uk\3300\340\343!\217@FF\6\350"
#"\\\20B\356\356\356\a\16\34\240\264\360"
#"\314\2313\216\216\216\363\346\315\2438\26"
#"jkk\23\23\23\273v\355\352\353\353k\300\354\204\372@\27\376rrrZ\267"
#"n\255y\343\245\270\2708\204PHH\310\307F\36\201\344\344d\bQ\a3\346"
#"\251S\247`\252y\340\300\1GGG\325\355\304\t`\30\366\303\17?\f\36<"
#"Xm\316`\23Ck\376 \344\202N$\343/\277\374\302\341pZ\3207\326,"
#"0\f;q\342\304\277\376\365/`\261"
#"o\337\276\220\37\236\316\302|\312\224)"
#"\335\272u3\245T^-\264\343O\251T\16\35:t\333\266m\344B\211DB"
#"\354\313M\331\207\357\304\211\23\275{\367"
#"\376x\336\366j\241P(\366\356\335\353"
#"\352\352\212\20j\333\266-\305\206\16\20"
#"\n\205\252\311\203g\317\236\35\35\35m"
#"\22266\t\355\370KKK\353\324\251"
#"\23\205\17x\311\211D\"\221H\244\272"
#"\275\212\217\217\317\371\363\347\365m\246\361"
#"QWW\267p\341B\325\240g\374C&\27U\17~ii\251\275\275"
#"\275T*5I\3\325C;\376\26.\\\270n\335:rI\263A\244"
) 500
(
#"b\261x\332\264i\2724\315\344\340\363"
#"\371\252\6kH\274\201\232\330\371'("
#"(\310\200\2339\350\0\355\364\203\27/"
#"^\34;v,\271\244\246\246\6!\344\351\351\311`0\2\2\2\352\353\353)\207"
#"\214\0313\346\362\345\313Z]\245E \225J\213\212\212T\5\324\\.7++"
#"\313\317\317\17rEP0v\354XX\24\266\24\264\213\277-))\241h2!"
#"\251\353\334\271s\207\f\0312|\370pKKK\374\2039\6\360\346\315\e\251T"
#"j\300\214\214F\202\263\2633\207\303\241"
#"\24\6\4\4\b\205\302n\335\272\275~"
#"\375\32\226C\24\270\270\270H\245R\2234\260\th\325[-,,T\23\n\21"
#"\257CpvSl\374\340\352\374\370\341"
#"\344\344\324\267o_r\313\301\3\234\236\236^PP\0\e\336\252fA\273w\357"
#"\236\217\217\217V\277\241a\241\335\370\351"
#"\354\354L\221\257\347\346\346\22A\334\360"
#"\204R\364\321\235;w\266\263\263kY"
#"\221\b\35\334\272u\253\254\254\214\334r"
#"\330T\325\327\327\327\315\315\255\252\252\352"
#"\306\215\e\224w\aB\250\260\260P\207"
#"\4\265\6\204v\374\365\354\331\223\22\233"
#"s\345\312\225\316\235;\303\326\226\340\363"
#"\204\354'\4\322\323\323{\364\350\241\363\370YYY\251!\313vee%\315\232"
#"\315\302\303\303\243\252\252\252\260\260\220(!{\370x<^TTTZZ\32\345"
#"\250\364\364\364\236={\352|Q\375\241"
#"\35\177#F\214\0m\17\201\260\2600>\237omm\315d2\367\355\333\a>"
#"n2\222\222\222\b\225\221\266\b\b\b"
#"\350\325\253\227\257\257/\3545E\301\225"
#"+W\332\266m\v\23`\3155\351\200\311d\16\37>\34\266\205V\v\325\367\37"
#"\216\343\372\334\235a\240\325 SWW\347\342\342r\357\336=J\271B\241"
#"P\ef\220\223\223\343\340\340\240[\304%Yl\217T\24\177\360\256E\b"
) 500
(
#")\225J\3155\351\343\217?\376\200\274"
#"\3364\353\378p`\310\220!\272]"
#"\313P\320\332~v\360\340\301\356\335\273"
#"\323\331\203\261\256\256\216\311d\352\274\257"
#"3h\375\340\263P(\244\204\343\"\204`e\246T*5\327\324\nS\246L\231"
#"4i\22\235\232\260\333O\213{\341\265"
#"\216\37\v\t\t\361\363\363\353\321\243\a"
#"\254\374\232BCC\303\347\237\177\36\36"
#"\36\276d\311\22m/\1\310\317\317\207"
#"\350\2\204P\247N\235\310\363\246I\223&I$\22\bYf0\30\32jj\213"
#"\375\373\367?z\364(00Ps\265\234\234\34//\257\370\370\370\317>\373L"
#"\347k\31\6\272\321\376\357\177\377\333\305"
#"\305\345\354\331\263j\277\275p\341\202\267"
#"\267\367\267\337~\253\317\264\23\342\315\340"
#"3(k\3403\204)\221\361\364\351S\2655uCccc\357\336\275\375\375\375"
#"\325\n\2610\f\333\271s'\227\313\325"
#"\220X\327\224`\340\177]n\323\307\371\363\347W\257^]__?f\314\30/"
#"/\257v\355\332I\245\322g\317\236\235"
#";w\256\261\261\361\373\357\277\27\n\205\372<Xeee\\.W\241P0\231"
#"L\26\213UQQagg\367\374\371"
#"\363N\235:\325\326\326\262X\254\332\332"
#"\332\266m\333\302(J\251I\331\361E"
#"[`\30\26\35\35\375\343\217?v\354\330q\354\330\261nnnm\333\266}\363"
#"\346MfffRR\22\237\317_\275z\265\217\217\217>\2270\24t\347\17!"
#"\204\343\370\235;w.^\274\370\342\305\v\251T\312\345r===G\217\36\375"
#"\331g\237Q\366\212\321\r\253V\255Z\275z5B(&&\346\233o\276),"
#",tss\303IrS&\223\211a"
#"\30\203\301\240\324\324\377\322\b\241\372"
#"\372\372\324\324\324_\177\375\265\270\270\270\252\252\312\325\325"
#"\265{\367\356\303\207\17\357\332\265\253A\316o\20\350\305\237"
) 47
(
#"\t\0\6U:\31\344\350\327\374;\341c\347\357\37hF\213\345/\370\a"
#"\6\301\377\3O\241\230\375\205\220\376\22\0\0\0\0IEND\256B`\202"
) 0 0 0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 16 3 6 #"define"
0 0 4 3 1 #" "
0 0 14 3 9 #"city-plan"
0 0 4 3 1 #" "
0 0 18 3 13 #";sedgewick228"
0 0 4 29 1 #"\n"
0 0 4 3 3 #" "
0 0 23 3 1 #"("
0 0 16 3 3 #"let"
0 0 4 3 1 #" "
0 0 23 3 2 #"(("
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 14 3 3 #"new"
0 0 4 3 1 #" "
0 0 21 3 2 #"#f"
0 0 4 3 1 #" "
0 0 21 3 1 #"8"
0 0 23 3 3 #")))"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.29"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"6"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.51"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.31"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"1"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.32"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"5"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.60"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"5"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.18"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"5"
0 0 4 3 1 #" "
0 0 21 3 1 #"4"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.40"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"4"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.46"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"4"
0 0 4 3 1 #" "
0 0 21 3 1 #"6"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.51"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 4 3 1 #" "
0 0 21 3 1 #"4"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.34"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"1"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.21"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"7"
0 0 4 3 1 #" "
0 0 21 3 1 #"6"
0 0 4 3 1 #" "
0 0 21 3 4 #"0.25"
0 0 23 3 1 #")"
0 0 4 3 1 #" "
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 14 3 1 #"g"
0 0 23 3 2 #"))"
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 4 29 1 #"\n"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 16 3 6 #"define"
0 0 4 3 1 #" "
0 0 14 3 8 #"triangle"
0 0 4 3 1 #" "
0 0 4 29 1 #"\n"
0 0 4 3 3 #" "
0 0 23 3 1 #"("
0 0 16 3 3 #"let"
0 0 4 3 1 #" "
0 0 23 3 2 #"(("
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 23 3 1 #"("
0 0 14 3 3 #"new"
0 0 4 3 1 #" "
0 0 21 3 2 #"#f"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 23 3 3 #")))"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"1"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"0"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 23 3 1 #"("
0 0 14 3 9 #"add-edge!"
0 0 4 3 1 #" "
0 0 14 3 1 #"g"
0 0 4 3 1 #" "
0 0 21 3 1 #"2"
0 0 4 3 1 #" "
0 0 21 3 1 #"1"
0 0 4 3 1 #" "
0 0 21 3 1 #"3"
0 0 23 3 1 #")"
0 0 4 29 1 #"\n"
0 0 4 3 5 #" "
0 0 14 3 1 #"g"
0 0 23 3 3 #")))"
0 0
| false |
8f6bcd963390753b487507ddc5937ad32bb5ba7f | c83b277957534624cfae99573ffa30c1e879c4bc | /unlike-assets-doc/unlike-assets/scribblings/examples.scrbl | 04d45497790dd77db9b79d5e9ca4707465040ca6 | [
"MIT"
] | permissive | pmatos/unlike-assets | f8cdef05f9b0f8bb6c5dc247738ca2c1bd374075 | 7179aca2b7a265bb65e6450d1972d2c3f9c0e3d3 | refs/heads/master | 2022-04-25T09:15:34.992993 | 2020-04-12T06:26:06 | 2020-04-12T06:26:06 | 257,580,137 | 0 | 0 | MIT | 2020-04-21T11:56:08 | 2020-04-21T11:56:07 | null | UTF-8 | Racket | false | false | 2,290 | scrbl | examples.scrbl | #lang scribble/manual
@title{Examples}
@section{Basic use of clarify and delegate}
@(require (for-label racket racket/class unlike-assets))
This example shows an implementation of @method[unlike-compiler% delegate] and @method[unlike-compiler% clarify]
that together build a message in terms of one set of dependencies.
@racketblock[
(require unlike-assets)
(define dependencies
'(complexity only maddens
people ingesting lengthy
elusive documentation))
(define/contract (build-message clear compiler) advance/c
(string-upcase
(apply string (map (λ (unclear) (send compiler lookup unclear))
dependencies))))
(define/contract (resolve-dependency clear compiler) advance/c
(string-ref clear 0))
(define/contract (main clear compiler) advance/c
(define clear-names (map (λ (unclear) (send compiler clarify unclear))
dependencies))
(for ([dependency clear-names])
(send compiler add! dependency clear))
build-message)
(define compiler (new (class* unlike-compiler% () (super-new)
(define/override (clarify unclear)
(symbol->string unclear))
(define/override (delegate clear)
(if (string=? clear "start")
main
resolve-dependency)))))
(send compiler add! "start")
(hash-ref (send compiler compile!) "start")
]
@itemlist[#:style 'ordered
@item{The compiler is informed of a new asset by an unclear name: @racket['start].}
@item{@method[unlike-compiler% clarify] maps the unclear name to @racket["start"].}
@item{@method[unlike-compiler% delegate] associates @racket["start"] to @racket[main].}
@item{@racket[main] runs, adding dependencies as a side-effect. @racket[build-message] is returned as the designated next step to fulfill @racket["start"]. It will not be called yet.}
@item{All dependencies are circulated through @method[unlike-compiler% clarify] and @method[unlike-compiler% delegate] as well, and each end up fulfilled by @racket[resolve-dependency] as the first letter of their clear names.}
@item{@racket[build-message] runs, joining the first letter of each dependency in the declared order. The output is @racket["COMPILED"]}
]
| false |
c9dccc5708e082a2131436e0b1cd04c0b6cf8c0d | 898dceae75025bb8eebb83f6139fa16e3590eb70 | /pl1/asg3/typed-desugar-template.rkt | 782fe38a9b646026e6ad6d8d38a026694d2a4df7 | [] | no_license | atamis/prog-hw | 7616271bd4e595fe864edb9b8c87c17315b311b8 | 3defb8211a5f28030f32d6bb3334763b2a14fec2 | refs/heads/master | 2020-05-30T22:17:28.245217 | 2013-01-14T18:42:20 | 2013-01-14T18:42:20 | 2,291,884 | 0 | 0 | null | null | null | null | UTF-8 | Racket | false | false | 9,428 | rkt | typed-desugar-template.rkt | #lang plai-typed
(require "typed-lang.rkt")
(define (car (l : (listof 'a))) : 'a
(first l))
(define (cdr (l : (listof 'a))) : 'a
(rest l))
(define (make-ids (n : number)) : (listof symbol)
(build-list n (lambda (n) (string->symbol (string-append "var-" (to-string n))))))
;; cascade-lets will build up the nested lets, and use body as the
;; eventual body, preserving order of evaluation of the expressions
(define (cascade-lets (ids : (listof symbol))
(exprs : (listof ExprC))
(body : ExprC)) : ExprC
(cond [(empty? ids) body]
[(cons? ids)
(LetC (first ids) (first exprs) (cascade-lets (rest ids) (rest exprs) body))]))
;; check-type builds an expression that checks the type of the expression
;; given as an argument
(define (check-type (expr : ExprC) (type : string)) : ExprC
(Prim2C '== (Prim1C 'tagof expr) (StrC type)))
;; and builds up an and expression from its two pieces
(define (and (expr1 : ExprC) (expr2 : ExprC)) : ExprC
(IfC expr1 expr2 (FalseC)))
;; all builds up a series of ands over the expression arguments
(define (all (exprs : (listof ExprC))) : ExprC
(foldl (lambda (exp result) (and exp result)) (TrueC) exprs))
;; map-subtract builds an expression that maps 'num- over a list of expressions
(define (map-subtract (exprs : (listof ExprC))) : ExprC
(foldl (lambda (expr result) (Prim2C 'num- result expr)) (first exprs) (rest exprs)))
(define (desugar-subtract (args : (listof ExprP))) : ExprC
(local ([define ids (make-ids (length args))]
[define id-exps (map IdC ids)])
(cascade-lets ids (map desugar args)
(IfC (all (map (lambda (e) (check-type e "number")) id-exps))
(map-subtract id-exps)
(ErrorC (StrC "Bad arguments to -"))))))
(define (desugar-field (field : FieldP)) : FieldC
(fieldC (fieldP-name field) (desugar (fieldP-value field))))
(define (LHS-object (lhs : LHS)) : ExprP
(type-case LHS lhs
[BracketLHS (obj field)
obj]
[DotLHS (obj field)
obj]
[IdLHS (id)
(error 'lhs "IdLHS has no object")]))
(define (LHS-field (lhs : LHS)) : ExprC
(type-case LHS lhs
[BracketLHS (obj field)
(desugar field)]
[DotLHS (obj field)
(StrC (symbol->string field))]
[IdLHS (id)
(StrC (symbol->string id))]))
;; Takes a symbol for the operator and a list of arguments, and desugars them into a
; nested series of Prim2Cs with the given symbol as their operator.
(define (prim-desugar (op : symbol) (args : (listof ExprC))) : ExprC
(cond
[(empty? args) (ErrorC (StrC "Empty list for prim op"))]
[(= (length args) 2)
(let ([des-car-args (car args)])
(Prim2C op
des-car-args (second args)))]
[else
(let ([des-car-args (car args)])
(Prim2C op des-car-args
(prim-desugar op (cdr args))))]))
(prim-desugar 'num+ (map NumC (list 5 4 3)))
(define (working-desugar (exprP : ExprP)) : ExprC
(type-case ExprP exprP
[NumP (n) (NumC n)]
[StrP (s) (StrC s)]
[TrueP () (TrueC)]
[FalseP () (FalseC)]
[IdP (name)
(IdC name)]
;; Fill in more cases here...
#;[PrimP (op args)
(case op
['- (cond
[(= 0 (length args)) (ErrorC (StrC "Empty list for prim op"))]
[(< 0 (length args)) (desugar-subtract args)])])]
[SeqP (es)
(cond
[(= (length es) 1)
(SeqC (TrueC) (desugar (car es)))]
[else
(SeqC (desugar (car es)) (desugar (SeqP (cdr es))))])]
[WhileP (test body)
;; dummy-fun will tell us it was called if we do so accidentally
(local ([define dummy-fun (FuncC (list) (ErrorC (StrC "Dummy function")))])
(IfC (desugar test)
;; while-var will hold the actual function once we tie
;; everything together
(LetC 'while-var dummy-fun
(LetC 'while-func
;; this function does the real work - it runs the body of
;; the while loop, then re-runs it if the test is false, and
;; stops if its true
(FuncC (list)
(LetC 'temp-var
(desugar body)
(IfC (desugar test)
(AppC (IdC 'while-var) (list))
(IdC 'temp-var))))
;; The Set!C here makes sure that 'while-var will resolve
;; to the right value later, and the AppC kicks things off
(SeqC (Set!C 'while-var (IdC 'while-func))
(AppC (IdC 'while-var) (list)))))
(FalseC)))]
[ObjectP (fields)
(ObjectC (map desugar-field
fields))]
[DotP (obj field)
(GetFieldC (desugar obj) (StrC (symbol->string field)))]
[BracketP (obj field)
(GetFieldC (desugar obj) (desugar field))]
[AssignP (lhs value)
(SetFieldC (desugar (LHS-object lhs))
(LHS-field lhs) (desugar value))]
[PrimAssignP (op lhs value)
(let ([id (string->symbol (StrC-s (LHS-field lhs)))])
(Set!C id
(desugar
(PrimP op (list (IdP id) value)))))]
[PrimP (op args)
(cond
[(symbol=? op '-)
(cond
[(= 0 (length args)) (ErrorC (StrC "Empty list for prim op"))]
[(< 0 (length args)) (desugar-subtract args)])]
[(or (symbol=? op '<)
(symbol=? op '>))
(if (> (length args) 2)
(ErrorC (StrC "Bad primop"))
(Prim2C op (desugar (first args)) (desugar (second args))))]
[(symbol=? op '+)
(let ([dargs (map desugar args)])
(LetC 'first-arg (first dargs)
(IfC (Prim2C '== (Prim1C 'tagof (IdC 'first-arg))
(StrC "number"))
(if (= (length dargs) 2)
(Prim2C '+num (IdC 'first-arg)
(second dargs))
(Prim2C '+num (IdC 'first-arg)
(prim-desugar '+num (rest dargs))))
(if (= (length dargs) 2)
(Prim2C '+str (IdC 'first-arg)
(second dargs))
(Prim2C '+str (IdC 'first-arg)
(prim-desugar '+num (rest dargs)))))))]
[else
(cond
[(empty? args) (ErrorC (StrC "Empty list for prim op"))]
[(= (length args) 1)
(Prim1C op (desugar (car args)))]
[(= (length args) 2)
(let ([des-car-args (desugar (car args))])
(Prim2C (convert-op op des-car-args)
des-car-args (desugar (second args))))]
[else
(let ([des-car-args (desugar (car args))])
(Prim2C (convert-op op des-car-args) des-car-args
(desugar (PrimP op (cdr args)))))])])]
[DefvarP (id bind body)
(LetC id (desugar bind) (desugar body))]
[else (ErrorC (StrC (string-append "Haven't desugared a case yet:\n"
(to-string exprP))))]))
(define (broken-desugar (exprP : ExprP)) : ExprC
(ErrorC (StrC (string-append "Haven't desugared a case yet:\n"
(to-string exprP)))))
(define desugar working-desugar)
(desugar (BracketP (ObjectP (list (fieldP "awesome" (NumP 4)))) (StrP "awesome")))
(desugar (BracketP (SeqP (list (ObjectP (list (fieldP "awesome" (NumP 4))))))
(StrP "awesome")))
(test (desugar (ObjectP (list (fieldP "awesome" (NumP 4)))))
(ObjectC (list (fieldC "awesome" (NumC 4)))))
(test (desugar (DotP (ObjectP (list (fieldP "awesome" (NumP 4)))) 'awesome))
(GetFieldC (ObjectC (list (fieldC "awesome" (NumC 4)))) (IdC 'awesome)))
(test (desugar (BracketP (ObjectP (list (fieldP "awesome" (NumP 4)))) (StrP "awesome")))
(GetFieldC (ObjectC (list (fieldC "awesome" (NumC 4)))) (IdC 'awesome)))
(desugar (DotP (ObjectP (list (fieldP "x" (NumP 5)))) 'x))
(desugar (PrimP '+ (map {lambda (nump) (PrimP 'print (list nump))}
(map NumP (list 5 4 3)))))
(desugar (PrimP '+ (map NumP (list 5 4 3))))
(desugar (PrimP '+ (list (NumP 1) (NumP 2))))
(NumC? (NumC 4)) | false |
Subsets and Splits