3 ms·
To prove the correctness of your code you would write tests in similar way as SQLite does, no? They have, like, 100x more lines of code for tests than actual co
by ramtatatam 8y ago
To prove the correctness of your code you would write tests in similar way as SQLite does, no? They have, like, 100x more lines of code for tests than actual code they test?
- jacobajit 8y agoTest cases do not establish proof. There could always be another rare edge case.
- heartofgold 8y agoWhat jacobajit said. Or here's what Dijkstra said: "Program testing can be used to show the presence of bugs, but never to show their absence!" Dijkstra (1970)
- mabbo 8y agoUnit tests demonstrate correctness. That's another useful tool in the tool box. But proofs are more than just that. Imagine trying to unit test all possible cases of Pythagorean theorem being correct vs a single proof in a few lines of descriptive logic.