This is a log for my thesis study on Stochastic Pi-Calculus Machine (SPiM).
Here is a sample code for implementing hill-type equation in SPiM:
directive sample 10.0 1000
directive plot sender();receiver()
directive graph
new comm@1.0:chan(float)
let sender(n:float) = (
!comm(n);
sender(n/2.0)
)
and receiver() = (
do delay@1.0; receiver()
or ?comm(n); delay@n
)
run (sender(1.0)|500 of receiver())
You will get a curve looks like this:
The receiver()’s degrade time is controlled by n which becomes half fold every stochastic time period. For more complex equations I think you can modify sender() and pass your private channel for communication though the parameters. Then the result will not be seen by any other processes, hopefully:). But I haven’t test it yet.


March 2nd, 2008 at 7:27 am
nice,good method.
[Reply]