Correct with regards to a formal specification?
How do we know the specification is "correct"? By definition?
Correct with regards to a formal specification?
How do we know the specification is "correct"? By definition?
If people from three different business units were looking at the same system would they all agree on what "correct" is?
I have experience with multiple companies with over $100 Million/year in revenue where different departments have different definitions of what counts as a sale. So to report sales numbers you have to figure out which department is providing the numbers and which department is the audience and recalculate the figures.
The sales team wants to count a sale as any signed commitment to purchase so they can get their bonus, the finance team might only want to count what has been paid for and the warehouse might only care about shipments. There's no amount of formal verification that can overcome these kinds of politics of a business.
I've encountered tickets where a team reports some internal tool as not functioning correctly, despite that tool having been in use for years (I've seen 20+ years) without complaint. You dig deeper and it's just that somebody thinking that <new thing> is the correct outcome, and that those people who decided on <current thing> had no idea what they were doing.
It works for me, and says:
Using lightweight formal and semi-formal methods gives likely-correct software at a very affordable cost.
A case study: https://www.osequi.com/studies/list/list.html
Now, after the LLMs made formalisation thus correctness 'cheap' I can affirm:
LLMs—with the right guardrails and tools—can safely automate the design, implementation, and verification of production-ready software. What’s left for humans is to understand the problem and steer the machine toward a solution. This is production-ready software development at the speed of thought.
1) On Formal Methods Thinking in Computer Science Education to understand the different levels of formal methods practice available. Here is a previous comment of mine which explains and links to the paper - https://news.ycombinator.com/item?id=46298961
2) Formal Methods, Informally: How to Write Programs That Work by Carroll Morgan teaches you how to reason in a formal methods manner before you start using the heavyweight tools. Much can be profitably achieved by just learning to think in this manner - https://www.cambridge.org/highereducation/books/formal-metho...
My observation was that in real life, you always start with an informal idea of what the program should do.
And you always have to figure out whether whatever formalization you choose matches that informal idea. And there's a rub:
“One can’t proceed from the informal to the formal by formal means.” — Alan Perlis
I invariably found that matching to be significantly harder with the Z specification than with an actual program.
And since that is (usually) the hard step, making that step harder is a losing proposition even if it makes other steps easier. Which it might or might not.
Of course, the parameters and weights in this chain can vary, and vary sufficiently that you get a different outcome.
However, I think this fundamental and at best difficult-, at worst impossible-to-solve problem is why specification and proof are not used much.