Syntactic Programming Language Translation via Target Semantics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing programming language translation methods often result in unpredictable and inefficient translations due to semantic preservation, leading to unexpected conversions and complex debug processes, as they maintain source language semantics, which can cause performance issues and make it difficult for programmers to tweak results.

Innovation Solution

A syntactic translation system that uses a map to translate programming language elements from a source language to a target language, allowing at least a portion of an expression to be translated one-to-one, with semantics defined by the target language, providing predictable and efficient translations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If semantic translation is used to preserve source language semantics, then translation accuracy is improved, but translation predictability and performance deteriorate due to unexpected conversions and complex syntax transformations

Engineering Contradiction:
Improvetranslation accuracyVSAvoidtranslation predictability
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

Instead of translating source language semantics to target language semantics (traditional approach), the patent inverts the approach by having the target language syntax define the semantics. The query translator uses target language query templates where the target language's semantic rules automatically apply, eliminating the need for complex source language semantic preservation while achieving predictable, efficient translations.

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

Solution Approach 2:

The patent extracts and removes the complex semantic translation layer that causes unpredictable conversions. By using direct syntactic mapping between source and target languages without attempting to preserve source language semantics, the system eliminates the source of translation unpredictability while maintaining necessary translation functionality through target language template definitions.

Inventive Principle:
Principle #2Taking out (Extraction)

2Loss of information

If semantic preservation is attempted during translation, then meaning accuracy is improved, but translation complexity and debugging difficulty increase

Engineering Contradiction:
Improvesemantic meaning preservationVSAvoidtranslation process complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent removes the complex semantic analysis and preservation mechanisms from the translation process. By relying on target language query templates that inherently encode the correct semantics, the system eliminates the need for complex semantic matching, mapping, and preservation logic, thereby reducing translation process complexity while maintaining meaning accuracy through target language semantics.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent uses target language query templates as predefined patterns that are directly applied to source language queries. These templates copy the target language's syntactic and semantic structure, ensuring that translations automatically conform to target language semantics without requiring complex semantic transformation logic.

Inventive Principle:
Principle #26Copying

3Productivity

If one-to-one syntactic translation is used, then translation efficiency and predictability are improved, but semantic extensibility may be limited

Engineering Contradiction:
Improvetranslation efficiencyVSAvoidsemantic extensibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent makes the target language query templates universal and configurable, allowing them to serve multiple purposes: defining translation rules, encoding semantic logic, and adapting to different source and target language pairs. This multi-functionality enables the simple one-to-one syntactic mapping approach to maintain both efficiency and semantic extensibility through template configuration rather than complex translation logic.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS7779396B2Syntactic program language translation
Publication Date: 2010.08.17 MICROSOFT TECHNOLOGY LICENSING LLC
  • US7779396B2 patent drawing
  • US7779396B2 patent drawing
  • US7779396B2 patent drawing

AI summary

The subject disclosure pertains to computer programming languages and translation or conversion thereof. Rather than a complicated semantics preserving translation or conversion from a first source language to a second target language, the conversion can be one of syntax. The conversion can be accomplished, for example, via employment of a map that defines the relation between the syntax of the first language and the second language. The semantics of at least a part of the first language can be defined by the second target language. Thus, the first language can be open-ended and/or semantically extensible based on the second language.