add small counter examples to list machine
Also include test cases that show that the counter examples type check
This commit is contained in:
parent
bd3aaa0ff7
commit
29fe17729b
|
@ -26,3 +26,11 @@
|
||||||
< [(:lookup-Γ Γ v_0 τ_0) (:lookup-Γ Γ v_1 τ_1)
|
< [(:lookup-Γ Γ v_0 τ_0) (:lookup-Γ Γ v_1 τ_1)
|
||||||
---
|
---
|
||||||
> [(:lookup-Γ Γ v_0 τ_0) (:lookup-Γ Γ v_0 τ_1)
|
> [(:lookup-Γ Γ v_0 τ_0) (:lookup-Γ Γ v_0 τ_1)
|
||||||
|
449a454,460
|
||||||
|
>
|
||||||
|
> (define small-counter-example
|
||||||
|
> (term (l0 : (begin (cons v0 Z v0) halt) end)))
|
||||||
|
> (test-equal (check small-counter-example) #f)
|
||||||
|
> (test-equal (judgment-holds (check-program ,small-counter-example
|
||||||
|
> (l0 : (v0 : nil empty) empty)))
|
||||||
|
> #t)
|
||||||
|
|
|
@ -30,3 +30,11 @@
|
||||||
> ;; 20 is a small number, but some terms can get exponentially large
|
> ;; 20 is a small number, but some terms can get exponentially large
|
||||||
> (or stopped
|
> (or stopped
|
||||||
> (empty? closure)
|
> (empty? closure)
|
||||||
|
449a454,460
|
||||||
|
>
|
||||||
|
> (define small-counter-example
|
||||||
|
> (term (l0 : (begin (cons v0 v0 v0) halt) end)))
|
||||||
|
> (test-equal (check small-counter-example) #f)
|
||||||
|
> (test-equal (judgment-holds (check-program ,small-counter-example
|
||||||
|
> (l0 : (v0 : nil empty) empty)))
|
||||||
|
> #t)
|
||||||
|
|
|
@ -6,3 +6,11 @@
|
||||||
< (p r_2 ι)
|
< (p r_2 ι)
|
||||||
---
|
---
|
||||||
> (p r ι)
|
> (p r ι)
|
||||||
|
449a450,456
|
||||||
|
>
|
||||||
|
> (define small-counter-example
|
||||||
|
> (term (l0 : (begin (cons v0 v0 v0) (begin (fetch-field v0 1 v0) halt)) end)))
|
||||||
|
> (test-equal (check small-counter-example) #f)
|
||||||
|
> (test-equal (judgment-holds (check-program ,small-counter-example
|
||||||
|
> (l0 : (v0 : nil empty) empty)))
|
||||||
|
> #t)
|
||||||
|
|
|
@ -451,3 +451,10 @@
|
||||||
halt))
|
halt))
|
||||||
(loop : (jump loop)
|
(loop : (jump loop)
|
||||||
end)))))
|
end)))))
|
||||||
|
|
||||||
|
(define small-counter-example
|
||||||
|
(term (l0 : (begin (cons v0 Z v0) halt) end)))
|
||||||
|
(test-equal (check small-counter-example) #f)
|
||||||
|
(test-equal (judgment-holds (check-program ,small-counter-example
|
||||||
|
(l0 : (v0 : nil empty) empty)))
|
||||||
|
#t)
|
||||||
|
|
|
@ -451,3 +451,10 @@
|
||||||
halt))
|
halt))
|
||||||
(loop : (jump loop)
|
(loop : (jump loop)
|
||||||
end)))))
|
end)))))
|
||||||
|
|
||||||
|
(define small-counter-example
|
||||||
|
(term (l0 : (begin (cons v0 v0 v0) halt) end)))
|
||||||
|
(test-equal (check small-counter-example) #f)
|
||||||
|
(test-equal (judgment-holds (check-program ,small-counter-example
|
||||||
|
(l0 : (v0 : nil empty) empty)))
|
||||||
|
#t)
|
||||||
|
|
|
@ -447,3 +447,10 @@
|
||||||
halt))
|
halt))
|
||||||
(loop : (jump loop)
|
(loop : (jump loop)
|
||||||
end)))))
|
end)))))
|
||||||
|
|
||||||
|
(define small-counter-example
|
||||||
|
(term (l0 : (begin (cons v0 v0 v0) (begin (fetch-field v0 1 v0) halt)) end)))
|
||||||
|
(test-equal (check small-counter-example) #f)
|
||||||
|
(test-equal (judgment-holds (check-program ,small-counter-example
|
||||||
|
(l0 : (v0 : nil empty) empty)))
|
||||||
|
#t)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user