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&#x27;ve been looking at this recently, but I&#x27;ve never seen a proof of reasonably standard function like, say, printf. Most of the attempts at formal proof I&#x27;ve seen seem quite complex for very simple functions [1] and the next step up seems too complicated for me to follow [2]. I&#x27;m familiar with heuristic-based tools like clang analyser, coverity and flexelint - but none of those claim to produce any sort of proof. I&#x27;m also aware of MISRA but again, that doesn&#x27;t claim to provide any sort of proof.<p>Those of you who are using formal methods: Is what I&#x27;ve seen really the state of the art? Or are there powerful tools I&#x27;ve overlooked?<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;Beatgodes&#x2F;klibc_framac_wp&#x2F;blob&#x2F;master&#x2F;src&#x2F;klibc&#x2F;string&#x2F;strnlen.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Beatgodes&#x2F;klibc_framac_wp&#x2F;blob&#x2F;master&#x2F;src...</a>
[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;seL4&#x2F;l4v&#x2F;blob&#x2F;master&#x2F;lib&#x2F;Monad_WP&#x2F;Strengthen.thy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;seL4&#x2F;l4v&#x2F;blob&#x2F;master&#x2F;lib&#x2F;Monad_WP&#x2F;Strengt...</a>