Lexical Effect Handlers, Directly
summary
Compiles lexically scoped algebraic effect handlers down to low-level stack switching and header frames, identifying handlers by memory address so handler lookup and continuation capture are constant-time handler lookup. The compiler called Lexa emits assembly sequences that allocate handler header frames, swap stack pointers for capture, and use a single-element tuple token to disallow reuse, giving a linear scaling runtime where prior systems show polynomial or quadratic cost. Formal semantic preservation is proved and artifacts and benchmarks are available.
AI-written summary · about
chapters (10)
- 0:00Lexical effect handlers intro
- 1:03Operational semantics
- 2:09Scalability issues
- 3:34Compilation strategy
- 5:23Compiling to assembly
- 7:32Execution in assembly
- 11:01Handler optimizations
- 11:43Laxa compiler overview
- 13:10Benchmark results
- 14:21Q&A on multi-shot resumptions
related talks
22mLexical Effect Handler: Fast by Design, Correct by Proof
15mZero-Overhead Lexical Effect Handlers
15mEffect Handlers, Evidently
21mLift Inference for Lexical Effect Handlers with Second-Class Functions
21mLift Inference for Lexical Effect Handlers with Second-Class Functions
12mCompiling Effect Handlers in Capability-Passing Style
32mExperience Report: Graph Rewriting with Lexical Effect Handlers
16mAn Intrinsically Typed Compiler for Algebraic Effect Handlers
