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

Opaque blocks allow proving false #6060

Open
RustanLeino opened this issue Jan 21, 2025 · 0 comments · May be fixed by #6066
Open

Opaque blocks allow proving false #6060

RustanLeino opened this issue Jan 21, 2025 · 0 comments · May be fixed by #6066
Assignees
Labels
during 3: execution of incorrect program An bug in the verifier that allows Dafny to run a program that does not correctly implement its spec kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label

Comments

@RustanLeino
Copy link
Collaborator

Dafny version

4.9.1

Code to produce this issue

method Main() {
  var c: object;
  opaque
    ensures fresh(c)
  {
    c := new object;
  }
  assert false;
}

Command to run and resulting output

% dafny verify test.dfy

Dafny program verifier finished with 1 verified, 0 errors

What happened?

The assert false; is proved, despite the fact that it is reachable.

What type of operating system are you experiencing the problem on?

Mac

@RustanLeino RustanLeino added kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label during 3: execution of incorrect program An bug in the verifier that allows Dafny to run a program that does not correctly implement its spec labels Jan 21, 2025
@keyboardDrummer keyboardDrummer linked a pull request Jan 22, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
during 3: execution of incorrect program An bug in the verifier that allows Dafny to run a program that does not correctly implement its spec kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants