A Domain Theory for Statistical Probabilistic Programming We give an adequate denotational semantics for languages with recursive higherorder types, continuous probability distributions, and soft constraints. These are expressive languages for building Bayesian models of the kinds used in computational statistics and machine learning. Among them are untyped languages, similar to Church and WebPPL, because our semantics allows recursive mixedvariance datatypes. Our semantics justifies important program equivalences including commutativity.  :61,new semantic model is based on quasiBorel predomainsu0027. These are a mixture of chaincomplete partial orders (cpos) and quasiBorel spaces. QuasiBorel spaces are a recent model of probability theory that focuses on sets of admissible random elements. Probability is traditionally treated in cpo models using probabilistic powerdomains, but these are not known to be commutative on any class of cpos with higher order functions. By contrast, quasiBorel predomains do support both a commutative probabilistic powerdomain and higherorder functions. As we show, quasiBorel predomains form both a model of Fioreu0027s axiomatic domain theory and a model of Kocku0027s synthetic measure theory.

Dijkstra Monads for All This paper proposes a general semantic framework for verifying programs with arbitrary monadic sideeffects using Dijkstra monads, which we define as monadlike structures indexed by a specification monad. We prove that any monad morphism between a computational monad and a specification monad gives rise to a Dijkstra monad, which provides great flexibility for obtaining Dijkstra monads tailored to the verification task at hand. We moreover show that a large variety of specification monads can be obtained by applying monad transformers to various base specification monads, including predicate transformers and Hoarestyle pre and postconditions. For simplifying the task of defining correct monad transformers, we propose a language inspired by Moggiu0027s monadic metalanguage that is parameterized by a dependent type theory. We also develop a notion of Plotkin and Poweru0027s algebraic operations for Dijkstra monads, together with a corresponding notion of effect handlers. We implement our framework in both Coq and F*, and illustrate that it supports a wide variety of verification styles for effects such as partiality, exceptions, nondeterminism, state, and inputoutput.