Patent ID: 7100164

Claim:
A method performed by a data processing system having a memory, comprising the steps of: inputting a concurrent control flow graph (CCFG); scheduling the CCFG to produce a scheduled CCFG; selecting, while a first thread is running, a first node of the scheduled CCFG; producing a first copy of the first node for a sequential control flow graph (SCFG); determining that the first node is in a second thread, different from the first thread; coupling, to each of a plurality of nodes of the SCFG indicated by the first thread, a node that saves a representation, of a flow of control state of the first thread, in a first state variable, wherein the first state variable is not used to save a representation of a flow of control state of the second thread; and coupling, as a successor node to each node that saves a representation, the same successor node for resuming a flow of control state of the second thread by reading a second state variable and choosing an edge to a node to be executed next in the second thread, wherein the successor node has an outgoing edge to each node that can be executed next in the second thread and the second state variable is not used to save a representation of a flow of control state of the first thread.