LLVM compilation-based expression calculation method, system and device and storage medium

An expression and compiler technology, applied in the field of data processing, can solve problems such as lack of operator support, and achieve the effect of convenient use

Pending Publication Date: 2022-03-11
STATE GRID BEIJING ELECTRIC POWER +1
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, the implementation of these scripts usually has some defects. The first type of script has rich operators and supports many functions, but the compiled result is an object file, so it can only be limited to a certain operating system, such as Windows; Although this kind of script can not limit the operating system, it lacks support for more operators and functions

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
  • LLVM compilation-based expression calculation method, system and device and storage medium
  • LLVM compilation-based expression calculation method, system and device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0031] Example of calculation expression method based on LLVM compilation:

[0032] see figure 1 , the calculation expression method based on LLVM compiling of the present invention, comprises the following steps:

[0033] In step S1, the expression is parsed to obtain operation symbols in the calculation expression.

[0034] Step S2, obtaining the priority of the operation symbol.

[0035] Step S3, establishing a variable database of calculation expressions to support the use of other variables and perform flexible settings.

[0036] Step S4, configure the function set of the calculation expression to call the function expression of the calculation expression.

[0037] In step S5, an editor for the calculation expression is obtained for editing, so as to obtain the result of the calculation expression.

[0038] Step S6, compiling the calculation expression results output by the above steps.

[0039] Step S7, after compiling, execute the calculation expression to generate...

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 discloses an expression calculation method, system and device based on LLVM compilation and a storage medium, and the method comprises the steps: analyzing an expression to obtain an operation symbol in the expression calculation, obtaining the priority of the operation symbol, building a variable database of the expression calculation to support the use of other variables, and carrying out flexible setting. Configuring a function set of the calculation expression to call a function expression of the calculation expression, and obtaining an editor of the calculation expression; and compiling the calculation expression result output in the above step, and after compiling, executing the calculation expression to generate an execution result so as to realize the operation of the calculation expression. The device is used for realizing the expression calculation method based on LLVM compiling. The invention further provides a computer device and a storage medium for implementing the method. The method not only can support more operators and functions, but also can be used in a cross-platform manner.

Description

technical field [0001] The invention belongs to the technical field of data processing, and in particular relates to a calculation expression method, system, device and storage medium based on LLVM compilation. Background technique [0002] At present, in order to meet the ever-changing functional requirements and business requirements in enterprise projects, the calculation expressions of business data are becoming more and more complex. In gateways or some configuration software, many of them support scripts, and users can input them in the software. Code to realize some simple logic such as four arithmetic operations, and even some software realizes PID adjustment. The scripts of these software basically have two implementation methods. First, embed existing programming languages, such as VB, JavaScript, C#, etc.; second : Develop a custom language that compiles, parses, and runs by itself, such as C script, VB script, etc. [0003] However, the implementation of these s...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41G06F8/33
CPCG06F8/41G06F8/33
Inventor 岳国荣高明亮逯胜建刘伟东孙柏阳张慈杭闫靖王赛高际惟王玉鹏许德阳赵荀尹广力何思聪
Owner STATE GRID BEIJING ELECTRIC POWER
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products