Neural Decompiler for Source Code Translation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Computer software programming faces inefficiencies when translating code from one higher-level programming language to another, due to lack of expertise in the target language, leading to excessive client device resource usage and prolonged activity periods.
Innovation Solution
The implementation of a machine learning model, such as a neural network, for automatic translation of source code from a base programming language to a target programming language, trained on human-created code to generate natural and comprehensible target code snippets, reducing the need for human intervention and optimizing client device resource usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual code translation is performed by programmers, then code translation can be completed with human understanding and control, but programmer time and client device resource usage increase significantly
Solution Approach 1:
The patent replaces the mechanical system of manual code translation by programmers with an automated neural network-based translation system. The neural network model learns code translation patterns from training data and automatically translates code between programming languages, substituting human manual effort with an automated computational system that maintains translation quality while dramatically reducing time consumption.
Solution Approach 2:
The patent introduces a lower-level compiled representation as an intermediary in the code translation process. Instead of direct translation between high-level programming languages, the system compiles the base language code to a lower-level representation first, then translates from that representation to the target language. This intermediary step enables more accurate and reliable translation by providing a standardized intermediate form that captures the essential computational logic.
2Adaptability or versatility
If programmers use a programming language they are less familiar with, then code translation or new development can be performed, but productivity and efficiency decrease
Solution Approach 1:
The patent replaces the need for programmers to manually adapt to unfamiliar programming languages with an automated neural network translation system. The system handles the language adaptation mechanically through learned translation patterns, allowing programmers to work in their familiar languages while the system manages cross-language translation automatically, thereby maintaining both versatility and high productivity.
3Reliability
If code translation requires human review and editing, then translation quality can be maintained, but the process becomes inefficient and resource-intensive
Solution Approach 1:
The patent replaces the manual review and editing process with automated quality assurance mechanisms. The neural network model is trained to produce high-quality translations directly, and the system includes automated validation that checks translated code for correctness by comparing execution results between the original and translated code. This automated approach maintains translation quality while eliminating the time-consuming manual review process.
4Ease of operation
If a neural network model is trained on human-created code, then generated code becomes more natural and comprehensible, but training data requirements and processing time increase
Solution Approach 1:
The patent performs preliminary action by pre-training the neural network model on large datasets of human-created code before deployment. This training phase, while time-consuming, is performed once during system setup rather than during each translation task. The pre-trained model then efficiently performs translations with high comprehensibility, amortizing the initial training time across numerous translation operations and making the system highly efficient in production use.
Data Source
AI summary
Training and/or utilization of a neural decompiler that can be used to generate, from a lower-level compiled representation, a target source code snippet in a target programming language. In some implementations, the lower-level compiled representation is generated by compiling a base source code snippet that is in a base programming language, thereby enabling translation of the base programming language (e.g., C++) to a target programming language (e.g., Python). In some of those implementations, output(s) from the neural decompiler indicate canonical representation(s) of variables. Technique(s) can be used to match those canonical representation(s) to variable(s) of the base source code snippet. In some implementations, multiple candidate target source code snippets are generated using the neural decompiler, and a subset (e.g., one) is selected based on evaluation(s).


