{"id":18812155,"url":"https://github.com/drorspei/sismicpp","last_synced_at":"2026-01-11T18:30:13.029Z","repository":{"id":132912430,"uuid":"215160469","full_name":"drorspei/sismicpp","owner":"drorspei","description":"A C++ library for running statecharts","archived":false,"fork":false,"pushed_at":"2019-10-14T23:29:43.000Z","size":146,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-30T00:14:29.914Z","etag":null,"topics":["cpp","cpp14","state-machine","statechart"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drorspei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-14T23:02:49.000Z","updated_at":"2019-10-18T20:23:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"e00dcb87-c5e3-491b-88f4-95f91e9a5128","html_url":"https://github.com/drorspei/sismicpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drorspei%2Fsismicpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drorspei%2Fsismicpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drorspei%2Fsismicpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drorspei%2Fsismicpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drorspei","download_url":"https://codeload.github.com/drorspei/sismicpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239748247,"owners_count":19690232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp14","state-machine","statechart"],"created_at":"2024-11-07T23:29:58.933Z","updated_at":"2026-01-11T18:30:12.960Z","avatar_url":"https://github.com/drorspei.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sismic++\n## A C++ library for running statecharts\n\nThis library is a C++ (14 and above) translation of the python package [Sismic (https://sismic.readthedocs.io/)](https://sismic.readthedocs.io/) by Alexandre Decan and contributors [1].\n\nSismic (and thus also Sismic++) is an implementation of the **statechart** abstraction and of an interpreter for it. It mostly conforms to the SCXML standard. See here for more on statecharts https://statecharts.github.io/ .\n\n## A simple example\n\n```c++\nusing namespace sismicpp;\n\nStateChart statechart = [] {\n    using namespace sismicpp::builder;\n    return build_statechart(\n        name(\"My Button StateChart\"),\n        description(\"A showcase of statecharts and buttons\"),\n        root_state(\n            name(\"Button\"),\n            initial(\"Off\"),\n            state(\n                name(\"Off\"),\n                transition(\n                    event(\"toggle\"),\n                    target(\"On\")\n                )\n            ),\n            state(\n                name(\"On\"),\n                transition(\n                    event(\"toggle\"),\n                    target(\"Off\")\n                )\n            )\n        )\n    );\n}();\n\nInterpreter interpreter{std::move(statechart)};\ninterpreter.queue(\"toggle\").execute();\ninterpreter.queue(\"toggle\").execute();\n```\n\n## What lies ahead\n\n* Compile-time everything!\n\n    Currently the library is fully dynamic with lots of standard library constructs. It takes more than a second to compile the simple example on my laptop, and the binary is almost 200kb. The goal is to make everything in compile-time and without the stdlib, like in the amazing libraries [[Boost].SML](https://boost-experimental.github.io/sml/) and [Boost.MSM](https://www.boost.org/doc/libs/1_60_0/libs/msm/doc/HTML/ch03s04.html). I tried starting with template-meta-programming before and failed, and @relvox said I should try doing it dynamically first.\n\n* Tests?\n\n* Documentation...\n\n\n    I need to add examples of all the constructs and DSL. Basically, the `sismicpp::builder` provides a DSL that resembles the YAML way of defining statcharts in sismic.\n\n## Additional notes\n\n* The library supports C++ 14 or higher.\n\n* There are some tests already written with the library Catch2. The license is included in the file `LICENSE_catch.txt`.\n\n\n[1] @software{sismic,\n  author = {Decan, Alexandre},\n  title = {Sismic Interactive Statechart Model Interpreter and Checker},\n  url = {https://github.com/AlexandreDecan/sismic},\n}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrorspei%2Fsismicpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrorspei%2Fsismicpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrorspei%2Fsismicpp/lists"}