Die wichtigsten Use Cases für MISRA, HIS, SQO, IEC, ISO und Co. - Warum Polyspace DIE Embedded Code-Verifikationslösung ist.



Similar documents
for Source Code MathWorks Automotive Conference June 23 rd 2010 A project with Renault, PSA, Valeo, Delphi, MathWorks Presenters: Thierry Cambois -

Echtzeittesten mit MathWorks leicht gemacht Simulink Real-Time Tobias Kuschmider Applikationsingenieur

Schnell und effizient durch Automatische Codegenerierung

Product Development Flow Including Model- Based Design and System-Level Functional Verification

Best Practices for Verification, Validation, and Test in Model- Based Design

AC REUSABLE SOFTWARE COMPONENTS

Software Production. Industrialized integration and validation of TargetLink models for series production

Static Analysis of Dynamic Properties - Automatic Program Verification to Prove the Absence of Dynamic Runtime Errors

Verification and Validation According to ISO 26262: A Workflow to Facilitate the Development of High-Integrity Software

Sound Verification Techniques for Developing High-Integrity Medical Device Software

Introduction of ISO/DIS (ISO 26262) Parts of ISO ASIL Levels Part 6 : Product Development Software Level

Development of AUTOSAR Software Components within Model-Based Design

TÜ V Rheinland Industrie Service

Automating Code Reviews with Simulink Code Inspector

Entwicklung und Testen von Robotischen Anwendungen mit MATLAB und Simulink Maximilian Apfelbeck, MathWorks

APPROACHES TO SOFTWARE TESTING PROGRAM VERIFICATION AND VALIDATION

Software Engineering for LabVIEW Applications. Elijah Kerry LabVIEW Product Manager

Abstract Interpretation-based Static Analysis Tools:

Simulink Modeling Guidelines for High-Integrity Systems

ISO Functional Safety Draft International Standard for Road Vehicles: Background, Status, and Overview

Qualifying Software Tools According to ISO 26262

Know or Go Practical Quest for Reliable Software

Best practices for developing DO-178 compliant software using Model-Based Design

How Safe does my Code Need to be? Shawn A. Prestridge, Senior Field Applications Engineer

Efficient and Faster PLC Software Development Process for Automotive industry. Demetrio Cortese IVECO Embedded Software Design

Meeting DO-178B Software Verification Guidelines with Coverity Integrity Center

SCADE SUITE SOFTWARE VERIFICATION PLAN FOR DO-178B LEVEL A & B

[Docket No. FAA ; Directorate Identifier 2010-NM-146-AD; Amendment ; AD ]

Reduce Medical Device Compliance Costs with Best Practices.

How to Upgrade SPICE-Compliant Processes for Functional Safety

ISO Introduction

Elektrobit (EB) Automotive Consulting Manage challenging automotive software projects

[Docket No. FAA ; Directorate Identifier 2015-NM-034-AD; Amendment ; AD ]

[Docket No. FAA ; Directorate Identifier 2010-NM-117-AD; Amendment ; AD ]

SQMB '11 Automated Model Quality Rating of Embedded Systems

Vetting Smart Instruments for the Nuclear Industry

Satisfying ASIL Requirements with Parasoft C++test Achieving Functional Safety in the Automotive Industry

Parameters for Efficient Software Certification

Eli Levi Eli Levi holds B.Sc.EE from the Technion.Working as field application engineer for Systematics, Specializing in HDL design with MATLAB and

[Docket No. FAA ; Directorate Identifier 2015-NM-027-AD; Amendment. AGENCY: Federal Aviation Administration (FAA), DOT.

[Docket No. FAA ; Directorate Identifier 2014-NM-194-AD; Amendment ; AD ]

Model-Based Development of Safety-Critical Software: Safe and Effi cient

Introduction into IEC Software life cycle for medical devices

Comprehensive Static Analysis Using Polyspace Products. A Solution to Today s Embedded Software Verification Challenges WHITE PAPER

How To Improve Your Software

Anwendung von Polyspace im Software Entwicklungsprozess nach IEC München, , Dr.-Ing. Jörg Barrho

The Course.

Model Based System Engineering (MBSE) For Accelerating Software Development Cycle

SAFE SOFTWARE FOR SPACE APPLICATIONS: BUILDING ON THE DO-178 EXPERIENCE. Cheryl A. Dorsey Digital Flight / Solutions cadorsey@df-solutions.

Integrating MATLAB into your C/C++ Product Development Workflow Andy Thé Product Marketing Image Processing Applications

Quality Assurance Methods for Model-based Development: A Survey and Assessment

CS 451 Software Engineering Winter 2009

Formal Software Testing. Terri Grenda, CSTE IV&V Testing Solutions, LLC

VELOCITY LAB TM Embedded Development Ecosystem

IBM Rational Rhapsody

Industrial case study: Zero defect secure software for the National Security Agency

Requirements-driven Verification Methodology for Standards Compliance

Software Development with Real- Time Workshop Embedded Coder Nigel Holliday Thales Missile Electronics. Missile Electronics

ISTQB Certified Tester. Foundation Level. Sample Exam 1

Rigorous Software Development CSCI-GA

Static vs. Dynamic Testing How Static Analysis and Run-Time Testing Can Work Together. Outline

MODEL-BASED DEVELOPMENT OF AUTOMOTIVE EMBEDDED SOFTWARE IN COMPLIANCE WITH ISO 26262: CHALLENGES & EFFECTIVE SOLUTIONS 8 JUNE - 9 JUNE 2015

[Docket No. FAA ; Directorate Identifier 2014-NM-067-AD; Amendment ; AD ]

Certification of a Scade 6 compiler

Ethical Issues in the Software Quality Assurance Function


Intelligent development tools Design methods and tools Functional safety

Electronic system-level development: Finding the right mix of solutions for the right mix of engineers.

Codesign: The World Of Practice

[Docket No. FAA ; Directorate Identifier 2015-NE-02-AD; Amendment ; AD ]

Software testing. Objectives

ARM Webinar series. ARM Based SoC. Abey Thomas

How To Do Continuous Integration

[Docket No. FAA ; Directorate Identifier 2015-NM-144-AD] Airworthiness Directives; The Boeing Company Airplanes

Software in safety critical systems

Model-based Quality Assurance of Automotive Software

VHDL-Testbench as Executable Specification

Overview of Existing Safeguarding Techniques for Automatically Generated Code

Testing the Internet of Things

ANSYS SCADE Model-Based Development Solutions for AUTOMOTIVE. Critical Systems & Software Development Solutions

ENEA: THE PROVEN LEADER IN SAFETY CRITICAL AVIONICS SYSTEMS

White Paper 40-nm FPGAs and the Defense Electronic Design Organization

Requirements engineering

[Docket No. FAA ; Directorate Identifier 2008-NM-171-AD; Amendment ; AD ]

ISO Exemplary Tool Classification of Model-Based Design Tools

IEC Functional Safety Assessment. Project: K-TEK Corporation AT100, AT100S, AT200 Magnetostrictive Level Transmitter.

Software Engineering for LabVIEW Applications

Modeling a GPS Receiver Using SystemC

The Role of Automation Systems in Management of Change

[Docket No. FAA ; Directorate Identifier 2008-NM-190-AD; Amendment ; AD ]

Controlling Risks Safety Lifecycle

Hardware Virtualization for Pre-Silicon Software Development in Automotive Electronics

Contents. System Development Models and Methods. Design Abstraction and Views. Synthesis. Control/Data-Flow Models. System Synthesis Models

Do AUTOSAR and functional safety rule each other out?

Understanding DO-254 Compliance for the Verification of Airborne Digital Hardware

Effective Software Verification for Medical Devices

DO-254 Requirements Traceability

Static Analysis Best Practices

[Docket No. FAA ; Directorate Identifier 2014-NM-179-AD] AGENCY: Federal Aviation Administration (FAA), DOT.

F-22 Raptor. Agenda. 1. Motivation

Transcription:

Die wichtigsten Use Cases für MISRA, HIS, SQO, IEC, ISO und Co. - Warum Polyspace DIE Embedded Code-Verifikationslösung ist. Christian Guß Application Engineer The MathWorks GmbH 2015 The MathWorks, Inc. 1

Agenda today Engineering challenges today Quality question Uniqueness of Polyspace How to comply with Safety Standards? Software Quality Objectives 2

High-Integrity Applications are complex Software-based systems that are designed and maintained such that they have a high probability of carrying out their intended function cf. Buncefield Investigation Glossary www.buncefieldinvestigation.gov.uk/glossary.htm 3

The Cost of Failure Ariane 5: Overflow Error $7,500,000,000 Rocket & payload lost 4

The Cost of Failure Recall Due to ECU software bug 5

The Cost of Failure Therac-25: Race Condition, Overflow 6 Casualties due to radiation overdose 6

Airworthiness Directives; The Boeing Company Airplanes A Rule by the Federal Aviation Administration on 05/01/2015 DEPARTMENT OF TRANSPORTATION Federal Aviation Administration 14 CFR Part 39 [Docket No. FAA 2015 0936; Directorate Identifier 2015 NM 058 AD; Amendment 39 18153; AD 2015 09 07] RIN 2120 AA64 Airworthiness Directives; The Boeing Company Airplanes AGENCY: Federal Aviation Administration (FAA), DOT. ACTION: Final rule; request for comments. SUMMARY: We are adopting a new airworthiness directive (AD) for all The Boeing Company Model 787 airplanes. This AD requires a repetitive maintenance task for electrical power deactivation on Model 787 airplanes. This AD was prompted by the determination that a Model 787 airplane that has been powered continuously for 248 days can lose all alternating current (AC) electrical power due to the generator control units (GCUs) simultaneously going into failsafe mode. This condition is caused by a software counter internal to the GCUs that will overflow after 248 days of continuous power. We are issuing this AD to prevent loss of all AC electrical power, which could result in loss of control of the airplane. DATES: This AD is effective May 1, 2015. The Director of the Federal Register approved the incorporation by reference of certain publications listed in this AD as of May 1, 2015. We must receive comments on this AD by June 15, 2015. https://www.federalregister.gov/articles/2015/05/01/2015-10066/airworthiness-directives-the-boeing-company-airplanes 7

How to avoid this? Engineering challenges today Check MISRA Comply with ISO, IEC safety requirements Optimize Design and Architecture Deliver Bug free software Measure Code Quality Reduce time and efforts for software testing 8

Typical Example about the quality question Final release It s done Here is your software! Great! Is it tested? 9

Typical Example about the quality question Yes! Everything is tested! No errors! Please prove it to me! 10

Typical Example about the quality question Please prove it to me! 11

Do You Know Which Quality Is Your Code Today? Your source code Testing..................... Many executions for functional testing do not prove code correctness 0% proven correct 0,000000 1% executions verified 0,000000 2% executions verified 0,000000 3% executions verified 12

Problem: Tests aren t exhaustive [1] Dijkstra, Notes On Structured Programming, 1972 13

How is Polyspace code verification unique? Statically verifies all possible executions of your code (considering all possible inputs, paths, variable values) Proves when code will not fail under any runtime conditions Finds runtime errors, boundary conditions and unreachable code without exhaustive testing Gives insight into runtime behavior and data ranges 14

Difference of semantic analysis & testing T0 T0 + 3 months T0 + 6 months More and more is proven correct Your source code 0% proven correct..................... Many executions for functional testing do not prove code correctness 0,000000 1% executions verified 0,000000 2% executions verified 0,000000 3% executions verified 15

Typical Example about the quality question Please prove it to me! 16

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing REQUIREMENTS System validation/acceptance Tests User Acceptance Testing System-Level Specification Architectural Design Environment Models Physical Components System tests in simulation System Tests Run system tests on integrated controller Integration Testing Complete Integration & Test Subsystem Design Algorithms Test vectors and expected responses Component Design Test vectors and expected outputs Component Tests Component tests in simulation Run component tests on target IMPLEMENTATION Code Verification and Validation Subsystem Integration & Test System-Level Integration & Test C, C++ VHDL, Verilog Structured Text MCU DSP FPGA ASIC PLC Subsystem Implementation 17

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Detect and correct areas with high complexity Table 1 Topics to be covered by modelling and coding guidelines Polyspace Metrics 18

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Enforcement of coding guidelines Polyspace Metrics Table 1 Topics to be covered by modelling and coding guidelines Polyspace Metrics 19

Justify MISRA violations with Polyspace formal method MISRA Violation Proven save (no Overflow) Justify MISRA violation Polyspace Code Prover 20

Justify MISRA violations with Polyspace formal method 21

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing REQUIREMENTS System validation/acceptance Tests User Acceptance Testing System-Level Specification Architectural Design Environment Models Physical Components System tests in simulation System Tests Run system tests on integrated controller Integration Testing Complete Integration & Test Subsystem Design Algorithms Test vectors and expected responses Component Design Test vectors and expected outputs Component Tests Component tests in simulation Run component tests on target IMPLEMENTATION Code Verification and Validation Subsystem Integration & Test System-Level Integration & Test C, C++ VHDL, Verilog Structured Text MCU DSP FPGA ASIC PLC Subsystem Implementation 22

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Minimize size in balance with other design considerations A B C F D E System 23

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing REQUIREMENTS System validation/acceptance Tests User Acceptance Testing System-Level Specification Architectural Design Environment Models Physical Components System tests in simulation System Tests Run system tests on integrated controller Integration Testing Complete Integration & Test Subsystem Design Algorithms Test vectors and expected responses Component Design Test vectors and expected outputs Component Tests Component tests in simulation Run component tests on target IMPLEMENTATION Code Verification and Validation Subsystem Integration & Test System-Level Integration & Test C, C++ VHDL, Verilog Structured Text MCU DSP FPGA ASIC PLC Subsystem Implementation 24

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Detect poor and potentially incorrect program structures 25

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Detect poor and potentially incorrect program structures 26

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Detect poor and potentially incorrect program structures 27

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Detect poor and potentially incorrect program structures 28

Semantic Analysis Example Read A INT; A = A + 2 ;. + A [ MinINT; MaxINT ] //observed data range for A A [ MinINT + 2; MaxINT ] If (A >= = 3) or (A = 7) or (A > 11) // improve robustness in regards of specification then B = C /(A - 8);. / - A [3; MaxINT ] A {3, 7} U [12; MaxINT ] else. A [ MinINT+ 2; 2] A [ MinINT+ 2; 2] U {4, 5, 6, 8, 9, 10, 11} Endif ; No test cases to write No execution No simulation 29

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing REQUIREMENTS System validation/acceptance Tests User Acceptance Testing System-Level Specification Architectural Design Environment Models Physical Components System tests in simulation System Tests Run system tests on integrated controller Integration Testing Complete Integration & Test Subsystem Design Algorithms Test vectors and expected responses Component Design Test vectors and expected outputs Component Tests Component tests in simulation Run component tests on target IMPLEMENTATION Code Verification and Validation Subsystem Integration & Test System-Level Integration & Test C, C++ VHDL, Verilog Structured Text MCU DSP FPGA ASIC PLC Subsystem Implementation 30

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Use Polyspace to assist with analysis of equivalence classes - Analysis of interface data into the unit - Analysis of control modes within the unit Unit 3 Input Data SW Unit 1 SW Unit 3 invalid valid invalid SW Unit 2 A B C 31

Example: Equivalence class testing at unit level Polyspace Testing int test_add( int a, int b ) { int c = Add1(a, b); if ( a >= 0 && b >= 0 && c < 0 ) { fprintf ( stderr, "Overflow!\n" ); } if ( a < 0 && b < 0 && c >= 0 ) { fprintf ( stderr, "Underflow!\n" ); } return c; } int16_max u1 valid int16_max u2 No Testcases No Execution Fast and reusable No Simulation Exhaustive 32

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing REQUIREMENTS System validation/acceptance Tests User Acceptance Testing System-Level Specification Architectural Design Environment Models Physical Components System tests in simulation System Tests Run system tests on integrated controller Integration Testing Complete Integration & Test Subsystem Design Algorithms Test vectors and expected responses Component Design Test vectors and expected outputs Component Tests Component tests in simulation Run component tests on target IMPLEMENTATION Code Verification and Validation Subsystem Integration & Test System-Level Integration & Test C, C++ VHDL, Verilog Structured Text MCU DSP FPGA ASIC PLC Subsystem Implementation 33

Examples of software safety requirements Initiation Architecture Design/Implementation Unit Testing Integration Testing Use Polyspace to help with identification and analysis of boundaries Identification of Zero divisor Range analysis of boundaries Testing at the edge of equivalence partition 34

Example: Optimize Design and Architechture decission Non Robust Module External code Potential Runtime Error inside!!! 35

Example: Optimize Design and Architechture decission Non Robust Module Additional Range-Limiting Code Free from Runtime Errors 36

Leverage an integrated tool chain For Model-Based Design and automatic code generation and hand-written code Use traceability back to the model Use available context information for inputs and parameters Model Hand-written code Polyspace verification on generated code 37

Resume: Scope of the metrics - Key Categories MISRA-2004 Rules Un-reachable Branches Code Metrics Nonterminating Constructs Detailed Design Description Run-time Errors Quality Plan SQO Dataflow Analysis Software Quality Objectives 38

A quality model called SQO Key Categories List of suggested quality objectives Thresholds to reach quality requirements Built on metrics from HIS* *) Hersteller Initiative Software (HIS) Detailed Design Description Quality Plan Code Metrics MISRA-2004 Rules SQO Un-reachable Branches Non-terminating Constructs Run-time Errors Dataflow Analysis Example of Software Quality Requirement defined in SQO: 39

Introducing the Software Quality Objectives (SQO) project ISO-26262 doesn t detail how to set up OEM/suppliers interface OEM and suppliers have to agree on: A quality model and a process guide Renault Compliant to ISO-26262 Elektrobit PSA One example is SQO : Continental Delphi OEM and suppliers created a working group* They published a document named Software Quality Objectives for Source Code MathWorks Valeo The SQO group started in 2007 with OEMs, and extended to suppliers * MathWorks acted as a facilitator in the group 40

Software Quality Objectives: Incremental Quality Start Design Prototyping Testing Start of Production Quality Plan & Detailed Design Code Metrics 1 st MISRA-2004 rules subset SQO Step 1 SQO Step 2 Systematic run-time errors Non terminating constructs Unreachable branches SQO Step 3 SQO Step 4 1st subset of potential run-time errors 2nd MISRA-2004 rules subset 2nd subset of potential run-time errors SQO Step 5 SQO Step 6 3rd subset of potential run-time errors Dataflow Analysis 41

SQO is compliant with ISO 26262 IEC certification process requires to define a quality model and its application It s not an additional task of the certification process 42

Using tools to implement SQO Example SQR-150: Code complexity Coverage: Full To create reports and automate ISO 26262 AND SQO activities PASS/FAIL status for each objective Progress monitoring over time Clear list remaining items to be reviewed/fixed Pre-qualified for all ISO 26262 ASIL 43

Summary: Typical engineering challenges Check MISRA Optimize Design and Architecture Measure Code Quality Comply with ISO, IEC safety requirements Deliver Bug free software Reduce time and efforts for software testing 44

45