redex: adjust the test suites to clean up a few things; also make the
hole and the-not-hole equal? to each other (like they used to be)
This commit is contained in:
parent
93c21e34de
commit
2afda360d0
|
@ -973,7 +973,7 @@ See match-a-pattern.rkt for more details
|
|||
[(2) (memoize/2 f w/hole)]
|
||||
[else (error 'memoize "unknown arity for ~s" f)]))
|
||||
|
||||
(define cache-size 63)
|
||||
(define cache-size 255 #;63)
|
||||
(define (set-cache-size! cs) (set! cache-size cs))
|
||||
|
||||
;; original version, but without closure allocation in hash lookup
|
||||
|
@ -1821,7 +1821,9 @@ See match-a-pattern.rkt for more details
|
|||
(define (context? x) #t)
|
||||
(define-values (the-hole the-not-hole hole?)
|
||||
(let ()
|
||||
(define-struct hole (id) #:inspector #f)
|
||||
(define-struct hole (id)
|
||||
#:property prop:equal+hash (list (λ (x y recur) #t) (λ (v recur) 255) (λ (v recur) 65535))
|
||||
#:inspector #f)
|
||||
(define the-hole (make-hole 'the-hole))
|
||||
(define the-not-hole (make-hole 'the-not-hole))
|
||||
(values the-hole the-not-hole hole?)))
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
(variable-except y)
|
||||
(name x 1)
|
||||
(name y 1))
|
||||
(y y))
|
||||
(y 12))
|
||||
(test (hash-ref (base-cases-non-cross (find-base-cases L)) 'x)
|
||||
'(0 0 0 0)))
|
||||
|
||||
|
@ -666,7 +666,7 @@
|
|||
(let ()
|
||||
(define-language lang
|
||||
(d 5)
|
||||
(e e 4)
|
||||
(e 17 4)
|
||||
(n number))
|
||||
|
||||
(test (let ([checked 0])
|
||||
|
@ -884,7 +884,7 @@
|
|||
(define-language L
|
||||
(e (+ e ...) number)
|
||||
(E (+ number ... E* e ...))
|
||||
(E* hole E*)
|
||||
(E* hole)
|
||||
(n 4))
|
||||
|
||||
(let ([R (reduction-relation
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#lang racket
|
||||
(require "../reduction-semantics.rkt"
|
||||
"test-util.rkt"
|
||||
(only-in "../private/matcher.rkt" make-bindings make-bind the-not-hole)
|
||||
(only-in "../private/matcher.rkt" make-bindings make-bind)
|
||||
racket/match
|
||||
racket/trace
|
||||
"../private/struct.rkt")
|
||||
|
@ -313,7 +313,7 @@
|
|||
L
|
||||
(in-hole (cross e) e)
|
||||
(term (cont (1 hole))))
|
||||
(((e (cont (1 ,the-not-hole))))
|
||||
(((e (cont (1 hole))))
|
||||
((e 1)))))
|
||||
(let ()
|
||||
(define-language L
|
||||
|
@ -338,10 +338,10 @@
|
|||
(in-hole (cross e) e)
|
||||
(term ((cont ((λ (x) x) hole)) (λ (y) y))))
|
||||
(((e x))
|
||||
((e ((cont ((λ (x) x) ,the-not-hole)) (λ (y) y))))
|
||||
((e ((cont ((λ (x) x) hole)) (λ (y) y))))
|
||||
((e y))
|
||||
((e (λ (y) y)))
|
||||
((e (cont ((λ (x) x) ,the-not-hole)))))))
|
||||
((e (cont ((λ (x) x) hole)))))))
|
||||
|
||||
;; test caching
|
||||
(let ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user