Handling JAX
Oghenevwogaga Ebresafe, Daniel Zheng, Gordon Plotkin, Ningning Xie
Key points
From the paper's conclusion- We introduce a novel translation that statically eliminates effect handlers, and prove that it preserves both typing and semantics.
Abstract
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Automatic Certified Differentiation in LeanarXiv · 2026
- Proving LLM-Generated GPU Kernels Correct and Safe: Floating-Point Verification in Lean and VerCorsarXiv · 2026
- Backpropagation Through Compiled CodeACM Transactions on Mathematical Software · 2026
- Formalizing PTX in Lean to Prove GPU Kernel CorrectnessarXiv · 2026
- SafeJIT: A Speculating JIT Engine Verified Down to the Machine CodearXiv · 2026
- Cleave: Scaling Tensor Program Optimization via Decoupled Algebraic Search and Operator SchedulingarXiv · 2026