Please wait a minute...
工程设计学报  2003, Vol. 10 Issue (5): 251-255    
工程设计理论、方法与技术     
有限状态机的一种实现框架
 徐小良, 汪乐宇, 周泓
浙江大学数字技术及仪器研究所,浙江杭州 310027
Implementation framework of finite state machines
 XU  Xiao-Liang, WANG  Le-Yu, ZHOU  Hong
Institute of Digital Technology&Advanced Instrumentation,Zhejiang University,Hangzhou 310027,China
 全文: PDF(182 KB)   HTML
摘要: 有限状态机(FSM)是对反应式系统建模的一种强大工具.虽然一些高级特征和可视化状态图的引人,使FSM的表达能力更强,但是其实现往往存在复用性差,维护困难等问题.传统的FSM实现模式,如结构化方法和State模式,由于软件结构简单,与状态图不能有效匹配,难以解决这些问题.通过引入良好的数据结构和事件触发机制,提出了一种面向对象的高度结构化的FSM实现框架,并给出了事件触发转换的调度算法。新框架清晰地表达了FSM中的所有主要元素及它们之间的关系,并将行为部分与结构部分相分离,不仅改善了软件的灵活性和重用性,而且提高了系统的健壮性与可维护性。
关键词: 有限状态机反应式系统实现框架状态模式    
Abstract: Finite state machines(FSMs)provide a powerful way for modeling reactive systems.Although FSM has stronger expression ability after it is extended with many advanced features and visual statechart diagrams,its implementation often suffers from bad reusability and maintenance problems.The traditional ways for FSM implementation,such as structure approach and state pattern,do not address these problems because their software structures are too simple to match the statechart diagrams.By providing more structure and event-triggered mechanism ,a new object-oriented FSM implementation framework is presented as well as the event-dispatching algorithm.The new software framework explicitly describes all the core elements and associations between these elements in the FSM and separates the behavior from the structure.Therefore,not only can this framework make the software more reusable and flexible,but also can improve the maintenance and robustness.
Key words: finite state machines    reactive systems    implementation frameworks    state pattern
出版日期: 2003-10-28
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
RSS
作者相关文章  
徐小良
汪乐宇
周泓

引用本文:

徐小良, 汪乐宇, 周泓. 有限状态机的一种实现框架[J]. 工程设计学报, 2003, 10(5): 251-255.

XU Xiao-Liang, WANG Le-Yu, ZHOU Hong. Implementation framework of finite state machines[J]. Chinese Journal of Engineering Design, 2003, 10(5): 251-255.

链接本文:

https://www.zjujournals.com/gcsjxb/CN/        https://www.zjujournals.com/gcsjxb/CN/Y2003/V10/I5/251

[1] 闻霞, 任雯, 赖森财, 曾显杰. 基于有限状态机模型的全自动烫印机控制系统设计[J]. 工程设计学报, 2020, 27(6): 771-780.
[2] 谢嘉成, 杨兆建, 王学文, 李娟莉. 虚拟现实环境下液压支架部件无缝联动方法研究[J]. 工程设计学报, 2017, 24(4): 373-379.