Graphical Model Code Generation Verification via M-Code
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional systems lack a convenient method to verify that automatically generated code from block diagram models will execute as intended on a target platform, aligning with the design implemented in the graphical model.
Innovation Solution
A system and method for automatically generating an object-oriented, textual program from a graphical model, which involves identifying target block types, mapping blocks and parameters to system objects and properties, and generating executable textual strings to create a verification model for simulating and comparing results with the graphical model.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If automatic code generation from block diagram models is used, then productivity is improved, but verification capability deteriorates
Solution Approach 1:
The patent creates a textual copy (M-code) that replicates the functionality of the graphical model blocks. This textual representation serves as a verifiable counterpart to the automatically generated code, allowing independent verification without manual code writing. The copying principle enables the system to maintain both the efficiency of automatic generation and the reliability of verification.
Solution Approach 2:
The patent introduces an intermediary textual representation layer between the graphical model and the target platform code. This intermediary M-code acts as a mediator that can be independently verified and then used to generate the final platform-specific code, thus ensuring verification capability is not lost in the automatic code generation process.
2Measurement precision
If manual code writing is required for verification, then measurement precision is improved, but loss of time increases
Solution Approach 1:
The system performs self-verification by automatically generating M-code from the same graphical model that defines the target behavior. The verification process uses the model's own structure and parameters to create the expected code representation, eliminating the need for external manual verification while maintaining high accuracy.
Solution Approach 2:
The patent performs preliminary generation of the expected textual code representation during the code generation process itself. By preparing the M-code verification counterpart in advance alongside the target code, the system eliminates the need for separate manual verification time while ensuring accurate comparison.
3Ease of operation
If graphical models are used for design, then ease of operation is improved, but device complexity increases
Solution Approach 1:
The patent replaces manual mechanical processes (hand-writing verification code, manual platform communication) with an automated information processing system. The graphical modeling environment automatically generates both the target code and the verification M-code, substituting complex manual operations with automated textual generation and comparison processes.
Data Source
AI summary
A system and method automatically generates graphical model from an object-oriented, textual program, and verifies the performance of the graphical model to the textual program. The textual program may include a plurality of system objects having properties. The objects may be mapped to graphical model blocks that have parameters. The properties of the system objects may be mapped to the parameters of the graphical model blocks.


