-
Notifications
You must be signed in to change notification settings - Fork 35
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
Reporting multiple errors #735
Comments
I don't agree that this is "a requirement", it's a consequence of how the filtering and the position reporting works. So if we want to change this "requirement", we'd have to change the filtering or the position reporting.
|
Well, "requirement" is empirical because there is no documentation for users of the public AST interface. I now understand the steps that lead to the missing verification errors, but overall it doesn't sound like something that we want Viper users to deal with (i.e. looking up how Viper internally generates error messages to understand in which cases the position should be set). The closest thing to a bug is that for failing assert statements Silver replaces the good position of the offending node with the bad |
I disagree with both points. Again, why not just disable the deduplication when used from API? I think deduplication makes sense for command line usage, but clearly not always for API usage. IMO the problem really has nothing to do with the positions Viper reports for error messages or expectations about positions. We're just always doing a deduplication that makes sense for command line usage but may not make sense for other use cases. Let's disable it for those then. |
So you are saying that when frontends use |
Either that or maybe we could move the deduplication to the point where errors are reported to stdout, so that it's never used from the API in the first place? |
I determined that to report multiple verification errors in the same method Silicon does not only require the position of the offending node of the error to be set, but also the position of the reason node. The following test, for example, fails if
pos_1b
andpos_2b
areNoPosition
.@Aurel300 This is why we don't get multiple errors in Prusti: we do not always generate positions for sub-expressions, even though we always generate positions for the offending nodes (e.g. the
assert
statements).Source code
Is this intentional or is this a bug? Would it be hard to lift this requirement? As far I can observe, Carbon does not have a similar requirement, nor Silicon when configured to report one error per function.
(This is a follow-up of #732.)
The text was updated successfully, but these errors were encountered: