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. Preprints2023, 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
Manzhos, Y.; Sokolova, Y. A Practical Type System for Formal Verification CPS &Amp; IoT C/C++ Programs. Preprints2023, 2023052228. https://doi.org/10.20944/preprints202305.2228.v1
APA Style
Manzhos, Y., & Sokolova, Y. (2023). A Practical Type System for Formal Verification CPS &Amp; IoT C/C++ Programs. Preprints. https://doi.org/10.20944/preprints202305.2228.v1
Chicago/Turabian Style
Manzhos, Y. and Yevheniia Sokolova. 2023 "A Practical Type System for Formal Verification CPS &Amp; IoT C/C++ Programs" Preprints. 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
Copyright:
This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.