Clever Geek Handbook
📜 ⬆️ ⬇️

Misra C

MISRA C is a C software development standard developed by the MISRA (Motor Industry Software Reliability Association). The purpose of the standard is to improve the security, portability and reliability of programs for embedded systems. There is also a set of similar guidelines for the C ++ language called MISRA C ++ .

Currently, MISRA standards are used not only in the automotive industry, but also in aerospace, telecommunications, medical device development, military projects, and others [1] [2] [3]

The first edition of the MISRA C standard, "Guidelines for the use of the C language in vehicle based software", was published in 1998, and is often called MISRA-C: 1998 . [four]

A second edition was published in 2004, entitled “Guidelines for the use of the C language in critical systems” ( MISRA-C: 2004 ), with significant changes, including renumbering of the rules.

Work continues on the next revision of the standard, adapted to the C99 .

Officially, the text of the MISRA C standard is available only for a fee. [5]

Content

  • 1 Rules
  • 2 Analyzers
  • 3 Criticism
  • 4 See also
  • 5 notes
  • 6 References

Rules

MISRA-C: 1998 lists 127 rules [6] (93 mandatory and 34 recommended).

There are 141 rules in MISRA-C: 2004 (121 mandatory and 20 recommended). The rules are divided into 21 categories.

In MISRA-C: 2012, 143 rules (each of which can be checked by a static code analyzer) and 16 directives (rules, compliance with which is open to interpretation or related to processes and procedures); [7] . The rules are divided into mandatory, required and recommendatory; can apply to individual translation units or to the entire system [7] . The rules are also divided into Decidable and Undecidable .

In the 2008 MISRA C ++ standard, based on C ++ 2003, 228 rules [8] .

Analyzers

There are many software analyzers that check the code for compliance with the MISRA rules, but the MISRA certification process does not exist. [9]

Most of the rules can be checked using static code analysis utilities , but some of them require the use of dynamic analysis tools .

MISRA Compliance Analyzers
  • Astrée
  • ECLAIR
  • Klocwork
  • LDRA
  • Parasoft
  • PC-Lint
  • Polyspace
  • PVS-Studio [10]
  • QA-C
  • Understand
C compilers that can verify MISRA compliance are released by companies
  • Green hills software
  • Iar systems
  • Tasking

Criticism

Several studies have questioned the effectiveness of MISRA rules. [11] In particular, a negative correlation was found between violations of MISRA rules and observed program crashes. [12]

See also

  • Code Design Standard

Notes

  1. ↑ MISRA C and MISRA C ++ Compliance | PRQA | PRQA
  2. ↑ Cosmic Software - MISRA checker
  3. ↑ LDRA: Using the LDRA tool suite for MISRA-C: 2004 Certification
  4. ↑ A brief history of MISRA C
  5. ↑ "Buying MISRA C"
  6. ↑ computing.unn.ac.uk/staff/cgam1/teaching/0703/misra%20rules.pdf A document listing all 127 rules
  7. ↑ 1 2 Fact Sheet: MISRA C: 2012 (PDF) (unspecified) . programmingresearch.com. Date of treatment June 10, 2013.
  8. ↑ Build secure and reliable embedded systems with MISRA C / C ++ | Embedded
  9. ↑ MISRA C FAQ
  10. ↑ PVS-Studio: support for coding standards MISRA C and MISRA C ++ (unspecified) . www.viva64.com. Date of treatment December 10, 2018.
  11. ↑ Language subsetting in an industrial context: a comparison of MISRA C 1998 and MISRA C; Les hatton; University of Kingston; 2004.
  12. ↑ Assessing the Value of Coding Standards: An Empirical Study; CJ Boogerd and L. Moonen; Delft University of Technology; 2008. (English)

Links

  • misra.org.uk - official MISRA C website
  • Introduction to MISRA C (neopr.) . embedded.com. Archived on May 17, 2012.
  • MISRA C: Safer Is Better (Neopr.) . electronicdesign.com. Archived on May 17, 2012.
  • MISRA C - Some key rules to make embedded systems safer (unopened) (inaccessible link - history ) . iar.com. (inaccessible link)
  • Software reliability expert Les Hatton . MISRA C papers (unopened) (link not available) . leshatton.org. Archived on September 19, 2003.
  • Commentary on the first edition of the MISRA C guidelines (neopr.) . knosof.co.uk. Archived on May 17, 2012.
  • Automating Compliance to MISRA C / C ++ Standards (Neopr.) . johndayautomotivelectronics.com. Archived on May 17, 2012.
Source - https://ru.wikipedia.org/w/index.php?title=MISRA_C&oldid=101505858


More articles:

  • Emperor Rityu
  • Elizabeth of Savoy
  • Materukhin, Alexander Ivanovich
  • Quindecillion
  • Novostroevsky rural settlement (Kaliningrad region)
  • Berdestan
  • Colin (film)
  • Villeroix (genus)
  • Vasak Ishkhanik
  • Caspian Fisheries Research Institute

All articles

Clever Geek | 2019