paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Generating collection transformations from proofs

从证明生成集合变换
POPL 5(POPL)2021匹配度 2/10 · 论文属于程序合成、证明论与嵌套关系演算的理论工作,与用户关注的静态分析、Agentic/LLM 程序分析、浮点程序分析、贝叶斯程序分析及 LLM 与形式化验证交叉均无直接关系;仅在形式化方法和程序合成上有弱关联。引用 2 inbox
Michael Benedikt, Cécilia Pradic
crossref: 2026-09-10

AI 速览

一句话:本文从逻辑证明中多项式时间合成嵌套集合变换,并证明经典功能性证明也足以生成 NRC 表达式。

嵌套关系由积类型和集合类型构成,NRC 是定义其变换的标准强类型函数式语言。论文提出用逻辑公式声明式地描述这类变换:若公式带输入输出且可证明每个输入恰有一个输出,则它隐式定义了一个变换。主要结果是从证明中合成 NRC 表达式。具体地,在一个刻画嵌套集合自然推理的直觉主义演算中,作者利用 Craig 插值引理的类比,从表示嵌套集合的项之间可证包含关系出发,多项式时间地生成插值的 NRC 表达式。进一步,他们证明只需经典的功能性证明即可,不必是直觉主义的;因此,只要公式隐式定义了一个变换,就存在实现它的 NRC 表达式。

问题
如何从声明式逻辑规约自动生成嵌套集合变换的实现,而不是直接手写 NRC 表达式?论文研究带输入输出公式作为隐式定义,并在证明每输入唯一输出后合成变换。
方法
在捕获嵌套集合推理的直觉主义演算中,从功能性证明出发,借助 Craig 插值引理的类比,由嵌套集合项之间的可证包含关系生成插值的 NRC 表达式;合成过程为多项式时间。
评估
以理论证明为主:证明合成过程的正确性与多项式时间界,并证明经典功能性证明同样足以导出实现,即任何被公式隐式定义的变换都有对应 NRC 表达式。
原文摘要(Abstract)

Nested relations, built up from atomic types via product and set types, form a rich data model. Over the last decades the nested relational calculus, NRC, has emerged as a standard language for defining transformations on nested collections. NRC is a strongly-typed functional language which allows building up transformations using tupling and projections, a singleton-former, and a map operation that lifts transformations on tuples to transformations on sets. In this work we describe an alternative declarative method of describing transformations in logic. A formula with distinguished inputs and outputs gives an implicit definition if one can prove that for each input there is only one output that satisfies it. Our main result shows that one can synthesize transformations from proofs that a formula provides an implicit definition, where the proof is in an intuitionistic calculus that captures a natural style of reasoning about nested collections. Our polynomial time synthesis procedure is based on an analog of Craig's interpolation lemma, starting with a provable containment between terms representing nested collections and generating an NRC expression that interpolates between them. We further show that NRC expressions that implement an implicit definition can be found when there is a classical proof of functionality, not just when there is an intuitionistic one. That is, whenever a formula implicitly defines a transformation, there is an NRC expression that implements it.

链接与引用

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

BibTeX
@article{paperbot1143,
  title = {Generating collection transformations from proofs},
  author = {Michael Benedikt and Cécilia Pradic},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {5},
  number = {POPL},
  year = {2021},
  doi = {10.1145/3434295}
}