Journal of Frontiers of Computer Science and Technology ›› 2018, Vol. 12 ›› Issue (4): 536-549.DOI: 10.3778/j.issn.1673-9418.1704008

Previous Articles     Next Articles

Research on Multi-Threaded Code Generation of SIGNAL Models

KAN Shuanglong+, HUANG Zhiqiu, YANG Zhibin   

  1. College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China
  • Online:2018-04-01 Published:2018-04-04

SIGNAL模型多线程代码生成研究

阚双龙+,黄志球杨志斌   

  1. 南京航空航天大学 计算机科学与技术学院,南京 210016

Abstract: Reactive systems are the control systems which continually communicate with the environment. These systems control the behavior of systems by receiving input events from the environment, computing the input events, and sending the result to the environment. Synchronous languages are the modeling languages to specify reactive systems. The advantages of synchronous languages are the formal verification and the automatic code generation. This paper focuses on the multi-clocked synchronous language SIGNAL, and proposes a translation from SIGNAL models to multi-threaded Java code. The translation is based on the following three intermediate structures: synchronous clocked guarded actions, guarded actions, and guarded action with clusters. The translation is decomposed into 4 steps, and the translation rules are presented for each step. At last, this paper presents a case study on the Airbus A340 alarm system to evaluate the correctness of the code generation. Multi-threaded Java code generation can support the application of SIGNAL on distributed and multi-core architectures.

Key words: reactive systems, synchronous languages, SIGNAL, code generation, guarded action

摘要: 反应式系统是指与环境不断发生交互的控制系统。这类系统通过接收外部环境输入,对输入进行计算,并将计算结果反馈到外部环境来控制系统的行为。同步语言是一种规约反应式系统的建模语言,同步语言的优势在于支持形式化验证和精确的代码自动生成。面向多时钟同步语言SIGNAL,提出了一种SIGNAL模型到多线程Java代码生成过程。该代码生成过程基于以下3种中间结构:同步时钟卫式操作、卫式操作和带划分的卫式操作。将整个代码生成过程分为4个主要转化步骤,给出每一步转化规则。最后对空客A340的警报系统进行实例分析,评估生成代码的正确性。多线程Java代码生成可以为SIGNAL模型在分布式和多核体系下的应用提供支撑。

关键词: 反应式系统, 同步语言, SIGNAL, 代码生成, 卫式操作