arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.01515cs.PL
收藏

从程序逻辑到语言逻辑

From Program Logics to Language Logics

Matteo Cimini

AI总结:

本文提出语言逻辑及形式系统 $\mathbb{L}$,以类似程序逻辑的断言方式分析文法、类型规则和归约规则等语言定义组件,并通过自动证明器复现相关分析。

摘要:

程序逻辑是程序验证语境中一种强大的形式化方法。我们能否在语言验证语境中发展出程序逻辑的对应物?本文提出语言逻辑,它允许形如 $\{P\}\\ \mathcal{X}\\ \{Q\}$ 的陈述,其中分析对象 $\mathcal{X}$ 可以是一个语言组件,例如一段文法、一条类型规则、一条归约规则或语言定义的其他部分。为展示我们的方法,我们开发了 $\mathbb{L}$,这是一种可用于从语言设计的各个方面分析语言定义的语言逻辑。我们将 $\mathbb{L}$ 演示应用于一种编程语言若干选定方面的分析。我们还为 $\mathbb{L}$ 实现了一个自动证明器,并确认该工具能够复现这些分析。归根结底,$\mathbb{L}$ 并不能验证语言。尽管如此,我们相信本文为采用程序逻辑的方法来分析语言迈出了坚实的第一步。

英文摘要:

Program logics are a powerful formal method in the context of program verification. Can we develop a counterpart of program logics in the context of language verification? This paper proposes language logics, which allow for statements of the form $\{P\}\ \mathcal{X}\ \{Q\}$ where $\mathcal{X}$, the subject of analysis, can be a language component such as a piece of grammar, a typing rule, a reduction rule or other parts of a language definition. To demonstrate our approach, we develop $\mathbb{L}$, a language logic that can be used to analyze language definitions on various aspects of language design. We illustrate $\mathbb{L}$ to the analysis of some selected aspects of a programming language. We have also implemented an automated prover for $\mathbb{L}$, and we confirm that the tool repeats these analyses. Ultimately, $\mathbb{L}$ cannot verify languages. Nonetheless, we believe that this paper provides a strong first step towards adopting the methods of program logics for the analysis of languages.

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

↑