back

by softwaredoug·7y ago·view on hn ↗
Yeah and then the specification at that level of specificity IS the code. How do you prove the specification is bug free?
1 comments
Define what is a bug in a spec? I defined the program to do one thing and one thing only. What does does it mean when I have a bug in my definition? There's a definition for the definition? Makes no sense.
You can argue that no code ever has bugs by that logic, after all you defined the program to do one thing, and it did it, it was merely human expectation that was in error.
That's what I'm arguing. Code can be proven correct against a formal spec.

However, because we don't do proofs in software, there are bugs.

Code is itself a specification.
It can be, but generally it is not.
It means that the one thing you defined it to do was not the right thing.