|  | CMU-CS-25-134 Computer Science Department School of Computer Science, Carnegie Mellon University 
 
 
Typed Closure Conversion with Sum Types for Lauren Sands M.S. Thesis August 2025 
 Resource Aware ML (RaML) is a tool that statically infers resource bounds for OCaml programs. However, RaML cannot derive bounds for functions whose cost depends on values that are not arguments. Partially-applied higher-order functions, which are common in OCaml code, often cannot be analyzed for this reason. This thesis introduces a closure conversion transformation that rewrites higher-order programs into ones analyzable by RaML. Unlike traditional closure conversion which wraps functions with environments represented using existential types, this algorithm uses sum types, which allows RaML to access internal types and infer bounds. The transformation is well-typed and preserves semantics and cost, ensuring that analysis of the transformed program remains sound with respect to the original code. 56 pages 
Thesis Committee: 
Srinivasan Seshan, Head, Computer Science Department 
 | 
| 
    Return to: 
	SCS Technical Report Collection This page maintained by reports@cs.cmu.edu | |