Source Code Translation via Pre-Translation Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for translating programming code across different platforms face challenges in managing non-common features, leading to incomplete or non-functional target code due to feature conflicts and the need for manual intervention, making the process time-consuming and non-scalable.

Innovation Solution

A method and system that perform pre-translation analysis to identify unsupported code snippets, generate reports for modifications, and modify the source code to generate intermediate code supported by the target language, using a processor and database to store code snippets and analyze features, facilitating automatic translation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If automatic translation is performed by removing non-common features, then translation speed is improved, but the target code becomes non-functional

Engineering Contradiction:
Improvetranslation speedVSAvoidtarget code functionality
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary identification of non-common features before translation, stores them in a database, and prepares replacement code snippets in advance. This allows the translation process to proceed automatically while ensuring functionality is preserved through pre-prepared solutions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system introduces an intermediary database that stores non-common features and their corresponding replacement code snippets. This intermediary structure enables automatic translation by mediating between the source code and target code, replacing non-common features with equivalent functionality in the target language.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Manufacturing precision

If manual intervention is required to understand and modify source code, then translation accuracy is improved, but translation time increases exponentially

Engineering Contradiction:
Improvetranslation accuracyVSAvoidtranslation time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The system enables self-service translation by automatically identifying non-common features, querying the database for replacements, and performing substitutions without requiring programmer intervention. This maintains translation accuracy through systematic analysis while eliminating manual modification time.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system replaces the mechanical process of manual code analysis and modification with an automated computational system. The processor analyzes source code, queries the database, and performs translations automatically, substituting human manual work with machine-based operations.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Stability of the object's composition

If the same test harness is used for both source and target code, then testing consistency is improved, but test compatibility deteriorates

Engineering Contradiction:
Improvetesting consistencyVSAvoidtest compatibility
Core Design Contradiction:
Stability of the object's compositionVSAdaptability or versatility

Solution Approach 1:

The system applies local quality by making the test harness adaptable to different code languages while maintaining consistent testing objectives. The test harness can be configured with language-specific parameters and syntax rules, allowing it to test both source and target code effectively without requiring complete redesign for each language.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS8533691B2Managing non-common features for program code translation
Publication Date: 2013.09.10 XENOGENIC DEVELOPMENT LIMITED LIABILITY COMPANY
  • US8533691B2 patent drawing
  • US8533691B2 patent drawing
  • US8533691B2 patent drawing

AI summary

Embodiments of the invention may involve managing translation of a source code of a computer application in a first programming language to a target code in a second programming language, at a processing device. A pre-translation analysis of the source code may be performed to determine a part of the source code that is not supported in the second programming language. Thereafter, a report may be generated for indicating modifications to the determined part of the source code. Subsequently, the determined part of the source code may be modified based on the report to generate an intermediate code.