-
Notifications
You must be signed in to change notification settings - Fork 51
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
Unsoundness of glob #451
Comments
|
For what it's worth your
The correct way to axiomatize
Curiously I'm unable to reproduce your proof of false after changing
This fails to reproduce your proof of false as well. Maybe I've stumbled upon another bug or this is one of those "consistent by accident" situations or maybe there's a way to fix your proof that I'm not seeing. This doesn't invalidate your objections though. |
@oskgo You are, of course, perfectly right. I will try to fix the counterexample and report back. |
For counterexamples like this, is there some pragma to actually show the types that EasyCrypt uses? It is very hard to work with goals like "card = 2" when I have to guess how the type parameter of "card" is instantiated... |
There is none. But we're accepting this as a bug (as tagged) and are working on a long-term fix to glob-related issues. I do not think it is worth spending time refining the counter-example further. It would, however, be worth searching for other examples that leverage other forgotten corners of the |
So my analysis: The counterexample given here is incorrect. Easycrypt eagerly rewrites globs already during parsing. As far as I can tell, this rewriting means that
actually just is the same as if we had input
This is is, of course, true. So we don't get a contradiction because further down in the proof, we use The reason why it worked before (when I used In fact, if EasyCrypt rewrites upon input all glob types to types that are either (a) just a glob of an abstract module (no instantiation) or (b) involving only concrete modules, then this means that essentially (up to syntactic sugar), we just cannot talk about globs that are not of type (a) or (b). So counterexamples like the one I tried might well be impossible, and @oskgo might be right that there is soundness by accident (or by design?) But this leaves some problems:
Concerning type annotations in printing: This trick helps somewhat when debugging:
and then a |
Hi @dominique-unruh. Could you report the printing issue in a separate ticket? Otherwise, I will forget to fix it. |
I didn't get unsoundness when using the pattern So I am posting them here, instead.
|
The new treatment of globs (introduced in #440 which fixes #102) leads to an unsoundness.
The theory below illustrates that.
(There are some admits, I can fill them in if they are required, but I think the admitted facts that have nothing to do with modules or globs should be uncontroversial.)
Maybe it is time to fix the glob-problem by first giving a definition to what glob means? This is the third unsoundness based on inconsistent glob treatment that I have posted.
The text was updated successfully, but these errors were encountered: