Building Extensible Program Logics through Effect Handlers

📅 2026-07-14
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Traditional program logics struggle to scale and compose when accommodating new computational effects. This work proposes a novel, extensible program logic based on effect handlers, unifying the treatment of concurrency, distributed execution, and crash recovery within a purely sequential language. By formally characterizing handler properties, the approach yields inference rules that are strictly stronger than those in prior work. Building on this foundation, the paper further develops an extensible relational logic capable of supporting contextual refinement proofs. The resulting framework substantially enhances both the compositional reasoning capabilities and verification strength for programs exhibiting complex computational effects.
📝 Abstract
One strategy for reasoning about programs that have certain kinds of effects is to use program logics that provide specialized rules for reasoning about these effects. However, developing program logics requires skills that are distinct from those needed for using program logics, making the development of new logics challenging and less accessible. Moreover, when developing new logics, it can be difficult to reuse components from prior logics or combine support for different effects. In this paper, we propose an approach for operationally building extensible program logics based on effect handlers. Our starting point is an expressive program logic for reasoning about programs written in a pure, sequential language with support for effect handlers. Within this language, we implement handlers that model concurrency, distributed execution, and crash-recovery behavior. Then, by proving properties about these handlers, we extend the program logic and derive expressive rules for reasoning about these effects. In some cases, this approach leads to stronger reasoning rules than those found in prior program logics targeting these features. In addition, we develop a relational logic for proving contextual refinements between programs using effects. As with unary reasoning, handlers enable this relational logic to be developed in an extensible way.
Problem

Research questions and friction points this paper is trying to address.

program logics
effect handlers
extensibility
computational effects
reasoning
Innovation

Methods, ideas, or system contributions that make the work stand out.

effect handlers
extensible program logics
program verification
relational reasoning
contextual refinement
🔎 Similar Papers
2024-07-16arXiv.orgCitations: 1
2024-01-09ACM Transactions on Programming Languages and SystemsCitations: 2