Code Generation Variable Property Specification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for generating production quality code from block diagrams in electronic control units (ECUs) are cumbersome due to the need for defining numerous variable classes, making it difficult to manage large block diagrams with many variables.

Innovation Solution

A computer-implemented method that uses a technical computing environment with a model editor, data definition tool, and code generator to automatically generate code by retrieving generation settings for block variables, applying modification rules based on filter conditions, and making code changes, thereby simplifying the setting of variable properties and reducing the effort required.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If variable classes are defined individually for each variable in large block diagrams, then code generation precision is improved, but device complexity increases making it hardly manageable

Engineering Contradiction:
Improvecode generation precisionVSAvoidnumber of variable classes
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The patent segments the monolithic variable class definition into hierarchical levels: global variable classes that apply to all variables, and local modification rules that apply to specific subsets. This segmentation allows precise control over code generation while maintaining manageability through organized categories rather than individual definitions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates universal variable class templates that can be applied across multiple variables simultaneously. Instead of defining unique classes for each variable, a single variable class definition can serve as a template for numerous variables, with modification rules providing selective customization where needed.

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

2Manufacturing precision

If generation settings are defined for each variable individually, then code generation accuracy is improved, but ease of operation deteriorates due to cumbersome setting process

Engineering Contradiction:
Improvecode generation accuracyVSAvoideffort to set variable properties
Core Design Contradiction:
Manufacturing precisionVSEase of operation

Solution Approach 1:

The patent applies preliminary action by establishing default variable class definitions and modification rules before the actual code generation process. Users define templates and rules in advance, which are then automatically applied during code generation, eliminating the need to manually configure each variable individually.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system provides self-service functionality where modification rules automatically apply to variables based on predefined filter conditions. The code generator autonomously selects and applies appropriate variable classes and modifications without requiring manual intervention for each variable, reducing operational effort while maintaining accuracy.

Inventive Principle:
Principle #25Self-service

3Productivity

If modification rules are applied to all variables, then productivity is improved through automation, but device complexity increases due to rule management

Engineering Contradiction:
Improvecode generation efficiencyVSAvoidmodification rule management
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements local quality by allowing modification rules to be selectively applied to specific variables or groups of variables based on filter conditions. Instead of uniformly applying rules to all variables, the system intelligently targets only those variables that match predefined criteria, improving productivity while keeping rule management complexity manageable through selective application.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11074049B2Method and system for generating program code modified by rule sets
Publication Date: 2021.07.27 DSPACE DIGITAL SIGNAL PROCESSING & CONTROL ENGINEERING GMBH
  • US11074049B2 patent drawing
  • US11074049B2 patent drawing
  • US11074049B2 patent drawing

AI summary

A computer-implemented method for generating program code based on one or more blocks of a block diagram, at least one block including a block variable. The method comprises opening the block diagram in a model editor, retrieving generation settings for the block variable from a data definition tool, the generation settings comprising a scope of the variable, determining that a modification rule is referenced in the generation settings, and retrieving the referenced modification rule from the data definition tool, wherein a modification rule comprises a filter condition and one or more code changes. A processor generates program code based on the block diagram and the generation settings and applies the referenced modification rule to the block variable in the generated code, which includes verifying that the filter condition is fulfilled for the block variable and applying the code changes to each occurrence of the variable in the code.