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:
Robby Findler 2012-01-08 21:37:47 -06:00
parent 93c21e34de
commit 2afda360d0
3 changed files with 11 additions and 9 deletions

View File

@ -973,7 +973,7 @@ See match-a-pattern.rkt for more details
[(2) (memoize/2 f w/hole)] [(2) (memoize/2 f w/hole)]
[else (error 'memoize "unknown arity for ~s" f)])) [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)) (define (set-cache-size! cs) (set! cache-size cs))
;; original version, but without closure allocation in hash lookup ;; 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 (context? x) #t)
(define-values (the-hole the-not-hole hole?) (define-values (the-hole the-not-hole hole?)
(let () (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-hole (make-hole 'the-hole))
(define the-not-hole (make-hole 'the-not-hole)) (define the-not-hole (make-hole 'the-not-hole))
(values the-hole the-not-hole hole?))) (values the-hole the-not-hole hole?)))

View File

@ -92,7 +92,7 @@
(variable-except y) (variable-except y)
(name x 1) (name x 1)
(name y 1)) (name y 1))
(y y)) (y 12))
(test (hash-ref (base-cases-non-cross (find-base-cases L)) 'x) (test (hash-ref (base-cases-non-cross (find-base-cases L)) 'x)
'(0 0 0 0))) '(0 0 0 0)))
@ -666,7 +666,7 @@
(let () (let ()
(define-language lang (define-language lang
(d 5) (d 5)
(e e 4) (e 17 4)
(n number)) (n number))
(test (let ([checked 0]) (test (let ([checked 0])
@ -884,7 +884,7 @@
(define-language L (define-language L
(e (+ e ...) number) (e (+ e ...) number)
(E (+ number ... E* e ...)) (E (+ number ... E* e ...))
(E* hole E*) (E* hole)
(n 4)) (n 4))
(let ([R (reduction-relation (let ([R (reduction-relation

View File

@ -1,7 +1,7 @@
#lang racket #lang racket
(require "../reduction-semantics.rkt" (require "../reduction-semantics.rkt"
"test-util.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/match
racket/trace racket/trace
"../private/struct.rkt") "../private/struct.rkt")
@ -313,7 +313,7 @@
L L
(in-hole (cross e) e) (in-hole (cross e) e)
(term (cont (1 hole)))) (term (cont (1 hole))))
(((e (cont (1 ,the-not-hole)))) (((e (cont (1 hole))))
((e 1))))) ((e 1)))))
(let () (let ()
(define-language L (define-language L
@ -338,10 +338,10 @@
(in-hole (cross e) e) (in-hole (cross e) e)
(term ((cont ((λ (x) x) hole)) (λ (y) y)))) (term ((cont ((λ (x) x) hole)) (λ (y) y))))
(((e x)) (((e x))
((e ((cont ((λ (x) x) ,the-not-hole)) (λ (y) y)))) ((e ((cont ((λ (x) x) hole)) (λ (y) y))))
((e y)) ((e y))
((e (λ (y) y))) ((e (λ (y) y)))
((e (cont ((λ (x) x) ,the-not-hole))))))) ((e (cont ((λ (x) x) hole)))))))
;; test caching ;; test caching
(let () (let ()