Contextual equivalence for a probabilistic language with continuous random variables and recursion
Authors:
Open Access
- 30 July 2018
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Programming Languages
- Vol. 2 (ICFP) , 1-30
Abstract
We present a complete reasoning principle for contextual equivalence in an untyped probabilistic language. The language includes continuous (real-valued) random variables, conditionals, and scoring. It also includes recursion, since the standard call-by-value fixpoint combinator is expressible. We demonstrate the usability of our characterization by proving several equivalence schemas, including familiar facts from lambda calculus as well as results specific to probabilistic programming. In particular, we use it to prove that reordering the random draws in a probabilistic program preserves contextual equivalence. This allows us to show, for example, that (let x = e 1 in let y = e 2 in e 0 ) = ctx (let y = e 2 in let x = e 1 in e 0 ) (provided x does not occur free in e 2 and y does not occur free in e 1 ) despite the fact that e 1 and e 2 may have sampling and scoring effects.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- Probabilistic Inference by Program Transformation in Hakaru (System Description)2016
- Environmental bisimulations for probabilistic higher-order languages2016
- Step-Indexed Logical Relations for Probability2015
- Probabilistic coherence spaces are fully abstract for probabilistic PCF2014
- On Probabilistic Applicative Bisimulation and Call-by-Value λ-Calculi2014
- Embedded Probabilistic Programming2009
- A probabilistic language based on sampling functionsACM Transactions on Programming Languages and Systems, 2008
- Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types2006
- Reasoning about programs in continuation-passing styleHigher-Order and Symbolic Computation, 1993
- Equivalence in functional languages with effectsJournal of Functional Programming, 1991