{"id":13757199,"url":"https://github.com/google/statechart","last_synced_at":"2025-05-10T05:31:51.856Z","repository":{"id":65981538,"uuid":"131756788","full_name":"google/statechart","owner":"google","description":"C++ StateChart Library","archived":true,"fork":false,"pushed_at":"2019-12-10T01:34:09.000Z","size":217,"stargazers_count":120,"open_issues_count":0,"forks_count":35,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-19T22:27:39.752Z","etag":null,"topics":["cpp","scxml","state-machine","statechart"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-01T19:55:57.000Z","updated_at":"2025-02-24T23:24:47.000Z","dependencies_parsed_at":"2023-02-19T19:01:01.027Z","dependency_job_id":null,"html_url":"https://github.com/google/statechart","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/google%2Fstatechart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fstatechart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fstatechart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fstatechart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/statechart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253371072,"owners_count":21897998,"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","scxml","state-machine","statechart"],"created_at":"2024-08-03T12:00:28.886Z","updated_at":"2025-05-10T05:31:51.475Z","avatar_url":"https://github.com/google.png","language":"C++","readme":"# C++ StateChart Library\n\nStateCharts [(Harel, 1987)](ref1) is a visual formalism for declarative\ndescription of complex interactive systems.\nIt extends the conventional state machine formalism with Hierarchy, Concurrency\nand Communication.\n\n[SCXML](https://www.w3.org/TR/scxml/) is a W3C standard based on StateCharts.\nThis is a C++ library that implements the SCXML specification. Instead of XML, a\nStateChart is represented as a StateChart protobuf.\n\n## Features\nMany features from the SCXML standard have been implemented.\n\n* Composite State\n* Parallel State\n* Datamodel\n* Transitions (Conditional, Eventless)\n* Executable Statements (Raise, Log, Assign, If, ForEach, Send)\n* Serialize/Deserialize the state machine\n\n## TODO\n\n* History\n\n## Example\nHere's an example of a StateChart that describes a Microwave.\n\n![Microwave StateChart](statechart/example/microwave_statechart.svg \"Microwave StateChart\")\n\nYou can see [//statechart/example/microwave_example_main.cc](statechart/example/microwave_example_main.cc)\nfor details on how to specify such a StateChart as a StateChart proto and how to use it in code.\n\n## Usage\n\nTo build the library you'll need bazel. You can download and install it from [here](https://www.bazel.build/).\n\n```\n# Download/Clone the repo.\ngit clone https://github.com/google/statechart.git\ncd statechart\n\n# Build the library\nbazel build //statechart/...\n\n# Run unit tests\nbazel test //statechart/...\n\n# Run the Microwave example\nbazel run //statechart/example:microwave_example_main -- --alsologtostderr\n```\n\n## Disclaimer\n\nThis is not an officially supported Google product.\n\n## References\n\n* David Harel, 1987, Statecharts: a visual formalism for complex systems,\nScience of Computer Programming.\n[Link](https://www.sciencedirect.com/science/article/pii/0167642387900359)\n* State Chart XML (SCXML): State Machine Notation for Control Abstraction.\n[Link](https://www.w3.org/TR/scxml/)\n","funding_links":[],"categories":["Objects - Entity, Actor"],"sub_categories":["Finite State Machine"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fstatechart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fstatechart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fstatechart/lists"}