summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorcremet <cremet@epfl.ch>2004-09-15 09:29:01 +0000
committercremet <cremet@epfl.ch>2004-09-15 09:29:01 +0000
commit42ea1b69568f3bb80c80d302cf609273dcdcc260 (patch)
tree819795e3ba4183fa4db7c9a9938915690c392a92 /sources
parent0516acad01c32c120ad929d8fe80f71798322375 (diff)
downloadscala-42ea1b69568f3bb80c80d302cf609273dcdcc260.tar.gz
scala-42ea1b69568f3bb80c80d302cf609273dcdcc260.tar.bz2
scala-42ea1b69568f3bb80c80d302cf609273dcdcc260.zip
- I added an example and a link to the Pilib pa...
- I added an example and a link to the Pilib paper in the comments of the library.
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/concurrent/pilib.scala14
1 files changed, 13 insertions, 1 deletions
diff --git a/sources/scala/concurrent/pilib.scala b/sources/scala/concurrent/pilib.scala
index 0bcd19ad45..0562d9646f 100644
--- a/sources/scala/concurrent/pilib.scala
+++ b/sources/scala/concurrent/pilib.scala
@@ -1,7 +1,19 @@
package scala.concurrent;
/**
-* Library for using Pi-calculus concurrent primitives in Scala.
+* Library for using Pi-calculus concurrent primitives in Scala. As an example,
+the definition of a two-place buffer using the <b>pilib</b> library looks like:
+*<pre>
+*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
+*}
+*</pre>
+*
+* @see <a href="http://scala.epfl.ch/docu/related.html">PiLib: A Hosted Language for Pi-Calculus Style Concurrency</a>
+* @author Vincent Cremet, Martin Odersky
*/
object pilib {