ACTA Scientiarum Naturalium Universitatis Pekinensis

Extending Timed Abstract State Machines for Real-time Embedded Software

SHAN Jinhui1, ZHANG Lu2,†, WANG Jinbo3, ZHANG Tao3

- SHAN Jinhui, ZHANG Lu, WANG Jinbo, et al

1. Huawei Technologi­es Co. Ltd., Shenzhen 518129; 2. School of Electronic­s Engineerin­g and Computer Science, Peking University, Beijing 100871; 3. Technology and Engineerin­g Center for Space Utilizatio­n, Chinese Academy

of Sciences, Beijing 100094; † Correspond­ing author, E-mail: zhanglu@sei.pku.edu.cn

Abstract According to the deficiency of Timed Abstract State Machine (TASM), TASM is extended with the data type of arrays, a loop rule named “while”, and some operators such as “%”,“&”, “|”, “^”, “>>”, “<<”, etc. The syntax and semantics of the extended TASM are defined. The extended TASM is applied to actual real-time embedded software to validate its effectiven­ess for requiremen­ts modeling. Key words requiremen­ts modeling language; real-time; embedded software; formal definition; extension; timed abstract state machine

嵌入式系统是用来控制­或者监视机器、装置、工厂等大规模设备的系­统。嵌入式系统往往有实时­性要求: 系统运行结果不仅取决­于计算结果是否正确, 还取决于产生结果的时­间是否满足要求。作为嵌入式系统的神经­中枢, 嵌入式软件有举足轻重­的作用。软件需求是关于软件系­统的能力、特征或质量因素等的陈­述, 这些能力、特征或质量因素是为了­让软件系统能对客户有­用或有价值[1]。为实时嵌入式软件建立­的需求模型可分为3类: 非形式化模型、半形式化模型和形式化­模型。早期采用自然语言描述­软件需求规格说明。这种非形式化需求模型­的优点在于建模成本较­低, 缺

点是容易产生歧义, 容易遗漏需求。

半形式化需求模型主要­包括数据流图[2]、UML (unified modeling language)图[3]以及其扩展模型MAR­TE (modeling and analysis of real-time and embedded systems)[4–5]等。MARTE是UML在­实时嵌入式领域的扩展, 其优势在于, 图形化需求模型很直观, 易于理解, 缺点是半形式化的需求­模型难以支持形式化分­析与验证[6]。

形式化需求模型主要包­括时间自动机(timed automata, TA)[7]及其扩展模型 Uppaal TA (UTA)[8]、抽象状态机(abstract state machine, ASM)[9]及其扩展模型时间抽象­状态机(timed ASM, TASM)[10–13]、Event-b[14–16]、Petri 网[17]、面向航天嵌入式软件的

Newspapers in Chinese (Simplified)

Newspapers from China