Placeholder-Based Program Code Generation for AUTOSAR Flexibility

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for generating program code for control systems lack flexibility in supporting different types of communication, particularly under the AUTOSAR framework, leading to inefficiencies in incremental code generation and reuse across various projects.

Innovation Solution

The method introduces three placeholders - a first placeholder representing a variable, a second placeholder before its use, and a third placeholder after its use - to enable flexible code generation, allowing for distinct phases of data object access and avoiding the need for complete code regeneration when adapting to different communication types.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If program code is generated directly from graphical models using a program code generator, then code generation efficiency is improved, but flexibility in supporting different types of communication is lost

Engineering Contradiction:
Improvecode generation efficiencyVSAvoidflexibility in supporting different communication types
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the code generation process into multiple phases by introducing three distinct placeholders (first placeholder for variable representation, second placeholder for pre-use setup, third placeholder for post-use cleanup). This segmentation allows the code to be generated incrementally and adapted for different communication types without complete regeneration, thus improving both efficiency and flexibility.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies preliminary action by generating the first placeholder that represents a variable in advance during incremental code generation. This placeholder can later be replaced or configured for different communication types (such as AUTOSAR communication), allowing the code structure to be prepared beforehand while maintaining adaptability for various communication protocols.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If incremental code generation is used to improve efficiency, then code reuse is improved, but the ability to adapt to different communication types is worsened

Engineering Contradiction:
Improveincremental code generation efficiencyVSAvoidadaptability to different communication types
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent enables parameter changes by designing the placeholder system to be configurable. The first placeholder representing a variable can be replaced with different implementations depending on the communication type required (e.g., different AUTOSAR communication mechanisms). This allows incremental code generation to produce adaptable code that can be configured for various communication protocols without requiring complete code regeneration.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If complete code regeneration is performed to adapt to different communication types, then adaptability is improved, but code generation time and testing requirements increase

Engineering Contradiction:
Improveadaptability to different communication typesVSAvoidcode generation time and testing requirements
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent extracts the communication-type-specific code portions into replaceable placeholders. Instead of regenerating the entire codebase when adapting to different communication types, only the specific placeholder instances need to be replaced or configured. This extraction approach significantly reduces both code generation time and testing requirements while maintaining full adaptability to different communication protocols.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP4174641A1Method for generating program code, method for configuring a control device and computer system
Publication Date: 2023.05.03 DSPACE SE & CO KG
  • EP4174641A1 patent drawingFigure 1~2
  • EP4174641A1 patent drawingFigure 3~4
  • EP4174641A1 patent drawingFigure 5

AI summary

The invention relates to a computer-implemented method for generating program code (1), comprising generating (S1) a first placeholder (P1) representing a variable, which is used in a predetermined section (10) of the program code (1), generating (S2) a second placeholder (P2), which is placed before the beginning of the predetermined section (10) of the program code (1) that uses the first placeholder (P1), and generating (S3) a third placeholder (P3), which is placed after the end of the predetermined section (10) of the program code (1) that uses the first placeholder (P1). The invention further relates to a method for configuring a control unit. The present invention also relates to a computer program, a computer-readable data carrier, and a computer system.