Check patentability & draft patents in minutes with Patsnap Eureka AI!

Cross-platform code conversion method and equipment

A code conversion, cross-platform technology, applied in the direction of program code conversion, source to source, etc., can solve the problem that the accuracy cannot be guaranteed

Pending Publication Date: 2021-10-22
HUAWEI TECH CO LTD
View PDF0 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Such a migration method takes up a lot of human resources, and even if there are tools that can help scan source files to locate code blocks that need to be changed, the accuracy cannot be guaranteed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Cross-platform code conversion method and equipment
  • Cross-platform code conversion method and equipment
  • Cross-platform code conversion method and equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0055] The technical solution in this application will be described below with reference to the accompanying drawings.

[0056] The embodiments of the present application are mainly applied in the technical field of computer software. Such as figure 1 As shown, it shows the flow of software source code from writing to execution. The top layer is the algorithm and application, the soul of the code, and the top-level computing principle of the entire code. High-level programming language refers to the code language written by programmers, including C language, C++, etc., and the source code programs of various software are also written in high-level programming language. A high-level programming language is converted into assembly language after being assembled by a compiler. Then the assembly language is converted into different machine codes according to different instruction set architectures. The instruction set can be understood as a bridge between software and hardware...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a cross-platform code conversion method and cross-platform code conversion equipment, which can be applied to the technical field of software migration (namely software transplantation) and the like. The method comprises the following steps: firstly, acquiring a first source code which can be operated on a source platform, and performing syntactic analysis on the first source code to generate a syntax tree corresponding to the first source code; identifying a to-be-converted grammar block in the grammar tree according to a grammar rule provided by the rule base; then, according to a conversion rule provided by the rule base, converting the at least one grammar block to be converted to obtain at least one converted grammar block; and finally, generating a second source code which can run on the target platform according to the obtained converted grammar block. According to the method, the grammar rule and the conversion rule provided by the rule base are used for automatically recognizing the grammar block needing to be modified in the source code and converting the grammar block, the code conversion speed and accuracy are improved, and then efficient software migration can be guaranteed.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a cross-platform code conversion method and device. Background technique [0002] In the field of computer software technology, developers use C language, C++ and other high-level programming languages ​​to write the source code of application software, so that the application software can run on the computing platform (ie: the execution environment of computer software, such as: Wintel architecture, ARM architecture, x86 architecture etc.) to run successfully. With the rapid development of computer technology, the hardware of many computing platforms with the same instruction set architecture is constantly being upgraded, so that the source code originally written may not be directly used on the new version of the computing platform (such as converting the source code from the ARMv7 instruction set architecture Computing platform migrated to ARMv8 instruction set ar...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/51
CPCG06F8/51
Inventor 乐永年黄波
Owner HUAWEI TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More