You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the WebAssembly.Memory is preserved between clicks of the "check" button, if the input twelf code elicits an sml exception because twelf has a genuine bug, and leaves twelf's internal data structures in a bad state, then there's no way to "reboot" the twelf wasm state except by reloading the page. Probably should detect that an exception has been raised somehow, and preemptively start from a the slate.
Steps to Reproduce:
Try to check this code
term : type.
true : term.
false : term.
if : term -> term -> term -> term.
zero : term.
ty : type.
bool : ty.
int : ty.
%% relations
is_value : term -> type.
is_value/true : is_value true.
is_value/false : is_value false.
is_value/zero : is_value zero.
eval : term -> term -> type.
eval/if_true : eval (if true X _) X.
eval/if_false : eval (if false _ X) X.
eval/if : eval (if E E1 E2) (if E' E1 E2)
<- eval E E'.
not_stuck : term -> type.
not_stuck/value : not_stuck X <- is_value X.
not_stuck/eval : not_stuck X <- eval X X'.
of : term -> ty -> type.
of/true : of true bool.
of/false : of false bool.
of/zero : of zero int.
of/if : of X bool -> of Y T -> of Z T -> of (if X Y Z) T.
%% theorems
progress : (of X T) -> (not_stuck X) -> type.
%mode progress +D1 -D2.
%prove 2 T (progress T _).
Observe RuntimeError: index out of bounds in developer console (or I thought just once I had observed a Match raised, but I haven't been able to reproduce it)
Then try to check simply a:type. in the same tab.
Observe, contrary to expectations, RuntimeError: index out of bounds again. Clearly state has gotten corrupted somehow.
The text was updated successfully, but these errors were encountered:
I note that step 1 takes a good few seconds and spins up my fan sometimes, and unpredictably, I need to repeat steps 1 and 3 a couple times before a:type. reliably fails.
jcreedcmu
pushed a commit
to standardml/twelf
that referenced
this issue
Mar 10, 2024
Since the
WebAssembly.Memory
is preserved between clicks of the "check" button, if the input twelf code elicits an sml exception because twelf has a genuine bug, and leaves twelf's internal data structures in a bad state, then there's no way to "reboot" the twelf wasm state except by reloading the page. Probably should detect that an exception has been raised somehow, and preemptively start from a the slate.Steps to Reproduce:
RuntimeError: index out of bounds
in developer console (or I thought just once I had observed aMatch
raised, but I haven't been able to reproduce it)a:type.
in the same tab.RuntimeError: index out of bounds
again. Clearly state has gotten corrupted somehow.The text was updated successfully, but these errors were encountered: