Int J Performability Eng ›› 2019, Vol. 15 ›› Issue (9): 2462-2474.doi: 10.23940/ijpe.19.09.p20.24622475

Previous Articles     Next Articles

An ANTLR-based Flattening Framework for AltaRica 3.0 Model

Jun Hua,c, Shuo Chena,c,*, Defeng Chend, Jiexiang Kangb, and Hui Wangb   

  1. aCollege of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing, 211106, China;
    bDepartment of Software, China National Aeronautic Radio Electronics Research Institute, Shanghai, 200233, China;
    cCollaborative Innovation Center of Novel Software Technology and Industrialization, Nanjing, 210007, China;
    dSchool of Mechanical Engineering, Hefei University of Technology, Hefei, 230601, China
  • Submitted on ; Revised on ; Accepted on
  • Contact: *. Shuo Chen is a master's candidate at Nanjing University of Aeronautics and Astronautics. His research interests include software analysis and system safety analysis. E-mail address: nuaa_cs@163.com
  • About author:Jun Hu received his Ph.D. degree in computer software and theory from Nanjing University in 2006. He is an associate professor at Nanjing University of Aeronautics and Astronautics. His research interests include model-based safety analysis, software analysis, and formal methods. Defeng Chen is a student at Hefei University of Technology. His research interests include machine learning and robot engineering. Jiexiang Kang is a researcher at China National Aeronautic Radio Electronics Research Institute. His research interests include avionics technology, software engineering, and embedded operating systems. Hui Wang is a senior engineer at China National Aeronautic Radio Electronics Research Institute. Her research interests include software engineering and software verification

Abstract: AltaRica is a modeling language that is capable of hierarchical modelling and fault behavior description for industrial safety-critical system design. AltaRica 3.0 is the latest version, and its semantics are based on a formal GTS (Guarded Transition Systems) model. One of the key steps in the process of safety analysis toward AltaRica 3.0 models is that how to flatten a hierarchical AltaRica 3.0 model into a semantically equivalent GTS semantic model. This paper proposes an AltaRica 3.0 model flattening algorithm framework based on ANTLR (Another Tool for Language Recognition). Firstly, considering the different structural features of Block and Class, the AltaRica 3.0 model is sliced carefully in order to obtain the corresponding AST (Abstract Syntax Tree). Secondly, a set of recursive transformation algorithms are designed to extract and transform the AltaRica model elements, which are stored in the AST nodes based on the traversal technique of the AST. Then, a semantically equivalent flattened GTS model can be obtained. Lastly, several case studies show that the algorithms designed in this paper can effectively implement the flattening process of AltaRica 3.0 models.

Key words: ANTLR, AltaRica 3.0, flattening, AST, A2GTS, transition algorithm