-
Notifications
You must be signed in to change notification settings - Fork 75
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
Rework system outputting warnings #201
Comments
For this you might want to also take a look at #55 that addresses the same issue
|
Also relevant #36 |
There are some things open to discussion for the implementation of this issue. If you have any thoughts on the following please let us know :)
|
Your formatting misses the structure from #55:
I assume we want to reflect the structure in the type (or some value) to be able to easily filter whole groups.
Untested and not all combinations, but should give some idea: Extensible variants: type group = ..
let is_integer_error = function Integer _ -> true | _ -> false e.g. type integer_error = Overflow | Div_by_zero
type Messages.group += Integer of integer_error e.g. open Messages
(* ... *)
warn `Must (Integer IntDomain.Div_by_zero) "..." Normal variants all in one place: type integer_error = Overflow | Div_by_zero
type group = Integer of integer_error (* | ... *)
let is_integer_error = function Integer _ -> true | _ -> false e.g. open Messages
(* ... *)
warn `Must (Integer Div_by_zero) "..." Flat polymorphic variants: let is_integer_error = function `Overflow | `Div_by_zero -> true | _ -> false e.g. (* ... *)
Messages.warn `Must `Div_by_zero "..." |
As always, my worry with this is our fabulous Not sure if this is related to warnings or not, but our assertion result reporting has the same issue. Different results on different paths must meaningfully combine. For example, a must-success on one path and a must-failure on another path make up an unknown result.
What does this mean? |
This is then compounded by the issue of different contexts as well. One possible way to think about this would be: A warning is a must warning if there is a must warning for all paths in all contexts that are deemed reachable. Even this however does still not correspond to something that must happen in the concrete: Even in a case without path splitting and only one context, the entire program point may only be reachable due to overapproximation. However, as a first approach I would suggest the semantics of a must warning to be that there exists at least one path and context where the problem must happen when reaching the program point it in the corresponding context and with a value described by the predecessor. |
|
I was looking deeper into Line 9 in 6759b40
Warnings get added to this table for HTML and GobView output, in addition to being printed on the terminal: Lines 16 to 18 in 6759b40
To my surprise, the warnings table has support for grouped warnings, which are used for data races: Lines 77 to 91 in 6759b40
This works as follows in the HTML output: when you click on a line with a race warning, it lists other warnings in the same group there as well, to indicate which other lines its racing with. What #255 does is just add an advanced mechanism for printing the warnings on the terminal, but none of that new metadata (certainty, nested category) is reflected in the warnings table for further usage. Therefore HTML, GobView or the Magpie integration (if it were to get the warnings properly as JSON/XML, not by regexing the output) wouldn't be able to use that metadata still. Tbh, |
Categories should be introduced to create a better understanding of the warnings.
#198 #199 #200
@vandah
@EdinCitaku
The text was updated successfully, but these errors were encountered: