Formal verification of probabilistic algorithms

We begin with an extensive foundational development of probability, creating a higher-order logic formalization of mathematical measure theory. This allows the definition of the probability space we use to model a random bit generator, which informally is a stream of coin-flips, or technically an in...

Full description

Bibliographic Details
Main Author: Hurd, J.
Published: University of Cambridge 2001
Subjects:
519
Online Access:http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.604823
id ndltd-bl.uk-oai-ethos.bl.uk-604823
record_format oai_dc
spelling ndltd-bl.uk-oai-ethos.bl.uk-6048232015-03-20T06:09:35ZFormal verification of probabilistic algorithmsHurd, J.2001We begin with an extensive foundational development of probability, creating a higher-order logic formalization of mathematical measure theory. This allows the definition of the probability space we use to model a random bit generator, which informally is a stream of coin-flips, or technically an infinite sequence of IID Bernoulli( 1/2 ) random variables. Probabilistic programs are modified using the state-transformer monad familiar from functional programming, where the random bit generator is passed around in the computation. Functions remove random bits from the generator to perform their calculation, and then pass back the changed random bit generator with the result. Our probability space modelling the random bit generator allows us to give precise probabilistic specifications of such programs, and then verify them in the theorem prover. We also develop technical support designed to expedite verification: probabilistic quantifiers; a compositional property subsuming measurability and independence; a probabilistic while loop together with a formal concept of termination with probability 1. We also introduce a technique for reducing properties of a probabilistic while loop to properties of programs that are guaranteed to terminate: these can then be established using induction and standard methods of program correctness. We demonstrate the formal framework with some example probabilistic programs, samples algorithms for four probability distributions; some optimal procedures for generating dice rolls from coin flips; the symmetric simple random walk. In addition, we verify the Miller-Rabin primality test, a well-known and commercially used probabilistic algorithm. Our fundamental perspective allows us to define a version with strong properties, which we can execute in the logic to prove compositeness of numbers.519University of Cambridgehttp://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.604823Electronic Thesis or Dissertation
collection NDLTD
sources NDLTD
topic 519
spellingShingle 519
Hurd, J.
Formal verification of probabilistic algorithms
description We begin with an extensive foundational development of probability, creating a higher-order logic formalization of mathematical measure theory. This allows the definition of the probability space we use to model a random bit generator, which informally is a stream of coin-flips, or technically an infinite sequence of IID Bernoulli( 1/2 ) random variables. Probabilistic programs are modified using the state-transformer monad familiar from functional programming, where the random bit generator is passed around in the computation. Functions remove random bits from the generator to perform their calculation, and then pass back the changed random bit generator with the result. Our probability space modelling the random bit generator allows us to give precise probabilistic specifications of such programs, and then verify them in the theorem prover. We also develop technical support designed to expedite verification: probabilistic quantifiers; a compositional property subsuming measurability and independence; a probabilistic while loop together with a formal concept of termination with probability 1. We also introduce a technique for reducing properties of a probabilistic while loop to properties of programs that are guaranteed to terminate: these can then be established using induction and standard methods of program correctness. We demonstrate the formal framework with some example probabilistic programs, samples algorithms for four probability distributions; some optimal procedures for generating dice rolls from coin flips; the symmetric simple random walk. In addition, we verify the Miller-Rabin primality test, a well-known and commercially used probabilistic algorithm. Our fundamental perspective allows us to define a version with strong properties, which we can execute in the logic to prove compositeness of numbers.
author Hurd, J.
author_facet Hurd, J.
author_sort Hurd, J.
title Formal verification of probabilistic algorithms
title_short Formal verification of probabilistic algorithms
title_full Formal verification of probabilistic algorithms
title_fullStr Formal verification of probabilistic algorithms
title_full_unstemmed Formal verification of probabilistic algorithms
title_sort formal verification of probabilistic algorithms
publisher University of Cambridge
publishDate 2001
url http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.604823
work_keys_str_mv AT hurdj formalverificationofprobabilisticalgorithms
_version_ 1716796626635325440