Efficient Compilation of Control Effects II (ECCE 2)
ECCE 2 is the successor to the ECCE project.
To utilize available computational resources efficiently and effectively, modern software must manage increasingly sophisticated control flow. Traditional language constructs–such as exceptions, coroutines, or async/await–are often rigid, non-composable, and introduce semantic as well as implementation complexity. Effect handlers unify these abstractions under a common model that is modular, composable, and type-safe. Their generality has made them attractive across domains like probabilistic, logic programming, and distributed programming. Yet, like many high-level abstractions, they impose a runtime cost that hinders broader adoption.
The first phase of the DFG project “Efficient Compilation of Control Effects” introduced a compilation strategy based on continuation-, capability-, and evidence-passing style. This approach specializes control flow statically and compiles to a core calculus optimized via existing compiler infrastructure, achieving significant speedups. However, important challenges remain: high-level targets like JavaScript lack tail-call support, and separate compilation limits cross-module optimization.
The goal of this continuation project is to address both problems. First, we will develop a compilation strategy for high-level target languages that supports advanced control flow and tail calls with minimal overhead. Second, we will establish a research programme around just-in-time compilation for effect handlers, enabling runtime specialization based on dynamic context. Together, these contributions will make effect handlers viable for performance-critical software that relies on complex yet structured, highly dynamic control flow.