Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 975 Bytes

fsm.org

File metadata and controls

26 lines (18 loc) · 975 Bytes

moo 無 fsm

Overview

In moo, a Finite State Machine (FSM) is to behavior what schema is to data structure. That is, we model some desired behavior in the usual terms of FSM and from that model we generate code that enacts the behavior.

We will first describe how to model an FSM in moo oschema and then from such models how to use a moo template to generate an FSM based on boost-ext/sml for C++ projects and how for Python projects how to use the model to construct an FSM based on the transitions package.

Schema

As with any model in moo we describe an FSM with a data structure and that data structure adheres to a schema. This schema is relatively simple and is described in moo /oschema/ form in examples/fsm/fsm-schema.jsonnet.

C++

Python