Executable Constraints 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 inadequate runtime validation and increased testing costs when the code is ported to new target systems.

Innovation Solution

A system that generates an executable constraints document during code generation, which includes information about assumptions and optimizations, allowing for dynamic validation and documentation of the code, enabling runtime validation and reducing the need for exhaustive testing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If code generator performs optimization based on assumptions, then code efficiency is improved, but validation difficulty increases when porting to new target systems

Engineering Contradiction:
Improvecode efficiencyVSAvoidvalidation difficulty
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies preliminary action by generating an executable constraints document during the code generation process itself. This document captures all assumptions, assertions, and optimizations made during code generation, making them available for future validation when the code is ported to new target systems, thereby eliminating the need for extensive re-testing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback by creating a traceable link between code features and their source specifications through the executable constraints document. This document provides feedback information about what assumptions were made during optimization, allowing validators to verify whether those assumptions still hold on new target systems without exhaustive testing.

Inventive Principle:
Principle #23Feedback

2Reliability

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

Engineering Contradiction:
Improvecode reliabilityVSAvoidtime consumption
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The executable constraints document is generated in advance during code generation, capturing all validation-relevant information before the code is deployed to new systems. This preliminary documentation enables rapid validation on new target systems by providing a checklist of assumptions to verify, dramatically reducing the time required for validation while maintaining reliability.

Inventive Principle:
Principle #10Preliminary action

3Loss of information

If static diagnostic information is used for code validation, then information availability is improved, but runtime validation capability deteriorates

Engineering Contradiction:
Improveinformation availabilityVSAvoidruntime validation capability
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The patent transforms static diagnostic information into dynamic runtime validation capability by creating an executable constraints document. This document contains executable code that can be run at runtime on new target systems to automatically verify whether assumptions and assertions still hold, converting previously static information into an active validation mechanism.

Inventive Principle:
Principle #15Dynamics

4Device complexity

If code is optimized without documenting assumptions, then code complexity is reduced, but adaptability worsens when porting to different systems

Engineering Contradiction:
Improvecode complexityVSAvoidadaptability
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent applies segmentation by separating the code into two distinct components: the optimized functional code and the executable constraints document. The constraints document segments and captures all assumptions, assertions, and optimizations made during code generation, making this information independently available for validation on new target systems without adding complexity to the functional code itself.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9934004B1Optimization identification
Publication Date: 2018.04.03 MATHWORKS INC
  • US9934004B1 patent drawing
  • US9934004B1 patent drawing
  • US9934004B1 patent drawing

AI summary

A computer readable medium including executable instructions that when executed perform a method for validating an optimization in generated code using an executable constraints document is provided. The medium can include instructions for relating an assumption to the optimization during code generation. The medium can include instructions for generating the executable constraints document during the code generation, the executable constraints document including information about the relating; and the medium can include instructions for executing the constraints document when the validating is performed, the validating including performing an operation based on a validation result produced by the validating, where the operation includes displaying the validation result to a user, storing the validation result, sending the validation result to a destination, or modifying the generated code.