A Taxonomy of Predicate Transformer Monads for Specifying Monadic Programs
Abigail Pribisova, Yao Li, Cezar-Constantin Andrici, Catalin Hritcu, Kenji Maillard, Exequiel Rivas
Abstract
Monads of weakest precondition predicate transformers are the foundation of several verification frameworks for monadic programs. For specifying monadic computations with nondeterminism and nontermination, in addition to weakest preconditions, we introduce the first strongest postcondition monads covering all combinations of angelic or demonic nondeterminism and partial or total interpretations of nontermination. For extending these base strongest postcondition monads with side effects such as mutable state, monad transformers do not yield the expected monads, so we instead generalize the base monads to arrows and use arrow transformers. We give a taxonomy of weakest precondition and strongest postcondition monads, for the base monads and for their versions with state, and show that the known relationships between under- and over-approximate triples based on predicate transformers already hold at the level of the predicate transformers themselves. We use the predicate transformer monads to define under- and over-approximate triples and, where possible, Dijkstra monads. Finally, we relate these two specification styles.
Create a lesson
Metadata
- Comments
- Submitted to ESOP'27, in v2 same PDF but fixed author order in metadata
Related papers
The Bell Experiment, Monadically
Shared title terminologycs.PLChenchao Ding, Amr Sabry
Tenon: A Unified Programming Framework for Retargetable PIM Compilation
Shared title terminologycs.PLNiansong Zhang, Shiran Guo, Zhiru Zhang
When Is Program Structure Required? Certificate-Grounded Calibration of Program-Induction Difficulty
Shared title terminologycs.PLWenzhang Du
Statically Typed Purely Functional Definitional Interpreters for {\it Essentials of Programming Languages}
Shared title terminologycs.PLKwanghoon Choi
Simulating Quantum Computation Using Probabilistic Programming
Shared title terminologycs.PLYafei Yang, Chung-chieh Shan
Agent-Native by Design: A Programming Language for Agentic Applications
Shared title terminologycs.PLJayanaka Dantanarayana, Savini Kashmira, Xiaoyu Ma et al.