{"title":"Program equivalence in a typed probabilistic call-by-need functional language","authors":"Manfred Schmidt-Schauß, David Sabel","doi":"10.1016/j.jlamp.2023.100904","DOIUrl":null,"url":null,"abstract":"<div><p>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.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100904"},"PeriodicalIF":0.7000,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Logical and Algebraic Methods in Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2352220823000585","RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
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.
期刊介绍:
The Journal of Logical and Algebraic Methods in Programming is an international journal whose aim is to publish high quality, original research papers, survey and review articles, tutorial expositions, and historical studies in the areas of logical and algebraic methods and techniques for guaranteeing correctness and performability of programs and in general of computing systems. All aspects will be covered, especially theory and foundations, implementation issues, and applications involving novel ideas.