Reversible Object Code Compiler for Model Verification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current auto-coding tools for mathematical models in control systems cannot verify if the executable object code faithfully implements the original model, requiring labor-intensive testing and analysis, especially for safety-critical software.
Innovation Solution
A model-to-object reversible compiler (MORC) system that converts model descriptions into textual representations, uses assembler macros to generate object code, and employs context-free grammars to describe and reverse-engineer the object code back into the original model, enabling direct verification of object code against the model.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual review and analysis are used to verify object code implementation, then verification reliability is improved, but verification time and cost increase significantly
Solution Approach 1:
The patent creates a reversed model from the object code that serves as a copy of the original model structure. This reversed model can be automatically compared with the original model to verify implementation fidelity, replacing manual review while maintaining verification reliability.
Solution Approach 2:
The patent replaces the mechanical process of manual code analysis with an automated reverse compilation system. The reverse compiler automatically reconstructs the model from object code, substituting human effort with automated computational processes.
2Productivity
If source code is compiled directly to object code using traditional compilers, then compilation speed is improved, but the ability to reconstruct the model from object code is lost
Solution Approach 1:
The patent performs preliminary actions during the compilation process by embedding model structure information into the object code through specially designed macros. This preliminary embedding of structural information enables later reconstruction without slowing down the compilation process.
Solution Approach 2:
The patent introduces an intermediary layer of model-specific macros between the source code and object code. These macros serve as carriers that preserve model structure information while maintaining efficient compilation, acting as a mediator that prevents information loss.
3Reliability
If labor-intensive testing and analysis are performed to construct verification evidence, then verification completeness is improved, but productivity decreases
Solution Approach 1:
The patent enables the object code to essentially verify itself by automatically reconstructing the model structure from the compiled code. The reversed model serves as self-generated evidence that can be automatically compared with the original model, eliminating the need for external manual verification efforts.
Solution Approach 2:
The patent creates a feedback loop where the object code is automatically transformed back into a model representation that can be compared with the original model. This feedback mechanism provides automated verification evidence, replacing labor-intensive testing while maintaining completeness.
Data Source
AI summary
A method for verifying a software implementation generated from a model that includes a plurality of model elements is described. The method includes converting a model description into a textual representation of model elements and interconnections between the model elements, defining a series of assembler macros that implement the functionality of the model elements as sequences of assembly instructions for a target processor, compiling the textual representation into an object code image associated with a target processor using the macros, describing the object code image in a context-free grammar, and reproducing the model description from the object code image and the context-free grammar.


