News for hackers. Stuff that matters.
Re:The Use of assert() in SQLite by saagarjha on Friday April 26, 2019 @09:28PM (#19763171)
The difference is that assert has been “proved” to be true, while ALWAYS is merely thought to be true.
Re:The Use of assert() in SQLite by chris_wot on Friday April 26, 2019 @09:56PM (#19763291)
I’m still uncertain what they mean by “prove” though.
Re:The Use of assert() in SQLite by hcs on Friday April 26, 2019 @11:45PM (#19763641)
Probably the same mechanism by which most proofs work, not fully formal but it seems to follow. Without the proofs in comments (or transitively through other asserts) it's up to the reader to recreate the argument, though. The purpose is to be more explicit than a comment, I suspect, using the same notation as the code.
Re:The Use of assert() in SQLite by kevingadd on Friday April 26, 2019 @10:31PM (#19763402)
sqlite has extremely thorough test coverage with something approaching 100% branch coverage and such wide production usage it's basically proven that a lot of this stuff works.
Re:The Use of assert() in SQLite by nn3 on Friday April 26, 2019 @11:34PM (#19763604)
Most (all?) of the production usage probably doesn't enable the assert though.