Quantitative Separation Logic A Logic for Reasoning about Probabilistic Pointer Programs

被引:27
作者
Batz, Kevin [1 ]
Kaminski, Benjamin Lucien [1 ]
Katoen, Joost-Pieter [1 ]
Matheja, Christoph [1 ]
Noll, Thomas [1 ]
机构
[1] Rhein Westfal TH Aachen, Aachen, Germany
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2019年 / 3卷 / POPL期
关键词
quantitative separation logic; probabilistic programs; randomized algorithms; formal verification; quantitative reasoning;
D O I
10.1145/3290347
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present quantitative separation logic (QSL). In contrast to classical separation logic, QSL employs quantities which evaluate to real numbers instead of predicates which evaluate to Boolean values. The connectives of classical separation logic, separating conjunction and separating implication, are lifted from predicates to quantities. This extension is conservative: Both connectives are backward compatible to their classical analogs and obey the same laws, e.g. modus ponens, adjointness, etc. Furthermore, we develop a weakest precondition calculus for quantitative reasoning about probabilistic pointer programs in QSL. This calculus is a conservative extension of both Ishtiaq's, O'Hearn's and Reynolds' separation logic for heap-manipulating programs and Kozen's/Mclver and Morgan's weakest preexpectatioris for probabilistic programs. Soundness is proven with respect to an operational semantics based on Markov decision processes. Our calculus preserves O'Hearn's frame rule, which enables local reasoning. We demonstrate that our calculus enables reasoning about quantities such as the probability of terminating with an empty heap, the probability of reaching a certain array permutation, or the expected length of a list.
引用
收藏
页数:29
相关论文
共 46 条
[1]   Randomized splay trees: Theoretical and experimental results [J].
Albers, S ;
Karpinski, M .
INFORMATION PROCESSING LETTERS, 2002, 81 (04) :213-221
[2]  
[Anonymous], 2001, J OPER RES SOC
[3]  
[Anonymous], 2005, MARKOV DECISION PROC
[4]  
Apt Krzysztof R, 1986, J ACM JACM, V33
[5]   RANDOMIZED SEARCH-TREES [J].
ARAGON, CR ;
SEIDEL, RG .
30TH ANNUAL SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE, 1989, :540-545
[7]  
Baier C, 2008, PRINCIPLES OF MODEL CHECKING, P1
[8]  
Barthe Gilles, 2018, Programming Languages and Systems. 27th European Symposium on Programming, ESOP 2018, held as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2018. Proceedings: LNCS 10801, P117, DOI 10.1007/978-3-319-89884-1_5
[9]  
Barthe Gilles, 2012, Mathematics of Program Construction. Proceedings 11th International Conference, MPC 2012, P1, DOI 10.1007/978-3-642-31113-0_1
[10]  
Batz Kevin, 2018, ABS180210467 CORR