Specifications of complex, large scale, computer software and hardware systems can be radically simplified by using simple maps from input sequences to output values. These "state machine maps" provide an alternative representation of classical Moore type state machines. Composition of state machine maps corresponds to state machine products and can be used to specify essentially any type of interconnection as well as parallel and distributed computation. State machine maps can also specify abstract properties of systems and are significantly more concise and scalable than traditional representations of automata. Examples included here include specifications of producer/consumer software, network distributed consensus, real-time digital circuits, and operating system scheduling. The motivation for this work comes from experience designing and developing operating systems and real-time software where weak methods for understanding and exploring designs is a well known handicap. The methods introduced here are based on ordinary discrete mathematics, primitive recursive functions and deterministic state machines and are intended, initially, to aid the intuition and understanding of the system developers. Staying strictly within the boundaries of classical deterministic state machines anchors the methods to the algebraic structures of automata and semigroups, obviates any need for axiomatic deduction systems, "formal methods", or extensions to the model, and makes the specifications more faithful to engineering practice. While state machine maps are obvious representations of state machines, the techniques introduced here for defining and composing them are novel. To illustrate applications, the paper includes a fairly detailed specification and verification of the well-known "Paxos" distributed consensus algorithm plus a number of simpler examples including a digital PID controller.
翻译:大规模、复杂的计算机软件和硬件系统的规范可以通过使用简单的输入序列到输出值映射进行彻底的简化,这些“状态机映射”提供了经典的Moore类型状态机的替代表示。状态机映射的组合对应于状态机的乘积,并可用于指定任何类型的互连,以及并行和分布式计算。状态机映射还可以指定系统的抽象属性,其比传统的自动机表示更为简洁和可扩展。本文的例子包括生产者/消费者软件、分布式共识、实时数字电路和操作系统调度的规范。本文的研究动机来自于操作系统和实时软件设计和开发的经验,其中对于理解和探索设计的薄弱方法是一个广为人知的障碍。这里介绍的方法基于普通离散数学、原始递归函数和确定性有限状态机,最初旨在帮助系统开发人员的直觉和理解。严格地遵循经典的确定性有限状态机的范畴,将这些方法锚定到自动机和半群的代数结构,避免了需要演绎系统、"形式方法"或模型扩展的任何需要,并使规范更符合工程实践。虽然状态机映射是状态机的显然表示,但是本文介绍的定义和组合技术是新颖的。为了说明应用,本文包括了一个相当详细的"Paxos"分布式共识算法的规范和验证,以及包括数字PID控制器在内的许多更简单的例子。