{"id":16138169,"url":"https://github.com/ul/vfsm","last_synced_at":"2025-08-02T15:08:38.998Z","repository":{"id":27192381,"uuid":"30662669","full_name":"ul/vfsm","owner":"ul","description":"Virtual Finite State Machines for Clojure/ClojureScript. Draw, compile, execute.","archived":false,"fork":false,"pushed_at":"2015-05-19T05:31:50.000Z","size":236,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-24T15:34:12.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ul.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}},"created_at":"2015-02-11T18:28:04.000Z","updated_at":"2020-10-03T21:30:15.000Z","dependencies_parsed_at":"2022-07-18T10:39:26.238Z","dependency_job_id":null,"html_url":"https://github.com/ul/vfsm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ul/vfsm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ul%2Fvfsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ul%2Fvfsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ul%2Fvfsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ul%2Fvfsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ul","download_url":"https://codeload.github.com/ul/vfsm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ul%2Fvfsm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268408196,"owners_count":24245577,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-09T23:32:36.040Z","updated_at":"2025-08-02T15:08:38.958Z","avatar_url":"https://github.com/ul.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VFSM\n\n[](dependency)\n```clojure\n[vfsm \"0.1.0-SNAPSHOT\"] ;; latest release\n```\n[](/dependency)\n\nVFSM in Clojure(Script), with spec compilation from GraphML sources.\n\n## Usage\n\n##### Draw spec in [yEd][1], following next conventions:\n\n* Text of **node label** contains state name followed by its actions (if any):\n```\nNAME OF STATE (1)\nE: action1, action2 (2)\nX: ... (3)\nI: condition1 =\u003e action1, condition2 =\u003e action2 (4)\n```\n1. **state name,** will be dasherized to `:name-of-state`\n2. **entry action(s),** fn names, commas are optional\n3. **exit action(s),** the same as above\n4. **input action(s),** conditions must be functions of inputs\n\n* Text of **edge label** represents **transition condition** from state to state.\nIt must be a function of the one argument which is current inputs.\nBecause inputs are usually a map, for simple checks you can benefit from the fact that Clojure keywords are functions.\nTo check condition in specific order, put numbers before them.\n\n##### Require vfsm:\n```clojure\n[vfsm.core :as vfsm]\n[vfsm.graphml :refer [compile-spec]]\n```\n\n##### Compile spec in your Clojure/Clojurescript source:\n```clojure\n(def spec (compile-spec \"path/to/your/spec/in/resources.graphml\"))\n```\n\n##### Put meaning into actions and start automaton.\nUsually you want to provide action functions in the same namespace where you compile spec.\nActions must take to params: context and inputs.\nTo bind given watchable inputs to automaton execution:\n```clojure\n(vfsm/start! rtdb spec context)\n```\n\n## TODO\n\n[x] Explicit transitions traverse order\n\n[ ] More elegant input actions format\n\n[ ] Tests\n\n[ ] Examples\n\n[ ] Hunting down and eliminating boilerplate of connecting VFSM with the rest of the app\n\n## Contribution\n\n... is welcome and very much appreciated.\nFeel free to ping me with questions and to make PR.\n\n## License\n\nCopyright © 2015 Ruslan Prokopchuk\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n\n[1]: http://www.yworks.com/en/products/yfiles/yed/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ful%2Fvfsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ful%2Fvfsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ful%2Fvfsm/lists"}