Executable finite state machines
state resources

Welcome

Welcome to state.software, the home of a project to implement executable finite state machines. At present there is support for JavaScript 5, TypeScript and C#.NET, with plans to implement JavaScript 6 and Swift in the near future.

Finite state machines have had a long history in the specification of complex systems. See Why state machines? for more information and Mealy, More & Harel for a little history.

The implementation provided here is best described as somewhere between Harel Statecharts and UML State Machines, with extensions to make the state machines executable.

State for TypeScript

State.js is a fully featured implementation of an executable finite state machine for use with TypeScript.
View code on GitHub
Download v5.11.0
View documentation

State for JavaScript

State.js is a fully featured implementation of an executable finite state machine for the browser and node.
View code on GitHub
Download v5.11.0

State for .NET

State.js is a fully featured implementation of an executable finite state machine for the the .NET framework.
View code on GitHub
Download v5.3.3

State for Swift

State.swift is currently under development for iOS and OS X. Check out the GitHub links below for frequent updates.
View code on GitHub
Download v5.11.0

Example

The example below shows a model of a simple cassette player; use the buttons to make state changes.

playing entry / startMotor exit / stopMotor paused pause play active entry / engageHead exit / disengageHead stopped play stop operational off

Licence

The implementations of state are released under the MIT and GPL v3 licences. The MIT licence is simple and easy to understand and places almost no restrictions on what you can do with the software. The GPL v3 licence is a little more complex and places certain obligations on the user; this may be necessary when used in combination with other GPL licensed software. The choice of which licence to use is yours.