quint
quint copied to clipboard
The static analyzer either reports too many or too few errors
Imagine this scenario
def a = 1 + true // error 1
def b = 2 + false // error 2
def c = a // error 3
Error 3 is consequence of error 1, so we should not report the two of them. But errors 1 and 2 are completely independent, so we should report both.
This is the scenario I'm stumbling upon in error reporting, but there might be other ways of chaining errors where we want to report only the root cause.
In the current implementation, is easy to do:
- report only error 1
- report all 3 errors
But the ideal is to report only error 1 and 2.
I guess, the idea here is that a
gets assigned some special type that indicates a type error, right? If you do that, then you don't have to report c
, as it is tainted by this special type.