Abstract
Xavier Leroy and Sandrine Blazy in 2007 conducted a formal verification, using the Coq proof assistant, of a memory model for low-level imperative languages such as C. Considering their formalization was performed essentially in first-order logic, one question left open by the authors was whether their proofs could be automated using a verification framework for first-order logic. We took the challenge and automated their formalization using Why3, significantly reducing the proof effort. We systematically followed the Coq proofs and realized that in many cases at around one third of the way Why3 was able to discharge all VCs. Furthermore, the proofs still requiring interactions (e.g. induction, witnesses for existential proofs, assertions) were factorized isolating auxiliary results that we stated explicitly. In this way, we achieved an almost-automatic soundness and safety proof of the memory model. Nonetheless, our development allows an extraction of a correct-by-construction concrete memory model, going thus further than the preliminary Why version of Leroy and Blazy.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
The complete set of hypotheses can be consulted online.
- 3.
The authors did not presented a summarized list of properties for each of the four relations.
References
Barroso, P., Pereira, M., Ravara, A.: Leroy and blazy were right: their memory model soundness proof is automatable (extended version) (2022). https://doi.org/10.48550/ARXIV.2212.02425, https://arxiv.org/abs/2212.02425
Bobot, F., Filliâtre, J.-C., Marché, C., Melquiond, G., Paskevich, A.: Preserving user proofs across specification changes. In: Cohen, E., Rybalchenko, A. (eds.) VSTTE 2013. LNCS, vol. 8164, pp. 191–201. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54108-7_10
Filliâtre, J.-C., Paskevich, A.: Why3—where programs meet provers. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 125–128. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-37036-6_8
Leroy, X.: A formally verified compiler back-end. J. Autom. Reason. 43(4), 363–446 (2009). https://doi.org/10.1007/s10817-009-9155-4
Leroy, X., Blazy, S.: Formal verification of a C-like memory model and its uses for verifying program transformations. J. Autom. Reason. 41, 1–31 (2008). https://doi.org/10.1007/s10817-008-9099-0
Mador-Haim, S., et al.: An axiomatic memory model for POWER multiprocessors. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 495–512. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31424-7_36
Mansky, W., Garbuzov, D., Zdancewic, S.: An axiomatic specification for sequential memory models. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9207, pp. 413–428. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21668-3_24
Pereira, M.J.P.: Tools and techniques for the verification of modular stateful code. (Outils et techniques pour la vérification de programmes impératives modulaires). Ph.D. thesis, University of Paris-Saclay, France (2018). https://tel.archives-ouvertes.fr/tel-01980343
Ševčík, J., Vafeiadis, V., Zappa Nardelli, F., Jagannathan, S., Sewell, P.: CompCertTSO: a verified compiler for relaxed-memory concurrency. J. ACM 60(3), 1–50 (2013). https://doi.org/10.1145/2487241.2487248
Winskel, G.: The Formal Semantics of Programming Languages: An Introduction. MIT Press, Cambridge (1993)
Acknowledgement
Work partially supported by the Portuguese Fundação para a Ciência e Tecnologia via NOVA LINCS (UIDB/04516/2020) and by the first author PhD grant (UI/BD/151265/2021).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Barroso, P., Pereira, M., Ravara, A. (2023). Leroy and Blazy Were Right: Their Memory Model Soundness Proof is Automatable. In: Lal, A., Tonetta, S. (eds) Verified Software. Theories, Tools and Experiments.. VSTTE 2022. Lecture Notes in Computer Science, vol 13800. Springer, Cham. https://doi.org/10.1007/978-3-031-25803-9_2
Download citation
DOI: https://doi.org/10.1007/978-3-031-25803-9_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-25802-2
Online ISBN: 978-3-031-25803-9
eBook Packages: Computer ScienceComputer Science (R0)