Program equivalence in a typed probabilistic call-by-need functional language

We extend a call-by-need variant of PCF with a binary probabilistic fair choice operator, which makes a lazy and typed variant of probabilistic functional programming. We define a contextual equivalence that respects the expected convergence of expressions and prove a corresponding context lemma. Th...

Full description

Saved in:
Bibliographic Details
Published inJournal of logical and algebraic methods in programming Vol. 135; p. 100904
Main Authors Schmidt-Schauß, Manfred, Sabel, David
Format Journal Article
LanguageEnglish
Published Elsevier Inc 01.10.2023
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:We extend a call-by-need variant of PCF with a binary probabilistic fair choice operator, which makes a lazy and typed variant of probabilistic functional programming. We define a contextual equivalence that respects the expected convergence of expressions and prove a corresponding context lemma. This enables us to show correctness of several program transformations with respect to contextual equivalence. Distribution-equivalence of expressions of numeric type is introduced. While the notion of contextual equivalence stems from program semantics, the notion of distribution equivalence is a direct description of the stochastic model. Our main result is that both notions are compatible: We show that for closed expressions of numeric type contextual equivalence and distribution-equivalence coincide. This provides a strong and often operationally feasible criterion for contextual equivalence of expressions and programs.
ISSN:2352-2208
DOI:10.1016/j.jlamp.2023.100904