[vc_row row_type=”row” type=”full_width” icon_pack=”font_awesome” content_menu_fe_icon=”arrow_back” text_align=”left” background_color=”#ffffff”][vc_column width=”1/1″][vc_row_inner row_type=”row” type=”grid” text_align=”left” padding_top=”65″][vc_column_inner width=”1/3″][vc_single_image image=”21813″ border_color=”grey” img_link_target=”_self” img_size=”full”][/vc_column_inner][vc_column_inner width=”2/3″][vc_separator type=”transparent” position=”center” up=”15″ down=”0″][vc_column_text]

MISRA C/C++ Compliance Checking

[/vc_column_text][vc_separator type=”transparent” position=”center” up=”40″ down=”0″][vc_column_text]MISRA C and C++ are coding standards for the ISO C and ISO C++ languages published by the Motor Industry Software Reliability Association.  Their aims are to facilitate code safety, portability and reliability in safety-related electronic systems.  The guidelines enforce sound coding practices and address many common traps and pitfalls specific to the C and C++ languages.

 

MISRA C and C++ was originally designed for the automotive industry, but its practices have been widely adopted in many other safety critical industries including aerospace, telecom, medical devices, defense, railway, and others.  In fact, there are now more users of MISRA C and C++ outside of the automotive industry than within it.[/vc_column_text][vc_separator type=”transparent” position=”center” up=”60″ down=”0″][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][vc_row row_type=”row” use_row_as_full_screen_section=”no” type=”full_width” icon_pack=”font_awesome” content_menu_fe_icon=”arrow_back” text_align=”left” background_color=”#f5f5f5″ padding_top=”25″][vc_column width=”1/1″][vc_row_inner row_type=”row” type=”grid” use_row_as_full_screen_section_slide=”no” text_align=”left”][vc_column_inner width=”1/3″][vc_column_text]

MISRA C 2012

[/vc_column_text][vc_separator type=”normal” position=”center”][vc_column_text]The current edition of the standard for the C language is MISRA C:2012.  This standard consists of 159 rules and directives covering 25 categories of coding practices.  The document itself can be obtained from http://www.misra-c.com/, under the title “Guidelines for the use of the C language in critical systems”.

 

[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/3″][vc_column_text]

MISRA C++ 2008

[/vc_column_text][vc_separator type=”normal” position=”center”][vc_column_text]The current edition of the standard for the C++ language is MISRA C++:2008. This standard consists of 228 rules covering 20 categories of coding practices. The document itself can be obtained from http://www.misra-cpp.com/, under the title “Guidelines for the use of the C++ language in critical systems”.

 

 

[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/3″][vc_column_text]

MISRA C 2004

[/vc_column_text][vc_separator type=”normal” position=”center”][vc_column_text]The original 2004 specification for MISRA C contains 142 rules, of which 122 are “required” and 20 are “advisory”. The rules  are divided into 21 topical categories, from “Environment” to “Run-time failures”.

The document itself can be obtained from http://www.misra-c.com/, under the title “Guidelines for the use of the C language in critical systems”.[/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_column][vc_column][vc_row_inner row_type=”row” type=”grid” use_row_as_full_screen_section_slide=”no” text_align=”left” padding_bottom=”25″][vc_column_inner width=”1/3″][vc_separator type=”transparent” position=”center”]DATASHEET[vc_separator type=”transparent” position=”center”][/vc_column_inner][vc_column_inner width=”1/3″][vc_separator type=”transparent” position=”center”]DATASHEET[vc_separator type=”transparent” position=”center”][/vc_column_inner][vc_column_inner width=”1/3″][vc_separator type=”transparent” position=”center”]DATASHEET[vc_separator type=”transparent” position=”center”][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][vc_row row_type=”row” type=”grid” icon_pack=”font_awesome” content_menu_fe_icon=”arrow_back” text_align=”left” padding_top=”85″ background_color=”#ffffff” use_row_as_full_screen_section=”no”][vc_column width=”1/1″][vc_column_text]

MISRA Compliance

[/vc_column_text][vc_separator type=”transparent” position=”center” up=”35″ down=”0″][vc_row_inner row_type=”row” type=”grid” text_align=”left”][vc_column_inner width=”1/2″][vc_column_text]Compliance with the MISRA C:2012, C:2004 and C++:2008 guidelines is a requirement in many industries.  But checking that your project complies with all rules of the standard is a laborious process.  Moreover, some MISRA C/C++ rules are relatively easy to check in the syntax of your program, and your compiler may already be able to issue diagnostics for any deviations.  But many MISRA C/C++ rules are difficult to check without analyzing all paths through your code, including procedures in different source files that are not available to the compiler during a normal build.  Verifying compliance with such rules is in fact undecidable in general, and would require costly manual inspection of your project by experienced software engineers.

[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/2″][vc_column_text]To claim compliance with the MISRA C or C++ guidelines for your product, you must demonstrate that:

 

  • A compliance matrix has been completed demonstrating how each rule is enforced.
  • All C/C++ code in the product is compliant with the MISRA C/C++ rules or subject to documented deviations.
  • A list of all instances where rules are not being followed is maintained, and for each instance there is an appropriately signed-off documented deviation.
  • You have taken appropriate measures in the areas of training, style guide, compiler selection and validation, checking tool validation, metrics, and test coverage, as described in section 4.2 of Guidelines for the Use of the C Language in Critical Systems.

[/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][vc_row row_type=”row” type=”grid” icon_pack=”font_awesome” content_menu_fe_icon=”arrow_back” text_align=”left” padding_top=”85″ background_color=”#f5f5f5″ use_row_as_full_screen_section=”no” padding_bottom=”45″][vc_column width=”1/1″][vc_column_text]

Goanna for MISRA Checking

[/vc_column_text][vc_separator type=”transparent” position=”center” up=”35″ down=”0″][vc_row_inner row_type=”row” type=”grid” text_align=”left”][vc_column_inner width=”1/2″][vc_column_text]Goanna has check support for substantial proportions of the MISRA C:2012, C:2004 and C++:2008 rules, including those rules that require interprocedural analysis and analysis of all paths through your code. Moreover, Goanna support rules that are classified as undecidable and often excluded from other MISRA checking tools.[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/2″][vc_column_text]When all MISRA C:2012, C:2004 or C++:2008 -related checks are enabled, Goanna issues a diagnostic for every deviation from a MISRA rule, in the following form:

 

example.fail.c:7: warning: Goanna[MISRAC2012-Rule-2.1_b] Severity-Low, Dead code found (MISRAC2004-14.1, MISRAC++2008-0-1-1, MISRAC2012-Rule-2.1)

 

All MISRA warnings can be exported in HTML or XML for post-processing, and additionally can  also be managed through the internal dashboard.[/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row]