Whitepaper: Achieving MISRA C:2012 Compliance with Parasoft C/C++test

Complex automotive technologies like autonomous driving are creating the need to automate coding standards. Parasoft C/C++test is the way there.

Get the facts on software coding standards for automotive applications, plus how to implement quality control mechanisms without introducing risk into the process.

Parasoft Misra C Compliance Dashboard

Download the whitepaper to learn more about why it’s important to automate the implementation of rigorous coding standards and how to take action now.

Focus areas:

  • Why automating rigorous coding standards implementation is critical in automotive applications
  • Background on MISRA C:2012
  • How Parasoft supports MISRA C:2012
  • The Parasoft MISRA compliance dashboard
  • The Parasoft guidelines compliance summary

Innovations represent the next evolution of a rapidly shifting and highly competitive market. They also represent a much larger surface area for defects that impact the safety, security and reliability of the software.

Software coding standards like MISRA are longstanding. However, with the growth of advanced technologies like autonomous driving, it’s time to automate coding standards. Automotive technology innovations represent a rapidly changing, competitive market, but they also represent a bigger surface area for software defects with the potential to impact safety, security and reliability.

The industry’s distributed, multi-tiered production model complicates matters, with many vendors and suppliers contributing to software simultaneously. Quality control in a complex system is difficult, but necessary to prevent the introduction of additional risk. Businesses must act now to enact defect prevention.

MISRA is a widely used standard in safety critical industries, including automotive, medical, military and aerospace. It provides a set of best practices for writing safe, secure and portable C code. MISRA supports the C Standard known as "C11", replacing C99 and has been superseded by C18. Published in 2020, MISRA C:2012 Amendment 2 is the latest.

  • Parasoft C/C++test and Parasoft DTP provide a comprehensive solution for applying MISRA C:2012, including Amendment 2, to help organizations overcome the challenges associated with ensuring automotive software quality.
  • Parasoft C/C++test is a TUV-certified, scalable solution that automates the application and monitoring of coding standards, such as MISRA.
  • It also provides a unit testing platform that integrates test creation, execution, and coverage reporting. Test and analysis data from C/C++test can be sent to DTP, which aggregates, correlates, and applies additional analytics to centralize reporting for each step along the complex software supply chain.
  • MISRA compliance dashboard

The current state of compliance is a key software project metric. The comprehensive MISRA compliance dashboard provides an on-the-spot project evaluation, giving managers an easily accessible understanding of compliance immediately. It also gives developers a starting point for progressing toward compliance.

  • Guidelines compliance summary

The guidelines compliance summary serves as the primary record of overall project compliance, documenting the state of compliance for each guideline, as well as any associated deviations or recategorizations.

MISRA ID and description

Classification

Decidability

Parasoft ID and description

Dir-4.2: All usage of assembly language should be documented

Advisory

Undecidable

MISRA2012-DIR-4_2: All usage of assembly language should be documented

 

Dir-4.3: Assembly language shall be encapsulated and isolated

 

Required

Undecidable

MISRA2012-DIR-4_3: Assembly language shall be encapsulated and isolated

 

Dir-4.4: Sections of code should not be commented out

 

Advisory

Undecidable

MISRA2012-DIR-4_4: Sections of code should not be “commented out”

 

Dir-4.5: Identifiers in the same namespace with overlapping visibility should be typographically unambiguous

 

Advisory

Undecidable

MISRA2012-DIR-4_5: Identifiers in the same name space with overlapping visibility should be typographically unambiguous

 

Dir-4.6: Typedefs that indicate size and signedness should be used in place of the basic numerical types

 

Advisory

Undecidable

MISRA2012-DIR-4_6_a: typedefs to basic types should contain some digits in their name

MISRA2012-DIR-4_6_b: typedefs should be used in place of the basic types

MISRA2012-DIR-4_6_c: Use typedefs from stdint.h instead of declaring your own in C99 code

Dir-4.7: If a function returns error information, then that error information shall be tested

 

Required

Undecidable

MISRA2012-DIR-4_7_a : Consistently check the returned value of non-void functions

MISRA2012-DIR-4_7_b : Always check the returned value of non-void function

Dir-4.8: If a pointer to a structure or union is never dereferenced within a translation unit, then the implementation of the object should be hidden

 

Advisory

Undecidable

MISRA2012-DIR-4_8: If a pointer to a structure or union is never dereferenced within a translation unit, then the implementation of the object should be hidden

 

Dir-4.9: A function should be used in preference to a function-like macro where they are interchangeable

 

Advisory

Undecidable

MISRA2012-DIR-4_9: A function should be used in preference to a function-like macro where they are interchangeable

 

 

About Parasoft

Parasoft’s software testing solutions support the entire software development process, from when the developer writes the first line of code all the way through unit and functional testing, to performance and security testing, leveraging simulated test environments along the way. Parasoft's unique analytics platform aggregates data from across all testing practices, providing insights up and down the testing pyramid to enable organizations to succeed in today's most strategic development initiatives, including Agile/DevOps, Continuous Testing, and the complexities of IoT. Parasoft’s automated software testing innovations fuel software development organizations, helping teams reduce the time, cost, and effort of delivering high-quality software to the market.