Z# (Zee-sharp)

A new .NET language

Finite State Machine

Ideas for a baked-in DSL for generating code using a FSM language.

FSM language examples:

Directed Graph language examples:


Machine

The container for a state machine definition.


State


Event

A representation of an external occurrence.

Causes a transition from the current state (on which the event is declared) to a new state.


Code Generation

No functions are generated - they are all implemented externally to the state machine.

Context

The machine context is auto generated by analyzing what fields are referenced in the dsl. The structure can be extended with custom fields. The structure is passed in as a template or generic parameter.