QUASAR : Examples


Case study : The Chameneos

Presentation :

This example has been presented in Chameneos, a Concurrency Game for Java, Ada and Others In Proceedings ACS/IEEE International Conference on Computer Systems and Applications 2003.

In this example, a Chameneos enter in a mall. If the Chameneos is the first one to enter, he waits for a second one. When they are two, they cooperate and change their color according to the color of the other Chameneos. Then they go out of the mall.

This case is another illustration of the egg-shell model. When the first Chameneos enter in the mall he changes First_Call to False, and wait until First_Call became True. With the protected object semantic, you will never follow the execution were all Chameneos are in the mall but still waiting for a second Chameneos (it happens when Cooperate entry is always executed first).

Major Ada language components added :

Downloads :

Source code / Pdf version

last update : 10/02/2004