paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Data flow refinement type inference

数据流精化类型推断
POPL 5(POPL)2021匹配度 3/10 · 论文属于纯 PL/静态分析方向,研究精化类型推断与抽象解释,虽与静态分析理论相关,但未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心交叉方向。仅可作为静态分析基础理论参考,与当前追的问题匹配度较低。引用 15 inbox
Zvonimir Pavlinovic, Yusen Su, Thomas Wies
crossref: 2026-09-10

AI 速览

一句话:提出参数化精化类型系统,用抽象解释刻画数据流语义并导出推断算法,统一并推广现有方法。

精化类型支持函数式程序的轻量级验证。现有静态推断常归约为约束Horn子句求解,但该归约本身抽象程序语义,影响精度。本文以抽象解释视角整体研究精化类型推断,提出一个参数化精化类型系统:参数可选择类型精化的抽象域及上下文敏感控制流的跟踪程度;并通过对函数式程序的新数据流语义做抽象解释,导出参数化推断算法。作者证明系统相对所构造抽象语义是可靠且完备的,揭示了推断中的关键抽象步骤,精度与效率权衡由参数控制,Liquid types等现有系统可视为具体实例。作者实现原型,评估八边形、多面体等新实例,效果优于现有工具,表明可系统构造稳健精确的推断算法。

问题
精化类型推断通常被归约为约束求解,但归约本身引入语义抽象,如何系统刻画并控制其对精度和效率的影响尚不清晰。
方法
提出参数化精化类型系统及其推断算法,以抽象域和上下文敏感控制流为参数,并将推断算法推导为对函数式程序数据流语义的抽象解释,证明相对抽象语义的可靠性与完备性。
评估
实现原型工具,实例化八边形、多面体等抽象域,并与现有工具比较,显示新推断算法稳健且精确。
原文摘要(Abstract)

Refinement types enable lightweight verification of functional programs. Algorithms for statically inferring refinement types typically work by reduction to solving systems of constrained Horn clauses extracted from typing derivations. An example is Liquid type inference, which solves the extracted constraints using predicate abstraction. However, the reduction to constraint solving in itself already signifies an abstraction of the program semantics that affects the precision of the overall static analysis. To better understand this issue, we study the type inference problem in its entirety through the lens of abstract interpretation. We propose a new refinement type system that is parametric with the choice of the abstract domain of type refinements as well as the degree to which it tracks context-sensitive control flow information. We then derive an accompanying parametric inference algorithm as an abstract interpretation of a novel data flow semantics of functional programs. We further show that the type system is sound and complete with respect to the constructed abstract semantics. Our theoretical development reveals the key abstraction steps inherent in refinement type inference algorithms. The trade-off between precision and efficiency of these abstraction steps is controlled by the parameters of the type system. Existing refinement type systems and their respective inference algorithms, such as Liquid types, are captured by concrete parameter instantiations. We have implemented our framework in a prototype tool and evaluated it for a range of new parameter instantiations (e.g., using octagons and polyhedra for expressing type refinements). The tool compares favorably against other existing tools. Our evaluation indicates that our approach can be used to systematically construct new refinement type inference algorithms that are both robust and precise.

链接与引用

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

BibTeX
@article{paperbot1176,
  title = {Data flow refinement type inference},
  author = {Zvonimir Pavlinovic and Yusen Su and Thomas Wies},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {5},
  number = {POPL},
  year = {2021},
  doi = {10.1145/3434300}
}