v0.2.0
What's Changed in v0.2.0
fsmc v0.2.0 marks a major milestone, transforming fsmc into a comprehensive universal state machine compiler toolchain. This release introduces formal model checking (LTL/CTL), multi-format bidirectional transpilation across 7 diagram and MBSE formats, Hierarchical State Machine (HFSM) history recovery, and an interactive WebAssembly playground.
🚀 Key Highlights & New Features
1. Formal Model Checking & Symbolic Verification (LTL & CTL)
- Mathematical Invariant Verification: Built-in verification engine validating safety, liveness, and reachability properties against Kripke state transition graphs.
- Temporal Logic Operators: Full support for Linear Temporal Logic (LTL) and Computation Tree Logic (CTL) formulas (
G,F,X,U,->). - nuXmv / SMV Formal Emitter: Automatic generation of clean, verifiable SMV symbolic models with discrete clock variables and temporal specifications.
2. Hierarchical State Machines (HFSM) & History Pseudostates
- Nested Composite Submachines: Multi-level state hierarchy with parent transition inheritance and automated entry/exit cascades.
- Shallow
[H]& Deep[H*]History: Restores previous active sub-state configurations upon re-entering composite states.
3. Universal Multi-Format Parser & Transpiler Pipeline
- High-Semantics Formal Frontends:
- OMG SysML v2 (native textual
.sysmlgrammar). - Cameo / MagicDraw (OMG XMI 2.1 schema).
- W3C SCXML (State Chart XML Recommendation).
- OMG SysML v2 (native textual
- Visual Diagram Sketch Frontends:
- PlantUML (
@startuml), Mermaid (stateDiagram-v2), Graphviz DOT, and XState JSON.
- PlantUML (
- Lossless Roundtrip Transpilation: Convert diagrams seamlessly between any supported format via the canonical Intermediate Representation (
FsmIr).
4. Zero-Alloc C++17 & C++20 Code Generators
- Header-Only Static Dispatch: Emits zero-heap, vtable-free state machine code using compile-time fold expressions.
- Standalone Single-Header Bundler: Generates self-contained
.hppfiles with zero external dependencies via--standalone. - Async & Thread-Safe Engine:
fsm::thread_safe_fsmwith concurrent multi-producer queues andstd::futurepromises.
5. Rich Compiler Diagnostics Engine (DiagnosticEngine)
- Colored terminal diagnostics with source code line spans, visual error carets (
^~~~~), and actionable suggestions for common modeling errors.
6. Interactive WebAssembly Playground
- In-browser live playground powered by
fsmc.wasmenabling real-time editing, visualization, formal verification, and C++ compilation directly in the browser.
🧪 Verification & Test Coverage
- 49 GoogleTest modular test suites covering runtime, parsers, IR transformations, model checkers, and emitters (100% passing).
- Comprehensive examples included (Aerospace Satellite Mission Controller, Automotive Motor ECU, Connection Manager).
Full Changelog: v0.1.0...v0.2.0