paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SpaceSearch: a library for building and verifying solver-aided tools

SpaceSearch:用于构建和验证求解器辅助工具的库
ICFP 1(ICFP)2017匹配度 4/10 · 论文属于形式化验证与求解器辅助工具构建,与用户关注的形式化验证方向有领域关联,也符合偏重理论形式化和工程落地的口味;但它不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,未命中用户当前核心问题。引用 9 inbox
Konstantin Weitz, Steven Lyubomirsky, Stefan Heule, Emina Torlak, Michael D. Ernst, Zachary Tatlock
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出 Coq 库 SpaceSearch,让用户在证明助手中构建并验证求解器辅助工具,再提取到 Rosette 高效执行。

许多验证工具将领域问题归约为 SMT 查询,但归约本身的正确性很少被验证,因此求解器输出未必能建立领域级性质。SpaceSearch 是一个在 Coq 中开发求解器辅助工具的库:用户基于其接口构建工具,并证明接口结果足以推出高层性质;随后工具可提取为 Rosette 等实现,接口由底层 SMT 求解器高效实例化。该工作还引入并行化与增量式优化。评估中,SaltShaker 发现 RockSalt 的 7 个和 STOKE 的 1 个 bug,修复后在 2 小时内验证 15,255 条指令实例的语义一致;BGProof 是经验证的 BGP 配置检查器,可扩展至 240 KLOC 工业配置,发现 19 个不一致且无误报,并在未验证实现中发现 2 个 bug。

问题
求解器辅助验证工具通常依赖未经形式化验证的归约,难以确信 SMT 求解器输出足以建立所需的领域级性质。
方法
在 Coq 中提供 SpaceSearch 接口,让用户证明接口返回结果足以推出工具高层性质,再将工具提取到 Rosette 等求解器辅助语言,并由 SMT 求解器高效实现接口;同时支持并行化与增量式优化。
评估
通过构建并验证 SaltShaker 和 BGProof 两个工具进行评估:前者用于 x86 语义一致性检查,后者用于 BGP 配置检查,均可扩展到实际规模,并发现多个实现 bug 与配置不一致。
原文摘要(Abstract)

Many verification tools build on automated solvers. These tools reduce problems in a specific application domain (e.g., compiler optimization validation) to queries that can be discharged with a highly optimized solver. But the correctness of the reductions themselves is rarely verified in practice, limiting the confidence that the solver's output establishes the desired domain-level property. This paper presents SpaceSearch, a new library for developing solver-aided tools within a proof assistant. A user builds their solver-aided tool in Coq against the SpaceSearch interface, and the user then verifies that the results provided by the interface are sufficient to establish the tool's desired high-level properties. Once verified, the tool can be extracted to an implementation in a solver-aided language (e.g., Rosette), where SpaceSearch provides an efficient instantiation of the SpaceSearch interface with calls to an underlying SMT solver. This combines the strong correctness guarantees of developing a tool in a proof assistant with the high performance of modern SMT solvers. This paper also introduces new optimizations for such verified solver-aided tools, including parallelization and incrementalization. We evaluate SpaceSearch by building and verifying two solver-aided tools. The first, SaltShaker, checks that RockSalt's x86 semantics for a given instruction agrees with STOKE's x86 semantics. SaltShaker identified 7 bugs in RockSalt and 1 bug in STOKE. After these systems were patched by their developers, SaltShaker verified the semantics' agreement on 15,255 instruction instantiations in under 2h. The second tool, BGProof, is a verified version of an existing Border Gateway Protocol (BGP) router configuration checker. Like the existing checker, BGProof scales to checking industrial configurations spanning over 240 KLOC, identifying 19 configuration inconsistencies with no false positives. However, the correctness of BGProof has been formally proven, and we found 2 bugs in the unverified implementation. These results demonstrate that SpaceSearch is a practical approach to developing efficient, verified solver-aided tools.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{WeitzLHTET17,
  title = {SpaceSearch: a library for building and verifying solver-aided tools},
  author = {Konstantin Weitz and Steven Lyubomirsky and Stefan Heule and Emina Torlak and Michael D. Ernst and Zachary Tatlock},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {1},
  number = {ICFP},
  year = {2017},
  doi = {10.1145/3110269}
}