CN107301079B - Compiling method and compiler for computer program language - Google Patents

Compiling method and compiler for computer program language Download PDF

Info

Publication number
CN107301079B
CN107301079B CN201710365323.4A CN201710365323A CN107301079B CN 107301079 B CN107301079 B CN 107301079B CN 201710365323 A CN201710365323 A CN 201710365323A CN 107301079 B CN107301079 B CN 107301079B
Authority
CN
China
Prior art keywords
loop
value
statement
expression
loop statement
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.)
Active
Application number
CN201710365323.4A
Other languages
Chinese (zh)
Other versions
CN107301079A (en
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.)
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
NR Electric Co Ltd
NR Engineering 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 NR Electric Co Ltd, NR Engineering Co Ltd filed Critical NR Electric Co Ltd
Priority to CN201710365323.4A priority Critical patent/CN107301079B/en
Publication of CN107301079A publication Critical patent/CN107301079A/en
Application granted granted Critical
Publication of CN107301079B publication Critical patent/CN107301079B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis

Abstract

The embodiment of the invention discloses a compiling method of a computer program language, which comprises the following steps: preprocessing a loop statement of a structured text ST language, and at least acquiring an initial value expression, a termination value expression, a loop increment expression and a loop execution statement of the loop statement; compiling the initial value expression and the termination value expression respectively to obtain the value of the initial value expression and the value of the termination value expression; determining the value of the initial value expression as an index value of the loop statement; determining an upper bound of a loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression based on the type of the loop increment expression; and compiling the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement and the loop increment expression to obtain a compiling result of the loop statement. The embodiment of the invention also discloses a compiler.

Description

Compiling method and compiler for computer program language
Technical Field
The present invention relates to the field of compilers, and in particular, to a compiling method and a compiler for a computer program language.
Background
In the field of industrial control, IEC61131-3 is a general international standard defining syntax and grammar of Structured Text (ST) language, where a preprocessor preprocesses an ST language program, and then a compiler compiles the preprocessed ST language program into binary intermediate instructions, and a parser and a processor perform parsing respectively.
In the ST language, FOR sentences are sentences with high frequency of use, and the FOR sentence grammar defined by the ST language is:
FOR<Index:=expr1>TO<expr2>BY<expr3>DO
<statement list>
END_FOR;
wherein Index is an Index value, expr1 is an initial value expression, expr2 is a termination value expression, expr3 is a loop increment expression, and statement list is a loop execution statement.
Since expr3 in the grammar is an expression, and there is a great difference in grammar definition between the expr3 in the grammar and the for statement in the PASCAL and the for statement in the C language, an already mature loop statement compiling method cannot be used. In the existing FOR statement of ST language, because it cannot be predicted whether the upper and lower bounds and loop increment expressions are actually increased or decreased, expr1, expr2, expr3 are calculated before each loop, and are compared and judged whether the loop condition continues, specifically, the expr3 is greater than or equal to expr1 and the expr3 is less than expr2, and the expr3 is greater than or equal to expr2 and the expr3 is less than expr1 are compared, respectively.
Disclosure of Invention
In view of this, embodiments of the present invention are expected to provide a compiling method and a compiler FOR a computer program language, which can solve the technical problem that the compiling method FOR the ST language FOR statements causes low instruction running efficiency, improve the compiling efficiency of the ST language FOR statements, and further improve the running efficiency of the ST language.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for compiling a computer program language, including: preprocessing a loop statement of a structured text ST language, and at least acquiring an initial value expression, a termination value expression, a loop increment expression and a loop execution statement of the loop statement; compiling the initial value expression and the termination value expression respectively to obtain the value of the initial value expression and the value of the termination value expression; determining the value of the initial value expression as an index value of the loop statement; determining an upper bound of the loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression based on the type of the loop increment expression; and compiling the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement and the loop increment expression to obtain a compiling result of the loop statement.
In the above scheme, the determining, based on the type of the loop increment expression, an upper bound of the loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression includes: when the type of the loop increment expression is constant, determining an upper bound predicted value of the loop statement and a lower bound predicted value of the loop statement from the value of the initial value expression and the value of the termination value expression; comparing whether the lower bound predicted value is greater than the upper bound predicted value; if yes, terminating the loop statement; if not, determining the upper bound predicted value as the upper bound of the loop statement, and determining the lower bound predicted value as the lower bound of the loop statement.
In the above scheme, when the type of the loop increment expression is a constant, determining the upper bound prediction value of the loop statement and the lower bound prediction value of the loop statement from the value of the initial value expression and the value of the termination value expression includes: when the constant type of the loop increment expression is a positive constant, determining the value of the initial value expression as a lower bound predicted value of the loop statement, and determining the value of the termination value expression as an upper bound predicted value of the loop statement; and when the constant type of the loop increment expression is a negative constant, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement.
In the above scheme, the compiling the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement, and the loop increment expression to obtain a compiling result of the loop statement includes: when the constant type of the loop increment expression is a positive constant, compiling the loop execution statement to obtain a corresponding compiled statement; comparing whether the index value of the loop statement is equal to the upper bound of the loop statement; if yes, terminating the loop statement; if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, compiling the loop execution statement again to obtain a corresponding compiled statement, and comparing whether the index value of the loop statement is equal to the upper bound of the loop statement again; when the constant type of the loop increment expression is a negative constant, compiling the loop execution statement to obtain a corresponding compiled statement; comparing whether the index value of the loop statement is equal to the lower bound of the loop statement; if yes, terminating the loop statement; if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression, and compiling the loop execution statement again to obtain a corresponding compiled statement; and comparing again whether the index value of the loop statement is equal to the lower bound of the loop statement.
In the above scheme, the determining, based on the type of the loop increment expression, an upper bound of the loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression includes: when the type of the loop increment expression is variable, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement; comparing whether the upper bound predicted value is greater than or equal to the lower bound predicted value; if so, determining the upper bound predicted value as an upper bound of the loop statement, and determining the lower bound predicted value as a lower bound of the loop statement; if not, determining the upper bound predicted value as the lower bound of the loop statement, and determining the lower bound predicted value as the upper bound of the loop statement.
In the above scheme, the compiling the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement, and the compiled loop increment expression to obtain a compiling result of the loop statement includes: when the type of the loop increment expression is variable, compiling the loop execution statement to obtain a corresponding compiled statement; compiling the loop increment expression to obtain the value of the loop increment expression; updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression; comparing whether the updated index value of the loop statement is larger than the upper bound of the loop statement, and if so, terminating the loop statement; comparing whether the updated index value of the loop statement is smaller than the lower bound of the loop statement, and if so, terminating the loop statement; otherwise, compiling the loop execution statement again to obtain a corresponding compiled statement; and compiling the loop increment expression again to obtain the value of the loop increment expression.
In a second aspect, an embodiment of the present invention provides a compiler, including: the acquisition module is used for preprocessing a loop statement of a structured text ST language and at least acquiring an initial value expression, a termination value expression, a loop increment expression and a loop execution statement of the loop statement; the first compiling module is used for compiling the initial value expression and the termination value expression respectively to obtain the value of the initial value expression and the value of the termination value expression; a first determining module, configured to determine a value of the initial value expression as an index value of the loop statement; a second determining module, configured to determine, based on the type of the loop increment expression, an upper bound of the loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression; and the second compiling module is used for compiling the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement and the loop increment expression to obtain a compiling result of the loop statement.
In the foregoing solution, the second determining module includes: the first prediction sub-module is used for determining an upper boundary prediction value of the loop statement and a lower boundary prediction value of the loop statement from the value of the initial value expression and the value of the termination value expression when the type of the loop increment expression is constant; the first comparison sub-module is used for comparing whether the lower bound predicted value is larger than the upper bound predicted value or not; a first termination submodule, configured to terminate the loop statement if yes; and the first determining submodule is used for determining the upper limit predicted value as the upper limit of the loop statement and determining the lower limit predicted value as the lower limit of the loop statement if the upper limit predicted value is not the upper limit of the loop statement.
In the foregoing solution, the first prediction sub-module is specifically configured to: when the constant type of the loop increment expression is a positive constant, determining the value of the initial value expression as a lower bound predicted value of the loop statement, and determining the value of the termination value expression as an upper bound predicted value of the loop statement; and when the constant type of the loop increment expression is a negative constant, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement.
In the foregoing solution, the second compiling module is specifically configured to: when the constant type of the loop increment expression is a positive constant, compiling the loop execution statement to obtain a corresponding compiled statement; comparing whether the index value of the loop statement is equal to the upper bound of the loop statement; if yes, terminating the loop statement; if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, compiling the loop execution statement again to obtain a corresponding compiled statement, and comparing whether the index value of the loop statement is equal to the upper bound of the loop statement again; when the constant type of the loop increment expression is a negative constant, compiling the loop execution statement to obtain a corresponding compiled statement; comparing whether the index value of the loop statement is equal to the lower bound of the loop statement; if yes, terminating the loop statement; if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression, and compiling the loop execution statement again to obtain a corresponding compiled statement; and comparing again whether the index value of the loop statement is equal to the lower bound of the loop statement.
In the foregoing solution, the second determining module is specifically further configured to: when the type of the loop increment expression is variable, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement; comparing whether the upper bound predicted value is greater than or equal to the lower bound predicted value; if so, determining the upper bound predicted value as an upper bound of the loop statement, and determining the lower bound predicted value as a lower bound of the loop statement; if not, determining the upper bound predicted value as the lower bound of the loop statement, and determining the lower bound predicted value as the upper bound of the loop statement.
In the foregoing solution, the second compiling module is specifically further configured to: when the type of the loop increment expression is variable, compiling the loop execution statement to obtain a corresponding compiled statement; compiling the loop increment expression to obtain the value of the loop increment expression; updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression; comparing whether the updated index value of the loop statement is larger than the upper bound of the loop statement, and if so, terminating the loop statement; comparing whether the updated index value of the loop statement is smaller than the lower bound of the loop statement, and if so, terminating the loop statement; otherwise, compiling the loop execution statement again to obtain a corresponding compiled statement; and compiling the loop increment expression again to obtain the value of the loop increment expression.
The compiling method and the compiler of the computer program language provided by the embodiment of the invention firstly preprocess the loop statement of ST language, at least obtain the initial value expression, the termination value expression, the loop increment expression and the loop execution statement of the loop statement, compile the initial value expression and the termination value expression respectively to obtain the value of the initial value expression and the value of the termination value expression, then determine the value of the initial value expression as the index value of the loop statement, and determine the upper bound of the loop statement and the lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression based on the type of the loop increment expression; therefore, the upper bound of the loop statement and the lower bound of the loop statement are predetermined, the upper bound of the loop statement and the lower bound of the loop statement are prevented from being determined in the compiling of the loop execution statement, the number of times of comparing the upper bound and the lower bound of the loop statement in size is reduced in the compiling process, the loop execution statement is compiled based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement and the loop increment expression to obtain the compiling result of the loop statement, and the technical problem of low instruction operation efficiency caused by the existing compiling method of the ST language FOR statement can be solved in the running process of the ST language FOR statement, so that the compiling efficiency of the ST language FOR statement is improved, and the running efficiency of the ST language is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for compiling a computer programming language according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating an alternative method for compiling a computer programming language according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating an alternative method for compiling a computer programming language according to an embodiment of the present invention;
FIG. 4 is a block diagram of a compiler according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Fig. 1 is a schematic flow chart of a compiling method of a computer program language according to an embodiment of the present invention; the method is applied to a compiler, and as shown in fig. 1, the compiling method of the computer program language includes:
s101: after preprocessing the loop statement of the ST language, at least obtaining an initial value expression, a termination value expression, a loop increment expression and a loop execution statement of the loop statement;
specifically, the preprocessor performs lexical analysis on a loop (FOR) statement in the ST language by using an Adobe flex platform, performs syntactic analysis by using a parser (bison) to form a syntax tree, writes a C + + code FOR semantic analysis, and after the syntax analysis, the compiler can acquire an initial value expression (expr1), a termination value expression (expr2), a loop delta expression (expr3), and a loop execution statement (status list) of the FOR statement.
Here, it should be noted that, when the loop increment expression is a constant, the constant value of the loop increment expression is obtained after preprocessing.
S102: compiling the initial value expression and the termination value expression respectively to obtain the value of the initial value expression and the value of the termination value expression;
the initial value expression and the termination value expression are obtained after preprocessing, and in order to determine the upper and lower bounds of the FOR statement, the initial value expression and the termination value expression need to be compiled respectively, and the value of the initial value expression and the value of the termination value expression are calculated.
S103: determining the value of the initial value expression as an index value of the loop statement;
after the value of the initial value expression and the value of the termination value expression are obtained in S102, according to the syntax rule of the FOR statement, the value of the initial value expression is determined as the index value of the FOR statement, and in practical application, determining the value of the initial value expression as the index value of the FOR statement is: the value of the initial value expression is assigned to the index value of the FOR statement, and thus the index value of the FOR statement is determined.
Wherein, the index value of the FOR statement can also be called as a loop variable of the FOR statement.
S104: determining an upper bound of a loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression based on the type of the loop increment expression;
in order to implement the compiling of the FOR statement, the upper bound and the lower bound of the FOR statement need to be determined first, and in order to determine the upper bound and the lower bound of the FOR statement, the following three cases are implemented:
first, in an alternative embodiment, fig. 2 is another alternative flowchart of a compiling method of a computer program language in an embodiment of the present invention, and as shown in fig. 2, S104 may include:
s201: when the type of the loop increment expression is constant, determining an upper bound predicted value of the loop statement and a lower bound predicted value of the loop statement from the value of the initial value expression and the value of the termination value expression;
in a specific implementation process, the constant type of the loop increment expression may further include a positive constant and a negative constant, and then the process of determining the upper bound and the lower bound of the FOR statement is implemented in two cases:
in an alternative embodiment, S201 may include:
when the constant type of the loop increment expression is a positive constant, determining the value of the initial value expression as a lower bound predicted value of the loop statement, and determining the value of the termination value expression as an upper bound predicted value of the loop statement;
specifically, when it is determined after preprocessing that the constant type of the loop increment expression is a positive constant, it indicates that the loop condition of the FOR statement is actually incremented, and then the upper and lower bounds of the FOR statement are predicted: and determining the value of the initial value expression as a lower-bound prediction value of the FOR statement, and determining the termination value expression as an upper-bound prediction value of the FOR statement.
In another optional embodiment, S201 may further include:
and when the constant type of the loop increment expression is a negative constant, determining the value of the initial value expression as the upper-bound predicted value of the loop statement, and determining the value of the termination value expression as the lower-bound predicted value of the loop statement.
Specifically, when it is determined after preprocessing that the constant type of the loop increment expression is a negative constant, it indicates that the loop condition of the FOR statement is actually decreased, and then the upper and lower bounds of the FOR statement are predicted: and determining the value of the initial value expression as an upper bound prediction value of the FOR statement, and determining the termination value expression as a lower bound prediction value of the FOR statement.
S202: comparing whether the lower bound predicted value is larger than the upper bound predicted value;
s203: if so, terminating the loop statement;
s204: if not, determining the upper bound predicted value as the upper bound of the loop statement, and determining the lower bound predicted value as the lower bound of the loop statement.
After the preprocessing, when the compiler determines that the value of the loop increment expression is constant, that is, when the type of the loop increment expression is constant, the compiler predicts the upper bound and the lower bound of the FOR statement first, and specifically, determines the upper bound predicted value and the lower bound predicted value of the FOR statement from the value of the initial value expression and the value of the end value expression.
After the upper bound predicted value and the lower bound predicted value of the FOR statement are determined, whether the lower bound predicted value is larger than the upper bound predicted value or not is compared, if the comparison result is yes, the FOR statement is terminated, if the comparison result is not, the upper bound predicted value is assigned to the upper bound of the FOR statement, and the lower bound predicted value is assigned to the lower bound of the FOR statement.
From the above, the upper bound and the lower bound of the FOR statement can be determined in two cases when the type of the loop increment expression is constant.
Secondly, in another alternative embodiment, that is, in the third case when the type of the loop increment expression is a variable, S104 may include:
determining the value of the initial value expression as an upper bound prediction value of the loop statement, and determining the value of the termination value expression as a lower bound prediction value of the loop statement;
comparing whether the upper bound predicted value is greater than or equal to the lower bound predicted value;
if so, determining the upper bound predicted value as the upper bound of the cycle statement, and determining the lower bound predicted value as the lower bound of the cycle statement;
if not, determining the upper bound predicted value as the lower bound of the loop statement, and determining the lower bound predicted value as the upper bound of the loop statement.
The type of the loop increment expression obtained after preprocessing is not a constant, but is a conventional expression, namely when the type of the loop increment expression is determined to be a variable, at the moment, whether the loop condition of the FOR statement is actually increased or decreased cannot be determined, so that the upper and lower bounds of the FOR statement are predicted firstly: the value of the initial value expression is determined as an upper bound prediction value of the FOR statement, and the value of the termination value expression is determined as a lower bound prediction value of the FOR statement.
After the upper and lower boundary predicted values are obtained, whether the upper boundary predicted value is larger than or equal to the lower boundary predicted value is compared, if yes, the upper boundary predicted value is assigned to the upper boundary of the FOR statement, and if not, the lower boundary predicted value is assigned to the lower boundary of the FOR statement, so that the upper and lower boundaries of the FOR statement are determined.
S105: and compiling the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement and the loop increment expression to obtain a compiling result of the loop statement.
Determining an index value of the FOR statement in S103, determining an upper bound and a lower bound of the FOR statement in S104, and compiling the loop execution statement based on the determined upper bound, lower bound, index value and loop increment expression of the FOR statement, wherein in a specific implementation process, S105 can be implemented by dividing the loop increment expression into the following three cases according to the type of the loop increment expression:
in an alternative embodiment, the first case: when the constant type of the loop increment expression is a positive constant, S105 may include:
compiling the loop execution statement to obtain a corresponding compiled statement;
comparing whether the index value of the loop statement is equal to the upper bound of the loop statement;
if so, terminating the loop statement;
if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, compiling the loop execution statement again to obtain a corresponding compiled statement, and comparing whether the index value of the loop statement is equal to the upper bound of the loop statement again.
Specifically, when the value of the loop increment expression is determined to be a positive number, it is determined that the loop condition of the FOR statement is actually incremented, then the loop execution statement is compiled to obtain a corresponding compiled statement, then whether the index value of the loop statement is equal to the upper bound of the loop statement or not is compared, if so, it is determined that the loop actually incremented has reached the upper bound of the loop condition, so that the loop statement is terminated, if not, it is determined that the loop actually incremented has not reached the upper bound of the loop condition, the index value of the loop statement should be updated, finally, the loop execution statement is compiled again to obtain a corresponding compiled statement, and whether the index value of the loop statement is equal to the upper bound of the loop statement or not is compared again, so that the compiling of the loop statement is completed.
In another alternative embodiment, the second case: when the constant type of the loop increment expression is a negative constant, S105 may include:
compiling the loop execution statement to obtain a corresponding compiled statement;
comparing whether the index value of the loop statement is equal to the lower bound of the loop statement;
if so, terminating the loop statement;
if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, and compiling the loop execution statement again to obtain a corresponding compiled statement; and again compares whether the index value of the loop statement is equal to the lower bound of the loop statement.
Specifically, when the value of the loop increment expression is determined to be a negative number, the loop condition of the FOR statement is actually decreased, then the loop execution statement is compiled to obtain a corresponding compiled statement, then whether the index value of the loop statement is equal to the lower bound of the loop statement or not is compared, if so, the loop actually decreased at this time reaches the lower bound of the loop condition, so that the loop statement is terminated, if not, the loop actually decreased at this time does not reach the lower bound of the loop condition, the index value of the loop statement is updated, and finally, the loop execution statement is compiled again to obtain a corresponding compiled statement; and comparing the index value of the loop statement with the lower bound of the loop statement again to judge whether the index value of the loop statement is equal to the lower bound of the loop statement, thus completing the compiling of the loop statement.
In another alternative embodiment, the third case: when the type of the loop increment expression is variable, S105 may include:
compiling the loop execution statement to obtain a corresponding compiled statement;
compiling the loop increment expression to obtain the value of the loop increment expression;
updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression;
comparing whether the updated index value of the loop statement is larger than the upper bound of the loop statement or not, and if so, terminating the loop statement;
comparing whether the updated index value of the loop statement is smaller than the lower bound of the loop statement, and if so, terminating the loop statement;
otherwise, compiling the loop execution statement again to obtain a corresponding compiled statement; and compiling the loop increment expression again to obtain the value of the loop increment expression.
Specifically, when the value of the loop increment expression is determined to be a variable, it is stated that the loop condition of the FOR statement is dynamically changed, then the loop execution statement is compiled to obtain a corresponding compiled statement, then the loop increment expression is compiled to obtain a value of the loop increment expression, so that the index value of the loop statement is updated according to the index value of the loop statement and the value of the loop increment expression, finally, whether the index value of the updated loop statement is greater than the upper bound of the loop statement is compared, if so, it is stated that the index value of the updated loop statement has reached the upper bound of the loop condition, so the loop statement is terminated, whether the index value of the updated loop statement is less than the lower bound of the loop statement is compared, if so, it is stated that the index value of the updated loop statement has reached the lower bound of the loop condition, so the loop statement is terminated, if not, finally, compiling the loop execution statement again to obtain a corresponding compiled statement; and compiling the loop increment expression again to obtain the value of the loop increment expression, thus completing the compiling of the loop statement.
And determining the maximum integer and the minimum integer of each expression according to the word length of each expression.
The following describes the compiling method of the computer program language by way of example.
Fig. 3 is a schematic flow chart of another alternative compiling method of a computer program language according to an embodiment of the present invention, as shown in fig. 3,
s301: preprocessing the FOR statement to obtain an initial value expression, a termination value expression, a cycle increment expression and a cycle execution statement;
specifically, the FOR statement is preprocessed, that is, the following FOR statements in fig. 3 are preprocessed:
FOR<Index:=expr1>TO<expr2>BY<expr3>DO
<statement list>
END_FOR;
the Initial value expression (Initial _ value) is obtained by compiling the expr1, the End value expression (End _ value) is compiled for the expr2, and the loop Increment expression (Increment) is compiled for the expr 3.
S302: judging the type of the circulation increment expression;
s303: when the type of the circulation increment expression is a positive constant, adopting an optimization mode 1: count up the secure compilation mode;
specifically, when the value of expr3 is a positive constant, the compilation results are as follows:
Figure GDA0002192828150000111
Figure GDA0002192828150000121
wherein gt represents a greater than instruction, jnz represents a non-0 jump instruction, asgn represents an assignment instruction, eq represents an equality instruction, add represents an add instruction, and jmp represents an unconditional jump instruction.
When the upper bound of the FOR statement is the largest integer, which will avoid the index value causing an overflow before the last test, the instruction sequence can ensure that the index value is not assigned to an out-of-range value and that the loop execution statement code is never executed unless executed at least once, ensuring correct termination of the FOR statement in count up mode.
S304: when the type of the loop increment expression is a negative constant, adopting an optimization mode 2: count down the secure compilation mode;
specifically, when the value of expr3 is a negative constant, the compilation results are as follows:
Figure GDA0002192828150000131
wherein lt represents a less than instruction; when the lower bound of the FOR statement is the smallest integer, which will avoid the index value causing underflow before the last test, the sequence of instructions can ensure that the index value is not assigned an out-of-range value and that the loop execution statement code is never executed unless executed at least once, ensuring correct termination of the FOR statement in count down mode.
S305: when the type of the circulation increment expression is a conventional expression, an optimization mode 3 is adopted: and dynamically determining an upper limit compiling mode and a lower limit compiling mode.
Specifically, when the value of expr3 is a regular expression, the compilation result is as follows:
Figure GDA0002192828150000132
Figure GDA0002192828150000141
and if yes, jumping out of the loop, comparing the existing index value with the upper and lower bounds FOR four times, and reducing the comparison instruction in the loop process to two times.
By adopting the embodiment of the invention, the type of the circulation increment expression is extracted in the semantic analysis stage, the optimized and safe up-counting and down-counting translation mode is adopted FOR the common positive and negative constant integer modes, and the translation mode of dynamically adjusting the upper and lower bounds before circulation is adopted FOR the conventional expression, so that the execution efficiency of the FOR statement instruction sequence is obviously improved, and the method is suitable FOR the industrial control field with high real-time requirement.
The compiling method of the computer program language provided by the embodiment of the invention comprises the steps of firstly preprocessing a loop statement of ST language, then at least obtaining an initial value expression, a termination value expression, a loop increment expression and a loop execution statement of the loop statement, respectively compiling the initial value expression and the termination value expression to obtain a value of the initial value expression and a value of the termination value expression, then determining the value of the initial value expression as an index value of the loop statement, and determining an upper bound of the loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression based on the type of the loop increment expression; therefore, the upper bound of the loop statement and the lower bound of the loop statement are predetermined, the upper bound of the loop statement and the lower bound of the loop statement are prevented from being determined in the compiling of the loop execution statement, the number of times of comparing the upper bound and the lower bound of the loop statement in size is reduced in the compiling process, the loop execution statement is compiled based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement and the loop increment expression to obtain the compiling result of the loop statement, and the technical problem of low instruction operation efficiency caused by the existing compiling method of the ST language FOR statement can be solved in the running process of the ST language FOR statement, so that the compiling efficiency of the ST language FOR statement is improved, and the running efficiency of the ST language is improved.
Based on the same inventive concept, an embodiment of the present invention further provides a compiler, fig. 4 is a schematic structural diagram of a terminal in the embodiment of the present invention, and as shown in fig. 4, the compiler includes: an obtaining module 41, a first compiling module 42, a first determining module 43, a second determining module 44 and a second compiling module 45;
the obtaining module 41 is configured to, after preprocessing a loop statement of a structured text ST language, obtain at least an initial value expression, an end value expression, a loop increment expression, and a loop execution statement of the loop statement; the first compiling module 42 is configured to compile the initial value expression and the termination value expression respectively to obtain a value of the initial value expression and a value of the termination value expression; a first determining module 43, configured to determine a value of the initial value expression as an index value of the loop statement; a second determining module 44, configured to determine, based on the type of the loop increment expression, an upper bound of the loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression; and a second compiling module 45, configured to compile the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement, and the loop increment expression, to obtain a compiling result of the loop statement.
In order to implement the compiling of the FOR statement, the upper bound and the lower bound of the FOR statement need to be determined first, and in order to determine the upper bound and the lower bound of the FOR statement, the following three cases are implemented:
in an alternative embodiment, the second determining module 44 includes: the first prediction sub-module is used for determining an upper boundary prediction value of the cycle statement and a lower boundary prediction value of the cycle statement from the value of the initial value expression and the value of the termination value expression when the type of the cycle increment expression is constant; the first comparison submodule is used for comparing whether the lower bound predicted value is larger than the upper bound predicted value or not; the first termination submodule is used for terminating the loop statement if the loop statement is judged to be the first loop statement; and the first determining submodule is used for determining the upper limit predicted value as the upper limit of the loop statement and determining the lower limit predicted value as the lower limit of the loop statement if the upper limit predicted value is not the upper limit of the loop statement.
In an optional embodiment, the first prediction sub-module is specifically configured to: when the constant type of the loop increment expression is a positive constant, determining the value of the initial value expression as a lower bound predicted value of the loop statement, and determining the value of the termination value expression as an upper bound predicted value of the loop statement; and when the constant type of the loop increment expression is a negative constant, determining the value of the initial value expression as the upper-bound predicted value of the loop statement, and determining the value of the termination value expression as the lower-bound predicted value of the loop statement.
From the above, the upper and lower bounds of the FOR statement are determined in two cases when the type of the loop increment expression is constant.
Based on the above two cases, in order to obtain the compiling result of the loop statement, in an alternative embodiment, the second compiling module 45 is specifically configured to: when the constant type of the loop increment expression is a positive constant, compiling the loop execution statement to obtain a corresponding compiled statement; comparing whether the index value of the loop statement is equal to the upper bound of the loop statement; if so, terminating the loop statement; if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, compiling the loop execution statement again to obtain a corresponding compiled statement, and comparing whether the index value of the loop statement is equal to the upper bound of the loop statement again; when the constant type of the loop increment expression is a negative constant, compiling the loop execution statement to obtain a corresponding compiled statement; comparing whether the index value of the loop statement is equal to the lower bound of the loop statement; if so, terminating the loop statement; if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, compiling the loop execution statement again to obtain a corresponding compiled statement, and comparing whether the index value of the loop statement is equal to the lower bound of the loop statement again.
In an alternative embodiment, the third scenario described above: the second determining module 44 is further specifically configured to: when the type of the loop increment expression is variable, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement; comparing whether the upper bound predicted value is greater than or equal to the lower bound predicted value; if so, determining the upper bound predicted value as the upper bound of the cycle statement, and determining the lower bound predicted value as the lower bound of the cycle statement; if not, determining the upper bound predicted value as the lower bound of the loop statement, and determining the lower bound predicted value as the upper bound of the loop statement.
Based on the third condition, in order to obtain the compiling result of the loop statement, in an alternative embodiment, the second compiling module 45 is further configured to: when the type of the loop increment expression is variable, compiling the loop execution statement to obtain a corresponding compiled statement; compiling the loop increment expression to obtain the value of the loop increment expression; updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression; comparing whether the updated index value of the loop statement is larger than the upper bound of the loop statement or not, and if so, terminating the loop statement; comparing whether the updated index value of the loop statement is smaller than the lower bound of the loop statement, and if so, terminating the loop statement; otherwise, compiling the loop execution statement again to obtain a corresponding compiled statement; and compiling the loop increment expression again to obtain the value of the loop increment expression.
Here, it should be noted that: the above description of the compiler embodiment is similar to the above description of the method, and has the same beneficial effects as the method embodiment, and therefore, the description thereof is omitted. For technical details that are not disclosed in the compiler embodiment of the present invention, those skilled in the art should understand with reference to the description of the method embodiment of the present invention, and will not be described herein again.
Here, it should be noted that:
it should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the modules is only one logical functional division, and there may be other division ways in actual implementation, such as: multiple modules or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be electrical, mechanical or other.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may be separately used as one unit, or two or more modules may be integrated into one module; the integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated module of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (8)

1. A method of compiling a computer program language, comprising:
preprocessing a loop statement of a structured text ST language, and at least acquiring an initial value expression, a termination value expression, a loop increment expression and a loop execution statement of the loop statement;
compiling the initial value expression and the termination value expression respectively to obtain the value of the initial value expression and the value of the termination value expression;
determining the value of the initial value expression as an index value of the loop statement;
determining an upper bound of the loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression based on the type of the loop increment expression;
compiling the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement and the loop increment expression to obtain a compiling result of the loop statement;
when the constant type of the loop increment expression is a positive constant, compiling the loop execution statement to obtain a corresponding compiled statement;
comparing whether the index value of the loop statement is equal to the upper bound of the loop statement;
if yes, terminating the loop statement;
if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, compiling the loop execution statement again to obtain a corresponding compiled statement, and comparing whether the index value of the loop statement is equal to the upper bound of the loop statement again;
when the constant type of the loop increment expression is a negative constant, compiling the loop execution statement to obtain a corresponding compiled statement;
comparing whether the index value of the loop statement is equal to the lower bound of the loop statement;
if yes, terminating the loop statement;
if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression, and compiling the loop execution statement again to obtain a corresponding compiled statement; and comparing the index value of the loop statement with the lower bound of the loop statement again to determine whether the index value of the loop statement is equal to the lower bound of the loop statement;
when the type of the loop increment expression is variable, compiling the loop execution statement to obtain a corresponding compiled statement;
compiling the loop increment expression to obtain the value of the loop increment expression;
updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression;
comparing whether the updated index value of the loop statement is larger than the upper bound of the loop statement, and if so, terminating the loop statement;
comparing whether the updated index value of the loop statement is smaller than the lower bound of the loop statement, and if so, terminating the loop statement;
otherwise, compiling the loop execution statement again to obtain a corresponding compiled statement; and compiling the loop increment expression again to obtain the value of the loop increment expression.
2. The method of claim 1, wherein determining the upper bound of the loop statement and the lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression based on the type of the loop delta expression comprises:
when the type of the loop increment expression is constant, determining an upper bound predicted value of the loop statement and a lower bound predicted value of the loop statement from the value of the initial value expression and the value of the termination value expression;
comparing whether the lower bound predicted value is greater than the upper bound predicted value;
if yes, terminating the loop statement;
if not, determining the upper bound predicted value as the upper bound of the loop statement, and determining the lower bound predicted value as the lower bound of the loop statement.
3. The method of claim 2, wherein determining the upper bound prediction value of the loop statement and the lower bound prediction value of the loop statement from the value of the initial value expression and the value of the termination value expression when the type of the loop delta expression is constant comprises:
when the constant type of the loop increment expression is a positive constant, determining the value of the initial value expression as a lower bound predicted value of the loop statement, and determining the value of the termination value expression as an upper bound predicted value of the loop statement;
and when the constant type of the loop increment expression is a negative constant, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement.
4. The method of claim 1, wherein determining the upper bound of the loop statement and the lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression based on the type of the loop delta expression comprises:
when the type of the loop increment expression is variable, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement;
comparing whether the upper bound predicted value is greater than or equal to the lower bound predicted value;
if so, determining the upper bound predicted value as an upper bound of the loop statement, and determining the lower bound predicted value as a lower bound of the loop statement;
if not, determining the upper bound predicted value as the lower bound of the loop statement, and determining the lower bound predicted value as the upper bound of the loop statement.
5. A compiler, comprising:
the acquisition module is used for preprocessing a loop statement of a structured text ST language and at least acquiring an initial value expression, a termination value expression, a loop increment expression and a loop execution statement of the loop statement;
the first compiling module is used for compiling the initial value expression and the termination value expression respectively to obtain the value of the initial value expression and the value of the termination value expression;
a first determining module, configured to determine a value of the initial value expression as an index value of the loop statement;
a second determining module, configured to determine, based on the type of the loop increment expression, an upper bound of the loop statement and a lower bound of the loop statement from the value of the initial value expression and the value of the termination value expression;
the second compiling module is used for compiling the loop execution statement based on the upper bound of the loop statement, the lower bound of the loop statement, the index value of the loop statement and the loop increment expression to obtain a compiling result of the loop statement;
wherein the second compiling module is further configured to,
when the constant type of the loop increment expression is a positive constant, compiling the loop execution statement to obtain a corresponding compiled statement; comparing whether the index value of the loop statement is equal to the upper bound of the loop statement; if yes, terminating the loop statement; if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, compiling the loop execution statement again to obtain a corresponding compiled statement, and comparing whether the index value of the loop statement is equal to the upper bound of the loop statement again;
when the constant type of the loop increment expression is a negative constant, compiling the loop execution statement to obtain a corresponding compiled statement; comparing whether the index value of the loop statement is equal to the lower bound of the loop statement; if yes, terminating the loop statement; if not, updating the index value of the loop statement according to the index value of the loop statement and the value of the loop incremental expression, compiling the loop execution statement again to obtain a corresponding compiled statement, and comparing whether the index value of the loop statement is equal to the lower bound of the loop statement again;
when the type of the loop increment expression is variable, compiling the loop execution statement to obtain a corresponding compiled statement; compiling the loop increment expression to obtain the value of the loop increment expression; updating the index value of the loop statement according to the index value of the loop statement and the value of the loop increment expression; comparing whether the updated index value of the loop statement is larger than the upper bound of the loop statement, and if so, terminating the loop statement; comparing whether the updated index value of the loop statement is smaller than the lower bound of the loop statement, and if so, terminating the loop statement; otherwise, compiling the loop execution statement again to obtain a corresponding compiled statement; and compiling the loop increment expression again to obtain the value of the loop increment expression.
6. The compiler of claim 5, wherein the second determining module comprises:
the first prediction sub-module is used for determining an upper boundary prediction value of the loop statement and a lower boundary prediction value of the loop statement from the value of the initial value expression and the value of the termination value expression when the type of the loop increment expression is constant;
the first comparison sub-module is used for comparing whether the lower bound predicted value is larger than the upper bound predicted value or not;
a first termination submodule, configured to terminate the loop statement if yes;
and the first determining submodule is used for determining the upper limit predicted value as the upper limit of the loop statement and determining the lower limit predicted value as the lower limit of the loop statement if the upper limit predicted value is not the upper limit of the loop statement.
7. The compiler of claim 6, wherein the first predictor submodule is specifically configured to:
when the constant type of the loop increment expression is a positive constant, determining the value of the initial value expression as a lower bound predicted value of the loop statement, and determining the value of the termination value expression as an upper bound predicted value of the loop statement; and when the constant type of the loop increment expression is a negative constant, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement.
8. The compiler of claim 5, wherein the second determining module is further configured to: when the type of the loop increment expression is variable, determining the value of the initial value expression as an upper bound predicted value of the loop statement, and determining the value of the termination value expression as a lower bound predicted value of the loop statement; comparing whether the upper bound predicted value is greater than or equal to the lower bound predicted value; if so, determining the upper bound predicted value as an upper bound of the loop statement, and determining the lower bound predicted value as a lower bound of the loop statement; if not, determining the upper bound predicted value as the lower bound of the loop statement, and determining the lower bound predicted value as the upper bound of the loop statement.
CN201710365323.4A 2017-05-22 2017-05-22 Compiling method and compiler for computer program language Active CN107301079B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710365323.4A CN107301079B (en) 2017-05-22 2017-05-22 Compiling method and compiler for computer program language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710365323.4A CN107301079B (en) 2017-05-22 2017-05-22 Compiling method and compiler for computer program language

Publications (2)

Publication Number Publication Date
CN107301079A CN107301079A (en) 2017-10-27
CN107301079B true CN107301079B (en) 2020-02-04

Family

ID=60137298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710365323.4A Active CN107301079B (en) 2017-05-22 2017-05-22 Compiling method and compiler for computer program language

Country Status (1)

Country Link
CN (1) CN107301079B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019216127A1 (en) * 2018-05-09 2019-11-14 日本電信電話株式会社 Offload server and offload program
CN112115488A (en) * 2019-06-20 2020-12-22 华控清交信息科技(北京)有限公司 Data processing method and device and electronic equipment
CN113672232A (en) * 2021-07-09 2021-11-19 华为技术有限公司 Program compiling method and device
CN113504913B (en) * 2021-09-09 2021-12-03 浩鲸云计算科技股份有限公司 Automatic Adobe Flex code conversion method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6369836B1 (en) * 1998-12-23 2002-04-09 Triconex Cause effect diagram program
CN102541514A (en) * 2010-12-09 2012-07-04 沈阳高精数控技术有限公司 Method for converting structural text language into trapezoidal graph language
CN102929214A (en) * 2011-08-11 2013-02-13 西门子公司 Embedded multi-processor parallel processing system and running method for same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6369836B1 (en) * 1998-12-23 2002-04-09 Triconex Cause effect diagram program
CN102541514A (en) * 2010-12-09 2012-07-04 沈阳高精数控技术有限公司 Method for converting structural text language into trapezoidal graph language
CN102929214A (en) * 2011-08-11 2013-02-13 西门子公司 Embedded multi-processor parallel processing system and running method for same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Automated Test Generation for Structured Text Language using UPPAAL Model Checker;Filip Markovic;《DIVA-Acdemic Archive On-line》;20150131;第49-57页 *

Also Published As

Publication number Publication date
CN107301079A (en) 2017-10-27

Similar Documents

Publication Publication Date Title
CN107301079B (en) Compiling method and compiler for computer program language
US9122539B2 (en) Methods and systems for forming an adjusted perform range
CN110149800B (en) Apparatus for processing abstract syntax tree associated with source code of source program
US20070067471A1 (en) Message translation systems and methods
US8510724B2 (en) Reconstructing program control flow
CN104106049B (en) Calculate the rasterizing of tinter
CN106547520B (en) Code path analysis method and device
JPH07105012A (en) Compiling processing system for language processing program
WO2017097160A1 (en) System and method for caching and parameterizing ir
CN103577241A (en) Compiling system and compiling method
KR20170014613A (en) Electronic Device, Compilation Method, and Computer Readable Recording Medium
JP2009528611A (en) Optimized compilation method during conditional branching
US20130232471A1 (en) Method and Apparatus for Assessing Software Parallelization
US20010039653A1 (en) Program conversion method, program conversion apparatus, storage medium for storing program conversion program and program conversion program
KR20090011974A (en) Method for extracting the target files of compilation
CN104915295A (en) Game software debugging method and device
US11429358B2 (en) Representing asynchronous state machine in intermediate code
CN111796832B (en) Hot patch file generation method, device, equipment and storage medium
US11435989B2 (en) Thread-local return structure for asynchronous state machine
JP2008243019A (en) Source code converting device and source code converting method
US20070022275A1 (en) Processor cluster implementing conditional instruction skip
WO2015162465A1 (en) Memory efficient thread-level speculation
CN117472388B (en) Method, system and related equipment for optimizing program performance
JP2005346407A (en) In-line expansion execution method in dynamic compile
Joisha et al. The Design and Implementation of a Parser and Scanner for the MATLAB Language in the MATCH Compiler

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
GR01 Patent grant
GR01 Patent grant