Formally Verified C Code Generation from Hybrid Communicating Sequential Processes

被引:0
|
作者
Wang, Shuling [1 ]
Ji, Zekun [1 ,2 ]
Xu, Xiong [1 ]
Zhan, Bohua [1 ,2 ]
Gao, Qiang [1 ,2 ]
Zhan, Naijun [1 ,2 ]
机构
[1] Chinese Acad Sci, Inst Software, State Key Lab Comp Sci, Beijing, Peoples R China
[2] Univ Chinese Acad Sci, Beijing, Peoples R China
基金
国家重点研发计划;
关键词
D O I
10.1109/ICCPS61052.2024.00018
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Hybrid Communicating Sequential Processes (HCSP) is a formal model for hybrid systems, including primitives for evolution along an ordinary differential equation (ODE), communication, and parallel composition. Code generation is needed to convert HCSP models into code that can be executed in practice, and the correctness of this conversion is essential to ensure that the generated code accurately reflects the formal model. In this paper, we propose a code generation algorithm from HCSP to C with POSIX library for concurrency. The main difficulties include how to bridge the gap between the synchronized communication model in HCSP and the use of mutexes for synchronization in C, and how to discretize evolution along ODEs and support interrupt of ODE evolution by communication. To prove the correctness of code generation, we define a formal semantics for POSIX C, and build transition system models for both HCSP and C programs. We then define an approximate bisimulation relation between traces of transition systems, and show that under certain robustness conditions for HCSP, the generated C program is approximately bisimilar to the original model. Finally, we evaluate the code generation algorithm on a detailed model for automatic cruise control, showing its utility on real-world examples.
引用
收藏
页码:123 / 134
页数:12
相关论文
共 39 条
  • [21] Automatic data path generation from C code for custom processors
    Trajkovic, Jelena
    Gajski, Daniel
    EMBEDDED SYSTEM DESIGN: TOPICS, TECHNIQUES AND TRENDS, 2007, 231 : 107 - 120
  • [22] Real-Time C code generation from a HOOD design
    Dissaux, P
    DASIA 2000: DATA SYSTEMS IN AEROSPACE, PROCEEDINGS, 2000, 457 : 91 - 98
  • [23] Generation of C plus plus Code from Isabelle/HOL Specification
    Jiang, Dongchen
    Xu, Bo
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2022, 32 (07) : 1043 - 1069
  • [24] Automatic generation of bridging code for accessing C++ from Java']Java
    Schade, A
    TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES AND SYSTEMS (TOOLS 25) - PROCEEDINGS, 1998, : 165 - 180
  • [25] C code generation from Petri net based logic controller specification
    Grobelny, Michal
    Grobelna, Iwona
    Karatkevich, Andrei
    PHOTONICS APPLICATIONS IN ASTRONOMY, COMMUNICATIONS, INDUSTRY, AND HIGH ENERGY PHYSICS EXPERIMENTS 2017, 2017, 10445
  • [26] Automatic distributed code generation from formal models of asynchronous processes interacting by multiway rendezvous
    Evrard, Hugues
    Lang, Frederic
    JOURNAL OF LOGICAL AND ALGEBRAIC METHODS IN PROGRAMMING, 2017, 88 : 121 - 153
  • [27] A modeling and code generation framework for critical embedded systems design: From Simulink down to VHDL and Ada/C code
    Lanoe, Mickael
    Bordin, Matteo
    Heller, Dominique
    Coussy, Philippe
    Chavet, Cyrille
    2014 21ST IEEE INTERNATIONAL CONFERENCE ON ELECTRONICS, CIRCUITS AND SYSTEMS (ICECS), 2014, : 742 - 745
  • [28] From UML to ANSI-C - An Eclipse-based code generation framework
    Funk, Mathias
    Nyssen, Alexander
    Lichter, Horst
    ICSOFT 2008: PROCEEDINGS OF THE THIRD INTERNATIONAL CONFERENCE ON SOFTWARE AND DATA TECHNOLOGIES, VOL SE/GSDCA/MUSE, 2008, : 12 - +
  • [29] Highly Parallel Multi-FPGA System Compilation from Sequential C/C plus plus Code in the AWS Cloud
    Ebcioglu, Kemal
    San, Ismail
    ACM TRANSACTIONS ON RECONFIGURABLE TECHNOLOGY AND SYSTEMS, 2022, 15 (04)
  • [30] Asm2C++: A Tool for Code Generation from Abstract State Machines to Arduino
    Bonfanti, Silvia
    Carissoni, Marco
    Gargantini, Angelo
    Mashkoor, Atif
    NASA FORMAL METHODS (NFM 2017), 2017, 10227 : 295 - 301