Hostname: page-component-74656f9884-6grmk Total loading time: 0 Render date: 2026-11-06T04:59:44.067Z Has data issue: false hasContentIssue false

Weakest preconditions in fibrations

Published online by Cambridge University Press:  28 October 2022

Alejandro Aguirre
Affiliation:
Aarhus University, Åbogade 34, 8200 Aarhus N, Denmark
Shin-ya Katsumata*
Affiliation:
National Institute of Informatics, Chiyoda City 100-8361, Japan
Satoshi Kura
Affiliation:
JSPS Research Fellow and National Institute of Informatics, Chiyoda City 100-8361, Japan
*
*Corresponding author. Email: s-katsumata@nii.ac.jp
Rights & Permissions [Opens in a new window]

Abstract

Weakest precondition transformers are useful tools in program verification. One of their key properties is composability, that is, the weakest precondition predicate transformer (wppt for short) associated to program $f;\;g$ should be equal to the composition of the wppts associated to f and g. In this paper, we study the categorical structure behind wppts from a fibrational point of view. We characterize the wppts that satisfy composability as the ones constructed from the Cartesian lifting of a monad. We moreover show that Cartesian liftings of monads along lax slice categories bijectively correspond to Eilenberg–Moore monotone algebras. We then instantiate our techniques by deriving wppts for commonplace effects such as the maybe monad, the nonempty powerset monad, the counter monad, or the distribution monad. We also show how to combine them to derive the wppts appearing in the literature of verification of probabilistic programs.

Information

Type
Special Issue: The Power Festschrift
Copyright
© The Author(s), 2022. Published by Cambridge University Press