CHSM
Concurrent Hierarchical State Machine

Examples

C++, Java, and Groovy examples are included in the distribution. The Groovy examples are shown here. (Other than the obvious syntax differences between C++, Java, and Groovy, 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. Microwave oven
    Simulates a simple microwave oven wherein you set the cooking time, power level, then cook food. (For now, please see the description of the oven's operation and its graphical statechart on the C++ example page.)

Copyright © 2007-2013 by Paul J. Lucas and Fabio Riccardi
CHSM/Groovy is available under a BSD-style license.
Last updated: July 2, 2013