-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redex-check #:satsifying
not self-consistent; related to binding?
#196
Comments
This also demonstrates the bug. Maybe something to do with It seems to require three entries in the environment. Seems like a clue.
|
Oh, and in case this wasn't obvious, @wilbowma , I think that using a
|
I replaced bang patterns by different in my development, and am still getting the bug. I'm having a hard time shrinking it, but it seems to be related to shadowing. All the examples have the same name bound in the environment, and bound in a term. I'll post the development later if I'm still unsuccessful at shrinking it. |
Maybe there are multiple bugs and I simplified to a different one! Whee. :) |
This is the smallest I managed to get it. I started from your small examples and added features from mine until it failed. Working with the box modality, lots of weird things happens in the context. #lang racket
(require redex/reduction-semantics)
(define-language Boxy
(t ::= nat bool (→ t t) (□ t))
(e ::= x (λ (x : t) e) (e e) (box e))
(x u ::= variable-not-otherwise-mentioned)
(Γ Δ ::= · (x : t Γ))
#:binding-forms
(λ (x : t) e #:refers-to x))
(define-judgment-form
Boxy
#:mode (type I I I O)
#:contract (type Δ Γ e t)
[---------------------
(type Δ (x : t Γ) x t)]
[(type Δ Γ x_1 t_1)
(where #t (different x_1 x_2))
------------------------------------
(type Δ (x_2 : t_2 Γ) x_1 t_1)]
[------------------------------------
(type (x_1 : t_1 Δ) · x_1 t_1)]
[(type Δ · x_1 t_1)
(where #t (different x_1 x_2))
------------------------------------
(type (x_2 : t_2 Δ) · x_1 t_1)]
[(type Δ (x : t_1 Γ) e t_2)
------------------------------------
(type Δ Γ (λ (x : t_1) e) (→ t_1 t_2))]
[(type Δ Γ e_1 (→ t_1 t_2))
(type Δ Γ e_2 t_1)
------------------------------------
(type Δ Γ (e_1 e_2) t_2)]
[(type Δ · e t)
------------------------------------
(type Δ Γ (box e) (□ t))])
#|
counterexample found after 68 attempts:
(type
(u : bool ·)
(Y : (→ (→ bool (□ bool)) nat) ·)
(((λ (R : (→ nat nat)) R) (λ (d : nat) d)) (Y (λ (u : bool) (box u))))
nat)
|#
(redex-check
Boxy
#:satisfying (type Δ Γ e nat)
(judgment-holds (type Δ Γ e nat)))
|
Hi there! Finally getting around to taking a look at this... I think there are indeed two issues. Looks like the original issue does indeed have to do with binding and not mismatches. When I remove the Probably not solvable by adding a notion of binding to the generator in the short term :) Disallowing grammars with binding seems like going too far. Perhaps an update to the docs for now? The second one looks like a real issue with Looking into fixes for number 2. |
I don't even know what to make of this.
The text was updated successfully, but these errors were encountered: