publications
publications by categories in reversed chronological order. generated by jekyll-scholar.
2026
- AARA w/ EffectsHandling Exceptions and Effects with Automatic Resource AnalysisEthan Chu, Yiyang Guo, and Jan HoffmannOOPSLA, Apr 2026
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 type- soundness 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.
@article{aara_effects, author = {Chu, Ethan and Guo, Yiyang and Hoffmann, Jan}, title = {Handling Exceptions and Effects with Automatic Resource Analysis}, year = {2026}, issue_date = {April 2026}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, volume = {10}, number = {OOPSLA1}, url = {https://doi.org/10.1145/3798207}, doi = {10.1145/3798207}, journal = {OOPSLA}, month = apr, articleno = {99}, keywords = {Automatic Resource Bound Analysis, Cost Analysis, Type Systems, Algebraic Effects, Computational Effects, Effect Handlers, Exceptions, Automatic Amortized Resource Analysis, K-Machine} }
2023
- RaML 2The Theory and Implementation of Resource Aware ML 2Ethan ChuCarnegie Mellon University, Apr 2023
Resource Aware ML (RaML) is a tool that can compute the resource use of programs in the ML family (SML, OCaml, etc) through a type-based technique known as automatic amortized resource analysis (AARA). Existing implementations of RaML have numerous shortcomings, such as lacking support for regular recursive types and being difficult to maintain. This thesis presents the theory and implementation of a new and improved version of RaML, Re- source Aware ML 2. Using work by Grosen et al, RaML 2 can analyze programs with regular recursive types, non-monotone resource analysis, and more. Furthermore, it presents the univariate AARA theory that the implementation is based on; univariate AARA’s expressive power is a subset of Grosen et al’s multivariate AARA, but it is still a unique variant. Additionally, this thesis presents supporting features for a full RaML implementation. This includes a new Intermediate Representation (IR) that the resource analysis operates on; this IR is implemented efficiently with an infrastructure known as Abstract Binding Trees. Other contributions include an SML frontend implementation that can translate arbitrary SML code to the RaML IR, as well as a linear programming solver backend.
@mastersthesis{chuthesis, author = {Chu, Ethan}, school = {Carnegie Mellon University}, title = {{The Theory and Implementation of Resource Aware ML 2}}, year = {2023}, }