paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Liquid resource types

Liquid 资源类型
ICFP 4(ICFP)2020匹配度 3/10 · 该论文属于程序验证与类型系统领域,研究资源消耗的自动验证,但未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心交叉方向,与用户当前追踪的 PL↔AI 问题不直接相关。引用 14 inbox
Tristan Knoth, Di Wang, Adam Reynolds, Jan Hoffmann, Nadia Polikarpova
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出 Liquid 资源类型,用精化类型与潜势标注自动验证函数式程序的精确资源消耗界。

资源分析长期在自动化与表达力之间取舍:自动方法只能处理受限的资源界,依赖值的精确界往往需要手写证明。本文提出 Liquid 资源类型,将逻辑精化与潜势(potential)标注结合,借助精化类型对函数式程序进行摊销资源分析。其关键点是允许用户在数据结构声明上标注潜势在类型内的分配方式,从而表达多项式、指数以及依赖程序值的更精确资源界。作者证明了该类型系统的可靠性,并提供了可复用、灵活的数据结构库,用于开展资源分析。原型实现能够自动验证此前需要人工证明的资源界,展示了该方法在保持自动化的同时提升表达力的效果。

问题
现有函数式程序资源分析难以兼顾自动化与表达力:自动技术受限于较简单的资源界,而值相关的精确界通常依赖手写证明。
方法
提出 Liquid 资源类型,用逻辑精化和潜势标注扩展精化类型以进行摊销资源分析;用户可在数据类型声明中指定潜势分配,从而表达多项式、指数和值相关资源界。
评估
证明了类型系统的可靠性,提供了可复用且灵活的数据结构库,并用原型实现自动验证了此前需要手工证明的资源界。
原文摘要(Abstract)

This article presents liquid resource types, a technique for automatically verifying the resource consumption of functional programs. Existing resource analysis techniques trade automation for flexibility – automated techniques are restricted to relatively constrained families of resource bounds, while more expressive proof techniques admitting value-dependent bounds rely on handwritten proofs. Liquid resource types combine the best of these approaches, using logical refinements to automatically prove precise bounds on a program’s resource consumption. The type system augments refinement types with potential annotations to conduct an amortized resource analysis. Importantly, users can annotate data structure declarations to indicate how potential is allocated within the type, allowing the system to express bounds with polynomials and exponentials, as well as more precise expressions depending on program values. We prove the soundness of the type system, provide a library of flexible and reusable data structures for conducting resource analysis, and use our prototype implementation to automatically verify resource bounds that previously required a manual proof.

链接与引用

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

BibTeX
@article{abs-2006-16233,
  title = {Liquid resource types},
  author = {Tristan Knoth and Di Wang and Adam Reynolds and Jan Hoffmann and Nadia Polikarpova},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {4},
  number = {ICFP},
  year = {2020},
  doi = {10.1145/3408988}
}