2 ms·
Well, best response I've seen to a post like this. The audience you refer to might be best served with a SPARK, Frama-C, etc. implementation decomposed as much
by nickpsecurity 11y ago
Well, best response I've seen to a post like this. The audience you refer to might be best served with a SPARK, Frama-C, etc. implementation decomposed as much as possible with experts doing the DbC annotations or VCC's.
More likely an informal method. In the distant past, my method was to use a language with compile-time macro's to decompose the overall algorithm into simplest functions. In dev mode, I could manually run checks to hopefully ensure my assumptions were correct. Each module was simple enough to extensively test and spot coding defects. If necessary, I could do it at ASM level while wrapping low-level stuff in HLL calls w/ checks. In production mode, it compiled to straight-forward, high-performance, low-level code.
So, two routes with different levels of formality and optimization. The 2nd method is more likely to get adopted. Just not sure how many weird corner cases can be prevented that way.