{"id":347,"date":"2019-07-07T23:10:21","date_gmt":"2019-07-07T15:10:21","guid":{"rendered":"https:\/\/www.ccagml.com\/?p=347"},"modified":"2019-07-07T23:10:21","modified_gmt":"2019-07-07T15:10:21","slug":"%e6%9c%89%e9%99%90%e7%8a%b6%e6%80%81%e6%9c%ba","status":"publish","type":"post","link":"https:\/\/www.ccagml.com\/?p=347","title":{"rendered":"\u6709\u9650\u72b6\u6001\u673a"},"content":{"rendered":"\n<p><strong>\u6709\u9650\u72b6\u6001\u673a<\/strong>\uff08\u82f1\u8bed\uff1afinite-state machine\uff0c<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E7%B8%AE%E5%AF%AB\" target=\"_blank\" rel=\"noopener\">\u7f29\u5199<\/a>\uff1a<strong>FSM<\/strong>\uff09\u53c8\u79f0<strong>\u6709\u9650\u72b6\u6001\u81ea\u52a8\u673a<\/strong>\uff0c\u7b80\u79f0<strong>\u72b6\u6001\u673a<\/strong>\uff0c\u662f\u8868\u793a\u6709\u9650\u4e2a<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E7%8A%B6%E6%80%81\" target=\"_blank\" rel=\"noopener\">\u72b6\u6001<\/a>\u4ee5\u53ca\u5728\u8fd9\u4e9b\u72b6\u6001\u4e4b\u95f4\u7684\u8f6c\u79fb\u548c\u52a8\u4f5c\u7b49\u884c\u4e3a\u7684<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%95%B0%E5%AD%A6%E6%A8%A1%E5%9E%8B\" target=\"_blank\" rel=\"noopener\">\u6570\u5b66\u6a21\u578b<\/a>\u3002<\/p>\n\n\n\n<p>\u72b6\u6001\u5b58\u50a8\u5173\u4e8e\u8fc7\u53bb\u7684\u4fe1\u606f\uff0c\u5c31\u662f\u8bf4\uff1a\u5b83\u53cd\u6620\u4ece\u7cfb\u7edf\u5f00\u59cb\u5230\u73b0\u5728\u65f6\u523b\u7684\u8f93\u5165\u53d8\u5316\u3002\u8f6c\u79fb\u6307\u793a\u72b6\u6001\u53d8\u66f4\uff0c\u5e76\u4e14\u7528\u5fc5\u987b\u6ee1\u8db3\u786e\u4f7f\u8f6c\u79fb\u53d1\u751f\u7684\u6761\u4ef6\u6765\u63cf\u8ff0\u5b83\u3002\u52a8\u4f5c\u662f\u5728\u7ed9\u5b9a\u65f6\u523b\u8981\u8fdb\u884c\u7684\u6d3b\u52a8\u7684\u63cf\u8ff0\u3002\u6709\u591a\u79cd\u7c7b\u578b\u7684\u52a8\u4f5c\uff1a\u8fdb\u5165\u52a8\u4f5c\uff08entry action\uff09\uff1a\u5728\u8fdb\u5165\u72b6\u6001\u65f6\u8fdb\u884c\u9000\u51fa\u52a8\u4f5c\uff1a\u5728\u9000\u51fa\u72b6\u6001\u65f6\u8fdb\u884c\u8f93\u5165\u52a8\u4f5c\uff1a\u4f9d\u8d56\u4e8e\u5f53\u524d\u72b6\u6001\u548c\u8f93\u5165\u6761\u4ef6\u8fdb\u884c\u8f6c\u79fb\u52a8\u4f5c\uff1a\u5728\u8fdb\u884c\u7279\u5b9a\u8f6c\u79fb\u65f6\u8fdb\u884c<\/p>\n\n\n\n<p>FSM\uff08\u6709\u9650\u72b6\u6001\u673a\uff09\u53ef\u4ee5\u4f7f\u7528\u4e0a\u9762\u56fe1\u90a3\u6837\u7684<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E7%8A%B6%E6%80%81%E5%9B%BE\" target=\"_blank\" rel=\"noopener\">\u72b6\u6001\u56fe<\/a>\uff08\u6216\u72b6\u6001\u8f6c\u79fb\u56fe\uff09\u6765\u8868\u793a\u3002\u6b64\u5916\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u7c7b\u578b\u7684<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E7%8A%B6%E6%80%81%E8%BD%AC%E7%A7%BB%E8%A1%A8\" target=\"_blank\" rel=\"noopener\">\u72b6\u6001\u8f6c\u79fb\u8868<\/a>\u3002\u4e0b\u9762\u5c55\u793a\u6700\u5e38\u89c1\u7684\u8868\u793a\uff1a\u5f53\u524d\u72b6\u6001\uff08B\uff09\u548c\u6761\u4ef6\uff08Y\uff09\u7684\u7ec4\u5408\u6307\u793a\u51fa\u4e0b\u4e00\u4e2a\u72b6\u6001\uff08C\uff09\u3002\u5b8c\u6574\u7684\u52a8\u4f5c\u4fe1\u606f\u53ef\u4ee5\u53ea\u4f7f\u7528\u811a\u6ce8\u6765\u589e\u52a0\u3002\u5305\u62ec\u5b8c\u6574\u52a8\u4f5c\u4fe1\u606f\u7684FSM\u5b9a\u4e49\u53ef\u4ee5\u4f7f\u7528<a href=\"https:\/\/zh.wikipedia.org\/w\/index.php?title=%E8%99%9A%E6%8B%9F%E6%9C%89%E9%99%90%E7%8A%B6%E6%80%81%E6%9C%BA&amp;action=edit&amp;redlink=1\" target=\"_blank\" rel=\"noopener\">\u72b6\u6001\u8868<\/a>\u3002<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><th>\u5f53\u524d\u72b6\u6001\u2192<br>\u6761\u4ef6\u2193<\/th><th>\u72b6\u6001A<\/th><th>\u72b6\u6001B<\/th><th>\u72b6\u6001C<\/th><\/tr><tr><th>\u6761\u4ef6X<\/th><td>\u2026<\/td><td>\u2026<\/td><td>\u2026<\/td><\/tr><tr><th>\u6761\u4ef6Y<\/th><td>\u2026<\/td><td>\u72b6\u6001C<\/td><td>\u2026<\/td><\/tr><tr><th>\u6761\u4ef6Z<\/th><td>\u2026<\/td><td>\u2026<\/td><td>\u2026<\/td><\/tr><\/tbody><\/table>\n\n\n\n<pre class=\"wp-block-code\"><code>switch (currentStatus) {\ncase A:\n    {\n        \/\/statements; \n        break;\n    }\ncase B:\n    {\n        if (conditionY) {\n            currentStatus = C\n        }\n        break;\n    }\ncase C:\n    {\n        \/\/statements; \n        break;\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u9650\u72b6\u6001\u673a\uff08\u82f1\u8bed\uff1afinite-state machine\uff0c\u7f29\u5199\uff1aFSM\uff09\u53c8\u79f0\u6709\u9650\u72b6\u6001\u81ea\u52a8\u673a\uff0c\u7b80\u79f0\u72b6\u6001\u673a\uff0c\u662f\u8868<a href=\"https:\/\/www.ccagml.com\/?p=347\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">\u6709\u9650\u72b6\u6001\u673a<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[30,20],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/posts\/347"}],"collection":[{"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=347"}],"version-history":[{"count":2,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/posts\/347\/revisions"}],"predecessor-version":[{"id":349,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/posts\/347\/revisions\/349"}],"wp:attachment":[{"href":"https:\/\/www.ccagml.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}