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.
A Formally Verified Procedure for Width Inference in FIRRTL
Key Laboratory of System Software (Chinese Academy of Sciences)(系统软件重点实验室);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of Chinese Academy of Sciences(中国科学院大学);Nanjing Institute of Software Technology(南京软件工程研究所);Birkbeck, University of London(伦敦大学伯贝克学院)
FormalProofBench: Can Models Write Graduate Level Math Proofs That Are Formally Verified?
Vals AI;École Polytechnique Fédérale de Lausanne (EPFL)(洛桑联邦理工学院);Moscow Institute of Physics and Technology(莫斯科物理技术学院);Indiana University, Bloomington(印第安纳大学布卢明顿分校);Independent Researcher(独立研究员)
Vero: Can AI Agents Build Formally Verified Software Repositories?
University of Chicago(芝加哥大学);California Institute of Technology(加州理工学院);Stanford University(斯坦福大学);UC Berkeley(加州大学伯克利分校);Amazon Web Services(亚马逊云计算服务);Apodex
HELIX: Verified compilation of cyber-physical control systems to LLVM IR
University of Cambridge(剑桥大学);INRIA(法国国家数字科学研究所);Taras Shevchenko National University(塔拉斯·舍甫琴科国立大学);Université Paris Cité(巴黎西岱大学);University of Pennsylvania(宾夕法尼亚大学)
Amazon(亚马逊);Stanford University(斯坦福大学);Google DeepMind(谷歌DeepMind);The University of Texas at Austin(德克萨斯大学奥斯汀分校);FORM, University of Southern Denmark(南丹麦大学FORM);Lean FRO;Atlas Computing(阿特拉斯计算);Getulio Vargas Foundation(热图利奥·瓦加斯基金会);Institute for Theoretical Studies, ETH Zürich(苏黎世联邦理工学院理论研究所)