Lune

OOPSLA2026顶会

Handling Exceptions and Effects with Automatic Resource Analysis

Ethan Chu, Yiyang Guo, Jan Hoffmann

摘要

There exist many techniques for automatically deriving parametric resource (or cost) bounds by analyzing the source code of a program. These techniques work effectively for a large class of programs and language features. However, non-local transfer of control as needed for exception or effect handlers has remained a challenge.

This paper presents the first automatic resource bound analysis that supports non-local control transfer between exceptions or effects and their handlers. The analysis is an extension of type-based automatic amortized resource analysis (AARA), which automates the potential method of amortized analysis. It is presented for a simple functional language with lists and linear potential functions. However, the ideas are directly applicable to richer settings and implemented for Standard ML and polynomial potential functions.

Apart from the new type system for exceptions and effects, a main contribution is a novel syntactic typesoundness theorem that establishes the correctness of the derived bounds with respect to a stack-based abstract machine. An experimental evaluation shows that the new analysis is capable of analyzing programs that cannot be analyzed by existing methods and that the efficiency overhead of supporting exception and effect handlers is low.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • A unifying type-theory for higher-order (amortized) cost analysis 引用了 Liquidate your assets: reasoning about resource usage in liquid Haskell
  • A modular cost analysis for probabilistic programs 引用了 Verifying and Synthesizing Constant-Resource Implementations with Types
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper20

  1. Retrofitting effect handlers onto OCamlK. C. Sivaramakrishnan, Stephen Dolan, Leo White, Tom Kelly 等PLDI 2021 · 56 次引用
  2. Verifying and Synthesizing Constant-Resource Implementations with TypesVan Chan Ngo, Mario Dehesa-Azuara, Matthew Fredrikson, Jan HoffmannS&P 2017 · 51 次引用
  3. A modular cost analysis for probabilistic programsMartin Avanzini, Georg Moser, Michael SchaperOOPSLA 2020 · 41 次引用
  4. Liquidate your assets: reasoning about resource usage in liquid HaskellMartin A. T. Handley, Niki Vazou, Graham HuttonPOPL 2020 · 38 次引用
  5. A unifying type-theory for higher-order (amortized) cost analysisVineet Rajani, Marco Gaboardi, Deepak Garg, Jan HoffmannPOPL 2021 · 26 次引用

相关 Paper

  1. Automatic Amortized Resource Analysis with Regular Recursive TypesJessie Grosen, David M. Kahn, Jan HoffmannLICS 2023 · 5 次引用
  2. Robust Resource Bounds with Static Analysis and Bayesian InferenceLong Pham, Feras A. Saad, Jan HoffmannPLDI 2024 · 6 次引用
  3. Automatic Linear Resource Bound Analysis for Rust via Prophecy PotentialsQihao Lian, Di WangOOPSLA 2025 · 1 次引用
  4. Zero-Overhead Lexical Effect HandlersCong Ma, Zhaoyi Ge, Max Jung, Yizhou ZhangOOPSLA 2025 · 2 次引用
  5. Dynamic Wind for Effect HandlersDavid Voigt, Philipp Schuster, Jonathan Immanuel BrachthäuserOOPSLA 2025
黄昏的海面,两侧是细线勾勒的悬崖