Book contents
- Frontmatter
- Contents
- List of Contributors
- Preface
- 1 Semantics of Probabilistic Programming: A Gentle Introduction
- 2 Probabilistic Programs as Measures
- 3 Application ofComputable Distributions to the Semantics of Probabilistic Programs
- 4 On Probabilistic λ-Calculi
- 5 Probabilistic Couplings from Program Logics
- 6 Expected Runtime Analyis by Program Verification
- 7 Termination Analysis of Probabilistic Programs with Martingales
- 8 Quantitative Analysis of Programs with Probabilities and Concentration of Measure Inequalities
- 9 The Logical Essentials of Bayesian Reasoning
- 10 Quantitative Equational Reasoning
- 11 Probabilistic Abstract Interpretation: Sound Inference and Application to Privacy
- 12 Quantitative Information Flow with Monads in Haskell
- 13 Luck: A Probabilistic Language for Testing
- 14 Tabular: Probabilistic Inference from the Spreadsheet
- 15 Programming Unreliable Hardware
12 - Quantitative Information Flow with Monads in Haskell
Published online by Cambridge University Press: 18 November 2020
- Frontmatter
- Contents
- List of Contributors
- Preface
- 1 Semantics of Probabilistic Programming: A Gentle Introduction
- 2 Probabilistic Programs as Measures
- 3 Application ofComputable Distributions to the Semantics of Probabilistic Programs
- 4 On Probabilistic λ-Calculi
- 5 Probabilistic Couplings from Program Logics
- 6 Expected Runtime Analyis by Program Verification
- 7 Termination Analysis of Probabilistic Programs with Martingales
- 8 Quantitative Analysis of Programs with Probabilities and Concentration of Measure Inequalities
- 9 The Logical Essentials of Bayesian Reasoning
- 10 Quantitative Equational Reasoning
- 11 Probabilistic Abstract Interpretation: Sound Inference and Application to Privacy
- 12 Quantitative Information Flow with Monads in Haskell
- 13 Luck: A Probabilistic Language for Testing
- 14 Tabular: Probabilistic Inference from the Spreadsheet
- 15 Programming Unreliable Hardware
Summary
Monads are a popular feature of the programming language Haskell because they can model many different notions of computation in a uniform and purely functional way. Our particular interest here is the probability monad, which can be -- and has been -- used to synthesise models for probabilistic programming. Quantitative Information Flow, or QIF, arises when security is combined with probability, and concerns the measurement of the amount of information that 'leaks' from a probabilistic program's state to a (usually) hostile observer: that is, not 'whether' leaks occur but rather 'how much?' Recently it has been shown that QIF can be seen monadically, a 'lifting' of the probability monad so that programs become functions from distributions to distributions of distributions: the codomain is 'hyper distributions'. Haskell's support for monads therefore suggests a synthesis of an executable model for QIF. Here, we provide the first systematic and thorough account of doing that: using distributions of distributions to synthesise a model for Quantitative Information Flow in terms of monads in Haskell.
Keywords
- Type
- Chapter
- Information
- Foundations of Probabilistic Programming , pp. 391 - 448Publisher: Cambridge University PressPrint publication year: 2020
- Creative Commons
- This content is Open Access and distributed under the terms of the Creative Commons Attribution licence CC-BY 4.0 https://creativecommons.org/cclicenses/
- 2
- Cited by