Lilac: A Modal Separation Logic for Conditional Probability

被引:8
作者
Li, John M. [1 ]
Ahmed, Amal [1 ]
Holtzen, Steven [1 ]
机构
[1] Northeastern Univ, Boston, MA 02115 USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2023年 / 7卷 / PLDI期
基金
美国国家科学基金会;
关键词
probabilistic programming; separation logic; SEMANTICS; BI;
D O I
10.1145/3591226
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.(1)
引用
收藏
页码:148 / 171
页数:24
相关论文
共 47 条
[1]   A Bunched Logic for Conditional Independence [J].
Bao, Jialu ;
Docherty, Simon ;
Hsu, Justin ;
Silva, Alexandra .
2021 36TH ANNUAL ACM/IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE (LICS), 2021,
[2]   A Separation Logic for Negative Dependence [J].
Bao, Jialu ;
Gaboardi, Marco ;
Hsu, Justin ;
Tassarotti, Joseph .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2022, 6 (POPL)
[3]   A Probabilistic Separation Logic [J].
Barthe, Gilles ;
Hsu, Justin ;
Liao, Kevin .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (POPL)
[4]  
Barthe Gilles, 2018, LECT NOTES COMPUTER, DOI DOI 10.1007/978-3-319-89884-1_5
[5]   Quantitative Separation Logic A Logic for Reasoning about Probabilistic Pointer Programs [J].
Batz, Kevin ;
Kaminski, Benjamin Lucien ;
Katoen, Joost-Pieter ;
Matheja, Christoph ;
Noll, Thomas .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL)
[6]   BI-hyperdoctrines, higher-order separation logic, and abstraction [J].
Biering, Bodil ;
Birkedal, Lars ;
Torp-Smith, Noah .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2007, 29 (05)
[7]   Step-Indexed Logical Relations for Probability [J].
Bizjak, Ales ;
Birkedal, Lars .
FOUNDATIONS OF SOFTWARE SCIENCE AND COMPUTATION STRUCTURES (FOSSACS 2015), 2015, 9034 :279-294
[8]   Conditioning as disintegration [J].
Chang, JT ;
Pollard, D .
STATISTICA NEERLANDICA, 1997, 51 (03) :287-317
[9]   Contextual Equivalence for Probabilistic Programs with Continuous Random Variables and Scoring [J].
Culpepper, Ryan ;
Cobb, Andrew .
PROGRAMMING LANGUAGES AND SYSTEMS (ESOP 2017): 26TH EUROPEAN SYMPOSIUM ON PROGRAMMING, 2017, 10201 :368-392
[10]   Scaling Static Analyses at Facebook [J].
Distefano, Dino ;
Fahndrich, Manuel ;
Logozzo, Francesco ;
O'Hearn, Peter W. .
COMMUNICATIONS OF THE ACM, 2019, 62 (08) :62-70