Yarrow: Reconciling Effects Handlers and Region-Based Memory Management
The problem is that algebraic effects with multi-shot handlers break the stack discipline and region-exit invariants required by region-based memory management. The method is a new language, Yarrow, with a program logic called Yarrow Logic (YL) for safe, modular reasoning about regions under one-shot and multi-shot effect handlers. Experimental evidence shows YL proves correctness of case studies including checkpointing, asynchronous computation, and a LIFO data structure, all using region-allocated memory to avoid garbage collection. This matters because it enables efficient, region-managed memory in languages with algebraic effects, eliminating reliance on garbage-collected heap memory.