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

Inactive Publication Date: 2009-11-04
TSINGHUA UNIV
View PDF0 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In the existing method of serially executing programs, when performing relatively complex control functions, the complete program must be divided into multiple sections or written on multiple PLCs, which greatly affects the efficiency of programmers in developing programs, and brings great difficulties for debugging and Deployment procedure brings inconvenience

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for implementing program, method for verifying program result, devices and system
  • Method for implementing program, method for verifying program result, devices and system
  • Method for implementing program, method for verifying program result, devices and system

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for implementing a program, a method for verifying the program result, devices and a system, belonging to the field of computers. The method for implementing the program comprises the steps of obtaining instruction information from a text file of a source program; establishing a serial queue according to the instruction information; constructing a parallel sequence diagram according to the serial queue; and implementing the source program in parallel according to the parallel sequence diagram. The device for implementing the program comprises an acquisition module, an establishment module, a construction module and an implementation module. The device for verifying the program result comprises a creation module, a first setting module, a second setting module, a mapping module, a first judging module and a second judging module. The system for implementing the program comprises the device for implementing the program and the device for verifying the program result. The invention can improve the program development efficiency and facilitate scheduling and deploying the program.

Description

technical field [0001] The invention relates to the computer field, in particular to a method for executing a program, a method, a device and a system for verifying the result of the program. Background technique [0002] PLC (Programmable Logic Controller, Programmable Logic Controller) adopts a cyclic scanning execution mode. This method is divided into three phases: input sampling, user program execution and putting into operation. Completing the above three stages is called a scan cycle. Among them, the programs running on the PLC are serially executed in accordance with the execution mode of cyclic scanning. [0003] Since the PLC hardware has a certain limit on the length of the scan cycle, when performing relatively complex control functions, the method of serially executing the program cannot execute the entire program in a single scan cycle, and the programmer must divide the original complete program into Multi-segment, the control function is completed by execu...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/46G06F17/50
Inventor 徐华温赟杨甲东万伟
Owner TSINGHUA UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products