{"_id":"fsm","_rev":"17-6df1559f46e889870b91c45655aca74c","name":"fsm","description":"check finite state machine properties","dist-tags":{"latest":"1.0.2"},"versions":{"0.0.0":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"name":"fsm","description":"Finite State Machine - Separate Control Flow from IO","version":"0.0.0","homepage":"https://github.com/dominictarr/fsm","repository":{"type":"git","url":"git://github.com/dominictarr/fsm.git"},"main":"fsm.js","scripts":{"test":"meta-test test/*.js"},"engines":{"node":">= 0.2.0"},"dependencies":{},"devDependencies":{"it-is":"0.0"},"_id":"fsm@0.0.0","_engineSupported":true,"_npmVersion":"1.0.8","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"85764a52545c1b1a091082c5ca41c954b4034860","tarball":"https://registry.npmjs.org/fsm/-/fsm-0.0.0.tgz","integrity":"sha512-IY7Vvu07SB+HDsHBCYqzb67MV7SE9wIEMgB2I8wMr0xokGB/kpwrFiVmbkU6nMRTd8X3Xhlb7cykcs7u1fCHHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQDVr8WU5bIteDIq4AbZ5ZTNKvCxnotgd1AlWBokgouAiEA/5CwIRfj9zlyfIphB0IvaVYQReHKC98UHTRMLs1tH14="}]},"directories":{}},"0.0.1":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"name":"fsm","description":"Finite State Machine - Separate Control Flow from IO","version":"0.0.1","homepage":"https://github.com/dominictarr/fsm","repository":{"type":"git","url":"git://github.com/dominictarr/fsm.git"},"main":"fsm.js","scripts":{"test":"meta-test test/*.js"},"engines":{"node":">= 0.2.0"},"dependencies":{"curry":"0.0"},"devDependencies":{"it-is":"0.0"},"_id":"fsm@0.0.1","_engineSupported":true,"_npmVersion":"1.0.12","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"c90705b8736f9c2f7185ee007a7380fd347e7e36","tarball":"https://registry.npmjs.org/fsm/-/fsm-0.0.1.tgz","integrity":"sha512-C55kG4EdqdECP7zw08n25eWN9WzSmZ7WE24mjG+dwxyV1unucJNvD1SUSuFYa61GKmo9thW6mq0EkxJfq9rupA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyb11C3XL1VMLF3MAs2YmW5U7sGZq+eoVsdMivipPdJAIgRyOawUJbKeKlQcA4g+Mbh6aVS3v1hUNM7piqw1HERfs="}]},"directories":{}},"1.0.0":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"name":"fsm","description":"check finite state machine properties","version":"1.0.0","homepage":"https://github.com/dominictarr/fsm","repository":{"type":"git","url":"git://github.com/dominictarr/fsm.git"},"scripts":{"test":"node test/index.jss"},"devDependencies":{"tape":"~2.12.3"},"bugs":{"url":"https://github.com/dominictarr/fsm/issues"},"_id":"fsm@1.0.0","dist":{"shasum":"75298034b66582c66c427cd281d8d9a43def674e","tarball":"https://registry.npmjs.org/fsm/-/fsm-1.0.0.tgz","integrity":"sha512-vL4+cPBQ8PjFGtglNfNtkUs+4DN+rTPeWcQt/WO1vs0Y1VtQ7z8ocYCx8K9qH5hI86tBcVBZ7y8h4A1NuFiotg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGP5ons1IzkNLhSMfnDtirIyBX2vX1KY74K9WRSh2nJAiAaKDNvMjJ8YBBnpFOXhsaoE4q0wSKj6euWMBGlJwLUSA=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"1.0.1":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"name":"fsm","description":"check finite state machine properties","version":"1.0.1","homepage":"https://github.com/dominictarr/fsm","repository":{"type":"git","url":"git://github.com/dominictarr/fsm.git"},"scripts":{"test":"node test/index.jss"},"devDependencies":{"tape":"~2.12.3","pull-stream":"~2.23.0"},"dependencies":{"split":"~0.3.0"},"gitHead":"7dd3dcd369ac1f3a5625c2f1b4ccbd3dc2282e4e","bugs":{"url":"https://github.com/dominictarr/fsm/issues"},"_id":"fsm@1.0.1","_shasum":"859204e37427e1784f9a112ec828fad504944d41","_from":".","_npmVersion":"1.4.26","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"dist":{"shasum":"859204e37427e1784f9a112ec828fad504944d41","tarball":"https://registry.npmjs.org/fsm/-/fsm-1.0.1.tgz","integrity":"sha512-aHXN4eR1FxyBMa+Nw4rbt8z9672Vi7QD4kIG/oHDwW7G3dt9+w/12Jxay8PrLV00bTY+s4YoerMqw7xOmFc/jw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi9Mm5yISrxccoVx3BVnCwY4zZmP7XN3wt/9OflczVxQIgFclcTQA13yTxX12lXbi2jq54YZMN/k32DkXi7ZogV+Q="}]},"directories":{}},"1.0.2":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"name":"fsm","description":"check finite state machine properties","version":"1.0.2","homepage":"https://github.com/dominictarr/fsm","repository":{"type":"git","url":"git://github.com/dominictarr/fsm.git"},"scripts":{"test":"node test/index.jss"},"devDependencies":{"tape":"~2.12.3","pull-stream":"~2.23.0"},"dependencies":{"split":"~0.3.0"},"gitHead":"862f27b2efafdbec5272590d87fd21420b356f16","bugs":{"url":"https://github.com/dominictarr/fsm/issues"},"_id":"fsm@1.0.2","_shasum":"e2eb9b29747e806bbb90f8d5453e2f9d7bd23783","_from":".","_npmVersion":"1.4.26","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"dist":{"shasum":"e2eb9b29747e806bbb90f8d5453e2f9d7bd23783","tarball":"https://registry.npmjs.org/fsm/-/fsm-1.0.2.tgz","integrity":"sha512-kkH3dVTCkXyo7o3IR9Gzp18+b9gmWsQdAsGd72FOdBzbHJ6GSJqNfOPXjZlU1LIdrb8OfbVRIsrveOV+LnUz5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnh75umiklRvpZniFMAMF+GGMtCyhx7zyEZvMCaOi/sQIgQ6tLG0yN8b4V1281DVKFR1TtGSBVa0tSV3ce3hHmk/o="}]},"directories":{}}},"maintainers":[{"email":"nopersonsmodules@gmail.com","name":"nopersonsmodules"}],"time":{"modified":"2022-06-18T03:58:57.045Z","created":"2011-06-13T04:10:55.020Z","0.0.0":"2011-06-13T04:11:15.862Z","0.0.1":"2011-06-15T22:37:45.638Z","1.0.0":"2014-04-15T05:37:04.520Z","1.0.1":"2014-09-15T08:15:37.182Z","1.0.2":"2014-09-18T09:52:14.594Z"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"repository":{"type":"git","url":"git://github.com/dominictarr/fsm.git"},"readme":"# fsm\n\ncheck properties of finite state machines.\n\nThere is a lot of academic research in this area, yet this module is very simple.\nThere are a lot of fancy tools available, but they are not easy to use.\nIf idea is really useful, then I think a very simple tool should be viable.\n\n## License\n\nMIT\n\n# Example\n\nDefine FSM as json, here is a stream with 4 states.\nThis FSM expresses the constraint that the stream *must not*\nemit 'data' when paused, and also that it *must not* emit\ndata after 'end'.\n\n``` js\n{\n  START: {\n    data   : 'START',\n    pause  : 'PAUSED',\n    end    : 'END',\n    error  : 'ERROR'\n  },\n  PAUSED: {\n    pause  : 'PAUSED',\n    resume : 'START',\n    error  : 'ERROR'\n  },\n  ERROR: {},\n  END: {}\n}\n```\n\nwe can check a number of properties of this machine.\ndoes this machine halt? (and in the right place?)\ncan you reach every state from every other?\n\n## API\n\n### validate (fsm)\n\ncheck that all transitions are to defined states.\n\n### reachable (fsm)\n\ncalculate all states can reach each other states.\nthe result is in the form of\n\n``` js\n{STATE1: {STATE2: [event path from S1 to S2]}}\n```\n\n### terminal (fsm)\n\nreturn the list of states that cannot reach another state.\n\nalias: `deadlock'\n\n### livelock (fsm, [terminal])\n\nget list of states that cannot reach a terminal state.\n\n### combine(fsm1, fsm2, start1, start2)\n\ncombine two fsm into one, obeying all the transitions in each.\nTODO: throw an error if there are transitions that are impossible in the combined machine.\n\n\n","homepage":"https://github.com/dominictarr/fsm","bugs":{"url":"https://github.com/dominictarr/fsm/issues"},"readmeFilename":"README.md","users":{"blitmaster":true,"tapmodo":true}}