Fix diffs

This commit is contained in:
Jay McCarthy 2014-03-19 14:55:18 -06:00
parent 0bdf7260ed
commit f7d554d727
19 changed files with 26 additions and 48 deletions

View File

@ -2,11 +2,9 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "app rule the range of the function is matched to the argument") > (define the-error "app rule the range of the function is matched to the argument")
32a33 55c55
> ((cons v) v)
54c55
< (typeof Γ M_2 σ) < (typeof Γ M_2 σ)
--- ---
> (typeof Γ M_2 σ_2) > (typeof Γ M_2 σ_2)
237d237 238d237
< <

View File

@ -2,5 +2,3 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "the ((cons number) v) value has been omitted") > (define the-error "the ((cons number) v) value has been omitted")
32a33
> ((cons v) v)

View File

@ -2,9 +2,7 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "the order of the types in the function position of application has been swapped") > (define the-error "the order of the types in the function position of application has been swapped")
32a33 54c54
> ((cons v) v)
53c54
< [(typeof Γ M (σσ_2)) < [(typeof Γ M (σσ_2))
--- ---
> [(typeof Γ M (σ_2 → σ)) > [(typeof Γ M (σ_2 → σ))

View File

@ -2,9 +2,7 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "the type of cons is incorrect") > (define the-error "the type of cons is incorrect")
32a33 64c64
> ((cons v) v)
63c64
< (int → ((list int) → (list int)))] < (int → ((list int) → (list int)))]
--- ---
> (int → ((list int) → int))] > (int → ((list int) → int))]

View File

@ -2,11 +2,9 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "the tail reduction returns the wrong value") > (define the-error "the tail reduction returns the wrong value")
32a33 93c93
> ((cons v) v)
92c93
< (in-hole E v_2) < (in-hole E v_2)
--- ---
> (in-hole E v_1) > (in-hole E v_1)
237d237 238d237
< <

View File

@ -2,11 +2,9 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "hd reduction acts on partially applied cons") > (define the-error "hd reduction acts on partially applied cons")
32a33 89c89
> ((cons v) v)
88c89
< (--> (in-hole E (hd ((cons v_1) v_2))) < (--> (in-hole E (hd ((cons v_1) v_2)))
--- ---
> (--> (in-hole E (hd (cons v_1))) > (--> (in-hole E (hd (cons v_1)))
237d237 238d237
< <

View File

@ -2,12 +2,10 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "evaluation isn't allowed on the rhs of applications") > (define the-error "evaluation isn't allowed on the rhs of applications")
32a33 36,37c36
> ((cons v) v)
35,36c36
< (E M) < (E M)
< (v E))) < (v E)))
--- ---
> (E M))) > (E M)))
237d236 238d236
< <

View File

@ -2,11 +2,9 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "lookup always returns int") > (define the-error "lookup always returns int")
32a33 77c77
> ((cons v) v)
76c77
< σ] < σ]
--- ---
> int] > int]
237d237 238d237
< <

View File

@ -2,11 +2,9 @@
< (define the-error "no error") < (define the-error "no error")
--- ---
> (define the-error "variables aren't required to match in lookup") > (define the-error "variables aren't required to match in lookup")
32a33 76c76
> ((cons v) v)
75c76
< [(lookup (x σ Γ) x) < [(lookup (x σ Γ) x)
--- ---
> [(lookup (x σ Γ) x_2) > [(lookup (x σ Γ) x_2)
237d237 238d237
< <

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M) (E M)

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M) (E M)

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M) (E M)

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M) (E M)

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M) (E M)

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M) (E M)

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M))) (E M)))

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M) (E M)

View File

@ -31,7 +31,6 @@
c c
(cons v) (cons v)
((cons v) v) ((cons v) v)
((cons v) v)
(+ v)) (+ v))
(E hole (E hole
(E M) (E M)

View File

@ -181,7 +181,6 @@
(define typed-generator (dynamic-require fpath 'typed-generator)) (define typed-generator (dynamic-require fpath 'typed-generator))
(define gen-enum (dynamic-require fpath 'generate-enum-term)) (define gen-enum (dynamic-require fpath 'generate-enum-term))
(define ordered-generator (dynamic-require fpath 'ordered-enum-generator)) (define ordered-generator (dynamic-require fpath 'ordered-enum-generator))
(define fixed (dynamic-require fpath 'fixed))
(define err (dynamic-require fpath 'the-error)) (define err (dynamic-require fpath 'the-error))
(printf "\n-------------------------------------------------------------------\n") (printf "\n-------------------------------------------------------------------\n")
(printf "~a has the error: ~a\n\n" fpath err) (printf "~a has the error: ~a\n\n" fpath err)
@ -194,12 +193,18 @@
t))) t)))
(cond (cond
[(equal? gen-type 'fixed) [(equal? gen-type 'fixed)
(define some-failed? (define small-counter-example
(for/or ([t (in-list fixed)]) (dynamic-require
(define ok? (check (and (tc t) t))) fpath 'small-counter-example
(not ok?))) (λ ()
(unless some-failed? (error 'fixed "contains no small counter example"))))
(error 'fixed "Expected some term to fail, but didn't find one in ~a" fixed))] (unless (tc small-counter-example)
(error 'fixed "The counter example doesn't type-check: ~e"
small-counter-example))
(define ok? (check small-counter-example))
(when ok?
(error 'fixed "Expected ~e to fail on check, but it didn't"
small-counter-example))]
[(equal? gen-type 'grammar) [(equal? gen-type 'grammar)
(run/spawn-generations fpath verbose? no-errs? (λ () (gen-and-type gen-term)) (run/spawn-generations fpath verbose? no-errs? (λ () (gen-and-type gen-term))
check seconds gen-type)] check seconds gen-type)]