libyasmine (core library) features

yasmine adheres to the OMG Unified Modeling Language(TM) State Machine specification as closely as possible. It provides you with hierarchical states, orthogonal regions, and run-to-completion semantics.

As she supports UML state machine semantics, she also covers FSM (finite state machine) semantics.

Vertices

yasmine supports all states and pseudostates included in the UML specification.

States

Simple states and composite states support entry and exit actions.

Transitions

A guard and an action can be assigned to each transition.

Events and event processing

Events processing is automatically handled by the state machine and follows the rules of run-to-completion semantics.
Processing involves 2 different stages:

  • transition search: Which transitions have shall fire for the current event?

  • transition execution: Execute the transitions that shall fire (if any).

Other event features

  • time based event creation (and cancellation)

  • The deferral of events is also supported.

  • Optionally events can transport parameters.

  • A priority can be assigned to an event.

Single and multi-threading support

Event processing can be done in two different ways:

  • in the calling thread

  • in a dedicated thread

Both scenarios are available out of the box and can be chosen according to the developer's use case.

The built-in support for executing the state machine (processing the events) in its own thread is realized with an event queue into which events are pushed from an outside context (thread). The events are then asynchronously popped from the queue and handled in the state machine's own dedicated worker thread.

Also do behaviors of asynchronous simple states are executed in their own context.

More features