-
Notifications
You must be signed in to change notification settings - Fork 77
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
Make assertion code consistent and remove asserting unknown #110
Comments
I would argue against this. We quite often had the situation where the regression tests were passing, but there still was some unsoundness somewhere, where we claimed to know things that can either be |
Can you think of any example where we really need uncertainty in both directions? Most of the time, we just want to make sure goblint isn't certain that some value is still the same when some other indirect access or thread could change it. For these cases, it suffices to say that the assertion may fail. I've seen only a few real examples, like join after thread creation, where I'd actually need to make sure goblint doesn't take the value from either branch. I would rather handle these rare cases by explicitly doing a new non-det branch in the test file and make two assertions that may fail. I do not think you can easily implement "unknown" assertions in a way that interacts well with path-sensitivity. The unknown assertion is making claims over multiple paths, so it would have to be handled within the path-sensitivity functor where one would have to rejoin split paths just for "asserts" or collect generated warnings from different paths and check if all agree. Anyway, I think it would be better if our assertion language corresponded to real program behavior. I'd rather force people to write tests in a way that assertions are true or may fail when running the program. And then combine this with TODO annotation to express whether goblint can answer this correctly at the moment. I do not like that our tests are very closely tied to how goblint analyzes programs. |
One recent example from this month that comes to mind is this one that we discovered while fixing branching:
Due to a bug (fixed in 77da471) with how the How would one express that while
While this seems super trivial, it is exactly the sort of thing that should be part of the regression tests, as this test failing points to a very specific root cause, while locating the error in Goblint for the more elaborate ones is a lot harder. |
Okay, so "may fail" is not the best label. I did not intend never fail to be LEQ may fail. By "may fail", I mean there exists at least one execution that violates it. In this particular example, where the fear is that Goblint is over-confident about a specific value, it would suffice to state Let's say you have a case where [0,1] are possible. If you assert Basically, our current assert
This would work the same way. I'm still not sure about this debug mode not refining asserts. It is very useful to be able to query the current state like this. |
Alright, I guess it was mostly a case of me not understanding what you meant by
I would leave that like it is, and not refine on asserts. One could rename |
For completeness, I'll quote #286 (comment) here:
|
I want to make some semi-brutal changes to how assertions are handled for our regression tests.
This is a fairly easy fix that I plan to make soon after we submit the SV-COMP benches, but I thought I would check if there are any opinions about it.
The text was updated successfully, but these errors were encountered: