Rules for Writing Safety Critical Code (2006)
Rules like avoiding recursion and loop upper bounds are partly justified by helping code analyzers to prove executions are bounded.<p>Does anyone have experience performing formal static analysis on code? And if so, are there any open-source examples of the state-of-the-art tools being used on nontrivial problems?<p>I've been looking at this recently, but I've never seen a proof of reasonably standard function like, say, printf. Most of the attempts at formal proof I've seen seem quite complex for very simple functions [1] and the next step up seems too complicated for me to follow [2]. I'm familiar with heuristic-based tools like clang analyser, coverity and flexelint - but none of those claim to produce any sort of proof. I'm also aware of MISRA but again, that doesn't claim to provide any sort of proof.<p>Those of you who are using formal methods: Is what I've seen really the state of the art? Or are there powerful tools I've overlooked?<p>[1] <a href="https://github.com/Beatgodes/klibc_framac_wp/blob/master/src/klibc/string/strnlen.c" rel="nofollow">https://github.com/Beatgodes/klibc_framac_wp/blob/master/src...</a>
[2] <a href="https://github.com/seL4/l4v/blob/master/lib/Monad_WP/Strengthen.thy" rel="nofollow">https://github.com/seL4/l4v/blob/master/lib/Monad_WP/Strengt...</a>