Skip to content

Type-Directed Discretization of Probabilistic Programs

Aug 2026 · Proceedings of the ACM on Programming Languages · Vol 10, pp. 2435 - 2462 · 0 citations · 46 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.

View source

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)

Existing approaches to resource analysis of programs can be classified into two main paradigms: static analysis and dynamic analysis methods. The former allow for formal guarantees but are inherently incomplete; the latter are widely applicable but may miss rare but characteristic (worst-case) scenarios and thus lack s...

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

Polynomial Invariants for Probabilistic Transition Systems with Unbounded Support

We study the synthesis of polynomial invariants for probabilistic transition systems (PTS) based on martingale theory. We present tractable methods to verify that such polynomials are indeed invariants, in the sense that their expected value upon termination is the same as their value at the start of the computation. W...

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.