Understanding the quality of MISRA®-C checkers

By Magnus Unemyr

More and more companies use the MISRA®-C coding standard to improve software quality. It is developed by the automotive industry to promote safety, reliability, portability and maintainability of embedded software. I think this is great; all companies ought to deploy such methods to improve software quality. Several tools on the market can check for MISRA®-C compliance. But how do you get confidence in selecting the right MISRA®-C checking tool?

There is no formal certification program for compliance testing of MISRA®-C checking tools. It is thus difficult to judge the quality of the coding standards compliance checking performed by various tools (and yes, all MISRA®-C tools find different number of rules and generate a different number of false-positives).

There is however the MISRA®-C exemplar test suite. While not being a formal tool certification test suite, it still gives valuable information on the level of testing performed by various tools. The MISRA®-C exemplar test suite contains 661 test cases for rule violation detection and 186 test cases for false-positive detection.

MISRA®-C compliance testing tools should of course test as many as possible of the 141 rules (all rules cannot be checked by software tools, and so no tool on the market achieve 100% rule coverage). Atollic TrueINSPECTOR® for example tests 124 rules, which is amongst the best in the industry. 

When evaluating MISRA®-C conformance checking tools, the vendor should provide you with the test results from the exemplar test suite. The Atollic TrueINSPECTOR® tool for example, finds 93.5% (618 of 661) violations in the exemplar test suite, and generates only 0.5% (1 of 186) false-positives.

I strongly recommend looking into static source code analysis and the MISRA®-C coding standard as one of several ways to improve your software quality. By evaluating the MISRA®-C exemplar test suite test results for various tools, you have some means to compare the quality of different tools too.