Executable Document for Code Validation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional code generators fail to accurately document and validate assumptions, assertions, and optimizations in generated code, leading to extensive and costly testing when the code is ported to different target systems, as the necessary documentation is often static and inadequate for runtime validation.

Innovation Solution

The development of a method and system that generates an executable document during code creation, which includes diagnostic information that allows for the mapping of assumptions to specific code portions, enabling both static and dynamic validation of the code, thereby reducing the need for exhaustive testing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If code is generated with optimizations based on assumptions for a specific target system, then code efficiency is improved, but validation difficulty increases when porting to different target systems

Engineering Contradiction:
Improvecode generation efficiencyVSAvoidcode validation difficulty
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies preliminary action by generating an executable document that captures assumptions, assertions, and optimizations at the time of code generation. This document is created in advance and stored with the code, enabling future validation without requiring the original engineer or system context. The executable document serves as pre-prepared validation information that can be executed later to verify code correctness on new target systems.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If extensive testing is performed to validate generated code on new target systems, then code reliability is improved, but time consumption increases

Engineering Contradiction:
Improvecode operation reliabilityVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements feedback by creating an executable document that provides automated validation feedback when the generated code is ported to a new target system. The document contains assertions and assumptions that can be executed to automatically verify whether the code operates correctly on the new system, replacing manual extensive testing with automated feedback mechanisms.

Inventive Principle:
Principle #23Feedback

3Loss of information

If static diagnostic information is used to document generated code, then documentation completeness is improved, but runtime validation capability deteriorates

Engineering Contradiction:
Improvedocumentation completenessVSAvoidruntime validation ease
Core Design Contradiction:
Loss of informationVSEase of operation

Solution Approach 1:

The patent applies dynamics by transforming static diagnostic information into an executable document that can be executed at runtime. Instead of merely documenting assumptions and assertions in a static format, the patent creates a dynamic executable document that can be run to automatically validate the generated code, enabling runtime validation while maintaining complete documentation.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8448130B1Auto-generated code validation
Publication Date: 2013.05.21 MATHWORKS INC
  • US8448130B1 patent drawing
  • US8448130B1 patent drawing
  • US8448130B1 patent drawing

AI summary

A technique for generating an executable document that includes information for validating generated code is provided. The technique can include mapping an assumption to a portion of generated code, the portion containing functional code that is related to implementing the assumption, the mapping allowing at least the portion to be validated with respect to the assumption. The technique can include generating the executable document, where the executable document includes the mapping, and where the generated document validates the at least the portion of the generated code, where validating the at least the portion of the generated code validates the generated code.