自动化 Unrealizability Logic:面向无限程序集合的 Hoare 风格证明合成
Automating Unrealizability Logic: Hoare-Style Proof Synthesis for Infinite Sets of Programs
AI总结:
本文设计了首个 Unrealizability Logic (UL) 证明合成算法 Wuldo,通过解耦规则应用与非终结符摘要合成,实现了无限程序集合的可复用自动化验证,验证速度提升 1.96 倍。
摘要:
对(可能无限的)程序集合中的所有成员进行自动化验证,在程序合成以及动态加载代码、并发代码和语言特性的验证中具有潜在的应用价值。现有的程序集合验证技术在适用范围上存在局限,无法创建或使用关于程序集合的可解释或可复用信息。其后果是,人们无法从一个验证问题中获取可用于另一个问题的知识。由 Kim 等人提出的 Unrealizability Logic (UL) 是首个用于证明程序集合(由正则树文法定义)特性的 Hoare 风格证明系统,它提供了一个能够表达和使用可复用见解的理论框架。具体而言,UL 包含非终结符摘要——这是一种刻画递归非终结符的归纳事实(类似于 Hoare 逻辑中的过程摘要)。在本研究中,我们设计了首个 UL 证明合成算法,并实现为 Wuldo。具体来说,我们通过完全语法导向的方式计算证明结构,将决定如何应用 UL 规则的问题与合成/检查非终结符摘要的问题解耦。我们展示了 Wuldo 在提供非终结符摘要时,能够表达并证明现有工具无法触及的验证问题,包括确立无限多程序在无限多输入上的行为表现。在某些情况下,Wuldo 甚至能合成必要的非终结符摘要。此外,Wuldo 能够在不同的验证查询之间复用先前已证明的非终结符摘要,使得验证速度比从头证明摘要时快 1.96 倍。
英文摘要:
Automated verification of all members of a (potentially infinite) set of programs has the potential to be useful in program synthesis, as well as in verification of dynamically loaded code, concurrent code, and language properties. Existing techniques for verification of sets of programs are limited in scope and unable to create or use interpretable or reusable information about sets of programs. The consequence is that one cannot learn anything from one verification problem that can be used in another. Unrealizability Logic (UL), proposed by Kim et al. as the first Hoare-style proof system to prove properties over sets of programs (defined by a regular tree grammar), presents a theoretical framework that can express and use reusable insight. In particular, UL features nonterminal summaries -- inductive facts that characterize recursive nonterminals (analogous to procedure summaries in Hoare logic). In this work, we design the first UL proof synthesis algorithm, implemented as Wuldo. Specifically, we decouple the problem of deciding how to apply UL rules from the problem of synthesizing/checking nonterminal summaries by computing proof structure in a fully syntax-directed fashion. We show that Wuldo, when provided nonterminal summaries, can express and prove verification problems beyond the reach of existing tools, including establishing how infinitely many programs behave on infinitely many inputs. In some cases, Wuldo can even synthesize the necessary nonterminal summaries. Moreover, Wuldo can reuse previously proven nonterminal summaries across verification queries, making verification 1.96 times as fast as when summaries are instead proven from scratch.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。