←back to thread

378 points todsacerdoti | 2 comments | | HN request time: 0s | source
Show context
mensetmanusman ◴[] No.44984308[source]
Not being a programmer, I have a question.

Can any program be broken down into functions and functions of functions that have inputs and outputs so that they can be verified if they are working?

replies(13): >>44984336 #>>44984354 #>>44984459 #>>44984510 #>>44984549 #>>44984555 #>>44984562 #>>44984865 #>>44984968 #>>44985022 #>>44986774 #>>44988388 #>>45001896 #
1. taco_emoji ◴[] No.44984555[source]
Long story short: no.

Long story: yes, but it'd take centuries to verify all possible inputs, at least for any non-trivial programs.

replies(1): >>44984578 #
2. black_knight ◴[] No.44984578[source]
Proofs of correctness is a thing. If you prove something correct you don’t have to test every input. It just takes a big effort to design the program this way. And must be done from the beginning.