Method for implementing program, method for verifying program result, devices and system
A technology for executing programs and source programs, which is applied in the computer field, can solve problems such as the inconvenience of debugging and deploying programs, and affect the efficiency of developing programs, so as to achieve the effects of convenient debugging and deployment, convenient source programs, and improved efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0052] Such as figure 1 As shown, the embodiment of the present invention provides a method for executing a program, including:
[0053] 101: Obtain instruction information from the text file of the source program;
[0054] Wherein, for the detailed process of obtaining instruction information from the text file of the source program, refer to 201 of Embodiment 2, which will not be repeated here.
[0055] 102: Establish a serial queue according to the instruction information;
[0056] Wherein, for the detailed process of establishing the serial queue according to the instruction information, refer to 202 of Embodiment 2, which will not be repeated here.
[0057] 103: Construct a parallel sequence diagram according to the serial queue;
[0058] Wherein, for the detailed process of constructing the parallel sequence diagram according to the serial queue, refer to 203 of Embodiment 2, which will not be repeated here.
[0059] 104: Execute the source program in parallel accord...
Embodiment 2
[0064] Such as figure 2 As shown, the embodiment of the present invention provides a method for executing a program, including:
[0065] 201: Scan the text file of the source program to obtain instruction information;
[0066] Wherein, the source program is composed of one or more program blocks, the program block is composed of one or more Networks (delimiters), and the Network is composed of one or more instructions.
[0067] Specifically, sequentially scan each line of instructions in the text file of the source program, read the program block to which the instruction belongs, the Network to which the instruction belongs, the line number of the instruction in the Network to which the instruction belongs, the name of the instruction, and the operand of the instruction; obtain the storage of the operand Space, analyze the read and write properties of the operand; estimate the execution time of the instruction, sum the execution time of the instructions included in the Netwo...
Embodiment 3
[0142] The embodiment of the present invention provides a method for verifying program results. In Embodiment 2, the CPU records the execution time of each node of the source program, sorts the nodes included in the source program according to the time, and obtains the sequence in which the nodes are executed That is, the program execution sequence. This embodiment verifies the program execution sequence to determine whether the result of executing the source program in Embodiment 2 is correct. Such as Figure 9 As shown, the method includes:
[0143] 301: Convert each node in the parallel sequence diagram into a transition node in the Petri net model;
[0144] Among them, the parallel sequence diagram is the parallel sequence diagram obtained in Example 2. The Petri net model is composed of two types of nodes, transition (Transition) and place (Place), and the nodes directly connected before and after the transition node are all library nodes. The connected nodes are all tr...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com