Gradual Probabilistic Lambda Calculus

被引:1
作者
Ye, Wenjia [1 ]
Toro, Matias [2 ]
Olmedo, Federico [2 ]
机构
[1] Univ Hong Kong, Hong Kong, Peoples R China
[2] Univ Chile, Comp Sci Dept DCC, PLEIAD Lab, Beauchef 851, Santiago, Chile
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2023年 / 7卷 / OOPSLA期
关键词
Type Systems; Gradual Typing; Probabilistic Lambda Calculus;
D O I
10.1145/3586036
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Probabilistic programming languages have recently gained a lot of attention, in particular due to their applications in domains such as machine learning and di similar to erential privacy. To establish invariants of interest, many such languages include some form of static checking in the form of type systems. However, adopting such a type discipline can be cumbersome or overly conservative. Gradual typing addresses this problem by supporting a smooth transition between static and dynamic checking, and has been successfully applied for languages with di similar to erent constructs and type abstractions. Nevertheless, its bene similar to ts have never been explored in the context of probabilistic languages. In this work, we present and formalize GPLC, a gradual source probabilistic lambda calculus. GPLC includes a binary probabilistic choice operator and allows programmers to gradually introduce/remove static type -and probability- annotations. The static semantics of GPLC heavily relies on the notion of probabilistic couplings, as required for de similar to ning several relations, such as consistency, precision, and consistent transitivity. The dynamic semantics of GPLC is given via elaboration to the target language TPLC, which features a distribution-based semantics interpreting programs as probability distributions over similar to nal values. Regarding the language metatheory, we establish that TPLC-and therefore also GPLC- is type safe and satis similar to es two of the so-called re similar to ned criteria for gradual languages, namely, that it is a conservative extension of a fully static variant and that it satis similar to es the gradual guarantee, behaving smoothly with respect to type precision.
引用
收藏
页数:30
相关论文
共 58 条
  • [1] [Anonymous], 2008, P 24 C UNC ART INT, DOI DOI 10.5555/3023476.3023503
  • [2] Type-Based Complexity Analysis of Probabilistic Functional Programs
    Avanzini, Martin
    Dal Lago, Ugo
    Ghyselen, Alexis
    [J]. 2019 34TH ANNUAL ACM/IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE (LICS), 2019,
  • [3] Formal Certification of Code-Based Cryptographic Proofs
    Barthe, Gilles
    Gregoire, Benjamin
    Beguelin, Santiago Zanella
    [J]. ACM SIGPLAN NOTICES, 2009, 44 (01) : 90 - 101
  • [4] Gradual typing with union and intersection types
    Castagna G.
    Lanvin V.
    [J]. Proceedings of the ACM on Programming Languages, 2017, 1 (ICFP):
  • [5] Gradual Typing: A New Perspective
    Castagna, Giuseppe
    Lanvin, Victor
    Petrucciani, Tommaso
    Siek, Jeremy G.
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL):
  • [6] Claret Guillaume., 2013, Foundations of Software Engineering, P92, DOI DOI 10.1145/2491411.2491423
  • [7] Dal Lago U, 2011, Arxiv, DOI arXiv:1104.0195
  • [8] PROBABILISTIC OPERATIONAL SEMANTICS FOR THE LAMBDA CALCULUS
    Dal Lago, Ugo
    Zorzi, Margherita
    [J]. RAIRO-THEORETICAL INFORMATICS AND APPLICATIONS, 2012, 46 (03): : 413 - 450
  • [9] Dal Lago Ugo, 2017, ACM T PROGR LANG SYS, V41, P1
  • [10] Probabilistic coherence spaces as a model of higher-order probabilistic computation
    Danos, Vincent
    Ehrhard, Thomas
    [J]. INFORMATION AND COMPUTATION, 2011, 209 (06) : 966 - 991