Why Sismic is the canonical model¶
State Mate originally could have introduced its own machine, state, and transition classes between parsing and rendering. That would provide abstraction, but in this project it would mostly duplicate information that Sismic already models correctly.
Using sismic.model.Statechart directly has three important consequences.
Fewer translations¶
Each translation layer creates mapping code, validation code, and opportunities for semantic drift. Keeping Sismic objects intact means State Mate only translates once: from the statechart model into generated Python source.
Sismic remains authoritative¶
Sismic owns the meaning of its YAML format and the relationships between states and transitions. State Mate does not need to guess at or partially reproduce those semantics.
The boundary stays visible¶
The subset validator states clearly which Sismic constructs can be mapped to State Mate's target. This is preferable to hiding a lossy mapping behind a generic intermediate model.
The result is a small architecture: Sismic for the source model, a validator for compatibility, and Jinja2 for code generation.