# Formalising Semantics for Expected Running Time of Probabilistic Programs

@inproceedings{Hlzl2016FormalisingSF, title={Formalising Semantics for Expected Running Time of Probabilistic Programs}, author={Johannes H{\"o}lzl}, booktitle={ITP}, year={2016} }

We formalise two semantics observing the expected running time of pGCL programs. The first semantics is a denotational semantics providing a direct computation of the running time, similar to the weakest pre-expectation transformer. The second semantics interprets a pGCL program in terms of a Markov decision process (MDPs), i.e. it provides an operational semantics. Finally we show the equivalence of both running time semantics.

## 11 Citations

### Expected Runtime Analysis by Program Veriﬁcation

- Computer Science
- 2020

A weakest pre-conditioning framework à la Dijkstra that enables to determine the expected runtime in a compositional manner is introduced that is a reasoning framework at the syntax level of programs.

### Weakest Precondition Reasoning for Expected Runtimes of Randomized Algorithms

- Computer Science, MathematicsJ. ACM
- 2018

This article presents a wp--style calculus for obtaining bounds on the expected runtime of randomized algorithms, and shows that the approach is a conservative extension of Nielson’s approach for reasoning about the runtime of deterministic programs.

### Markov Chains and Markov Decision Processes in Isabelle/HOL

- Computer Science, MathematicsJournal of Automated Reasoning
- 2016

This paper presents an extensive formalization of Markov chains (MCs) and Markov decision processes (MDPs), with discrete time and (possibly infinite) discrete state-spaces. The formalization takes a…

### Safe couplings: coupled refinement types

- Computer ScienceProceedings of the ACM on Programming Languages
- 2022

This work enhances refinement types with mechanisms to reason about relational properties of probabilistic computations and uses them to formally verify Haskell implementations of two classic machine learning algorithms: Temporal Difference reinforcement learning and stochastic gradient descent.

### Kantorovich Continuity of Probabilistic Programs

- Computer ScienceArXiv
- 2019

A sound method to approximate the Kantorovich distance between two executions of a probabilistic program is developed in the form of a relational pre-expectation calculus for proving stability of machine learning algorithms and convergence of Probabilistic processes.

### Verified Analysis of Random Trees

- Computer Science
- 2018

This work is a case study of the formal verification and complexity analysis of some famous probabilistic algorithms and data structures in the proof assistant Isabelle/HOL: the expected number of…

### Verified Analysis of Random Binary Tree Structures

- Computer ScienceJournal of Automated Reasoning
- 2020

This work is a case study of the formal verification and complexity analysis of some famous probabilistic algorithms and data structures in the proof assistant Isabelle/HOL. In particular, we…

### Tail Bounds for Randomized Programs

- Computer Science
- 2017

A theorem by Karp is mechanized, along with several extensions, that provide an easy to use “cookbook” method for verifying tail bounds, much like the traditional “Master Theorem” gives bounds for deterministic algorithms.

### Verified Tail Bounds for Randomized Programs

- Computer ScienceITP
- 2018

We mechanize a theorem by Karp, along with several extensions, that provide an easy to use “cookbook” method for verifying tail bounds of randomized algorithms, much like the traditional “Master…

### Verified Textbook Algorithms - A Biased Survey

- Computer ScienceATVA
- 2020

The state of the art of verifying standard textbook algorithms is surveyed, largely on the classic text by Cormen et al.

## References

SHOWING 1-10 OF 12 REFERENCES

### Operational versus weakest pre-expectation semantics for the probabilistic guarded command language

- Computer SciencePerform. Evaluation
- 2014

### Weakest Precondition Reasoning for Expected Run-Times of Probabilistic Programs

- Computer ScienceESOP
- 2016

This paper presents a wp---style calculus for obtaining bounds on the expected run---time of probabilistic programs, and shows that the approach is a conservative extension of Nielson's approach for reasoning about the run--- time of deterministic programs.

### Markov Chains and Markov Decision Processes in Isabelle/HOL

- Computer Science, MathematicsJournal of Automated Reasoning
- 2016

This paper presents an extensive formalization of Markov chains (MCs) and Markov decision processes (MDPs), with discrete time and (possibly infinite) discrete state-spaces. The formalization takes a…

### Abstraction, Refinement and Proof for Probabilistic Systems

- Computer ScienceMonographs in Computer Science
- 2005

Probabilistic guarded commands and their refinement logic.- to pGCL: Its logic and its model.- Probabilistic loops: Invariants and variants.- Case studies in termination: Choice coordination, the…

### Probabilistic Functions and Cryptographic Oracles in Higher Order Logic

- Computer ScienceESOP
- 2016

A shallow embedding of a probabilistic functional programming language in higher order logic is presented and it is proved that these operators are parametric and derive a relational program logic for reasoning about programs from parametricity.

### Construction and stochastic applications of measure spaces in higher-order logic

- Mathematics, Computer Science
- 2013

This work construct probability spaces with infinitely many independent random variables and the stochastic process of a Markov chain to verify the correctness of probabilistic model checking and to verify properties of the ZeroConf protocol and the Crowds protocol.

### Verifying Probabilistic Correctness in Isabelle with pGCL

- Computer ScienceSSV
- 2012

A formalisation of pGCL in Isabelle/HOL is presented and the applicability of the formalism to the mechanical verification of probabilistic security properties, including the effectiveness of side-channel countermeasures in real systems is motivated.

### Formal verification of probabilistic algorithms

- Computer Science, Mathematics
- 2003

This thesis shows how probabilistic algorithms can be formally verified using a mechanical theorem prover, and defines a version with strong properties, which can execute in the logic to prove compositeness of numbers.