| CPC G06F 3/0659 (2013.01) [G06F 3/0604 (2013.01); G06F 3/0673 (2013.01); G06F 8/433 (2013.01); G06F 9/467 (2013.01); G06F 11/3632 (2013.01)] | 20 Claims |

|
1. A program detection method, comprising:
receiving, from a user, a program running in a weak memory environment;
calculating a first interval between a first operation in a first thread of the program and a second operation in the first thread, and a second interval between a third operation in a second thread of the program and a fourth operation in the second thread, wherein the first operation and the third operation are a first pair of read and write operations performed on a first variable, wherein the second operation and the fourth operation are a second pair of read and write operations performed on a second variable, wherein the first operation and the second operation are operations performed on different variables, and wherein the third operation and the fourth operation are operations performed on different variables; and
obtaining, based on a query parameter, the first interval, the second interval, and the program, a result of the program,
wherein the query parameter indicates a maximum interval between two operations on which reordering occurs and that are of the program.
|