Embedded Software Adaptation Using Interface-Tested Code Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The challenge of generating accurate and reliable software code elements, particularly for cyber-physical systems, is exacerbated by the unpredictability of machine learning models like Foundation Models or Large Language Models (LLMs), which may hallucinate and fail to meet requirements, complicating adjustments and maintenance.

Innovation Solution

A method involving a machine learning model that generates code elements based on a language specification and interface test criteria, followed by automated testing to ensure compliance, allowing integration only when criteria are met, thus ensuring code quality and reducing manual effort.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If machine learning models generate code elements based on language specifications, then productivity and ease of code adjustment are improved, but reliability and accuracy of the generated code deteriorate due to hallucinations and failure to meet requirements

Engineering Contradiction:
Improvecode generation speedVSAvoidcode accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements automated testing that provides feedback to the machine learning model when generated code fails to meet interface test criteria. The test results are fed back into the generation process, allowing the model to learn from failures and improve subsequent code generation attempts, thereby resolving the reliability issue while maintaining productivity

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

Interface test criteria are defined beforehand before code generation occurs. This preliminary action establishes clear requirements that the generated code must satisfy, enabling automated validation and ensuring that productivity gains do not compromise code accuracy and reliability

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If machine learning models are used to generate code elements, then ease of operation and adaptability are improved, but manufacturing precision and measurement precision deteriorate due to inability to guarantee requirement compliance

Engineering Contradiction:
Improvecode adjustment easeVSAvoidcode requirement compliance
Core Design Contradiction:
Ease of operationVSManufacturing precision

Solution Approach 1:

An automated testing system acts as an intermediary between the machine learning model and the final code integration. This intermediary validates generated code against interface test criteria before acceptance, ensuring that ease of code adjustment through AI generation does not sacrifice manufacturing precision and requirement compliance

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If code elements are generated without automated testing, then productivity is improved, but reliability and quality assurance deteriorate

Engineering Contradiction:
Improvecode revision frequencyVSAvoidcode quality
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements self-service automated testing where the testing infrastructure automatically validates generated code without requiring manual intervention. This allows frequent code revisions and high productivity while maintaining reliability through continuous automated quality assurance, eliminating the trade-off between revision frequency and code quality

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20250383846A1Automated adaptation of embedded software
Publication Date: 2025.12.18 ROBERT BOSCH GMBH
  • US20250383846A1 patent drawing
  • US20250383846A1 patent drawing

AI summary

A computer-implemented method for the automated generation of a code element of a software code includes (i) generating, via a machine learning model, the code element based on a language specification for the code element to be created and an interface test criterion that is to be satisfied by the code element to be created, optionally wherein a prompt to the machine learning model includes the language specification and the interface test criterion, and (ii) testing whether the code element satisfies the interface test criterion, thus providing a test result.