paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Synthesizing Specifications

合成规范
OOPSLA 7(OOPSLA2)2023匹配度 3/10 · 论文属于程序合成、抽象解释与自动规范合成,与静态分析和形式化验证相关,但未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,也不属于将静态分析用于 ML/Agent 系统,因此与当前研究画像的核心方向匹配度较低。引用 9 inbox
Kanghee Park, Loris D'Antoni, Thomas Reps
crossref: 2026-09-10

AI 速览

一句话:提出自动合成规范的方法与工具 Spyro,在用户给定查询和 DSL 下生成最精确且穷尽的 L-性质。

编写程序规范往往比写代码更难。本文研究自动合成规范的问题:用户提供一个关于一组函数定义的查询,以及一个用于表达待抽取性质的领域特定语言 L(称 L-性质)。方法为在每个查询下合成“最佳”L-性质,即不存在严格更精确的 L-性质,并保证合成出的 L-性质集合是穷尽的,不能再加入新的 L-性质使合取更精确。作者实现工具 Spyro,用户可通过修改查询和 L 定制所需规范。案例表明 Spyro 可用于程序规范挖掘、执行抽象域操作以及合成程序模块的代数性质等应用。

问题
如何根据用户查询和指定 DSL,从函数定义中自动合成精确且有用的程序规范,避免手工编写规范。
方法
将规范合成形式化为在 DSL L 中寻找最佳 L-性质并生成穷尽集合,实现为工具 Spyro,允许修改查询与 L 定制合成结果。
评估
通过实现 Spyro 并用于规范挖掘、抽象域操作和程序模块代数性质合成等案例,展示其通用性与可定制性。
原文摘要(Abstract)

Every program should be accompanied by a specification that describes important aspects of the code's behavior, but writing good specifications is often harder than writing the code itself. This paper addresses the problem of synthesizing specifications automatically, guided by user-supplied inputs of two kinds: i) a query posed about a set of function definitions, and ii) a domain-specific language L in which the extracted property is to be expressed (we call properties in the language L-properties). Each of the property is a best L-property for the query: there is no other L-property that is strictly more precise. Furthermore, the set of synthesized L-properties is exhaustive: no more L-properties can be added to it to make the conjunction more precise. We implemented our method in a tool, Spyro. The ability to modify both the query and L provides a Spyro user with ways to customize the kind of specification to be synthesized. We use this ability to show that Spyro can be used in a variety of applications, such as mining program specifications, performing abstract-domain operations, and synthesizing algebraic properties of program modules.

链接与引用

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

BibTeX
@article{paperbot1871,
  title = {Synthesizing Specifications},
  author = {Kanghee Park and Loris D'Antoni and Thomas Reps},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA2},
  year = {2023},
  doi = {10.1145/3622861}
}