CN109002684B - Interval information analysis method - Google Patents

Interval information analysis method Download PDF

Info

Publication number
CN109002684B
CN109002684B CN201810634685.3A CN201810634685A CN109002684B CN 109002684 B CN109002684 B CN 109002684B CN 201810634685 A CN201810634685 A CN 201810634685A CN 109002684 B CN109002684 B CN 109002684B
Authority
CN
China
Prior art keywords
node
interval information
flowing
predecessor
information
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
CN201810634685.3A
Other languages
Chinese (zh)
Other versions
CN109002684A (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.)
Peking University
Original Assignee
Peking University
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 Peking University filed Critical Peking University
Priority to CN201810634685.3A priority Critical patent/CN109002684B/en
Publication of CN109002684A publication Critical patent/CN109002684A/en
Application granted granted Critical
Publication of CN109002684B publication Critical patent/CN109002684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides an interval information analysis method, which comprises the following steps: s1, for any node in the value dependency graph, obtaining the interval information of the predecessor node flowing into the node according to the interval information of any predecessor node of the node and the guard condition between the node and the predecessor node; s2, obtaining the interval information of the node according to the interval information of each predecessor node of the node flowing into the node and the type of the node. The method provided by the invention realizes the acquisition of the interval information of any node in the value dependency graph and improves the analysis efficiency and the analysis progress of the value dependency graph by applying a recursive method and based on the interval information and guard condition of the predecessor nodes.

Description

Interval information analysis method
Technical Field
The invention relates to the technical field of value dependency graphs, in particular to an interval information analysis method.
Background
A Value dependency Graph (Value dependency Graph) is a kind of directed Graph, and can be represented as VDG ═ N, N _ s, E _ i. Wherein N is a node set, each node corresponds to a statement in the program, N _ s is a selected statement node set,
Figure BDA0001701141360000011
containing branch selection statement and loop selection statement, edge set E ═ tone<n1,ns1,…,nsi,n2>I N1, N2 belongs to N, ns1, nsi belongs to N _ s, N1 is N2 at a value dependent source point, ns is an optional node, namely N1 can directly reach N2 }. The value dependency graph is an extension of the flow value graph.
The value dependency graph is a graph of guard conditions between response variables constructed by constant value use analysis, data flow analysis and the like, all nodes which may affect the range of the value domain of the current node are predecessor nodes of the current node, and each predecessor node has a corresponding logical condition to the current node for constraint.
However, how to obtain the interval information of any node based on the guard condition between the response variables in the value dependency graph is still a problem to be solved in the field of the value dependency graph.
Disclosure of Invention
The invention provides an interval information analysis method for solving the problems in the prior art.
In one aspect, the present invention provides a method for analyzing interval information, including: s1, for any node in the value dependency graph, obtaining the interval information of the predecessor node flowing into the node according to the interval information of any predecessor node of the node and the guard condition between the node and the predecessor node; s2, obtaining the interval information of the node according to the interval information of each predecessor node of the node flowing into the node and the type of the node.
Preferably, the step S1 further includes: obtaining the interval information of any precursor node of the nodes flowing into the node according to the following formula:
predsMap[i](vnode)=outMap[i]∩guardMap[i]
in the formula, predsMap [ i ] (vnode) is the interval information of the i-th predecessor node of the node flowing into the node, outMap [ i ] is the interval information of the i-th predecessor node of the node, and guardMap [ i ] is the interval information of the guard condition between the node and the i-th predecessor node of the node.
Preferably, the step S2 further includes: s21, obtaining the interval information flowing into the node according to the following formula:
Figure BDA0001701141360000021
wherein inMap (vnode) is the interval information flowing into the node, and predsMap [ i ] is the interval information flowing into the node from the ith predecessor node of the node; and S22, acquiring the interval information of the node according to the interval information flowing into the node and the type of the node.
Preferably, the step S22 further includes: if the interval information flowing into the node is an empty set, the interval information of the node is the empty set; otherwise, if the predecessor node of the node comprises the node, acquiring information before the node cycle according to the interval information flowing into the node and the type of the node, and acquiring the interval information of the node based on the information before the cycle and the guard condition of the self-cycle; and if the precursor node of the node does not comprise the node, acquiring the interval information of the node based on the interval information flowing into the node and the type of the node.
Preferably, the type of the node is an assignment node, a function call node, a function entry node, a condition judgment node or a return statement node.
Preferably, if the node is an assignment node, performing analog computation according to the interval information flowing into the node to obtain the interval information of the node; if the node is a function calling node, acquiring interval information of parameters of function calling in the node according to the interval information flowing into the node, and taking the interval information of the parameters as the interval information of the node; if the node is a function entry node and the function call is a variable, extracting the interval information of the variable from the interval information flowing into the node, and taking the interval information of the variable as the interval information of the node; if the node is a function entry node and the function call is a constant, taking the interval information of the constant as the interval information of the node; if the node is a condition judgment node or a return statement node, the interval information of the node is the interval information flowing into the node.
Preferably, the interval information of any node is represented by the following formula:
outMap={<var,isLeft,VRI>}
in the formula, outMap is interval information of a node, var is a variable, isLeft is true or false, true and false are respectively used for representing that the variable var is positioned on the left and right of a equal sign in a statement corresponding to the node, and VRI is value domain information corresponding to the variable var.
Preferably, the interval information flowing into the node is represented by the following formula:
inMap={<var,VRI>}
in the formula, inMap is interval information flowing into the node, var is a variable, and VRI is value range information corresponding to the variable var.
In another aspect, the present invention provides an interval information analyzing apparatus, including: at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, which when called by the processor are capable of performing the method as previously described.
In yet another aspect, the invention features a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the method as previously described.
The interval information analysis method provided by the invention is based on the interval information and guard condition of the predecessor nodes by applying a recursion method, so that the interval information of any node in the value dependency graph is acquired, and the analysis efficiency and the analysis progress of the value dependency graph are improved.
Drawings
Fig. 1 is a schematic flow chart of a method for analyzing interval information according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the existence of nodes in a value dependence graph according to an embodiment of the present invention;
FIG. 3 is a value dependency graph according to an embodiment of the present invention;
FIG. 4 is a value dependency graph of a univariate cycle in accordance with an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an interval information analysis device according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Fig. 1 is a schematic flow chart of a method for analyzing interval information according to an embodiment of the present invention, and as shown in fig. 1, the method for analyzing interval information includes: s1, for any node in the value dependency graph, obtaining the interval information of the predecessor node flowing into the node according to the interval information of any predecessor node of the node and the guard condition between the node and the predecessor node; s2, obtaining the interval information of the node according to the interval information of each predecessor node of the node flowing into the node and the type of the node.
Specifically, fig. 2 is a schematic diagram illustrating the existence form of nodes in a value dependency graph according to an embodiment of the present invention, as shown in fig. 2, a dependency relationship (dependency) exists between any node and its predecessor node in the value dependency graph, and a guard condition (guard) is an attribute of the dependency relationship, where the guard condition includes a relationship from definition to use of a variable included between the node and its predecessor node, a relationship from definition to use of an array element of an array, and the like. The condition that the value dependency information of the predecessor node can be transmitted to the node, namely the guard condition, is satisfied. Acquiring the interval information of the node according to the interval information of the precursor node, and specifically comprising the following steps:
firstly, for any node in the value dependency graph, a precursor node set of the node is obtained, one precursor node is arbitrarily selected from the precursor node set, and the interval information of the precursor node and the guard relationship between the node and the precursor node are obtained.
And secondly, acquiring the interval information of the predecessor node flowing into the node according to the interval information of the predecessor node and the guard relationship between the node and the predecessor node.
And then, acquiring the interval information of each precursor node of the nodes flowing into the node according to the method.
And finally, acquiring the interval information of the node according to the interval information of each precursor node flowing into the node and the type of the node.
In the embodiment of the invention, the recursion method is applied, and based on the interval information and guard condition of the predecessor nodes, the acquisition of the interval information of any node in the value dependency graph is realized, and the analysis efficiency and the analysis progress of the value dependency graph are improved.
Based on the foregoing specific embodiment, in a method for analyzing interval information, the step S1 further includes: obtaining the interval information of any precursor node of the nodes flowing into the node according to the following formula:
predsMap[i](vnode)=outMap[i]∩guardMap[i]
in the formula, predsMap [ i ] (vnode) is the interval information of the i-th predecessor node of the node flowing into the node, outMap [ i ] is the interval information of the i-th predecessor node of the node, and guardMap [ i ] is the interval information of the guard condition between the node and the i-th predecessor node of the node.
Specifically, the interval information of any predecessor node and the interval information of the guard relationship between the node and the predecessor node are obtained, the intersection of the two interval information is taken, and the intersection is used as the interval information of the predecessor node flowing into the node.
For example, in the C language, the program getIntervalOfPreNode for acquiring the interval information of any predecessor node flowing into the node is as follows:
Figure BDA0001701141360000051
Figure BDA0001701141360000061
in the above program, the functions getintersalofloopprenode (outMap, guard) and getintersalofnormalprenode (outMap, guard) have similar processes, and both are to first solve the interval information guardMap of the guard condition, and perform an intersection operation on the interval information outMap of the guard condition and the precursor node to obtain a final result. In contrast, the function getIntervalOfLoopPrenode is for solving the outMap ≧ guardMap in the conventional case where there is no intra-loop jump to out-loop, and getIntervalOfNormalPrenode is for solving the outMap ≦ guardMap in the case where there is an intra-loop jump to out-loop.
In the embodiment of the invention, the interval information of any predecessor node flowing to the current node is obtained by taking the intersection, and conditions are provided for obtaining the interval information of the current node.
Based on any one of the above embodiments, in a method for analyzing interval information, the step S2 further includes: s21, obtaining the interval information flowing into the node according to the following formula:
Figure BDA0001701141360000071
wherein inMap (vnode) is the interval information flowing into the node, and predsMap [ i ] is the interval information flowing into the node from the ith predecessor node of the node; and S22, acquiring the interval information of the node according to the interval information flowing into the node and the type of the node.
Specifically, first, after the section information of each predecessor node of the node flowing into the node is acquired, the union of the section information of each predecessor node flowing into the node is used as the section information flowing into the node.
And then, acquiring the interval information of the node according to the interval information flowing into the node and the type of the node.
For example, in the C language, the acquisition procedure of the interval information inmap (vnode) flowing into any node is as follows:
the method includes the steps that For each node, pred, belongs to preds do// traversal predecessor node set preds, and each node is obtained, if pred is the same as the current node, the pred is indicated to have self-circulation, and the node is not considered in this link.
3.Continue
4.End
Tmp ← getIntervalOfPreNode (pre)/section information tmp for obtaining precursor node pre
And 6, Foreach var belongs to tmp and keySet ()// realizing the process of summarizing the information of each predecessor node flowing to the current node interval in the formula, namely the process of acquiring the intersection of the predecessor node interval information and guard condition interval information. And if the original of the interval information in the current inMap is not null, taking the result of the union of the rs and the original as the interval information corresponding to the var of the inMap.
Get (var)// for the variable var involved in each tmp, take the interval information rs of var in tmp.
Original ← inMap.get (var)// extracting the section information original of var in inMap.
If original! If the interval information of the current node is null, rs is taken as the interval information of var of inMap.
10.rs←union(rs,original)
11.End
12.inMap.put(var,rs)
13.End
14.End
In the above procedure, the function getIntervalOfPreNode is used to implement outMap [ i ], # guardMap [ i ], that is, to obtain the interval information predistmap [ i ] of the ith predecessor node of the current node flowing to the current node.
In the embodiment of the invention, the interval information of all predecessor nodes flowing to the current node is obtained by taking the union set, and conditions are provided for obtaining the interval information of the current node.
Based on any one of the above embodiments, in a method for analyzing interval information, the step S22 further includes: if the interval information flowing into the node is an empty set, the interval information of the node is the empty set; otherwise, if the predecessor node of the node comprises the node, acquiring information before the node cycle according to the interval information flowing into the node and the type of the node, and acquiring the interval information of the node based on the information before the cycle and the guard condition of the self-cycle; and if the precursor node of the node does not comprise the node, acquiring the interval information of the node based on the interval information flowing into the node and the type of the node.
Specifically, obtaining the section information of the node by the section information flowing into the node further includes:
firstly, judging whether the interval information flowing into the node is empty:
if the interval information flowing into the node is empty, it indicates that no variable interval information flows into the node, that is, the node is unreachable, and the interval information of the node is set to be empty;
if the section information flowing into the node is not empty, further judging whether the predecessor node of the node comprises the node, namely whether the node has self-circulation:
if the predecessor node of the node contains the node, namely the node has self-circulation, the node and the guard condition of the self-circulation are taken as a module, firstly, the information before the circulation of the node is obtained according to the interval information flowing into the node and the type of the node, then, the node and the guard condition of the self-circulation are operated in the module based on the information before the circulation of the node, and the operation result of the node is taken as the interval information;
if the predecessor node of the node does not contain the node, that is, the node does not have self-circulation, the interval information of the node is obtained according to the interval information flowing into the node and the type of the node.
For example, in the C language, the following code is applied to acquire the interval information outMap of the node:
Figure BDA0001701141360000091
in the above code, based on the recursive idea, the interval information of the nodes in the value dependency graph is calculated by using a Lazy Initialization (Lazy Initialization).
In the embodiment of the invention, the acquisition of the node interval information is realized by judging the interval information flowing into the node and judging the self-circulation of the node, which is beneficial to the improvement of the analysis efficiency.
Based on any of the above embodiments, an interval information analysis method, where the types of the nodes are assignment nodes, function call nodes, function entry nodes, condition judgment nodes, or return statement nodes.
Specifically, the assignment node (assignnodee) corresponds to an assignment statement in a program. For example, in the value dependency graph, the left value is used as a main key to express the assignment relationship, and only one assignment node is established. If the node is an assignment node, the interval information of the node is obtained according to the analog calculation of the interval information flowing into the node.
For example, a is b + c, and the section information of a is acquired by performing arithmetic operation using the section information of b and the section information of c in the section information inMap flowing into the node.
For another example, a is f (5), and the return term node of the f () function is acquired from the section information inMap flowing into the node, and the section information of the return term node of the f () function is given to a.
The function call node (ParamAtCall) corresponds to a function call statement in a program. For example, the function call statement a ═ call (b, c), corresponds to the function call nodes a @ a ═ call (b, c), b @ a ═ call (b, c), and c @ a ═ call (b, c) in the value dependency graph. The value dependency graph is used for expressing a guard condition of a value, so that a value dependency point needs to be established for any variable, a @ a ═ call (b, c) expresses redefinition of a for a return result, and b @ a ═ call (b, c) and c @ a ═ call (b, c) express use of parameters b and c. If the node is a function calling node, acquiring interval information of parameters of function calling in the node according to the interval information flowing into the node, and taking the interval information of the parameters as the interval information of the node.
The function entry node (ParamAtEntry) corresponds to a definition statement of a called function in a program. If the node is a function entry node and the function call is a variable, extracting the interval information of the variable from the interval information flowing into the node, and taking the interval information of the variable as the interval information of the node; and if the node is a function entry node and the function call is a constant, taking the interval information of the constant as the interval information of the node.
The condition judgment node (SwitchNode) corresponds to a condition judgment statement in a program. For example if (x >0), in the value dependency graph, as the dependency condition occurs between nodes, the same dependency condition may occur multiple times or in a negative manner, but the correspondence of the node is created only once. Because the condition judgment node only judges the condition and does not change the interval information, the interval information flowing into the condition judgment node is the interval information of the condition judgment node.
The return statement node (ReturnNode) corresponds to a return statement in a program. For example, return a + b corresponds to the returning tone nodes a @ return + b and b @ return + b in the value dependency graph, and the use of different variables is expressed by constructing value dependency points equal to the number of the variables in the value dependency graph. The return statement node is usually used as a precursor node of the function call node, and the interval information of the returned value is transmitted to the function call. Since the return statement node returns a value only at the function borrowing position without changing the interval information, the interval information flowing into the return statement node is the interval information of the return statement node.
Based on any of the above embodiments, a method for analyzing interval information, where the interval information of any node is shown as follows:
outMap={<var,isLeft,VRI>}
in the formula, var is a variable, bool is true or false, true and false are respectively used for representing that the variable var is positioned on the left and right of the equal sign in the statement corresponding to the node, and VRI is value domain information corresponding to the variable var. The outMap is interval information of a node, and is one-to-one mapping from an even pair < var, isLeft to variable value domain information VRI corresponding to the variable, wherein the even pair < var is formed by a variable var and a Boolean value isLeft which represents that the variable appears on the left side or the right side of an equal sign in a statement.
The interval information flowing into the node is shown as follows:
inMap={<var,VRI>}
in the formula, var is a variable, and VRI is value range information corresponding to the variable var. inMap is the interval information flowing into the node, and is a one-to-one mapping from the variable var to the variable value range information VRI corresponding to the variable. And obtaining value range information VRI corresponding to the variable by inMap when each variable var is given.
For example, fig. 3 is a value dependency graph according to an embodiment of the present invention, and the following is the corresponding code of fig. 3:
1.void foo()
2.{
3.int i;
4.i=1;
5.i=i+1;
6.}
thus, for node n4, section information inMap flowing into node n4 is { < i, [1,1] >, and section information outMap of node n4 is { < i, false, [1,1] >, < i, true, [2,2] >.
Based on any of the above embodiments, a method for analyzing interval information, where if a predecessor node of the node includes the node, obtaining information before cycle of the node according to the interval information flowing into the node and the type of the node, and obtaining the interval information of the node by applying the information before cycle and a guard condition of self-cycle, further includes:
if the predecessor node of the node contains the node, namely the node has self-circulation, the node and the guard condition of the self-circulation are taken as a module, firstly, the information before the circulation of the node is obtained according to the interval information flowing into the node and the type of the node, then, the node and the guard condition of the self-circulation are operated in the module based on the information before the circulation of the node, and the operation result of the node is taken as the interval information.
Running the guard condition of the node and its self-loop inside the module, further comprising:
for the self-loop controlled by the single variable, the result correctness is ensured by a mode of simulating loop statement execution; for the self-loop controlled by the multiple variables, the loop is taken as a condition judgment statement to be executed only once, and the solution is carried out by combining the dependence condition of the self-loop, so that the low consumption of space-time overhead is guaranteed.
For example, fig. 4 is a value dependency diagram of a single variable loop according to an embodiment of the present invention, and the following is the corresponding code of fig. 4:
Figure BDA0001701141360000121
Figure BDA0001701141360000131
according to the code and fig. 4, while the while loop in line 7 is embodied on the self loop of node n4, when solving for the interval information of n4, the interval information flowing into n4 is first obtained, and the transfer of the value of n4 itself to itself is not considered.
For the node n4, the section information inMap flowing into n4 is { < a, [1,1] >, and the guard condition that n4 and n4 point to n4 is used as a module to solve the loop information after the loop execution, at this time, the outMap of n4 is equivalent to the value range information of the variable after the loop execution is completed, and then the value range information is transmitted to the subsequent node of n 4.
Since the conditions of the loop here are a <5, the VRI of the initial a is [1,1], a <5 is established, and the operation of node a + ═ 1 of n4 is continuously performed; VRI of a becomes [2,2], a <5 is still true, and the operation of node a + ═ 1 of n4 is continuously executed; VRI of a becomes [3,3], a <5 is still true, and the operation of node a + ═ 1 of n4 is continuously executed; the VRI of a is changed into [4,4], a <5 is still established, and the operation of node a + ═ 1 of n4 is continuously executed; at this time, the VRI of a is changed to [5,5], a <5 does not hold, the module is executed, and the outMap corresponding to the module is { < a, true, VRI: [5,5] > ] }.
Then the interval information of n4 is transmitted to n6 and n7, the interval information of n6 is transmitted to n7, and the proposed method according to the embodiment of the present invention can solve inMap of n7 node as { < a, false, VRI { [5,5] >, < b, false, VRI: [5,5] >, < c, true, VRI: [10,10] >, which is completely consistent with the effect of the actual execution of the program. Therefore, the embodiment of the invention has more accurate processing mode of the circulation controlled by the single variable.
For the circulation controlled by the multiple variables, the circulation is taken as a condition judgment statement to be processed and is solved by combining the constraint condition of the guard condition. In the embodiment of the present invention, the loop is still treated as a module, and the loop is executed once first, and the interval information of the module is stored and set as the interval information outMap of the node.
Assuming the condition of the loop is loopCondition, then the guard condition for jumping from the module to its successor node should be! loopCondition. And then, obtaining interval information guardMap of the guard condition according to the guard condition, then performing intersection by using outMap and guardMap, and taking the intersection result as the interval information which is basically and quickly transmitted to the subsequent nodes of the current cycle.
The multi-variable control loop calculation method provided by the embodiment of the invention effectively improves the processing efficiency in practical engineering application, and simultaneously limits the interval information transmitted to the subsequent nodes by the loop module by using the guardMap, thereby ensuring the conservatism of analysis.
Fig. 5 is a schematic structural diagram of an interval information analysis device according to an embodiment of the present invention, and as shown in fig. 5, the interval information analysis device includes: at least one processor 501; and at least one memory 502 communicatively coupled to the processor 501, wherein: the memory 502 stores program instructions executable by the processor 501, and the processor 501 calls the program instructions to perform the interval information analysis method provided by the above embodiments, for example, the method includes: s1, for any node in the value dependency graph, obtaining the interval information of the predecessor node flowing into the node according to the interval information of any predecessor node of the node and the guard condition between the node and the predecessor node; s2, obtaining the interval information of the node according to the interval information of each predecessor node of the node flowing into the node and the type of the node.
An embodiment of the present invention further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores a computer instruction, and the computer instruction causes a computer to execute the interval information analysis method provided in the corresponding embodiment, where the method includes: s1, for any node in the value dependency graph, obtaining the interval information of the predecessor node flowing into the node according to the interval information of any predecessor node of the node and the guard condition between the node and the predecessor node; s2, obtaining the interval information of the node according to the interval information of each predecessor node of the node flowing into the node and the type of the node.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, the method of the present application is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. An interval information analysis method, characterized by comprising:
s1, for any node in the value dependency graph, obtaining the interval information of the predecessor node flowing into the node according to the interval information of any predecessor node of the node and the guard condition between the node and the predecessor node;
the guard condition is an attribute of a dependency relationship existing between any node in the value dependency graph and a predecessor node of the any node; the condition that the value dependency information of the predecessor node can be transmitted to any node is that the guard condition is satisfied;
s2, obtaining the interval information of the node according to the interval information of each predecessor node of the node flowing into the node and the type of the node;
the interval information of any node is shown as follows:
outMap={<var,isLeft,VRI>};
in the formula, outMap is interval information of a node, var is a variable, isLeft is true or false, true and false are respectively used for representing that the variable var is positioned on the left and right of a equal sign in a statement corresponding to the node, and VRI is value domain information corresponding to the variable var;
the step S1 further includes:
obtaining the interval information of any precursor node of the nodes flowing into the node according to the following formula:
predsMap[i](vnode)=outMap[i]∩guardMap[i];
in the formula, predsMap [ i ] (vnode) is the interval information of the i-th predecessor node of the node flowing into the node, outMap [ i ] is the interval information of the i-th predecessor node of the node, and guardMap [ i ] is the interval information of the guard condition between the node and the i-th predecessor node of the node.
2. The method according to claim 1, wherein the step S2 further comprises:
s21, obtaining the interval information flowing into the node according to the following formula:
Figure FDA0003018144890000021
wherein inMap (vnode) is the interval information flowing into the node, and predsMap [ i ] is the interval information flowing into the node from the ith predecessor node of the node;
and S22, acquiring the interval information of the node according to the interval information flowing into the node and the type of the node.
3. The method according to claim 2, wherein the step S22 further comprises:
if the interval information flowing into the node is an empty set, the interval information of the node is the empty set;
otherwise, if the predecessor node of the node comprises the node, acquiring information before the node cycle according to the interval information flowing into the node and the type of the node, and acquiring the interval information of the node based on the information before the cycle and the guard condition of the self-cycle; and if the precursor node of the node does not comprise the node, acquiring the interval information of the node based on the interval information flowing into the node and the type of the node.
4. The method of claim 2, wherein the type of the node is an assignment node, a function call node, a function entry node, a condition judgment node, or a return statement node.
5. The method of claim 4,
if the node is an assignment node, performing analog calculation according to the interval information flowing into the node to obtain the interval information of the node;
if the node is a function calling node, acquiring interval information of parameters of function calling in the node according to the interval information flowing into the node, and taking the interval information of the parameters as the interval information of the node;
if the node is a function entry node and the function call is a variable, extracting the interval information of the variable from the interval information flowing into the node, and taking the interval information of the variable as the interval information of the node;
if the node is a function entry node and the function call is a constant, taking the interval information of the constant as the interval information of the node;
if the node is a condition judgment node or a return statement node, the interval information of the node is the interval information flowing into the node.
6. The method according to any one of claims 2 to 5, wherein the interval information flowing into the node is represented by the following formula:
inMap={<var,VRI>};
in the formula, inMap is interval information flowing into the node, var is a variable, and VRI is value range information corresponding to the variable var.
7. An interval information analysis apparatus, characterized by comprising:
at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
8. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 6.
CN201810634685.3A 2018-06-20 2018-06-20 Interval information analysis method Active CN109002684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810634685.3A CN109002684B (en) 2018-06-20 2018-06-20 Interval information analysis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810634685.3A CN109002684B (en) 2018-06-20 2018-06-20 Interval information analysis method

Publications (2)

Publication Number Publication Date
CN109002684A CN109002684A (en) 2018-12-14
CN109002684B true CN109002684B (en) 2021-08-06

Family

ID=64601452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810634685.3A Active CN109002684B (en) 2018-06-20 2018-06-20 Interval information analysis method

Country Status (1)

Country Link
CN (1) CN109002684B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110244953A (en) * 2019-05-21 2019-09-17 北京大学 The Novel Interval Methods and device of java applet

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090104275A (en) * 2008-03-31 2009-10-06 한국항공우주산업 주식회사 Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof
EP2565904A1 (en) * 2011-09-05 2013-03-06 Commissariat à l'Énergie Atomique et aux Énergies Alternatives Method and apparatus for estimating a molecular mass parameter in a sample
CN107153610A (en) * 2017-04-28 2017-09-12 腾讯科技(深圳)有限公司 A kind of program statement error-detecting method and device
CN107168760A (en) * 2017-05-04 2017-09-15 腾讯科技(深圳)有限公司 The change quantity measuring method and device of language
CN108053033A (en) * 2017-12-27 2018-05-18 中南大学 A kind of function calling sequence generation method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198016B (en) * 2013-03-26 2016-08-03 哈尔滨工业大学 Based on combining the software error localization method relying on probabilistic Modeling

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090104275A (en) * 2008-03-31 2009-10-06 한국항공우주산업 주식회사 Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof
EP2565904A1 (en) * 2011-09-05 2013-03-06 Commissariat à l'Énergie Atomique et aux Énergies Alternatives Method and apparatus for estimating a molecular mass parameter in a sample
CN107153610A (en) * 2017-04-28 2017-09-12 腾讯科技(深圳)有限公司 A kind of program statement error-detecting method and device
CN107168760A (en) * 2017-05-04 2017-09-15 腾讯科技(深圳)有限公司 The change quantity measuring method and device of language
CN108053033A (en) * 2017-12-27 2018-05-18 中南大学 A kind of function calling sequence generation method and system

Also Published As

Publication number Publication date
CN109002684A (en) 2018-12-14

Similar Documents

Publication Publication Date Title
US10754709B2 (en) Scalable task scheduling systems and methods for cyclic interdependent tasks using semantic analysis
US20050240546A1 (en) Forward-chaining inferencing
CN107679625B (en) The distributed system and its method of machine learning are executed for data record
US11568129B2 (en) Spreadsheet recalculation algorithm for directed acyclic graph processing
CN111752571A (en) Program upgrading method, device, equipment and storage medium
CN114840322B (en) Task scheduling method and device, electronic equipment and storage
EP3970012A1 (en) Scheduling operations on a computation graph
CN112346730B (en) Intermediate representation generation method, computer equipment and storage medium
US20220101194A1 (en) Method, electronic device, and computer program product for processing machine learning model
US11461291B2 (en) Method, electronic device and computer program product for processing machine learning model
CN109002684B (en) Interval information analysis method
US20010056440A1 (en) Parallel execution mechanism for spreadsheets
US8881117B2 (en) Structural analyser
CN116167445B (en) Quantum measurement mode processing method and device and electronic equipment
CN112506602A (en) Page generation method and device, electronic equipment and computer readable medium
CN108984843B (en) Interval information analysis method based on guard calculation
CN115167865A (en) Algorithm pipeline arranging method and device, electronic equipment and storage medium
US11714618B2 (en) Streaming compiler for automatic adjoint differentiation
CN116187464B (en) Blind quantum computing processing method and device and electronic equipment
CN116187463B (en) Quantum measurement mode-to-quantum circuit compiling method and device and electronic equipment
CN114579137B (en) Page rendering method and device, computer equipment and storage medium
US20230419145A1 (en) Processor and method for performing tensor network contraction in quantum simulator
Pogrebnoy Constructing graph models for software system development and analysis
Angelopoulos Notes on the Implementation of FAM.
US8055483B1 (en) System and method for performing hybrid expression evaluation

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