-
Notifications
You must be signed in to change notification settings - Fork 260
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
function transparency vs isolate-assertions vs split_here #5618
Comments
Question 3 is probably the most pressing, since that would affect the usefulness of |
Your examples are bit large. Any chance you could simplify them to make it easier to answer your questions?
Yes but only in general. There may still be one AB that is (almost) as expensive as the whole. I'm working on a PR that will hopefully make
Does the following example answer your question? function Foo() {
assert false; // Always fails
assert false; // This assertion never fails because the previous one establishes false,
// regardless of whether you're using `--isolate-assertions` or not
}
Note that if you're already using One more thing to note is that we're adding hide statements as an easier to use, and more performant version of But it's still work on progress. |
What I posted here was already heavily minimized. I realize it's still off-puttingly big, but the behavior I described is very finicky and it seemed to disappear with further minimization.
I understand that case; but if not using --isoloate-assertions, if the only reason to extract smaller functions is to ease verification, is it then equivalent to use split_here? |
I see, I don't understand the difference either. Sorry! It could be debugged by dropping to the Boogie level, but I'm afraid I don't have time for that now. One
Note really. |
Dafny version
4.7
Code to produce this issue
Command to run and resulting output
What happened?
Consider the function expensive(). Its verification times out with over 50M Resource Units. To try to tackle it, I tried using --isolate-assertions. Some of the resulting Assertion Batches still timed out over 50M.
Separately I tried manually breaking down expensive() into smaller functions, and then invoking them all inside of cheap(). Turns out that cheap() verifies with <200K RU - over 2 orders of magnitude better. But I don't understand what could cause such a big difference.
I understand that there is a degree of randomness here because of both how the Assertion Batches are constructed, and of what the solver might "discover" while working without isolated assertions. But apart from that, I wonder if I'm missing something more fundamental, hence these questions:
assume false
, right? Therefore, will AB 6 (and subsequent ones) be "poisoned" by this?&& assert {:split_here} true
that partition the function just like the smaller functions did for P1(). Indeed, this improves verification of P(). If the only reason to extract those smaller functions is to ease verification, is it then equivalent to use split_here?What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: