Reference. Categorical Semantics of Probabilistic Symbolic Execution
Symbolic execution has emerged as a powerful technique for scaling exact probabilistic inference to languages with more expressive features. But, this expressivity comes at a price: probabilistic programming languages based on symbolic execution are difficult to debug, optimize, and prove correct due to the many intricacies inherent to high-performance symbolic execution strategies. We aim to make it easier to work with probabilistic symbolic executors by developing symbolic sets , a new semantic domain that cleanly captures the notion of computation underlying symbolic execution. Just as a symbolic executor replaces ordinary execution with a lifted semantics, symbolic set theory replaces ordinary set theory with a lifted mathematics : the category of symbolic sets is a Grothendieck topos, which allows type theory to be used as a metalanguage for working with symbolic sets and functions. We prove a metatheorem that shows how a large class of definitional interpreters written in the internal language of symbolic sets are automatically correct for their ordinary set-theoretic interpretations. Using this metatheorem, we give the first full correctness argument for a symbolic probabilistic language with higher-order functions, type-directed state merging, pattern matching, and structural recursion.
Cite
Cites 60 works (7 here)
With notes (7)
Roulette: A Language for Expressive, Exact, and Efficient Discrete Probabilistic Programming moy-2025-roulette
Exact probabilistic inference is a requirement for many applications of probabilistic programming languages (PPLs) such as in high-consequence settings or verification. However, designing and implementing a PPL with scalable high-performance exact inference is difficult: exact inference engines, much like SAT solvers, are intricate low-level programs that are hard to implement. Due to this implementation challenge, PPLs that support scalable exact inference are restrictive and lack many features of general-purpose languages. This paper presents Roulette, the first discrete probabilistic programming language that combines high-performance exact inference with general-purpose language features. Roulette supports a significant subset of Racket, including data structures, first-class functions, surely-terminating recursion, mutable state, modules, and macros, along with probabilistic features such as finitely supported discrete random variables, conditioning, and top-level inference. The key insight is that there is a close connection between exact probabilistic inference and the symbolic evaluation strategy of Rosette. Building on this connection, Roulette generalizes and extends the Rosette solver-aided programming system to reason about probabilistic rather than symbolic quantities. We prove Roulette sound by generalizing a proof of correctness for Rosette to handle probabilities, and demonstrate its scalability and expressivity on a number of examples.
A convenient category for higher-order probability theory heunen-2017-a
Nominal Sets: Names and Symmetry in Computer Science pitts_nominal_sets
First steps in synthetic guarded domain theory: step-indexing in the topos of trees birkedalFirstStepsSGDT2012
We present the topos S of trees as a model of guarded recursion. We study the internal dependently-typed higher-order logic of S and show that S models two modal operators, on predicates and types, which serve as guards in recursive definitions of terms, predicates, and types. In particular, we show how to solve recursive type equations involving dependent types. We propose that the internal logic of S provides the right setting for the synthetic construction of abstract versions of step-indexed models of programming languages and program logics. As an example, we show how to construct a model of a programming language with higher-order store and recursive types entirely inside the internal logic of S. Moreover, we give an axiomatic categorical treatment of models of synthetic guarded domain theory and prove that, for any complete Heyting algebra A with a well-founded basis, the topos of sheaves over A forms a model of synthetic guarded domain theory, generalizing the results for S.
Sketches of an Elephant: A Topos Theory Compendium johnstone-2002
Normalization by evaluation for typed lambda calculus with coproducts altenkirch_etal_nd
Solves the decision problem for the simply typed lambda calculus with a strong binary sum, or, equivalently, the word problem for free Cartesian closed categories with binary co-products. Our method is based on the semantic technique known as “normalization by evaluation”, and involves inverting the interpretation of the syntax in a suitable sheaf model and, from this, extracting an appropriate unique normal form. There is no rewriting theory involved and the proof is completely constructive, allowing program extraction from the proof.
External (53)
- Artifact for "Categorical Semantics of Probabilistic Symbolic Execution" (2026)
- Correct and Complete Symbolic Execution for Free (2026)
- Stochastic Lazy Knowledge Compilation for Inference in Discrete Probabilistic Programs (2025)
- Strict Universes for Grothendieck Topoi (2025)
- Random Variables, Conditional Independence and Categories of Abstract Sample Spaces (2025)
- Two-Dimensional Kripke Semantics I: Presheaves (2024)
- Probabilistic Programming with Exact Conditions (2024)
- Realistic Realizability: Specifying ABIs You Can Count On (2024)
- Uncertainty in Artificial Intelligence (2023)
- Semantic Encapsulation using Linking Types (2023)
- Symbolic Semantics for Probabilistic Programs (2023)
- Denotational Semantics for Symbolic Execution (2023)
- A formal foundation for symbolic evaluation with merging (2022)
- Symbolic execution for randomized programs (2022)
- Symbolic execution formally explained (2021)
- Compositional Semantics for Probabilistic Programs with Exact Conditioning (2021)
- Gillian, part i: a multi-language platform for symbolic execution (2020)
- Scaling exact inference for discrete probabilistic programs (2020)
- SPPL: probabilistic programming with fast exact symbolic inference (2020)
- On the Nature of Symbolic Execution (2019)
- An Exhaustive DPLL Algorithm for Model Counting (2018)
- A generic framework for symbolic execution: A coinductive approach (2017)
- Symbolic types for lenient symbolic execution (2017)
- Category Theory in Context (2017)
- Probability Sheaves and the Giry Monad (2017)
- MultiSE: multi-path symbolic execution using value summaries (2015)
- A Generic Framework for Symbolic Execution: Theory and Applications. Ph. D. Dissertation (2014)
- Inference and learning in probabilistic logic programs using weighted Boolean formulas (2014)
- A lightweight symbolic virtual machine for solver-aided host languages (2014)
- Compiling Probabilistic Graphical Models Using Sentential Decision Diagrams (2013)
- Reliability analysis in Symbolic PathFinder (2013)
- Growing solver-aided languages with rosette (2013)
- Presheaf Model of Type Theory (unpublished note) (2013)
- Compiling functional types to relational specifications for low level imperative code (2009)
- On probabilistic inference by weighted model counting (2008)
- Realizability: An Introduction to its Categorical Side (2008)
- Abstracting Allocation (2006)
- A SHEAF THEORETIC APPROACH TO MEASURE THEORY (2006)
- Performing Bayesian Inference by Weighted Model Counting (2005)
- Semantical analysis of higher-order abstract syntax (1999)
- Practical Foundations of Mathematics (1999)
- Lifting Grothendieck Universes (unpublished note) (1997)
- Categorical models for local names (1996)
- Handbook of Categorical Algebra: Volume 3, Sheaf Theory (1994)
- A Sheaf-Theoretic Approach to Pattern Matching and Related Problems (1993)
- Sheaves In Geometry And Logic (1992)
- Computational lambda-calculus and monads (1989)
- Introduction to Higher-Order Categorical Logic (1988)
- Type Algebras, Functor Categories, and Block Structure (1985)
- A Category-Theoretic Approach to the Semantics of Programming Languages (1983)
- Symbolic execution and program testing (1976)
- Boolean Models and Nonstandard Analysis (1969)
- The Rosette Guide