paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Type Inference for Functional and Imperative Dynamic Languages

函数式与命令式动态语言的类型推断
OOPSLA 10(OOPSLA1)2026匹配度 2/10 · 该论文属于程序语言理论中的类型系统与类型推断,面向 JavaScript/Python/Julia 等动态语言的可变数据结构建模,但未涉及用户画像中的 LLM/Agent、ML 系统静态分析、浮点程序分析或贝叶斯程序分析等核心交叉方向。引用 0 inbox
Mickaël Laurent, Jan Vitek
crossref: 2026-09-10

AI 速览

一句话:为同时支持函数式与命令式范式的动态语言提出基于集合论类型的类型系统与推断方法。

动态语言常混合函数式与命令式特性,已有基于集合论类型的重载与泛型函数类型推断难以直接处理可变状态和副作用。本文将相关工作扩展到不纯 λ 演算,针对 JavaScript、Python、Julia 等语言中的命令式特性设计类型系统,并提出用集合论类型表示参数化不透明数据类型,以精确建模可变数据结构,同时提升模块化、清晰性与可读性。作者还与现有方法进行比较,并在原型实现上通过一系列示例进行评估。

问题
如何为同时支持函数式与命令式范式的动态语言设计类型系统与类型推断,尤其要处理可变数据结构、副作用、重载与泛型函数。
方法
将先前针对重载和泛型函数的集合论类型工作推广到不纯 λ 演算,并引入参数化不透明数据类型的通用概念,以建模可变数据结构。
评估
通过与传统及现有工作比较,并在原型实现上运行一系列示例来评估方法的表达力与实用性。
原文摘要(Abstract)

In this paper, we formalize a type system based on set-theoretic types for dynamic languages that support both functional and imperative programming paradigms. We adapt prior work in the typing of overloaded and generic functions to support an impure λ -calculus, focusing on imperative features commonly found in dynamic languages such as JavaScript, Python, and Julia. We introduce a general notion of parametric opaque data types using set-theoretic types, enabling precise modeling of mutable data structures while promoting modularity, clarity, and readability. Finally, we compare our approach to existing work and evaluate our prototype implementation on a range of examples.

链接与引用

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

BibTeX
@article{paperbot3783,
  title = {Type Inference for Functional and Imperative Dynamic Languages},
  author = {Mickaël Laurent and Jan Vitek},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA1},
  year = {2026},
  doi = {10.1145/3798220}
}