Bidirectional Code Translation for Semantic Edit Preservation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional techniques for generating child code from parent code in computer languages like Razor limit edits to a one-way mapping, restricting the capabilities of parent code and making it vulnerable to breaking if edit methods change.

Innovation Solution

The approach translates edits from child languages to parent languages while maintaining semantic meaning, allowing for automatic generation of updated child code by updating the parent code to include changes based on the semantic meaning of the edits, thereby expanding edit capabilities and resilience to changes in edit methods.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a one-way mapping from parent code to child code is used, then the parent code structure is maintained and simplified, but the capabilities of parent code lag behind child code and the parent code becomes vulnerable to breaking if edit methods change

Engineering Contradiction:
Improvecode mapping structureVSAvoidedit capability
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent inverts the traditional one-way mapping approach by enabling bidirectional translation. Instead of only mapping from parent code to child code, the system now translates edits from child code back to parent code, allowing the parent code to capture and maintain edits made in the child code through semantic understanding and automated translation.

Inventive Principle:
Principle #13The other way round (Inversion)

2Reliability

If edits are limited to those enumerated in a list presented to the user, then the parent code structure remains stable, but the parent code capabilities are restricted and cannot keep pace with child code capabilities

Engineering Contradiction:
Improvecode structure stabilityVSAvoidedit type support
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent introduces dynamic adaptability by enabling the system to understand and translate arbitrary edits made in child code through semantic analysis. The parent code can now dynamically incorporate new edit types from child code without requiring pre-enumeration, while maintaining structural stability through automated translation and semantic preservation.

Inventive Principle:
Principle #15Dynamics

3Ease of manufacture

If conventional one-way mapping techniques are used, then the implementation is simple and direct, but the parent code is vulnerable to breaking if the way existing known edits work changes

Engineering Contradiction:
Improveimplementation simplicityVSAvoidcode resilience to changes
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent implements feedback by translating edits from child code back to parent code. This creates a closed-loop system where changes in child code are automatically reflected in parent code through semantic understanding and translation, ensuring the parent code remains synchronized and resilient to changes in edit methods without requiring complex manual updates.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11934810B2Translating an edit from a child computer language to a parent computer language while maintaining a semantic meaning of the edit
Publication Date: 2024.03.19 MICROSOFT TECHNOLOGY LICENSING LLC
  • US11934810B2 patent drawing
  • US11934810B2 patent drawing
  • US11934810B2 patent drawing

AI summary

Techniques are described herein that are capable of translating an edit from a child computer language to a parent computer language while maintaining a semantic meaning of the edit. Parent code that is based on the parent computer language is compiled, which automatically triggers generation of child code that is mapped to the parent code and that is based on the child computer language. A determination is made that the edit, which is not mapped to the parent code, is implemented in the child code to provide edited child code. The parent code is updated to include a change that is based on the semantic meaning of the edit. The updated parent code is configured such that compilation of the updated parent code automatically triggers generation of an updated version of the child code that includes the semantic meaning of the edit.