2 ms·
No, this approach is more common and successful than you might think. We're not talking about making an entirely new language which is incompatible with C. You
by klodolph 5y ago
No, this approach is more common and successful than you might think.
We're not talking about making an entirely new language which is incompatible with C. You adopt a style guide, an accompanying static analysis tool, and maybe add some annotations to your source code. Your code is still C-compatible and you can still use the same compilers.
Static analysis of general C programs is quite difficult, and turning on an analyzer for an existing codebase typically results in obscene numbers of false positives. However, if you pair a static analyzer with a strict style guide which restricts the language, you can make the static analyzer much more powerful and useful.
This could be MISRA, it could be a formal verification system, or it could be something else entirely.