paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Dependently-Typed Programming with Logical Equality Reflection

带逻辑等式反射的依赖类型编程
ICFP 7(ICFP)2023匹配度 2/10 · 论文属于依赖类型、终止性追踪与等式反射的纯PL类型系统/形式验证工作,未涉及LLM/Agent、机器学习系统或Agentic程序中的静态分析,也未涉及浮点程序分析或贝叶斯程序分析,与画像的核心交叉方向基本无关。引用 1 inbox
Yiyun Liu, Stephanie Weirich
crossref: 2026-09-10

AI 速览

一句话:提出 System DE,用模式同时追踪终止性与相关性并支持等式反射,使证明可在编译前被擦除。

在允许一般递归的依赖类型函数式语言中,作为证明的程序必须被求值才能保持类型健全性,这迫使程序员在性能与安全性之间取舍。本文提出 System DE:一个显式类型、带模式(mode)的核心演算,支持终止性追踪与等式反射。程序员可以在逻辑子语言中为可能发散的程序书写归纳证明,并将这些证明反射给类型检查器,同时确信编译器会在执行前将其擦除。System DE 的关键设计是用模式同时处理终止性与相关性追踪,这既简化了演算设计,也为未来扩展留出空间。System DE 适合在 Glasgow Haskell Compiler 中使用,也可作为任何通用依赖类型语言的基础。

问题
依赖类型语言允许一般递归时,作为证明的程序必须求值以维持类型健全性,导致性能与安全性的权衡。
方法
提出 System DE,一种显式类型、带模式的核心演算,用模式追踪终止性与相关性,并支持将逻辑子语言中的归纳证明反射给类型检查器且在执行前擦除。
评估
论文主要为设计性工作,摘要未报告实验评估;以 System DE 的形式化设计及其在 GHC 中使用的可行性作为论证。
原文摘要(Abstract)

In dependently-typed functional programming languages that allow general recursion, programs used as proofs must be evaluated to retain type soundness. As a result, programmers must make a trade-off between performance and safety. To address this problem, we propose System DE, an explicitly-typed, moded core calculus that supports termination tracking and equality reflection. Programmers can write inductive proofs about potentially diverging programs in a logical sublanguage and reflect those proofs to the type checker, while knowing that such proofs will be erased by the compiler before execution. A key feature of System DE is its use of modes for both termination and relevance tracking, which not only simplifies the design but also leaves it open for future extension. System DE is suitable for use in the Glasgow Haskell Compiler, but could serve as the basis for any general purpose dependently-typed language.

链接与引用

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

BibTeX
@article{paperbot1929,
  title = {Dependently-Typed Programming with Logical Equality Reflection},
  author = {Yiyun Liu and Stephanie Weirich},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {ICFP},
  year = {2023},
  doi = {10.1145/3607852}
}