Please wait a minute...
Chinese Journal of Engineering Design  2003, Vol. 10 Issue (5): 251-255    DOI:
    
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
Download: HTML     PDF(182KB)
Export: BibTeX | EndNote (RIS)      

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 wordsfinite state machines      reactive systems      implementation frameworks      state pattern     
Published: 28 October 2003
Cite this article:

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

URL:

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


有限状态机的一种实现框架

有限状态机(FSM)是对反应式系统建模的一种强大工具.虽然一些高级特征和可视化状态图的引人,使FSM的表达能力更强,但是其实现往往存在复用性差,维护困难等问题.传统的FSM实现模式,如结构化方法和State模式,由于软件结构简单,与状态图不能有效匹配,难以解决这些问题.通过引入良好的数据结构和事件触发机制,提出了一种面向对象的高度结构化的FSM实现框架,并给出了事件触发转换的调度算法。新框架清晰地表达了FSM中的所有主要元素及它们之间的关系,并将行为部分与结构部分相分离,不仅改善了软件的灵活性和重用性,而且提高了系统的健壮性与可维护性。

关键词: 有限状态机,  反应式系统,  实现框架,  状态模式 
No related articles found!