arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.11530cs.PL
收藏

Minuska:迈向一个经过形式化验证的编程语言框架

Minuska: Towards a Formally Verified Programming Language Framework

Jan Tušil, Jan Obdržálek

AI总结:

本文提出形式化编程语言框架 Minuska,通过 MinusLang 定义语言并在 Coq 中实现和验证参数化解释器,从而为生成的语言工具提供可证明正确性保证。

摘要:

编程语言框架使我们能够仅根据编程语言语法和语义的形式化描述来生成语言工具(例如解释器)。由于这些框架往往相当复杂,便产生了一个问题:我们是否能够信任所生成的工具。为解决这一问题,我们提出了一个实用的形式化编程语言框架,名为 Minuska;只要给定有效的语言定义,它始终能够生成可证明正确的解释器。这通过以下两点实现:(1)定义一种用于表达编程语言定义的语言 MinusLang,并为其提供形式化语义;(2)使用 Coq 证明助手实现一个以 MinusLang 定义为参数的解释器,并证明其正确性。Minuska 提供了强有力的正确性保证,能够支持非平凡的语言,同时具有良好的性能。本文是同名 SEFM24 论文的扩展版本。

英文摘要:

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 nontrivial languages while performing well. This is the extended version of the SEFM24 paper of the same name.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑