paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Regular language type inference with term rewriting

基于项重写的正则语言类型推断
ICFP 4(ICFP)2020匹配度 2/10 · 论文属于纯 PL/形式验证方向,研究正则语言类型系统、项重写与树自动机用于高阶函数程序验证,未涉及 LLM/Agent、机器学习系统、浮点程序分析或贝叶斯程序分析。它与研究画像中 PL 与 AI 交叉的核心问题距离较远,仅可作为静态分析/形式验证背景知识存档。引用 12 inbox
Timothée Haudebourg, Thomas Genet, Thomas Jensen
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出以正则语言为类型的类型系统及推断,用项重写与树自动机自动验证树处理高阶函数程序的安全性质。

本文面向树处理的高阶函数式程序,目标是全自动验证其安全性质。作者用项重写系统建模程序及其语义,用树自动机建模代数数据类型;构造输入项重写系统的正则抽象解释,其抽象域为正则语言集合。由此导出一种类型系统,其中每个类型都是正则语言,并给出类型推断过程。推断机制基于树自动机补全算法的不变式学习,用于检查安全性质是否有效。该学习过程具有正则完备性与反驳完备性:若某词项能被赋予正则类型,最终会找到该类型;若不存在任何类型(正则或非正则),最终会找到反例。

问题
如何对树处理的高阶函数式程序的安全性质进行全自动验证,并为其建立可推断的正则语言类型系统。
方法
以项重写系统建模程序语义、树自动机建模代数数据类型,定义正则抽象解释并导出正则语言类型系统,通过基于树自动机补全的不变式学习实现类型推断。
评估
论文从理论层面论证推断过程的正则完备性与反驳完备性,即能找到正则类型或最终发现反例;未报告实验评估。
原文摘要(Abstract)

This paper defines a new type system applied to the fully automatic verification of safety properties of tree-processing higher-order functional programs. We use term rewriting systems to model the program and its semantics and tree automata to model algebraic data types. We define the regular abstract interpretation of the input term rewriting system where the abstract domain is a set of regular languages. From the regular abstract interpretation we derive a type system where each type is a regular language. We define an inference procedure for this type system which allows us check the validity of safety properties. The inference mechanism is built on an invariant learning procedure based on the tree automata completion algorithm. This invariant learning procedure is regularly-complete and complete in refutation, meaning that if it is possible to give a regular type to a term then we will eventually find it, and if there is no possible type (regular or not) then we will eventually find a counter-example.

链接与引用

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

BibTeX
@article{HaudebourgGJ20,
  title = {Regular language type inference with term rewriting},
  author = {Timothée Haudebourg and Thomas Genet and Thomas Jensen},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {4},
  number = {ICFP},
  year = {2020},
  doi = {10.1145/3408994}
}