paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A cost-aware logical framework

一个成本感知的逻辑框架
POPL 6(POPL)2022匹配度 3/10 · 论文属于依赖类型论、成本分析与形式化验证,和用户关注的 AI→PL 中“LLM/Agent 改进形式化验证”只有非常间接的关联;未涉及 LLM/Agent、静态分析应用于机器学习系统、浮点程序分析或贝叶斯程序分析等核心方向。引用 23 inbox
Yue Niu, Jonathan Sterling, Harrison Grodin, Robert Harper
crossref: 2026-09-10

AI 速览

一句话:提出 calf 成本感知逻辑框架,以依赖类型论统一程序行为与成本推理,并在 Agda 中机器化验证算法复杂度。

论文研究如何在一个统一的逻辑框架中推理函数式程序的定量成本。作者受模态相区分工作启发,提出 calf——一个成本感知逻辑框架,将程序成本结构刻画为计算效应,并在内涵与外延之间引入相区分,使成本感知程序满足输入/输出行为不依赖成本的非干涉性质。calf 是全程依赖类型论,可用同一语言编程并规约成本与行为,并能与类型论证明助手中的现有数学库集成。为评估框架,作者实现了递推关系法与物理家摊还分析法,并在 Agda 中完全机器化验证:Euclid 算法的紧致闭界、批量队列的摊还复杂度,以及归并排序串行与并行复杂度的紧致闭界。最后,作者通过模型构造论证 calf 中定量推理的可靠性。

问题
如何在一个统一的逻辑框架中推理函数式程序的定量成本,并保证成本推理不干扰程序的行为语义?
方法
提出 calf:以模态相区分区分内涵与外延,将程序成本结构建模为计算效应,构造全程依赖类型论及语义模型,并证明成本感知程序满足非干涉性质;用递推关系法和物理家摊还法进行成本分析。
评估
在 Agda 中机器化验证 Euclid 算法、批量队列、归并排序(串行与并行)的紧致成本界,并通过模型构造验证定量推理的可靠性。
原文摘要(Abstract)

We present calf , a c ost- a ware l ogical f ramework for studying quantitative aspects of functional programs. Taking inspiration from recent work that reconstructs traditional aspects of programming languages in terms of a modal account of phase distinctions , we argue that the cost structure of programs motivates a phase distinction between intension and extension . Armed with this technology, we contribute a synthetic account of cost structure as a computational effect in which cost-aware programs enjoy an internal noninterference property: input/output behavior cannot depend on cost. As a full-spectrum dependent type theory, calf presents a unified language for programming and specification of both cost and behavior that can be integrated smoothly with existing mathematical libraries available in type theoretic proof assistants. We evaluate calf as a general framework for cost analysis by implementing two fundamental techniques for algorithm analysis: the method of recurrence relations and physicist’s method for amortized analysis . We deploy these techniques on a variety of case studies: we prove a tight, closed bound for Euclid’s algorithm, verify the amortized complexity of batched queues, and derive tight, closed bounds for the sequential and parallel complexity of merge sort, all fully mechanized in the Agda proof assistant. Lastly we substantiate the soundness of quantitative reasoning in calf by means of a model construction.

链接与引用

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

BibTeX
@article{paperbot1596,
  title = {A cost-aware logical framework},
  author = {Yue Niu and Jonathan Sterling and Harrison Grodin and Robert Harper},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {POPL},
  year = {2022},
  doi = {10.1145/3498670}
}