Created
April 17, 2010 01:42
-
-
Save bakineggs/369171 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| eq pSpawn = --- should output 1-10 and 11-20 interleaved | |
| function main() { | |
| spawn(for x = 11 to 20 do write(x);) | |
| for x = 1 to 10 do write(x); | |
| } . | |
| mb configuration < T > | |
| < threads > | |
| < thread > | |
| < k > K </ k > | |
| < fstack > .List </ fstack > | |
| < xstack > .List </ xstack > | |
| < env > .Map </ env > | |
| </ thread > | |
| </ threads > | |
| < genv > .Map </ genv > | |
| < store > .Map </ store > | |
| < in > .List </ in > | |
| < out > .List </ out > | |
| < nextLoc > 0 </ nextLoc > | |
| </ T > : KSentence . | |
| mb rule | |
| < thread >... | |
| < k > [spawn S => .K] ...</ k > | |
| < env > Env </ env > | |
| ...</ thread > | |
| [.Bag => | |
| < thread > | |
| < k > S </ k > | |
| < env > Env </ env > | |
| < fstack > .List </ fstack > | |
| < xstack > .List </ xstack > | |
| </ thread > | |
| ] : KSentence . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment