Hierarchical Assembly Translation for Legacy Code Migration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing programmers lack expertise in assembly language, leading to inefficient and error-prone manual translation of legacy applications from assembly to higher-level programming languages, which results in prolonged usage of client device resources.
Innovation Solution
A three-level hierarchical machine learning model is used to generate line-by-line, block-level, and file-level natural language descriptions from assembly code, automatically translating it to higher-level programming languages like Java, C++, or Python, without human intervention.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual translation of assembly code to higher-level programming languages is performed by existing programmers, then the translation can be completed, but the process is highly inefficient and error-prone due to lack of assembly language expertise
Solution Approach 1:
The patent replaces the manual mechanical process of code translation with an automated machine learning-based system. The hierarchical translation model automatically translates assembly code to higher-level programming languages, eliminating the need for programmers to manually perform the translation task, thereby resolving the contradiction between translation accuracy and efficiency.
2Reliability
If new programmers familiar with assembly are brought in for manual translation, then translation expertise is improved, but the duration that client device resources need to be active is prolonged
Solution Approach 1:
The patent replaces the manual translation process performed by human programmers with an automated machine learning system. This substitution eliminates the need for extended human involvement while maintaining high translation quality, thereby reducing the duration that client device resources need to remain active.
Solution Approach 2:
The patent introduces a hierarchical translation model as an intermediary between assembly code and higher-level programming languages. This intermediary system performs the translation automatically without requiring human programmers to be actively engaged, thus reducing resource active duration while maintaining translation expertise.
3Adaptability or versatility
If assembly code is manually translated to higher-level programming languages, then code migration can be achieved, but client device resources are consumed for prolonged periods
Solution Approach 1:
The patent replaces manual code migration processes with an automated hierarchical translation model. This substitution enables code migration capability while significantly reducing device resource consumption by eliminating the need for human programmers to manually analyze and translate assembly code over extended periods.
4Device complexity
If a single machine learning model is used to process large assembly files, then the translation process is simplified, but the model cannot handle files that are too large to embed
Solution Approach 1:
The patent divides the translation process into hierarchical segments: a first model processes individual lines of assembly code, a second model processes code blocks, and a third model generates the final translated output. This segmentation allows the system to handle large files by processing them in manageable chunks rather than requiring a single model to handle the entire file at once.
Solution Approach 2:
The patent introduces a hierarchical dimension to the translation process, organizing the model architecture into multiple levels (line-level, block-level, file-level). This dimensional organization allows the system to handle large assembly files by processing them through successive hierarchical stages, overcoming the limitation of single-model capacity.
Data Source
AI summary
Techniques are described herein for translating between low-level languages and high-level languages. A method includes: receiving first source code in assembly language, the first source code including a plurality of code blocks, and each code block of the plurality of code blocks including a plurality of lines of assembly code; for each of the plurality of code blocks: for each of the plurality of lines of assembly code in the code block, processing the line of assembly code to generate a natural language description of the line of assembly code; and processing the code block and the natural language descriptions of the plurality of lines of assembly code in the code block to generate a natural language description of the code block; and processing the natural language descriptions of the plurality of code blocks to generate a natural language description of the first source code.


