Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

Correct Compilation of Concurrent C Code

Technical Report ·
DOI:https://doi.org/10.2172/2480189· OSTI ID:2480189
 [1]
  1. Sandia National Laboratories (SNL-CA), Livermore, CA (United States)
The CompCert compiler represents a landmark effort in program verification as both a piece of verified software and as a compiler for verified C programs. A key shortcoming of CompCert however is that it does not support multithreaded programs. Prior work to add threads to CompCert has either required major rewrites of parts of the proof or only works for well synchronized programs. The problem is that CompCert’s backward simulation derives from a forward simulation via the determinism of the semantics of intermediate representation languages. This makes the proofs in CompCert easier but also makes them incompatible with standard models of multithreading which are non-deterministic. Here we propose an alternate formulation of CompCert’s proof structure that parameterizes the existing single threaded semantics with nondeterministic behavior generated at the multithreading level. While this is an old trick where program equivalence is concerned, performing it in the context of CompCert is quite subtle. Our approach allows for expressive concurrent semantics and does not require major proof rewrites but still results in a global backward simulation for multithreaded programs.
Research Organization:
Sandia National Laboratories (SNL-CA), Livermore, CA (United States)
Sponsoring Organization:
USDOE National Nuclear Security Administration (NNSA)
DOE Contract Number:
NA0003525
OSTI ID:
2480189
Report Number(s):
SAND--2024-13400
Country of Publication:
United States
Language:
English

Similar Records

Giallar: push-button verification for the qiskit Quantum compiler
Conference · Thu Jun 09 00:00:00 EDT 2022 · Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation · OSTI ID:1986256

Compile-time partitioning of a non-strict language with side-effects into sequential threads
Conference · Mon Dec 31 23:00:00 EST 1990 · OSTI ID:5241520

Compiler-controlled multithreading for lenient parallel languages
Book · Mon Dec 31 23:00:00 EST 1990 · OSTI ID:5312979

Related Subjects