AI Program Code Generation Using Verified Function Modules

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing automated code generation methods, such as those using Large Language Models (LLM), struggle to create complex program code for automation tasks, often resulting in flawed or non-existent functions.

Innovation Solution

A method involving decomposition of the overall system function into individual functions using a database of predefined modules, with AI-assisted retrieval and creation of program modules, followed by automated code generation from these modules.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If automated code generation is attempted for complex programs, then productivity is improved, but reliability deteriorates due to invented non-existent functions and flawed code

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

Solution Approach 1:

The patent segments the code generation process into distinct phases: analyzing existing code to extract functions, creating a function library, and then assembling these verified functions to generate new code. This segmentation ensures that only proven, existing functions are reused, preventing the invention of non-existent functions while maintaining automated generation capabilities.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary analysis of existing code bases to extract and validate functions before they are used for generation. By pre-processing and storing verified functions in a library, the system ensures that subsequent code generation relies on proven, reliable building blocks rather than generating potentially flawed code from scratch.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If manual programming is used for complex control tasks, then reliability is maintained through human expertise, but productivity deteriorates due to extensive time required

Engineering Contradiction:
Improvecode qualityVSAvoidcode development time
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent creates a library of copied, proven functions from existing reliable code. Instead of manually programming each function from scratch, the system copies and reuses validated function definitions, maintaining the reliability of original implementations while dramatically reducing development time for new systems.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent merges multiple existing verified functions to create complex program code automatically. By combining pre-validate d function modules, the system achieves both the reliability of manual programming (since all components are verified) and the productivity of automation (since the combination process is automated).

Inventive Principle:
Principle #5Merging (Combining)

3Ease of operation

If AI generates code directly from specifications, then ease of operation is improved, but manufacturing precision deteriorates due to flawed code generation

Engineering Contradiction:
Improvecode creation simplicityVSAvoidcode accuracy
Core Design Contradiction:
Ease of operationVSManufacturing precision

Solution Approach 1:

The patent introduces an intermediary function library between the specification and the generated code. The AI does not generate code directly from specifications but instead selects and combines functions from the verified library. This intermediary layer ensures that ease of operation is maintained (AI handles the selection) while manufacturing precision is improved (only verified functions are used).

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP4636576A1Automated generation of program code by identifying sub-functions and combining existing program modules retrieved from libraries using artificial intelligence
Publication Date: 2025.10.22 SIEMENS AG
  • EP4636576A1 patent drawingFigure 1
  • EP4636576A1 patent drawingFigure 2
  • EP4636576A1 patent drawing

AI summary

The invention relates to a method, in particular a computer-aided method, for generating program code for a system, comprising the following steps: - defining the overall function of the system which is to be represented in a program code; - breaking down the overall function into individual functions by accessing a database in which a plurality of different individual functions are represented; - accessing program modules which are stored in the database and which represent the respective individual function, or creating program modules which represent the respective individual function, in particular using artificial intelligence; - automated creation of program code for the system by combining the program modules respectively assigned to the individual functions. The invention further relates to a computer program product and a computer-readable medium.