Skip to content
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

Bugs in Dafny tutorial #385

Closed
johnwickerson opened this issue Sep 26, 2019 · 2 comments · Fixed by #400
Closed

Bugs in Dafny tutorial #385

johnwickerson opened this issue Sep 26, 2019 · 2 comments · Fixed by #400

Comments

@johnwickerson
Copy link

I found a few bugs (and other opportunities for mild improvements) in the Dafny tutorial that I thought it might be useful to report.

  • "If statements require parentheses around the boolean condition" -> should say "do not require".

  • In the spec for Abs, you have ensures 0 <= x ==> x == y and ensures x < 0 ==> y == -x. These could be made more symmetric if the first clause said ensures 0 <= x ==> y == x"

  • "What precondition doe you need" -> typo

  • "Dafny will complain that our post condition doesn't hold" -> should be "postcondition"

  • "repairing it relatively easy" -> missing "is"

  • "But the crucial step from the loop to the postcondition wouldn't hold." -- I don't think this sentence is true. I think that the reasoning itself still holds, it's just that it doesn't tell us that the loop terminates.

@RustanLeino
Copy link
Collaborator

Nice suggestions. Thank you!

Once the PR gets approved and merged, the changes will go out on rise4fun with the next release there (which will probably coincides with the next binary release of Dafny).

RustanLeino added a commit to RustanLeino/dafny that referenced this issue Oct 23, 2019
RustanLeino added a commit that referenced this issue Oct 24, 2019
@jtojnar
Copy link

jtojnar commented Nov 10, 2020

It has been over a year, more than two years for some of the older fixes. Is the rise4fun update still planned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants