跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2611.24984 · v1

Mode Inference for Substructural Adjoint Types

首次提交 2026-11-18 08:31
版本更新 2026-11-18 08:31
雷达观测 2026-11-21 12:19
arXiv ↗PDF ↗

摘要

Adjoint types [Jang et al. 2024] provide a method of mixing substructural modes (for example, linear, affine, strict, or unrestricted) in a type system while preserving the proof-theoretic and computational properties of each mode. Uses of such a system include performing compiler optimizations or providing safety guarantees on parts of a program whose modes support them, while not restricting the programmer's ability to write other code as they usually do. However, Jang et al.'s algorithmic type system is monomorphic in the modes, requiring the programmer to anticipate a potentially large number of combinations of modes, and possibly copy code to conform to each of them. In this paper we define a mode inference algorithm for programs with adjoint types that produces principal modes, summarizing all possible substructural modes of a function in a simple constraint language. This removes the burden from the programmer to a priori analyze the substructural properties of their code, and, furthermore, allows a single function definition to subsume all its instances at different modes. We show that our system is sound and complete with respect to a mild restriction of Jang et al.'s monomorphic version.

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

目前只收录了一个版本。收录下一版后,可以对照标题、作者、分类和摘要。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v1 · 2026-11-18 08:31 · 最新观测版本

Mode Inference for Substructural Adjoint Types

Adjoint types [Jang et al. 2024] provide a method of mixing substructural modes (for example, linear, affine, strict, or unrestricted) in a type system while preserving the proof-theoretic and computational properties of each mode. Uses of such a system include performing compiler optimizations or providing safety guarantees on parts of a program whose modes support them, while not restricting the programmer's ability to write other code as they usually do. However, Jang et al.'s algorithmic type system is monomorphic in the modes, requiring the programmer to anticipate a potentially large number of combinations of modes, and possibly copy code to conform to each of them. In this paper we define a mode inference algorithm for programs with adjoint types that produces principal modes, summarizing all possible substructural modes of a function in a simple constraint language. This removes the burden from the programmer to a priori analyze the substructural properties of their code, and, furthermore, allows a single function definition to subsume all its instances at different modes. We show that our system is sound and complete with respect to a mild restriction of Jang et al.'s monomorphic version.

查看此版本解读 →查看此版本原文 ↗