Matlab Expo 2020 Meet Certification Standards With Automated Requirements Based Testing
Matlab Expo 2020 Meet Certification Standards With Automated Requirements Based Testing
Paul Urban
Verification and Validation Product Manager
Challenge to Deliver Complex Systems and Meet Standards
2
ISO 26262-6:2018 notes Simulink and Stateflow as Suitable for
Software Architecture, Design and as basis for Code Generation
Table 2 Software Architecture Design Notations has similar suitability wording for use of Simulink and Stateflow
3
Qualify tools with IEC Certification Kit and DO Qualification Kit
4
Qualify tools with IEC Certification Kit and DO Qualification Kit
5
Qualify tools with IEC Certification Kit and DO Qualification Kit
6
Conform to Certification Standards with Reference Workflow
Code Compilation
Modeling
generation and linking
7
Model Verification: Discover design errors at design time
Model Verification
• Manage requirements • Check standard compliance
• Systematically test • Detect design errors
• Measure model coverage • Prove model behavior compliance
Code Compilation
Modeling
generation and linking
8
Code Verification: Gain Confidence in the Generated Code
Code Verification
• Trace code to model and requirements • SIL/PIL equivalence testing
• Measure code coverage • Generate 100% coverage test vectors
Code Compilation
Modeling
generation and linking
9
Manage Requirements
Model Verification
• Manage requirements • Check standard compliance
• Systematically test • Detect design errors
• Measure model coverage • Prove model behavior compliance
Code Compilation
Modeling
generation and linking
10
Manage Requirements
Requirements
Managements
Tools
Code Compilation
Modeling
generation and linking
11
Work with Requirements, Architecture and Design Together
External
Requirements Simulink Requirements
Implements
External Requirements
Architecture
/ Design
Authored Requirements
Verifies
Requirements
Tests
Managements
Tools
12
Demo: Requirements Perspective
13
Test and Requirements Traceability
Verification Status
Passed
Failed
Unexecuted
Missing
14
Review and Analyze Traceability with Traceability Matrix
Requirement is missing
link to Test Case
15
Review and Analyze Traceability with Traceability Matrix
16
Systematic Functional Testing of Model
Model Verification
• Manage requirements • Check standard compliance
• Systematically test • Detect design errors
• Measure model coverage • Prove model behavior compliance
Code Compilation
Modeling
generation and linking
17
Requirements Based Verification with Simulink Test
Implemented
FUNCTIONAL REQUIREMENTS By
The flight control system shall ... System Composer /
Simulink / Stateflow
Verified By
Test Case
Inputs Assessments
Test Harness
Signal Editor
MAT / Excel Test
MAT / Excel File (baseline) Assessments
file (input)
19
Measure completeness of testing
Model Verification
• Manage requirements • Check standard compliance
• Systematically test • Detect design errors
• Measure model coverage • Prove model behavior compliance
Code Compilation
Modeling
generation and linking
20
Coverage Analysis to Measure Testing
• Unintended functionality
• Design errors
Code
Coverage Reports
21
Test and Requirements Traceability in Coverage Results
22
Scoping Model Coverage to Requirements-Based Tests
23
Scoping Model Coverage to Requirements-Based Tests
Missing
requirement
links identified
24
Test and Requirements Traceability in Coverage Results
25
Test and Requirements Traceability in Coverage Results
26
Address missing Requirements Based Test Coverage
27
100% Coverage but Testing Identified Error in Implementation
28
Additional Testing Identified Error in Implementation
29
Scoped Model Coverage to Requirements-Based Tests
Model Verification
• Manage requirements • Check standard compliance
• Systematically test • Detect design errors
• Measure model coverage • Prove model behavior compliance
Code Compilation
Modeling
generation and linking
31
Verify Design to Guidelines and Standards
Check for:
• Readability and Semantics
• Clones
• And more……
Model Advisor Analysis
Code Compilation
Modeling
generation and linking
32
Built in checks for industry standards and guidelines
• EN 50128
Code Compilation
Modeling
generation and linking
Shift Verification Earlier With Edit-Time Checking
• Avoid rework
Edit-Time
Checking
Code Compilation
Modeling
generation and linking
34
Detect Design Errors with Formal Methods
Model Verification
• Manage requirements • Check standard compliance
• Systematically test • Detect design errors
• Measure model coverage • Prove model behavior compliance
Code Compilation
Modeling
generation and linking
35
Detect Design Errors Using Formal Methods
36
Prove Model Behavior Compliance
Model Verification
• Manage requirements • Check standard compliance
• Systematically test • Detect design errors
• Measure model coverage • Prove model behavior compliance
Code Compilation
Modeling
generation and linking
37
Proving Model Meets Requirements
Code Compilation
Modeling
generation and linking
38
Model functional and safety requirements
39
Link requirements to properties
40
Prove That Design Meets Requirements
41
Debugging Property Proving Violations
42
Resolve unexpected behavior in a model with Model Slicer
Isolate
Find the area of the model responsible
for unexpected behavior
Analyze dependencies
Understand data & control dependencies
in large or complex models
Correct Model
43
Code Verification: Gain Confidence in the Generated Code
Code Verification
• Trace code to model and requirements • SIL/PIL equivalence testing
• Measure code coverage • Generate 100% coverage test vectors
Code Compilation
Modeling
generation and linking
44
Back-to-Back Testing
Tests
Embedded PC
Coder Compiler
Generated Object
Model
Code File
Desktop Simulation Object Code ▪ Automate SIL testing
(on PC) Execution (on PC) using Simulink Test
Results == ? Results
45
Automate Test Creation using Test Manager Wizard
46
Cross Release SIL/PIL Test Harness Generation
• Create a SIL/PIL test harness using code that was generated in a previous release
• Modify existing SIL/PIL test harnesses to store the build folder path information which
can be used for rebuild
47
Reference Workflow for Generated Code
Simulink Requirements*
IEC Cert Kit (for trace)
Simulink Test and Simulink Coverage (for MIL)*
Simulink Test and Simulink Coverage (for SIL)*
Simulink Check*
Simulink Design Verifier*
Simulink Test (for PIL)*
Code Compilation
Modeling
generation and linking
*Qualifiable
48
Customer References and Applications
49
Use reference workflow to conform to standards
Code Compilation
Modeling
generation and linking
50
Learn More
51
Thank You!
52