Search papers, labs, and topics across Lattice.
This paper introduces a novel approach to constructing extensible program logics using effect handlers, which enhances the reasoning capabilities for programs with various effects such as concurrency and crash recovery. By starting with a robust program logic for a pure sequential language, the authors demonstrate how to implement and prove properties of effect handlers, leading to the derivation of more powerful reasoning rules than existing logics. Additionally, they develop a relational logic that facilitates contextual refinements between programs, showcasing the extensibility of their framework.
Effect handlers not only simplify the development of program logics but also yield stronger reasoning rules than traditional methods, revolutionizing how we approach program effects.
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.