-
Notifications
You must be signed in to change notification settings - Fork 30
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
Nonterminating ghost proves false #724
Comments
Thank you for reporting this! I am not sure if this is a bug, but this case is definitely confusing! From my PoV, there are two ways to look at this program:
I believe that we may have been going with Option 2, but this example definitely shows that that can be very confusing. I will bring this up in the next Gobra meeting. |
Thanks for confirming! :) Do you have a spec regarding the erasure of ghost code? I guess you'd normally remove it from the program and hence it should not be executed. If you go for option 2, this would raise further questions: what if ghost code somehow panics? I believe fully erasing ghost variables and their initialization (expression) is also what Dafny does. As I understand it, that is the value of having ghost. Otherwise you might just declare the ghost variables as a regular part of the program, because there is no performance benefit anymore with ghost. |
This issue has been fixed in #755, and we settled for the interpreting this program according to Option 1 (from my previous comment). Since then, programs like the one shown should be rejected by the type system - the entire variable declaration, including the rhs, are considered to occur in a ghost context and calls to impure non-ghost methods are disallowed from ghost contexts. Once again, thank you for the report. |
Despite the patch mentioned in #718 I can still use
to prove false on the master branch.
Can you please check?
The text was updated successfully, but these errors were encountered: