Please note: This PhD seminar will take place in DC 3317.
Cong Ma, PhD candidate
David R. Cheriton School of Computer Science
Supervisor: Professor Yizhou Zhang
Lexically scoping effect handlers is a language-design idea that equips algebraic effects with a modular semantics: it enables local-reasoning principles without giving up on the control-flow expressiveness that makes effect handlers powerful. However, existing implementations risk incurring costs akin to the run-time search for dynamically scoped handlers.
This talk will present a compilation strategy for lexical effect handlers, adhering to the lexical scoping principle and targeting a language with low-level control over stack layout. Key aspects of this approach are formalized and proven correct. We embody the ideas in a language called Lexa: the Lexa compiler translates high-level effect handling to low-level stack switching. We evaluate the Lexa compiler on a set of benchmarks; the results suggest that it generates efficient code, reducing running-time complexity from quadratic to linear in some cases.