
Hi, (Note: assumes knowledge of pi-calculus.) I am playing with writing a simple interpreter for the pi-calculus using STM. The implementation of most of the operators of the pi- calculus is straightforward, but I am unsure on how to implement the replication operator. The interpretation of !P should be the interpretation of the infinite number of parallel processes P | P | P ... . I am implementing parallel processes using the fork operation, but spawning an infinite amount of processes -- even if the (infinite) majority of them all immediately lock -- seems like a bad idea. So I would prefer to spawn one P, and as soon as the thread that interprets P makes any progress at all, spawn another, and so on. I'm not too sure however how to achieve this. Any ideas? Edsko