Safety Contract-Based Test Code Generation for Software Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for testing safety-relevant systems often fail to ensure that the final product complies with specifications, as program code generated during development may deviate from the actual implementation, making it difficult to verify compliance with safety contracts.

Innovation Solution

A method that generates executable program code based on safety contracts' assumptions and guarantees, allowing for automatic testing of safety-relevant systems by executing the code to verify compliance with specified safety contracts, even at runtime.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If program code is generated during or after development from implemented functions, then development efficiency is improved, but compliance with safety specifications cannot be guaranteed

Engineering Contradiction:
Improvedevelopment efficiencyVSAvoidcompliance with safety specifications
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent generates test program code in advance from safety contracts before the actual system implementation is complete. By creating test cases based on safety requirements upfront, the system ensures that safety specifications are established as a baseline before development deviations can occur, enabling later verification that implementation matches specification.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If program code is derived from implementation, then testing is simplified, but ability to verify specification compliance is lost

Engineering Contradiction:
Improvetesting simplicityVSAvoidspecification compliance verification
Core Design Contradiction:
Ease of operationVSMeasurement precision

Solution Approach 1:

The patent introduces safety contracts as an intermediary layer between the system implementation and test code generation. Instead of deriving test code directly from implementation, the safety contract serves as a mediating specification that translates safety requirements into executable test cases, enabling verification of compliance while maintaining automated testing.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If safety contracts are enforced at runtime through automatic code generation, then safety monitoring is improved, but system complexity increases

Engineering Contradiction:
Improvesafety monitoringVSAvoidtesting system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements a self-service mechanism where the safety contract automatically generates its own verification code. The safety requirements embedded in the contract contain sufficient information to autonomously produce test cases that verify compliance, eliminating the need for external manual test creation and reducing the burden on external testing systems.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11734164B2Method and computer program for testing a technical system
Publication Date: 2023.08.22 ROBERT BOSCH GMBH
  • US11734164B2 patent drawing
  • US11734164B2 patent drawing

AI summary

A method for testing a, in particular safety-relevant, technical system, in particular encompassing software. The system is represented by a model encompassing at least two or more components. An assumption of a respective component regarding the safety-relevant system, and a guarantee of a respective component to the safety-relevant technical system, are specified by a safety contract. Executable program code is generated based on at least one assumption and based on at least one guarantee. The safety-relevant technical system is tested by executing the program code.