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

{:inline 0} is inconsistent #933

Open
petemud opened this issue Aug 9, 2024 · 4 comments
Open

{:inline 0} is inconsistent #933

petemud opened this issue Aug 9, 2024 · 4 comments

Comments

@petemud
Copy link

petemud commented Aug 9, 2024

Under /inline:assume, which is default

procedure {:inline 0} inline0() {}

procedure inconsistent() {
    call inline0();
    assert true == false;
}

becomes

procedure inconsistent() {
    assume false;
    assert true == false;
}
Boogie program verifier finished with 1 verified, 0 errors

The bug got introduced in 08e3687

@shazqadeer
Copy link
Contributor

This is not a bug. Rather it is intended behavior. Boogie provides ways to customize what happens when the inline limit for a procedure is reached. See the documentation here.

@petemud
Copy link
Author

petemud commented Aug 10, 2024

Why is proving true==false ever an intended behavior? If it is intended under an option, at least this option shouldn't be the default

@shazqadeer
Copy link
Contributor

What default would you prefer?

@petemud
Copy link
Author

petemud commented Aug 10, 2024

You choose. The consistent and sound options if inline depth reaches 0 are:

  1. put a call (inline requires and ensures)
  2. only inline requires as assert or - only if there are no requires - drop a call completely
  3. instead of inlining requires put assert false

Putting assume false ever is plainly inconsistent. As for dropping call when there are requires - it is unsound, because this way you can prove more, not less

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

No branches or pull requests

2 participants