Automatic Data Type Reassignment via Intermediate Representation Annotations

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing programming environments face challenges in efficiently reassigning data types of variables between input and output code without manual intervention, leading to processor power and resource inefficiencies, especially when handling different data types like single-precision and double-precision formats.

Innovation Solution

The implementation allows for automatic data type reassignment in an intermediate representation of program code using annotations, enabling conversion from one data type to another without requiring manual generation of new program code, and facilitates iterative testing across different data types.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If manual generation of program code with second data types is required, then data type reassignment accuracy is improved, but productivity deteriorates and loss of time increases

Engineering Contradiction:
Improvedata type reassignment accuracyVSAvoidcode generation efficiency
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The programming environment automatically performs data type reassignment by analyzing the intermediate representation and generating appropriate annotations, eliminating the need for manual user intervention. The system serves itself by detecting data type opportunities and applying conversions autonomously during the coding process.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs data type reassignment in advance by generating annotations in the intermediate representation before final code compilation. This preliminary action allows data type conversions to be prepared and validated before the actual code execution, improving both accuracy and efficiency.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If automatic data type reassignment is implemented, then productivity is improved, but manufacturing precision deteriorates due to potential conversion errors

Engineering Contradiction:
Improvecode generation efficiencyVSAvoiddata type reassignment accuracy
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The system incorporates feedback mechanisms by validating data type conversions through the intermediate representation and generating diagnostic information. The programming environment monitors conversion operations and can identify potential errors, allowing for correction before final code generation.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The intermediate representation serves as an intermediary layer between the original code and the final compiled code. This mediator allows the system to safely perform data type conversions and validations without directly modifying the source code, reducing the risk of errors while maintaining productivity.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Device complexity

If data type reassignment is performed without annotations, then device complexity is reduced, but loss of information occurs regarding data type specifications

Engineering Contradiction:
Improveprogramming environment complexityVSAvoiddata type specification information
Core Design Contradiction:
Device complexityVSLoss of information

Solution Approach 1:

The system adds a new dimension to the code representation by introducing annotations in the intermediate representation. These annotations carry data type specification information as metadata without fundamentally changing the core programming logic, preserving information while maintaining relatively simple system architecture.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

4Reliability

If manual data type conversion is required, then reliability is improved through user control, but loss of time increases and productivity deteriorates

Engineering Contradiction:
Improveuser control over data typesVSAvoidtime for data type reassignment
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The programming environment autonomously performs data type reassignment by detecting opportunities in the intermediate representation and applying appropriate conversions. This self-service capability maintains reliability through systematic analysis while eliminating the time cost of manual user intervention.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10089089B2Data type reassignment
Publication Date: 2018.10.02 MATHWORKS INC
  • US10089089B2 patent drawing
  • US10089089B2 patent drawing
  • US10089089B2 patent drawing

AI summary

A device may receive input code that includes one or more input objects. The input code may be used in connection with generation of output code. The output code, when generated, may include one or more output objects, corresponding to and different than the one or more input objects. The device may receive or determine conversion information identifying a conversion operation to perform to generate the one or more output objects based on the one or more input objects. The conversion information may be received separately from the input code. The device may generate, based on the conversion information and the input code, an intermediate representation. The intermediate representation may include one or more annotations corresponding to the one or more input objects and defining the conversion operation. The device may compile, based on the intermediate representation, the output code. The device may execute or provide the output code.