We study a syntax for specifying quantitative "assertions" - functions mapping program states to numbers - for probabilistic program verification. We prove that our syntax is expressive in the following sense: Given any probabilistic program $C$, if a function $f$ is expressible in our syntax, then the function mapping each initial state $\sigma$ to the expected value of $f$ evaluated in the final states reached after termination of $C$ on $\sigma$ (also called the weakest preexpectation $\textit{wp} [C](f)$) is also expressible in our syntax. As a consequence, we obtain a relatively complete verification system for reasoning about expected values and probabilities in the sense of Cook: Apart from proving a single inequality between two functions given by syntactic expressions in our language, given $f$, $g$, and $C$, we can check whether $g \preceq \textit{wp} [C] (f)$.
翻译:我们研究一个语法,用于指定量化的“保证”-函数绘图程序对数字的描述状态-用于概率性程序核查。我们证明我们的语法在以下意义上是表达的:鉴于任何概率性程序,如果一个函数在我们的语法中表现了美元,那么函数将每个初始状态的$\gma美元映射为在以$\sigma$终止后最后各州所估定的美元(也称为最差的预估值$\textit{wp} [C](f)$)美元)的预期值。结果,我们获得了一个相对完整的验证系统,用于解释库克群岛语义中的预期值和概率:除了证明我们语言中的同义表达方式给出的两种函数之间单一的不平等之外,考虑到$f、$g美元和$C$,我们还可以检查是否在我们的语法中表现了$\preceq\textit{wp}[C](f)美元。