Skip to main content

Safety-Critical Software Development in C++

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12235))

Abstract

The choice of the programming language is a fundamental decision to be made when defining a safety-oriented software development process. It has significant impact on code quality and performance, but also on the achievable level of safety, the development and verification effort, and on the cost of tool qualification. Traditionally, safety-critical systems have been programmed in C or ADA. In recent years, also C++ has entered into the discussion. C++ enables elegant programming, but its inherent language complexity is much higher compared to C. This has implications for testability, structural coverage, performance, and code analysis. Further issues to be considered are tool chain diversity, the role of the standard library, and tool qualification for compilers, analyzers and other development tools. This article summarizes the requirements of different safety norms, illustrates development and verification challenges and addresses tool qualification.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

References

  1. AUTOSAR. Guidelines for the use of the C++14 language in critical and safety-related systems (2018)

    Google Scholar 

  2. Bjarne Stroustrup, H.S.: C++ Core Guidelines. https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines. Accessed Jan 2020

  3. C++ ABI for Itanium: Exception Handling. https://refspecs.linuxbase.org/abi-eh-1.21.html. Accessed Jan 2020

  4. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: 4\(^{\mathit{th}}\) POPL, pp. 238–252. ACM Press, Los Angeles (1977)

    Google Scholar 

  5. Google C++ Style Guide. https://google.github.io/styleguide/cppguide.html. Accessed January 2020

  6. Illous, H., Lemerre, M., Rival, X.: A relational shape abstract domain. In: Barrett, C., Davies, M., Kahsai, T. (eds.) NFM 2017. LNCS, vol. 10227, pp. 212–229. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-57288-8_15

    Chapter  Google Scholar 

  7. Kästner, D., et al.: CompCert: practical experience on integrating and qualifying a formally verified optimizing compiler. In ERTS2: Embedded Real Time Software and Systems, Toulouse, France, p. 2018 (2018)

    Google Scholar 

  8. Kästner, D., Ferdinand, C.: Proving the absence of stack overflows. In: Bondavalli, A., Di Giandomenico, F. (eds.) SAFECOMP 2014. LNCS, vol. 8666, pp. 202–213. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10506-2_14

    Chapter  Google Scholar 

  9. Kästner, D., Mauborgne, L., Ferdinand, C.: Detecting safety- and security-relevant programming defects by sound static analysis. In: Rainer Falk, J.-C.B., Chan, S. (eds.) The Second International Conference on Cyber-Technologies and Cyber-Systems (CYBER 2017), volume 2 of IARIA Conferences, pp. 26–31. IARIA XPS Press (2017)

    Google Scholar 

  10. Kästner, D., Pister, M., Gebhard, G., Schlickling, M., Ferdinand, C.: Confidence in timing. In: Safecomp 2013 Workshop: Next Generation of System Assurance Approaches for Safety-Critical Systems (SASSUR), September 2013

    Google Scholar 

  11. Kästner, D., Schmidt, B., Schlund, M., Mauborgne, L., Wilhelm, S., Ferdinand, C.: Analyze this! sound static analysis for integration verification of large-scale automotive software. In: Proceedings of the SAE World Congress 2019 (SAE Technical Paper). SAE International (2019)

    Google Scholar 

  12. Krebbers, R., Leroy, X., Wiedijk, F.: Formal C semantics: CompCert and the C standard. In: Klein, G., Gamboa, R. (eds.) ITP 2014. LNCS, vol. 8558, pp. 543–548. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08970-6_36

    Chapter  Google Scholar 

  13. Leroy, X., Blazy, S., Kästner, D., Schommer, B., Pister, M., Ferdinand, C.: CompCert - a formally verified optimizing compiler. In: ERTS: Embedded Real Time Software and Systems, 8th European Congress, Toulouse, France, p. 2016, January 2016

    Google Scholar 

  14. Martin, L.: Joint strike fighter air vehicle C++ coding standards for the system development and demonstration program (2005)

    Google Scholar 

  15. MISRA (Motor Industry Software Reliability Association) Working Group. MISRA C++:2008 Guidelines for the use of the C++ language in critical systems (2008)

    Google Scholar 

  16. Sutter, H.: Zero-overhead deterministic exceptions: throwing values. Technical report P0709 R0, SG14, May 2018

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel Kästner .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kästner, D. et al. (2020). Safety-Critical Software Development in C++. In: Casimiro, A., Ortmeier, F., Schoitsch, E., Bitsch, F., Ferreira, P. (eds) Computer Safety, Reliability, and Security. SAFECOMP 2020 Workshops. SAFECOMP 2020. Lecture Notes in Computer Science(), vol 12235. Springer, Cham. https://doi.org/10.1007/978-3-030-55583-2_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-55583-2_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-55582-5

  • Online ISBN: 978-3-030-55583-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics