2

I'm looking for some GUI tool where you can "draw" the state graphs for a Finite State Machine (FSM) and which subsequently generate the code. There are already plenty of tools that generate code or state graphs from some structured file input, but very few that does the opposite.

The only ones I could find were either >decade old or very expensive:

What are the free options to generate code from a drawing a finite state diagram diagram?
(I'd prefer output in either C/C++, Python or YAML. The cleaner/briefer, the better.)

As commented by @izzy, for me the best would be a simple to understand UI that allows you to draw the state graphs which simultaneously generate the state input file, perhaps in YAML (or whatever they like), and show the resulting output in the language I specify but preferably in C, Python or JS. (Java, no thanks.)

2
  • I've updated the title and added info on what I like.
    – not2qubit
    Commented May 19, 2021 at 8:48
  • Thanks! Removed my comment and gave you a thumbs-up instead. Best luck (i.e. good recommendations and soon ;)
    – Izzy
    Commented May 19, 2021 at 11:05

3 Answers 3

3

I have created a tool based on GraphViz: you provide a graphical description of the FSM in GraphViz, and the command line tool generates pure-c, dependency-free code for the FSM.

The CLI tool is written in Ruby (>=2.7) and it can be installed with gem install gv_fsm. See also https://github.com/pbosetti/gv_fsm.

2

Have you tried umple?

It allows you to "draw" UML diagrams, (including FSM) and lets you generate code with them, and yes, it's open source.

1
  • That is indeed a great free tool. Unfortunately, I am not able to get the drawing functionality to work for the state machine diagrams. Seem to only work for class diagrams.
    – not2qubit
    Commented May 23, 2021 at 20:32
0

QM at QuantumLeaps. Does hierarchical state machines. I've used it a few times and really liked it.

3
  • 3
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented May 22 at 18:55
  • Please also add a screenshot, thanks!
    – Nicolas Raoul
    Commented May 23 at 1:16
  • And also a link please! Commented May 23 at 5:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.