arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.16133cs.PL
收藏

严格性(扩展版)

Typing Strictness (Extended Version)

University of Pennsylvania(宾夕法尼亚大学)

Daniel Sainati, Joseph W. Cutler, Benjamin C. Pierce, Stephanie Weirich

AI总结:

本文提出了一种新的严格性定义,通过更精确描述变量使用来细化传统定义,并在两种调用方式下建立类型论基础,证明其计算的严格性属性准确描述运行时变量使用。

摘要:

严格性分析对于非严格求值语言的高效实现至关重要,可以减轻惰性所带来的大部分性能开销。然而,在源级别上进行严格性推理可能具有挑战性和不直观性。我们提出了一种新的严格性定义,通过更精确地描述变量使用来细化传统的定义。我们在这两种调用方式下为该定义建立了类型论基础,借鉴了跟踪效果和共效果的类型系统文献。我们通过逻辑关系证明,由我们的类型系统计算出的严格性属性准确描述了运行时变量的使用情况,并提供了一种在调用方式系统到调用方式系统之间的严格性注释保持翻译。所有结果都在Rocq中机制化。

英文摘要:

Strictness analysis is critical to efficient implementation of languages with non-strict evaluation, mitigating much of the performance overhead of laziness. However, reasoning about strictness at the source level can be challenging and unintuitive. We propose a new definition of strictness that refines the traditional one by describing variable usage more precisely. We lay type-theoretic foundations for this definition in both call-by-name and call-by-push-value settings, drawing inspiration from the literature on type systems tracking effects and coeffects. We prove via a logical relation that the strictness attributes computed by our type systems accurately describe the use of variables at runtime, and we offer a strictness-annotation-preserving translation from the call-by-name system to the call-by-push-value one. All our results are mechanized in Rocq.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑