Preprint Article Version 1 Preserved in Portico This version is not peer-reviewed

A Practical Type System for Formal Verification CPS &Amp; IoT C/C++ Programs

Version 1 : Received: 30 May 2023 / Approved: 31 May 2023 / Online: 31 May 2023 (10:50:37 CEST)

How to cite: Manzhos, Y.; Sokolova, Y. A Practical Type System for Formal Verification CPS &Amp; IoT C/C++ Programs. Preprints 2023, 2023052228. https://doi.org/10.20944/preprints202305.2228.v1 Manzhos, Y.; Sokolova, Y. A Practical Type System for Formal Verification CPS &Amp; IoT C/C++ Programs. Preprints 2023, 2023052228. https://doi.org/10.20944/preprints202305.2228.v1

Abstract

Misuse of measurement units and orientations leads to errors in scientific applications, Cyber Physical Systems (CPS), and IoT C/C++ programs. Standard type system are inadequate in preventing such errors. Although dimensional and orientational analysis in physics can manually detect these errors in equations, analyzing complex code with intricate physical computations is impractical. To overcome this challenge, we propose an advanced type system that incorporates units and orientations as integral components within a specialized type library. Our enhanced type system automatically detects potential errors during compile time by representing physical quantities as types and utilizing dimensional analysis, orientational analysis, and metaprogramming techniques. Our improved type system enables formal verification of C++ software, successfully verifying programs with extensive codebases. We also employ it for runtime verification of dynamic linking and pointer operations in C++ programs. The integration of compile-time verification, dimensional analysis, orientational analysis, and advanced type system enhances the robustness and accuracy of scientific applications, CPS, and IoT C/C++ programs. By leveraging these approaches, we ensure precise calculations and prevent errors related to measurement units and orientations, resulting in substantial improvements in reliability and accuracy.

Keywords

formal compile-time verification; dimensional analysis; orientational analysis; type system

Subject

Computer Science and Mathematics, Software

Comments (0)

We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.

Leave a public comment
Send a private comment to the author(s)
* All users must log in before leaving a comment
Views 0
Downloads 0
Comments 0
Metrics 0


×
Alerts
Notify me about updates to this article or when a peer-reviewed version is published.
We use cookies on our website to ensure you get the best experience.
Read more about our cookies here.