paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Approximate normalization for gradual dependent types

渐进依赖类型的近似规范化
ICFP 3(ICFP)2019匹配度 2/10 · 该论文属于纯类型论/语言设计领域,研究渐进依赖类型的近似规范化,与用户关注的 LLM/Agent 交叉、机器学习系统静态分析、浮点程序分析及贝叶斯程序分析均无直接关联。引用 18 inbox
Joseph Eremondi, Éric Tanter, Ronald Garcia
crossref: 2026-09-10

AI 速览

一句话:提出 GDTL,以近似但全的编译期规范化支持渐进依赖类型,并证明类型检查可判定及渐进保证。

依赖类型能提升代码可靠性,但原型编写与旧代码迁移成本高;渐进类型可降低门槛,然而依赖类型检查需执行代码,而渐进代码可能引发运行时类型错误或发散,威胁健全性并破坏类型驱动开发。本文提出 GDTL,完整嵌入无类型与依赖类型语言并支持平滑过渡;引入渐进项允许类型索引不精确与省略证明项,运行时检查保证类型安全;区分编译期近似且全的规范化与运行时精确但可能失败或发散的求值。作者证明 GDTL 类型检查可判定,满足静态与动态渐进保证,并建立新的“规范化渐进保证”,刻画近似规范化关于不精确度的单调性。

问题
依赖类型语言可靠性高但原型编写与旧代码迁移困难;直接引入渐进类型时,依赖类型检查需执行代码,而渐进代码可能运行时类型错误或发散,威胁健全性并破坏类型驱动开发体验。
方法
提出 GDTL,完整嵌入无类型与依赖类型语言并支持平滑过渡;引入渐进项允许类型索引不精确与证明项省略,运行时检查保证类型安全;将编译期规范化设计为近似但全,运行时执行则精确但可能失败或发散。
评估
证明 GDTL 类型检查可判定,满足静态与动态渐进保证,并建立规范化渐进保证以刻画近似规范化相对于不精确度的单调性。
原文摘要(Abstract)

Dependent types help programmers write highly reliable code. However, this reliability comes at a cost: it can be challenging to write new prototypes in (or migrate old code to) dependently-typed programming languages. Gradual typing makes static type disciplines more flexible, so an appropriate notion of gradual dependent types could fruitfully lower this cost. However, dependent types raise unique challenges for gradual typing. Dependent typechecking involves the execution of program code, but gradually-typed code can signal runtime type errors or diverge. These runtime errors threaten the soundness guarantees that make dependent types so attractive, while divergence spoils the type-driven programming experience. This paper presents GDTL, a gradual dependently-typed language that emphasizes pragmatic dependently-typed programming. GDTL fully embeds both an untyped and dependently-typed language, and allows for smooth transitions between the two. In addition to gradual types we introduce gradual terms , which allow the user to be imprecise in type indices and to omit proof terms; runtime checks ensure type safety. To account for nontermination and failure, we distinguish between compile-time normalization and run-time execution: compile-time normalization is approximate but total, while runtime execution is exact , but may fail or diverge. We prove that GDTL has decidable typechecking and satisfies all the expected properties of gradual languages. In particular, GDTL satisfies the static and dynamic gradual guarantees: reducing type precision preserves typedness, and altering type precision does not change program behavior outside of dynamic type failures. To prove these properties, we were led to establish a novel normalization gradual guarantee that captures the monotonicity of approximate normalization with respect to imprecision.

链接与引用

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

BibTeX
@article{paperbot599,
  title = {Approximate normalization for gradual dependent types},
  author = {Joseph Eremondi and Éric Tanter and Ronald Garcia},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {3},
  number = {ICFP},
  year = {2019},
  doi = {10.1145/3341692}
}