News for hackers. Stuff that matters.
Re:How to C in 2016 by Animats on Friday January 08, 2016 @04:13PM (#10868301)
Right. This is a bogus complaint about proof of correctness.

The way you prove halting is to find some integer measure for each loop (like "iterations remaining" or "error being reduced") which decreases on each iteration but does not go negative. If you can't find such a measure, your program is probably broken. (See page 12 of [1], the MEASURE statement, for a system I built 30 years ago which did this.)

The measure has to be an integer, not a real number, to avoid Zeno's paradox type problems. (1, 1/2, 1/4, 1/8, 1/16 ...)

On some floating point problems, with algorithms that are supposed to converge, proving termination can be tough. You can always add an iteration counter and limit the number of iterations. Now you can show termination.

Microsoft's Static Driver Verifier is able to prove correctness, in the sense of "not doing anything that will crash the kernel", about 96% of the time. About 4% of the time, it gives up after running for a while. If your kernel driver is anywhere near close to undecidability, there's something seriously wrong with it.

In practice, this is not one of the more difficult areas in program verification.

[1] http://www.animats.com/papers/verifier/verifiermanual.pdf

Re:How to C in 2016 by nickpsecurity on Friday January 08, 2016 @11:10PM (#10870062)
Pascal-F is interesting and not in my collection. What were most useful or interesting things you did with it? And does it have any use today in modern Pascal-like languages (maybe Modula-2 revision)?