计算机科学 > 程序设计语言
[提交于 2026年11月2日]
标题:Handling JAX
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Languages that target hardware accelerators typically expose a restricted, first-order core without recursion or first-class functions, leaving programmers without a principled way to express computational effects. This paper presents a technique for compiling effect handlers to such a constrained target. We introduce a novel translation that statically eliminates effect handlers, and prove that it preserves both typing and semantics. Moreover, we address the challenges of integrating effect handlers with structured control flow, where continuations cannot be constructed statically. The calculus and all our results are fully mechanized in the Lean 4 proof assistant. Finally, we implement our design as a library for JAX, a Python domain-specific language for accelerator programming, and demonstrate its expressiveness through practical case studies.
提交历史
来自:Oghenevwogaga Ebresafe[v1] 2026年11月2日 星期一 20:23:13 UTC (2,141 KB)