by rdtennent · 4y ago · 0 comments
A logical description of what a piece of code does is evidently too much to ask of a working programmer. Instead, the prevailing dream is to just write code and then have some other code figure out what the first code actually does. Surely the sufficiently smart compiler is almost at hand.
This used to frustrate me and I suppose to some minor extent it still does. However, most of my frustration was relieved by Dijkstra's distinction between program correctness and program pleasantness. With vanishingly rare exceptions, revealed preferences show that industry could not care less about correctness. After all, it's pleasantness that determines success in the marketplace. Plenty of critically incorrect code nevertheless makes its owners billions. Sure, maybe all your private medical data and credit history got leaked, but here have a voucher for $10 a month worth of dark web monitoring for a year. I don't like this model, but at least it's in some sense rational.
Writing code is not about solving a problem perfectly but delivering solutions under economic constraints.
That's a good description of the Rust borrow checker, which is intended to be a sound analysis but a lot more restrictive than full separation logic.
If you can't use a tool without being an expert in it, the only people that will use that tool are experts and the techniques die out as the experts do.
2. Apart from that, to me, if logic inspires (part of) the design of an analyzer, that's perhaps more valuable than using logic to judge it after the fact, as analysis design is hard; and this is true even if analyzer ends up following part of the spirit if not the letter of the logic.
I believe I get where you care coming from, though, and appreciate your perspective. :)