paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automatic Amortized Resource Analysis with Regular Recursive Types

带正则递归类型的自动摊销资源分析
LICS 2023 38th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)2023匹配度 4/10 · 论文属于纯PL领域的自动摊销资源分析(AARA),扩展类型系统以支持正则递归类型上的资源多项式,不涉及LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户核心的PL与AI交叉方向匹配度低;但静态分析和形式化验证是用户感兴趣的方法论,因此有一定边缘相关性。引用 7 inbox
Jessie Grosen, David M. Kahn, Jan Hoffmann
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:为任意正则递归类型定义的代数数据结构构造资源多项式,并在 AARA 资源类型系统中实现复杂数据结构上的自动资源界推断。

自动资源界分析旨在静态推断程序执行的符号化资源消耗上界,但其长期难点是推断依赖于复杂自定义数据结构的界。本文扩展基于类型的自动摊销资源分析(AARA),在正则递归类型定义的代数数据结构上统一构造资源多项式;这些资源函数推广了此前针对列表等结构提出的多项式资源函数,可视为给定递归类型值上的一般多项式概念。作者为带递归类型的核心语言 FPC 设计资源类型系统,说明如何将资源多项式与 AARA 集成并保留已有优势。为简洁表述规则并证明相对小步代价语义的可靠性,文章引入自由半模表达多元势标注,并用逻辑关系赋予资源类型语义,从而只需对类型推导作一次归纳即可证明可靠性。

问题
自动资源界分析难以对复杂或自定义数据结构推断符号化资源界;已有 AARA 的资源函数未覆盖任意数据结构,需要回答正则递归类型是否都能支持此类资源多项式。
方法
基于 AARA 与势方法,为 regular recursive types 定义的代数数据结构统一构造资源多项式,并在带递归类型的核心语言 FPC 中设计资源类型系统;采用自由半模表示多元势标注,并用逻辑关系证明类型系统相对小步代价语义的可靠性。
评估
评估以理论结果为主:证明资源多项式推广现有资源函数并保持 AARA 的推断优势;可靠性证明只需对类型推导进行一次归纳。
原文摘要(Abstract)

The goal of automatic resource bound analysis is to statically infer symbolic bounds on the resource consumption of the evaluation of a program. A longstanding challenge for automatic resource analysis is the inference of bounds that are functions of complex custom data structures. This article builds on type-based automatic amortized resource analysis (AARA) to address this challenge. AARA is based on the potential method of amortized analysis and reduces bound inference to standard type inference with additional linear constraint solving, even when deriving non-linear bounds. Such bounds come from resource functions, which are linear combinations of basic functions of data structure sizes that fulfill certain closure properties.Previous work on AARA defined resource functions for many data structures such as lists of lists, but left open whether such functions exist for arbitrary data structures. This work answers this question positively by uniformly constructing resource polynomials for algebraic data structures defined by regular recursive types. These functions are a generalization of all previously proposed polynomial resource functions and can be seen as a general notion of polynomials for values of a given recursive type. A resource type system for FPC, a core language with recursive types, demonstrates how resource polynomials can be integrated with AARA while preserving all benefits of past techniques. The article also proposes the use of new techniques useful for stating the rules of this type system succinctly and proving it sound against a small-step cost semantics. First, multivariate potential annotations are stated in terms of free semimodules, substantially abstracting details of the presentation of annotations and the proofs of their properties. Second, a logical relation giving semantic meaning to resource types enables a proof of soundness by a single induction on typing derivations.

链接与引用

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

BibTeX
@inproceedings{GrosenK023,
  title = {Automatic Amortized Resource Analysis with Regular Recursive Types},
  author = {Jessie Grosen and David M. Kahn and Jan Hoffmann},
  booktitle = {LICS},
  year = {2023},
  doi = {10.1109/lics56636.2023.10175720}
}