Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

28 results about "Code Translation" patented technology

An automated procedure that uses a specialized set of concept descriptors for conversion of the target concept descriptors into executable elements of other code systems with the equivalent semantics.

Java-to-Cangjie code translation method based on large model and compiling feedback

The invention discloses a Java-to-Cangjie code translation method based on a large model and compilation feedback, and particularly belongs to the technical field of software engineering program language processing, and the method comprises the following steps: step 1, performing structured semantic pre-training by constructing a grammar knowledge base of a target language, and injecting grammar prior knowledge of the target language; step 2, performing semantic enhanced supervision fine tuning training by constructing a high-quality data set containing semantic information, and enhancing semantic alignment and cross-language migration ability of the model; 3, introducing an AST structure perception embedded prompt mechanism in a parallel corpus supervision fine tuning training stage, and guiding the model to perform structure perception translation; and 4, establishing a compiler feedback repair loop, and iteratively correcting output based on error information to form a self-optimized closed-loop system. According to the method, an efficient training path is constructed, dependence on large-scale parallel corpora is effectively reduced, and an extensible and high-reliability technical path is provided for cross-language code translation of low-resource programming languages.
Owner:NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Large language models for creating a multi-lingual, low-resource code translation dataset

One or more unit-test cases are generated from a monolingual code corpus and the generated unit-test cases are filtered to generate a corpus of unit-test cases which have acceptability scores exceeding one or more predefined thresholds. One or more of the code samples of the monolingual code corpus are translated from a source language to a target language using a pretrained Large Language Model and the generated unit-test cases are translated from the source language to the target language. The LLM-translated code samples are validated using the translated unit-test cases and a parallel-data training corpus comprising the LLM-translated code samples that pass the validation is created. The pretrained large language model (LLM) is fine-tuned using the parallel-data training corpus, a given code segment is translated using the fine-tuned large language model (LLM), the translated given code segment is tested and the tested given code segment is deployed.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION +1

A large model code translation method and device fusing code functions and styles

The application provides a large model code translation method and device fusing code functions and styles, and relates to the technical field of natural language processing. The method comprises the following steps: obtaining a code pair composed of a source code and a target code from an online programming platform, processing the code pair according to similarity retrieval, fine-grained scoring and differential testing, and constructing a function consistency dataset; performing function learning training on a large model according to the function consistency dataset and an instruction fine-tuning method to obtain the large model trained through the function learning training; obtaining the source code, generating positive sample translation and negative sample translation of the source code, and constructing a style guide dataset; and performing style learning training on the large model trained through the function learning training according to the style guide dataset to obtain a trained code translation large model. The application develops a low-cost and high-efficiency code translation model around a large-scale language model, and enhances the correctness and readability of translated codes.
Owner:HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)

Heterogeneous code translation method, apparatus, device, and medium

This application provides a method, apparatus, device, and medium for heterogeneous code translation. The method includes: acquiring heterogeneous source code running on a source heterogeneous hardware system; compiling the heterogeneous source code to generate an intermediate representation of the source heterogeneous hardware system; mapping the intermediate representation of the source heterogeneous hardware system to obtain an LLVM intermediate representation; and mapping the LLVM intermediate representation to obtain RISC-V extended code, which is used to run on a target hardware system. This application improves the compatibility between code and target hardware systems.
Owner:BEIJING ZHONGKE JIAHE INTELLIGENT TECHNOLOGY CO LTD

Method and system for machine learning based understanding of data elements in mainframe program code

ActiveUS12579431B2Software engineeringOther databases indexingCode TranslationData understanding
Most of the existing production applications in different domains are still running on. Mainframe applications in production receive data from various resources and process these data within. Understanding the structure of input data and output data is extremely important. A method and system for machine learning based understanding of a plurality of data elements in a mainframe program code has been provided. The method discloses a machine learning model that understands the structure of data elements in a Mainframe program code. The model considered is a graph neural network based architecture model. The disclosed method replicates memory mapping happening in the application program environment. The method understands the structure of the data element and the impact created by each data element on other data elements in the application and interfacing applications. The disclosed solution serves as a building block in problems such as code translation, reverse engineering etc.
Owner:TATA CONSULTANCY SERVICES LTD

Application program running method and device, electronic equipment and storage medium

The invention discloses an application program running method and device, electronic equipment and a storage medium, and the method comprises the steps: translating a code of an application program into a first instruction and / or a second instruction; the first instruction is based on a first instruction set architecture and a data model is the same as a data model of a code of the application program; the second instruction is obtained based on the first instruction set architecture and through binary translation; compiling the code of the first shared library into a third instruction; the first shared library is a shared library of an operating system of the electronic equipment, the third instruction is based on a first instruction set architecture, and a data model is the same as a data model of a code of the application program; and executing the first instruction and / or the second instruction, and executing the third instruction to run the application program. According to the method, the binary translation range of the application program is reduced, the resource occupation of instruction expansion and instruction translation is reduced, and the compatibility of the translated instruction is improved.
Owner:HUAWEI TECH CO LTD

LLM-based code translation and virtual deployment

PendingUS20260044327A1Source to sourceCode TranslationLinguistic model
Methods and systems for code translation include translating source code for an original program, written in a first programming language, to source code for a translated program, written in a second programming language, using a language model. The original program and the translated program are instrumented, using comparison regions of each, to configure the original program and the translated program to generate respective outputs at equivalent points. The original program and the translated program are executed concurrently to generate an original output and a translated output. The language model is updated to correct the translated program based on a discrepancy between the original output and the translated output. 
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Standardizing enterprise software code through LLMs

A computer-implemented method and system standardize code patterns within enterprise software environments. A code modernization system utilizes a Large Language Model (LLM) and a specialized prompt library. The library includes pattern recognition prompts to guide the LLM in identifying specific code patterns within selected software code, potentially using enterprise-specific context. It also includes standardized solution prompts to guide the LLM in generating replacement code conforming to predefined enterprise standards for the identified patterns. The system orchestrates communication, transmitting code and relevant prompts to the LLM and receiving identified patterns and subsequently the generated standardized replacement code. This automated approach facilitates improved code quality, consistency, maintainability, and can support code translation efforts within the enterprise.
Owner:MORGAN STANLEY SERVICES GROUP INC

Translation of vulnerable code to remediated code

A code translation apparatus receives a source code including one or more code vulnerabilities and automatically generates remediated code. The source code provided to the code translation apparatus is converted to a source directional graph. The edges of the source directional graph are augmented with additional edge attributes. The source directional graph thus augmented is further converted into a source graph vector representation. The source graph vector representation is provided to an encoder of a trained code transformer. The remediated code is obtained from the decoder of the trained code transformer.
Owner:ACCENTURE GLOBAL SOLUTIONS LTD

Software Defect Localization Method Based on Context-Aware Code Translation and Feature Fusion

The application discloses a software defect positioning method based on context-aware code translation and feature fusion. The application firstly extracts different types of information retrieval features from defect reports and source files, and uses a linear model containing dense blocks and transition blocks to associate different features of information retrieval; then constructs a shallow semantic information and defect report matching module of the source file and a deep semantic information and defect report matching module of the source file, converts the natural language description of the code of the source file into the deep semantic information of the source file, and uses the deep semantic information and the defect report for semantic matching; finally, a fusion module is constructed to fuse the results of each module to obtain the final positioning result. The application overcomes the limitation of insufficient feature representation of the source file in the current defect positioning technology, enriches the feature expression ability of the source file, helps the model to better understand the source file, and thus improves the accuracy of the final prediction of the defect positioning.
Owner:HANGZHOU DIANZI UNIV

A method, system, and medium for translation of C to Rust code

ActiveCN121209888BCode compilationCode TranslationTheoretical computer science
The application provides a translation method, system and medium from C to Rust code, and the method comprises the following steps: constructing a powerful base model with code translation, grammar understanding and error repair capabilities based on a multi-task reinforcement alignment grammar tuning training method; and performing multi-round correction translation of the base model to the C language project to Rust code by a guided consistency iterative optimization translation framework to ensure the grammar correctness and functional consistency of the translation. Compared with the prior art, the application improves the automation level and final quality of code translation.
Owner:HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN) +1

Simulink code generation method and device based on hardware instruction

PendingCN122018885AReduce execution latencyCode refactoringModel driven codeCode TranslationData stream
The invention provides a Simulink code generation method and device based on a hardware instruction, and relates to the technical field of embedded code generation, the method comprises the following steps: obtaining an initial data flow diagram of a model, and reconstructing the initial data flow diagram based on a preset optimization rule to obtain a reconstructed target data flow diagram; analyzing the topological structure of the reconstructed data flow diagram, determining an execution dependency relationship among the components, and deducing a code translation sequence; respectively generating a code snippet corresponding to each component in the code translation sequence, and integrating the generated code snippets according to a code translation sequence indicated by the code translation sequence to obtain a target code. According to the code generation method and device, in the code generation process, the candidate rules capable of maximizing delay reduction can be selected to recognize the optimizable components, the corresponding hardware specific instructions are comprehensively generated for the optimizable components, and therefore efficient embedded codes capable of being directly deployed are generated.
Owner:TSINGHUA UNIVERSITY +1

Client / server architecture-based binary code translation service system and method for a constrained system

The application discloses a binary code translation service system based on a client / server architecture for a restricted system, which comprises a client and a server; the client and the server have the same architecture; the client refers to a terminal user equipment including a mobile phone and a tablet computer, and supports a dynamic binary translator; the server is deployed on a server, supports a static binary translator and a dynamic binary translator, and can execute multiple request tasks simultaneously; the binary translation is changed into a service provided to a user, and the implementation details of the back end are shielded from the user. The application further discloses a binary code translation service method realized by using the binary code translation service system. The method can execute a complex application program on the restricted system, improves the execution range of the application program, and saves the reconstruction cost of the application program on a new architecture.
Owner:EAST CHINA NORMAL UNIV

Communication method and communication device based on LDPC code

A communication method and a communication device based on LDPC, in the method, a device can perform encoding or decoding based on an LDPC matrix, the LDPC matrix is determined based on an LDPC code translation value matrix, the LDPC code translation value matrix comprises a part of or all areas of a first translation value matrix, the first translation value matrix comprises a first area and a second area, the first region is a matrix obtained by replacing an element 1 in a part of or all regions of an LDPC basis matrix with a corresponding translation value, the translation value corresponding to the element 1 in the basis matrix is determined based on a lifting value Zc, the first region comprises k1 X regions, the second region comprises k2 Y regions, and the k1 X regions are different from the k2 Y regions; the translation value of each region in the k2 Y regions and the translation value of one region in the k1 X regions meet a rule, and the k2 Y regions correspond to different rules. According to the method, the performance of the LDPC code in a high throughput scene can be improved.
Owner:HUAWEI TECH CO LTD

ARM NEON to RISC-V vector extension assembly code translation method and system

PendingCN121658077AProgram controlMemory systemsCode TranslationObject code
The invention discloses an assembly code translation method and system for vector extension from ARM NEON to RISC-V, and belongs to the technical field of computer software cross-architecture translation. The method comprises the following steps of: improving an ARM NEON instruction into an equivalent LLVM IR expression form by utilizing a pre-designed mapping rule; performing general intermediate code optimization and special optimization oriented to RISC-V vector extension characteristics on the LLVM IR expression form; and reducing the optimized LLVM IR to a target code of the RISC-V vector extension platform. According to the method, the mapping rule beneficial to LLVM compiler instruction generation is constructed while specific optimization is performed for the RISC-V vector extension architecture, so that the instruction coverage rate is increased.
Owner:INST OF SOFTWARE - CHINESE ACAD OF SCI

Cross-language code translation method based on external knowledge retrieval and self-adaptive template generation

The invention discloses a cross-language code translation method based on external knowledge retrieval and self-adaptive template generation, and relates to the technical field of program language processing. The invention designs a cross-language code translation framework composed of a cross-language code retriever, a template extractor and a code generator. When a source code is input for translation, firstly, k target language similar codes are retrieved through a cross-language code retriever, then, an optimal generation template is extracted through a template extractor, and finally, the source code and the optimal generation template are input into a generation model together for translation. A template extractor extracts important information related to the code translation process from k target language similar codes, so that a generation model is prevented from being interfered by irrelevant information, and the code translation accuracy is improved; and a reference example of a target language code is provided for the model, and template constraints are also provided, so that the controllability and interpretability of the model are improved while the accuracy is improved.
Owner:NORTHEASTERN UNIV CHINA

Reflection augmented code translation

PendingUS20260056724A1Code compilationSource to sourceCode TranslationLinguistic model
Methods and systems for code translation include translating original data structures from original code in a first programming language to translated data structures in a second programming language using a language model. The original code is divided into a set of functions, each of the set being associated with any corresponding dependencies from the data structures. Each of the set of functions is translated into translated functions in the second programming language, along with the corresponding dependencies, using the language model. An error in the translated functions is corrected assuming correctness of the translated data structures.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Heterogeneous programming language translation method and device based on large model and medium

The invention relates to a heterogeneous programming language translation method and device based on a large model and a medium, and the method comprises the steps: carrying out the preprocessing and fragmentation of an input programming language, and adding a label for each piece of fragmented data; using a preset structured template to generate an initial cue word based on the fragmented data, extracting related knowledge from a pre-established vector database according to the fragmented data and a tag thereof, and adding the related knowledge into the cue word; inputting the cue word into a pre-trained translation model to generate a preliminary translation result; calling a pre-trained verification model, scoring the preliminary translation result, if the score is higher than a preset threshold value, entering the next step, otherwise, generating a repair prompt based on the verification model, adding the repair prompt into a prompt word, and re-inputting the prompt word for re-translation; and integrating the preliminary translation result, recovering the function call relationship, and outputting a final translation result. Compared with the prior art, the method has the advantages that the accuracy, the performability and the service adaptability of code translation are remarkably improved.
Owner:中国太平洋人寿保险股份有限公司

Validation of code translation using intermediate representation

In some implementations, a code translation validation platform may convert source code, associated with a source application, to an intermediate representation that supports a source programing language and a target programing language. The code translation validation platform may identify metamorphic relations in the intermediate representation based on program constructs and program interactions. The code translation validation platform may generate test cases based on the identified metamorphic relations. The code translation validation platform may perform symbolic execution of the intermediate representation to generated test cases. The code translation validation platform may apply the generated test cases to the source programming language and to the target programming language.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Project-level C-to-Rust code automatic translation method based on pointer semantic knowledge graph

The invention belongs to the technical field of software engineering, and particularly relates to a method for automatically translating project-level C to Rust codes based on a pointer semantic knowledge graph. The method comprises the following steps: constructing a knowledge mode of a project-level code pointer semantic knowledge graph; automatically extracting knowledge based on program analysis; and code translation and error repair based on the pointer semantic knowledge graph. According to the method, the conversion problem caused by lack of global pointer knowledge is solved, and the maintainability of converted codes is improved; through combination of a dependency relationship in a project range and pointer semantic explicit, stronger guidance constraint is provided for a large language model, and project-level code conversion capability and code translation accuracy of the large language model are enhanced. According to the method, the manual intervention requirement of conversion from the project-level C to the Rust code is remarkably reduced, the automation level of cross-language code translation is improved, and solid technical support is provided for legacy system migration, software reconstruction and intelligent development.
Owner:FUDAN UNIVERSITY

TECHNIQUES FOR VERIFYING TRANSLATED PROGRAM CODE

A general aspect of the present disclosure relates to a method for verifying translated program code. The method comprises accessing original program code written in a first programming language and accessing translated program code written in a second programming language. The translated program code is compiled from the original program code using a machine learning system. The method further comprises accessing one or more adaptation functions. Each of the one or more adaptation functions is designed to consider one or more effects on the behavior of program code written in the first programming language and in the second programming language, caused by structural differences between the first and second programming languages, in a comparison of the behavior of the program codes.The procedure also includes performing a comparison of the behavior of the original program code and the translated program code using one or more adaptation functions to check for equivalence between the original program code and the translated program code.
Owner:ROBERT BOSCH GMBH

Automatic validation of computer-generated code method and apparatus

Techniques for automatically generating a natural language (NL) translation of computer code are disclosed. In one embodiment, a computer-implemented method is disclosed comprising receiving, from a user, a code translation request in connection with code generated by a code generation system based on natural language (NL) input, analyzing the computer-generated code and generating a natural language (NL) translation of the computer-generated code based on the analysis, generating a graphical user interface (GUI) comprising the NL input, the NL translation of the computer-generated code and GUI control elements for receiving input from the user in connection with at least one of the NL input and the NL translation; causing the GUI to be displayed at a client device of the user, and receiving input from the user via at least one GUI control element and causing performance of at least one operation in response to the input.
Owner:YAHOO ASSETS LLC

Method and system for translation of codes using an ai model

PCT designated stageWO2026042853A1Code compilationSource to sourceCode TranslationTheoretical computer science
A computer-implemented method for translating a first code written in a first language into a second code written in a second language using an AI model, the method comprising the steps of: preprocessing the first code; segmenting the preprocessed first code into a plurality of first units, wherein each of the plurality of first units is smaller than a unit size determined based on a context window of the AI model; and generating first prompts, wherein each of the first prompts is for translating each of the plurality of first units into the second language and includes metadata regarding context of translation from the first code to the second code; and translating the plurality of first units into a plurality of second units of the second code by providing each of the first prompts to the AI model, wherein each of the first prompts is for translating each of the plurality of first units into the second language and includes metadata regarding context of translation from the first code to the second code.
Owner:SHIRAISHI MOMOKO

Software technology stack renovation method, system and equipment based on artificial intelligence and storage medium

The invention provides a software technology stack renovation method, system and device based on artificial intelligence and a storage medium. The method comprises the following steps: acquiring an original code based on an original technology stack; analyzing the original code to obtain a code association relationship and a plurality of original code subsets; inputting the code association relationship, the original code subset and a predefined code translation rule into a code conversion model to obtain a target code based on a target technology stack; wherein the code conversion model comprises a first pre-training large model. The software technology stack renovation method realizes low-cost, high-automation, short-period, high-quality and large-scale software technology stack renovation.
Owner:ISOFTSTONE INFORMATION TECHNOLOGY (GROUP) CO LTD

Binary code translation method, electronic device, storage medium and software product

PendingCN122285018ACode TranslationCode segment
This application provides a binary code translation method, comprising: disassembling first binary code based on a first instruction set architecture to obtain disassembled code; recovering symbols in the disassembled code to obtain first assembly code based on the first instruction set architecture; decomposing the first assembly code into multiple assembly code segments; translating each of the multiple assembly code segments to obtain an assembly code segment based on a second instruction set architecture; concatenating the translated assembly code segments based on the second instruction set architecture to obtain second assembly code based on the second instruction set architecture; and assembling the second assembly code to obtain second binary code based on the second instruction set architecture, wherein the first instruction set architecture is different from the second instruction set architecture. This application also provides an electronic device, a computer-readable storage medium, and a computer program product.
Owner:THE HONG KONG UNIV OF SCI & TECH

Code vulnerability detection method and system based on code translation large model

The invention belongs to the technical field of code vulnerability detection, and particularly relates to a code vulnerability detection method and system based on a code translation large model. According to the method, on the basis of an initial programming language type and a target programming language type, forward translation and reverse translation processing is carried out on a to-be-translated code through a plurality of translation large models; according to the method and the device, the target similarity between each code to be translated and the corresponding reverse output code is obtained, and the similarity vector sequence is constructed based on the target similarity between each code to be translated and the corresponding reverse output code, so that the vulnerability occurrence probability of the similarity vector sequence can be obtained through the code vulnerability detection model, and whether multiple types of codes to be translated have vulnerabilities or not can be accurately judged. The method has the advantages of multiple detectable programming language types, high detection efficiency and high detection accuracy.
Owner:HUAZHONG UNIV OF SCI & TECH

A warehouse-level code translation intelligent agent method and device based on a code graph structure

PendingCN122331909ACode TranslationJava
This invention discloses a repository-level code translation agent method and apparatus based on a code graph structure, relating to the field of multi-agent technology. The method includes: constructing a repository-level code translation agent framework comprising a repository function understanding agent, a code translation agent, and a code inspection and repair agent; inputting the source Python code repository into the repository function understanding agent for functional analysis, establishing a correspondence between source Python code components and target Java language code files; determining the translation order of the target Java language code files based on the correspondence using the code translation agent; translating each target Java language code file sequentially to obtain translation results, constructing a target Java language repository; inputting the target Java language repository into the code inspection and repair agent, performing repairs using pre-configured processing tools, and outputting a complete and runnable target Java language repository. Using this invention can improve the completeness and consistency of repository-level code translation results.
Owner:HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)