CHSM
Concurrent Hierarchical State Machine

Examples

Both C++ and Java examples are included in the distribution; however, only the C++ examples are shown here. (Other than the obvious syntax differences between C++ and Java, there is little difference between the sets of examples.)

  1. Hello world
    What would any programming language be without having this as its first example?

  2. Vending machine
    Simulates a simple vending machine wherein you deposit coins until you have enough to buy a particular item then select the item.

  3. Making water molecules
    Using derived classes, extend CHSM to approximate Petri net functionality. In this case, make some water molecules: H2O.

  4. Microwave oven
    Simulates a simple microwave oven wherein you set the cooking time, power level, then cook food.

Copyright © 1996-2013 by Paul J. Lucas and Fabio Riccardi.
CHSM is available under the terms of the GNU General Public License. Commercial licenses are also available.
Last updated: July 2, 2013