paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type Theory

抽象函数即类型:依赖类型论中成本与行为的模块化验证
POPL 10(POPL)2026匹配度 3/10 · 论文属于依赖类型论与模块化程序验证/成本验证,虽与形式化验证相关,但未涉及 LLM/Agent、静态分析工具、浮点程序分析或贝叶斯程序分析等核心方向,更偏纯类型论理论。引用 8 inbox
Harrison Grodin, Runming Li, Robert Harper
crossref: 2026-09-10

AI 速览

一句话:在单价依赖类型论中把抽象函数编码为类型,用相位区分与密封效应支持成本与行为的模块化验证。

论文针对库规约与私有实现之间的抽象如何在验证中得到保持这一模块化难题,指出Hoare的抽象函数方法缺乏语言级支持。作者在单价依赖类型论中给出Hoare方法的合成式表述:通过相位区分与gluing构造,把抽象函数编码为类型,并用一对模态将类型分解为具体部分与抽象部分;非干扰定理刻画了该理论提供的模块化保证。该框架还可扩展到成本验证,借助monadic sealing effect实现对成本的模块化推理,使实现可在私有细节影响可观察成本时仍受规约上界约束。结果支持隐藏客户不关心的私有细节,同时对程序成本与行为作精确规约和模块化开发证明。

问题
库的公共规约与私有实现之间的抽象难以在语言层面得到保证,Hoare的抽象函数方法依赖实现与规约的传统分离,缺少语言支持。模块化验证还需同时覆盖程序行为与成本。
方法
在单价依赖类型论中合成式地编码Hoare方法:用相位区分、gluing构造与一对模态把抽象函数表示为类型,并将类型分解为具体和抽象部分;引入monadic sealing effect以支持成本的模块化推理。
评估
通过构造性理论发展及非干扰定理来论证模块化保证,并展示该理论可扩展到成本验证,使客户成本可相对于成本感知规约进行分析、实现成本可受规约上界约束。摘要未报告实现或实证评估。
原文摘要(Abstract)

Software development depends on the use of libraries whose public specifications inform client code and impose obligations on private implementations; it follows that verification at scale must also be modular, preserving such abstraction. Hoare’s influential methodology uses abstraction functions to demonstrate the coherence between such concrete implementations and their abstract specifications. However, the Hoare methodology relies on a conventional separation between implementation and specification, providing no linguistic support for ensuring that this convention is obeyed. This paper proposes a synthetic account of Hoare’s methodology within univalent dependent type theory by encoding the data of abstraction functions within types themselves. This is achieved via a phase distinction , which gives rise to a gluing construction that renders an abstraction function as a type and a pair of modalities that fracture a type into its concrete and abstract parts. A noninterference theorem governing the phase distinction characterizes the modularity guarantees provided by the theory. This approach scales to verification of cost, allowing the analysis of client cost relative to a cost-aware specification. A monadic sealing effect facilitates modularity of cost, permitting an implementation to be upper-bounded by its specification in cases where private details influence observable cost. The resulting theory supports modular development of programs and proofs in a manner that hides private details of no concern to clients while permitting precise specifications of both the cost and behavior of programs.

链接与引用

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

BibTeX
@article{GrodinLH26,
  title = {Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type Theory},
  author = {Harrison Grodin and Runming Li and Robert Harper},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {POPL},
  year = {2026},
  doi = {10.1145/3776673}
}