🤖 AI Summary
Existing general-purpose probabilistic logics struggle to support dynamic heap allocation and the resource algebras employed in separation logics such as Iris, making it difficult to reconcile pointer ownership, probabilistic independence, and conditional reasoning. This work proposes Amaryllis—the first logical framework that integrates Iris-style separation logic with general probabilistic reasoning. Its key innovation is an indexed assignment model that lifts resource algebras to the distributional level, enabling sound reasoning about ownership under stochastic memory layouts. Amaryllis introduces frame-preserving updates, authoritative resource algebras, and a weakest preexpectation modality to support modular verification. The entire logic has been fully mechanized in Rocq, allowing for modular formal verification of probabilistic programs featuring dynamic memory allocation.
📝 Abstract
There has recently been exciting progress in the realm of *probabilistic separation logics*. An important subclass of these -- including PSL, Lilac, Bluebell, and pcOL -- are *general-purpose probabilistic logics* (or GPLs, for short), meaning that they provide primitive Hoare-style assertions about probability distributions on the program state, along with powerful modularity principles like *independence* and *conditioning*. However, none of these logics support reasoning about dynamically allocated memory (i.e., pointers into a heap), let alone the more sophisticated resource algebra-based ghost state of modern separation logics like Iris. We argue that this is due to a fundamental obstacle: since the shape of memory (and identity of memory locations) may differ under different random outcomes, it is unclear how pointer ownership can be harmonized with probabilistic independence and conditioning. Furthermore, none of the existing GPLs have been mechanized in a proof assistant.
In this paper, we take a substantial first step towards a marriage of GPLs and modern separation logics like Iris, in the form of **Amaryllis**. Amaryllis is the first GPL to support independence and conditional reasoning while also handling dynamic memory allocation. To overcome the aforementioned obstacle, we propose a new *indexed valuation*-style model of probabilistic assertions, whereby ownership of a standard Iris-style resource (e.g., heaps) can be promoted to ownership at the level of distributions in a generic fashion. We then show how to adapt the central Iris notions of *frame-preserving update*, *authoritative resource algebras*, and the *weakest precondition modality* to be sound for probabilistic reasoning and validate dynamic allocation. Finally, we have mechanized all our results in the Rocq proof assistant and developed an Iris-based proof mode for conducting proofs within Amaryllis.