Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

how do i prove programs correct

Name: Anonymous 2012-10-28 17:50

does it really help to make bug-free programs? or was dijkstra full of crap?

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-10-29 2:50

The problem is that whenever "proof" is mentioned it tends to immediately conjure up formal proofs like >>18, and that puts off a lot of programmers who wanted to prove their code was correct. Informal, but still methodical and logical proofs are much more valuable than tests. For example, in

p = malloc(...)
if(p) {
 /* body */
}


it doesn't take much to prove that immediately upon entering the body, p is nonzero. And if you have a set of input values assumed to range [5..15], then adding 10 to the input value will let you know that the new range is [15..25].

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List