arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2111.04902cs.FLcs.DM
收藏

分层有限状态机的模块化分解

Modular Decomposition of Hierarchical Finite State Machines

Oliver Biggar, Behzad Zamani, Iman Shames

AI总结:

本文将图论中的模块化分解理论引入自动机理论,定义了FSM的模块与thin modules,构建了唯一表示等价HFSM空间的线性有向图,并提供了O(n^2k)算法及在瓶颈问题上的应用。

摘要:

分层有限状态机(HFSMs)是一种标准的软件建模概念,它通过分层嵌套这一有用的抽象扩展了经典的有限状态机(FSM)概念。也就是说,一个 HFSM 是一个其状态可以是其他 FSM 的 FSM。HFSMs 中的层次结构是在设计时提供的,可以通过展开嵌套状态来移除,从而允许 HFSMs 继承 FSMs 的语义。然而,由于层次结构是 FSM 结构的一种有用表示,我们希望能够对该操作求逆:给定一个 FSM,我们能否计算其等价的 HFSMs?这正是本文的主题。通过将图论中类似的“模块化分解”理论调整到自动机理论中,我们能够计算出给定 FSM 的等价 HFSMs 空间的高效表示。具体而言,我们首先定义了 FSM 的模块,即一组可被视为嵌套 FSM 的节点。与图中的模块不同,FSMs 中的某些模块缺乏代数结构。我们识别出模块的一种简单且自然的限制,称为 thin modules,它重新获得了图中模块的许多关键属性。然后,我们构建了一个线性空间有向图,它唯一地表示每个 thin module,从而表示每个等价的(thin)HFSM。我们将此图称为模块化分解。模块化分解清晰地揭示了等价 thin HFSMs 底层的重要共同结构。我们提供了一个 $O(n^2k)$ 算法,用于构建 $n$ 状态 $k$ 符号 FSM 的模块化分解。我们在以下“瓶颈”问题上展示了该理论的适用性:给定一个 HFSM,寻找一个等价的 HFSM,使得最大组件 FSM 的大小被最小化。模块化分解为 thin HFSMs 上的瓶颈问题提供了一个简单的贪心算法,我们在 Harel(1987)的一个腕表 HFSM 示例上对此进行了演示。

英文摘要:

Hierarchical Finite State Machines (HFSMs) are a standard software-modelling concept which extends the classical Finite State Machine (FSM) notion with the useful abstraction of hierarchical nesting. That is, an HFSM is an FSM whose states can be other FSMs. The hierarchy in HFSMs is provided at design time, and can be removed by expanding nested states, allowing HFSMs to inherit the semantics of FSMs. However, because hierarchy is a useful representation of the structure of an FSM, we would like to be able to invert this operation: given an FSM, can we compute equivalent HFSMs? This is the topic of this paper. By adapting the analogous theory of `modular decomposition' from graph theory into automata theory, we are able to compute an efficient representation of the space of equivalent HFSMs to a given one. Specifically, we first define a module of an FSM, which is a collection of nodes which can be treated as a nested FSM. Unlike modules in graphs, some modules in FSMs are lacking in algebraic structure. We identify a simple and natural restriction of the modules, called thin modules, which regain many of the critical properties from modules in graphs. We then construct a linear-space directed graph which uniquely represents every thin module, and hence every equivalent (thin) HFSM. We call this graph the modular decomposition. The modular decomposition makes clear the significant common structure underlying equivalent thin HFSMs. We provide an $O(n^2k)$ algorithm for constructing the modular decomposition of an $n$-state $k$-symbol FSM. We demonstrate the applicability of this theory on the following `bottleneck' problem: given an HFSM, find an equivalent one where the size of the largest component FSM is minimised. The modular decomposition gives a simple greedy algorithm for the bottleneck problem on thin HFSMs, which we demonstrate on a wristwatch HFSM example from Harel (1987).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑