The Right Kind of Non-Determinism: Using Concurrency to Verify C Programs with Underspecified Semantics

Eduard Kamburjan
(University of Oslo, Oslo, Norway)
Nathan Wasser
(Sharpmind, Frankfurt, Germany)

We present a novel and well automatable approach to formal verification of C programs with underspecified semantics, i.e., a language semantics that leaves open the order of certain evaluations. First, we reduce this problem to non-determinism of concurrent systems, automatically extracting a distributed Active Object model from underspecified, sequential C code. This translation process provides a fully formal semantics for the considered C subset. In the extracted model every non-deterministic choice corresponds to one possible evaluation order. This step also automatically translates specifications in the ANSI/ISO C Specification Language (ACSL) into method contracts and object invariants for Active Objects. We then perform verification on the specified Active Objects model, using the Crowbar theorem prover, which verifies the extracted model with respect to the translated specification and ensures the original property of the C code for all possible evaluation orders. By using model extraction, we can use standard tools, without designing a new complex program logic to deal with underspecification. The case study used is highly underspecified and cannot be handled correctly by existing tools for C.

In Clément Aubert, Cinzia Di Giusto, Larisa Safina and Alceste Scalas: Proceedings 15th Interaction and Concurrency Experience (ICE 2022), Lucca, Italy, 17th June 2022, Electronic Proceedings in Theoretical Computer Science 365, pp. 1–16.
Published: 9th August 2022.

ArXived at: https://dx.doi.org/10.4204/EPTCS.365.1 bibtex PDF
References in reconstructed bibtex, XML and HTML format (approximated).
Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org