▲ | ip26 12 hours ago | ||||||||||||||||
This becomes an interesting conversation then. First of all, it could mean "checking whether X is true and logging an error" instead of exiting the program. - But if you aren't comfortable crashing the program if the assumptions are violated, then what is your formal verification worth? Not much, because the formal verification only holds if the assumptions hold, and you are indicating you don't believe they will hold. - True, some are infeasible to check. In that case, you could then check them weakly or indirectly. For example, check if the first two indices of the input array are not sorted. You could also check them infrequently. Better to partially check your assumptions than not check at all. | |||||||||||||||||
▲ | empath75 25 minutes ago | parent | next [-] | ||||||||||||||||
> "checking whether X is true and logging an error" You now have some process or computation which is in an unknown state. Presumably it was important! There are lots of cases where runtime errors are fine and expected -- when processing input from the outside world, but if you started a chain of computation with good input and somehow ended up with bad input, then you have a bug! That is bad! Everything after that point can no longer be trusted, and there was some place where the code went wrong before that and made everything between there and where you caught the error invalid. And that has possibly poisoned your whole system. | |||||||||||||||||
▲ | Jaxan 8 hours ago | parent | prev | next [-] | ||||||||||||||||
You don’t assume the assertions, the verification shows they always hold! | |||||||||||||||||
▲ | kragen 12 hours ago | parent | prev [-] | ||||||||||||||||
You didn't answer my question! | |||||||||||||||||
|