in scala/concurrent
object pilib

object pilib
extends Object
with ScalaObject

Library for using Pi-calculus concurrent primitives in Scala. As an example, the definition of a two-place buffer using the pilib library looks like:
def Buffer[a](put: Chan[a], get: Chan[a]): unit = {
  def B0: unit = choice ( put * { x => B1(x) } );    
  def B1(x: a): unit = choice ( get(x) * B0, put * { y => B2(x, y) } );
  def B2(x: a, y: a): unit = choice ( get(x) * B1(y) );
  B0
}
Author:
Vincent Cremet, Martin Odersky
See Also:
PiLib: A Hosted Language for Pi-Calculus Style Concurrency

Field Summary
final val spawn: Spawn

Method Summary
final def choice[a](s: GP[a]*): a
     Pi-calculus non-deterministic choice.

Trait Summary
  trait Spawn()
     Run several processes in parallel using the following syntax: spawn < p_1 | ...

Class Summary
  class Chan[a]()
     Name on which one can emit, receive or that can be emitted or received during a communication.
  class GP[a](n: UChan, polarity: Boolean, v: Any, c: (Any) => a)
     Typed guarded process.
  class Product[a](c: Chan[a], v: a)
case class Sum(gs: List[UGP])
  class UChan()
     Untyped channel.
case class UGP(n: UChan, polarity: Boolean, v: Any, c: (Any) => Any)
     An untyped guarded process.

Field Detail

spawn

  final val spawn: Spawn
Method Detail

choice

  final def choice[a](s: GP[a]*): a
Pi-calculus non-deterministic choice.