CN114168145A - LLVM compilation-based computational expression method, system, device and storage medium - Google Patents

LLVM compilation-based computational expression method, system, device and storage medium Download PDF

Info

Publication number
CN114168145A
CN114168145A CN202111474409.3A CN202111474409A CN114168145A CN 114168145 A CN114168145 A CN 114168145A CN 202111474409 A CN202111474409 A CN 202111474409A CN 114168145 A CN114168145 A CN 114168145A
Authority
CN
China
Prior art keywords
expression
computational
llvm
calculation expression
calculation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111474409.3A
Other languages
Chinese (zh)
Inventor
岳国荣
高明亮
逯胜建
刘伟东
孙柏阳
张慈杭
闫靖
王赛
高际惟
王玉鹏
许德阳
赵荀
尹广力
何思聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
State Grid Beijing Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Beijing Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Beijing Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202111474409.3A priority Critical patent/CN114168145A/en
Publication of CN114168145A publication Critical patent/CN114168145A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention discloses a calculation expression method, a system, a device and a storage medium based on LLVM compiling, which comprises an editor for analyzing an expression to obtain an operation symbol in the calculation expression, obtain the priority of the operation symbol, establish a variable database of the calculation expression to support the use of other variables, flexibly set, configure a function set of the calculation expression to call the function expression of the calculation expression and obtain the calculation expression; compiling the calculation expression result output by the steps, and executing the calculation expression to generate an execution result after compiling so as to realize the operation of the calculation expression. The device is used for realizing the above computational expression method based on LLVM compilation. The invention also provides a computer device and a storage medium for realizing the method. The invention can not only support more operators and functions, but also can be used in a cross-platform mode.

Description

LLVM compilation-based computational expression method, system, device and storage medium
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a computing expression method, a computing expression system, a computing expression device and a storage medium based on LLVM compiling.
Background
At present, in order to meet the ever-changing functional requirements and business requirements in enterprise projects, the computational expressions of business data are more and more complex, in gateways or some configuration software, many support scripts, users can input codes in software to realize simple logics such as four arithmetic operations, even some software also realizes PID regulation, and scripts of the software basically have two realization modes, namely: embedding existing programming languages such as VB, JavaScript, C #, etc.; secondly, the method comprises the following steps: self-defined languages like C script, VB script, etc. are developed to compile, parse and run by themselves.
However, the implementation of these scripts has some drawbacks, the first script is rich in operators and supports many functions, but the compiled result is an object file, and therefore, the implementation of these scripts is limited to only one operating system, such as Windows; the second script, although not limiting to the operating system, lacks further operator and function support.
Therefore, it is desirable to design a computational expression method that can support more operators and functions and can be used across platforms.
Disclosure of Invention
The invention aims to provide a computing expression method based on LLVM compilation, which can support more operators and functions and can be used in a cross-platform mode.
A second object of the present invention is to provide a system for the LLVM compilation-based computational expression method, which can support more operators and functions and can be used across platforms.
A third object of the present invention is to provide a computer apparatus capable of implementing the above-mentioned computational expression method based on LLVM compilation.
A fourth object of the present invention is to provide a storage medium capable of implementing the above-mentioned computational expression method based on LLVM compilation when being read and executed by a processor.
In order to achieve the first object, the present invention provides a method for computing an expression based on LLVM compilation, which includes parsing the expression to obtain an operation symbol in the computation expression; acquiring the priority of the operation symbol; establishing a variable database of a calculation expression to support the use of other variables and flexibly setting; configuring a function set of a computational expression to call a function expression of the computational expression; the editor for obtaining the calculation expression carries out editing to obtain a calculation expression result; compiling the calculation expression result output by the steps; after compilation, the computational expression is executed to generate execution results to enable execution of the computational expression.
In a further aspect, the operation symbols in the calculation expression include arithmetic operators, relational operators, logical operators, bit operation operators, conditional operators, special operators, and the like.
In a further aspect, obtaining the priority of the operation symbol includes: the device is used for judging the characteristics of input data and giving corresponding data priority and data sequence number information to determine the operation priority of a sub-expression in a calculation expression; wherein the priority of the operation symbol comprises priority 1 level to 15 level.
In a further aspect, the creating a variable database of computational expressions includes: defining variables required by the calculation expression to establish a variable database, wherein the calculation expression supports arithmetic operation, logic operation, relational operation and bit operation containing the variables.
In a further aspect, the configuring a set of functions of a computational expression includes: the function set supported by the system with the return value is allowed to be used in the calculation expression, and comprises a mathematical function under a Math class, a time function under a DateTime class, an Array function, a cut function, a Stringarray function, a Vector function, a Versoin function and the like.
In a further aspect, the editor for obtaining a computational expression includes: the editor is configured with variable set data and function set data, the editor is used for editing and calculating expressions through a development environment, and the functions of intelligent sensing, prompt texts, variable selection, operator selection and the like are supported, wherein the variable set data comprise variables supported by automatic completion, and the function set data comprise functions supported by the editor.
In a further aspect, the compiling the result of the computational expression output by the foregoing step includes: and receiving the calculation expression result by an LLVM compiler, and compiling the calculation expression result by using the LLVM compiler to create a bytecode file of the calculation expression.
In a further aspect, the executing the computational expression to generate an execution result includes: the compiler generates various executable source codes according to the calculation expression, compiles the source codes of the LLVM to generate library files of various operating systems, and the application program is connected with the library files of the LLVM to directly execute the bytecode files so as to realize the calculation of the expression.
In order to achieve the second object, the present invention provides a computing expression method device based on LLVM compilation, including: the operation symbol unit is used for analyzing the expression to obtain an operation symbol in the calculation expression; the priority unit is used for acquiring the priority of the operation symbol; the variable unit is used for establishing a variable database of the calculation expression so as to support the use of other variables and carry out flexible setting; the function unit is used for configuring a function set of a computational expression so as to call the function expression of the computational expression; an editor unit for obtaining an editor of a calculation expression; a compiling unit for compiling the calculation expression result output by the step; and the operation unit is used for executing the calculation expression to generate an execution result after compiling so as to realize the operation of the calculation expression.
Therefore, the invention has the following beneficial effects:
(1) support the syntax format of C language, support numerous operators and functions.
(2) Different languages can be interlinked through LLVM, so that LLVM can interact and integrate with IDE tightly; publishing intermediate code rather than target code can better exploit its potential on the target system without compromising debuggability.
(3) And various operating systems are supported, including Windows, Linux, macOS, Web Assembly, iOS, Android and the like.
(4) And a visual editor is provided, so that the user can use the visual editor conveniently, and particularly, an engineer who is not very familiar with codes can conveniently use the visual editor.
In order to achieve the third object, the present invention provides a computer device comprising a processor, wherein the processor is configured to implement the steps of the above-mentioned computational expression method based on LLVM compilation when executing a computer program stored in a memory.
In order to achieve the fourth object, the present invention provides a storage medium storing a computer program, which when executed by a processor implements the steps of the above-mentioned computational expression method based on LLVM compilation.
It can thus be seen that the present invention provides a computer apparatus and a storage medium, comprising: one or more memories, and one or more processors. The memory is used for storing the program codes and intermediate data generated in the program running process, storing the model output result and storing the model and the model parameters; the processor is used for processor resources occupied by code running and a plurality of processor resources occupied when the model is trained.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of an embodiment of a LLVM compilation-based computational expression method according to the present invention.
FIG. 2 is a schematic diagram of an embodiment of a computing expression method based on LLVM compilation according to the present invention.
Detailed Description
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The following detailed description is exemplary in nature and is intended to provide further details of the invention. Unless otherwise defined, all technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention.
The embodiment of the computing expression method based on LLVM compiling comprises the following steps:
referring to fig. 1, the computational expression method based on LLVM compilation of the present invention includes the following steps:
in step S1, the expression is parsed to obtain the operation symbol in the calculation expression.
In step S2, the priority of the operator is obtained.
And step S3, establishing a variable database of the calculation expression to support the use of other variables and carry out flexible setting.
In step S4, a function set of the calculation expression is configured to call a function expression of the calculation expression.
In step S5, the editor that acquired the computational expression edits to obtain a computational expression result.
Step S6, compiling the result of the computational expression output from the above steps.
In step S7, after compiling, the calculation expression is executed to generate an execution result, so as to realize the operation of the calculation expression.
In step S1, the operation symbols in the calculation expression include arithmetic operators, relational operators, logical operators, bit operation operators, conditional operators, special operators, and the like.
In the step S2, the obtaining of the priority of the operand includes: the priority module is used for judging the characteristics of the input data and giving corresponding data priority and data sequence number information to determine the operation priority of the sub-expressions in the calculation expression; wherein the priority of the operation symbol comprises priority 1 level to 15 level.
In the above step S3, a variable database of computational expressions is established, including: variables required by a computational expression are defined, wherein the computational expression supports arithmetic operations, logical operations, relational operations and bit manipulation operations involving the variables.
In the above step S4, the set of functions of the calculation expression is configured including: the use of a system-supported function set with return values is allowed in the computational expression, and includes mathematical functions under the Math class, time functions under the DateTime class, Array functions, Curture functions, StringArray functions, Vector functions, Versoin functions, and the like.
In the above step S5, the editor for obtaining the calculation expression includes: the editor is configured with variable set data and function set data, and the editor is used for editing a calculation expression through a development environment, and the calculation expression supports functions of intelligent perception, prompt text, variable selection, operator selection and the like, wherein the variable set data comprises variables supported by automatic completion, and the function set data comprises functions supported by the editor.
In the step S6, compiling the result of the computational expression output by the step includes: and receiving the calculation expression result by the LLVM compiler, and compiling the calculation expression result by using the LLVM compiler to create a bytecode file of the calculation expression.
In the above step S7, executing the calculation expression to generate an execution result includes: the compiler generates various executable source codes according to the calculation expression, compiles the source codes of the LLVM to generate library files of various operating systems, and the application program is connected with the library files of the LLVM to directly execute the bytecode files for realizing the calculation of the expression.
In this embodiment, the calculation expression is an expression similar to y ═ f (x) that can be dynamically calculated, where y is a variable in the gateway, and f (x) is an expression that supports addition, subtraction, multiplication, and division, and the basic mathematical function, and the meaning of the calculation is that if there are other variables in f (x), the values of the expression are automatically calculated when the other variables change.
The LLVM is a framework system for constructing a compiler (compiler), is written in C + +, is used for optimizing the compile-time, link-time, run-time and idle-time of a program written in any programming language, is open to developers, and is compatible with existing scripts.
The operation symbols in the calculation expression of the present embodiment include:
arithmetic operator:
the method is used for various numerical operations. The method comprises seven types of operations, namely addition (+), subtraction (-), multiplication (-), division (- /), complementation (or modulo operation,%), self-increment (+), and self-decrement (-).
Relation operator:
for comparison operations. Including six of greater than (>), less than (>), equal to (═ i), greater than equal to (>), less than equal to (< ═), and not equal to (| >).
The logical operator:
for logical operations. Including three types of and (& &), or (|) and non (|).
Bit operation operator:
the amount of participation in the operation is calculated by binary bits. The method comprises six types of bits of AND (&), OR (|), NOT (-), XOR (^), left shift (< <), and right shift (>).
Conditional operators:
this is a triage operator for conditional evaluation (.
Special operator:
with brackets (), subscripts [ ], and the like.
The priority of the operation symbol of the present embodiment includes:
priority level 1:
binding direction left binding (from left to right);
() A round bracket;
[] [1] subscript operator;
- > points to structural member operators;
the structural member operator [1] (note that it is a solid dot).
Priority level 2:
join direction right join (from right to left) monocular operator;
| A A logical not operator;
-bitwise negation operator;
the + auto-increment operator;
-the auto-subtract operator;
-the minus operator;
(type) type conversion operator;
a pointer operator;
the & address and operator;
sizeof length operator.
Priority 3 level:
combining left and right binocular operators
A multiplication operator;
a/division operator;
% remainder operator.
Priority level 4:
combining the binocular operator to the left of the direction;
+ add operator;
-a subtraction operator.
Priority 5 level:
combining the binocular operator to the left of the direction;
< left shift operator;
> > Right Shift operator.
Priority 6 level:
combining the binocular operator to the left of the direction;
<, >, and > -relational operators.
Priority 7 level:
combining the binocular operator to the left of the direction;
equal to operator (judge);
| A Not equal to the operator (judge).
Priority 8 level:
combining the binocular operator to the left of the direction;
and operators.
Priority 9 level:
combining the binocular operator to the left of the direction;
a bitwise XOR operator.
Priority 10 level:
combining the binocular operator to the left of the direction;
| by bit or operator for example: 0xfe |0xef is 11111110 and 11101111, which is a bitwise OR of the following: 11111111 or 0 xff.
Priority 11 level:
combining the binocular operator to the left of the direction;
and & logical and operator.
Priority level 12:
combining the binocular operator to the left of the direction;
| logic or operator.
Priority 13 level:
combining the direction right with a three-eye operator;
is there a Conditional operators.
Priority level 14:
combine direction right combine binocular operator.
Priority 15 level:
left combination in the combination direction;
comma operator.
The variable usage in the computational expression of the present embodiment includes: other variables are allowed to be used, and this is the most common way of using, in computational expressions that support arithmetic, logical, relational, and bit manipulation operations involving variables, such as: there is an integer variable named 'station room' module 1.SW ', and the value of this variable is obtained by collecting the position of the circuit breaker of four circuits by the electricity quantity collecting module according to the position or combination, so the circuit breaker position of the first circuit in the calculation expression needs to be compared according to the position, i.e. f (x) station room' module 1.SW &0x 01.
The use of the function in the computational expression of the present embodiment includes: allowing the use of system supported functions with return values in the computational expression, such as: mathematical functions under the Math class, time functions under the DateTime class, and the like.
The basic classes supported by the system are as follows (1):
watch (1)
Class name Class definition Remarks for note
Array Value type array class
Culture Culture class
DateTime Time class
StringArray Array class of character strings
Vector Pointer type array
Versoin Version class
The editor of the calculation expression of the embodiment includes: the computational expression can be edited through a development environment, and the editor supports functions of intelligent perception, prompt text, variable selection, operator selection and the like.
The compiling of the calculation expression of the present embodiment includes: the calculation expression is compiled by adopting LLVM 3.7, and the system supports Windows, Linux and Mac OS systems, particularly supports Linux, and currently supports automatic development and compilation.
Wherein the system uses LLVM compiler to compile into a bytecode file, which is an intermediate form of code of the compiled program.
The operation of the calculation expression of the present embodiment includes: firstly, source codes of the LLVM are compiled to generate library files of various operating systems, and the application program can directly execute the bitcode file by linking the library files of the LLVM to realize the calculation of the expression.
Therefore, the invention has the following beneficial effects:
(1) support the syntax format of C language, support numerous operators and functions.
(2) Different languages can be interlinked through LLVM, so that LLVM can interact and integrate with IDE tightly; publishing intermediate code rather than target code can better exploit its potential on the target system without compromising debuggability.
(3) And various operating systems are supported, including Windows, Linux, macOS, Web Assembly, iOS, Android and the like.
(4) And a visual editor is provided, so that the user can use the visual editor conveniently, and particularly, an engineer who is not very familiar with codes can conveniently use the visual editor.
The method and the device for computing the expression compiled based on the LLVM comprise the following steps:
as shown in fig. 2, the present invention provides a method for computing an expression based on LLVM compilation, which includes:
and the operation sign unit 10 is used for analyzing the expression to obtain the operation sign in the calculation expression.
A priority unit 20, configured to obtain a priority of the operation symbol.
And the variable unit 30 is used for establishing a variable database of the calculation expression so as to support the use of other variables and perform flexible setting.
And the function unit 40 is used for configuring the function set of the calculation expression so as to call the function expression of the calculation expression.
An editor unit 50 for obtaining an editor for computing expressions.
And a compiling unit 60, configured to compile the result of the calculation expression output in the foregoing steps.
The execution unit 70, after compiling, is configured to execute the calculation expression to generate an execution result, so as to implement the operation of the calculation expression.
In this embodiment, the operation symbols in the calculation expression include arithmetic operators, relational operators, logical operators, bit operation operators, conditional operators, special operators, and the like.
In this embodiment, obtaining the priority of the operation symbol includes: the priority module is used for judging the characteristics of the input data and giving corresponding data priority and data sequence number information to determine the operation priority of the sub-expressions in the calculation expression; wherein the priority of the operation symbol comprises priority 1 level to 15 level.
In this embodiment, establishing a variable database of computational expressions includes: variables required by a computational expression are defined, wherein the computational expression supports arithmetic operations, logical operations, relational operations and bit manipulation operations involving the variables.
In this embodiment, configuring a set of functions of a computational expression includes: the use of a system-supported function set with return values is allowed in the computational expression, and includes mathematical functions under the Math class, time functions under the DateTime class, Array functions, Curture functions, StringArray functions, Vector functions, Versoin functions, and the like.
In this embodiment, the editor for obtaining a computational expression includes: the editor is configured with variable set data and function set data, and the editor is used for editing a calculation expression through a development environment, and the calculation expression supports functions of intelligent perception, prompt text, variable selection, operator selection and the like, wherein the variable set data comprises variables supported by automatic completion, and the function set data comprises functions supported by the editor.
In this embodiment, compiling the result of the computational expression output by the above steps includes: and receiving the calculation expression result by the LLVM compiler, and compiling the calculation expression result by using the LLVM compiler to create a bytecode file of the calculation expression.
In this embodiment, executing the computational expression to generate the execution result includes: the compiler generates various executable source codes according to the calculation expression, compiles the source codes of the LLVM to generate library files of various operating systems, and the application program is connected with the library files of the LLVM to directly execute the bytecode files for realizing the calculation of the expression.
The embodiment of the computer device comprises:
the computer apparatus of this embodiment includes a processor, and the processor implements the steps in the above-described computational expression method embodiment based on LLVM compilation when executing the computer program.
For example, a computer program can be partitioned into one or more modules, which are stored in a memory and executed by a processor to implement the present invention. One or more of the modules may be a sequence of computer program instruction segments for describing the execution of a computer program in a computer device that is capable of performing certain functions.
The computer device may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that the computer apparatus may include more or fewer components, or combine certain components, or different components, e.g., the computer apparatus may also include input-output devices, network access devices, buses, etc.
For example, the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, and so on. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The processor is the control center of the computer device and is connected to various parts of the whole computer device by various interfaces and lines.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. For example, the memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (e.g., a sound receiving function, a sound-to-text function, etc.), and the like; the storage data area may store data (e.g., audio data, text data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Storage medium embodiments:
the module integrated with the terminal device may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the flow in the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used for implementing the steps of the above-described LLVM compiling-based computational expression method when being executed by a processor.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
It can thus be seen that the present invention provides a computer apparatus and a storage medium, comprising: one or more memories, and one or more processors. The memory is used for storing the program codes and intermediate data generated in the program running process, storing the model output result and storing the model and the model parameters; the processor is used for processor resources occupied by code running and a plurality of processor resources occupied when the model is trained.
It will be appreciated by those skilled in the art that the invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The embodiments disclosed above are therefore to be considered in all respects as illustrative and not restrictive. All changes which come within the scope of or equivalence to the invention are intended to be embraced therein.

Claims (10)

1. The LLVM compilation-based computational expression method is characterized by comprising the following steps:
analyzing the expression to obtain an operation symbol in the calculation expression; acquiring the priority of the operation symbol; establishing a variable database of a calculation expression to support the use of other variables and flexibly setting; configuring a function set of a computational expression to call a function expression of the computational expression;
the editor for obtaining the calculation expression in the step is used for editing to obtain a calculation expression result;
compiling the calculation expression result;
and executing the compiled computational expression to generate an execution result so as to realize the operation of the computational expression.
2. The LLVM-compilation-based computational expression method of claim 1, wherein the operation symbols in the computational expression comprise arithmetic operators, relational operators, logical operators, bit-manipulation operators, conditional operators, and special operators.
3. The LLVM compiled computational expression method of claim 1, wherein obtaining the priority of the operands comprises:
judging the characteristics of the input data, and giving corresponding data priority and data sequence number information to determine the operation priority of the sub-expressions in the calculation expression;
wherein the priority of the operation symbol comprises priority 1 level to 15 level.
4. The method of claim 1, wherein the establishing a variable database of computational expressions comprises:
defining variables required by the calculation expression to establish a variable database, wherein the calculation expression supports arithmetic operation, logic operation, relational operation and bit operation containing the variables.
5. The LLVM compiled compute expression method of claim 4, wherein said configuring the set of functions of the compute expression comprises:
and allowing the use of a function set supported by the system with the return value in the computational expression, wherein the function set comprises a mathematical function under a Math class, a time function under a DateTime class, an Array function, a cut function, a Stringarray function, a Vector function and a Versoin function.
6. The LLVM compiled computational expression method of claim 5, wherein said editor is configured with a set of variables data and a set of functions data, and wherein said editor is used to edit the computational expression through a development environment that supports smart sensing, hinting text, variable selection and selection of operators, wherein the set of variables data contains auto-completion supported variables and the set of functions data contains functions supported by the editor.
7. The LLVM compiled computational expression method of claim 6, wherein compiling the computational expression result comprises:
and receiving the calculation expression result by an LLVM compiler, and compiling the calculation expression result by using the LLVM compiler to create a bytecode file of the calculation expression.
8. The system for computing expression method based on LLVM compilation according to any of claims 1-7, comprising:
the operation symbol unit is used for analyzing the expression to obtain an operation symbol in the calculation expression;
the priority unit is used for acquiring the priority of the operation symbol;
the variable unit is used for establishing a variable database of the calculation expression so as to support the use of other variables and carry out flexible setting;
the function unit is used for configuring a function set of a computational expression so as to call the function expression of the computational expression;
an editor unit for obtaining an editor of a calculation expression;
a compiling unit for compiling the calculation expression result output by the step;
and the operation unit is used for executing the calculation expression to generate an execution result after compiling so as to realize the operation of the calculation expression.
9. A computer arrangement, characterized in that the computer arrangement comprises a processor and a memory, the processor being configured to implement the steps of the LLVM compilation based computational expression method according to any one of claims 1 to 7 when executing a computer program stored in the memory.
10. A storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the LLVM compilation based computational expression method of any one of claims 1 to 7.
CN202111474409.3A 2021-12-03 2021-12-03 LLVM compilation-based computational expression method, system, device and storage medium Pending CN114168145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111474409.3A CN114168145A (en) 2021-12-03 2021-12-03 LLVM compilation-based computational expression method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111474409.3A CN114168145A (en) 2021-12-03 2021-12-03 LLVM compilation-based computational expression method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN114168145A true CN114168145A (en) 2022-03-11

Family

ID=80483203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111474409.3A Pending CN114168145A (en) 2021-12-03 2021-12-03 LLVM compilation-based computational expression method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN114168145A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115794121A (en) * 2023-01-18 2023-03-14 中国科学技术信息研究所 Compiling method and device of differential logic expression, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115794121A (en) * 2023-01-18 2023-03-14 中国科学技术信息研究所 Compiling method and device of differential logic expression, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112100054B (en) Data management and control oriented program static analysis method and system
US5884083A (en) Computer system to compile non-incremental computer source code to execute within an incremental type computer system
CN103294598A (en) Method and device for source code inspection
CN113031932B (en) Project development method, apparatus, electronic device and storage medium
CN110196720B (en) Optimization method for generating dynamic link library by Simulink
CN115686631B (en) Random instruction generation method and device based on knowledge base and storage medium
EP0950967A2 (en) Method and apparatus for generating co-simulation and production executables from a single source
CN103473168A (en) Statistical method for hotspot program
Pandey et al. LLVM cookbook
CN114168145A (en) LLVM compilation-based computational expression method, system, device and storage medium
US20100083238A1 (en) Binary manipulation of intermediate-language code
CN111435312A (en) Application program management method and device and electronic equipment
US20030074652A1 (en) Method and apparatus for doing program analysis
CN111880801A (en) Application program dynamic method and device and electronic equipment
US9697021B2 (en) Modifiable high-level intermediate representation of source code
CN111158667A (en) Code injection method and device, electronic equipment and storage medium
US20230116546A1 (en) Method for compilation, electronic device and storage medium
CN113448874A (en) Method and device for generating unit test script
CN112306539B (en) Development method, system, terminal and medium for SCM application layer
CN114924925A (en) Instruction set simulator test method and device, electronic equipment and storage medium
CN113626035A (en) Neural network compiling method facing RISC-V equipment based on TVM
CN112799724A (en) Method and device for analyzing and calculating policy table of stability control device
Horton et al. Beginning C++ 17: From Novice to Professional
CN111913712A (en) Method and apparatus for deploying neural network model at Web end
CN106126312B (en) A kind of intermediate code optimization system based on algebra calculation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination