paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Compiling With Classical Connectives

用经典连接词进行编译
LMCS vol.Volume 16, Issue 32020匹配度 1/10 · 该论文属于编程语言理论基础,讨论极性、经典连接词、call-by-need 编译与类型编码,但完全不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,与用户的核心交叉方向缺少直接关联。引用 10 inbox
Paul Downen, Zena M. Ariola
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:将极性扩展到 call-by-need 并引入四种对偶移位,用经典连接词编码类型以编译惰性函数语言。

极性研究表明理想语言应结合 call-by-value 与 call-by-name,但这遗漏了实践中的 call-by-need(如 Haskell)。本文加入共享机制,将极性扩展到 call-by-need:用四种对偶移位取代正负两种移位。基于 data/codata,作者用经典连接词编码多种内置与用户定义类型,把经典逻辑对称性带入构造性计算。关键结果是能编译带用户定义类型的类 Haskell 函数语言,并以一对对合否定连接参数多态与抽象数据类型;还研究 call-by-need 的对偶,即在控制流中共享计算。

问题
如何在兼具 call-by-value 与 call-by-name 的极性框架中纳入 call-by-need,并为惰性函数语言提供统一的编译与类型编码方案。
方法
引入共享机制,将极性移位泛化为四种对偶移位,基于 data/codata 用经典连接词编码内置与用户定义类型,并研究 call-by-need 的对偶。
评估
属于理论构造与设计工作,通过构造性编码和编译方案展示可行性,并论证对合否定可沟通参数多态与抽象数据类型。
原文摘要(Abstract)

The study of polarity in computation has revealed that an "ideal" programming language combines both call-by-value and call-by-name evaluation; the two calling conventions are each ideal for half the types in a programming language. But this binary choice leaves out call-by-need which is used in practice to implement lazy-by-default languages like Haskell. We show how the notion of polarity can be extended beyond the value/name dichotomy to include call-by-need by adding a mechanism for sharing which is enough to compile a Haskell-like functional language with user-defined types. The key to capturing sharing in this mixed-evaluation setting is to generalize the usual notion of polarity "shifts:" rather than just two shifts (between positive and negative) we have a family of four dual shifts. We expand on this idea of logical duality -- "and" is dual to "or;" proof is dual to refutation -- for the purpose of compiling a variety of types. Based on a general notion of data and codata, we show how classical connectives can be used to encode a wide range of built-in and user-defined types. In contrast with an intuitionistic logic corresponding to pure functional programming, these classical connectives bring more of the pleasant symmetries of classical logic to the computationally-relevant, constructive setting. In particular, an involutive pair of negations bridges the gulf between the wide-spread notions of parametric polymorphism and abstract data types in programming languages. To complete the study of duality in compilation, we also consider the dual to call-by-need evaluation, which shares the computation within the control flow of a program instead of computation within the information flow.

链接与引用

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

BibTeX
@article{abs-1907-13227,
  title = {Compiling With Classical Connectives},
  author = {Paul Downen and Zena M. Ariola},
  journal = {Logical Methods in Computer Science},
  volume = {Volume 16, Issue 3},
  year = {2020},
  doi = {10.23638/lmcs-16(3:13)2020}
}