Finite State Machine - Simulation

Finite State Machine - Simulation

Xholon is an open source general-purpose modeling and simulation tool, that supports state machines in several ways.

  • Xholon supports an XML syntax that parallels how state machines are defined in the Unified Modeling Language (UML) and in the Systems Modeling Language (SysML).
  • Xholon can transform UML models into Xholon models, that can then be simulated and executed using the Xholon runtime framework. Currently, two UML tools are supported, MagicDraw UML (UML 2), and Poseidon for UML (UML 1). Other UML 1 and UML 2 tools will be supported in the future.
  • Xholon can execute Java code that implements state machines using simple switch statements with state and event variables.
  • Xholon can export a state machine in a simplified SCXML format. In the near future it will be able to import this format as well. SCXML is relatively easy to manually edit.
  • All of these approaches can be used together in the same application.
  • Any number of state machines can concurrently execute within the same application. Each can send messages to other state machines. Received messages become events.

To try using Xholon with your own models or on a few sample models that are included with Xholon:

  • Download Xholon.
  • Install Xholon by unzipping or untarring the downloaded file.
  • Look through README.txt in the Xholon directory. This will tell you how to start Xholon and run applications.
  • Run some of the sample applications that have been transformed from UML, and that were modeled using MagicDraw or Poseidon. Start the Xholon GUI, and select File --> Open. Open one of the models in the xmiapps directory. All of these models include state machines. The most interesting state machines are in the Elevator, Watch, and TestFsm models.
  • Run one of the other models that includes manually created state machines. These include:
    • HelloWorld
    • HelloWorld_TestTime
  • Each model includes a web page with information about it. Once a model is opened, select Help --> Information from the Xholon GUI.