skip to main content
10.1007/978-3-031-77382-2_12guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Minuska: Towards a Formally Verified Programming Language Framework

Published: 26 November 2024 Publication History

Abstract

Programming language frameworks allow us to generate language tools (e.g., interpreters) just from a formal description of the syntax and semantics of a programming language. As these frameworks tend to be quite complex, an issue arises whether we can trust the generated tools. To address this issue, we introduce a practical formal programming language framework called Minuska, which always generates a provably correct interpreter given a valid language definition. This is achieved by (1) defining a language MinusLang for expressing programming language definitions and giving it formal semantics and (2) using the Coq proof assistant to implement an interpreter parametric in a MinusLang definition and to prove it correct. Minuska provides strong correctness guarantees and can support non-trivial languages while performing well.

References

[1]
Anand, A., et al.: CertiCoq: a verified compiler for Coq. In: CoqPL workshop (2016). https://api.semanticscholar.org/CorpusID:9607775
[2]
Appel AW and Leroy X Efficient extensional binary tries J. Autom. Reason. 2023 67 1 8
[3]
Boldo, S., Jourdan, J., Leroy, X., Melquiond, G.: A formally-verified C compiler supporting floating-point arithmetic. In: Nannarelli, A., Seidel, P., Tang, P.T.P. (eds.) 21st IEEE Symposium on Computer Arithmetic, ARITH 2013, Austin, TX, USA, April 7-10, 2013, pp. 107–115. IEEE Computer Society (2013).
[4]
Chen X, Lin Z, Trinh M-T, and Roşu G Silva A and Leino KRM Towards a trustworthy semantics-based language framework via proof generation Computer Aided Verification 2021 Cham Springer 477-499
[5]
Chen X and Roşu G Margaria T and Steffen B A language-independent program verification framework Leveraging Applications of Formal Methods, Verification and Validation. Verification 2018 Cham Springer 92-102
[6]
Chen, X., Roşu, G.: Matching μ-logic. In: 34th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2019, Vancouver, BC, Canada, June 24-27, 2019, pp. 1–13. IEEE (2019).
[7]
Dasgupta, S., Park, D., Kasampalis, T., Adve, V.S., Roşu, G.: A complete formal semantics of x86-64 user-level instruction set architecture. In: McKinley, K.S., Fisher, K. (eds.) Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2019, Phoenix, AZ, USA, June 22-26, 2019, pp. 1133–1148. ACM (2019).
[8]
Durán, F., Garavel, H.: The rewrite engines competitions: a rectrospective. In: Beyer, D., Huisman, M., Kordon, F., Steffen, B. (eds.) Tools and Algorithms for the Construction and Analysis of Systems, pp. 93–100. Springer, Cham (2019)
[9]
Forster, Y., Sozeau, M., Tabareau, N.: Verified extraction from coq to ocaml. Proc. ACM Program. Lang. 8(PLDI) (2024)
[10]
Hills, M., Serbănută, T., Roşu, G.: A rewrite framework for language definitions and for generation of efficient interpreters. In: Denker, G., Talcott, C.L. (eds.) Proceedings of the 6th International Workshop on Rewriting Logic and its Applications, WRLA 2006, Vienna, Austria, April 1-2, 2006. Electronic Notes in Theoretical Computer Science, vol. 176, pp. 215–231. Elsevier (2006).
[11]
Klein, C., Clements, J., et al.: Run your research: on the effectiveness of lightweight mechanization. In: Field, J., Hicks, M. (eds.) Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2012, Philadelphia, Pennsylvania, USA, January 22-28, 2012, pp. 285–296. ACM (2012).
[12]
Kumar, R., Myreen, M.O., Norrish, M., Owens, S.: CakeML: a verified implementation of ML. In: Jagannathan, S., Sewell, P. (eds.) The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20-21, 2014. pp. 179–192. ACM (2014).
[13]
Maranget, L.: Compiling pattern matching to good decision trees. In: Proceedings of the 2008 ACM SIGPLAN Workshop on ML, ML ’08, pp. 35–46. Association for Computing Machinery, New York (2008).
[14]
Megill, N.D., Wheeler, D.A.: Metamath: a Computer Language for Mathematical Proofs. Lulu Press, Morrisville, North Carolina (2019). http://us.metamath.org/downloads/metamath.pdf
[15]
Monniaux, D., Gourdin, L., Boulmé, S., Lebeltel, O.: Testing a formally verified compiler. In: Prevosto, V., Seceleanu, C. (eds.) Tests and Proofs - 17th International Conference, TAP 2023, Leicester, UK, July 18-19, 2023, Proceedings. Lecture Notes in Computer Science, vol. 14066, pp. 40–48. Springer (2023).
[16]
Roşu G and Serbănută T An overview of the K semantic framework J. Log. Algebraic Methods Program. 2010 79 6 397-434
[17]
Sewell P et al. Ott: effective tool support for the working semanticist J. Funct. Program. 2010 20 1 71-122
[18]
Stefănescu, A., Park, D., Yuwen, S., Li, Y., Roşu, G.: Semantics-based program verifiers for all languages. In: Visser, E., Smaragdakis, Y. (eds.) Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2016, part of SPLASH 2016, Amsterdam, The Netherlands, October 30 - November 4, 2016, pp. 74–91. ACM (2016).
[19]
The Coq Development Team: The Coq proof assistant (2023).
[20]
Tušil, J.: Minuska: Towards a Formally Verified Programming Language Framework, June 2024.
[21]
Tušil, J., Bereczky, P., Horpácsi, D.: Interactive matching logic proofs in Coq. In: Ábrahám, E., Dubslaff, C., Tarifa, S.L.T. (eds.) Theoretical Aspects of Computing - ICTAC 2023 - 20th International Colloquium, Lima, Peru, December 4-8, 2023, Proceedings. Lecture Notes in Computer Science, vol. 14446, pp. 139–157. Springer (2023).
[22]
Tušil, J., Obdržálek, J.: Minuska: towards a formally verified programming language framework (2024). https://arxiv.org/abs/2409.11530

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
Software Engineering and Formal Methods: 22nd International Conference, SEFM 2024, Aveiro, Portugal, November 6-8, 2024, Proceedings
Nov 2024
473 pages
ISBN:978-3-031-77381-5
DOI:10.1007/978-3-031-77382-2

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 26 November 2024

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media