Lazy Intermediate Representations for Algebraic Effects
Simon Castellan, Hugo Paquet
摘要
A lazy program interpreter postpones computation until the result is actually needed. This is typically more efficient than an eager (or call-by-value) interpreter, but a concern is that the semantics is not generally preserved.
We propose a new semantic analysis of lazy evaluation that relies on a subtle combination of name generation and read-only state. Our perspective is that laziness arises from a hybrid evaluation strategy, in which only the name generation follows call-by-value.
This semantic model suggests better intermediate representations of sum and product types in a lazy interpreter, along with equations that justify further optimizations. We illustrate this with an implementation in OCaml. Our motivation is practical: the origin of this work is a realworld application of discrete probabilistic programming, in which large algebraic data types cause significant performance issues with a call-by-value interpreter. Our lazy semantics justifies better optimized representations, and provides principled foundations for other methods involving laziness in probabilistic programming.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper5
- Affine Monads and Lazy Structures for Bayesian ProgrammingSwaraj Dash, Younesse Kaddar, Hugo Paquet, Sam StatonPOPL 2023 · 被引用 12 次
- Adequacy for Algebraic Effects RevisitedG. A. KavvosOOPSLA 2025 · 被引用 6 次
- Roulette: A Language for Expressive, Exact, and Efficient Discrete Probabilistic ProgrammingCameron Moy, Jack Czenszak, John M. Li, Brianna Marshall 等PLDI 2025 · 被引用 3 次
- Stochastic Lazy Knowledge Compilation for Inference in Discrete Probabilistic ProgramsMaddy Bowers, Alexander K. Lew, Joshua B. Tenenbaum, Armando Solar-Lezama 等PLDI 2025 · 被引用 2 次
- Categorical Semantics of Probabilistic Symbolic ExecutionJohn M. Li, Jack Czenszak, Steven HoltzenPLDI 2026
相关 Paper
- Exact Recursive Probabilistic ProgrammingDavid Chiang, Colin McDonald, Chung-chieh ShanOOPSLA 2023 · 被引用 12 次
- Compiling Probabilistic Programs for Variable Elimination with Information FlowJianlin Li, Eric Wang, Yizhou ZhangPLDI 2024 · 被引用 6 次
- Exact Bayesian Inference for Loopy Probabilistic Programs using Generating FunctionsLutz Klinkenberg, Christian Blumenthal, Mingshuai Chen, Darion Haase 等OOPSLA 2024 · 被引用 11 次
- Probabilistic programming semantics for name generationMarcin Sabok, Sam Staton, Dario Stein, Michael WolmanPOPL 2021 · 被引用 2 次
- Semantics for variational Quantum programmingXiaodong Jia, Andre Kornell, Bert Lindenhovius, Michael W. Mislove 等POPL 2022 · 被引用 15 次
