Controlled philosophers

This example demostrates a simple application of synchronous ports. We have replaced the transitions start eating and stop eating in DPhilosopher by synchronous ports startEating and stopEating in CPhilosopher. The main class CDinner is specified in such a way that its instances can control starting and stoping eating in instances of CPhilosopher.

Let us note a special feature of language PNtalk here - redefinition of a transition by a synchronous port.

\epsfig{file=phils000a.eps} \epsfig{file=phils000b.eps}



Vladimir Janousek
2001-01-15