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

可信的形式化自然语言规约

Trustworthy Formal Natural Language Specifications

Drexel University(德雷塞尔大学)

Colin S. Gordon, Sergey Matskevich

AI总结:

针对自然语言到形式化规约转译易错且难审计的问题,本文在Lean证明助手中实现了可扩展模块化的英语形式化子集自动转译方法,能生成证明凭证,且原型在教科书案例上转译准确率高。

摘要:

交互式证明助手是经过精心构建的计算机程序,用于检查人类设计的数学命题证明,且对自身实现的正确性有高度置信度。然而,这仅能验证形式化命题的真实性,而该形式化命题可能是从自然语言表述的命题误译而来的。当使用证明助手针对自然语言规约来形式化验证软件正确性时,这一问题尤为突出。从非形式化到形式化的转译仍是一个充满挑战、耗时漫长的过程,且其正确性难以审计。\n 本文表明,在现有证明助手中,依据证明助手自身建立可信性与可审计性的原则,为用自然语言的表达性子集编写的规约提供支持是可行的。我们实现了一种方法,允许用户使用模块化可扩展的英语形式化子集编写规约,并完全在Lean证明助手内将其自动转译为形式化命题。我们的方法具备可扩展性(不对语法结构施加永久性限制)、模块化(允许将新词的相关信息随库一同分发),并能生成证明凭证,说明每个词的解释方式,以及如何利用句子结构计算语义。\n 我们将原型应用于将某热门教科书中各类形式化规约的英语描述转译为Lean形式化表述的任务;仅需一个规模适中的词库,且仅需对词库规模做少量调整,所有描述均可被正确转译。

英文摘要:

Interactive proof assistants are computer programs carefully constructed to check a human-designed proof of a mathematical claim with high confidence in the implementation. However, this only validates truth of a formal claim, which may have been mistranslated from a claim made in natural language. This is especially problematic when using proof assistants to formally verify the correctness of software with respect to a natural language specification. The translation from informal to formal remains a challenging, time-consuming process that is difficult to audit for correctness. This paper shows that it is possible to build support for specifications written in expressive subsets of natural language, within existing proof assistants, consistent with the principles used to establish trust and auditability in proof assistants themselves. We implement a means to provide specifications in a modularly extensible formal subset of English, and have them automatically translated into formal claims, entirely within the Lean proof assistant. Our approach is extensible (placing no permanent restrictions on grammatical structure), modular (allowing information about new words to be distributed alongside libraries), and produces proof certificates explaining how each word was interpreted and how the sentence's structure was used to compute the meaning. We apply our prototype to the translation of various English descriptions of formal specifications from a popular textbook into Lean formalizations; all can be translated correctly with a modest lexicon with only minor modifications related to lexicon size.

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

↑