Incremental Code Generation Using Definition Database

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for incremental code generation from block diagrams in control unit development often fail to optimize code efficiently, leading to suboptimal performance and increased development time due to the lack of comprehensive information exchange between code generation units.

Innovation Solution

A method that generates source code from hierarchical block diagrams by utilizing a definition database to store and retrieve information about subsystems, allowing for optimized code generation and validation, including the management of global variable access, checksums, and library usage, which enables efficient code optimization and validation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If incremental code generation is performed for individual subsystems separately, then development time is reduced and code can be generated independently for each subsystem, but code optimization efficiency deteriorates compared to continuous code generation for the complete model

Engineering Contradiction:
Improvedevelopment timeVSAvoidcode optimization efficiency
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The patent divides the complete model into multiple subsystems that can be processed independently through incremental code generation. Each subsystem is analyzed and code is generated separately, allowing parallel development and reducing overall development time while maintaining the ability to optimize code through centralized information management in the definition database.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The definition database serves as an intermediary that stores comprehensive information about all subsystems. This mediator enables both incremental processing of individual subsystems and centralized optimization by providing all necessary information about global variables, library usage, and inter-subsystem dependencies to the code generation process.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If comprehensive information about all subsystems is collected and stored centrally, then code optimization efficiency is improved through better information availability, but device complexity increases due to the centralized repository structure

Engineering Contradiction:
Improvecode optimization efficiencyVSAvoidsystem structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The definition database is designed as a universal repository that serves multiple functions: storing information about global variables, tracking library usage, managing checksums for change detection, and providing inter-subsystem dependency information. This multi-functional approach consolidates what could be multiple separate systems into a single centralized repository, reducing overall system complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Productivity

If the complete model is processed continuously for code generation, then code optimization is maximized with full information availability, but development time increases and iterative updates become slower

Engineering Contradiction:
Improvecode optimization efficiencyVSAvoiddevelopment time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary analysis of each subsystem and stores the results in the definition database before complete code generation. Checksums are calculated and stored in advance, enabling the code generation process to quickly determine whether subsystems have changed and require reprocessing. This preliminary action allows the system to optimize code when necessary while avoiding unnecessary full-model reprocessing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The incremental code generation process implements periodic updates by checking checksums of subsystems against stored values in the definition database. Only subsystems that have changed since the last code generation are reprocessed, creating a periodic update mechanism that maintains code optimization while significantly reducing development time compared to continuous full-model processing.

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS11126408B2Incremental code generation method
Publication Date: 2021.09.21 DSPACE SE & CO KG
  • US11126408B2 patent drawing
  • US11126408B2 patent drawing
  • US11126408B2 patent drawing

AI summary

Source code is generated from one or a plurality of blocks of a block diagram. The block diagram is hierarchical and includes at least a first subsystem that is configured for an incremental code generation. The block diagram references a definition database which includes a first object. The method for generating the source code includes: opening, by a computer system, the block diagram including the first subsystem in a model editor; generating, by the computer system, source code for the first subsystem, wherein generating the source code for the first subsystem includes determining information about the first subsystem; storing, by the computer system, the information about the first subsystem in the first object; and generating, by the computer system, source code for the block diagram, wherein the first object is read out to influence at least one parameter for generating the source code for the block diagram.