News for hackers. Stuff that matters.
Re:Writes large correct programs by ohyes on Tuesday May 17, 2011 @11:47AM (#2556694)
"Someone who could write large programs that have a high probability of being correct"

No one can do that.

I can write a number of small programs that are correct, however. This is easy, because I can check all of the inputs and outputs. When I combine them, I get another small program that is also correct.

P: "Doctor, it hurts when I do this"

D: "So don't do that"

This is the reason for FP, DSLs, etc.

Re:Writes large correct programs by kscaldef on Tuesday May 17, 2011 @02:06PM (#2557221)
Most programs I write have an infinite number of inputs.
Re:Writes large correct programs by jrockway on Tuesday May 17, 2011 @03:09PM (#2557459)
Prove your program works for n=1. Induct on n.
Re:Writes large correct programs by sambeau on Tuesday May 17, 2011 @06:50PM (#2558288)
You forgot n=0.

edit: and I forgot n=⊥

Re:Writes large correct programs by ohyes on Tuesday May 17, 2011 @02:49PM (#2557393)
I'm not sure how this is relevant?

All programs have an infinite number of possible inputs. You check the ones that you expect.

Is that somehow non-obvious?

Re:Writes large correct programs by blinks on Tuesday May 17, 2011 @03:59PM (#2557626)
> You check the ones that you expect.

You expect buffer overflows? Out-of-bounds arguments? These are the things the GP is referring to, I figure.

Re:Writes large correct programs by mian2zi3 on Tuesday May 17, 2011 @04:00PM (#2557631)
Mathematics proves things about an infinite class of objects all the time, like, say, the input/output behavior of your program. One technique to do this is induction.
Re:Writes large correct programs by johndcook on Tuesday May 17, 2011 @04:03PM (#2557657)
I meant to say programs that have a high probability of behaving correctly. That's not to say that the program is correct. There's almost zero chance that any large program is entirely bug-free, but some applications to perform reliably because the most used paths through the software are correct.
Re:Writes large correct programs by eru on Tuesday May 17, 2011 @06:11PM (#2558146)
Use a language that makes gluing easier, and you can scale this strategy further. Confer Wadler's "Why functional programming matters".