by Filligree · 7y ago · 0 comments
You CAN write proven bug free code, but only if you are willing to accept a long series of limitations.
It could still be the case that for all practically relevant programs there is a proof in each case that they are secure, even if there is no automatic way to find it.
It makes it impossible to say whether certain things can be proven to be secure.
If you use a finite state machine, You can control the states and make mathematical assurances that your program terminates.
The solution to the halting problem is that you work backwards, instead of forwards. You don't let a program run forever and hope for the answer. We also don't give infinite memory to programs to eventually exit/halt or not - My machines have 8 GB and 32GB ram. And oomkiller does its job rather well.
Compilers have plenty of bugs, so do operating systems and CPUs as we have seen in recent years.
Only when "code" is thought of as an abstract notion existing in isolation from inputs, outputs, real systems, etc.