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

39 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.

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

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

Warehouse level code translation method and device based on large model

The invention discloses a warehouse level code translation method and device based on a large model, and is used for solving the technical problem that the existing warehouse level code translation method only relates to a function translation pair, so that a code translation task in a warehouse level context is poor in performance. The method comprises the steps that a tree-shaped analyzer is utilized, a large model is preset, and a target language code sample self-evolution knowledge base, a dependent use example self-evolution knowledge base and a successful translation function pair self-evolution knowledge base are constructed according to an obtained open source project, a to-be-translated warehouse and a plurality of historical successful translation function pairs; and outputting the target triple translation knowledge corresponding to each to-be-translated function, and outputting a warehouse level code translation result in combination with the obtained implementation code corresponding to each to-be-translated function and the generated warehouse architecture.
Owner:SUN YAT SEN UNIV

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

Systems, methods, and articles for code translation and program synthesis based on large language models

PendingUS20250342017A1Model driven codeSource to sourceCode generationCode Translation
Technologies for code-to-code translation and program synthesis are disclosed. An example method includes analyzing input source code to generate dependency graphs corresponding to the input source code, creating a set of code generation tasks for generating target code based on the dependency graphs, and feeding the set of code generation tasks to a trained large language model (LLM) to generate one or more parts of the target code.
Owner:CODE METAL

Deployment method and system of large model in power grid field

PendingCN120950089ABiological modelsSoftware deploymentCode TranslationPower grid
The invention belongs to the technical field of large model deployment in the power grid field, and provides a large model deployment method and system in the power grid field. The deployment method of the large model in the power grid field comprises the following steps of: based on single parameter memory overhead, single gradient memory overhead, single optimizer state memory overhead, model parameter quantity and data parallelism; according to the relationship between parameters such as the number of working nodes in model parallelism and pipeline parallelism and the memory overhead in the parallel decomposition strategy of calculation and storage collaboration, the parallel decomposition strategy of calculation and storage collaboration with the minimum memory overhead is calculated, and the parallel decomposition strategy of the large model in the power grid field is determined; on the basis of a parallel decomposition strategy of a large model in the power grid field, hardware resource allocation is automatically performed by using hyper-parameter input hardware equipment information and a deep learning framework, then deep learning model structure setting and parallel decomposition scheme configuration are performed by using guidance statements, automatic code translation is completed, and automatic conversion and training of a deep learning model are realized.
Owner:SHANDONG LUNENG SOFTWARE TECH

C-to-Rust code translation method and system and medium

ActiveCN121209888ACode compilationCode TranslationTheoretical computer science
The invention provides a translation method and system from a C code to a Rust code and a medium. The method comprises the following steps that a powerful basic model with code translation, grammar understanding and error repairing capacity at the same time is built based on a multi-task strengthening alignment grammar tuning training method; and performing multi-round correction on the basic model by depending on a guided consistency iterative optimization translation framework to ensure the correctness and functional consistency of translation grammar from the C language project to the Rust code. Compared with the prior art, the automation level and the final quality of code translation are improved.
Owner:HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN) +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)

Macro script conversion system and method, electronic device, medium, and program product

PCT designated stageWO2025231664A1Source to sourceCode generationCode Translation
Embodiments of this application mainly relate to the field of industrial digitization, and in particular, to a macro script conversion system and method, an electronic device, a medium, and a program product. A receiving module is configured to receive a first macro script, a name of source software, and a name of target software inputted by a user, where the first macro script includes a macro script of the source software. A code translation agent module is configured to convert the first macro script into corresponding natural language and pseudocode. A code generation agent module is configured to create a macro script corresponding to the name of the target software based on the natural language and the pseudocode.
Owner:SIEMENS AG +1

Generation method and device of malicious code semantic analysis model and storage medium

The invention provides a malicious code semantic analysis model generation method and device and a storage medium, and belongs to the field of network security, and the method comprises the steps: translating an original assembly code into a C code based on a semantic mapping process function in a large language model, and reversely compiling the C code into a new assembly code based on a GCC compiler; performing iterative solution on the large language model based on the similarity between the original assembly code and the new assembly code to obtain a semantic consistency evaluation model; preprocessing data obtained after preprocessing assembly codes to be trained are input into the semantic consistency evaluation model, and text semantic information is obtained; and based on the text semantic information, constructing a training set, and inputting the training set into a hybrid model formed by sequentially connecting a BERT model, an LSTM model, a maximum pooling layer and a linear layer for training to obtain a malicious code semantic analysis model. According to the invention, the problems of low identification efficiency and high false alarm rate of a malicious code identification method can be solved.
Owner:HUBEI UNIV OF TECH

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

Methods, devices and storage media for generating malicious code semantic analysis models

This invention provides a method, apparatus, and storage medium for generating a malicious code semantic analysis model, belonging to the field of network security. The method includes: translating original assembly code into C code based on a semantic mapping process function in a large language model; reverse-compiling the C code into new assembly code using a GCC compiler; iteratively solving the large language model based on the similarity between the original and new assembly code to obtain a semantic consistency evaluation model; inputting preprocessed data obtained after preprocessing the assembly code to be trained into the semantic consistency evaluation model to obtain textual semantic information; constructing a training set based on the textual semantic information, and inputting the training set into a hybrid model consisting of a BERT model, an LSTM model, a max-pooling layer, and a linear layer connected sequentially for training to obtain the malicious code semantic analysis model. This invention can solve the problems of low identification efficiency and high false positive rate in malicious code identification methods.
Owner:HUBEI UNIV OF TECH

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

Using a large language model to translate expandable code in a source programming language to a target programming language

PendingUS20260252330A1Code TranslationSoftware engineering
Provided are a computer implemented method, system and computer program product for using a large language model to translate expandable code in a source programming language to a target programming language. Expandable code in the source program in the source programing language is processed. A symbolic variable for a variable in the expandable code is generated into a code template providing a symbolic expression of the expandable code. A source-to-target language translator, for translating source programming language statements to target programming language statements, translates a definition statement in the target programming language defining the symbolic variable. A large language model, that generates code in the target programming language from symbolic statements, translates the symbolic expression in the code template to target programming language statements implementing the expandable code in the target program.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION