paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Example-Based Reasoning about the Realizability of Polymorphic Programs

多态程序可实现性的基于示例推理
ICFP 8(ICFP)2024匹配度 2/10 · 论文属于程序合成与类型系统/参数性理论,关注多态程序可实现性的自动推理;但用户当前核心方向是静态分析、LLM/Agent、浮点程序分析与贝叶斯程序分析,该文未涉及这些主题,也未结合 LLM 或工业落地。引用 1 inbox
Niek Mulleners, Johan Jeuring, Bastiaan Heeren
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:利用 container morphism 将多态程序转换为可自动推理的形式,从而基于输入输出示例判定多态规约的可实现性。

多态函数受参数性约束:Wadler 自由定理可作为免费规约,把部分规约补全为全规约,也可能使原本可实现的规约变为不可实现;在程序合成中,判定不可实现性可剪枝搜索空间。本文研究参数性、输入输出示例与 sketch 的交互。由于自由定理引入全称量化函数,自动推理困难,作者采用 container morphism 作为多态函数的替代表示,以更可操作的方式刻画参数性,并把程序翻译到 container 设定。结果表明,带输入输出示例的多态程序可实现性推理可以被自动化。

问题
如何自动推理多态程序规约在给定输入输出示例与 sketch 下是否可实现,尤其是自由定理带来的全称量化使推理困难。
方法
将多态程序翻译到 container morphism 表示,以更可管理的方式捕获参数性,并在此设定下结合输入输出示例与 sketch 推理可实现性。
评估
以形式化方式展示该翻译使带输入输出示例的多态程序可实现性推理可以自动化;摘要未报告具体实现或实验评估。
原文摘要(Abstract)

Parametricity states that polymorphic functions behave the same regardless of how they are instantiated. When developing polymorphic programs, Wadler’s free theorems can serve as free specifications, which can turn otherwise partial specifications into total ones, and can make otherwise realizable specifications unrealizable. This is of particular interest to the field of program synthesis, where the unrealizability of a specification can be used to prune the search space. In this paper, we focus on the interaction between parametricity, input-output examples, and sketches. Unfortunately, free theorems introduce universally quantified functions that make automated reasoning difficult. Container morphisms provide an alternative representation for polymorphic functions that captures parametricity in a more manageable way. By using a translation to the container setting, we show how reasoning about the realizability of polymorphic programs with input-output examples can be automated.

链接与引用

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

BibTeX
@article{abs-2406-18304,
  title = {Example-Based Reasoning about the Realizability of Polymorphic Programs},
  author = {Niek Mulleners and Johan Jeuring and Bastiaan Heeren},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {ICFP},
  year = {2024},
  doi = {10.1145/3674636}
}