Giter VIP home page Giter VIP logo

StateSmith

StateSmith is a cross platform, free/open source tool for generating state machines in multiple programming languages. The generated code is human readable, has zero dependencies and is suitable for use with tiny bare metal microcontrollers, video games, apps, web, computers... It avoids dynamic memory allocations for the safety or performance inclined.

misc documentation-main page

The above is my current plan, but I'll gladly help anyone add a new language. I'm hoping contributors will help me with this effort. It is tricky though...


Features and Interactive Examples ๐ŸŒŸ

The fundamentals-1 webpage has simple interactive examples that let you explore most StateSmith features.

interactive-examples-preview-small


Quick Start (all supported languages) ๐Ÿš€

Want to jump right in and just try it!?

The below tutorials use new StateSmith features that are more user friendly. They use different diagram tools, but mirror each other fairly closely otherwise.


Why State Machines and StateSmith? ๐Ÿค”

If you are new to state machines, then prepare to level up your toolbox! They are incredibly helpful for certain applications.

Why StateSmith? I couldn't find a quality state machine code generator that met my needs, had an attractive license, and was enjoyable to use.

The Diagram is Always Accurate! ๐Ÿ“š

Before I created StateSmith, it was always a pain trying to manually synchronize a hand written state machine with a drawing. Urgent client requests come in and you update the code, but do you and your team always remember to update the drawing? Probably not and so the rot begins. Documentation trust issues arise and as designs get larger, the effort to ensure the diagram is accurate starts to become quite punishing.

Now that we use StateSmith at my work, I never have to worry about the above. I love generating fully working code from the documentation. Incredibly helpful for teams and communicating with clients.


More Examples ๐Ÿ”ซ

The StateSmith-examples repo has a growing list of examples showcasing different application uses.

mario-sm


Is StateSmith ready for use? ๐Ÿงช

We use StateSmith in a fair number of production projects at my work. It's been super helpful.
Other companies are using StateSmith in production as well (consumer electroncics, autonomous vehicles, ...).

StateSmith has a strong suite of tests (730+) and behavior specification coverage. The specification integration tests read a diagram file, generate executable state machine code, then compile and execute that code in another process and ensure that the state machine behavior is exactly what was expected. The same suite of integration tests run for each supported programming language. This strong test base gives me confidence. It also allows us to refactor and optimize StateSmith without fear of accidentally breaking specified behavior.


More Info ๐Ÿ“–

The StateSmith GitHub wiki has a good amount of documentation right now, but always feel free to ask a question.

YouTube channel: https://www.youtube.com/@statesmith


Need help? Suggestion? Brainstorm? ๐Ÿ™‹

Join us on discord.

Feel free to open a github issue.

Or you can use the project's discussion space.

statesmith's Projects

exp-test-gen icon exp-test-gen

Experimental automatic test code generation for state machines

statesmith icon statesmith

A state machine code generation tool suitable for bare metal, embedded and more.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.