[Haskell-cafe] Implementing pi-calculus using STM

Derek Elkins derek.a.elkins at gmail.com
Fri Oct 17 21:41:36 EDT 2008


On Fri, 2008-10-17 at 14:56 +0100, Edsko de Vries wrote:
> 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.

Typically replication is restricted to replicated input for reasons akin
to this.



More information about the Haskell-Cafe mailing list