English

Lilac: A Modal Separation Logic for Conditional Probability

Programming Languages 2023-05-29 v2 Logic in Computer Science

Abstract

We present Lilac, a separation logic for reasoning about probabilistic programs where separating conjunction captures probabilistic independence. Inspired by an analogy with mutable state where sampling corresponds to dynamic allocation, we show how probability spaces over a fixed, ambient sample space appear to be the natural analogue of heap fragments, and present a new combining operation on them such that probability spaces behave like heaps and measurability of random variables behaves like ownership. This combining operation forms the basis for our model of separation, and produces a logic with many pleasant properties. In particular, Lilac has a frame rule identical to the ordinary one, and naturally accommodates advanced features like continuous random variables and reasoning about quantitative properties of programs. Then we propose a new modality based on disintegration theory for reasoning about conditional probability. We show how the resulting modal logic validates examples from prior work, and give a formal verification of an intricate weighted sampling algorithm whose correctness depends crucially on conditional independence structure.

Keywords

Cite

@article{arxiv.2304.01339,
  title  = {Lilac: A Modal Separation Logic for Conditional Probability},
  author = {John M. Li and Amal Ahmed and Steven Holtzen},
  journal= {arXiv preprint arXiv:2304.01339},
  year   = {2023}
}

Comments

Accepted to PLDI 2023

R2 v1 2026-06-28T09:47:46.349Z