Frequently Asked Questions. AUTOSAR C++14 Coding Guidelines

Size: px
Start display at page:

Download "Frequently Asked Questions. AUTOSAR C++14 Coding Guidelines"

Transcription

1 Frequently Asked Questions AUTOSAR C++14 Coding Guidelines General Q: What is AUTOSAR? A: AUTOSAR (AUTomotive Open System ARchitecture) is a partnership of over 180 automotive manufacturers, automotive suppliers, tool vendors and semiconductor vendors, AUTOSAR s core members include: BMW, Bosch, Continental, Daimler, Ford, GM, PSA, Toyota and Volkswagen. Its aims to standardize and future-proof basic software elements, interfaces and bus systems, to help vehicle manufacturers manage growing system complexity while keeping costs down. It develops standardized open software architectures for automotive Electronic Control Units (ECUs). Q: What are the AUTOSAR C++14 coding guidelines? A: Coding guidelines are a set of best practice rules for the use of a programming language. They help prevent bugs and ensure that software behaves as intended. They help ensure that systems operate safely, securely and reliably. The AUTOSAR Guidelines specify 342 coding rules for modern C of these are adopted directly from the widely adopted MISRA C++ standard. 131 are based on rules identified in other well-known coding standards, such as PRQA s High Integrity C are based on research or other resources. The Guidelines permit some of the language features prohibited by some previous standards. Examples include: Dynamic memory, exceptions, templates, inheritance and virtual functions. There are rules to ensure that these language features are used only in a safe manner. Q: Why are the AUTOSAR coding guidelines needed? A: There have been a number of changes since the introduction of C++03 which has reduced the relevance of the MISRA standard for the AUTOSAR project: 1. Evolution of C++ 2. Compiler improvements 3. Improvements to testing, verification and analysis tools 4. Creation of the ISO Vehicle Functional Safety Standard 5. Assimilation of a broader base of safety and security expertise into additional standards such as: High Integrity C++ (PRQA) Joint Strike Fighter Air Vehicle C++ (Lockheed Martin) CERT C++ (Carnegie Mellon) C++ Core Guidelines (Bjarne Stroustrup and Herb Sutter) AUTOSAR designed the Guidelines to be used as an extension to the existing MISRA C++ standard. It specifies new rules and updates to MISRA rules as well as stating which MISRA rules are obsolete. 1 PROGRAMMING RESEARCH LTD. 18

2 Q: Which other standards does AUTOSAR refer to? A: Appendix A of the AUTOSAR Coding Guidelines document gives details about the traceability of the guidelines to five widely adopted C++ coding standards: MISRA C++, High Integrity C++ 4.0, JSF, SEI CERT C++ and the C++ Core Guidelines. For each rule of these standards it is established how it relates to the AUTOSAR Guidelines. A rule can be categorized as: 1. Identical (only for MISRA C++): the rule text, rationale, exceptions, code example are identical. Only the rule classification can be different. There can be also an additional note with clarifications. 2. Small differences: the content of the rule is included by AUTOSAR Guidelines rules with minor differences. 3. Significant differences: the content of the rule is included by AUTOSAR Guidelines with significant differences. 4. Rejected: the rule in the referred document is rejected by AUTOSAR Guidelines. 5. Not yet analyzed: at the time of release of the Guidelines, the review of all standards was incomplete, so a number of rules is still to be analyzed. Below chart gives a summary of the comparison. C P P C G C E R T J S F H I C P P M C P P Identical 2 - Small differences: 3 - Significant differences 4 - Rejected 5 - Not yet analyzed Because the Guidelines are based on MISRA C++, it could be expected that this is where the largest overlap can be seen. The second largest overlap is with High Integrity C++ followed by JSF, C++ Core Guidelines and finally SEI CERT C++. It must be noted, however, that CERT C++ has the largest portion of rules that still need to be analyzed which may change its position relative to the other standards. In the following sections, we will discuss the comparison in more detail for each standard and also how the AUTOSAR Guidelines relate to ISO Q: As the AUTOSAR coding guidelines have been released with the Adaptive Platform, do I need to use this platform in order to apply the coding standard? A: No. The APIs within the Adaptive Platform are defined in C++, suggesting that AUTOSAR views C++ as the language of choice for new Adaptive Platform components. However, the AUTOSAR guidelines can be applied to any type of embedded system. 2 PROGRAMMING RESEARCH LTD. 18

3 Q: How do I ensure my code complies with AUTOSAR guidelines? A: PRQA s QA C++, with the AUTOSAR Compliance Module is the only static analysis solution that is optimized for AUTOSAR-compliant software development. For medium to large development teams the solution may be further enhanced with PRQA s code quality management control center, QA Verify. This guarantees that all team members consistently apply the coding guidelines in addition to tracking and reporting code quality for the duration of the project. Q: Would you recommend that we stop using MISRA C and move towards AUTOSAR and MISRA C++14? A: The simplicity of the C language has its advantages and disadvantages. It is an advantage that nothing is hidden. However, a disadvantage might be that a large amount of boiler plate code is required when higher level features are required. Simply compiling C code with a C++ compiler may find gotchas with using C, such as non-const string literals, implicit casts, jump-over initializations, and more recently removed features such as trigraphs. Possibly more important is the distinction that a violation of shall in C means undefined behavior whilst, in C++ it means that the program is ill-formed. There are quite a few MISRA C rules that are unnecessary in a C++ coding standard, as it is a requirement that C++ compilers generate the appropriate errors. A common concern with using C++ is the implicit behavior added silently by the compiler. With the correct resources and education, including a judicious tool choice, what the compiler provides for free, and why, will become understood. An educated choice can then be made regarding the use of the feature. It s worth noting that, with the amount of use and testing of a commercial compiler it s far less likely to find a problem in its implementation of a vtable compared to a home grown hand written lookup table of function pointers. Q: It is often said that C++ is not suitable for use in projects such as AUTOSAR, is this not still the case? A: There is nothing inherent in C++ that, for the same use of language, makes it less efficient or less safe than C. Furthermore, it will often be the case that a compiler can optimize C++ constructs more efficiently than their C equivalent. For example, a compiler could determine the dynamic type of an object and bypass the virtual function mechanism completely. 'Templates allow for compile time polymorphism, which may actually result in less code being generated because the choice of algorithm is made at compile time and not at runtime. Regarding memory leaks, the RAII (Resource Acquisition Is Initialization) pattern is an automatic mechanism that ensures zero leaks, and it does not have a C equivalent. Q: Does AUTOSAR have a coding standard for the C language? A: There is no official C coding standard published by AUTOSAR. MISRA C is the predominant standard used for C projects. Q: How do the C++ guidelines "from Stroustrup and Sutter" relate to the AUTOSAR guidelines? A: The C++ Core Guidelines are a referenced source of rules in the Guidelines. Similar to HIC++, the requirements of the audience using the Guidelines and the C++ Core Guidelines are slightly different. AUTOSAR is targeting safety related. It therefore includes rules that would be too restrictive in other 3 PROGRAMMING RESEARCH LTD. 18

4 domains. Both HIC++ and the Core Guidelines are intended to be used by any programmer in any domain. Q: Why did AUTOSAR create a new standard instead of simply an update to MISRA C++? A: Work is taking place on a MISRA C++ standard. The overlap between AUTOSAR and MISRA C++ is significant, and we expect that a new, updated MISRA C++ standard will embrace the work of AUTOSAR. Q: Does AUTOSAR include rules for cybersecurity? A: Today there are no security rules. However, we believe that there are plans to include such rules in the future. Q: Does AUTOSAR also advise on the allowed libraries? E.g. Boost? A: Rule A clarifies that the guidelines equally apply to 3rd party library source code. A safe approach is to assume that a 3rd party library is treated in the same way as code directly related to the project. Q: What do you think about using sanitizers? A: Every tool that can improve the quality and safety of source code should be used if available. C++ Specific Q: Why are "new/delete" and "dynamic_cast" forbidden in the AUTOSAR coding standards? May one use _implicit_ new/delete? A: Explicit calls to new and delete are forbidden. However, implicit use, for example through std::string or std::vector, are allowed, which will guarantee that the lifetime of the memory is managed correctly. The guidelines include an advisory rule against the use of dynamic_cast, the main reason being that dynamic_cast relies on a significant amount of implementation-defined behavior. However, there is also an argument that the language provides better alternatives, for example virtual functions, which should be used instead. Q: Why is 'wchar' forbidden? A: Unlike 'wchar_t', the 'char16_t' and 'char32_t' types, the char16_t and char32_t types added in C++ 11 have well-defined semantics and sizes. AUTOSAR recommends using these instead of wchar_t. Q: Does AUTOSAR include basic coding parts related to the style usage (indention, brace placement, etc.)? A: No. Rules in the referenced standards were not included if they referred to style only. Despite this, there are some rules, such as requirements on filename extensions, which may be considered stylistic. Some of the existing naming rules are being reviewed and are likely to be relaxed in a future version as coding style is seen to be outside of the scope of the coding guidelines. 4 PROGRAMMING RESEARCH LTD. 18

5 Q: Can you provide more detail on exactly what AUTOSAR is saying about the use of dynamic memory? A: The rules forbidding direct calls to new/delete help ensure correct lifetime management of memory resources. However, they will not cover resource exhaustion. Rule A18-5-5, is a partially-automated rule which requires that memory allocation functions have deterministic behavior and do not run out of memory. Depending on the safety level of a project, it may well be that memory allocation should be banned, or at least constrained to startup only, with adequate analysis performed to ensure that resource exhaustion can never happen. ISO Q: Can you use the AUTOSAR guidelines to comply to ISO 26262? A: ISO is a Functional Safety standard for Road vehicles. The standard is derived from the Functional Safety standard IEC titled Functional safety of electrical/electronic/ programmable electronic safety-related systems. It covers all aspects of system development, and is not a coding standard. Part 6 exclusively covers software. It does not prescribe the use of any specific programming language, but specifies compliance tables with recommendations for the use of certain methods in software development for each automotive safety integrity level (ASIL). In the current release of the Guidelines, in section 3.2 it states that traceability to ISO is not provided. It states that this is a limitation that will be addressed in future versions of the document. At first sight there are some obvious inconsistencies between ISO and AUTOSAR. For example, ISO26262 compliance table 8, method 1a highly recommends one function exit point, where the Guidelines allow more. There is a rationale given on section 6.15 Exception Handling: the Rule A prohibits the usage of exceptions for normal control flow of software - they are allowed only for errors where a function failed to perform its assigned task. Moreover, AUTOSAR C++ Coding Guidelines does not force developers to strictly follow single-point of exit approach as it does not necessarily make the code more readable or easier to maintain. The short answer is that AUTOSAR can help you to comply with ISO26262, but in itself it will not be enough. ISO is about the entire system design - much more than simply how you write code. When it comes to your code you will need to supply a rationale for any apparent deviation from the ISO recommended methods. About PRQA: AUTOSAR invited PRQA to help ensure the safety and security of the code written by implementers of AUTOSAR software, and join the working group to develop the Guidelines for the use of the C++14 language in critical and safety-related systems. As the exclusive static analysis development partner in AUTOSAR we have contributed our expertise in the C++ programming language and best-practice software development gained over the last 30 years. 5 PROGRAMMING RESEARCH LTD. 18

Driving Into the Future With Modern C++ A Look at Adaptive Autosar and the C++14 Coding Guidelines. Jan Babst CppCon 2017 Sep , Bellevue, WA

Driving Into the Future With Modern C++ A Look at Adaptive Autosar and the C++14 Coding Guidelines. Jan Babst CppCon 2017 Sep , Bellevue, WA Driving Into the Future With Modern C++ A Look at Adaptive Autosar and the C++14 Coding Guidelines Jan Babst, Bellevue, WA Overview What is Adaptive AUTOSAR? AUTOSAR C++14 guidelines Summary and Outlook

More information

HICPP, JSF++ and MISRA C++: a study of rule overlaps and effective compliance

HICPP, JSF++ and MISRA C++: a study of rule overlaps and effective compliance WHITE PAPER HICPP, JSF++ and MISRA C++: a study of rule overlaps and effective compliance By Wojciech Basalaj, Senior Technical Consultant November 2011 Any organization wishing to adopt best practices

More information

Certified Automotive Software Tester Sample Exam Paper Syllabus Version 2.0

Certified Automotive Software Tester Sample Exam Paper Syllabus Version 2.0 Surname, Name: Gender: male female Company address: Telephone: Fax: E-mail-address: Invoice address: Training provider: Trainer: Certified Automotive Software Tester Sample Exam Paper Syllabus Version

More information

A Model-Based Reference Workflow for the Development of Safety-Related Software

A Model-Based Reference Workflow for the Development of Safety-Related Software A Model-Based Reference Workflow for the Development of Safety-Related Software 2010-01-2338 Published 10/19/2010 Michael Beine dspace GmbH Dirk Fleischer dspace Inc. Copyright 2010 SAE International ABSTRACT

More information

정형기법을활용한 AUTOSAR SWC 의구현확인및정적분석

정형기법을활용한 AUTOSAR SWC 의구현확인및정적분석 정형기법을활용한 AUTOSAR SWC 의구현확인및정적분석 Develop high quality embedded software 이영준 Principal Application Engineer 2015 The MathWorks, Inc. 1 Agendas Unit-proving of AUTOSAR Component and Runtime error Secure Coding

More information

AVS: A Test Suite for Automatically Generated Code

AVS: A Test Suite for Automatically Generated Code AVS: A Test Suite for Automatically Generated Code Ekkehard Pofahl Ford Motor Company Torsten Sauer Continental Automotive Systems Oliver Busa TUV Rheinland Industrie Service GmbH Page 1 of 22 AVS: Automotive

More information

MISRA C:2012 WHITE PAPER

MISRA C:2012 WHITE PAPER WHITE PAPER MISRA C:2012 Since its launch in 1998, MISRA C has become established as the most widely used set of coding guidelines for the C language throughout the world. Originally developed within the

More information

MISRA-C Compliance Matrix _ Using PC Lint

MISRA-C Compliance Matrix _ Using PC Lint MISRA-C Compliance Matrix _ Using PC Lint by Chris Hills Revision 0.2 15 April 2002 Part of the QuEST series:- QA4 chris@phaedsys.org quest.phaedsys.org quest.phaedsys.org page 2 of 26 15/04/2002 MISRA-C

More information

By V-cubed Solutions, Inc. Page1. All rights reserved by V-cubed Solutions, Inc.

By V-cubed Solutions, Inc.   Page1. All rights reserved by V-cubed Solutions, Inc. By V-cubed Solutions, Inc. Page1 Purpose of Document This document will demonstrate the efficacy of CODESCROLL CODE INSPECTOR, CONTROLLER TESTER, and QUALITYSCROLL COVER, which has been developed by V-cubed

More information

Best Practices Process & Technology. Sachin Dhiman, Senior Technical Consultant, LDRA

Best Practices Process & Technology. Sachin Dhiman, Senior Technical Consultant, LDRA Best Practices Process & Technology Sachin Dhiman, Senior Technical Consultant, LDRA Best Quality Software Product Requirements Design Coding Testing 2 Product Requirement Feature Requirement Security

More information

SOFTWARE QUALITY OBJECTIVES FOR SOURCE CODE

SOFTWARE QUALITY OBJECTIVES FOR SOURCE CODE Software Quality Objectives Page 1/21 Version 2.0 SOFTWARE QUALITY OBJECTIVES FOR SOURCE CODE The MathWorks 2 rue de Paris 92196 Meudon France 01 41 14 87 00 http://www.mathworks.fr Revision table Index

More information

Deriving safety requirements according to ISO for complex systems: How to avoid getting lost?

Deriving safety requirements according to ISO for complex systems: How to avoid getting lost? Deriving safety requirements according to ISO 26262 for complex systems: How to avoid getting lost? Thomas Frese, Ford-Werke GmbH, Köln; Denis Hatebur, ITESYS GmbH, Dortmund; Hans-Jörg Aryus, SystemA GmbH,

More information

QUIZ. What is wrong with this code that uses default arguments?

QUIZ. What is wrong with this code that uses default arguments? QUIZ What is wrong with this code that uses default arguments? Solution The value of the default argument should be placed in either declaration or definition, not both! QUIZ What is wrong with this code

More information

EXP54-CPP. Do not access an object outside of its lifetime

EXP54-CPP. Do not access an object outside of its lifetime EXP54-CPP. Do not access an object outside of its lifetime Every object has a lifetime in which it can be used in a well-defined manner. The lifetime of an object begins when sufficient, properly aligned

More information

MISRA C:2012. by Paul Burden Member of MISRA C Working Group and co-author of MISRA C:2012. February 2013

MISRA C:2012. by Paul Burden Member of MISRA C Working Group and co-author of MISRA C:2012. February 2013 WHITEPAPER MISRA C:2012 by Paul Burden Member of MISRA C Working Group and co-author of MISRA C:2012 February 2013 Since its launch in 1998, MISRA C has become established as the most widely used set of

More information

Tokens, Expressions and Control Structures

Tokens, Expressions and Control Structures 3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type

More information

Software architecture in ASPICE and Even-André Karlsson

Software architecture in ASPICE and Even-André Karlsson Software architecture in ASPICE and 26262 Even-André Karlsson Agenda Overall comparison (3 min) Why is the architecture documentation difficult? (2 min) ASPICE requirements (8 min) 26262 requirements (12

More information

Recommended Practice for Software Requirements Specifications (IEEE)

Recommended Practice for Software Requirements Specifications (IEEE) Recommended Practice for Software Requirements Specifications (IEEE) Author: John Doe Revision: 29/Dec/11 Abstract: The content and qualities of a good software requirements specification (SRS) are described

More information

CERT C++ COMPLIANCE ENFORCEMENT

CERT C++ COMPLIANCE ENFORCEMENT CERT C++ COMPLIANCE ENFORCEMENT AUTOMATED SOURCE CODE ANALYSIS TO MAINTAIN COMPLIANCE SIMPLIFY AND STREAMLINE CERT C++ COMPLIANCE The CERT C++ compliance module reports on dataflow problems, software defects,

More information

Click ISO to edit Master title style Update on development of the standard

Click ISO to edit Master title style Update on development of the standard Click ISO 26262 to edit Master title style Update on development of the standard Dr David Ward Head of Functional Safety January 2016 Agenda Why update ISO 26262? What is the process for updating the standard?

More information

Implementation and Verification Daniel MARTINS Application Engineer MathWorks

Implementation and Verification Daniel MARTINS Application Engineer MathWorks Implementation and Verification Daniel MARTINS Application Engineer MathWorks Daniel.Martins@mathworks.fr 2014 The MathWorks, Inc. 1 Agenda Benefits of Model-Based Design Verification at Model level Code

More information

THE PROGRAMMING RESEARCH GROUP

THE PROGRAMMING RESEARCH GROUP THE PROGRAMMING RESEARCH GROUP HIGH INTEGRITY C++ CODING STANDARD MANUAL VERSION 2.4 FOR: GENERAL ISSUE TITLE: HIGH INTEGRITY C++ CODING STANDARD MANUAL - VERSION 2.4 ISSUED: DECEMBER 2006 THE PROGRAMMING

More information

Guidelines for deployment of MathWorks R2010a toolset within a DO-178B-compliant process

Guidelines for deployment of MathWorks R2010a toolset within a DO-178B-compliant process Guidelines for deployment of MathWorks R2010a toolset within a DO-178B-compliant process UK MathWorks Aerospace & Defence Industry Working Group Guidelines for deployment of MathWorks R2010a toolset within

More information

IAR Embedded Workbench MISRA C:2004. Reference Guide

IAR Embedded Workbench MISRA C:2004. Reference Guide IAR Embedded Workbench MISRA C:2004 Reference Guide COPYRIGHT NOTICE Copyright 2004 2008 IAR Systems. All rights reserved. No part of this document may be reproduced without the prior written consent of

More information

C++ Stability, Velocity, and Deployment Plans [R0]

C++ Stability, Velocity, and Deployment Plans [R0] Doc. no.: P0684R0 Date: 2017-06-19 Reply to: Titus Winters, Bjarne Stroustrup, Daveed Vandevoorde, Beman Dawes, Michael Wong, Howard Hinnant Audience: C++ Standards Committee C++ Stability, Velocity, and

More information

Automating Best Practices to Improve Design Quality

Automating Best Practices to Improve Design Quality Automating Best Practices to Improve Design Quality 임베디드 SW 개발에서의품질확보방안 이제훈차장 2015 The MathWorks, Inc. 1 Key Takeaways Author, manage requirements in Simulink Early verification to find defects sooner

More information

Automatización de Métodos y Procesos para Mejorar la Calidad del Diseño

Automatización de Métodos y Procesos para Mejorar la Calidad del Diseño Automatización de Métodos y Procesos para Mejorar la Calidad del Diseño Luis López 2015 The MathWorks, Inc. 1 Growing Complexity of Embedded Systems Emergency Braking Body Control Module Voice Recognition

More information

MISRA C:2012 Technical Corrigendum 1

MISRA C:2012 Technical Corrigendum 1 MISRA C:2012 Technical Corrigendum 1 Technical clarification of MISRA C:2012 June 2017 First published June 2017 by HORIBA MIRA Limited Watling Street Nuneaton Warwickshire CV10 0TU UK www.misra.org.uk

More information

Safety, performance, and productivity with C++

Safety, performance, and productivity with C++ Safety, performance, and productivity with C++ Bjarne Stroustrup Texas A&M University http://www.research.att.com/~bs Not every program is a web app How can we build principled and affordable complex embedded

More information

Using Model-Based Design in conformance with safety standards

Using Model-Based Design in conformance with safety standards Using Model-Based Design in conformance with safety standards MATLAB EXPO 2014 Kristian Lindqvist Senior Engineer 2014 The MathWorks, Inc. 1 High-Integrity Applications Software-based systems that are

More information

AUTOSAR proofs to be THE automotive software platform for intelligent mobility

AUTOSAR proofs to be THE automotive software platform for intelligent mobility AUTOSAR proofs to be THE automotive software platform for intelligent mobility Dr.-Ing. Thomas Scharnhorst AUTOSAR Spokesperson Simon Fürst, BMW AG Stefan Rathgeber, Continental Corporation Lorenz Slansky,

More information

Preventing External Connected Devices From Compromising Vehicle Systems Vector Congress November 7, 2017 Novi, MI

Preventing External Connected Devices From Compromising Vehicle Systems Vector Congress November 7, 2017 Novi, MI Preventing External Connected Devices From Compromising Vehicle Systems Vector Congress November 7, 2017 Novi, MI Bob Gruszczynski VWoA OBD Communication Expert Current Cybersecurity Status Challenges

More information

Certification Authorities Software Team (CAST) Position Paper CAST-25

Certification Authorities Software Team (CAST) Position Paper CAST-25 Certification Authorities Software Team (CAST) Position Paper CAST-25 CONSIDERATIONS WHEN USING A QUALIFIABLE DEVELOPMENT ENVIRONMENT (QDE) IN CERTIFICATION PROJECTS COMPLETED SEPTEMBER 2005 (Rev 0) NOTE:

More information

C++ Coding Standards. 101 Rules, Guidelines, and Best Practices. Herb Sutter Andrei Alexandrescu. Boston. 'Y.'YAddison-Wesley

C++ Coding Standards. 101 Rules, Guidelines, and Best Practices. Herb Sutter Andrei Alexandrescu. Boston. 'Y.'YAddison-Wesley C++ Coding Standards 101 Rules, Guidelines, and Best Practices Herb Sutter Andrei Alexandrescu 'Y.'YAddison-Wesley Boston Contents Prefaee xi Organizational and Poliey Issues 1 o. Don't sweat the small

More information

automatisiertensoftwaretests

automatisiertensoftwaretests FunktionaleSicherheitmit automatisiertensoftwaretests SOFTWARE CONSIDERATIONS IN AIRBORNE SYSTEMS AND EQUIPMENT CERTIFICAION RTCA DO-178B RTCA Dynamisch& Statisch 0 Agenda Übersicht über Sicherheitsstandards

More information

Don t Be the Developer Whose Rocket Crashes on Lift off LDRA Ltd

Don t Be the Developer Whose Rocket Crashes on Lift off LDRA Ltd Don t Be the Developer Whose Rocket Crashes on Lift off 2015 LDRA Ltd Cost of Software Defects Consider the European Space Agency s Ariane 5 flight 501 on Tuesday, June 4 1996 Due to an error in the software

More information

CTFL -Automotive Software Tester Sample Exam Paper Syllabus Version 2.0

CTFL -Automotive Software Tester Sample Exam Paper Syllabus Version 2.0 Surname, Forename: Gender: male female Company address: Telephone: Fax: E-mail-address: Invoice address: Training provider: Trainer: CTFL -Automotive Software Tester Sample Exam Paper Syllabus Version

More information

N2880 Distilled, and a New Issue With Function Statics

N2880 Distilled, and a New Issue With Function Statics Doc No: SC22/WG21/N2917 = PL22.16/09-0107 Date: 2009-06-19 Project: Reply to: JTC1.22.32 Herb Sutter Microsoft Corp. 1 Microsoft Way Redmond WA USA 98052 Email: hsutter@microsoft.com This paper is an attempt

More information

The New C Standard (Excerpted material)

The New C Standard (Excerpted material) The New C Standard (Excerpted material) An Economic and Cultural Derek M. Jones derek@knosof.co.uk Copyright 2002-2008 Derek M. Jones. All rights reserved. 1456 6.7.2.3 Tags 6.7.2.3 Tags type contents

More information

Fault-Injection testing and code coverage measurement using Virtual Prototypes on the context of the ISO standard

Fault-Injection testing and code coverage measurement using Virtual Prototypes on the context of the ISO standard Fault-Injection testing and code coverage measurement using Virtual Prototypes on the context of the ISO 26262 standard NMI Automotive Electronics Systems 2013 Event Victor Reyes Technical Marketing System

More information

A Crash Course in (Some of) Modern C++

A Crash Course in (Some of) Modern C++ CMPT 373 Software Development Methods A Crash Course in (Some of) Modern C++ Nick Sumner wsumner@sfu.ca With material from Bjarne Stroustrup & Herb Sutter C++ was complicated/intimidating Pointers Arithmetic

More information

MAPILab Statistics for SharePoint User Guide

MAPILab Statistics for SharePoint User Guide MAPILab Statistics for SharePoint User Guide Edition 1.0, April 2010, MAPILab LTD. Contents Introduction... 3 Quick start... 3 Getting started... 4 Report selection... 6 Report generation... 10 Filters

More information

Class Types in Non-Type Template Parameters

Class Types in Non-Type Template Parameters Class Types in Non-Type Template Parameters Document #: D0732R0 Date: 2017-11-11 Project: Programming Language C++ Audience: Evolution Reply-to: Jeff Snyder 1 TL;DR We should

More information

2.9 DCL58-CPP. Do not modify the standard namespaces

2.9 DCL58-CPP. Do not modify the standard namespaces 2.9 DCL58-CPP. Do not modify the standard namespaces Namespaces introduce new declarative regions for declarations, reducing the likelihood of conflicting identifiers with other declarative regions. One

More information

Workpackage WP2.5 Platform System Architecture. Frank Badstübner Ralf Ködel Wilhelm Maurer Martin Kunert F. Giesemann, G. Paya Vaya, H.

Workpackage WP2.5 Platform System Architecture. Frank Badstübner Ralf Ködel Wilhelm Maurer Martin Kunert F. Giesemann, G. Paya Vaya, H. Guidelines for application Deliverable n. D25.6 Guidelines for application Sub Project SP2 ADAS development platform Workpackage WP2.5 Platform System Architecture Tasks T2.5.4 Guidelines for applications

More information

Production Code Generation and Verification for Industry Standards Sang-Ho Yoon Senior Application Engineer

Production Code Generation and Verification for Industry Standards Sang-Ho Yoon Senior Application Engineer Production Code Generation and Verification for Industry Standards Sang-Ho Yoon Senior Application Engineer 2012 The MathWorks, Inc. 1 High-Integrity Applications Often Require Certification Software-based

More information

Coverity Static Analysis Support for MISRA Coding Standards

Coverity Static Analysis Support for MISRA Coding Standards Coverity Static Analysis Support for MISRA Coding Standards Fully ensure the safety, reliability, and security of software written in C and C++ Overview Software is eating the world. Industries that have

More information

Software Requirements Specification (SRS) Software Requirements Specification for <Name of Project>

Software Requirements Specification (SRS) Software Requirements Specification for <Name of Project> Software Requirements Specification (SRS) Software Requirements Specification for Version Release Responsible Party Major Changes Date 0.1 Initial Document Release for

More information

MISRA C Presentation to IPA/SEC

MISRA C Presentation to IPA/SEC MISRA C Presentation to IPA/SEC Safety and Security... and future plans for MISRA C Andrew Banks BSc IEng MIET FBCS CITP Frazer-Nash Research Limited, and Chairman, MISRA C Working Group MISRA C A Quick

More information

WHITE PAPER. 10 Reasons to Use Static Analysis for Embedded Software Development

WHITE PAPER. 10 Reasons to Use Static Analysis for Embedded Software Development WHITE PAPER 10 Reasons to Use Static Analysis for Embedded Software Development Overview Software is in everything. And in many embedded systems like flight control, medical devices, and powertrains, quality

More information

American National Standards Institute Reply to: Josee Lajoie

American National Standards Institute Reply to: Josee Lajoie Accredited Standards Committee X3 Information Processing Systems Operating under the procedures of American National Standards Institute Doc No: X3J16/95-0051 WG21/N0651 Date: March 3, 1995 Page 1 of 15

More information

The New C Standard (Excerpted material)

The New C Standard (Excerpted material) The New C Standard (Excerpted material) An Economic and Cultural Derek M. Jones derek@knosof.co.uk Copyright 2002-2008 Derek M. Jones. All rights reserved. 1849 6.9.2 External object s 6.9.2 External object

More information

WIND RIVER DIAB COMPILER

WIND RIVER DIAB COMPILER AN INTEL COMPANY WIND RIVER DIAB COMPILER Boost application performance, reduce memory footprint, and produce high-quality, standards-compliant object code for embedded systems with Wind River Diab Compiler.

More information

Guidelines for Writing C Code

Guidelines for Writing C Code Guidelines for Writing C Code Issue 01-bugfix Martin Becker Institute for Real-Time Computer Systems (RCS) Technische Universität München becker@rcs.ei.tum.de June 9, 2014 Contents 1 Introduction 1 2 Pragmatic

More information

dewhurst_index.qxd 10/16/02 1:54 PM Page 309 Index

dewhurst_index.qxd 10/16/02 1:54 PM Page 309 Index dewhurst_index.qxd 10/16/02 1:54 PM Page 309 Index, (comma operator), 39 40?: (conditional operator), 15 16, 40 41 [ ] (allocating and deleting arrays), 35, 36, 168 ( ) (allocating arrays), 35 -> (arrow

More information

IBM Rational Rhapsody. IBM Rational Rhapsody Kit for ISO 26262, IEC 61508, IEC and EN Overview. Version 1.9

IBM Rational Rhapsody. IBM Rational Rhapsody Kit for ISO 26262, IEC 61508, IEC and EN Overview. Version 1.9 IBM Rational Rhapsody IBM Rational Rhapsody Kit for ISO 26262, IEC 61508, IEC 62304 and EN 50128 Overview Version 1.9 License Agreement No part of this publication may be reproduced, transmitted, stored

More information

From Signal to Service

From Signal to Service From Signal to Service Challenges for the Development of AUTOSAR Adaptive Applications Automotive Ethernet and AUTOSAR Adaptive are key technologies for highly automated driving and comprehensive connectivity

More information

Software Quality. Chapter What is Quality?

Software Quality. Chapter What is Quality? Chapter 1 Software Quality 1.1 What is Quality? The purpose of software quality analysis, or software quality engineering, is to produce acceptable products at acceptable cost, where cost includes calendar

More information

Quality Indicators for Automotive Test Case Specifications

Quality Indicators for Automotive Test Case Specifications Quality Indicators for Automotive Test Case Specifications Katharina Juhnke Daimler AG Group Research & MBC Development Email: katharina.juhnke@daimler.com Matthias Tichy Ulm University Institute of Software

More information

Using DDS with TSN and Adaptive AUTOSAR. Bob Leigh, Director of Market Development, Autonomous Vehicles Reinier Torenbeek, Systems Architect

Using DDS with TSN and Adaptive AUTOSAR. Bob Leigh, Director of Market Development, Autonomous Vehicles Reinier Torenbeek, Systems Architect Using DDS with TSN and Adaptive AUTOSAR Bob Leigh, Director of Market Development, Autonomous Vehicles Reinier Torenbeek, Systems Architect Agenda Intro to Data Distribution Service (DDS) Use Cases for

More information

Page 1. Stuff. Last Time. Today. Safety-Critical Systems MISRA-C. Terminology. Interrupts Inline assembly Intrinsics

Page 1. Stuff. Last Time. Today. Safety-Critical Systems MISRA-C. Terminology. Interrupts Inline assembly Intrinsics Stuff Last Time Homework due next week Lab due two weeks from today Questions? Interrupts Inline assembly Intrinsics Today Safety-Critical Systems MISRA-C Subset of C language for critical systems System

More information

AUTOSAR: from concept to code.

AUTOSAR: from concept to code. Embedded software development White paper December 2009 AUTOSAR: from concept to code. Introducing support for behavior modeling tool (BMT) implementation, providing automated code and internal behavior

More information

Let return Be Direct and explicit

Let return Be Direct and explicit Document #: N4029 Date: 2014-05-23 Reply to: Herb Sutter hsutter@microsoft.com Let return Be Direct and explicit Herb Sutter This paper addresses EWG issue #114. Discussion C++ already recognizes that

More information

Chapter 18 Vectors and Arrays [and more on pointers (nmm) ] Bjarne Stroustrup

Chapter 18 Vectors and Arrays [and more on pointers (nmm) ] Bjarne Stroustrup Chapter 18 Vectors and Arrays [and more on pointers (nmm) ] Bjarne Stroustrup www.stroustrup.com/programming Abstract arrays, pointers, copy semantics, elements access, references Next lecture: parameterization

More information

Verification and Validation of High-Integrity Systems

Verification and Validation of High-Integrity Systems Verification and Validation of High-Integrity Systems Chethan CU, MathWorks Vaishnavi HR, MathWorks 2015 The MathWorks, Inc. 1 Growing Complexity of Embedded Systems Emergency Braking Body Control Module

More information

18-642: Code Style for Compilers

18-642: Code Style for Compilers 18-642: Code Style for Compilers 9/25/2017 1 Anti-Patterns: Coding Style: Language Use Code compiles with warnings Warnings are turned off or over-ridden Insufficient warning level set Language safety

More information

Semantics-Based Integration of Embedded Systems Models

Semantics-Based Integration of Embedded Systems Models Semantics-Based Integration of Embedded Systems Models Project András Balogh, OptixWare Research & Development Ltd. n 100021 Outline Embedded systems overview Overview of the GENESYS-INDEXYS approach Current

More information

While waiting for the lecture to begin, please complete. the initial course questionnaire.

While waiting for the lecture to begin, please complete. the initial course questionnaire. SENG 475 & ECE 569A: Advanced Programming Techniques for Robust Efficient Computing (With C++) Michael Adams Department of Electrical and Computer Engineering University of Victoria Victoria, BC, Canada

More information

A specification proposed by JASPAR has been adopted for AUTOSAR.

A specification proposed by JASPAR has been adopted for AUTOSAR. Japan Automotive Software Platform and Architecture A specification proposed by JASPAR has been adopted for AUTOSAR. JASPAR General Incorporated Association 1. Introduction An RTE profile specification

More information

AUTOSAR stands for AUTomotive Open Systems ARchitecture. Partnership of automotive Car Manufacturers and their Suppliers

AUTOSAR stands for AUTomotive Open Systems ARchitecture. Partnership of automotive Car Manufacturers and their Suppliers Introduction stands for AUTomotive Open Systems ARchitecture Electronic Control Unit Partnership of automotive Car Manufacturers and their Suppliers Source for ECU: Robert Bosch GmbH 2 Introduction Members

More information

Lambda Correctness and Usability Issues

Lambda Correctness and Usability Issues Doc No: WG21 N3424 =.16 12-0114 Date: 2012-09-23 Reply to: Herb Sutter (hsutter@microsoft.com) Subgroup: EWG Evolution Lambda Correctness and Usability Issues Herb Sutter Lambda functions are a hit they

More information

Software Architectures. Lecture 6 (part 1)

Software Architectures. Lecture 6 (part 1) Software Architectures Lecture 6 (part 1) 2 Roadmap of the course What is software architecture? Designing Software Architecture Requirements: quality attributes or qualities How to achieve requirements

More information

Some instance messages and methods

Some instance messages and methods Some instance messages and methods x ^x y ^y movedx: dx Dy: dy x

More information

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya Coding Standards in FACE Conformance John Thomas, Chris Edwards, and Shan Bhattacharya LDRA Overview Provider of Software Quality, Compliance Management & Testing Solutions Established 1975 ISO 9001 certified

More information

ISO/IEC INTERNATIONAL STANDARD. Software engineering Lifecycle profiles for Very Small Entities (VSEs) Part 2: Framework and taxonomy

ISO/IEC INTERNATIONAL STANDARD. Software engineering Lifecycle profiles for Very Small Entities (VSEs) Part 2: Framework and taxonomy INTERNATIONAL STANDARD ISO/IEC 29110-2 First edition 2011-01-15 Software engineering Lifecycle profiles for Very Small Entities (VSEs) Part 2: Framework and taxonomy Ingénierie du logiciel Profils de cycle

More information

Structure of this course. C and C++ Past Exam Questions. Text books

Structure of this course. C and C++ Past Exam Questions. Text books Structure of this course C and C++ 1. Types Variables Expressions & Statements Alastair R. Beresford University of Cambridge Lent Term 2008 Programming in C: types, variables, expressions & statements

More information

Programming Languages Third Edition. Chapter 10 Control II Procedures and Environments

Programming Languages Third Edition. Chapter 10 Control II Procedures and Environments Programming Languages Third Edition Chapter 10 Control II Procedures and Environments Objectives Understand the nature of procedure definition and activation Understand procedure semantics Learn parameter-passing

More information

Safety Driven Optimization Approach for Automotive Systems. Slim DHOUIBI, PhD Student, VALEO - LARIS

Safety Driven Optimization Approach for Automotive Systems. Slim DHOUIBI, PhD Student, VALEO - LARIS Safety Driven Optimization Approach for Automotive Systems Slim DHOUIBI, PhD Student, VALEO - LARIS Tuesday, Feb 3, 2015 Context and Objective Motives : o Safety constraints have a deep impact on the design

More information

Axivion Bauhaus Suite Technical Factsheet MISRA

Axivion Bauhaus Suite Technical Factsheet MISRA MISRA Contents 1. C... 2 1. Misra C 2004... 2 2. Misra C 2012 (including Amendment 1). 10 3. Misra C 2012 Directives... 18 2. C++... 19 4. Misra C++ 2008... 19 1 / 31 1. C 1. Misra C 2004 MISRA Rule Severity

More information

Guidelines for development of ISO conformant devices

Guidelines for development of ISO conformant devices Guidelines for development of ISO 28560-3 conformant devices Author : Tommy Schomacker, contact TS@dbc.dk Identifier: http://biblstandard.dk/rfid/docs/conformance_28560-3.pdf Status : For information Published

More information

QUIZ Friends class Y;

QUIZ Friends class Y; QUIZ Friends class Y; Is a forward declaration neeed here? QUIZ Friends QUIZ Friends - CONCLUSION Forward (a.k.a. incomplete) declarations are needed only when we declare member functions as friends. They

More information

Entwicklung zuverlässiger Software-Systeme, Stuttgart 30.Juni 2011

Entwicklung zuverlässiger Software-Systeme, Stuttgart 30.Juni 2011 Entwicklung zuverlässiger Software-Systeme, Stuttgart 30.Juni 2011 Tools and Methods for Validation and Verification as requested by ISO26262 1 Introduction ISO26262 ISO 26262 is the adaptation of IEC

More information

Safety Argument based on GSN for Automotive Control Systems. Yutaka Matsubara Nagoya University

Safety Argument based on GSN for Automotive Control Systems. Yutaka Matsubara Nagoya University 1 Safety Argument based on GSN for Automotive Control Systems Yutaka Matsubara Nagoya University yutaka@ertl.jp 02.26.2014 2 Agenda 1. Safety argument in ISO26262 2. Requirements related to safety argument

More information

Standardkonforme Absicherung mit Model-Based Design

Standardkonforme Absicherung mit Model-Based Design Standardkonforme Absicherung mit Model-Based Design MATLAB EXPO 2014 Dr. Marc Segelken Principal Application Engineer 2014 The MathWorks, Inc. 1 Safety Standards for Embedded Systems IEC 61508 ISO 26262

More information

Auxiliary class interfaces

Auxiliary class interfaces Doc No: SC22/WG21/ N1742=04-0182 Project: Programming Language C++ Date: Sunday, November 07, 2004 Author: Francis Glassborow email: francis@robinton.demon.co.uk Auxiliary class interfaces (This is a replacement

More information

Memory Allocation. Static Allocation. Dynamic Allocation. Dynamic Storage Allocation. CS 414: Operating Systems Spring 2008

Memory Allocation. Static Allocation. Dynamic Allocation. Dynamic Storage Allocation. CS 414: Operating Systems Spring 2008 Dynamic Storage Allocation CS 44: Operating Systems Spring 2 Memory Allocation Static Allocation (fixed in size) Sometimes we create data structures that are fixed and don t need to grow or shrink. Dynamic

More information

Artop (AUTOSAR Tool Platform) Whitepaper

Artop (AUTOSAR Tool Platform) Whitepaper Artop (AUTOSAR Tool Platform) Whitepaper Updated version: March 2009 Michael Rudorfer 1, Stefan Voget 2, Stephan Eberle 3 1 BMW Car IT GmbH, Petuelring 116, 80809 Munich, Germany 2 Continental, Siemensstraße

More information

Wording for lambdas in unevaluated contexts

Wording for lambdas in unevaluated contexts Wording for lambdas in unevaluated contexts Document #: P0315R4 Date: 2017-11-10 Project: Programming Language C++ Audience: Core Working Group Reply-to: Louis Dionne Hubert Tong

More information

AUTOMOTIVE FOUNDATIONAL SOFTWARE SOLUTIONS FOR THE MODERN VEHICLE

AUTOMOTIVE FOUNDATIONAL SOFTWARE SOLUTIONS FOR THE MODERN VEHICLE www.qnx.com AUTOMOTIVE FOUNDATIONAL SOFTWARE SOLUTIONS FOR THE MODERN VEHICLE OVERVIEW Dear colleagues in the automotive industry, We are in the midst of a pivotal moment in the evolution of the car. Connected

More information

ADMIN 3.4. V e r s i o n 4. Paul Daly CEO RISSB

ADMIN 3.4. V e r s i o n 4. Paul Daly CEO RISSB ADMIN 3.4 V e r s i o n 4 Paul Daly CEO RISSB 01 November 2017 DOCUMENT CONTROL Identification Document Title Number Version Date Document ADMIN 3.4 1 23/11/2007 Document ADMIN 3.4 2 04/02/2010 Document

More information

C++ Coding Standards and Practices. Tim Beaudet March 23rd 2015

C++ Coding Standards and Practices. Tim Beaudet March 23rd 2015 C++ Coding Standards and Practices Tim Beaudet (timbeaudet@yahoo.com) March 23rd 2015 Table of Contents Table of contents About these standards Project Source Control Build Automation Const Correctness

More information

ARM Moves Further Into Automotive with NXP's Launch of S32K Series to the General Market

ARM Moves Further Into Automotive with NXP's Launch of S32K Series to the General Market ARM Moves Further Into Automotive with NXP's Launch of S32K Series to the General Market Automotive Electronics (AES) Report Snapshot NXP has now launched its new S32K range of microcontrollers for the

More information

Proposed Wording for Concurrent Data Structures: Hazard Pointer and Read Copy Update (RCU)

Proposed Wording for Concurrent Data Structures: Hazard Pointer and Read Copy Update (RCU) Document number: D0566R1 Date: 20170619 (pre Toronto) Project: Programming Language C++, WG21, SG1,SG14, LEWG, LWG Authors: Michael Wong, Maged M. Michael, Paul McKenney, Geoffrey Romer, Andrew Hunter

More information

Important From Last Time

Important From Last Time Important From Last Time Volatile is tricky To write correct embedded C and C++, you have to understand what volatile does and does not do Ø What is the guarantee that it provides? Don t make the 8 mistakes

More information

OASIS TECHNICAL COMMITTEE FORMAT OF AUTOMOTIVE REPAIR INFORMATION

OASIS TECHNICAL COMMITTEE FORMAT OF AUTOMOTIVE REPAIR INFORMATION OASIS TECHNICAL COMMITTEE FORMAT OF AUTOMOTIVE REPAIR INFORMATION Document Control Document Code SC1-014 Author(s) John Chelsom Date 08-01-2003 Version Version 1.0 Notes: This document uses a standard

More information

Automotive Security An Overview of Standardization in AUTOSAR

Automotive Security An Overview of Standardization in AUTOSAR Automotive Security An Overview of Standardization in AUTOSAR Dr. Marcel Wille 31. VDI/VW-Gemeinschaftstagung Automotive Security 21. Oktober 2015, Wolfsburg Hackers take over steering from smart car driver

More information

Overload Resolution. Ansel Sermersheim & Barbara Geller Amsterdam C++ Group March 2019

Overload Resolution. Ansel Sermersheim & Barbara Geller Amsterdam C++ Group March 2019 Ansel Sermersheim & Barbara Geller Amsterdam C++ Group March 2019 1 Introduction Prologue Definition of Function Overloading Determining which Overload to call How Works Standard Conversion Sequences Examples

More information

Considerations in automotive embedded development Global Automotive Director Kiyo Uemura

Considerations in automotive embedded development Global Automotive Director Kiyo Uemura Considerations in automotive embedded development Global Automotive Director Kiyo Uemura Agenda 1. IAR Systems Introduction 2. Background & ISO 26262 3. Software Development at the software level 4. Supporting

More information

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya

Coding Standards in FACE Conformance. John Thomas, Chris Edwards, and Shan Bhattacharya Coding Standards in FACE Conformance John Thomas, Chris Edwards, and Shan Bhattacharya LDRA Overview Provider of Software Quality, Compliance Management & Testing Solutions Established 1975 ISO 9001 certified

More information

Welcome to Teach Yourself Acknowledgments Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p.

Welcome to Teach Yourself Acknowledgments Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p. Welcome to Teach Yourself p. viii Acknowledgments p. xv Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p. 6 Standard C++: A Programming Language and a Library p. 8

More information