Skip to content
Open access

Type-Directed Discretization of Probabilistic Programs

Aug 2026 · Proceedings of the ACM on Programming Languages · Vol 10, pp. 2435 - 2462 · 0 citations · 48 references
Computer Science

TL;DR

The empirical evaluation shows two complementary strengths of Slice when paired with discrete backends: it enables exact inference for challenging continuous programs that lie beyond the reach of previous exact systems, and is competitive with state-of-the-art exact inference systems for continuous programs.

Abstract

We study exact discretization as a semantics-preserving transformation for recursive, higher-order probabilistic programs with continuous distributions. We target programs where continuous values are compared against finitely many constants, so exact inference reduces to a discrete problem. Our central technical contribution is a non-local, type-directed analysis that infers where continuous values can be partitioned into finitely many observationally relevant regions, then rewrites sampling and comparison behavior over those regions. We call this transformation Slice. Because this construction is global and type-directed, correctness requires reasoning beyond the local syntax: we formalize the transformation and prove soundness for boolean queries using a coupling-style logical relations argument over operational semantics. As an application, transformed programs can be executed by discrete engines such as Dice, Roulette, and Storm. Our empirical evaluation shows two complementary strengths of Slice when paired with discrete backends: it enables exact inference for challenging continuous programs that lie beyond the reach of previous exact systems, and, on benchmarks where direct comparison is possible, it is competitive with state-of-the-art exact inference systems for continuous programs.

Read PDF

Similar papers

Preprint Aug 2026

Foundations of MT-PDCL: Measure-Theoretic Probabilistic Definite Clause Logic

Standard probabilistic logic programming frameworks typically rely on grounding logic programs into discrete propositional representations. This operational requirement restricts exact inference to finite domains and discrete probability distributions. In this paper, we introduce Measure-Theoretic Probabilistic Definit...

C. Bǎdicǎ, A. Bădică · 0 citations
Open access Aug 2026

Adequacy for Predicate Transformer Semantics

This paper establishes a generic framework to prove adequacy for predicate transformer semantics with respect to an appropriately designed operational semantics, and covers a wide range of instances, including total expected costs, cost moments, conditional expectations, and expected multiplicative rewards of probabili...

Kazuki Watanabe, Mirai Ikebuchi, Mayuko Kori · 0 citations
Preprint Aug 2026

Verifier-guided discovery of exact high-order mimetic operators with large language models

This work tests whether large language models (LLMs) can help while remaining non-authoritative in a constrained mathematical search for high-order structure-preserving discretization and reconstructs four leading LLM-originated programs exactly.

J. de Curtò, I. de Zarzà · 0 citations
Sep 2026

Compiling with the Sequent Calculus

This work is a continuation, and generalization, of Andrew Appel's landmark work on “Compiling with Continuations”, but instead of natural-deduction-based languages like the lambda calculus, it uses sequent-calculus-inspired languages throughout all intermediate stages.

Marius Müller, David Binder, Marco Tzschentke et al. · 0 citations
Preprint Aug 2026

Inferring Empirical Sound Resource Bounds via Symbolic Execution and Linear Programming (Extended Version)

A novel hybrid approach that systematically derives upper bounds for the worst-case resource consumption of functional programs by combines dynamic symbolic execution to exhaustively explore all possible computation paths within a constrained input space with mixed-integer linear programming to derive empirically sound...

Samuel Frontull, M. Meitinger, Georg Moser · 0 citations
Preprint Sep 2026

Polynomial Invariants for Probabilistic Transition Systems with Unbounded Support

If all random samples have finite moments and the authors can verify a moment bound on the runtime of a linear loop, then they can automatically synthesise polynomial loop invariants that satisfy the OST and simplify the dui property to proving finiteness of the expected value of an expression depending on the update m...

A. Schreuder, Lorenz Winkler, Laura Kovács et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.