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

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

Neural network-based context-aware code translation and optimization

Systems and methods for efficiently translating program code from a source language to a target language. Input source code is parsed, using a processor device, into an Intermediate Representation (IR). A structural and semantic model of the source code are established by applying static analysis to the IR, and a program skeleton of the target code is constructed from the IR, including generating context-aware placeholders. The IR is transformed into a Single Static Assignment (SSA) form, and a System Dependency Graph (SDG) is built from the SSA form. The SDG is traversed to order translation tasks, and ordered tasks are translated into the target language using a Large Language Model (LLM). A translated program is generated by integrating translated code segments into a coherent program structure in the target language.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Large language model code translation error detection

Large language model code translation error detection include receiving a code portion of a first programming language, and converting the code portion to a second programming language. A first accuracy of the converting of the code portion to the second programming language is calculated. A difference between the first accuracy and an historical accuracy of a conversion from the first programming language to the second programming language is determined. A potential error in the code portion of the first programming language is indicated based on the difference between the first accuracy and the historical accuracy being greater than a predetermined value is indicated.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Code translation method and device based on large language model

The invention discloses a code translation method and device based on a large language model, and the method comprises the steps: firstly executing an architecture understanding workflow, and forming an architecture design document O1 of a code library; according to the architecture design document O1 of the code library, in combination with the demand document P1, code translation task decomposition workflow is executed, and a task planning list O2 is formed; elements in the task planning list O2 are sequentially extracted, and the code debugging workflow is executed to complete code translation and debugging work. A warehouse-level code architecture understanding workflow, a code translation task planning workflow and a code debugging workflow are constructed based on a large language model (LLM), and the workflows are organically combined to realize automatic translation of warehouse-level codes. According to the method, the limitation of function level translation in the prior art can be broken through, automatic translation of warehouse level codes is realized, the development cost is greatly reduced, and the translation efficiency is improved.
Owner:ZHEJIANG LAB

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

Program-oriented cross-processor architecture execution method and system, equipment and medium

The invention provides a program-oriented cross-processor architecture execution method and system, equipment and a medium, and is applied to the technical field of computers. The method comprises the steps of obtaining a target format file of a target program for a source platform, and extracting dependency library information and a dynamic symbol table of the target program from the target format file; associating each symbol with each dependency library by dereferencing each symbol in the dynamic symbol table to obtain an association relationship of each symbol in each dependency library; based on the dependency relationship between the dependency libraries and the incidence relationship of the symbols in each dependency library, determining the dependency relationship between the code blocks in the target program; and translating each code block in the target program based on a preset instruction mapping relationship and the dependency relationship between the code blocks, and executing a code translation result in the target platform. The problem that under different processor architectures, due to the problems of code version conflicts, code logic disorder, library missing and the like, programs cannot run stably and normally is solved.
Owner:CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +2

Large model code translation method and device fusing code functions and styles

The invention 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 steps that code pairs composed of source codes and target codes are obtained from an online programming platform, the code pairs are processed according to similarity retrieval, fine granularity scoring and difference testing, and a function consistency data set is constructed; performing functional learning training on the large model according to the functional consistency data set and an instruction fine tuning method to obtain a large model subjected to functional learning training; obtaining a source code, generating positive sample translation and negative sample translation of the source code, and constructing a style-oriented data set; and according to the style-oriented data set, style learning training is carried out on the large model subjected to function learning training, and a trained code translation large model is obtained. According to the method, a low-cost and high-efficiency code translation model is developed around a large-scale language model, and the correctness and readability of translated codes are enhanced.
Owner:HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)

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

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

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

Deployment method and system of large model in power grid field

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

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

Method, system, and computer-readable program (neural network-based context-aware code translation and optimization)

To efficiently translate program code from a source language to a target language.SOLUTION: Input source code is parsed, using a processor device, into an Intermediate Representation (IR). A structural and semantic model of the source code are established by applying static analysis to the IR, and a program skeleton of the target code is constructed from the IR, including generating context-aware placeholders. The IR is transformed into a Single Static Assignment (SSA) form, and a System Dependency Graph (SDG) is built from the SSA form. The SDG is traversed to order translation tasks, and the ordered tasks are translated into the target language using a Large Language Model (LLM). A translated program is generated by integrating translated code segments into a coherent program structure in the target language.SELECTED DRAWING: Figure 6
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

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

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

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

Method, device, and computer program (large language model code translation error detection)

To provide a large language model code translation error detection method comprising receiving a code portion of a first programming language, and converting the code portion into a second programming language.SOLUTION: A first accuracy of conversion of a code portion into a second programming language is calculated. A difference between the first accuracy and historical accuracy of conversion from a first programming language into the second programming language is determined. A potential error in the code portion of the first programming language is indicated based on the difference between the first accuracy and the historical accuracy being greater than a predetermined value is indicated.SELECTED DRAWING: Figure 2
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

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

Code translation method, device, equipment, storage medium and program product

The present application relates to a code translation method, apparatus, device, storage medium, and program product. The method includes: obtaining source machine code, where the source machine code includes a plurality of source basic blocks; according to the execution order of the plurality of source basic blocks when the source machine code runs, performing a plurality of target operations on the plurality of source basic blocks until the target operation on the last source basic block in the execution order is completed; wherein, the i-th target operation among the plurality of target operations includes: detecting whether the candidate source basic block corresponding to the i-th target operation has been completed with translation processing; if so, obtaining the target basic block obtained after the translation processing of the candidate source basic block, and running the target basic block; if not, performing translation processing on the candidate source basic block based on the LLVM compiler to obtain the target basic block, and running the target basic block. Using this method can improve the efficiency of machine code translation.
Owner:TSINGHUA UNIVERSITY

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

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