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

Remove assume false on inline 0 #934

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petemud
Copy link

@petemud petemud commented Aug 9, 2024

@petemud petemud changed the title Fix assume false on inline 0 Remove assume false on inline 0 Aug 9, 2024
Copy link
Collaborator

@keyboardDrummer keyboardDrummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test-case to this PR?

@@ -400,7 +400,7 @@ void CheckRecursion(Implementation impl, Stack<Procedure /*!*/> /*!*/ callStack)
else if (options.ProcedureInlining == CoreOptions.Inlining.Assume)
{
// add assume
newCmds.Add(new AssumeCmd(callCmd.tok, Expr.False));
newCmds.Add(new AssumeCmd(callCmd.tok, Expr.True));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding an assume true seems pointless. Better to remove the command altogether then.

Copy link
Author

@petemud petemud Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think assert false on inline == 0 also should be assert true or empty

@petemud
Copy link
Author

petemud commented Aug 9, 2024

Can you add a test-case to this PR?

Maybe you can do it? I don't have development environment set up

@shazqadeer
Copy link
Contributor

I don't think we want to land this PR. See my comment on the associated issue.

@petemud
Copy link
Author

petemud commented Aug 12, 2024

Maybe this pull request can actually change the options into: Inlining.AssertFalse, Inlining.Requires, Inlining.Spec? All three would be consistent. See #933. What do you think, @shazqadeer?

@shazqadeer
Copy link
Contributor

@petemud : Let us back up a bit. Are you actually blocked on anything here? Specifically, is there a Boogie inline option that you can already use to get your job done?

@petemud
Copy link
Author

petemud commented Aug 13, 2024

@shazqadeer I'm not blocked on /inline options. I can just not use {:inline}, or use /inline:spec. It'd just be nice for a verification backend to be sound

@shazqadeer
Copy link
Contributor

Glad to know you are not blocked.

In principle I agree with your comments about soundness. Note though that Boogie is less a fixed verification backend and more verification backend infrastructure. It is typically used by many different tools to achieve custom combinations of "soundness" and "scalability". Mostly, we want Boogie to be predictable and not do surprising things.

For the specific question of what do do with the inline attribute, I find that Boogie documentation is accurate and there are several options available to the user to achieve what they want. It is possible though:

  • the default option is not well chosen and should perhaps have been been InlineAssert or InlineSpec
  • another option, in addition to the ones currently provided, is needed

I am happy to hear suggestions/PRs along these lines.

In the meantime, I will focus my attention on the other issue of irreducible graphs because it sounds like you are actually blocked on it.

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 this pull request may close these issues.

3 participants